@aurodesignsystem/auro-formkit 2.1.0-beta.3 → 2.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +50 -8
- package/components/combobox/demo/index.min.js +50 -8
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +50 -8
- package/components/combobox/dist/registered.js +50 -8
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +50 -8
- package/components/counter/demo/index.min.js +50 -8
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/index.js +50 -8
- package/components/counter/dist/registered.js +50 -8
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.min.js +50 -8
- package/components/datepicker/demo/index.min.js +50 -8
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/index.js +50 -8
- package/components/datepicker/dist/registered.js +50 -8
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +50 -8
- package/components/dropdown/demo/index.min.js +50 -8
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +17 -1
- package/components/dropdown/dist/index.js +50 -8
- package/components/dropdown/dist/registered.js +50 -8
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/readme.md +1 -1
- package/components/menu/README.md +1 -1
- package/components/menu/demo/readme.md +1 -1
- package/components/radio/README.md +1 -1
- package/components/radio/demo/readme.md +1 -1
- package/components/select/README.md +2 -1
- package/components/select/demo/api.md +22 -0
- package/components/select/demo/api.min.js +50 -8
- package/components/select/demo/index.md +14 -0
- package/components/select/demo/index.min.js +50 -8
- package/components/select/demo/readme.md +2 -1
- package/components/select/dist/index.js +50 -8
- package/components/select/dist/registered.js +50 -8
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ export class AuroDropdown extends LitElement {
|
|
|
82
82
|
type: BooleanConstructor;
|
|
83
83
|
};
|
|
84
84
|
/**
|
|
85
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
85
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
86
86
|
*/
|
|
87
87
|
isBibFullscreen: {
|
|
88
88
|
type: BooleanConstructor;
|
|
@@ -108,6 +108,14 @@ export class AuroDropdown extends LitElement {
|
|
|
108
108
|
type: StringConstructor;
|
|
109
109
|
reflect: boolean;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Defines if there is a label preset.
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
labeled: {
|
|
116
|
+
type: BooleanConstructor;
|
|
117
|
+
reflect: boolean;
|
|
118
|
+
};
|
|
111
119
|
/**
|
|
112
120
|
* If declared, the popover and trigger will be set to the same width.
|
|
113
121
|
*/
|
|
@@ -188,6 +196,7 @@ export class AuroDropdown extends LitElement {
|
|
|
188
196
|
placement: string;
|
|
189
197
|
rounded: boolean;
|
|
190
198
|
noToggle: boolean;
|
|
199
|
+
labeled: boolean;
|
|
191
200
|
/**
|
|
192
201
|
* @private
|
|
193
202
|
*/
|
|
@@ -279,6 +288,13 @@ export class AuroDropdown extends LitElement {
|
|
|
279
288
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
280
289
|
*/
|
|
281
290
|
private handleDefaultSlot;
|
|
291
|
+
/**
|
|
292
|
+
* @private
|
|
293
|
+
* @method handleLabelSlotChange
|
|
294
|
+
* @param {event} event - The event object representing the slot change.
|
|
295
|
+
* @description Handles the slot change event for the label slot.
|
|
296
|
+
*/
|
|
297
|
+
private handleLabelSlotChange;
|
|
282
298
|
render(): import("lit-html").TemplateResult;
|
|
283
299
|
}
|
|
284
300
|
import { LitElement } from "lit";
|
|
@@ -2659,7 +2659,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
2659
2659
|
|
|
2660
2660
|
var dropdownVersion = '3.0.0';
|
|
2661
2661
|
|
|
2662
|
-
var styleCss$1 = css`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2662
|
+
var styleCss$1 = css`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2663
2663
|
|
|
2664
2664
|
var colorCss$1 = css`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8);--ds-auro-dropdown-trigger-outline-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);--ds-auro-dropdown-trigger-outline-color: var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2665
2665
|
|
|
@@ -2923,6 +2923,7 @@ class AuroDropdown extends LitElement {
|
|
|
2923
2923
|
this.rounded = false;
|
|
2924
2924
|
this.tabIndex = 0;
|
|
2925
2925
|
this.noToggle = false;
|
|
2926
|
+
this.labeled = true;
|
|
2926
2927
|
|
|
2927
2928
|
/**
|
|
2928
2929
|
* @private
|
|
@@ -3075,7 +3076,7 @@ class AuroDropdown extends LitElement {
|
|
|
3075
3076
|
},
|
|
3076
3077
|
|
|
3077
3078
|
/**
|
|
3078
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
3079
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
3079
3080
|
*/
|
|
3080
3081
|
isBibFullscreen: {
|
|
3081
3082
|
type: Boolean,
|
|
@@ -3105,6 +3106,15 @@ class AuroDropdown extends LitElement {
|
|
|
3105
3106
|
reflect: true
|
|
3106
3107
|
},
|
|
3107
3108
|
|
|
3109
|
+
/**
|
|
3110
|
+
* Defines if there is a label preset.
|
|
3111
|
+
* @private
|
|
3112
|
+
*/
|
|
3113
|
+
labeled: {
|
|
3114
|
+
type: Boolean,
|
|
3115
|
+
reflect: true
|
|
3116
|
+
},
|
|
3117
|
+
|
|
3108
3118
|
/**
|
|
3109
3119
|
* If declared, the popover and trigger will be set to the same width.
|
|
3110
3120
|
*/
|
|
@@ -3184,6 +3194,7 @@ class AuroDropdown extends LitElement {
|
|
|
3184
3194
|
|
|
3185
3195
|
disconnectedCallback() {
|
|
3186
3196
|
super.disconnectedCallback();
|
|
3197
|
+
this.floater.disconnect();
|
|
3187
3198
|
}
|
|
3188
3199
|
|
|
3189
3200
|
updated(changedProperties) {
|
|
@@ -3313,13 +3324,21 @@ class AuroDropdown extends LitElement {
|
|
|
3313
3324
|
handleTriggerContentSlotChange(event) {
|
|
3314
3325
|
this.floater.handleTriggerTabIndex();
|
|
3315
3326
|
|
|
3316
|
-
const
|
|
3327
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
3317
3328
|
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3329
|
+
if (triggerSlot) {
|
|
3330
|
+
|
|
3331
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
3332
|
+
|
|
3333
|
+
if (triggerContentNodes) {
|
|
3334
|
+
|
|
3335
|
+
triggerContentNodes.forEach((node) => {
|
|
3336
|
+
if (!this.triggerContentFocusable) {
|
|
3337
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
3338
|
+
}
|
|
3339
|
+
});
|
|
3321
3340
|
}
|
|
3322
|
-
}
|
|
3341
|
+
}
|
|
3323
3342
|
|
|
3324
3343
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3325
3344
|
|
|
@@ -3373,6 +3392,29 @@ class AuroDropdown extends LitElement {
|
|
|
3373
3392
|
}
|
|
3374
3393
|
}
|
|
3375
3394
|
|
|
3395
|
+
/**
|
|
3396
|
+
* @private
|
|
3397
|
+
* @method handleLabelSlotChange
|
|
3398
|
+
* @param {event} event - The event object representing the slot change.
|
|
3399
|
+
* @description Handles the slot change event for the label slot.
|
|
3400
|
+
*/
|
|
3401
|
+
handleLabelSlotChange (event) {
|
|
3402
|
+
|
|
3403
|
+
// Get the nodes from the event
|
|
3404
|
+
const nodes = event.target.assignedNodes();
|
|
3405
|
+
|
|
3406
|
+
// Guard clause for no nodes
|
|
3407
|
+
if (!nodes) {
|
|
3408
|
+
return;
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
3412
|
+
const nodesArr = Array.from(nodes);
|
|
3413
|
+
|
|
3414
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
3415
|
+
this.labeled = nodesArr.length > 0;
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3376
3418
|
// function that renders the HTML and CSS into the scope of the component
|
|
3377
3419
|
render() {
|
|
3378
3420
|
return html$1`
|
|
@@ -3387,7 +3429,7 @@ class AuroDropdown extends LitElement {
|
|
|
3387
3429
|
>
|
|
3388
3430
|
<div class="triggerContentWrapper">
|
|
3389
3431
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3390
|
-
<slot name="label"></slot>
|
|
3432
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
3391
3433
|
</label>
|
|
3392
3434
|
<div class="triggerContent">
|
|
3393
3435
|
<slot
|
|
@@ -2659,7 +2659,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
2659
2659
|
|
|
2660
2660
|
var dropdownVersion = '3.0.0';
|
|
2661
2661
|
|
|
2662
|
-
var styleCss$1 = css`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2662
|
+
var styleCss$1 = css`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}.label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}.trigger{position:relative;display:flex;align-items:center}.trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2663
2663
|
|
|
2664
2664
|
var colorCss$1 = css`.label{color:var(--ds-auro-dropdown-label-text-color)}.trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8);--ds-auro-dropdown-trigger-outline-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);--ds-auro-dropdown-trigger-outline-color: var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within,:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}:host([error]) .trigger:active{box-shadow:none;outline:none}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2665
2665
|
|
|
@@ -2923,6 +2923,7 @@ class AuroDropdown extends LitElement {
|
|
|
2923
2923
|
this.rounded = false;
|
|
2924
2924
|
this.tabIndex = 0;
|
|
2925
2925
|
this.noToggle = false;
|
|
2926
|
+
this.labeled = true;
|
|
2926
2927
|
|
|
2927
2928
|
/**
|
|
2928
2929
|
* @private
|
|
@@ -3075,7 +3076,7 @@ class AuroDropdown extends LitElement {
|
|
|
3075
3076
|
},
|
|
3076
3077
|
|
|
3077
3078
|
/**
|
|
3078
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
3079
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
3079
3080
|
*/
|
|
3080
3081
|
isBibFullscreen: {
|
|
3081
3082
|
type: Boolean,
|
|
@@ -3105,6 +3106,15 @@ class AuroDropdown extends LitElement {
|
|
|
3105
3106
|
reflect: true
|
|
3106
3107
|
},
|
|
3107
3108
|
|
|
3109
|
+
/**
|
|
3110
|
+
* Defines if there is a label preset.
|
|
3111
|
+
* @private
|
|
3112
|
+
*/
|
|
3113
|
+
labeled: {
|
|
3114
|
+
type: Boolean,
|
|
3115
|
+
reflect: true
|
|
3116
|
+
},
|
|
3117
|
+
|
|
3108
3118
|
/**
|
|
3109
3119
|
* If declared, the popover and trigger will be set to the same width.
|
|
3110
3120
|
*/
|
|
@@ -3184,6 +3194,7 @@ class AuroDropdown extends LitElement {
|
|
|
3184
3194
|
|
|
3185
3195
|
disconnectedCallback() {
|
|
3186
3196
|
super.disconnectedCallback();
|
|
3197
|
+
this.floater.disconnect();
|
|
3187
3198
|
}
|
|
3188
3199
|
|
|
3189
3200
|
updated(changedProperties) {
|
|
@@ -3313,13 +3324,21 @@ class AuroDropdown extends LitElement {
|
|
|
3313
3324
|
handleTriggerContentSlotChange(event) {
|
|
3314
3325
|
this.floater.handleTriggerTabIndex();
|
|
3315
3326
|
|
|
3316
|
-
const
|
|
3327
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
3317
3328
|
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3329
|
+
if (triggerSlot) {
|
|
3330
|
+
|
|
3331
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
3332
|
+
|
|
3333
|
+
if (triggerContentNodes) {
|
|
3334
|
+
|
|
3335
|
+
triggerContentNodes.forEach((node) => {
|
|
3336
|
+
if (!this.triggerContentFocusable) {
|
|
3337
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
3338
|
+
}
|
|
3339
|
+
});
|
|
3321
3340
|
}
|
|
3322
|
-
}
|
|
3341
|
+
}
|
|
3323
3342
|
|
|
3324
3343
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3325
3344
|
|
|
@@ -3373,6 +3392,29 @@ class AuroDropdown extends LitElement {
|
|
|
3373
3392
|
}
|
|
3374
3393
|
}
|
|
3375
3394
|
|
|
3395
|
+
/**
|
|
3396
|
+
* @private
|
|
3397
|
+
* @method handleLabelSlotChange
|
|
3398
|
+
* @param {event} event - The event object representing the slot change.
|
|
3399
|
+
* @description Handles the slot change event for the label slot.
|
|
3400
|
+
*/
|
|
3401
|
+
handleLabelSlotChange (event) {
|
|
3402
|
+
|
|
3403
|
+
// Get the nodes from the event
|
|
3404
|
+
const nodes = event.target.assignedNodes();
|
|
3405
|
+
|
|
3406
|
+
// Guard clause for no nodes
|
|
3407
|
+
if (!nodes) {
|
|
3408
|
+
return;
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
3412
|
+
const nodesArr = Array.from(nodes);
|
|
3413
|
+
|
|
3414
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
3415
|
+
this.labeled = nodesArr.length > 0;
|
|
3416
|
+
}
|
|
3417
|
+
|
|
3376
3418
|
// function that renders the HTML and CSS into the scope of the component
|
|
3377
3419
|
render() {
|
|
3378
3420
|
return html$1`
|
|
@@ -3387,7 +3429,7 @@ class AuroDropdown extends LitElement {
|
|
|
3387
3429
|
>
|
|
3388
3430
|
<div class="triggerContentWrapper">
|
|
3389
3431
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3390
|
-
<slot name="label"></slot>
|
|
3432
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
3391
3433
|
</label>
|
|
3392
3434
|
<div class="triggerContent">
|
|
3393
3435
|
<slot
|
|
@@ -109,7 +109,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
109
109
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
110
110
|
|
|
111
111
|
```html
|
|
112
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
112
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-form/+esm"></script>
|
|
113
113
|
```
|
|
114
114
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
115
115
|
|
|
@@ -109,7 +109,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
109
109
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
110
110
|
|
|
111
111
|
```html
|
|
112
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
112
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-form/+esm"></script>
|
|
113
113
|
```
|
|
114
114
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
115
115
|
|
|
@@ -99,7 +99,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
99
99
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
100
100
|
|
|
101
101
|
```html
|
|
102
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
102
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-input/+esm"></script>
|
|
103
103
|
```
|
|
104
104
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
105
|
|
|
@@ -99,7 +99,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
99
99
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
100
100
|
|
|
101
101
|
```html
|
|
102
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
102
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-input/+esm"></script>
|
|
103
103
|
```
|
|
104
104
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
105
|
|
|
@@ -110,7 +110,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
110
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-menu/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -110,7 +110,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
110
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-menu/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -100,7 +100,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
100
100
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
103
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-radio/+esm"></script>
|
|
104
104
|
```
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
@@ -100,7 +100,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
100
100
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
103
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-radio/+esm"></script>
|
|
104
104
|
```
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
@@ -85,6 +85,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
85
85
|
```html
|
|
86
86
|
<auro-select>
|
|
87
87
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
88
|
+
<span slot="label">Select Example</span>
|
|
88
89
|
<auro-menu>
|
|
89
90
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
90
91
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -110,7 +111,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
111
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
112
|
|
|
112
113
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.
|
|
114
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.3/auro-select/+esm"></script>
|
|
114
115
|
```
|
|
115
116
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
117
|
|
|
@@ -75,6 +75,7 @@ A baseline `auro-select` using `auro-menu` and `auro-menuoption` elements.
|
|
|
75
75
|
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
76
76
|
<auro-select>
|
|
77
77
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
78
|
+
<span slot="label">Select Example</span>
|
|
78
79
|
<auro-menu>
|
|
79
80
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
80
81
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -94,6 +95,7 @@ A baseline `auro-select` using `auro-menu` and `auro-menuoption` elements.
|
|
|
94
95
|
```html
|
|
95
96
|
<auro-select>
|
|
96
97
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
98
|
+
<span slot="label">Select Example</span>
|
|
97
99
|
<auro-menu>
|
|
98
100
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
99
101
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -186,6 +188,7 @@ When the validity check fails the validityState, equals `valueMissing`. The erro
|
|
|
186
188
|
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
187
189
|
<auro-select required setCustomValidityValueMissing="Custom required validation error message.">
|
|
188
190
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
191
|
+
<span slot="label">required field</span>
|
|
189
192
|
<label slot="placeholder">Placeholder Text</label>
|
|
190
193
|
<auro-menu>
|
|
191
194
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
@@ -206,6 +209,7 @@ When the validity check fails the validityState, equals `valueMissing`. The erro
|
|
|
206
209
|
```html
|
|
207
210
|
<auro-select required setCustomValidityValueMissing="Custom required validation error message.">
|
|
208
211
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
212
|
+
<span slot="label">required field</span>
|
|
209
213
|
<label slot="placeholder">Placeholder Text</label>
|
|
210
214
|
<auro-menu>
|
|
211
215
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
@@ -234,6 +238,7 @@ A custom error message can be set using the `error` attribute, or it can be used
|
|
|
234
238
|
<auro-select id="errorExample" error="Custom error message">
|
|
235
239
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
236
240
|
<label slot="placeholder">Placeholder Text</label>
|
|
241
|
+
<span slot="label">error Select Example</span>
|
|
237
242
|
<auro-menu>
|
|
238
243
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
239
244
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -257,6 +262,7 @@ A custom error message can be set using the `error` attribute, or it can be used
|
|
|
257
262
|
<auro-select id="errorExample" error="Custom error message">
|
|
258
263
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
259
264
|
<label slot="placeholder">Placeholder Text</label>
|
|
265
|
+
<span slot="label">error Select Example</span>
|
|
260
266
|
<auro-menu>
|
|
261
267
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
262
268
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -279,6 +285,7 @@ Use the `disabled` boolean attribute to toggle the disabled UI.
|
|
|
279
285
|
<auro-select disabled>
|
|
280
286
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
281
287
|
<label slot="placeholder">Placeholder Text</label>
|
|
288
|
+
<span slot="label">disabled select example</span>
|
|
282
289
|
<auro-menu>
|
|
283
290
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
284
291
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -299,6 +306,7 @@ Use the `disabled` boolean attribute to toggle the disabled UI.
|
|
|
299
306
|
<auro-select disabled>
|
|
300
307
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
301
308
|
<label slot="placeholder">Placeholder Text</label>
|
|
309
|
+
<span slot="label">disabled select example</span>
|
|
302
310
|
<auro-menu>
|
|
303
311
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
304
312
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -321,6 +329,7 @@ Sets multi-select mode, allowing multiple options to be selected at once.
|
|
|
321
329
|
<auro-select multiselect>
|
|
322
330
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
323
331
|
<label slot="placeholder">Select one or more options</label>
|
|
332
|
+
<span slot="label">multiselect select example</span>
|
|
324
333
|
<auro-menu>
|
|
325
334
|
<auro-menuoption value="1">Option 1</auro-menuoption>
|
|
326
335
|
<auro-menuoption value="2">Option 2</auro-menuoption>
|
|
@@ -338,6 +347,7 @@ Sets multi-select mode, allowing multiple options to be selected at once.
|
|
|
338
347
|
<auro-select multiselect>
|
|
339
348
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
340
349
|
<label slot="placeholder">Select one or more options</label>
|
|
350
|
+
<span slot="label">multiselect select example</span>
|
|
341
351
|
<auro-menu>
|
|
342
352
|
<auro-menuoption value="1">Option 1</auro-menuoption>
|
|
343
353
|
<auro-menuoption value="2">Option 2</auro-menuoption>
|
|
@@ -355,6 +365,7 @@ Use the `flexMenuWidth` boolean attribute to toggle the width of the `<auro-sele
|
|
|
355
365
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../apiExamples/flexMenuWidth.html) -->
|
|
356
366
|
<!-- The below content is automatically added from ../apiExamples/flexMenuWidth.html -->
|
|
357
367
|
<auro-select flexMenuWidth id="flexMenuWidthExample">
|
|
368
|
+
<span slot="label">flexMenuWidth select example</span>
|
|
358
369
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
359
370
|
<label slot="placeholder">Placeholder Text</label>
|
|
360
371
|
<auro-menu>
|
|
@@ -379,6 +390,7 @@ Use the `flexMenuWidth` boolean attribute to toggle the width of the `<auro-sele
|
|
|
379
390
|
|
|
380
391
|
```html
|
|
381
392
|
<auro-select flexMenuWidth id="flexMenuWidthExample">
|
|
393
|
+
<span slot="label">flexMenuWidth select example</span>
|
|
382
394
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
383
395
|
<label slot="placeholder">Placeholder Text</label>
|
|
384
396
|
<auro-menu>
|
|
@@ -452,6 +464,7 @@ Use the `helptext` slot to provide additional information back to your user abou
|
|
|
452
464
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
453
465
|
<label slot="placeholder">Placeholder Text</label>
|
|
454
466
|
<span slot="helpText">Custom help text message.</span>
|
|
467
|
+
<span slot="label">helpText select example</span>
|
|
455
468
|
<auro-menu>
|
|
456
469
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
457
470
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -473,6 +486,7 @@ Use the `helptext` slot to provide additional information back to your user abou
|
|
|
473
486
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
474
487
|
<label slot="placeholder">Placeholder Text</label>
|
|
475
488
|
<span slot="helpText">Custom help text message.</span>
|
|
489
|
+
<span slot="label">helpText select example</span>
|
|
476
490
|
<auro-menu>
|
|
477
491
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
478
492
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -560,6 +574,7 @@ The following example illustrates how a user may query the `element.value` or `e
|
|
|
560
574
|
<auro-select id="valueExtraction">
|
|
561
575
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
562
576
|
<label slot="placeholder">Placeholder Text</label>
|
|
577
|
+
<span slot="label">Select Example</span>
|
|
563
578
|
<auro-menu>
|
|
564
579
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
565
580
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -581,6 +596,7 @@ The following example illustrates how a user may query the `element.value` or `e
|
|
|
581
596
|
<auro-select id="valueExtraction">
|
|
582
597
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
583
598
|
<label slot="placeholder">Placeholder Text</label>
|
|
599
|
+
<span slot="label">Select Example</span>
|
|
584
600
|
<auro-menu>
|
|
585
601
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
586
602
|
<auro-menuoption value="price">Price</auro-menuoption>
|
|
@@ -622,6 +638,7 @@ This example programmatically adds the `error` state when a user selects an opti
|
|
|
622
638
|
<auro-select id="primaryError">
|
|
623
639
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
624
640
|
<label slot="placeholder">Placeholder Text</label>
|
|
641
|
+
<span slot="label">Select Example</span>
|
|
625
642
|
<auro-menu>
|
|
626
643
|
<auro-menuoption value="1">1</auro-menuoption>
|
|
627
644
|
<auro-menuoption value="2">2</auro-menuoption>
|
|
@@ -642,6 +659,7 @@ This example programmatically adds the `error` state when a user selects an opti
|
|
|
642
659
|
<auro-select id="primaryError">
|
|
643
660
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
644
661
|
<label slot="placeholder">Placeholder Text</label>
|
|
662
|
+
<span slot="label">Select Example</span>
|
|
645
663
|
<auro-menu>
|
|
646
664
|
<auro-menuoption value="1">1</auro-menuoption>
|
|
647
665
|
<auro-menuoption value="2">2</auro-menuoption>
|
|
@@ -754,6 +772,7 @@ To support fullcreen bib, setting `bib.fullscreen.headline` is **STRONGLY RECOMM
|
|
|
754
772
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/fullscreenBreakpoint.html) -->
|
|
755
773
|
<!-- The below content is automatically added from ./../apiExamples/fullscreenBreakpoint.html -->
|
|
756
774
|
<auro-select fullscreenBreakpoint="lg">
|
|
775
|
+
<span slot="label">Select Example</span>
|
|
757
776
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
758
777
|
<auro-menu>
|
|
759
778
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
@@ -773,6 +792,7 @@ To support fullcreen bib, setting `bib.fullscreen.headline` is **STRONGLY RECOMM
|
|
|
773
792
|
|
|
774
793
|
```html
|
|
775
794
|
<auro-select fullscreenBreakpoint="lg">
|
|
795
|
+
<span slot="label">Select Example</span>
|
|
776
796
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
777
797
|
<auro-menu>
|
|
778
798
|
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
@@ -866,6 +886,7 @@ The following example listens for the `auroMenu-selectedOption` event. Once trig
|
|
|
866
886
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueAlert.html) -->
|
|
867
887
|
<!-- The below content is automatically added from ./../apiExamples/valueAlert.html -->
|
|
868
888
|
<auro-select id="valueAlert">
|
|
889
|
+
<span slot="label">Select Example</span>
|
|
869
890
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
870
891
|
<label slot="placeholder">Placeholder Text</label>
|
|
871
892
|
<auro-menu id="valueAlertMenu">
|
|
@@ -886,6 +907,7 @@ The following example listens for the `auroMenu-selectedOption` event. Once trig
|
|
|
886
907
|
|
|
887
908
|
```html
|
|
888
909
|
<auro-select id="valueAlert">
|
|
910
|
+
<span slot="label">Select Example</span>
|
|
889
911
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
890
912
|
<label slot="placeholder">Placeholder Text</label>
|
|
891
913
|
<auro-menu id="valueAlertMenu">
|