@aurodesignsystem/auro-formkit 2.1.0 → 2.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -2
- package/components/bibtemplate/dist/index.js +2 -2
- package/components/bibtemplate/dist/registered.js +2 -2
- 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.md +122 -19
- package/components/combobox/demo/api.min.js +160 -24
- package/components/combobox/demo/index.min.js +160 -24
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +42 -0
- package/components/combobox/dist/index.js +160 -24
- package/components/combobox/dist/registered.js +160 -24
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.md +113 -10
- package/components/counter/demo/api.min.js +178 -47
- package/components/counter/demo/index.min.js +178 -47
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/auro-counter-group.d.ts +55 -17
- package/components/counter/dist/index.js +178 -47
- package/components/counter/dist/registered.js +178 -47
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +61 -0
- package/components/datepicker/demo/api.min.js +162 -25
- package/components/datepicker/demo/index.min.js +162 -25
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +42 -0
- package/components/datepicker/dist/index.js +162 -25
- package/components/datepicker/dist/registered.js +162 -25
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +166 -19
- package/components/dropdown/demo/api.min.js +106 -22
- package/components/dropdown/demo/index.min.js +106 -22
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +63 -7
- package/components/dropdown/dist/index.js +106 -22
- package/components/dropdown/dist/registered.js +106 -22
- 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 +142 -17
- package/components/select/demo/api.min.js +160 -24
- package/components/select/demo/index.md +14 -0
- package/components/select/demo/index.min.js +160 -24
- package/components/select/demo/readme.md +2 -1
- package/components/select/dist/auro-select.d.ts +42 -0
- package/components/select/dist/index.js +160 -24
- package/components/select/dist/registered.js +160 -24
- package/package.json +1 -1
|
@@ -3081,7 +3081,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
3081
3081
|
|
|
3082
3082
|
var dropdownVersion$1 = '3.0.0';
|
|
3083
3083
|
|
|
3084
|
-
var styleCss$1$2 = 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)}`;
|
|
3084
|
+
var styleCss$1$2 = 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)}`;
|
|
3085
3085
|
|
|
3086
3086
|
var colorCss$1$2 = 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)}`;
|
|
3087
3087
|
|
|
@@ -3341,10 +3341,16 @@ class AuroDropdown extends LitElement {
|
|
|
3341
3341
|
this.disabled = false;
|
|
3342
3342
|
this.error = false;
|
|
3343
3343
|
this.inset = false;
|
|
3344
|
-
this.placement = 'bottom-start';
|
|
3345
3344
|
this.rounded = false;
|
|
3346
3345
|
this.tabIndex = 0;
|
|
3347
3346
|
this.noToggle = false;
|
|
3347
|
+
this.labeled = true;
|
|
3348
|
+
|
|
3349
|
+
// floaterConfig
|
|
3350
|
+
this.placement = 'bottom-start';
|
|
3351
|
+
this.offset = 0;
|
|
3352
|
+
this.noFlip = false;
|
|
3353
|
+
this.autoPlacement = false;
|
|
3348
3354
|
|
|
3349
3355
|
/**
|
|
3350
3356
|
* @private
|
|
@@ -3366,16 +3372,6 @@ class AuroDropdown extends LitElement {
|
|
|
3366
3372
|
*/
|
|
3367
3373
|
this.floater = new AuroFloatingUI();
|
|
3368
3374
|
|
|
3369
|
-
/**
|
|
3370
|
-
* @private
|
|
3371
|
-
*/
|
|
3372
|
-
this.floaterConfig = {
|
|
3373
|
-
placement: 'bottom-start',
|
|
3374
|
-
flip: true,
|
|
3375
|
-
autoPlacement: false,
|
|
3376
|
-
offset: 0,
|
|
3377
|
-
};
|
|
3378
|
-
|
|
3379
3375
|
/**
|
|
3380
3376
|
* Generate unique names for dependency components.
|
|
3381
3377
|
*/
|
|
@@ -3397,6 +3393,18 @@ class AuroDropdown extends LitElement {
|
|
|
3397
3393
|
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
3398
3394
|
}
|
|
3399
3395
|
|
|
3396
|
+
/**
|
|
3397
|
+
* @ignore
|
|
3398
|
+
*/
|
|
3399
|
+
get floaterConfig() {
|
|
3400
|
+
return {
|
|
3401
|
+
placement: this.placement,
|
|
3402
|
+
flip: !this.noFlip,
|
|
3403
|
+
autoPlacement: this.autoPlacement,
|
|
3404
|
+
offset: this.offset,
|
|
3405
|
+
};
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3400
3408
|
/**
|
|
3401
3409
|
* Public method to hide the dropdown.
|
|
3402
3410
|
* @returns {void}
|
|
@@ -3417,6 +3425,15 @@ class AuroDropdown extends LitElement {
|
|
|
3417
3425
|
static get properties() {
|
|
3418
3426
|
return {
|
|
3419
3427
|
|
|
3428
|
+
/**
|
|
3429
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
3430
|
+
* @default false
|
|
3431
|
+
*/
|
|
3432
|
+
autoPlacement: {
|
|
3433
|
+
type: Boolean,
|
|
3434
|
+
reflect: true
|
|
3435
|
+
},
|
|
3436
|
+
|
|
3420
3437
|
/**
|
|
3421
3438
|
* If declared, applies a border around the trigger slot.
|
|
3422
3439
|
*/
|
|
@@ -3497,11 +3514,11 @@ class AuroDropdown extends LitElement {
|
|
|
3497
3514
|
},
|
|
3498
3515
|
|
|
3499
3516
|
/**
|
|
3500
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
3517
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
3501
3518
|
*/
|
|
3502
3519
|
isBibFullscreen: {
|
|
3503
3520
|
type: Boolean,
|
|
3504
|
-
reflect: true
|
|
3521
|
+
reflect: true
|
|
3505
3522
|
},
|
|
3506
3523
|
|
|
3507
3524
|
/**
|
|
@@ -3527,6 +3544,15 @@ class AuroDropdown extends LitElement {
|
|
|
3527
3544
|
reflect: true
|
|
3528
3545
|
},
|
|
3529
3546
|
|
|
3547
|
+
/**
|
|
3548
|
+
* Defines if there is a label preset.
|
|
3549
|
+
* @private
|
|
3550
|
+
*/
|
|
3551
|
+
labeled: {
|
|
3552
|
+
type: Boolean,
|
|
3553
|
+
reflect: true
|
|
3554
|
+
},
|
|
3555
|
+
|
|
3530
3556
|
/**
|
|
3531
3557
|
* If declared, the popover and trigger will be set to the same width.
|
|
3532
3558
|
*/
|
|
@@ -3535,6 +3561,16 @@ class AuroDropdown extends LitElement {
|
|
|
3535
3561
|
reflect: true
|
|
3536
3562
|
},
|
|
3537
3563
|
|
|
3564
|
+
/**
|
|
3565
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
3566
|
+
* when there isn't enough space in the specified `placement`.
|
|
3567
|
+
* @default false
|
|
3568
|
+
*/
|
|
3569
|
+
noFlip: {
|
|
3570
|
+
type: Boolean,
|
|
3571
|
+
reflect: true
|
|
3572
|
+
},
|
|
3573
|
+
|
|
3538
3574
|
/**
|
|
3539
3575
|
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3540
3576
|
*/
|
|
@@ -3551,16 +3587,32 @@ class AuroDropdown extends LitElement {
|
|
|
3551
3587
|
reflect: true
|
|
3552
3588
|
},
|
|
3553
3589
|
|
|
3590
|
+
/**
|
|
3591
|
+
* Gap between the trigger element and bib.
|
|
3592
|
+
* @default 0
|
|
3593
|
+
*/
|
|
3594
|
+
offset: {
|
|
3595
|
+
type: Number,
|
|
3596
|
+
reflect: true
|
|
3597
|
+
},
|
|
3598
|
+
|
|
3554
3599
|
onSlotChange: {
|
|
3555
3600
|
type: Function,
|
|
3556
3601
|
reflect: false
|
|
3557
3602
|
},
|
|
3558
3603
|
|
|
3559
3604
|
/**
|
|
3560
|
-
*
|
|
3605
|
+
* Position where the bib should appear relative to the trigger.
|
|
3606
|
+
* Accepted values:
|
|
3607
|
+
* "top" | "right" | "bottom" | "left" |
|
|
3608
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
3609
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
3610
|
+
* "left-start" | "left-end"
|
|
3611
|
+
* @default bottom-start
|
|
3561
3612
|
*/
|
|
3562
3613
|
placement: {
|
|
3563
|
-
type: String
|
|
3614
|
+
type: String,
|
|
3615
|
+
reflect: true
|
|
3564
3616
|
},
|
|
3565
3617
|
|
|
3566
3618
|
/**
|
|
@@ -3606,6 +3658,7 @@ class AuroDropdown extends LitElement {
|
|
|
3606
3658
|
|
|
3607
3659
|
disconnectedCallback() {
|
|
3608
3660
|
super.disconnectedCallback();
|
|
3661
|
+
this.floater.disconnect();
|
|
3609
3662
|
}
|
|
3610
3663
|
|
|
3611
3664
|
updated(changedProperties) {
|
|
@@ -3735,13 +3788,21 @@ class AuroDropdown extends LitElement {
|
|
|
3735
3788
|
handleTriggerContentSlotChange(event) {
|
|
3736
3789
|
this.floater.handleTriggerTabIndex();
|
|
3737
3790
|
|
|
3738
|
-
const
|
|
3791
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
3792
|
+
|
|
3793
|
+
if (triggerSlot) {
|
|
3794
|
+
|
|
3795
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
3739
3796
|
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3797
|
+
if (triggerContentNodes) {
|
|
3798
|
+
|
|
3799
|
+
triggerContentNodes.forEach((node) => {
|
|
3800
|
+
if (!this.triggerContentFocusable) {
|
|
3801
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
3802
|
+
}
|
|
3803
|
+
});
|
|
3743
3804
|
}
|
|
3744
|
-
}
|
|
3805
|
+
}
|
|
3745
3806
|
|
|
3746
3807
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3747
3808
|
|
|
@@ -3795,6 +3856,29 @@ class AuroDropdown extends LitElement {
|
|
|
3795
3856
|
}
|
|
3796
3857
|
}
|
|
3797
3858
|
|
|
3859
|
+
/**
|
|
3860
|
+
* @private
|
|
3861
|
+
* @method handleLabelSlotChange
|
|
3862
|
+
* @param {event} event - The event object representing the slot change.
|
|
3863
|
+
* @description Handles the slot change event for the label slot.
|
|
3864
|
+
*/
|
|
3865
|
+
handleLabelSlotChange (event) {
|
|
3866
|
+
|
|
3867
|
+
// Get the nodes from the event
|
|
3868
|
+
const nodes = event.target.assignedNodes();
|
|
3869
|
+
|
|
3870
|
+
// Guard clause for no nodes
|
|
3871
|
+
if (!nodes) {
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
3876
|
+
const nodesArr = Array.from(nodes);
|
|
3877
|
+
|
|
3878
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
3879
|
+
this.labeled = nodesArr.length > 0;
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3798
3882
|
// function that renders the HTML and CSS into the scope of the component
|
|
3799
3883
|
render() {
|
|
3800
3884
|
return html`
|
|
@@ -3809,7 +3893,7 @@ class AuroDropdown extends LitElement {
|
|
|
3809
3893
|
>
|
|
3810
3894
|
<div class="triggerContentWrapper">
|
|
3811
3895
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3812
|
-
<slot name="label"></slot>
|
|
3896
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
3813
3897
|
</label>
|
|
3814
3898
|
<div class="triggerContent">
|
|
3815
3899
|
<slot
|
|
@@ -11530,11 +11614,11 @@ class AuroBibtemplate extends LitElement {
|
|
|
11530
11614
|
return {
|
|
11531
11615
|
isFullscreen: {
|
|
11532
11616
|
type: Boolean,
|
|
11533
|
-
reflect: true
|
|
11617
|
+
reflect: true
|
|
11534
11618
|
},
|
|
11535
11619
|
large: {
|
|
11536
11620
|
type: Boolean,
|
|
11537
|
-
reflect: true
|
|
11621
|
+
reflect: true
|
|
11538
11622
|
}
|
|
11539
11623
|
};
|
|
11540
11624
|
}
|
|
@@ -11783,6 +11867,12 @@ class AuroCombobox extends LitElement {
|
|
|
11783
11867
|
|
|
11784
11868
|
this.isHiddenWhileLoading = false;
|
|
11785
11869
|
|
|
11870
|
+
// floaterConfig
|
|
11871
|
+
this.placement = 'bottom-start';
|
|
11872
|
+
this.offset = 0;
|
|
11873
|
+
this.noFlip = false;
|
|
11874
|
+
this.autoPlacement = false;
|
|
11875
|
+
|
|
11786
11876
|
const versioning = new AuroDependencyVersioning$4();
|
|
11787
11877
|
|
|
11788
11878
|
this.dropdownTag = versioning.generateTag('auro-formkit-checkbox-dropdown', dropdownVersion, AuroDropdown);
|
|
@@ -11799,12 +11889,21 @@ class AuroCombobox extends LitElement {
|
|
|
11799
11889
|
|
|
11800
11890
|
/**
|
|
11801
11891
|
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
11892
|
+
* @default false
|
|
11802
11893
|
*/
|
|
11803
11894
|
autocomplete: {
|
|
11804
11895
|
type: String,
|
|
11805
11896
|
reflect: true
|
|
11806
11897
|
},
|
|
11807
11898
|
|
|
11899
|
+
/**
|
|
11900
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
11901
|
+
*/
|
|
11902
|
+
autoPlacement: {
|
|
11903
|
+
type: Boolean,
|
|
11904
|
+
reflect: true
|
|
11905
|
+
},
|
|
11906
|
+
|
|
11808
11907
|
/**
|
|
11809
11908
|
* When attribute is present auro-menu will apply checkmarks to selected options.
|
|
11810
11909
|
*/
|
|
@@ -11837,6 +11936,16 @@ class AuroCombobox extends LitElement {
|
|
|
11837
11936
|
reflect: true
|
|
11838
11937
|
},
|
|
11839
11938
|
|
|
11939
|
+
/**
|
|
11940
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
11941
|
+
* when there isn't enough space in the specified `placement`.
|
|
11942
|
+
* @default false
|
|
11943
|
+
*/
|
|
11944
|
+
noFlip: {
|
|
11945
|
+
type: Boolean,
|
|
11946
|
+
reflect: true
|
|
11947
|
+
},
|
|
11948
|
+
|
|
11840
11949
|
/**
|
|
11841
11950
|
* If set, disables auto-validation on blur.
|
|
11842
11951
|
*/
|
|
@@ -11844,6 +11953,15 @@ class AuroCombobox extends LitElement {
|
|
|
11844
11953
|
type: Boolean
|
|
11845
11954
|
},
|
|
11846
11955
|
|
|
11956
|
+
/**
|
|
11957
|
+
* Gap between the trigger element and bib.
|
|
11958
|
+
* @default 0
|
|
11959
|
+
*/
|
|
11960
|
+
offset: {
|
|
11961
|
+
type: Number,
|
|
11962
|
+
reflect: true
|
|
11963
|
+
},
|
|
11964
|
+
|
|
11847
11965
|
/**
|
|
11848
11966
|
* Specifies the current selected option.
|
|
11849
11967
|
*/
|
|
@@ -11853,6 +11971,20 @@ class AuroCombobox extends LitElement {
|
|
|
11853
11971
|
hasChanged: arrayOrUndefinedHasChanged
|
|
11854
11972
|
},
|
|
11855
11973
|
|
|
11974
|
+
/**
|
|
11975
|
+
* Position where the bib should appear relative to the trigger.
|
|
11976
|
+
* Accepted values:
|
|
11977
|
+
* "top" | "right" | "bottom" | "left" |
|
|
11978
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
11979
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
11980
|
+
* "left-start" | "left-end"
|
|
11981
|
+
* @default bottom-start
|
|
11982
|
+
*/
|
|
11983
|
+
placement: {
|
|
11984
|
+
type: String,
|
|
11985
|
+
reflect: true
|
|
11986
|
+
},
|
|
11987
|
+
|
|
11856
11988
|
/**
|
|
11857
11989
|
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
11858
11990
|
*/
|
|
@@ -12620,6 +12752,10 @@ class AuroCombobox extends LitElement {
|
|
|
12620
12752
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
12621
12753
|
?disabled="${this.disabled}"
|
|
12622
12754
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
12755
|
+
.placement="${this.placement}"
|
|
12756
|
+
.offset="${this.offset}"
|
|
12757
|
+
?autoPlacement="${this.autoPlacement}"
|
|
12758
|
+
?noFlip="${this.noFlip}"
|
|
12623
12759
|
disableEventShow>
|
|
12624
12760
|
<${this.inputTag}
|
|
12625
12761
|
slot="trigger"
|
|
@@ -3081,7 +3081,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
3081
3081
|
|
|
3082
3082
|
var dropdownVersion$1 = '3.0.0';
|
|
3083
3083
|
|
|
3084
|
-
var styleCss$1$2 = 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)}`;
|
|
3084
|
+
var styleCss$1$2 = 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)}`;
|
|
3085
3085
|
|
|
3086
3086
|
var colorCss$1$2 = 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)}`;
|
|
3087
3087
|
|
|
@@ -3341,10 +3341,16 @@ class AuroDropdown extends LitElement {
|
|
|
3341
3341
|
this.disabled = false;
|
|
3342
3342
|
this.error = false;
|
|
3343
3343
|
this.inset = false;
|
|
3344
|
-
this.placement = 'bottom-start';
|
|
3345
3344
|
this.rounded = false;
|
|
3346
3345
|
this.tabIndex = 0;
|
|
3347
3346
|
this.noToggle = false;
|
|
3347
|
+
this.labeled = true;
|
|
3348
|
+
|
|
3349
|
+
// floaterConfig
|
|
3350
|
+
this.placement = 'bottom-start';
|
|
3351
|
+
this.offset = 0;
|
|
3352
|
+
this.noFlip = false;
|
|
3353
|
+
this.autoPlacement = false;
|
|
3348
3354
|
|
|
3349
3355
|
/**
|
|
3350
3356
|
* @private
|
|
@@ -3366,16 +3372,6 @@ class AuroDropdown extends LitElement {
|
|
|
3366
3372
|
*/
|
|
3367
3373
|
this.floater = new AuroFloatingUI();
|
|
3368
3374
|
|
|
3369
|
-
/**
|
|
3370
|
-
* @private
|
|
3371
|
-
*/
|
|
3372
|
-
this.floaterConfig = {
|
|
3373
|
-
placement: 'bottom-start',
|
|
3374
|
-
flip: true,
|
|
3375
|
-
autoPlacement: false,
|
|
3376
|
-
offset: 0,
|
|
3377
|
-
};
|
|
3378
|
-
|
|
3379
3375
|
/**
|
|
3380
3376
|
* Generate unique names for dependency components.
|
|
3381
3377
|
*/
|
|
@@ -3397,6 +3393,18 @@ class AuroDropdown extends LitElement {
|
|
|
3397
3393
|
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
3398
3394
|
}
|
|
3399
3395
|
|
|
3396
|
+
/**
|
|
3397
|
+
* @ignore
|
|
3398
|
+
*/
|
|
3399
|
+
get floaterConfig() {
|
|
3400
|
+
return {
|
|
3401
|
+
placement: this.placement,
|
|
3402
|
+
flip: !this.noFlip,
|
|
3403
|
+
autoPlacement: this.autoPlacement,
|
|
3404
|
+
offset: this.offset,
|
|
3405
|
+
};
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3400
3408
|
/**
|
|
3401
3409
|
* Public method to hide the dropdown.
|
|
3402
3410
|
* @returns {void}
|
|
@@ -3417,6 +3425,15 @@ class AuroDropdown extends LitElement {
|
|
|
3417
3425
|
static get properties() {
|
|
3418
3426
|
return {
|
|
3419
3427
|
|
|
3428
|
+
/**
|
|
3429
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
3430
|
+
* @default false
|
|
3431
|
+
*/
|
|
3432
|
+
autoPlacement: {
|
|
3433
|
+
type: Boolean,
|
|
3434
|
+
reflect: true
|
|
3435
|
+
},
|
|
3436
|
+
|
|
3420
3437
|
/**
|
|
3421
3438
|
* If declared, applies a border around the trigger slot.
|
|
3422
3439
|
*/
|
|
@@ -3497,11 +3514,11 @@ class AuroDropdown extends LitElement {
|
|
|
3497
3514
|
},
|
|
3498
3515
|
|
|
3499
3516
|
/**
|
|
3500
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
3517
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
3501
3518
|
*/
|
|
3502
3519
|
isBibFullscreen: {
|
|
3503
3520
|
type: Boolean,
|
|
3504
|
-
reflect: true
|
|
3521
|
+
reflect: true
|
|
3505
3522
|
},
|
|
3506
3523
|
|
|
3507
3524
|
/**
|
|
@@ -3527,6 +3544,15 @@ class AuroDropdown extends LitElement {
|
|
|
3527
3544
|
reflect: true
|
|
3528
3545
|
},
|
|
3529
3546
|
|
|
3547
|
+
/**
|
|
3548
|
+
* Defines if there is a label preset.
|
|
3549
|
+
* @private
|
|
3550
|
+
*/
|
|
3551
|
+
labeled: {
|
|
3552
|
+
type: Boolean,
|
|
3553
|
+
reflect: true
|
|
3554
|
+
},
|
|
3555
|
+
|
|
3530
3556
|
/**
|
|
3531
3557
|
* If declared, the popover and trigger will be set to the same width.
|
|
3532
3558
|
*/
|
|
@@ -3535,6 +3561,16 @@ class AuroDropdown extends LitElement {
|
|
|
3535
3561
|
reflect: true
|
|
3536
3562
|
},
|
|
3537
3563
|
|
|
3564
|
+
/**
|
|
3565
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
3566
|
+
* when there isn't enough space in the specified `placement`.
|
|
3567
|
+
* @default false
|
|
3568
|
+
*/
|
|
3569
|
+
noFlip: {
|
|
3570
|
+
type: Boolean,
|
|
3571
|
+
reflect: true
|
|
3572
|
+
},
|
|
3573
|
+
|
|
3538
3574
|
/**
|
|
3539
3575
|
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
3540
3576
|
*/
|
|
@@ -3551,16 +3587,32 @@ class AuroDropdown extends LitElement {
|
|
|
3551
3587
|
reflect: true
|
|
3552
3588
|
},
|
|
3553
3589
|
|
|
3590
|
+
/**
|
|
3591
|
+
* Gap between the trigger element and bib.
|
|
3592
|
+
* @default 0
|
|
3593
|
+
*/
|
|
3594
|
+
offset: {
|
|
3595
|
+
type: Number,
|
|
3596
|
+
reflect: true
|
|
3597
|
+
},
|
|
3598
|
+
|
|
3554
3599
|
onSlotChange: {
|
|
3555
3600
|
type: Function,
|
|
3556
3601
|
reflect: false
|
|
3557
3602
|
},
|
|
3558
3603
|
|
|
3559
3604
|
/**
|
|
3560
|
-
*
|
|
3605
|
+
* Position where the bib should appear relative to the trigger.
|
|
3606
|
+
* Accepted values:
|
|
3607
|
+
* "top" | "right" | "bottom" | "left" |
|
|
3608
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
3609
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
3610
|
+
* "left-start" | "left-end"
|
|
3611
|
+
* @default bottom-start
|
|
3561
3612
|
*/
|
|
3562
3613
|
placement: {
|
|
3563
|
-
type: String
|
|
3614
|
+
type: String,
|
|
3615
|
+
reflect: true
|
|
3564
3616
|
},
|
|
3565
3617
|
|
|
3566
3618
|
/**
|
|
@@ -3606,6 +3658,7 @@ class AuroDropdown extends LitElement {
|
|
|
3606
3658
|
|
|
3607
3659
|
disconnectedCallback() {
|
|
3608
3660
|
super.disconnectedCallback();
|
|
3661
|
+
this.floater.disconnect();
|
|
3609
3662
|
}
|
|
3610
3663
|
|
|
3611
3664
|
updated(changedProperties) {
|
|
@@ -3735,13 +3788,21 @@ class AuroDropdown extends LitElement {
|
|
|
3735
3788
|
handleTriggerContentSlotChange(event) {
|
|
3736
3789
|
this.floater.handleTriggerTabIndex();
|
|
3737
3790
|
|
|
3738
|
-
const
|
|
3791
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
3792
|
+
|
|
3793
|
+
if (triggerSlot) {
|
|
3794
|
+
|
|
3795
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
3739
3796
|
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3797
|
+
if (triggerContentNodes) {
|
|
3798
|
+
|
|
3799
|
+
triggerContentNodes.forEach((node) => {
|
|
3800
|
+
if (!this.triggerContentFocusable) {
|
|
3801
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
3802
|
+
}
|
|
3803
|
+
});
|
|
3743
3804
|
}
|
|
3744
|
-
}
|
|
3805
|
+
}
|
|
3745
3806
|
|
|
3746
3807
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3747
3808
|
|
|
@@ -3795,6 +3856,29 @@ class AuroDropdown extends LitElement {
|
|
|
3795
3856
|
}
|
|
3796
3857
|
}
|
|
3797
3858
|
|
|
3859
|
+
/**
|
|
3860
|
+
* @private
|
|
3861
|
+
* @method handleLabelSlotChange
|
|
3862
|
+
* @param {event} event - The event object representing the slot change.
|
|
3863
|
+
* @description Handles the slot change event for the label slot.
|
|
3864
|
+
*/
|
|
3865
|
+
handleLabelSlotChange (event) {
|
|
3866
|
+
|
|
3867
|
+
// Get the nodes from the event
|
|
3868
|
+
const nodes = event.target.assignedNodes();
|
|
3869
|
+
|
|
3870
|
+
// Guard clause for no nodes
|
|
3871
|
+
if (!nodes) {
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
3876
|
+
const nodesArr = Array.from(nodes);
|
|
3877
|
+
|
|
3878
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
3879
|
+
this.labeled = nodesArr.length > 0;
|
|
3880
|
+
}
|
|
3881
|
+
|
|
3798
3882
|
// function that renders the HTML and CSS into the scope of the component
|
|
3799
3883
|
render() {
|
|
3800
3884
|
return html`
|
|
@@ -3809,7 +3893,7 @@ class AuroDropdown extends LitElement {
|
|
|
3809
3893
|
>
|
|
3810
3894
|
<div class="triggerContentWrapper">
|
|
3811
3895
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3812
|
-
<slot name="label"></slot>
|
|
3896
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
3813
3897
|
</label>
|
|
3814
3898
|
<div class="triggerContent">
|
|
3815
3899
|
<slot
|
|
@@ -11530,11 +11614,11 @@ class AuroBibtemplate extends LitElement {
|
|
|
11530
11614
|
return {
|
|
11531
11615
|
isFullscreen: {
|
|
11532
11616
|
type: Boolean,
|
|
11533
|
-
reflect: true
|
|
11617
|
+
reflect: true
|
|
11534
11618
|
},
|
|
11535
11619
|
large: {
|
|
11536
11620
|
type: Boolean,
|
|
11537
|
-
reflect: true
|
|
11621
|
+
reflect: true
|
|
11538
11622
|
}
|
|
11539
11623
|
};
|
|
11540
11624
|
}
|
|
@@ -11783,6 +11867,12 @@ class AuroCombobox extends LitElement {
|
|
|
11783
11867
|
|
|
11784
11868
|
this.isHiddenWhileLoading = false;
|
|
11785
11869
|
|
|
11870
|
+
// floaterConfig
|
|
11871
|
+
this.placement = 'bottom-start';
|
|
11872
|
+
this.offset = 0;
|
|
11873
|
+
this.noFlip = false;
|
|
11874
|
+
this.autoPlacement = false;
|
|
11875
|
+
|
|
11786
11876
|
const versioning = new AuroDependencyVersioning$4();
|
|
11787
11877
|
|
|
11788
11878
|
this.dropdownTag = versioning.generateTag('auro-formkit-checkbox-dropdown', dropdownVersion, AuroDropdown);
|
|
@@ -11799,12 +11889,21 @@ class AuroCombobox extends LitElement {
|
|
|
11799
11889
|
|
|
11800
11890
|
/**
|
|
11801
11891
|
* An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported.
|
|
11892
|
+
* @default false
|
|
11802
11893
|
*/
|
|
11803
11894
|
autocomplete: {
|
|
11804
11895
|
type: String,
|
|
11805
11896
|
reflect: true
|
|
11806
11897
|
},
|
|
11807
11898
|
|
|
11899
|
+
/**
|
|
11900
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
11901
|
+
*/
|
|
11902
|
+
autoPlacement: {
|
|
11903
|
+
type: Boolean,
|
|
11904
|
+
reflect: true
|
|
11905
|
+
},
|
|
11906
|
+
|
|
11808
11907
|
/**
|
|
11809
11908
|
* When attribute is present auro-menu will apply checkmarks to selected options.
|
|
11810
11909
|
*/
|
|
@@ -11837,6 +11936,16 @@ class AuroCombobox extends LitElement {
|
|
|
11837
11936
|
reflect: true
|
|
11838
11937
|
},
|
|
11839
11938
|
|
|
11939
|
+
/**
|
|
11940
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
11941
|
+
* when there isn't enough space in the specified `placement`.
|
|
11942
|
+
* @default false
|
|
11943
|
+
*/
|
|
11944
|
+
noFlip: {
|
|
11945
|
+
type: Boolean,
|
|
11946
|
+
reflect: true
|
|
11947
|
+
},
|
|
11948
|
+
|
|
11840
11949
|
/**
|
|
11841
11950
|
* If set, disables auto-validation on blur.
|
|
11842
11951
|
*/
|
|
@@ -11844,6 +11953,15 @@ class AuroCombobox extends LitElement {
|
|
|
11844
11953
|
type: Boolean
|
|
11845
11954
|
},
|
|
11846
11955
|
|
|
11956
|
+
/**
|
|
11957
|
+
* Gap between the trigger element and bib.
|
|
11958
|
+
* @default 0
|
|
11959
|
+
*/
|
|
11960
|
+
offset: {
|
|
11961
|
+
type: Number,
|
|
11962
|
+
reflect: true
|
|
11963
|
+
},
|
|
11964
|
+
|
|
11847
11965
|
/**
|
|
11848
11966
|
* Specifies the current selected option.
|
|
11849
11967
|
*/
|
|
@@ -11853,6 +11971,20 @@ class AuroCombobox extends LitElement {
|
|
|
11853
11971
|
hasChanged: arrayOrUndefinedHasChanged
|
|
11854
11972
|
},
|
|
11855
11973
|
|
|
11974
|
+
/**
|
|
11975
|
+
* Position where the bib should appear relative to the trigger.
|
|
11976
|
+
* Accepted values:
|
|
11977
|
+
* "top" | "right" | "bottom" | "left" |
|
|
11978
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
11979
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
11980
|
+
* "left-start" | "left-end"
|
|
11981
|
+
* @default bottom-start
|
|
11982
|
+
*/
|
|
11983
|
+
placement: {
|
|
11984
|
+
type: String,
|
|
11985
|
+
reflect: true
|
|
11986
|
+
},
|
|
11987
|
+
|
|
11856
11988
|
/**
|
|
11857
11989
|
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
11858
11990
|
*/
|
|
@@ -12620,6 +12752,10 @@ class AuroCombobox extends LitElement {
|
|
|
12620
12752
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
12621
12753
|
?disabled="${this.disabled}"
|
|
12622
12754
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
12755
|
+
.placement="${this.placement}"
|
|
12756
|
+
.offset="${this.offset}"
|
|
12757
|
+
?autoPlacement="${this.autoPlacement}"
|
|
12758
|
+
?noFlip="${this.noFlip}"
|
|
12623
12759
|
disableEventShow>
|
|
12624
12760
|
<${this.inputTag}
|
|
12625
12761
|
slot="trigger"
|