open-consul/ui/packages/consul-ui/app/components/auth-form
Ella Cai aa03846880
UI: Update Consul UI colors to use HDS colors (#16111)
* update red color variables to hds

* change background red to be one step lighter

* map oranges

* map greens

* map blues

* map greys

* delete themes, colours: lemon, magenta, strawberry, and vault color aliases

* add unmapped rainbow colours

* replace white and transparent vars, remove unused semantic vars and frame placeholders

* small tweaks to improve contrast, change node health status x/check colours for non-voters to match design doc, replace semantic colour action w hds colour

* add unmapped grays, remove dark theme, manually set nav bar to use dark colours

* map consul pink colour

* map yellows

* add unmapped oranges, delete light theme

* remove readme, base variables, clean up dangling colours

* Start working on the nav disclosure menus

* Update main-nav-horizontal dropdowns

* Format template

* Update box-shadow tokens

* Replace --tone- usage with tokens

* Update nav disabled state and panel border colour

* Replace rgb usage on tile

* Fix permissions modal overlay

* More fixes

* Replace orange-500 with amber-200

* Update badge colors

* Update vertical sidebar colors

* Remove top border on consul peer list ul

---------

Co-authored-by: wenincode <tyler.wendlandt@hashicorp.com>
2023-02-27 09:30:12 -07:00
..
README.mdx ui: Support for SSO with Admin Partitions (#11604) 2021-11-24 14:53:12 +00:00
chart.xstate.js ui: Support for SSO with Admin Partitions (#11604) 2021-11-24 14:53:12 +00:00
index.hbs feat: update alerts to Hds::Alert component (CC-4035) (#16412) 2023-02-24 20:07:12 -08:00
index.js ui: Support for SSO with Admin Partitions (#11604) 2021-11-24 14:53:12 +00:00
index.scss ui: Colocate remaining CSS components to the app/components folder (#10328) 2021-06-23 09:19:35 +01:00
layout.scss ui: Support for SSO with Admin Partitions (#11604) 2021-11-24 14:53:12 +00:00
pageobject.js ui: chore - upgrade ember and friends (#14518) 2022-09-15 09:43:17 +01:00
skin.scss UI: Update Consul UI colors to use HDS colors (#16111) 2023-02-27 09:30:12 -07:00
tabs.xstate.js ui: Support for SSO with Admin Partitions (#11604) 2021-11-24 14:53:12 +00:00

README.mdx

# AuthForm

AuthForm is a mostly template only form component specifically for user
authentication for the UI. The component uses `TokenSource` which performs the
necessary functionality all composed together using a StateChart to
orchestrate the flow.

Errors are contained/rendered within the form itself.

```hbs preview-template
<AuthForm
  @dc={{'dc-1'}}
  @partition={{'default'}}
  @nspace={{'default'}}
  @onsubmit={{noop}}
as |api|></AuthForm>
```

## Arguments

| Argument | Type | Default | Description |
| --- | --- | --- | --- |
| `dc` | `String` | | The name of the current datacenter |
| `nspace` | `String` | | The name of the current namespace |
| `partition` | `String` | | The name of the current partition |
| `onsubmit` | `Function` |  | The action to fire when the form is submitted |

## Exported API

| Name | Type | Description |
| --- | --- | --- |
| `submit` | `Function` | Submit the form with a `{Name: 'oidc', Value: 'provider-name'}` which will eventually be passed as the `value` to the TokenSource |
| `focus` | `Function` | Focus the input field |
| `error` | `Function` | Fire an error to be displayed in the form |
| `reset` | `Function` | Reset the form back to its original empty/non-error state |
| `disabled` | `Boolean` | Whether the form is currently disabled or not |

## Slots

| Name | Description |
| --- | --- |
| `content` | Provides a configurable slot underneath the form for addition of other login widgets, in our case SSO |

## See

- [Component Source Code](./index.js)
- [Template Source Code](./index.hbs)

---