@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
|
@@ -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;--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{
|
|
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;--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}`;
|
|
7
7
|
|
|
8
|
-
var colorCss$2 = css`:host .label{color:var(--ds-auro-checkbox-label-color)}:host .
|
|
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]) .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)}`;
|
|
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
|
|
|
@@ -191,8 +191,8 @@ class AuroCheckbox extends LitElement {
|
|
|
191
191
|
},
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
|
+
* The id for input node.
|
|
194
195
|
* @private
|
|
195
|
-
* id for input node
|
|
196
196
|
*/
|
|
197
197
|
inputId: {
|
|
198
198
|
type: String,
|
|
@@ -217,7 +217,7 @@ class AuroCheckbox extends LitElement {
|
|
|
217
217
|
/**
|
|
218
218
|
* Handles the change event for the checkbox input.
|
|
219
219
|
* Updates the checked state and dispatches a corresponding custom event.
|
|
220
|
-
* This custom event is only for the purpose of supporting IE
|
|
220
|
+
* This custom event is only for the purpose of supporting IE.
|
|
221
221
|
* @private
|
|
222
222
|
* @param {Event} event - The change event from the checkbox input.
|
|
223
223
|
* @returns {void}
|
|
@@ -291,6 +291,7 @@ class AuroCheckbox extends LitElement {
|
|
|
291
291
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
292
292
|
|
|
293
293
|
this.addEventListener('click', () => {
|
|
294
|
+
this.checked = !this.checked;
|
|
294
295
|
this.handleFocusin();
|
|
295
296
|
});
|
|
296
297
|
|
|
@@ -311,7 +312,7 @@ class AuroCheckbox extends LitElement {
|
|
|
311
312
|
* @private
|
|
312
313
|
* @returns {HTMLElement}
|
|
313
314
|
*/
|
|
314
|
-
|
|
315
|
+
render() {
|
|
315
316
|
const labelClasses = {
|
|
316
317
|
'label': true,
|
|
317
318
|
'label--cbx': true,
|
|
@@ -320,21 +321,23 @@ class AuroCheckbox extends LitElement {
|
|
|
320
321
|
|
|
321
322
|
return html`
|
|
322
323
|
<div class="cbxContainer" part="checkbox">
|
|
323
|
-
<
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
324
|
+
<div class="inputContainer">
|
|
325
|
+
<input
|
|
326
|
+
class="util_displayHiddenVisually cbx--input"
|
|
327
|
+
part="checkbox-input"
|
|
328
|
+
@change=${this.handleChange}
|
|
329
|
+
@input="${this.handleInput}"
|
|
330
|
+
?disabled="${this.disabled}"
|
|
331
|
+
.checked="${this.checked}"
|
|
332
|
+
id="${this.inputId}"
|
|
333
|
+
name="${ifDefined(this.name)}"
|
|
334
|
+
type="checkbox"
|
|
335
|
+
.value="${this.value}"
|
|
336
|
+
/>
|
|
337
|
+
${this.checked ? this.generateIconHtml() : undefined}
|
|
338
|
+
</div>
|
|
335
339
|
|
|
336
340
|
<label for="${this.inputId}" class="${classMap(labelClasses)}" part="checkbox-label">
|
|
337
|
-
${this.checked ? this.generateIconHtml() : undefined}
|
|
338
341
|
<slot></slot>
|
|
339
342
|
</label>
|
|
340
343
|
</div>
|
|
@@ -398,9 +401,10 @@ class DateFormatter {
|
|
|
398
401
|
/**
|
|
399
402
|
* Convert a date object to string format.
|
|
400
403
|
* @param {Object} date - Date to convert to string.
|
|
401
|
-
* @
|
|
404
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
405
|
+
* @returns {String} Returns the date as a string.
|
|
402
406
|
*/
|
|
403
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
407
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
404
408
|
year: "numeric",
|
|
405
409
|
month: "2-digit",
|
|
406
410
|
day: "2-digit",
|
|
@@ -592,7 +596,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
592
596
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
593
597
|
|
|
594
598
|
// Get the date string of the date object we created from the string date
|
|
595
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
599
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
596
600
|
|
|
597
601
|
// Guard Clause: Generated date matches date string input
|
|
598
602
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -1036,7 +1040,9 @@ class AuroFormValidation {
|
|
|
1036
1040
|
elem.validity = this.auroInputElements[0].validity;
|
|
1037
1041
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1038
1042
|
|
|
1039
|
-
|
|
1043
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1044
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1045
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1040
1046
|
elem.validity = this.auroInputElements[1].validity;
|
|
1041
1047
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1042
1048
|
}
|
|
@@ -1160,9 +1166,9 @@ var styleCss$1 = css`:host{display:block;padding-bottom:var(--ds-size-150, 0.75r
|
|
|
1160
1166
|
|
|
1161
1167
|
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
1168
|
|
|
1163
|
-
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-
|
|
1169
|
+
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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1164
1170
|
|
|
1165
|
-
var styleCss = css`.helptext-wrapper{display:none;font-size:
|
|
1171
|
+
var styleCss = css`.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}`;
|
|
1166
1172
|
|
|
1167
1173
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1168
1174
|
|
|
@@ -1376,7 +1382,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1376
1382
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
1377
1383
|
*
|
|
1378
1384
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1379
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
1385
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
1380
1386
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
1381
1387
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1382
1388
|
*/
|
|
@@ -1744,10 +1750,10 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1744
1750
|
|
|
1745
1751
|
return html$1`
|
|
1746
1752
|
<fieldset class="${classMap(groupClasses)}">
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
: html$1`<
|
|
1750
|
-
|
|
1753
|
+
<legend>
|
|
1754
|
+
<slot name="legend"></slot>
|
|
1755
|
+
${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
|
|
1756
|
+
</legend>
|
|
1751
1757
|
<slot @slotchange=${this.handleItems}></slot>
|
|
1752
1758
|
</fieldset>
|
|
1753
1759
|
|
|
@@ -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;--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{
|
|
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;--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}`;
|
|
7
7
|
|
|
8
|
-
var colorCss$2 = css`:host .label{color:var(--ds-auro-checkbox-label-color)}:host .
|
|
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]) .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)}`;
|
|
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
|
|
|
@@ -191,8 +191,8 @@ class AuroCheckbox extends LitElement {
|
|
|
191
191
|
},
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
|
+
* The id for input node.
|
|
194
195
|
* @private
|
|
195
|
-
* id for input node
|
|
196
196
|
*/
|
|
197
197
|
inputId: {
|
|
198
198
|
type: String,
|
|
@@ -217,7 +217,7 @@ class AuroCheckbox extends LitElement {
|
|
|
217
217
|
/**
|
|
218
218
|
* Handles the change event for the checkbox input.
|
|
219
219
|
* Updates the checked state and dispatches a corresponding custom event.
|
|
220
|
-
* This custom event is only for the purpose of supporting IE
|
|
220
|
+
* This custom event is only for the purpose of supporting IE.
|
|
221
221
|
* @private
|
|
222
222
|
* @param {Event} event - The change event from the checkbox input.
|
|
223
223
|
* @returns {void}
|
|
@@ -291,6 +291,7 @@ class AuroCheckbox extends LitElement {
|
|
|
291
291
|
this.inputId = this.id ? `${this.id}-input` : window.crypto.randomUUID();
|
|
292
292
|
|
|
293
293
|
this.addEventListener('click', () => {
|
|
294
|
+
this.checked = !this.checked;
|
|
294
295
|
this.handleFocusin();
|
|
295
296
|
});
|
|
296
297
|
|
|
@@ -311,7 +312,7 @@ class AuroCheckbox extends LitElement {
|
|
|
311
312
|
* @private
|
|
312
313
|
* @returns {HTMLElement}
|
|
313
314
|
*/
|
|
314
|
-
|
|
315
|
+
render() {
|
|
315
316
|
const labelClasses = {
|
|
316
317
|
'label': true,
|
|
317
318
|
'label--cbx': true,
|
|
@@ -320,21 +321,23 @@ class AuroCheckbox extends LitElement {
|
|
|
320
321
|
|
|
321
322
|
return html`
|
|
322
323
|
<div class="cbxContainer" part="checkbox">
|
|
323
|
-
<
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
324
|
+
<div class="inputContainer">
|
|
325
|
+
<input
|
|
326
|
+
class="util_displayHiddenVisually cbx--input"
|
|
327
|
+
part="checkbox-input"
|
|
328
|
+
@change=${this.handleChange}
|
|
329
|
+
@input="${this.handleInput}"
|
|
330
|
+
?disabled="${this.disabled}"
|
|
331
|
+
.checked="${this.checked}"
|
|
332
|
+
id="${this.inputId}"
|
|
333
|
+
name="${ifDefined(this.name)}"
|
|
334
|
+
type="checkbox"
|
|
335
|
+
.value="${this.value}"
|
|
336
|
+
/>
|
|
337
|
+
${this.checked ? this.generateIconHtml() : undefined}
|
|
338
|
+
</div>
|
|
335
339
|
|
|
336
340
|
<label for="${this.inputId}" class="${classMap(labelClasses)}" part="checkbox-label">
|
|
337
|
-
${this.checked ? this.generateIconHtml() : undefined}
|
|
338
341
|
<slot></slot>
|
|
339
342
|
</label>
|
|
340
343
|
</div>
|
|
@@ -398,9 +401,10 @@ class DateFormatter {
|
|
|
398
401
|
/**
|
|
399
402
|
* Convert a date object to string format.
|
|
400
403
|
* @param {Object} date - Date to convert to string.
|
|
401
|
-
* @
|
|
404
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
405
|
+
* @returns {String} Returns the date as a string.
|
|
402
406
|
*/
|
|
403
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
407
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
404
408
|
year: "numeric",
|
|
405
409
|
month: "2-digit",
|
|
406
410
|
day: "2-digit",
|
|
@@ -592,7 +596,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
592
596
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
593
597
|
|
|
594
598
|
// Get the date string of the date object we created from the string date
|
|
595
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
599
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
596
600
|
|
|
597
601
|
// Guard Clause: Generated date matches date string input
|
|
598
602
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -1036,7 +1040,9 @@ class AuroFormValidation {
|
|
|
1036
1040
|
elem.validity = this.auroInputElements[0].validity;
|
|
1037
1041
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1038
1042
|
|
|
1039
|
-
|
|
1043
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
1044
|
+
// combobox's 2nd input will have noValidate set true.
|
|
1045
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1040
1046
|
elem.validity = this.auroInputElements[1].validity;
|
|
1041
1047
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1042
1048
|
}
|
|
@@ -1160,9 +1166,9 @@ var styleCss$1 = css`:host{display:block;padding-bottom:var(--ds-size-150, 0.75r
|
|
|
1160
1166
|
|
|
1161
1167
|
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
1168
|
|
|
1163
|
-
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-
|
|
1169
|
+
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-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
1164
1170
|
|
|
1165
|
-
var styleCss = css`.helptext-wrapper{display:none;font-size:
|
|
1171
|
+
var styleCss = css`.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}`;
|
|
1166
1172
|
|
|
1167
1173
|
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
1168
1174
|
|
|
@@ -1376,7 +1382,7 @@ var helpTextVersion = '1.0.0';
|
|
|
1376
1382
|
* The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
1377
1383
|
*
|
|
1378
1384
|
* @slot {HTMLSlotElement} legend - Allows for the legend to be overridden.
|
|
1379
|
-
* @slot {HTMLSlotElement} optionalLabel - Allows
|
|
1385
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
1380
1386
|
* @slot {HTMLSlotElement} helpText - Allows for the helper text to be overridden.
|
|
1381
1387
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
1382
1388
|
*/
|
|
@@ -1744,10 +1750,10 @@ class AuroCheckboxGroup extends LitElement {
|
|
|
1744
1750
|
|
|
1745
1751
|
return html$1`
|
|
1746
1752
|
<fieldset class="${classMap(groupClasses)}">
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
: html$1`<
|
|
1750
|
-
|
|
1753
|
+
<legend>
|
|
1754
|
+
<slot name="legend"></slot>
|
|
1755
|
+
${this.required ? undefined : html$1`<slot name="optionalLabel"> (optional)</slot>`}
|
|
1756
|
+
</legend>
|
|
1751
1757
|
<slot @slotchange=${this.handleItems}></slot>
|
|
1752
1758
|
</fieldset>
|
|
1753
1759
|
|
|
@@ -12,10 +12,12 @@
|
|
|
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 |
|
|
18
19
|
| [layout](#layout) | | `string` | | |
|
|
20
|
+
| [matchWidth](#matchWidth) | `matchWidth` | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
|
|
19
21
|
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
20
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`. |
|
|
21
23
|
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
| Method | Type | Description |
|
|
39
41
|
|------------|----------------------------------------|--------------------------------------------------|
|
|
40
42
|
| [focus](#focus) | `(): void` | Focuses the combobox trigger input. |
|
|
41
|
-
| [isValid](#isValid) | `(): boolean` |
|
|
43
|
+
| [isValid](#isValid) | `(): boolean` | Checks if the element is valid. |
|
|
42
44
|
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
43
45
|
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
44
46
|
|
|
@@ -55,8 +57,10 @@
|
|
|
55
57
|
|---------------------------|--------------------------------------------------|
|
|
56
58
|
| | Default slot for the menu content. |
|
|
57
59
|
| `bib.fullscreen.headline` | Defines the headline to display above menu-options |
|
|
60
|
+
| [displayValue](#displayValue) | Allows custom HTML content to display the selected value when the combobox is not focused. Only works with `snowflake` and `emphasized` layouts. |
|
|
58
61
|
| [helpText](#helpText) | Defines the content of the helpText. |
|
|
59
|
-
| [label](#label) | Defines the content of the label. |
|
|
62
|
+
| [label](#label) | Defines the content of the label. |
|
|
63
|
+
| [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
|
|
60
64
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
61
65
|
|
|
62
66
|
## API Examples
|
|
@@ -576,6 +580,50 @@ Populates the `required` attribute on the input. Used for client-side validation
|
|
|
576
580
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
577
581
|
</auro-accordion>
|
|
578
582
|
|
|
583
|
+
### Custom optional label <a name="optionalLabel"></a>
|
|
584
|
+
The `<auro-combobox>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
585
|
+
|
|
586
|
+
<div class="exampleWrapper">
|
|
587
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
|
|
588
|
+
<!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
589
|
+
<auro-combobox>
|
|
590
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
591
|
+
<span slot="label">Name</span>
|
|
592
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
593
|
+
<auro-menu>
|
|
594
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
595
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
596
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
597
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
598
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
599
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
600
|
+
</auro-menu>
|
|
601
|
+
</auro-combobox>
|
|
602
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
603
|
+
</div>
|
|
604
|
+
<auro-accordion alignRight>
|
|
605
|
+
<span slot="trigger">See code</span>
|
|
606
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
|
|
607
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
608
|
+
|
|
609
|
+
```html
|
|
610
|
+
<auro-combobox>
|
|
611
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
612
|
+
<span slot="label">Name</span>
|
|
613
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
614
|
+
<auro-menu>
|
|
615
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
616
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
617
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
618
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
619
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
620
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
621
|
+
</auro-menu>
|
|
622
|
+
</auro-combobox>
|
|
623
|
+
```
|
|
624
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
625
|
+
</auro-accordion>
|
|
626
|
+
|
|
579
627
|
#### value
|
|
580
628
|
|
|
581
629
|
Use the `value` attribute to programmatically set the value of the combobox.
|
|
@@ -1209,4 +1257,55 @@ export function inDialogExample() {
|
|
|
1209
1257
|
};
|
|
1210
1258
|
```
|
|
1211
1259
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1260
|
+
</auro-accordion>
|
|
1261
|
+
|
|
1262
|
+
#### Custom display value
|
|
1263
|
+
|
|
1264
|
+
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.
|
|
1265
|
+
|
|
1266
|
+
<div class="exampleWrapper--ondark">
|
|
1267
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/displayValueSlot.html) -->
|
|
1268
|
+
<!-- The below content is automatically added from ./../apiExamples/displayValueSlot.html -->
|
|
1269
|
+
<auro-combobox layout="snowflake" shape="snowflake" size="xl" ondark value="Apples">
|
|
1270
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1271
|
+
<span slot="label">Name</span>
|
|
1272
|
+
<auro-menu>
|
|
1273
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1274
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1275
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1276
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1277
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1278
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1279
|
+
</auro-menu>
|
|
1280
|
+
<div slot="displayValue">
|
|
1281
|
+
<div class="mainText">Custom display value</div>
|
|
1282
|
+
<div class="subText">Any html can be used</div>
|
|
1283
|
+
</div>
|
|
1284
|
+
</auro-combobox>
|
|
1285
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1286
|
+
</div>
|
|
1287
|
+
<auro-accordion alignRight>
|
|
1288
|
+
<span slot="trigger">See code</span>
|
|
1289
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/displayValueSlot.html) -->
|
|
1290
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/displayValueSlot.html -->
|
|
1291
|
+
|
|
1292
|
+
```html
|
|
1293
|
+
<auro-combobox layout="snowflake" shape="snowflake" size="xl" ondark value="Apples">
|
|
1294
|
+
<span slot="bib.fullscreen.headline">Bib Header</span>
|
|
1295
|
+
<span slot="label">Name</span>
|
|
1296
|
+
<auro-menu>
|
|
1297
|
+
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption>
|
|
1298
|
+
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption>
|
|
1299
|
+
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption>
|
|
1300
|
+
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption>
|
|
1301
|
+
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption>
|
|
1302
|
+
<auro-menuoption static nomatch>No matching option</auro-menuoption>
|
|
1303
|
+
</auro-menu>
|
|
1304
|
+
<div slot="displayValue">
|
|
1305
|
+
<div class="mainText">Custom display value</div>
|
|
1306
|
+
<div class="subText">Any html can be used</div>
|
|
1307
|
+
</div>
|
|
1308
|
+
</auro-combobox>
|
|
1309
|
+
```
|
|
1310
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1212
1311
|
</auro-accordion>
|