@aurodesignsystem/auro-formkit 4.0.0-rc-676.1 → 4.0.0-rc-1002.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/CHANGELOG.md +180 -1
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +1 -1
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1184 -105
- package/components/bibtemplate/dist/registered.js +1184 -105
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.md +52 -17
- package/components/checkbox/demo/api.min.js +66 -33
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +66 -33
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/auro-checkbox-group.d.ts +2 -2
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -1
- package/components/checkbox/dist/index.js +65 -32
- package/components/checkbox/dist/registered.js +65 -32
- package/components/combobox/README.md +2 -0
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +124 -7
- package/components/combobox/demo/api.min.js +4542 -1330
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.md +108 -4
- package/components/combobox/demo/index.min.js +4542 -1330
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/demo/readme.md +2 -0
- package/components/combobox/dist/auro-combobox.d.ts +81 -18
- package/components/combobox/dist/index.js +4588 -1520
- package/components/combobox/dist/registered.js +4588 -1520
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +167 -21
- package/components/counter/demo/api.min.js +3621 -866
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +191 -34
- package/components/counter/demo/index.min.js +3621 -866
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +162 -11
- package/components/counter/dist/auro-counter.d.ts +16 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3619 -864
- package/components/counter/dist/registered.js +3619 -864
- package/components/datepicker/README.md +2 -1
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.md +80 -30
- package/components/datepicker/demo/api.min.js +14795 -10365
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.md +96 -4
- package/components/datepicker/demo/index.min.js +14795 -10365
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/demo/readme.md +2 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +163 -4
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +14916 -10486
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +14916 -10486
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +94 -262
- package/components/dropdown/demo/api.min.js +738 -259
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +93 -266
- package/components/dropdown/demo/index.min.js +738 -259
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +92 -73
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +710 -231
- package/components/dropdown/dist/registered.js +710 -231
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/api.md +1 -1
- package/components/form/demo/api.min.js +3 -3
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/index.min.js +3 -3
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/form/dist/auro-form.d.ts +1 -1
- package/components/form/dist/index.js +2 -2
- package/components/form/dist/registered.js +2 -2
- package/components/helptext/dist/auro-helptext.d.ts +0 -2
- package/components/helptext/dist/index.js +2 -4
- package/components/helptext/dist/registered.js +2 -4
- package/components/input/README.md +6 -2
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +258 -144
- package/components/input/demo/api.min.js +1550 -497
- package/components/input/demo/index.html +17 -11
- package/components/input/demo/index.md +95 -27
- package/components/input/demo/index.min.js +1549 -496
- package/components/input/demo/readme.html +16 -9
- package/components/input/demo/readme.md +6 -2
- package/components/input/dist/auro-input.d.ts +139 -3
- package/components/input/dist/base-input.d.ts +80 -26
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +1504 -451
- package/components/input/dist/registered.js +1504 -451
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/layoutElement/dist/auroElement.d.ts +34 -0
- package/components/layoutElement/dist/index.d.ts +2 -0
- package/components/layoutElement/dist/index.js +98 -0
- package/components/layoutElement/dist/registered.js +98 -0
- package/components/menu/demo/api.html +17 -10
- package/components/menu/demo/api.md +65 -8
- package/components/menu/demo/api.min.js +304 -65
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +304 -65
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +53 -7
- package/components/menu/dist/auro-menuoption.d.ts +21 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +289 -50
- package/components/menu/dist/registered.js +289 -50
- package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +41 -9
- package/components/radio/demo/api.min.js +93 -95
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +93 -95
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +11 -12
- package/components/radio/dist/index.js +92 -94
- package/components/radio/dist/registered.js +92 -94
- package/components/select/README.md +1 -0
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +156 -114
- package/components/select/demo/api.min.js +3126 -657
- package/components/select/demo/index.html +17 -10
- package/components/select/demo/index.md +398 -62
- package/components/select/demo/index.min.js +3129 -648
- package/components/select/demo/readme.html +16 -9
- package/components/select/demo/readme.md +1 -0
- package/components/select/dist/auro-select.d.ts +173 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +3128 -791
- package/components/select/dist/registered.js +3128 -791
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +33 -32
- package/packages/build-tools/src/postinstall.mjs +0 -12
- /package/components/{dropdown/dist/styles/bibColors-css.d.ts → combobox/dist/styles/emphasized/style-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/bibStyles-css.d.ts → combobox/dist/styles/snowflake/style-css.d.ts} +0 -0
- /package/components/{input/dist/styles/borders-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{input/dist/styles/input-css.d.ts → datepicker/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{input/dist/styles/label-css.d.ts → datepicker/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/{input/dist/styles/notificationIcons-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → datepicker/dist/styles/snowflake/style-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/tokens-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
|
@@ -3,9 +3,9 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
3
3
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
4
|
import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
|
|
5
5
|
|
|
6
|
-
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;margin-bottom:var(--ds-size-100, 0.5rem)}fieldset{all:unset}@media screen and (min-width: 576px){.displayFlex slot{display:flex}}.cbxContainer{position:relative;display:flex;flex-direction:row;padding-left:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-100, 0.5rem)}.inputContainer{display:block;width:24px;height:24px;margin-right:var(--ds-size-50, 0.25rem)}.cbx--input:disabled+label:hover{cursor:auto}.label{flex:1;display:flex;pointer-events:none}.label:hover{cursor:pointer}.inputContainer{position:relative}.inputContainer:after{-webkit-tap-highlight-color:transparent;display:block;content:"";align-items:center;justify-content:center;width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);outline-style:solid;outline-width:1px;z-index:0}.svg--cbx{position:absolute;left:-1px;top:-1px;z-index:1;pointer-events:none}`;
|
|
6
|
+
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{display:block;--cbxLocation: var(--ds-size-50, 0.25rem)}fieldset{all:unset}@media screen and (min-width: 576px){.displayFlex slot{display:flex}}.cbxContainer{position:relative;display:flex;flex-direction:row;gap:var(--ds-size-100, 0.5rem);padding-left:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-100, 0.5rem)}.cbxContainer:hover{cursor:pointer}.label{display:block;padding-top:var(--ds-size-50, 0.25rem)}.label:hover{cursor:pointer}:host([disabled]) .cbxContainer{pointer-events:none;cursor:default}.inputContainer{position:relative}.inputContainer:after{-webkit-tap-highlight-color:transparent;display:block;content:"";align-items:center;justify-content:center;margin-top:var(--cbxLocation);width:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));height:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem));border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);outline-style:solid;outline-width:1px;z-index:0}.svg--cbx{position:absolute;padding-top:3px;padding-bottom:3px;z-index:1;pointer-events:none}`;
|
|
7
7
|
|
|
8
|
-
var colorCss$2 = css`:host(:not([checked])) .cbxContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .label{color:var(--ds-auro-checkbox-label-color)}:host .inputContainer:after{background-color:var(--ds-auro-checkbox-container-color);border-color:var(--ds-auro-checkbox-border-color);outline-color:var(--ds-auro-checkbox-outline-color)}:host .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .svg--cbx{color:var(--ds-auro-checkbox-checkmark-color)}:host(:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a)}:host([disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #ffffff)}:host([disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-hover, #b1161c);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([onDark]){--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-checkbox-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-checkbox-container-color: transparent}:host([onDark]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:not([checked])) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][checked]){--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: transparent;--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-container-color: transparent}:host([onDark][disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}:host([onDark][error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}`;
|
|
8
|
+
var colorCss$2 = css`:host(:not([checked])) .cbxContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .label{color:var(--ds-auro-checkbox-label-color)}:host .inputContainer:after{background-color:var(--ds-auro-checkbox-container-color);border-color:var(--ds-auro-checkbox-border-color);outline-color:var(--ds-auro-checkbox-outline-color)}:host .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-hover, #f2f2f2)}:host .svg--cbx{color:var(--ds-auro-checkbox-checkmark-color)}:host(:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-istrue, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue, #01426a)}:host([checked]) .cbxContainer:hover,:host([checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a)}:host([checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([checked]:focus-within) .cbxContainer:hover,:host([checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-hover, #00274a)}:host([disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([disabled]) .cbxContainer:hover,:host([disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-disabled, #dddddd);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #ffffff)}:host([disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([disabled][checked]) .cbxContainer:hover,:host([disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-disabled, #dddddd)}:host([error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error, #e31f26);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error, #e31f26)}:host([error][checked]) .cbxContainer:hover,:host([error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-hover, #b1161c);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([error][checked]:focus-within) .cbxContainer:hover,:host([error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-hover, #b1161c)}:host([onDark]){--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-checkbox-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-checkbox-container-color: transparent}:host([onDark]) .cbxContainer:hover,:host([onDark]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:not([checked])) .cbxContainer:hover,:host([onDark]:not([checked])) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse-inverse-hover, rgba(255, 255, 255, 0.2))}:host([onDark]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][checked]){--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator-inverse, #00274a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse, #ffffff)}:host([onDark][checked]) .cbxContainer:hover,:host([onDark][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: transparent;--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][checked]:focus-within) .cbxContainer:hover,:host([onDark][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-istrue-inverse-hover, rgba(255, 255, 255, 0.7))}:host([onDark][disabled]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][disabled]) .cbxContainer:hover,:host([onDark][disabled]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894);--ds-auro-checkbox-container-color: transparent}:host([onDark][disabled][checked]){--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][disabled][checked]) .cbxContainer:hover,:host([onDark][disabled][checked]) .inputContainer:hover{--ds-auro-checkbox-container-color: var(--ds-advanced-color-state-background-inverse-disabled, #7e8894)}:host([onDark][error]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error]:not([checked]):focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-checkbox-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][error][checked]){--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse, #f9a4a8)}:host([onDark][error][checked]) .cbxContainer:hover,:host([onDark][error][checked]) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}:host([onDark][error][checked]:focus-within){--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([onDark][error][checked]:focus-within) .cbxContainer:hover,:host([onDark][error][checked]:focus-within) .inputContainer:hover{--ds-auro-checkbox-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-error-inverse-hover, #f15f65)}`;
|
|
9
9
|
|
|
10
10
|
var tokensCss$1 = css`:host{--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #ffffff);--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #ffffff);--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-checkbox-outline-color: transparent;--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
11
11
|
|
|
@@ -94,6 +94,9 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
94
94
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
95
95
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
96
96
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
97
|
+
*
|
|
98
|
+
* @event {CustomEvent<any>} change - (Deprecated) Notifies when checked value is changed.
|
|
99
|
+
* @event {InputEvent} input - Notifies when when checked value is changed by user's interface.
|
|
97
100
|
*/
|
|
98
101
|
|
|
99
102
|
// build the component class
|
|
@@ -132,6 +135,7 @@ class AuroCheckbox extends LitElement {
|
|
|
132
135
|
// function to define props used within the scope of this component
|
|
133
136
|
static get properties() {
|
|
134
137
|
return {
|
|
138
|
+
...super.properties,
|
|
135
139
|
|
|
136
140
|
/**
|
|
137
141
|
* If set to true, the checkbox will be filled with a checkmark.
|
|
@@ -238,6 +242,7 @@ class AuroCheckbox extends LitElement {
|
|
|
238
242
|
handleInput(event) {
|
|
239
243
|
this.checked = event.target.checked;
|
|
240
244
|
|
|
245
|
+
// Old event we need to deprecate
|
|
241
246
|
this.dispatchEvent(new CustomEvent('auroCheckbox-input', {
|
|
242
247
|
bubbles: true,
|
|
243
248
|
cancelable: false,
|
|
@@ -289,9 +294,16 @@ class AuroCheckbox extends LitElement {
|
|
|
289
294
|
|
|
290
295
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
291
296
|
|
|
292
|
-
this.addEventListener('click', () => {
|
|
293
|
-
|
|
294
|
-
|
|
297
|
+
this.addEventListener('click', (evt) => {
|
|
298
|
+
// Only prevent default for real user events, not tests or programmatic calls
|
|
299
|
+
if (evt.isTrusted) {
|
|
300
|
+
evt.preventDefault();
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (!this.disabled) {
|
|
304
|
+
this.shadowRoot.querySelector('input').click();
|
|
305
|
+
this.handleFocusin();
|
|
306
|
+
}
|
|
295
307
|
});
|
|
296
308
|
|
|
297
309
|
this.addEventListener('focusin', () => {
|
|
@@ -307,7 +319,10 @@ class AuroCheckbox extends LitElement {
|
|
|
307
319
|
});
|
|
308
320
|
}
|
|
309
321
|
|
|
310
|
-
|
|
322
|
+
/**
|
|
323
|
+
* @private
|
|
324
|
+
* @returns {HTMLElement}
|
|
325
|
+
*/
|
|
311
326
|
render() {
|
|
312
327
|
const labelClasses = {
|
|
313
328
|
'label': true,
|
|
@@ -316,15 +331,15 @@ class AuroCheckbox extends LitElement {
|
|
|
316
331
|
};
|
|
317
332
|
|
|
318
333
|
return html`
|
|
319
|
-
<div class="cbxContainer" part="checkbox">
|
|
334
|
+
<div class="cbxContainer body-default" part="checkbox">
|
|
320
335
|
<div class="inputContainer">
|
|
321
336
|
<input
|
|
322
337
|
class="util_displayHiddenVisually cbx--input"
|
|
323
338
|
part="checkbox-input"
|
|
324
|
-
@change
|
|
339
|
+
@change="${this.handleChange}"
|
|
325
340
|
@input="${this.handleInput}"
|
|
326
341
|
?disabled="${this.disabled}"
|
|
327
|
-
|
|
342
|
+
?checked="${this.checked}"
|
|
328
343
|
id="${this.inputId}"
|
|
329
344
|
name="${ifDefined(this.name)}"
|
|
330
345
|
type="checkbox"
|
|
@@ -817,19 +832,19 @@ class AuroFormValidation {
|
|
|
817
832
|
{
|
|
818
833
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
819
834
|
validity: 'tooShort',
|
|
820
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
835
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
821
836
|
},
|
|
822
837
|
{
|
|
823
838
|
check: (e) => e.value?.length > e.maxLength,
|
|
824
839
|
validity: 'tooLong',
|
|
825
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
840
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
826
841
|
}
|
|
827
842
|
],
|
|
828
843
|
pattern: [
|
|
829
844
|
{
|
|
830
845
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
831
846
|
validity: 'patternMismatch',
|
|
832
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
847
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
833
848
|
}
|
|
834
849
|
]
|
|
835
850
|
},
|
|
@@ -976,13 +991,24 @@ class AuroFormValidation {
|
|
|
976
991
|
this.getInputElements(elem);
|
|
977
992
|
this.getAuroInputs(elem);
|
|
978
993
|
|
|
979
|
-
//
|
|
994
|
+
// Check if validation should run
|
|
980
995
|
let validationShouldRun =
|
|
996
|
+
|
|
997
|
+
// If the validation was forced
|
|
981
998
|
force ||
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
999
|
+
|
|
1000
|
+
// If the validation should run on input
|
|
1001
|
+
elem.validateOnInput ||
|
|
1002
|
+
|
|
1003
|
+
// State-based checks
|
|
1004
|
+
(
|
|
1005
|
+
// Element is not currently focused
|
|
1006
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
1007
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
1008
|
+
|
|
1009
|
+
// And element has been touched or is untouched but has a value
|
|
1010
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
1011
|
+
);
|
|
986
1012
|
|
|
987
1013
|
if (elem.hasAttribute('error')) {
|
|
988
1014
|
elem.validity = 'customError';
|
|
@@ -1024,10 +1050,10 @@ class AuroFormValidation {
|
|
|
1024
1050
|
if (!hasValue && elem.required && elem.touched) {
|
|
1025
1051
|
elem.validity = 'valueMissing';
|
|
1026
1052
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
1027
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1053
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
1028
1054
|
this.validateType(elem);
|
|
1029
1055
|
this.validateElementAttributes(elem);
|
|
1030
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
1056
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
1031
1057
|
this.validateElementAttributes(elem);
|
|
1032
1058
|
}
|
|
1033
1059
|
}
|
|
@@ -1036,7 +1062,9 @@ class AuroFormValidation {
|
|
|
1036
1062
|
elem.validity = this.auroInputElements[0].validity;
|
|
1037
1063
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1038
1064
|
|
|
1039
|
-
|
|
1065
|
+
// multiple input in one components (datepicker)
|
|
1066
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1067
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.runtimeUtils.elementMatch(elem, 'auro-combobox')) {
|
|
1040
1068
|
elem.validity = this.auroInputElements[1].validity;
|
|
1041
1069
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1042
1070
|
}
|
|
@@ -1156,13 +1184,13 @@ class AuroDependencyVersioning {
|
|
|
1156
1184
|
}
|
|
1157
1185
|
}
|
|
1158
1186
|
|
|
1159
|
-
var styleCss$1 = css`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}`;
|
|
1187
|
+
var styleCss$1 = css`:host{display:block;padding-bottom:var(--ds-size-150, 0.75rem)}.displayFlex legend+slot{display:flex;white-space:nowrap}fieldset{all:unset}legend{margin-bottom:var(--ds-size-150, 0.75rem)}[auro-helptext]{margin-top:var(--ds-size-150, 0.75rem)}`;
|
|
1160
1188
|
|
|
1161
1189
|
var colorCss$1 = css`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([onDark]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
1162
1190
|
|
|
1163
1191
|
var colorCss = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1164
1192
|
|
|
1165
|
-
var styleCss = css`.
|
|
1193
|
+
var styleCss = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1166
1194
|
|
|
1167
1195
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1168
1196
|
|
|
@@ -1242,8 +1270,6 @@ class AuroLibraryRuntimeUtils {
|
|
|
1242
1270
|
|
|
1243
1271
|
/**
|
|
1244
1272
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
1245
|
-
*
|
|
1246
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
1247
1273
|
*/
|
|
1248
1274
|
class AuroHelpText extends LitElement {
|
|
1249
1275
|
|
|
@@ -1359,7 +1385,7 @@ class AuroHelpText extends LitElement {
|
|
|
1359
1385
|
// function that renders the HTML and CSS into the scope of the component
|
|
1360
1386
|
render() {
|
|
1361
1387
|
return html`
|
|
1362
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
1388
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
1363
1389
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
1364
1390
|
</div>
|
|
1365
1391
|
`;
|
|
@@ -1376,7 +1402,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1376
1402
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
1377
1403
|
*
|
|
1378
1404
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1379
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
1405
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
1380
1406
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
1381
1407
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1382
1408
|
*/
|
|
@@ -1445,6 +1471,7 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1445
1471
|
|
|
1446
1472
|
static get properties() {
|
|
1447
1473
|
return {
|
|
1474
|
+
...super.properties,
|
|
1448
1475
|
|
|
1449
1476
|
/**
|
|
1450
1477
|
* If set, disables the checkbox group.
|
|
@@ -1677,6 +1704,12 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1677
1704
|
* @returns {void}
|
|
1678
1705
|
*/
|
|
1679
1706
|
updated(changedProperties) {
|
|
1707
|
+
if (changedProperties.has('layout')) {
|
|
1708
|
+
this.checkboxes.forEach((el) => {
|
|
1709
|
+
el.layout = this.layout;
|
|
1710
|
+
});
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1680
1713
|
if (changedProperties.has('disabled')) {
|
|
1681
1714
|
this.checkboxes.forEach((el) => {
|
|
1682
1715
|
if (this.disabled) {
|
|
@@ -1737,20 +1770,20 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1737
1770
|
|
|
1738
1771
|
return html$1`
|
|
1739
1772
|
<fieldset class="${classMap(groupClasses)}">
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
: html$1`<
|
|
1743
|
-
|
|
1773
|
+
<legend>
|
|
1774
|
+
<slot name="legend"></slot>
|
|
1775
|
+
${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
|
|
1776
|
+
</legend>
|
|
1744
1777
|
<slot @slotchange=${this.handleItems}></slot>
|
|
1745
1778
|
</fieldset>
|
|
1746
1779
|
|
|
1747
1780
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
1748
1781
|
? html$1`
|
|
1749
|
-
<${this.helpTextTag}
|
|
1782
|
+
<${this.helpTextTag} part="helpText" ?onDark="${this.onDark}">
|
|
1750
1783
|
<slot name="helpText"></slot>
|
|
1751
1784
|
</${this.helpTextTag}>`
|
|
1752
1785
|
: html$1`
|
|
1753
|
-
<${this.helpTextTag} error
|
|
1786
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}" role="alert" aria-live="assertive" part="helpText">
|
|
1754
1787
|
${this.errorMessage}
|
|
1755
1788
|
</${this.helpTextTag}>`
|
|
1756
1789
|
}
|
|
@@ -84,6 +84,8 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
84
84
|
|
|
85
85
|
```html
|
|
86
86
|
<auro-combobox>
|
|
87
|
+
<span slot="ariaLabel.bib.close">Close combobox</span>
|
|
88
|
+
<span slot="ariaLabel.input.clear">Clear All</span>
|
|
87
89
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
88
90
|
<span slot="label">Name</span>
|
|
89
91
|
<auro-menu>
|
|
@@ -16,18 +16,24 @@
|
|
|
16
16
|
<head>
|
|
17
17
|
<meta charset="UTF-8" />
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
-
<title>Auro Web Component
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css"
|
|
26
|
-
|
|
19
|
+
<title>Auro Web Component Demo | auro-combobox</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-combobox's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
27
34
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
28
35
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
29
|
-
|
|
30
|
-
</head>
|
|
36
|
+
</head>
|
|
31
37
|
<body class="auro-markdown">
|
|
32
38
|
<main></main>
|
|
33
39
|
|
|
@@ -12,15 +12,19 @@
|
|
|
12
12
|
| [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
13
13
|
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
|
|
14
14
|
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [format](#format) | `format` | `string` | | Specifies the input mask format. |
|
|
15
16
|
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
16
17
|
| [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
|
|
17
18
|
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
19
|
+
| [layout](#layout) | | `string` | | |
|
|
20
|
+
| [matchWidth](#matchWidth) | `matchWidth` | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
|
|
18
21
|
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
19
22
|
| [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
20
23
|
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
21
24
|
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
22
25
|
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
23
26
|
| [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement` | | Specifies the current selected option. |
|
|
27
|
+
| [placeholder](#placeholder) | `placeholder` | `string` | | Define custom placeholder text, only supported by date input formats. |
|
|
24
28
|
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
25
29
|
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
26
30
|
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
@@ -35,8 +39,12 @@
|
|
|
35
39
|
|
|
36
40
|
| Method | Type | Description |
|
|
37
41
|
|------------|----------------------------------------|--------------------------------------------------|
|
|
42
|
+
| [clear](#clear) | `(): void` | Clears the current value of the combobox. |
|
|
38
43
|
| [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
|
|
44
|
+
| [hideBib](#hideBib) | `(): void` | Hides the dropdown bib if its open. |
|
|
45
|
+
| [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
|
|
39
46
|
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
47
|
+
| [showBib](#showBib) | `(): void` | Shows the dropdown bib if there are options to show. |
|
|
40
48
|
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
41
49
|
|
|
42
50
|
## Events
|
|
@@ -51,9 +59,13 @@
|
|
|
51
59
|
| Name | Description |
|
|
52
60
|
|---------------------------|--------------------------------------------------|
|
|
53
61
|
| | Default slot for the menu content. |
|
|
62
|
+
| `ariaLabel.bib.close` | Sets aria-label on close button in fullscreen bib |
|
|
63
|
+
| `ariaLabel.input.clear` | Sets aria-label on clear button |
|
|
54
64
|
| `bib.fullscreen.headline` | Defines the headline to display above menu-options |
|
|
65
|
+
| [displayValue](#displayValue) | Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts. |
|
|
55
66
|
| [helpText](#helpText) | Defines the content of the helpText. |
|
|
56
|
-
| [label](#label) | Defines the content of the label. |
|
|
67
|
+
| [label](#label) | Defines the content of the label. |
|
|
68
|
+
| [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
|
|
57
69
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
70
|
|
|
59
71
|
## API Examples
|
|
@@ -64,6 +76,8 @@
|
|
|
64
76
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
65
77
|
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
66
78
|
<auro-combobox>
|
|
79
|
+
<span slot="ariaLabel.bib.close">Close combobox</span>
|
|
80
|
+
<span slot="ariaLabel.input.clear">Clear All</span>
|
|
67
81
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
68
82
|
<span slot="label">Name</span>
|
|
69
83
|
<auro-menu>
|
|
@@ -101,6 +115,8 @@
|
|
|
101
115
|
|
|
102
116
|
```html
|
|
103
117
|
<auro-combobox>
|
|
118
|
+
<span slot="ariaLabel.bib.close">Close combobox</span>
|
|
119
|
+
<span slot="ariaLabel.input.clear">Clear All</span>
|
|
104
120
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
105
121
|
<span slot="label">Name</span>
|
|
106
122
|
<auro-menu>
|
|
@@ -573,6 +589,50 @@ Populates the `required` attribute on the input. Used for client-side validation
|
|
|
573
589
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
574
590
|
</auro-accordion>
|
|
575
591
|
|
|
592
|
+
### Custom optional label <a name="optionalLabel"></a>
|
|
593
|
+
The `<auro-combobox>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
594
|
+
|
|
595
|
+
<div class="exampleWrapper">
|
|
596
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
|
|
597
|
+
<!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
598
|
+
<auro-combobox>
|
|
599
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
600
|
+
<span slot="label">Name</span>
|
|
601
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
602
|
+
<auro-menu>
|
|
603
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
604
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
605
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
606
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
607
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
608
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
609
|
+
</auro-menu>
|
|
610
|
+
</auro-combobox>
|
|
611
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
612
|
+
</div>
|
|
613
|
+
<auro-accordion alignRight>
|
|
614
|
+
<span slot="trigger">See code</span>
|
|
615
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
|
|
616
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
617
|
+
|
|
618
|
+
```html
|
|
619
|
+
<auro-combobox>
|
|
620
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
621
|
+
<span slot="label">Name</span>
|
|
622
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
623
|
+
<auro-menu>
|
|
624
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
625
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
626
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
627
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
628
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
629
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
630
|
+
</auro-menu>
|
|
631
|
+
</auro-combobox>
|
|
632
|
+
```
|
|
633
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
634
|
+
</auro-accordion>
|
|
635
|
+
|
|
576
636
|
#### value
|
|
577
637
|
|
|
578
638
|
Use the `value` attribute to programmatically set the value of the combobox.
|
|
@@ -1003,7 +1063,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1003
1063
|
<div style="width: 350px">
|
|
1004
1064
|
<auro-combobox offset="20" noFlip placement="bottom-end">
|
|
1005
1065
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1006
|
-
<span slot="label">
|
|
1066
|
+
<span slot="label">Label</span>
|
|
1067
|
+
<span slot="helpText">bottom-end bib with 20px offset and noFlip</span>
|
|
1007
1068
|
<auro-menu>
|
|
1008
1069
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1009
1070
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1015,7 +1076,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1015
1076
|
</auro-combobox>
|
|
1016
1077
|
<auro-combobox offset="20" placement="bottom-end">
|
|
1017
1078
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1018
|
-
<span slot="label">
|
|
1079
|
+
<span slot="label">Label</span>
|
|
1080
|
+
<span slot="helpText">bottom-end bib with 20px offset and flip</span>
|
|
1019
1081
|
<auro-menu>
|
|
1020
1082
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1021
1083
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1027,7 +1089,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1027
1089
|
</auro-combobox>
|
|
1028
1090
|
<auro-combobox offset="20" noFlip placement="right" autoPlacement>
|
|
1029
1091
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1030
|
-
<span slot="label">
|
|
1092
|
+
<span slot="label">Label</span>
|
|
1093
|
+
<span slot="helpText">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
1031
1094
|
<auro-menu>
|
|
1032
1095
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1033
1096
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1049,7 +1112,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1049
1112
|
<div style="width: 350px">
|
|
1050
1113
|
<auro-combobox offset="20" noFlip placement="bottom-end">
|
|
1051
1114
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1052
|
-
<span slot="label">
|
|
1115
|
+
<span slot="label">Label</span>
|
|
1116
|
+
<span slot="helpText">bottom-end bib with 20px offset and noFlip</span>
|
|
1053
1117
|
<auro-menu>
|
|
1054
1118
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1055
1119
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1061,7 +1125,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1061
1125
|
</auro-combobox>
|
|
1062
1126
|
<auro-combobox offset="20" placement="bottom-end">
|
|
1063
1127
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1064
|
-
<span slot="label">
|
|
1128
|
+
<span slot="label">Label</span>
|
|
1129
|
+
<span slot="helpText">bottom-end bib with 20px offset and flip</span>
|
|
1065
1130
|
<auro-menu>
|
|
1066
1131
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1067
1132
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1073,7 +1138,8 @@ The bib position can be customized with `placement`, `offset`, `flip`, `autoPlac
|
|
|
1073
1138
|
</auro-combobox>
|
|
1074
1139
|
<auro-combobox offset="20" noFlip placement="right" autoPlacement>
|
|
1075
1140
|
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1076
|
-
<span slot="label">
|
|
1141
|
+
<span slot="label">Label</span>
|
|
1142
|
+
<span slot="helpText">right bib with 20px offset, noFlip and autoPlacement</span>
|
|
1077
1143
|
<auro-menu>
|
|
1078
1144
|
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1079
1145
|
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
@@ -1206,4 +1272,55 @@ export function inDialogExample() {
|
|
|
1206
1272
|
};
|
|
1207
1273
|
```
|
|
1208
1274
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1275
|
+
</auro-accordion>
|
|
1276
|
+
|
|
1277
|
+
#### Custom display value
|
|
1278
|
+
|
|
1279
|
+
You can fully customize how selected values appear by using the `displayValue` slot. This slot allows you to pass in any HTML content. Only the `snowflake` and `emphasized` layouts are supported.
|
|
1280
|
+
|
|
1281
|
+
<div class="exampleWrapper--ondark">
|
|
1282
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/displayValueSlot.html) -->
|
|
1283
|
+
<!-- The below content is automatically added from ./../apiExamples/displayValueSlot.html -->
|
|
1284
|
+
<auro-combobox layout="snowflake" shape="snowflake" size="xl" ondark value="Apples">
|
|
1285
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1286
|
+
<span slot="label">Name</span>
|
|
1287
|
+
<auro-menu>
|
|
1288
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1289
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1290
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1291
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1292
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1293
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1294
|
+
</auro-menu>
|
|
1295
|
+
<div slot="displayValue">
|
|
1296
|
+
<div class="mainText">Custom display value</div>
|
|
1297
|
+
<div class="subText">Any html can be used</div>
|
|
1298
|
+
</div>
|
|
1299
|
+
</auro-combobox>
|
|
1300
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1301
|
+
</div>
|
|
1302
|
+
<auro-accordion alignRight>
|
|
1303
|
+
<span slot="trigger">See code</span>
|
|
1304
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/displayValueSlot.html) -->
|
|
1305
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/displayValueSlot.html -->
|
|
1306
|
+
|
|
1307
|
+
```html
|
|
1308
|
+
<auro-combobox layout="snowflake" shape="snowflake" size="xl" ondark value="Apples">
|
|
1309
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1310
|
+
<span slot="label">Name</span>
|
|
1311
|
+
<auro-menu>
|
|
1312
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1313
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1314
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1315
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1316
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1317
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1318
|
+
</auro-menu>
|
|
1319
|
+
<div slot="displayValue">
|
|
1320
|
+
<div class="mainText">Custom display value</div>
|
|
1321
|
+
<div class="subText">Any html can be used</div>
|
|
1322
|
+
</div>
|
|
1323
|
+
</auro-combobox>
|
|
1324
|
+
```
|
|
1325
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1209
1326
|
</auro-accordion>
|