@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.3 → 0.0.0-pr624.31
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/components/bibtemplate/dist/auro-bibtemplate.d.ts +13 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1292 -79
- package/components/bibtemplate/dist/registered.js +1292 -79
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +47 -14
- package/components/checkbox/demo/api.min.js +35 -29
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +35 -29
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +35 -29
- package/components/checkbox/dist/registered.js +35 -29
- package/components/combobox/demo/api.md +101 -2
- package/components/combobox/demo/api.min.js +2935 -794
- package/components/combobox/demo/index.md +6 -30
- package/components/combobox/demo/index.min.js +2935 -794
- package/components/combobox/dist/auro-combobox.d.ts +45 -16
- package/components/combobox/dist/index.js +2832 -832
- package/components/combobox/dist/registered.js +2832 -832
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +3648 -929
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +3648 -929
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +105 -6
- package/components/counter/dist/auro-counter.d.ts +6 -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 +3648 -929
- package/components/counter/dist/registered.js +3648 -929
- package/components/datepicker/demo/api.md +36 -19
- package/components/datepicker/demo/api.min.js +14662 -10980
- package/components/datepicker/demo/index.md +80 -0
- package/components/datepicker/demo/index.min.js +14662 -10980
- package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +11706 -8024
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +11706 -8024
- package/components/dropdown/demo/api.md +6 -7
- package/components/dropdown/demo/api.min.js +238 -144
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +238 -144
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -9
- package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
- package/components/dropdown/dist/index.js +238 -144
- package/components/dropdown/dist/registered.js +238 -144
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/README.md +1 -1
- package/components/input/demo/api.md +133 -97
- package/components/input/demo/api.min.js +972 -269
- package/components/input/demo/index.md +14 -14
- package/components/input/demo/index.min.js +971 -268
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/auro-input.d.ts +197 -15
- package/components/input/dist/base-input.d.ts +32 -8
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +971 -268
- package/components/input/dist/registered.js +971 -268
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +68 -7
- package/components/menu/demo/api.min.js +278 -42
- package/components/menu/demo/index.min.js +278 -42
- package/components/menu/dist/auro-menu.d.ts +28 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +278 -42
- package/components/menu/dist/registered.js +278 -42
- 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.md +7 -7
- package/components/radio/demo/api.min.js +16 -13
- package/components/radio/demo/index.min.js +16 -13
- package/components/radio/dist/auro-radio-group.d.ts +1 -1
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +16 -13
- package/components/radio/dist/registered.js +16 -13
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +124 -13
- package/components/select/demo/api.min.js +2802 -538
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +325 -763
- package/components/select/demo/index.min.js +2795 -543
- package/components/select/dist/auro-select.d.ts +112 -11
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +2538 -427
- package/components/select/dist/registered.js +2538 -427
- 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 +6 -4
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -87,7 +87,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
87
87
|
<span slot="legend">Form label goes here</span>
|
|
88
88
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
89
89
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
90
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
90
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
91
91
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
92
92
|
</auro-checkbox-group>
|
|
93
93
|
```
|
|
@@ -36,11 +36,11 @@ The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
|
36
36
|
|
|
37
37
|
## Slots
|
|
38
38
|
|
|
39
|
-
| Name | Description
|
|
40
|
-
|
|
41
|
-
| [helpText](#helpText) | Allows for the helper text to be overridden.
|
|
42
|
-
| [legend](#legend) | Allows for the legend to be overridden.
|
|
43
|
-
| [optionalLabel](#optionalLabel) | Allows
|
|
39
|
+
| Name | Description |
|
|
40
|
+
|-----------------|--------------------------------------------------|
|
|
41
|
+
| [helpText](#helpText) | Allows for the helper text to be overridden. |
|
|
42
|
+
| [legend](#legend) | Allows for the legend to be overridden. |
|
|
43
|
+
| [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
|
|
44
44
|
|
|
45
45
|
# auro-checkbox
|
|
46
46
|
|
|
@@ -92,7 +92,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
92
92
|
<span slot="legend">Form label goes here</span>
|
|
93
93
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
94
94
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
95
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
95
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
96
96
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
97
97
|
</auro-checkbox-group>
|
|
98
98
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -119,7 +119,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
119
119
|
<span slot="legend">Form label goes here</span>
|
|
120
120
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
121
121
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
122
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
122
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
123
123
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
124
124
|
</auro-checkbox-group>
|
|
125
125
|
```
|
|
@@ -326,6 +326,40 @@ When present, the `required` attribute specifies that at least one or more `<aur
|
|
|
326
326
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
327
327
|
</auro-accordion>
|
|
328
328
|
|
|
329
|
+
### Custom optional label <a name="optionalLabel"></a>
|
|
330
|
+
The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
331
|
+
|
|
332
|
+
<div class="exampleWrapper">
|
|
333
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
|
|
334
|
+
<!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
335
|
+
<auro-checkbox-group>
|
|
336
|
+
<span slot="legend">Form label goes here</span>
|
|
337
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
338
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
339
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
340
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
341
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
342
|
+
</auro-checkbox-group>
|
|
343
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
344
|
+
</div>
|
|
345
|
+
<auro-accordion alignRight>
|
|
346
|
+
<span slot="trigger">See code</span>
|
|
347
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
|
|
348
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
349
|
+
|
|
350
|
+
```html
|
|
351
|
+
<auro-checkbox-group>
|
|
352
|
+
<span slot="legend">Form label goes here</span>
|
|
353
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
354
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
355
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
356
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
357
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
358
|
+
</auro-checkbox-group>
|
|
359
|
+
```
|
|
360
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
361
|
+
</auro-accordion>
|
|
362
|
+
|
|
329
363
|
### Functional Examples
|
|
330
364
|
|
|
331
365
|
#### Reset State
|
|
@@ -386,16 +420,15 @@ The component may be restyled using the following code sample and changing the v
|
|
|
386
420
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
387
421
|
|
|
388
422
|
```scss
|
|
389
|
-
@
|
|
390
|
-
@import "@aurodesignsystem/design-tokens/dist/auro-classic/SCSSVariables";
|
|
423
|
+
@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
391
424
|
|
|
392
425
|
:host {
|
|
393
|
-
--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #{
|
|
394
|
-
--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #{
|
|
395
|
-
--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #{
|
|
396
|
-
--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #{
|
|
426
|
+
--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #{v.$ds-basic-color-border-bold});
|
|
427
|
+
--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #{v.$ds-advanced-color-boolean-indicator});
|
|
428
|
+
--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #{v.$ds-advanced-color-boolean-isfalse});
|
|
429
|
+
--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
397
430
|
--ds-auro-checkbox-outline-color: transparent;
|
|
398
|
-
--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #{
|
|
431
|
+
--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
399
432
|
}
|
|
400
433
|
```
|
|
401
434
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -51,9 +51,9 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
51
51
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
52
52
|
*/const o$1=o=>o??E;
|
|
53
53
|
|
|
54
|
-
var styleCss$2 = i$5`: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;--cbxLocation: var(--ds-size-50, 0.25rem)}fieldset{all:unset}@media screen and (min-width: 576px){.displayFlex slot{display:flex}}.cbxContainer{position:relative;padding-left:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.cbx--input:disabled+label:hover{cursor:auto}.label{
|
|
54
|
+
var styleCss$2 = i$5`: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;--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);line-height:var(--ds-size-400, 2rem)}.cbx--input:disabled+label:hover{cursor:auto}.label{display:block}.label:hover{cursor:pointer}.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}`;
|
|
55
55
|
|
|
56
|
-
var colorCss$2 = i$5`:host .label{color:var(--ds-auro-checkbox-label-color)}:host .
|
|
56
|
+
var colorCss$2 = i$5`: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]) .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) .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)}`;
|
|
57
57
|
|
|
58
58
|
var tokensCss$1 = i$5`: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)}`;
|
|
59
59
|
|
|
@@ -239,8 +239,8 @@ class AuroCheckbox extends i$2 {
|
|
|
239
239
|
},
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
+
* The id for input node.
|
|
242
243
|
* @private
|
|
243
|
-
* id for input node
|
|
244
244
|
*/
|
|
245
245
|
inputId: {
|
|
246
246
|
type: String,
|
|
@@ -265,7 +265,7 @@ class AuroCheckbox extends i$2 {
|
|
|
265
265
|
/**
|
|
266
266
|
* Handles the change event for the checkbox input.
|
|
267
267
|
* Updates the checked state and dispatches a corresponding custom event.
|
|
268
|
-
* This custom event is only for the purpose of supporting IE
|
|
268
|
+
* This custom event is only for the purpose of supporting IE.
|
|
269
269
|
* @private
|
|
270
270
|
* @param {Event} event - The change event from the checkbox input.
|
|
271
271
|
* @returns {void}
|
|
@@ -339,6 +339,7 @@ class AuroCheckbox extends i$2 {
|
|
|
339
339
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
340
340
|
|
|
341
341
|
this.addEventListener('click', () => {
|
|
342
|
+
this.checked = !this.checked;
|
|
342
343
|
this.handleFocusin();
|
|
343
344
|
});
|
|
344
345
|
|
|
@@ -359,7 +360,7 @@ class AuroCheckbox extends i$2 {
|
|
|
359
360
|
* @private
|
|
360
361
|
* @returns {HTMLElement}
|
|
361
362
|
*/
|
|
362
|
-
|
|
363
|
+
render() {
|
|
363
364
|
const labelClasses = {
|
|
364
365
|
'label': true,
|
|
365
366
|
'label--cbx': true,
|
|
@@ -368,21 +369,23 @@ class AuroCheckbox extends i$2 {
|
|
|
368
369
|
|
|
369
370
|
return x`
|
|
370
371
|
<div class="cbxContainer" part="checkbox">
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
372
|
+
<div class="inputContainer">
|
|
373
|
+
<input
|
|
374
|
+
class="util_displayHiddenVisually cbx--input"
|
|
375
|
+
part="checkbox-input"
|
|
376
|
+
@change=${this.handleChange}
|
|
377
|
+
@input="${this.handleInput}"
|
|
378
|
+
?disabled="${this.disabled}"
|
|
379
|
+
.checked="${this.checked}"
|
|
380
|
+
id="${this.inputId}"
|
|
381
|
+
name="${o$1(this.name)}"
|
|
382
|
+
type="checkbox"
|
|
383
|
+
.value="${this.value}"
|
|
384
|
+
/>
|
|
385
|
+
${this.checked ? this.generateIconHtml() : undefined}
|
|
386
|
+
</div>
|
|
383
387
|
|
|
384
388
|
<label for="${this.inputId}" class="${e(labelClasses)}" part="checkbox-label">
|
|
385
|
-
${this.checked ? this.generateIconHtml() : undefined}
|
|
386
389
|
<slot></slot>
|
|
387
390
|
</label>
|
|
388
391
|
</div>
|
|
@@ -453,9 +456,10 @@ class DateFormatter {
|
|
|
453
456
|
/**
|
|
454
457
|
* Convert a date object to string format.
|
|
455
458
|
* @param {Object} date - Date to convert to string.
|
|
456
|
-
* @
|
|
459
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
460
|
+
* @returns {String} Returns the date as a string.
|
|
457
461
|
*/
|
|
458
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
462
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
459
463
|
year: "numeric",
|
|
460
464
|
month: "2-digit",
|
|
461
465
|
day: "2-digit",
|
|
@@ -647,7 +651,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
647
651
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
648
652
|
|
|
649
653
|
// Get the date string of the date object we created from the string date
|
|
650
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
654
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
651
655
|
|
|
652
656
|
// Guard Clause: Generated date matches date string input
|
|
653
657
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -1091,7 +1095,9 @@ class AuroFormValidation {
|
|
|
1091
1095
|
elem.validity = this.auroInputElements[0].validity;
|
|
1092
1096
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1093
1097
|
|
|
1094
|
-
|
|
1098
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1099
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1100
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1095
1101
|
elem.validity = this.auroInputElements[1].validity;
|
|
1096
1102
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1097
1103
|
}
|
|
@@ -1215,9 +1221,9 @@ var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75r
|
|
|
1215
1221
|
|
|
1216
1222
|
var colorCss$1 = i$5`: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)}`;
|
|
1217
1223
|
|
|
1218
|
-
var colorCss = i$5`: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-
|
|
1224
|
+
var colorCss = i$5`: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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1219
1225
|
|
|
1220
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:
|
|
1226
|
+
var styleCss = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1221
1227
|
|
|
1222
1228
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1223
1229
|
|
|
@@ -1431,7 +1437,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1431
1437
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
1432
1438
|
*
|
|
1433
1439
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1434
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
1440
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
1435
1441
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
1436
1442
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1437
1443
|
*/
|
|
@@ -1799,10 +1805,10 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1799
1805
|
|
|
1800
1806
|
return u`
|
|
1801
1807
|
<fieldset class="${e(groupClasses)}">
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
: u`<
|
|
1805
|
-
|
|
1808
|
+
<legend>
|
|
1809
|
+
<slot name="legend"></slot>
|
|
1810
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
1811
|
+
</legend>
|
|
1806
1812
|
<slot @slotchange=${this.handleItems}></slot>
|
|
1807
1813
|
</fieldset>
|
|
1808
1814
|
|
|
@@ -34,7 +34,7 @@ The `<auro-checkbox>` element should be used in situations where users may:
|
|
|
34
34
|
<span slot="legend">Form label goes here</span>
|
|
35
35
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
36
36
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
37
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
37
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
38
38
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
39
39
|
</auro-checkbox-group>
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -61,7 +61,7 @@ The `<auro-checkbox>` element should be used in situations where users may:
|
|
|
61
61
|
<span slot="legend">Form label goes here</span>
|
|
62
62
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
63
63
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
64
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
64
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
65
65
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
66
66
|
</auro-checkbox-group>
|
|
67
67
|
```
|
|
@@ -43,9 +43,9 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
43
43
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
44
|
*/const o$1=o=>o??E;
|
|
45
45
|
|
|
46
|
-
var styleCss$2 = i$5`: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;--cbxLocation: var(--ds-size-50, 0.25rem)}fieldset{all:unset}@media screen and (min-width: 576px){.displayFlex slot{display:flex}}.cbxContainer{position:relative;padding-left:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-100, 0.5rem);line-height:var(--ds-size-400, 2rem)}.cbx--input:disabled+label:hover{cursor:auto}.label{
|
|
46
|
+
var styleCss$2 = i$5`: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;--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);line-height:var(--ds-size-400, 2rem)}.cbx--input:disabled+label:hover{cursor:auto}.label{display:block}.label:hover{cursor:pointer}.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}`;
|
|
47
47
|
|
|
48
|
-
var colorCss$2 = i$5`:host .label{color:var(--ds-auro-checkbox-label-color)}:host .
|
|
48
|
+
var colorCss$2 = i$5`: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]) .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) .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)}`;
|
|
49
49
|
|
|
50
50
|
var tokensCss$1 = i$5`: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)}`;
|
|
51
51
|
|
|
@@ -231,8 +231,8 @@ class AuroCheckbox extends i$2 {
|
|
|
231
231
|
},
|
|
232
232
|
|
|
233
233
|
/**
|
|
234
|
+
* The id for input node.
|
|
234
235
|
* @private
|
|
235
|
-
* id for input node
|
|
236
236
|
*/
|
|
237
237
|
inputId: {
|
|
238
238
|
type: String,
|
|
@@ -257,7 +257,7 @@ class AuroCheckbox extends i$2 {
|
|
|
257
257
|
/**
|
|
258
258
|
* Handles the change event for the checkbox input.
|
|
259
259
|
* Updates the checked state and dispatches a corresponding custom event.
|
|
260
|
-
* This custom event is only for the purpose of supporting IE
|
|
260
|
+
* This custom event is only for the purpose of supporting IE.
|
|
261
261
|
* @private
|
|
262
262
|
* @param {Event} event - The change event from the checkbox input.
|
|
263
263
|
* @returns {void}
|
|
@@ -331,6 +331,7 @@ class AuroCheckbox extends i$2 {
|
|
|
331
331
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
332
332
|
|
|
333
333
|
this.addEventListener('click', () => {
|
|
334
|
+
this.checked = !this.checked;
|
|
334
335
|
this.handleFocusin();
|
|
335
336
|
});
|
|
336
337
|
|
|
@@ -351,7 +352,7 @@ class AuroCheckbox extends i$2 {
|
|
|
351
352
|
* @private
|
|
352
353
|
* @returns {HTMLElement}
|
|
353
354
|
*/
|
|
354
|
-
|
|
355
|
+
render() {
|
|
355
356
|
const labelClasses = {
|
|
356
357
|
'label': true,
|
|
357
358
|
'label--cbx': true,
|
|
@@ -360,21 +361,23 @@ class AuroCheckbox extends i$2 {
|
|
|
360
361
|
|
|
361
362
|
return x`
|
|
362
363
|
<div class="cbxContainer" part="checkbox">
|
|
363
|
-
<
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
364
|
+
<div class="inputContainer">
|
|
365
|
+
<input
|
|
366
|
+
class="util_displayHiddenVisually cbx--input"
|
|
367
|
+
part="checkbox-input"
|
|
368
|
+
@change=${this.handleChange}
|
|
369
|
+
@input="${this.handleInput}"
|
|
370
|
+
?disabled="${this.disabled}"
|
|
371
|
+
.checked="${this.checked}"
|
|
372
|
+
id="${this.inputId}"
|
|
373
|
+
name="${o$1(this.name)}"
|
|
374
|
+
type="checkbox"
|
|
375
|
+
.value="${this.value}"
|
|
376
|
+
/>
|
|
377
|
+
${this.checked ? this.generateIconHtml() : undefined}
|
|
378
|
+
</div>
|
|
375
379
|
|
|
376
380
|
<label for="${this.inputId}" class="${e(labelClasses)}" part="checkbox-label">
|
|
377
|
-
${this.checked ? this.generateIconHtml() : undefined}
|
|
378
381
|
<slot></slot>
|
|
379
382
|
</label>
|
|
380
383
|
</div>
|
|
@@ -445,9 +448,10 @@ class DateFormatter {
|
|
|
445
448
|
/**
|
|
446
449
|
* Convert a date object to string format.
|
|
447
450
|
* @param {Object} date - Date to convert to string.
|
|
448
|
-
* @
|
|
451
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
452
|
+
* @returns {String} Returns the date as a string.
|
|
449
453
|
*/
|
|
450
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
454
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
451
455
|
year: "numeric",
|
|
452
456
|
month: "2-digit",
|
|
453
457
|
day: "2-digit",
|
|
@@ -639,7 +643,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
639
643
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
640
644
|
|
|
641
645
|
// Get the date string of the date object we created from the string date
|
|
642
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
646
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
643
647
|
|
|
644
648
|
// Guard Clause: Generated date matches date string input
|
|
645
649
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -1083,7 +1087,9 @@ class AuroFormValidation {
|
|
|
1083
1087
|
elem.validity = this.auroInputElements[0].validity;
|
|
1084
1088
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1085
1089
|
|
|
1086
|
-
|
|
1090
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1091
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1092
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1087
1093
|
elem.validity = this.auroInputElements[1].validity;
|
|
1088
1094
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1089
1095
|
}
|
|
@@ -1207,9 +1213,9 @@ var styleCss$1 = i$5`:host{display:block;padding-bottom:var(--ds-size-150, 0.75r
|
|
|
1207
1213
|
|
|
1208
1214
|
var colorCss$1 = i$5`: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)}`;
|
|
1209
1215
|
|
|
1210
|
-
var colorCss = i$5`: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-
|
|
1216
|
+
var colorCss = i$5`: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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1211
1217
|
|
|
1212
|
-
var styleCss = i$5`.helptext-wrapper{display:none;font-size:
|
|
1218
|
+
var styleCss = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
1213
1219
|
|
|
1214
1220
|
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1215
1221
|
|
|
@@ -1423,7 +1429,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1423
1429
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
1424
1430
|
*
|
|
1425
1431
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1426
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
1432
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
1427
1433
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
1428
1434
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1429
1435
|
*/
|
|
@@ -1791,10 +1797,10 @@ class AuroCheckboxGroup extends i$2 {
|
|
|
1791
1797
|
|
|
1792
1798
|
return u`
|
|
1793
1799
|
<fieldset class="${e(groupClasses)}">
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
: u`<
|
|
1797
|
-
|
|
1800
|
+
<legend>
|
|
1801
|
+
<slot name="legend"></slot>
|
|
1802
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
1803
|
+
</legend>
|
|
1798
1804
|
<slot @slotchange=${this.handleItems}></slot>
|
|
1799
1805
|
</fieldset>
|
|
1800
1806
|
|
|
@@ -87,7 +87,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
87
87
|
<span slot="legend">Form label goes here</span>
|
|
88
88
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
89
89
|
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
90
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
90
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
91
91
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
92
92
|
</auro-checkbox-group>
|
|
93
93
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
3
3
|
*
|
|
4
4
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
5
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
5
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6
6
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
7
7
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
8
8
|
*/
|
|
@@ -59,8 +59,8 @@ export class AuroCheckbox extends LitElement {
|
|
|
59
59
|
*/
|
|
60
60
|
touched: boolean;
|
|
61
61
|
/**
|
|
62
|
+
* The id for input node.
|
|
62
63
|
* @private
|
|
63
|
-
* id for input node
|
|
64
64
|
*/
|
|
65
65
|
inputId: {
|
|
66
66
|
type: StringConstructor;
|
|
@@ -89,7 +89,7 @@ export class AuroCheckbox extends LitElement {
|
|
|
89
89
|
/**
|
|
90
90
|
* Handles the change event for the checkbox input.
|
|
91
91
|
* Updates the checked state and dispatches a corresponding custom event.
|
|
92
|
-
* This custom event is only for the purpose of supporting IE
|
|
92
|
+
* This custom event is only for the purpose of supporting IE.
|
|
93
93
|
* @private
|
|
94
94
|
* @param {Event} event - The change event from the checkbox input.
|
|
95
95
|
* @returns {void}
|
|
@@ -128,6 +128,6 @@ export class AuroCheckbox extends LitElement {
|
|
|
128
128
|
* @private
|
|
129
129
|
* @returns {HTMLElement}
|
|
130
130
|
*/
|
|
131
|
-
private
|
|
131
|
+
private render;
|
|
132
132
|
}
|
|
133
133
|
import { LitElement } from "lit";
|