@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
|
@@ -11132,11 +11132,11 @@ class AuroBibtemplate extends LitElement {
|
|
|
11132
11132
|
return {
|
|
11133
11133
|
isFullscreen: {
|
|
11134
11134
|
type: Boolean,
|
|
11135
|
-
reflect: true
|
|
11135
|
+
reflect: true
|
|
11136
11136
|
},
|
|
11137
11137
|
large: {
|
|
11138
11138
|
type: Boolean,
|
|
11139
|
-
reflect: true
|
|
11139
|
+
reflect: true
|
|
11140
11140
|
}
|
|
11141
11141
|
};
|
|
11142
11142
|
}
|
|
@@ -14835,7 +14835,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
14835
14835
|
|
|
14836
14836
|
var dropdownVersion$1 = '3.0.0';
|
|
14837
14837
|
|
|
14838
|
-
var styleCss$1$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)}`;
|
|
14838
|
+
var styleCss$1$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)}`;
|
|
14839
14839
|
|
|
14840
14840
|
var colorCss$1$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)}`;
|
|
14841
14841
|
|
|
@@ -15095,10 +15095,16 @@ class AuroDropdown extends LitElement {
|
|
|
15095
15095
|
this.disabled = false;
|
|
15096
15096
|
this.error = false;
|
|
15097
15097
|
this.inset = false;
|
|
15098
|
-
this.placement = 'bottom-start';
|
|
15099
15098
|
this.rounded = false;
|
|
15100
15099
|
this.tabIndex = 0;
|
|
15101
15100
|
this.noToggle = false;
|
|
15101
|
+
this.labeled = true;
|
|
15102
|
+
|
|
15103
|
+
// floaterConfig
|
|
15104
|
+
this.placement = 'bottom-start';
|
|
15105
|
+
this.offset = 0;
|
|
15106
|
+
this.noFlip = false;
|
|
15107
|
+
this.autoPlacement = false;
|
|
15102
15108
|
|
|
15103
15109
|
/**
|
|
15104
15110
|
* @private
|
|
@@ -15120,16 +15126,6 @@ class AuroDropdown extends LitElement {
|
|
|
15120
15126
|
*/
|
|
15121
15127
|
this.floater = new AuroFloatingUI();
|
|
15122
15128
|
|
|
15123
|
-
/**
|
|
15124
|
-
* @private
|
|
15125
|
-
*/
|
|
15126
|
-
this.floaterConfig = {
|
|
15127
|
-
placement: 'bottom-start',
|
|
15128
|
-
flip: true,
|
|
15129
|
-
autoPlacement: false,
|
|
15130
|
-
offset: 0,
|
|
15131
|
-
};
|
|
15132
|
-
|
|
15133
15129
|
/**
|
|
15134
15130
|
* Generate unique names for dependency components.
|
|
15135
15131
|
*/
|
|
@@ -15151,6 +15147,18 @@ class AuroDropdown extends LitElement {
|
|
|
15151
15147
|
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
15152
15148
|
}
|
|
15153
15149
|
|
|
15150
|
+
/**
|
|
15151
|
+
* @ignore
|
|
15152
|
+
*/
|
|
15153
|
+
get floaterConfig() {
|
|
15154
|
+
return {
|
|
15155
|
+
placement: this.placement,
|
|
15156
|
+
flip: !this.noFlip,
|
|
15157
|
+
autoPlacement: this.autoPlacement,
|
|
15158
|
+
offset: this.offset,
|
|
15159
|
+
};
|
|
15160
|
+
}
|
|
15161
|
+
|
|
15154
15162
|
/**
|
|
15155
15163
|
* Public method to hide the dropdown.
|
|
15156
15164
|
* @returns {void}
|
|
@@ -15171,6 +15179,15 @@ class AuroDropdown extends LitElement {
|
|
|
15171
15179
|
static get properties() {
|
|
15172
15180
|
return {
|
|
15173
15181
|
|
|
15182
|
+
/**
|
|
15183
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
15184
|
+
* @default false
|
|
15185
|
+
*/
|
|
15186
|
+
autoPlacement: {
|
|
15187
|
+
type: Boolean,
|
|
15188
|
+
reflect: true
|
|
15189
|
+
},
|
|
15190
|
+
|
|
15174
15191
|
/**
|
|
15175
15192
|
* If declared, applies a border around the trigger slot.
|
|
15176
15193
|
*/
|
|
@@ -15251,11 +15268,11 @@ class AuroDropdown extends LitElement {
|
|
|
15251
15268
|
},
|
|
15252
15269
|
|
|
15253
15270
|
/**
|
|
15254
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
15271
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
15255
15272
|
*/
|
|
15256
15273
|
isBibFullscreen: {
|
|
15257
15274
|
type: Boolean,
|
|
15258
|
-
reflect: true
|
|
15275
|
+
reflect: true
|
|
15259
15276
|
},
|
|
15260
15277
|
|
|
15261
15278
|
/**
|
|
@@ -15281,6 +15298,15 @@ class AuroDropdown extends LitElement {
|
|
|
15281
15298
|
reflect: true
|
|
15282
15299
|
},
|
|
15283
15300
|
|
|
15301
|
+
/**
|
|
15302
|
+
* Defines if there is a label preset.
|
|
15303
|
+
* @private
|
|
15304
|
+
*/
|
|
15305
|
+
labeled: {
|
|
15306
|
+
type: Boolean,
|
|
15307
|
+
reflect: true
|
|
15308
|
+
},
|
|
15309
|
+
|
|
15284
15310
|
/**
|
|
15285
15311
|
* If declared, the popover and trigger will be set to the same width.
|
|
15286
15312
|
*/
|
|
@@ -15289,6 +15315,16 @@ class AuroDropdown extends LitElement {
|
|
|
15289
15315
|
reflect: true
|
|
15290
15316
|
},
|
|
15291
15317
|
|
|
15318
|
+
/**
|
|
15319
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
15320
|
+
* when there isn't enough space in the specified `placement`.
|
|
15321
|
+
* @default false
|
|
15322
|
+
*/
|
|
15323
|
+
noFlip: {
|
|
15324
|
+
type: Boolean,
|
|
15325
|
+
reflect: true
|
|
15326
|
+
},
|
|
15327
|
+
|
|
15292
15328
|
/**
|
|
15293
15329
|
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
15294
15330
|
*/
|
|
@@ -15305,16 +15341,32 @@ class AuroDropdown extends LitElement {
|
|
|
15305
15341
|
reflect: true
|
|
15306
15342
|
},
|
|
15307
15343
|
|
|
15344
|
+
/**
|
|
15345
|
+
* Gap between the trigger element and bib.
|
|
15346
|
+
* @default 0
|
|
15347
|
+
*/
|
|
15348
|
+
offset: {
|
|
15349
|
+
type: Number,
|
|
15350
|
+
reflect: true
|
|
15351
|
+
},
|
|
15352
|
+
|
|
15308
15353
|
onSlotChange: {
|
|
15309
15354
|
type: Function,
|
|
15310
15355
|
reflect: false
|
|
15311
15356
|
},
|
|
15312
15357
|
|
|
15313
15358
|
/**
|
|
15314
|
-
*
|
|
15359
|
+
* Position where the bib should appear relative to the trigger.
|
|
15360
|
+
* Accepted values:
|
|
15361
|
+
* "top" | "right" | "bottom" | "left" |
|
|
15362
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
15363
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
15364
|
+
* "left-start" | "left-end"
|
|
15365
|
+
* @default bottom-start
|
|
15315
15366
|
*/
|
|
15316
15367
|
placement: {
|
|
15317
|
-
type: String
|
|
15368
|
+
type: String,
|
|
15369
|
+
reflect: true
|
|
15318
15370
|
},
|
|
15319
15371
|
|
|
15320
15372
|
/**
|
|
@@ -15360,6 +15412,7 @@ class AuroDropdown extends LitElement {
|
|
|
15360
15412
|
|
|
15361
15413
|
disconnectedCallback() {
|
|
15362
15414
|
super.disconnectedCallback();
|
|
15415
|
+
this.floater.disconnect();
|
|
15363
15416
|
}
|
|
15364
15417
|
|
|
15365
15418
|
updated(changedProperties) {
|
|
@@ -15489,13 +15542,21 @@ class AuroDropdown extends LitElement {
|
|
|
15489
15542
|
handleTriggerContentSlotChange(event) {
|
|
15490
15543
|
this.floater.handleTriggerTabIndex();
|
|
15491
15544
|
|
|
15492
|
-
const
|
|
15545
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
15493
15546
|
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15547
|
+
if (triggerSlot) {
|
|
15548
|
+
|
|
15549
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
15550
|
+
|
|
15551
|
+
if (triggerContentNodes) {
|
|
15552
|
+
|
|
15553
|
+
triggerContentNodes.forEach((node) => {
|
|
15554
|
+
if (!this.triggerContentFocusable) {
|
|
15555
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
15556
|
+
}
|
|
15557
|
+
});
|
|
15497
15558
|
}
|
|
15498
|
-
}
|
|
15559
|
+
}
|
|
15499
15560
|
|
|
15500
15561
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
15501
15562
|
|
|
@@ -15549,6 +15610,29 @@ class AuroDropdown extends LitElement {
|
|
|
15549
15610
|
}
|
|
15550
15611
|
}
|
|
15551
15612
|
|
|
15613
|
+
/**
|
|
15614
|
+
* @private
|
|
15615
|
+
* @method handleLabelSlotChange
|
|
15616
|
+
* @param {event} event - The event object representing the slot change.
|
|
15617
|
+
* @description Handles the slot change event for the label slot.
|
|
15618
|
+
*/
|
|
15619
|
+
handleLabelSlotChange (event) {
|
|
15620
|
+
|
|
15621
|
+
// Get the nodes from the event
|
|
15622
|
+
const nodes = event.target.assignedNodes();
|
|
15623
|
+
|
|
15624
|
+
// Guard clause for no nodes
|
|
15625
|
+
if (!nodes) {
|
|
15626
|
+
return;
|
|
15627
|
+
}
|
|
15628
|
+
|
|
15629
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
15630
|
+
const nodesArr = Array.from(nodes);
|
|
15631
|
+
|
|
15632
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
15633
|
+
this.labeled = nodesArr.length > 0;
|
|
15634
|
+
}
|
|
15635
|
+
|
|
15552
15636
|
// function that renders the HTML and CSS into the scope of the component
|
|
15553
15637
|
render() {
|
|
15554
15638
|
return html$1`
|
|
@@ -15563,7 +15647,7 @@ class AuroDropdown extends LitElement {
|
|
|
15563
15647
|
>
|
|
15564
15648
|
<div class="triggerContentWrapper">
|
|
15565
15649
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
15566
|
-
<slot name="label"></slot>
|
|
15650
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
15567
15651
|
</label>
|
|
15568
15652
|
<div class="triggerContent">
|
|
15569
15653
|
<slot
|
|
@@ -22520,6 +22604,12 @@ class AuroDatePicker extends LitElement {
|
|
|
22520
22604
|
|
|
22521
22605
|
this.monthFirst = true;
|
|
22522
22606
|
|
|
22607
|
+
// floaterConfig
|
|
22608
|
+
this.placement = 'bottom-start';
|
|
22609
|
+
this.offset = 0;
|
|
22610
|
+
this.noFlip = false;
|
|
22611
|
+
this.autoPlacement = false;
|
|
22612
|
+
|
|
22523
22613
|
/**
|
|
22524
22614
|
* @private
|
|
22525
22615
|
*/
|
|
@@ -22567,6 +22657,16 @@ class AuroDatePicker extends LitElement {
|
|
|
22567
22657
|
static get properties() {
|
|
22568
22658
|
return {
|
|
22569
22659
|
// ...super.properties,
|
|
22660
|
+
|
|
22661
|
+
/**
|
|
22662
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
22663
|
+
* @default false
|
|
22664
|
+
*/
|
|
22665
|
+
autoPlacement: {
|
|
22666
|
+
type: Boolean,
|
|
22667
|
+
reflect: true
|
|
22668
|
+
},
|
|
22669
|
+
|
|
22570
22670
|
/**
|
|
22571
22671
|
* The last date that may be displayed in the calendar.
|
|
22572
22672
|
*/
|
|
@@ -22661,6 +22761,16 @@ class AuroDatePicker extends LitElement {
|
|
|
22661
22761
|
type: Boolean
|
|
22662
22762
|
},
|
|
22663
22763
|
|
|
22764
|
+
/**
|
|
22765
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
22766
|
+
* when there isn't enough space in the specified `placement`.
|
|
22767
|
+
* @default false
|
|
22768
|
+
*/
|
|
22769
|
+
noFlip: {
|
|
22770
|
+
type: Boolean,
|
|
22771
|
+
reflect: true
|
|
22772
|
+
},
|
|
22773
|
+
|
|
22664
22774
|
/**
|
|
22665
22775
|
* If set, disables auto-validation on blur.
|
|
22666
22776
|
*/
|
|
@@ -22668,6 +22778,29 @@ class AuroDatePicker extends LitElement {
|
|
|
22668
22778
|
type: Boolean
|
|
22669
22779
|
},
|
|
22670
22780
|
|
|
22781
|
+
/**
|
|
22782
|
+
* Gap between the trigger element and bib.
|
|
22783
|
+
* @default 0
|
|
22784
|
+
*/
|
|
22785
|
+
offset: {
|
|
22786
|
+
type: Number,
|
|
22787
|
+
reflect: true
|
|
22788
|
+
},
|
|
22789
|
+
|
|
22790
|
+
/**
|
|
22791
|
+
* Position where the bib should appear relative to the trigger.
|
|
22792
|
+
* Accepted values:
|
|
22793
|
+
* "top" | "right" | "bottom" | "left" |
|
|
22794
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
22795
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
22796
|
+
* "left-start" | "left-end"
|
|
22797
|
+
* @default bottom-start
|
|
22798
|
+
*/
|
|
22799
|
+
placement: {
|
|
22800
|
+
type: String,
|
|
22801
|
+
reflect: true
|
|
22802
|
+
},
|
|
22803
|
+
|
|
22671
22804
|
/**
|
|
22672
22805
|
* If set, turns on date range functionality in auro-calendar.
|
|
22673
22806
|
*/
|
|
@@ -22724,7 +22857,7 @@ class AuroDatePicker extends LitElement {
|
|
|
22724
22857
|
*/
|
|
22725
22858
|
stacked: {
|
|
22726
22859
|
type: Boolean,
|
|
22727
|
-
reflect: true
|
|
22860
|
+
reflect: true
|
|
22728
22861
|
},
|
|
22729
22862
|
|
|
22730
22863
|
/**
|
|
@@ -23424,6 +23557,10 @@ class AuroDatePicker extends LitElement {
|
|
|
23424
23557
|
disableEventShow
|
|
23425
23558
|
noHideOnThisFocusLoss
|
|
23426
23559
|
fullscreenBreakpoint="sm"
|
|
23560
|
+
.placement="${this.placement}"
|
|
23561
|
+
.offset="${this.offset}"
|
|
23562
|
+
?autoPlacement="${this.autoPlacement}"
|
|
23563
|
+
?noFlip="${this.noFlip}"
|
|
23427
23564
|
part="dropdown">
|
|
23428
23565
|
<div slot="trigger" class="dpTriggerContent" part="trigger">
|
|
23429
23566
|
<${this.inputTag}
|
|
@@ -107,7 +107,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
107
107
|
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.
|
|
108
108
|
|
|
109
109
|
```html
|
|
110
|
-
<script type="module
|
|
110
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0/auro-dropdown/+esm"></script>
|
|
111
111
|
```
|
|
112
112
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
113
|
|
|
@@ -11,25 +11,29 @@
|
|
|
11
11
|
|
|
12
12
|
## Properties
|
|
13
13
|
|
|
14
|
-
| Property | Attribute | Type | Default
|
|
15
|
-
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
14
|
+
| Property | Attribute | Type | Default | Description |
|
|
15
|
+
|-------------------------|-------------------------|-------------|----------------|--------------------------------------------------|
|
|
16
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
17
|
+
| [bordered](#bordered) | `bordered` | ` Boolean ` | | If declared, applies a border around the trigger slot. |
|
|
18
|
+
| [chevron](#chevron) | `chevron` | ` Boolean ` | | If declared, the dropdown displays a chevron on the right. |
|
|
19
|
+
| [common](#common) | `common` | ` Boolean ` | | If declared, the dropdown will be styled with the common theme. |
|
|
20
|
+
| [disabled](#disabled) | `disabled` | ` Boolean ` | | If declared, the dropdown is not interactive. |
|
|
21
|
+
| [error](#error) | `error` | ` Boolean ` | | If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both. |
|
|
22
|
+
| [fluid](#fluid) | `fluid` | `Boolean` | | Makes the trigger to be full width of its parent container. |
|
|
23
|
+
| [focusShow](#focusShow) | `focusShow` | ` Boolean ` | | If declared, the bib will display when focus is applied to the trigger. |
|
|
24
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | ` String ` | | Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint. |
|
|
25
|
+
| [hoverToggle](#hoverToggle) | `hoverToggle` | ` Boolean ` | | If declared, the trigger will toggle the dropdown on mouseover/mouseout. |
|
|
26
|
+
| [inset](#inset) | `inset` | ` Boolean ` | | If declared, will apply padding around trigger slot content. |
|
|
27
|
+
| [isBibFullscreen](#isBibFullscreen) | `isBibFullscreen` | `boolean` | false | If true, the dropdown bib is taking the fullscreen when it's open. |
|
|
28
|
+
| [isPopoverVisible](#isPopoverVisible) | `isPopoverVisible` | ` Boolean ` | false | If true, the dropdown bib is displayed. |
|
|
29
|
+
| [matchWidth](#matchWidth) | `matchWidth` | ` Boolean ` | false | If declared, the popover and trigger will be set to the same width. |
|
|
30
|
+
| [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`. |
|
|
31
|
+
| [noHideOnThisFocusLoss](#noHideOnThisFocusLoss) | `noHideOnThisFocusLoss` | ` Boolean ` | false | If declared, the dropdown will not hide when moving focus outside the element. |
|
|
32
|
+
| [noToggle](#noToggle) | `noToggle` | ` Boolean ` | | If declared, the trigger will only show the dropdown bib. |
|
|
33
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
34
|
+
| [onSlotChange](#onSlotChange) | `onSlotChange` | | | |
|
|
35
|
+
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
36
|
+
| [rounded](#rounded) | `rounded` | ` Boolean ` | | If declared, will apply border-radius to trigger and default slots. |
|
|
33
37
|
|
|
34
38
|
## Methods
|
|
35
39
|
|
|
@@ -709,6 +713,149 @@ On mobile view, adding the `fullscreenBreakpoint="{breakpoint-token}"` will swit
|
|
|
709
713
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
710
714
|
</auro-accordion>
|
|
711
715
|
|
|
716
|
+
### Customized bib position
|
|
717
|
+
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
718
|
+
|
|
719
|
+
- `placement` specifies the preferred position where the bib should appear relative to the trigger.
|
|
720
|
+
- `offset` sets the distance between the trigger and the bib.
|
|
721
|
+
- When `autoPlacement` is enabled, smart positioning logic is applied to determine the best placement for the bib. If all sides have sufficient space, the bib will appear in the position specified by `placement`.
|
|
722
|
+
- Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
|
|
723
|
+
|
|
724
|
+
<div class="exampleWrapper">
|
|
725
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
|
|
726
|
+
<!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
727
|
+
<style>
|
|
728
|
+
.floaterConfigDropdown::part(size) {
|
|
729
|
+
width: 300px;
|
|
730
|
+
max-height: 200px;
|
|
731
|
+
}
|
|
732
|
+
</style>
|
|
733
|
+
<div aria-label="custom label">
|
|
734
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron placement="bottom-end" offset="20" noFlip>
|
|
735
|
+
<div>
|
|
736
|
+
<p>
|
|
737
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
738
|
+
</p>
|
|
739
|
+
<p>
|
|
740
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
741
|
+
</p>
|
|
742
|
+
<p>
|
|
743
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
744
|
+
</p>
|
|
745
|
+
</div>
|
|
746
|
+
<div slot="trigger">
|
|
747
|
+
Trigger for bottom-end bib with 20px offset and noFlip
|
|
748
|
+
</div>
|
|
749
|
+
</auro-dropdown>
|
|
750
|
+
</div>
|
|
751
|
+
<div aria-label="custom label">
|
|
752
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron placement="bottom-end" offset="20">
|
|
753
|
+
<div>
|
|
754
|
+
<p>
|
|
755
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
756
|
+
</p>
|
|
757
|
+
<p>
|
|
758
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
759
|
+
</p>
|
|
760
|
+
<p>
|
|
761
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
762
|
+
</p>
|
|
763
|
+
</div>
|
|
764
|
+
<div slot="trigger">
|
|
765
|
+
Trigger for bottom-end bib with 20px offset and flip
|
|
766
|
+
</div>
|
|
767
|
+
</auro-dropdown>
|
|
768
|
+
</div>
|
|
769
|
+
<div aria-label="custom label">
|
|
770
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron autoPlacement noFlip placement="right" offset="20">
|
|
771
|
+
<div>
|
|
772
|
+
<p>
|
|
773
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
774
|
+
</p>
|
|
775
|
+
<p>
|
|
776
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
777
|
+
</p>
|
|
778
|
+
<p>
|
|
779
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
780
|
+
</p>
|
|
781
|
+
</div>
|
|
782
|
+
<div slot="trigger">
|
|
783
|
+
Trigger for right bib with 20px offset, autoPlacement and noFlip
|
|
784
|
+
</div>
|
|
785
|
+
</auro-dropdown>
|
|
786
|
+
</div>
|
|
787
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
788
|
+
</div>
|
|
789
|
+
<auro-accordion alignRight>
|
|
790
|
+
<span slot="trigger">See code</span>
|
|
791
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
|
|
792
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
793
|
+
|
|
794
|
+
```html
|
|
795
|
+
<style>
|
|
796
|
+
.floaterConfigDropdown::part(size) {
|
|
797
|
+
width: 300px;
|
|
798
|
+
max-height: 200px;
|
|
799
|
+
}
|
|
800
|
+
</style>
|
|
801
|
+
<div aria-label="custom label">
|
|
802
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron placement="bottom-end" offset="20" noFlip>
|
|
803
|
+
<div>
|
|
804
|
+
<p>
|
|
805
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
806
|
+
</p>
|
|
807
|
+
<p>
|
|
808
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
809
|
+
</p>
|
|
810
|
+
<p>
|
|
811
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
812
|
+
</p>
|
|
813
|
+
</div>
|
|
814
|
+
<div slot="trigger">
|
|
815
|
+
Trigger for bottom-end bib with 20px offset and noFlip
|
|
816
|
+
</div>
|
|
817
|
+
</auro-dropdown>
|
|
818
|
+
</div>
|
|
819
|
+
<div aria-label="custom label">
|
|
820
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron placement="bottom-end" offset="20">
|
|
821
|
+
<div>
|
|
822
|
+
<p>
|
|
823
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
824
|
+
</p>
|
|
825
|
+
<p>
|
|
826
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
827
|
+
</p>
|
|
828
|
+
<p>
|
|
829
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
830
|
+
</p>
|
|
831
|
+
</div>
|
|
832
|
+
<div slot="trigger">
|
|
833
|
+
Trigger for bottom-end bib with 20px offset and flip
|
|
834
|
+
</div>
|
|
835
|
+
</auro-dropdown>
|
|
836
|
+
</div>
|
|
837
|
+
<div aria-label="custom label">
|
|
838
|
+
<auro-dropdown class="floaterConfigDropdown" inset bordered rounded chevron autoPlacement noFlip placement="right" offset="20">
|
|
839
|
+
<div>
|
|
840
|
+
<p>
|
|
841
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
842
|
+
</p>
|
|
843
|
+
<p>
|
|
844
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
845
|
+
</p>
|
|
846
|
+
<p>
|
|
847
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
848
|
+
</p>
|
|
849
|
+
</div>
|
|
850
|
+
<div slot="trigger">
|
|
851
|
+
Trigger for right bib with 20px offset, autoPlacement and noFlip
|
|
852
|
+
</div>
|
|
853
|
+
</auro-dropdown>
|
|
854
|
+
</div>
|
|
855
|
+
```
|
|
856
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
857
|
+
</auro-accordion>
|
|
858
|
+
|
|
712
859
|
### Slot Examples
|
|
713
860
|
|
|
714
861
|
#### default
|