@api-client/ui 0.2.13 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +1 -0
- package/build/src/core/ModalActivity.d.ts +1 -1
- package/build/src/core/ModalActivity.d.ts.map +1 -1
- package/build/src/core/ModalActivity.js +6 -5
- package/build/src/core/ModalActivity.js.map +1 -1
- package/build/src/core/ThemeManager.d.ts +4 -2
- package/build/src/core/ThemeManager.d.ts.map +1 -1
- package/build/src/core/ThemeManager.js.map +1 -1
- package/build/src/demo/DemoPage.d.ts +1 -4
- package/build/src/demo/DemoPage.d.ts.map +1 -1
- package/build/src/demo/DemoPage.js +2 -5
- package/build/src/demo/DemoPage.js.map +1 -1
- package/build/src/elements/authorization/ui/CcAuthorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/CcAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/CcAuthorization.js +2 -2
- package/build/src/elements/authorization/ui/CcAuthorization.js.map +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.js +11 -5
- package/build/src/elements/authorization/ui/OAuth2Authorization.js.map +1 -1
- package/build/src/elements/authorization/ui/OidcAuthorization.d.ts +1 -2
- package/build/src/elements/authorization/ui/OidcAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/OidcAuthorization.js +10 -8
- package/build/src/elements/authorization/ui/OidcAuthorization.js.map +1 -1
- package/build/src/elements/code/HttpSnippets.d.ts +1 -1
- package/build/src/elements/code/HttpSnippets.d.ts.map +1 -1
- package/build/src/elements/code/HttpSnippets.js +5 -5
- package/build/src/elements/code/HttpSnippets.js.map +1 -1
- package/build/src/elements/dialog/internals/ConfirmDelete.d.ts +1 -1
- package/build/src/elements/dialog/internals/ConfirmDelete.d.ts.map +1 -1
- package/build/src/elements/dialog/internals/ConfirmDelete.js +5 -5
- package/build/src/elements/dialog/internals/ConfirmDelete.js.map +1 -1
- package/build/src/elements/dialog/internals/Rename.d.ts +1 -1
- package/build/src/elements/dialog/internals/Rename.d.ts.map +1 -1
- package/build/src/elements/dialog/internals/Rename.js +6 -5
- package/build/src/elements/dialog/internals/Rename.js.map +1 -1
- package/build/src/elements/environment/EnvironmentEditor.d.ts +1 -1
- package/build/src/elements/environment/EnvironmentEditor.d.ts.map +1 -1
- package/build/src/elements/environment/EnvironmentEditor.js +5 -4
- package/build/src/elements/environment/EnvironmentEditor.js.map +1 -1
- package/build/src/elements/http/BodyEditor.d.ts +1 -3
- package/build/src/elements/http/BodyEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyEditor.js +25 -20
- package/build/src/elements/http/BodyEditor.js.map +1 -1
- package/build/src/elements/http/BodyMultipartEditor.d.ts +1 -1
- package/build/src/elements/http/BodyMultipartEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyMultipartEditor.js +3 -3
- package/build/src/elements/http/BodyMultipartEditor.js.map +1 -1
- package/build/src/elements/http/CertificateAdd.element.d.ts +1 -3
- package/build/src/elements/http/CertificateAdd.element.d.ts.map +1 -1
- package/build/src/elements/http/CertificateAdd.element.js +6 -10
- package/build/src/elements/http/CertificateAdd.element.js.map +1 -1
- package/build/src/elements/http/HeadersForm.d.ts +1 -1
- package/build/src/elements/http/HeadersForm.d.ts.map +1 -1
- package/build/src/elements/http/HeadersForm.js +3 -3
- package/build/src/elements/http/HeadersForm.js.map +1 -1
- package/build/src/elements/http/HttpAssertions.element.d.ts +1 -1
- package/build/src/elements/http/HttpAssertions.element.d.ts.map +1 -1
- package/build/src/elements/http/HttpAssertions.element.js +2 -2
- package/build/src/elements/http/HttpAssertions.element.js.map +1 -1
- package/build/src/elements/http/HttpFlows.element.d.ts +1 -1
- package/build/src/elements/http/HttpFlows.element.d.ts.map +1 -1
- package/build/src/elements/http/HttpFlows.element.js +6 -6
- package/build/src/elements/http/HttpFlows.element.js.map +1 -1
- package/build/src/elements/http/RequestEditor.d.ts +1 -3
- package/build/src/elements/http/RequestEditor.d.ts.map +1 -1
- package/build/src/elements/http/RequestEditor.js +10 -11
- package/build/src/elements/http/RequestEditor.js.map +1 -1
- package/build/src/elements/http/UrlParamsForm.d.ts +1 -1
- package/build/src/elements/http/UrlParamsForm.d.ts.map +1 -1
- package/build/src/elements/http/UrlParamsForm.js +4 -4
- package/build/src/elements/http/UrlParamsForm.js.map +1 -1
- package/build/src/elements/project/HttpProjectRequest.d.ts +1 -1
- package/build/src/elements/project/HttpProjectRequest.d.ts.map +1 -1
- package/build/src/elements/project/HttpProjectRequest.js +3 -3
- package/build/src/elements/project/HttpProjectRequest.js.map +1 -1
- package/build/src/elements/project/HttpProjectRequestHistory.d.ts +1 -2
- package/build/src/elements/project/HttpProjectRequestHistory.d.ts.map +1 -1
- package/build/src/elements/project/HttpProjectRequestHistory.js +5 -6
- package/build/src/elements/project/HttpProjectRequestHistory.js.map +1 -1
- package/build/src/elements/project/ProjectRunReport.d.ts +1 -1
- package/build/src/elements/project/ProjectRunReport.d.ts.map +1 -1
- package/build/src/elements/project/ProjectRunReport.js +7 -7
- package/build/src/elements/project/ProjectRunReport.js.map +1 -1
- package/build/src/elements/project/ProjectRunner.d.ts +1 -2
- package/build/src/elements/project/ProjectRunner.d.ts.map +1 -1
- package/build/src/elements/project/ProjectRunner.js +4 -5
- package/build/src/elements/project/ProjectRunner.js.map +1 -1
- package/build/src/md/button/internals/base.d.ts +98 -0
- package/build/src/md/button/internals/base.d.ts.map +1 -0
- package/build/src/md/button/internals/base.js +353 -0
- package/build/src/md/button/internals/base.js.map +1 -0
- package/build/src/md/button/internals/button.d.ts +7 -75
- package/build/src/md/button/internals/button.d.ts.map +1 -1
- package/build/src/md/button/internals/button.js +18 -247
- package/build/src/md/button/internals/button.js.map +1 -1
- package/build/src/md/button/internals/{button-styles.d.ts → button.styles.d.ts} +1 -1
- package/build/src/md/button/internals/button.styles.d.ts.map +1 -0
- package/build/src/md/button/internals/button.styles.js +319 -0
- package/build/src/md/button/internals/button.styles.js.map +1 -0
- package/build/src/md/button/internals/group.d.ts +54 -0
- package/build/src/md/button/internals/group.d.ts.map +1 -0
- package/build/src/md/button/internals/group.js +157 -0
- package/build/src/md/button/internals/group.js.map +1 -0
- package/build/src/md/button/internals/{text-button.styles.d.ts → group.styles.d.ts} +1 -1
- package/build/src/md/button/internals/group.styles.d.ts.map +1 -0
- package/build/src/md/button/internals/group.styles.js +102 -0
- package/build/src/md/button/internals/group.styles.js.map +1 -0
- package/build/src/md/button/ui-button-group.d.ts +11 -0
- package/build/src/md/button/ui-button-group.d.ts.map +1 -0
- package/build/src/md/{icon-button/ui-filled-icon-button.js → button/ui-button-group.js} +10 -11
- package/build/src/md/button/ui-button-group.js.map +1 -0
- package/build/src/md/button/ui-button.d.ts +14 -0
- package/build/src/md/button/ui-button.d.ts.map +1 -0
- package/build/src/md/button/{ui-text-button.js → ui-button.js} +10 -11
- package/build/src/md/button/ui-button.js.map +1 -0
- package/build/src/md/dialog/internals/Dialog.d.ts +5 -5
- package/build/src/md/dialog/internals/Dialog.d.ts.map +1 -1
- package/build/src/md/dialog/internals/Dialog.js +14 -9
- package/build/src/md/dialog/internals/Dialog.js.map +1 -1
- package/build/src/md/dropdown-list/internals/UiDropdownList.d.ts +1 -1
- package/build/src/md/dropdown-list/internals/UiDropdownList.js +1 -1
- package/build/src/md/dropdown-list/internals/UiDropdownList.js.map +1 -1
- package/build/src/md/icon-button/internals/IconButton.d.ts +12 -36
- package/build/src/md/icon-button/internals/IconButton.d.ts.map +1 -1
- package/build/src/md/icon-button/internals/IconButton.js +32 -144
- package/build/src/md/icon-button/internals/IconButton.js.map +1 -1
- package/build/src/md/{button/internals/filled-button.styles.d.ts → icon-button/internals/IconButton.styles.d.ts} +1 -1
- package/build/src/md/icon-button/internals/IconButton.styles.d.ts.map +1 -0
- package/build/src/md/icon-button/internals/IconButton.styles.js +286 -0
- package/build/src/md/icon-button/internals/IconButton.styles.js.map +1 -0
- package/build/src/md/icon-button/ui-icon-button.d.ts.map +1 -1
- package/build/src/md/icon-button/ui-icon-button.js +2 -3
- package/build/src/md/icon-button/ui-icon-button.js.map +1 -1
- package/build/src/md/input/Input.d.ts +4 -3
- package/build/src/md/input/Input.d.ts.map +1 -1
- package/build/src/md/input/Input.js +15 -11
- package/build/src/md/input/Input.js.map +1 -1
- package/build/src/md/ripple/internals/ripple.d.ts +2 -0
- package/build/src/md/ripple/internals/ripple.d.ts.map +1 -1
- package/build/src/md/ripple/internals/ripple.js +20 -10
- package/build/src/md/ripple/internals/ripple.js.map +1 -1
- package/build/src/md/ripple/internals/ripple.styles.d.ts.map +1 -1
- package/build/src/md/ripple/internals/ripple.styles.js +8 -20
- package/build/src/md/ripple/internals/ripple.styles.js.map +1 -1
- package/build/src/md/snackbar/internals/Snackbar.d.ts +1 -1
- package/build/src/md/snackbar/internals/Snackbar.d.ts.map +1 -1
- package/build/src/md/snackbar/internals/Snackbar.js +4 -2
- package/build/src/md/snackbar/internals/Snackbar.js.map +1 -1
- package/build/src/md/text-field/internals/common.styles.d.ts.map +1 -1
- package/build/src/md/text-field/internals/common.styles.js +11 -5
- package/build/src/md/text-field/internals/common.styles.js.map +1 -1
- package/build/src/md/text-field/internals/filled.styles.d.ts.map +1 -1
- package/build/src/md/text-field/internals/filled.styles.js +7 -0
- package/build/src/md/text-field/internals/filled.styles.js.map +1 -1
- package/build/src/md/text-field/internals/outlined.styles.d.ts.map +1 -1
- package/build/src/md/text-field/internals/outlined.styles.js +29 -9
- package/build/src/md/text-field/internals/outlined.styles.js.map +1 -1
- package/build/src/styles/m3/dialog.module.d.ts +2 -2
- package/build/src/styles/m3/dialog.module.js +2 -2
- package/build/src/styles/m3/dialog.module.js.map +1 -1
- package/build/src/styles/m3/tokens.d.ts.map +1 -1
- package/build/src/styles/m3/tokens.js +208 -182
- package/build/src/styles/m3/tokens.js.map +1 -1
- package/demo/elements/authorization/oauth-authorize.html +1 -1
- package/demo/elements/authorization/oauth-authorize.ts +1 -1
- package/demo/elements/environment/variables-editor.ts +2 -2
- package/demo/elements/http/url-editing.ts +3 -3
- package/demo/elements/project/request-editor.ts +4 -4
- package/demo/layout/index.ts +5 -5
- package/demo/md/buttons/button.html +121 -0
- package/demo/md/buttons/button.ts +246 -0
- package/demo/md/buttons/{index.html → group.html} +15 -2
- package/demo/md/buttons/group.ts +171 -0
- package/demo/md/checkbox/index.ts +1 -1
- package/demo/md/dialog/dialog.ts +8 -9
- package/demo/md/dropdown-list/index.ts +68 -71
- package/demo/md/icon-button/index.html +97 -7
- package/demo/md/icon-button/index.ts +97 -201
- package/demo/md/index.html +3 -1
- package/demo/md/inputs/input.html +39 -0
- package/demo/md/inputs/input.ts +204 -419
- package/demo/md/inputs/radio.ts +1 -1
- package/demo/md/inputs/switch.ts +1 -1
- package/demo/md/notification/snack.ts +5 -5
- package/demo/md/progress/progress.ts +4 -3
- package/package.json +2 -2
- package/src/core/ModalActivity.ts +6 -5
- package/src/core/ThemeManager.ts +5 -4
- package/src/demo/DemoPage.ts +2 -5
- package/src/elements/authorization/ui/CcAuthorization.ts +2 -2
- package/src/elements/authorization/ui/OAuth2Authorization.ts +11 -5
- package/src/elements/authorization/ui/OidcAuthorization.ts +10 -8
- package/src/elements/code/HttpSnippets.ts +5 -5
- package/src/elements/dialog/internals/ConfirmDelete.ts +5 -5
- package/src/elements/dialog/internals/Rename.ts +6 -5
- package/src/elements/environment/EnvironmentEditor.ts +5 -4
- package/src/elements/http/BodyEditor.ts +25 -20
- package/src/elements/http/BodyMultipartEditor.ts +3 -3
- package/src/elements/http/CertificateAdd.element.ts +6 -10
- package/src/elements/http/HeadersForm.ts +3 -3
- package/src/elements/http/HttpAssertions.element.ts +2 -2
- package/src/elements/http/HttpFlows.element.ts +6 -6
- package/src/elements/http/RequestEditor.ts +10 -11
- package/src/elements/http/UrlParamsForm.ts +4 -4
- package/src/elements/project/HttpProjectRequest.ts +3 -3
- package/src/elements/project/HttpProjectRequestHistory.ts +5 -6
- package/src/elements/project/ProjectRunReport.ts +7 -7
- package/src/elements/project/ProjectRunner.ts +4 -5
- package/src/md/button/internals/base.ts +299 -0
- package/src/md/button/internals/button.styles.ts +319 -0
- package/src/md/button/internals/button.ts +8 -234
- package/src/md/button/internals/group.styles.ts +102 -0
- package/src/md/button/internals/group.ts +121 -0
- package/src/md/button/ui-button-group.ts +15 -0
- package/src/md/button/ui-button.ts +18 -0
- package/src/md/dialog/internals/Dialog.ts +14 -9
- package/src/md/dropdown-list/internals/UiDropdownList.ts +1 -1
- package/src/md/icon-button/internals/IconButton.styles.ts +286 -0
- package/src/md/icon-button/internals/IconButton.ts +15 -139
- package/src/md/icon-button/ui-icon-button.ts +2 -3
- package/src/md/input/Input.ts +16 -11
- package/src/md/ripple/internals/ripple.styles.ts +8 -20
- package/src/md/ripple/internals/ripple.ts +21 -13
- package/src/md/snackbar/internals/Snackbar.ts +4 -2
- package/src/md/text-field/internals/common.styles.ts +11 -5
- package/src/md/text-field/internals/filled.styles.ts +7 -0
- package/src/md/text-field/internals/outlined.styles.ts +29 -9
- package/src/styles/m3/dialog.module.ts +2 -2
- package/src/styles/m3/native.css +270 -0
- package/src/styles/m3/tokens.css +208 -182
- package/src/styles/m3/tokens.ts +208 -182
- package/test/ui/button/UiButton.test.ts +51 -29
- package/test/ui/button/UiIconButton.test.ts +25 -19
- package/test/ui/dialog/UiDialog.test.ts +10 -10
- package/build/src/md/button/internals/button-styles.d.ts.map +0 -1
- package/build/src/md/button/internals/button-styles.js +0 -143
- package/build/src/md/button/internals/button-styles.js.map +0 -1
- package/build/src/md/button/internals/elevated-button.d.ts +0 -4
- package/build/src/md/button/internals/elevated-button.d.ts.map +0 -1
- package/build/src/md/button/internals/elevated-button.js +0 -4
- package/build/src/md/button/internals/elevated-button.js.map +0 -1
- package/build/src/md/button/internals/elevated-button.styles.d.ts +0 -3
- package/build/src/md/button/internals/elevated-button.styles.d.ts.map +0 -1
- package/build/src/md/button/internals/elevated-button.styles.js +0 -38
- package/build/src/md/button/internals/elevated-button.styles.js.map +0 -1
- package/build/src/md/button/internals/filled-button.d.ts +0 -4
- package/build/src/md/button/internals/filled-button.d.ts.map +0 -1
- package/build/src/md/button/internals/filled-button.js +0 -4
- package/build/src/md/button/internals/filled-button.js.map +0 -1
- package/build/src/md/button/internals/filled-button.styles.d.ts.map +0 -1
- package/build/src/md/button/internals/filled-button.styles.js +0 -30
- package/build/src/md/button/internals/filled-button.styles.js.map +0 -1
- package/build/src/md/button/internals/filled-tonal-button.d.ts +0 -4
- package/build/src/md/button/internals/filled-tonal-button.d.ts.map +0 -1
- package/build/src/md/button/internals/filled-tonal-button.js +0 -4
- package/build/src/md/button/internals/filled-tonal-button.js.map +0 -1
- package/build/src/md/button/internals/filled-tonal-button.styles.d.ts +0 -3
- package/build/src/md/button/internals/filled-tonal-button.styles.d.ts.map +0 -1
- package/build/src/md/button/internals/filled-tonal-button.styles.js +0 -30
- package/build/src/md/button/internals/filled-tonal-button.styles.js.map +0 -1
- package/build/src/md/button/internals/outlined-button.d.ts +0 -4
- package/build/src/md/button/internals/outlined-button.d.ts.map +0 -1
- package/build/src/md/button/internals/outlined-button.js +0 -4
- package/build/src/md/button/internals/outlined-button.js.map +0 -1
- package/build/src/md/button/internals/outlined-button.styles.d.ts +0 -3
- package/build/src/md/button/internals/outlined-button.styles.d.ts.map +0 -1
- package/build/src/md/button/internals/outlined-button.styles.js +0 -31
- package/build/src/md/button/internals/outlined-button.styles.js.map +0 -1
- package/build/src/md/button/internals/text-button.d.ts +0 -4
- package/build/src/md/button/internals/text-button.d.ts.map +0 -1
- package/build/src/md/button/internals/text-button.js +0 -4
- package/build/src/md/button/internals/text-button.js.map +0 -1
- package/build/src/md/button/internals/text-button.styles.d.ts.map +0 -1
- package/build/src/md/button/internals/text-button.styles.js +0 -30
- package/build/src/md/button/internals/text-button.styles.js.map +0 -1
- package/build/src/md/button/ui-elevated-button.d.ts +0 -14
- package/build/src/md/button/ui-elevated-button.d.ts.map +0 -1
- package/build/src/md/button/ui-elevated-button.js +0 -31
- package/build/src/md/button/ui-elevated-button.js.map +0 -1
- package/build/src/md/button/ui-filled-button.d.ts +0 -14
- package/build/src/md/button/ui-filled-button.d.ts.map +0 -1
- package/build/src/md/button/ui-filled-button.js +0 -31
- package/build/src/md/button/ui-filled-button.js.map +0 -1
- package/build/src/md/button/ui-filled-tonal-button.d.ts +0 -14
- package/build/src/md/button/ui-filled-tonal-button.d.ts.map +0 -1
- package/build/src/md/button/ui-filled-tonal-button.js +0 -31
- package/build/src/md/button/ui-filled-tonal-button.js.map +0 -1
- package/build/src/md/button/ui-outlined-button.d.ts +0 -14
- package/build/src/md/button/ui-outlined-button.d.ts.map +0 -1
- package/build/src/md/button/ui-outlined-button.js +0 -31
- package/build/src/md/button/ui-outlined-button.js.map +0 -1
- package/build/src/md/button/ui-text-button.d.ts +0 -14
- package/build/src/md/button/ui-text-button.d.ts.map +0 -1
- package/build/src/md/button/ui-text-button.js.map +0 -1
- package/build/src/md/icon-button/ui-filled-icon-button.d.ts +0 -11
- package/build/src/md/icon-button/ui-filled-icon-button.d.ts.map +0 -1
- package/build/src/md/icon-button/ui-filled-icon-button.js.map +0 -1
- package/build/src/md/icon-button/ui-filled-tonal-icon-button.d.ts +0 -11
- package/build/src/md/icon-button/ui-filled-tonal-icon-button.d.ts.map +0 -1
- package/build/src/md/icon-button/ui-filled-tonal-icon-button.js +0 -28
- package/build/src/md/icon-button/ui-filled-tonal-icon-button.js.map +0 -1
- package/build/src/md/icon-button/ui-outlined-icon-button.d.ts +0 -11
- package/build/src/md/icon-button/ui-outlined-icon-button.d.ts.map +0 -1
- package/build/src/md/icon-button/ui-outlined-icon-button.js +0 -28
- package/build/src/md/icon-button/ui-outlined-icon-button.js.map +0 -1
- package/demo/md/buttons/index.ts +0 -279
- package/src/md/button/internals/button-styles.ts +0 -143
- package/src/md/button/internals/elevated-button.styles.ts +0 -38
- package/src/md/button/internals/elevated-button.ts +0 -3
- package/src/md/button/internals/filled-button.styles.ts +0 -30
- package/src/md/button/internals/filled-button.ts +0 -3
- package/src/md/button/internals/filled-tonal-button.styles.ts +0 -30
- package/src/md/button/internals/filled-tonal-button.ts +0 -3
- package/src/md/button/internals/outlined-button.styles.ts +0 -31
- package/src/md/button/internals/outlined-button.ts +0 -3
- package/src/md/button/internals/text-button.styles.ts +0 -30
- package/src/md/button/internals/text-button.ts +0 -3
- package/src/md/button/ui-elevated-button.ts +0 -19
- package/src/md/button/ui-filled-button.ts +0 -19
- package/src/md/button/ui-filled-tonal-button.ts +0 -19
- package/src/md/button/ui-outlined-button.ts +0 -19
- package/src/md/button/ui-text-button.ts +0 -19
- package/src/md/icon-button/ui-filled-icon-button.ts +0 -16
- package/src/md/icon-button/ui-filled-tonal-icon-button.ts +0 -16
- package/src/md/icon-button/ui-outlined-icon-button.ts +0 -16
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { CSSResultOrNative } from 'lit'
|
|
2
2
|
import { customElement } from 'lit/decorators.js'
|
|
3
3
|
import Element from './internals/IconButton.js'
|
|
4
|
-
import
|
|
5
|
-
import styles from './internals/standard.styles.js'
|
|
4
|
+
import styles from './internals/IconButton.styles.js'
|
|
6
5
|
|
|
7
6
|
@customElement('ui-icon-button')
|
|
8
7
|
export class UiIconButtonElement extends Element {
|
|
9
|
-
static override styles: CSSResultOrNative[] = [
|
|
8
|
+
static override styles: CSSResultOrNative[] = [styles]
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
declare global {
|
package/src/md/input/Input.ts
CHANGED
|
@@ -213,7 +213,7 @@ export default abstract class Input extends UiElement {
|
|
|
213
213
|
*
|
|
214
214
|
* Possible values are:
|
|
215
215
|
*
|
|
216
|
-
* - `off` or `none`: No
|
|
216
|
+
* - `off` or `none`: No auto-capitalization is applied (all letters default to lowercase)
|
|
217
217
|
* - `on` or `sentences`: The first letter of each sentence defaults to a capital letter;
|
|
218
218
|
* all other letters default to lowercase
|
|
219
219
|
* - `words`: The first letter of each word defaults to a capital letter; all other letters default to lowercase
|
|
@@ -586,7 +586,7 @@ export default abstract class Input extends UiElement {
|
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
/**
|
|
589
|
-
*
|
|
589
|
+
* Un-focuses the text field.
|
|
590
590
|
*/
|
|
591
591
|
override blur(): void {
|
|
592
592
|
this.input?.blur()
|
|
@@ -638,7 +638,7 @@ export default abstract class Input extends UiElement {
|
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
protected getErrorText(): string {
|
|
641
|
-
return this.
|
|
641
|
+
return this.invalidText || this.nativeErrorText
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
/**
|
|
@@ -750,14 +750,16 @@ export default abstract class Input extends UiElement {
|
|
|
750
750
|
return
|
|
751
751
|
}
|
|
752
752
|
this.focused = true
|
|
753
|
-
this.#_userInteracted = true
|
|
754
753
|
this.removingTabindex = true
|
|
755
754
|
// Note, the input is automatically focused when form is being submitted and
|
|
756
755
|
// it won't pass validation. In this case the form will throw an error
|
|
757
756
|
// as the input is not focusable. In overall, this still works with forms and validation.
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
if (this.checkNativeValidity()) {
|
|
758
|
+
this.dataset.tabindex = this.getAttribute('tabindex') || '0'
|
|
759
|
+
this.removeAttribute('tabindex')
|
|
760
|
+
}
|
|
760
761
|
input.focus()
|
|
762
|
+
this.#_userInteracted = true
|
|
761
763
|
setTimeout(() => {
|
|
762
764
|
this.removingTabindex = false
|
|
763
765
|
}, 1)
|
|
@@ -774,9 +776,12 @@ export default abstract class Input extends UiElement {
|
|
|
774
776
|
this.setAttribute('tabindex', index)
|
|
775
777
|
}
|
|
776
778
|
|
|
779
|
+
private checkNativeValidity(): boolean {
|
|
780
|
+
return this.input?.validity.valid ?? true
|
|
781
|
+
}
|
|
782
|
+
|
|
777
783
|
private checkValidityAndDispatch(): { valid: boolean; canceled: boolean } {
|
|
778
|
-
const
|
|
779
|
-
const valid = input?.checkValidity() ?? true
|
|
784
|
+
const valid = this.input?.checkValidity() ?? true
|
|
780
785
|
let canceled = false
|
|
781
786
|
if (!valid) {
|
|
782
787
|
canceled = !this.dispatchEvent(new Event('invalid', { cancelable: true }))
|
|
@@ -853,10 +858,10 @@ export default abstract class Input extends UiElement {
|
|
|
853
858
|
|
|
854
859
|
protected getAriaDescribedBy(): string {
|
|
855
860
|
const hasSupport = !!this.getSupportingText()
|
|
856
|
-
const hasCounter = this.hasCounter()
|
|
857
861
|
if (hasSupport) {
|
|
858
862
|
return this.supportingTextId
|
|
859
863
|
}
|
|
864
|
+
const hasCounter = this.hasCounter()
|
|
860
865
|
if (hasCounter) {
|
|
861
866
|
return this.counterId
|
|
862
867
|
}
|
|
@@ -941,10 +946,10 @@ export default abstract class Input extends UiElement {
|
|
|
941
946
|
return html` <span class="supporting-text"> ${this.renderSupportingTextValue()} ${this.renderCounter()} </span> `
|
|
942
947
|
}
|
|
943
948
|
|
|
944
|
-
protected renderSupportingTextValue(): TemplateResult {
|
|
949
|
+
protected renderSupportingTextValue(): TemplateResult | typeof nothing {
|
|
945
950
|
const text = this.getSupportingText()
|
|
946
951
|
if (!text) {
|
|
947
|
-
return
|
|
952
|
+
return nothing
|
|
948
953
|
}
|
|
949
954
|
const shouldAlert = this.shouldErrorAnnounce()
|
|
950
955
|
return html`
|
|
@@ -22,8 +22,7 @@ export default css`
|
|
|
22
22
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.surface::before
|
|
26
|
-
.surface::after {
|
|
25
|
+
.surface::before {
|
|
27
26
|
position: absolute;
|
|
28
27
|
opacity: 0;
|
|
29
28
|
pointer-events: none;
|
|
@@ -38,19 +37,10 @@ export default css`
|
|
|
38
37
|
inset: 0;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
.surface::after {
|
|
42
|
-
transition: opacity 375ms linear;
|
|
43
|
-
transform-origin: center center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
.focused::before {
|
|
47
41
|
transition-duration: 75ms;
|
|
48
42
|
}
|
|
49
43
|
|
|
50
|
-
.pressed::after {
|
|
51
|
-
transition-duration: 105ms;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
44
|
.surface {
|
|
55
45
|
border-radius: var(--md-ripple-state-layer-shape, 0);
|
|
56
46
|
}
|
|
@@ -59,14 +49,6 @@ export default css`
|
|
|
59
49
|
background-color: var(--md-ripple-hover-state-layer-color, var(--md-sys-color-primary));
|
|
60
50
|
}
|
|
61
51
|
|
|
62
|
-
.surface::after {
|
|
63
|
-
background: radial-gradient(
|
|
64
|
-
closest-side,
|
|
65
|
-
var(--md-ripple-pressed-state-layer-color, var(--md-sys-color-primary)) max(100% - 70px, 65%),
|
|
66
|
-
transparent 100%
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
52
|
.surface.hovered::before {
|
|
71
53
|
opacity: var(--md-ripple-hover-state-layer-opacity, var(--md-sys-state-hover-state-layer-opacity));
|
|
72
54
|
background-color: var(--md-ripple-hover-state-layer-color, var(--md-sys-color-primary));
|
|
@@ -77,8 +59,14 @@ export default css`
|
|
|
77
59
|
background-color: var(--md-ripple-focus-state-layer-color, var(--md-sys-color-primary));
|
|
78
60
|
}
|
|
79
61
|
|
|
80
|
-
.surface.pressed::
|
|
62
|
+
.surface.pressed::before {
|
|
81
63
|
opacity: var(--md-ripple-pressed-state-layer-opacity, var(--md-sys-state-pressed-state-layer-opacity));
|
|
64
|
+
/* background-color: var(--md-ripple-pressed-state-layer-color, var(--md-sys-color-primary)); */
|
|
65
|
+
background: radial-gradient(
|
|
66
|
+
closest-side,
|
|
67
|
+
var(--md-ripple-pressed-state-layer-color, var(--md-sys-color-primary)) max(100% - 70px, 65%),
|
|
68
|
+
transparent 100%
|
|
69
|
+
);
|
|
82
70
|
}
|
|
83
71
|
|
|
84
72
|
.surface.unbounded {
|
|
@@ -74,6 +74,13 @@ export default class UiRipple extends LitElement {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
protected override willUpdate(changed: PropertyValues): void {
|
|
78
|
+
super.willUpdate(changed)
|
|
79
|
+
if (changed.has('hovered') || changed.has('focused') || changed.has('pressed')) {
|
|
80
|
+
this.manageActivated()
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
protected override update(changedProps: PropertyValues<this>): void {
|
|
78
85
|
if (changedProps.has('disabled') && this.disabled) {
|
|
79
86
|
this.endHover()
|
|
@@ -156,8 +163,6 @@ export default class UiRipple extends LitElement {
|
|
|
156
163
|
const translateStart = `${startPoint.x}px, ${startPoint.y}px`
|
|
157
164
|
const translateEnd = `${endPoint.x}px, ${endPoint.y}px`
|
|
158
165
|
|
|
159
|
-
// const signal = this.pressAnimationSignal.start()
|
|
160
|
-
|
|
161
166
|
const growAnimation = mdRoot.animate(
|
|
162
167
|
{
|
|
163
168
|
top: [0, 0],
|
|
@@ -174,22 +179,11 @@ export default class UiRipple extends LitElement {
|
|
|
174
179
|
}
|
|
175
180
|
)
|
|
176
181
|
|
|
177
|
-
// growAnimation.addEventListener('finish', () => {
|
|
178
|
-
// this.pressAnimationSignal.finish()
|
|
179
|
-
// this.growAnimation = null
|
|
180
|
-
// })
|
|
181
|
-
|
|
182
|
-
// signal.addEventListener('abort', () => {
|
|
183
|
-
// growAnimation.cancel()
|
|
184
|
-
// this.growAnimation = null
|
|
185
|
-
// })
|
|
186
|
-
|
|
187
182
|
this.growAnimation = growAnimation
|
|
188
183
|
}
|
|
189
184
|
|
|
190
185
|
private async endPressAnimation() {
|
|
191
186
|
this.rippleStartEvent = undefined
|
|
192
|
-
// this.state = State.INACTIVE
|
|
193
187
|
const animation = this.growAnimation
|
|
194
188
|
let pressAnimationPlayState = Infinity
|
|
195
189
|
if (typeof animation?.currentTime === 'number') {
|
|
@@ -219,19 +213,23 @@ export default class UiRipple extends LitElement {
|
|
|
219
213
|
beginHover(hoverEvent?: Event): void {
|
|
220
214
|
if ((hoverEvent as PointerEvent)?.pointerType !== 'touch') {
|
|
221
215
|
this.hovered = true
|
|
216
|
+
this.manageActivated()
|
|
222
217
|
}
|
|
223
218
|
}
|
|
224
219
|
|
|
225
220
|
endHover(): void {
|
|
226
221
|
this.hovered = false
|
|
222
|
+
this.manageActivated()
|
|
227
223
|
}
|
|
228
224
|
|
|
229
225
|
beginFocus(): void {
|
|
230
226
|
this.focused = true
|
|
227
|
+
this.manageActivated()
|
|
231
228
|
}
|
|
232
229
|
|
|
233
230
|
endFocus(): void {
|
|
234
231
|
this.focused = false
|
|
232
|
+
this.manageActivated()
|
|
235
233
|
}
|
|
236
234
|
|
|
237
235
|
beginPress(positionEvent?: Event | null): void {
|
|
@@ -242,6 +240,7 @@ export default class UiRipple extends LitElement {
|
|
|
242
240
|
this.delayedEndPressHandle = null
|
|
243
241
|
}
|
|
244
242
|
this.startPressAnimation(positionEvent)
|
|
243
|
+
this.manageActivated()
|
|
245
244
|
}
|
|
246
245
|
|
|
247
246
|
endPress(): void {
|
|
@@ -255,5 +254,14 @@ export default class UiRipple extends LitElement {
|
|
|
255
254
|
}, MINIMUM_PRESS_MS - pressAnimationPlayState) as unknown as number
|
|
256
255
|
}
|
|
257
256
|
this.endPressAnimation()
|
|
257
|
+
this.manageActivated()
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
protected manageActivated(): void {
|
|
261
|
+
if (this.pressed || this.hovered || this.focused) {
|
|
262
|
+
this.classList.add('activated')
|
|
263
|
+
} else {
|
|
264
|
+
this.classList.remove('activated')
|
|
265
|
+
}
|
|
258
266
|
}
|
|
259
267
|
}
|
|
@@ -2,7 +2,7 @@ import { html, LitElement, nothing, PropertyValues, TemplateResult } from 'lit'
|
|
|
2
2
|
import { cancelEvent } from '@api-client/core/lib/events/Utils.js'
|
|
3
3
|
import { property } from 'lit/decorators.js'
|
|
4
4
|
import { classMap } from 'lit/directives/class-map.js'
|
|
5
|
-
import '../../button/ui-
|
|
5
|
+
import '../../button/ui-button.js'
|
|
6
6
|
import '../../icon-button/ui-icon-button.js'
|
|
7
7
|
import '../../icons/ui-icon.js'
|
|
8
8
|
|
|
@@ -206,7 +206,9 @@ export class Snackbar extends LitElement {
|
|
|
206
206
|
return nothing
|
|
207
207
|
}
|
|
208
208
|
return html`
|
|
209
|
-
<ui-
|
|
209
|
+
<ui-button color="text" class="action" @click="${this.actionHandler}" @action="${cancelEvent}"
|
|
210
|
+
>${action}</ui-button
|
|
211
|
+
>
|
|
210
212
|
`
|
|
211
213
|
}
|
|
212
214
|
|
|
@@ -135,11 +135,11 @@ export default css`
|
|
|
135
135
|
.supporting-text {
|
|
136
136
|
padding-top: 4px;
|
|
137
137
|
color: var(--md-sys-color-on-surface-variant);
|
|
138
|
-
font-family: var(--md-sys-typescale-body-
|
|
139
|
-
font-weight: var(--md-sys-typescale-body-
|
|
140
|
-
font-size: var(--md-sys-typescale-body-
|
|
141
|
-
letter-spacing: var(--md-sys-typescale-body-
|
|
142
|
-
line-height: var(--md-sys-typescale-body-
|
|
138
|
+
font-family: var(--md-sys-typescale-body-small-font);
|
|
139
|
+
font-weight: var(--md-sys-typescale-body-small-weight);
|
|
140
|
+
font-size: var(--md-sys-typescale-body-small-size);
|
|
141
|
+
letter-spacing: var(--md-sys-typescale-body-small-tracking);
|
|
142
|
+
line-height: var(--md-sys-typescale-body-small-height);
|
|
143
143
|
display: flex;
|
|
144
144
|
justify-content: space-between;
|
|
145
145
|
padding: 0 16px;
|
|
@@ -153,6 +153,11 @@ export default css`
|
|
|
153
153
|
margin-right: 16px;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
.supporting-text-end {
|
|
157
|
+
margin-left: auto;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
156
161
|
:host([disabled]) {
|
|
157
162
|
pointer-events: none;
|
|
158
163
|
}
|
|
@@ -171,6 +176,7 @@ export default css`
|
|
|
171
176
|
}
|
|
172
177
|
|
|
173
178
|
:host([invalid]) .label,
|
|
179
|
+
:host([invalid]:focus-within) .label,
|
|
174
180
|
:host([invalid]) .supporting-text,
|
|
175
181
|
:host([invalid]) .end ::slotted(*) {
|
|
176
182
|
color: var(--md-sys-color-error);
|
|
@@ -6,13 +6,16 @@ export default css`
|
|
|
6
6
|
--_active-indicator-height: 1px;
|
|
7
7
|
--_focus-active-indicator-color: var(--md-sys-color-primary, #6750a4);
|
|
8
8
|
--_focus-active-indicator-height: 2px;
|
|
9
|
+
border-radius: var(--md-sys-shape-corner-extra-small-top);
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
.surface {
|
|
12
13
|
height: 56px;
|
|
14
|
+
border-radius: inherit;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.container {
|
|
18
|
+
border-radius: inherit;
|
|
16
19
|
background-color: var(--md-sys-color-surface-variant);
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -84,6 +87,10 @@ export default css`
|
|
|
84
87
|
border-bottom-color: var(--md-sys-color-on-error-container);
|
|
85
88
|
}
|
|
86
89
|
|
|
90
|
+
:host([invalid]) .highlight::after {
|
|
91
|
+
border-bottom-color: var(--md-sys-color-error);
|
|
92
|
+
}
|
|
93
|
+
|
|
87
94
|
.labelHidden .body {
|
|
88
95
|
padding-top: 0;
|
|
89
96
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { css } from 'lit'
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
|
+
:host {
|
|
5
|
+
--_border-color: var(--md-sys-color-outline);
|
|
6
|
+
--_outline-color: var(--md-sys-color-primary);
|
|
7
|
+
--_outline-width: 0px;
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
.highlight {
|
|
5
11
|
display: none;
|
|
6
12
|
}
|
|
@@ -10,21 +16,35 @@ export default css`
|
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
.container {
|
|
13
|
-
border: 1px var(--
|
|
14
|
-
outline:
|
|
15
|
-
outline-offset: -
|
|
19
|
+
border: 1px var(--_border-color) solid;
|
|
20
|
+
outline: var(--_outline-width) solid var(--_outline-color);
|
|
21
|
+
outline-offset: calc(-1 * var(--_outline-width));
|
|
16
22
|
transition:
|
|
17
23
|
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
18
|
-
outline-width 150ms cubic-bezier(0.4, 0, 0.2, 1)
|
|
24
|
+
outline-width 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
25
|
+
outline-offset 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host(:hover:not(:focus-within):not([invalid])) {
|
|
29
|
+
--_border-color: var(--md-sys-color-on-surface);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host(:focus-within:not([invalid])) {
|
|
33
|
+
--_border-color: var(--md-sys-color-primary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host(:focus-within) {
|
|
37
|
+
--_outline-width: 3px;
|
|
19
38
|
}
|
|
20
39
|
|
|
21
|
-
:host(
|
|
22
|
-
|
|
40
|
+
:host([invalid]) {
|
|
41
|
+
--_border-color: var(--md-sys-color-error);
|
|
42
|
+
--_outline-color: var(--md-sys-color-error);
|
|
23
43
|
}
|
|
24
44
|
|
|
25
|
-
:host(:
|
|
26
|
-
|
|
27
|
-
|
|
45
|
+
:host([invalid]:hover) {
|
|
46
|
+
--_outline-color: var(--md-sys-color-on-error-container);
|
|
47
|
+
--_border-color: var(--md-sys-color-on-error-container);
|
|
28
48
|
}
|
|
29
49
|
|
|
30
50
|
.label {
|
|
@@ -11,8 +11,8 @@ import { css } from 'lit'
|
|
|
11
11
|
* <h3>Title</h3> <!-- h1, h2, or h3 -->
|
|
12
12
|
* <!-- Any content -->
|
|
13
13
|
* <div class="dialog-buttons">
|
|
14
|
-
* <ui-
|
|
15
|
-
* <ui-
|
|
14
|
+
* <ui-button color="text" value="cancel" submit>Cancel</ui-button>
|
|
15
|
+
* <ui-button color="text" value="submit" submit>Create</ui-button>
|
|
16
16
|
* </div>
|
|
17
17
|
* </form>
|
|
18
18
|
* </dialog>
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/* Styling for the native UI controls to look like MD elements */
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
Material Select
|
|
5
|
+
|
|
6
|
+
Behaves mostly like an outlined input with a label.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@keyframes focus-outline-inward {
|
|
10
|
+
0% {
|
|
11
|
+
outline-width: 0;
|
|
12
|
+
outline-offset: 0;
|
|
13
|
+
}
|
|
14
|
+
50% {
|
|
15
|
+
outline-width: var(--md-focus-ring-active-width, 8px);
|
|
16
|
+
outline-offset: calc(-1 * var(--md-focus-ring-active-width, 8px));
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
outline-width: var(--md-focus-ring-width, 3px);
|
|
20
|
+
outline-offset: calc(-1 * var(--md-focus-ring-width, 3px));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.md-select {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
vertical-align: top;
|
|
27
|
+
|
|
28
|
+
--_outline-color: var(--md-focus-ring-color, var(--md-sys-color-secondary));
|
|
29
|
+
|
|
30
|
+
select,
|
|
31
|
+
::picker(select) {
|
|
32
|
+
appearance: base-select;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
select {
|
|
36
|
+
height: 56px;
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: start;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
gap: 0;
|
|
42
|
+
padding: 0 16px 0 16px;
|
|
43
|
+
|
|
44
|
+
.prefix, .suffix {
|
|
45
|
+
min-width: 16px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.prefix {
|
|
49
|
+
margin-left: 12px;
|
|
50
|
+
margin-right: 16px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.suffix {
|
|
54
|
+
margin-left: 12px;
|
|
55
|
+
margin-right: 12px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.prefix, selectedcontent, .suffix {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: start;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
selectedcontent {
|
|
65
|
+
padding-right: 16px;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
select:has(.suffix) selectedcontent {
|
|
70
|
+
padding-right: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
select:has(.prefix) {
|
|
74
|
+
padding-left: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
option {
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
padding: 8px 16px;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
height: 56px;
|
|
84
|
+
cursor: default;
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
outline: 0 solid var(--_outline-color);
|
|
88
|
+
outline-offset: -3px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
option:hover {
|
|
92
|
+
background-color: transparent;
|
|
93
|
+
&::before {
|
|
94
|
+
opacity: var(--md-sys-state-hover-state-layer-opacity);
|
|
95
|
+
background-color: var(--md-sys-color-primary);
|
|
96
|
+
content: '';
|
|
97
|
+
position: absolute;
|
|
98
|
+
inset: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
option:focus-visible {
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
animation: focus-outline-inward var(--md-focus-ring-duration, 600ms) cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@media(prefers-reduced-motion) {
|
|
108
|
+
option:focus-visible {
|
|
109
|
+
animation: none;
|
|
110
|
+
outline-width: var(--md-focus-ring-width, 3px);
|
|
111
|
+
outline-offset: calc(-1 * var(--md-focus-ring-width, 3px));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
::picker(select) {
|
|
116
|
+
border: none;
|
|
117
|
+
padding: 10px 0;
|
|
118
|
+
background-color: var(--md-sys-color-surface);
|
|
119
|
+
transform: scaleY(0);
|
|
120
|
+
transition: all 250ms cubic-bezier(0.2, 0, 0, 1) 0s allow-discrete;
|
|
121
|
+
transform-origin: top center;
|
|
122
|
+
width: fit-content;
|
|
123
|
+
box-shadow: var(--md-sys-elevation-1);
|
|
124
|
+
border-radius: var(--md-sys-shape-corner-medium);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
::picker(select):popover-open {
|
|
128
|
+
transform: scaleY(1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@starting-style {
|
|
132
|
+
::picker(select):popover-open {
|
|
133
|
+
transform: scaleY(0);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
label {
|
|
138
|
+
font-family: var(--md-sys-typescale-label-medium-font);
|
|
139
|
+
font-size: var(--md-sys-typescale-label-medium-size);
|
|
140
|
+
letter-spacing: var(--md-sys-typescale-label-medium-tracking);
|
|
141
|
+
line-height: var(--md-sys-typescale-label-medium-height);
|
|
142
|
+
font-weight: var(--md-ref-typeface-weight-regular);
|
|
143
|
+
position: absolute;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
label:has( + select:focus-within ) {
|
|
147
|
+
color: var(--md-sys-color-primary);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
select::picker-icon {
|
|
151
|
+
font-family: var(--md-icon-font, Material Symbols Outlined);
|
|
152
|
+
font-weight: 400;
|
|
153
|
+
font-variation-settings:
|
|
154
|
+
'FILL' 0,
|
|
155
|
+
'wght' 700,
|
|
156
|
+
'GRAD' 200,
|
|
157
|
+
'opsz' 24;
|
|
158
|
+
content: "\e5c5";
|
|
159
|
+
letter-spacing: 0;
|
|
160
|
+
color: currentColor;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
option::checkmark {
|
|
164
|
+
font-family: var(--md-icon-font, Material Symbols Outlined);
|
|
165
|
+
font-weight: 400;
|
|
166
|
+
font-variation-settings:
|
|
167
|
+
'FILL' 0,
|
|
168
|
+
'wght' 700,
|
|
169
|
+
'GRAD' 200,
|
|
170
|
+
'opsz' 24;
|
|
171
|
+
content: "\e5ca";
|
|
172
|
+
letter-spacing: 0;
|
|
173
|
+
color: var(--md-sys-color-primary);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.outlined {
|
|
177
|
+
position: relative;
|
|
178
|
+
|
|
179
|
+
select {
|
|
180
|
+
border: 1px var(--md-sys-color-outline) solid;
|
|
181
|
+
outline: 0 solid var(--md-sys-color-primary);
|
|
182
|
+
outline-offset: 0;
|
|
183
|
+
transition: border-color var(--md-sys-motion-duration-short3) var(--md-sys-motion-easing-standard-accelerate);
|
|
184
|
+
border-radius: var(--md-sys-shape-corner-extra-small);
|
|
185
|
+
background-color: transparent;
|
|
186
|
+
|
|
187
|
+
&:hover:not(:focus-visible) {
|
|
188
|
+
border-color: var(--md-sys-color-on-surface);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:focus-within {
|
|
192
|
+
outline-width: var(--md-focus-ring-width, 3px);
|
|
193
|
+
outline-offset: calc(-1 * var(--md-focus-ring-width, 3px));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&:focus-visible {
|
|
197
|
+
animation: focus-outline-inward var(--md-focus-ring-duration, 600ms) cubic-bezier(0.2, 0, 0, 1) forwards;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@media(prefers-reduced-motion) {
|
|
202
|
+
select:focus-visible {
|
|
203
|
+
animation: none;
|
|
204
|
+
outline-width: var(--md-focus-ring-width, 3px);
|
|
205
|
+
outline-offset: calc(-1 * var(--md-focus-ring-width, 3px));
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
label {
|
|
210
|
+
background-color: var(--md-sys-color-surface);
|
|
211
|
+
padding: 0 4px;
|
|
212
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
213
|
+
left: 12px;
|
|
214
|
+
top: -7px;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
&.filled {
|
|
219
|
+
position: relative;
|
|
220
|
+
|
|
221
|
+
select {
|
|
222
|
+
background-color: var(--md-sys-color-surface-variant);
|
|
223
|
+
border: none;
|
|
224
|
+
/* border-bottom: 1px solid var(--md-sys-color-on-surface-variant); */
|
|
225
|
+
border-radius: var(--md-sys-shape-corner-extra-small-top);
|
|
226
|
+
outline: none;
|
|
227
|
+
|
|
228
|
+
selectedcontent {
|
|
229
|
+
padding-top: 1em;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
select::before {
|
|
234
|
+
content: '';
|
|
235
|
+
border-bottom: 1px solid var(--md-sys-color-on-surface-variant);
|
|
236
|
+
inset: auto 0 0;
|
|
237
|
+
position: absolute;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
select::after {
|
|
241
|
+
content: '';
|
|
242
|
+
border-bottom-color: var(--md-sys-color-primary);
|
|
243
|
+
border-bottom-width: 2px;
|
|
244
|
+
border-bottom-style: solid;
|
|
245
|
+
opacity: 0;
|
|
246
|
+
transform: scaleX(0);
|
|
247
|
+
transform-origin: center center;
|
|
248
|
+
|
|
249
|
+
transition:
|
|
250
|
+
opacity 150ms cubic-bezier(0.4, 0, 0.2, 1) 0s,
|
|
251
|
+
transform 150ms cubic-bezier(0.4, 0, 0.2, 1) 150ms;
|
|
252
|
+
|
|
253
|
+
position: absolute;
|
|
254
|
+
inset: auto 0 0;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
select:focus-within::after {
|
|
258
|
+
opacity: 1;
|
|
259
|
+
transform: scaleX(1);
|
|
260
|
+
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
label {
|
|
264
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
265
|
+
transform: translateY(-1.35rem);
|
|
266
|
+
top: 50%;
|
|
267
|
+
left: 16px;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|