@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
|
@@ -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
|
|
113
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0/auro-counter/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -38,16 +38,20 @@
|
|
|
38
38
|
|
|
39
39
|
## Properties
|
|
40
40
|
|
|
41
|
-
| Property | Attribute | Type | Default
|
|
42
|
-
|
|
43
|
-
| [
|
|
44
|
-
| [
|
|
45
|
-
| [
|
|
46
|
-
| [
|
|
47
|
-
| [
|
|
48
|
-
| [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
41
|
+
| Property | Attribute | Type | Default | Description |
|
|
42
|
+
|---------------------------|---------------------------|-----------|----------------|--------------------------------------------------|
|
|
43
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
44
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile.<br />When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint. |
|
|
45
|
+
| [isDropdown](#isDropdown) | `isDropdown` | `boolean` | false | Indicates if the counter group is displayed as a dropdown. |
|
|
46
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
47
|
+
| [max](#max) | `max` | `number` | "undefined" | The maximum value allowed for the whole group of counters. |
|
|
48
|
+
| [min](#min) | `min` | `number` | "undefined" | The minimum value allowed for the whole group of counters. |
|
|
49
|
+
| [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`. |
|
|
50
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
51
|
+
| [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" |
|
|
52
|
+
| [total](#total) | `total` | `number` | "undefined" | The total value of the counters. |
|
|
53
|
+
| [validity](#validity) | `validity` | `string` | "undefined" | Reflects the validity state. |
|
|
54
|
+
| [value](#value) | `value` | `object` | "undefined" | The current individual values of the nested counters. |
|
|
51
55
|
|
|
52
56
|
## Methods
|
|
53
57
|
|
|
@@ -389,6 +393,105 @@ You can also individually set the max or min value for each counter in a group.
|
|
|
389
393
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
390
394
|
</auro-accordion>
|
|
391
395
|
|
|
396
|
+
### Customized bib position
|
|
397
|
+
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
398
|
+
|
|
399
|
+
- `placement` specifies the preferred position where the bib should appear relative to the trigger.
|
|
400
|
+
- `offset` sets the distance between the trigger and the bib.
|
|
401
|
+
- 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`.
|
|
402
|
+
- Unless `noFlip` is enabled, if there isn't enough space for the preferred `placement`, the bib will automatically flip to an alternative position.
|
|
403
|
+
|
|
404
|
+
<div class="exampleWrapper">
|
|
405
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/floaterConfig.html) -->
|
|
406
|
+
<!-- The below content is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
407
|
+
<div style="width: 350px">
|
|
408
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end">
|
|
409
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
410
|
+
<div slot="label">bottome-end bib with 20px offset</div>
|
|
411
|
+
<auro-counter>
|
|
412
|
+
Adults
|
|
413
|
+
<span slot="description">18 years or older</span>
|
|
414
|
+
</auro-counter>
|
|
415
|
+
<auro-counter>
|
|
416
|
+
Children
|
|
417
|
+
<span slot="description">2-17 years</span>
|
|
418
|
+
</auro-counter>
|
|
419
|
+
</auro-counter-group>
|
|
420
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end" noFlip>
|
|
421
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
422
|
+
<div slot="label">bottome-end bib with 20px offset and noFlip</div>
|
|
423
|
+
<auro-counter>
|
|
424
|
+
Adults
|
|
425
|
+
<span slot="description">18 years or older</span>
|
|
426
|
+
</auro-counter>
|
|
427
|
+
<auro-counter>
|
|
428
|
+
Children
|
|
429
|
+
<span slot="description">2-17 years</span>
|
|
430
|
+
</auro-counter>
|
|
431
|
+
</auro-counter-group>
|
|
432
|
+
<auro-counter-group isDropdown offset="20" placement="right" noFlip autoPlacement>
|
|
433
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
434
|
+
<div slot="label">right bib with 20px offset, noFlip and autoPlacement</div>
|
|
435
|
+
<auro-counter>
|
|
436
|
+
Adults
|
|
437
|
+
<span slot="description">18 years or older</span>
|
|
438
|
+
</auro-counter>
|
|
439
|
+
<auro-counter>
|
|
440
|
+
Children
|
|
441
|
+
<span slot="description">2-17 years</span>
|
|
442
|
+
</auro-counter>
|
|
443
|
+
</auro-counter-group>
|
|
444
|
+
</div>
|
|
445
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
446
|
+
</div>
|
|
447
|
+
<auro-accordion alignRight>
|
|
448
|
+
<span slot="trigger">See code</span>
|
|
449
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/floaterConfig.html) -->
|
|
450
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/floaterConfig.html -->
|
|
451
|
+
|
|
452
|
+
```html
|
|
453
|
+
<div style="width: 350px">
|
|
454
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end">
|
|
455
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
456
|
+
<div slot="label">bottome-end bib with 20px offset</div>
|
|
457
|
+
<auro-counter>
|
|
458
|
+
Adults
|
|
459
|
+
<span slot="description">18 years or older</span>
|
|
460
|
+
</auro-counter>
|
|
461
|
+
<auro-counter>
|
|
462
|
+
Children
|
|
463
|
+
<span slot="description">2-17 years</span>
|
|
464
|
+
</auro-counter>
|
|
465
|
+
</auro-counter-group>
|
|
466
|
+
<auro-counter-group isDropdown offset="20" placement="bottom-end" noFlip>
|
|
467
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
468
|
+
<div slot="label">bottome-end bib with 20px offset and noFlip</div>
|
|
469
|
+
<auro-counter>
|
|
470
|
+
Adults
|
|
471
|
+
<span slot="description">18 years or older</span>
|
|
472
|
+
</auro-counter>
|
|
473
|
+
<auro-counter>
|
|
474
|
+
Children
|
|
475
|
+
<span slot="description">2-17 years</span>
|
|
476
|
+
</auro-counter>
|
|
477
|
+
</auro-counter-group>
|
|
478
|
+
<auro-counter-group isDropdown offset="20" placement="right" noFlip autoPlacement>
|
|
479
|
+
<div slot="bib.fullscreen.headline">Passengers</div>
|
|
480
|
+
<div slot="label">right bib with 20px offset, noFlip and autoPlacement</div>
|
|
481
|
+
<auro-counter>
|
|
482
|
+
Adults
|
|
483
|
+
<span slot="description">18 years or older</span>
|
|
484
|
+
</auro-counter>
|
|
485
|
+
<auro-counter>
|
|
486
|
+
Children
|
|
487
|
+
<span slot="description">2-17 years</span>
|
|
488
|
+
</auro-counter>
|
|
489
|
+
</auro-counter-group>
|
|
490
|
+
</div>
|
|
491
|
+
```
|
|
492
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
493
|
+
</auro-accordion>
|
|
494
|
+
|
|
392
495
|
### Dropdown with fullscreen bib
|
|
393
496
|
|
|
394
497
|
You can make the dropdown open in fullscreen at a specific breakpoint by setting `fullscreenBreakpoint`.
|
|
@@ -4607,7 +4607,7 @@ class AuroDropdownBib extends r {
|
|
|
4607
4607
|
|
|
4608
4608
|
var dropdownVersion$1 = '3.0.0';
|
|
4609
4609
|
|
|
4610
|
-
var styleCss$1$1 = i$5`: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)}`;
|
|
4610
|
+
var styleCss$1$1 = i$5`: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)}`;
|
|
4611
4611
|
|
|
4612
4612
|
var colorCss$1$1 = i$5`.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)}`;
|
|
4613
4613
|
|
|
@@ -4867,10 +4867,16 @@ class AuroDropdown extends r {
|
|
|
4867
4867
|
this.disabled = false;
|
|
4868
4868
|
this.error = false;
|
|
4869
4869
|
this.inset = false;
|
|
4870
|
-
this.placement = 'bottom-start';
|
|
4871
4870
|
this.rounded = false;
|
|
4872
4871
|
this.tabIndex = 0;
|
|
4873
4872
|
this.noToggle = false;
|
|
4873
|
+
this.labeled = true;
|
|
4874
|
+
|
|
4875
|
+
// floaterConfig
|
|
4876
|
+
this.placement = 'bottom-start';
|
|
4877
|
+
this.offset = 0;
|
|
4878
|
+
this.noFlip = false;
|
|
4879
|
+
this.autoPlacement = false;
|
|
4874
4880
|
|
|
4875
4881
|
/**
|
|
4876
4882
|
* @private
|
|
@@ -4892,16 +4898,6 @@ class AuroDropdown extends r {
|
|
|
4892
4898
|
*/
|
|
4893
4899
|
this.floater = new AuroFloatingUI();
|
|
4894
4900
|
|
|
4895
|
-
/**
|
|
4896
|
-
* @private
|
|
4897
|
-
*/
|
|
4898
|
-
this.floaterConfig = {
|
|
4899
|
-
placement: 'bottom-start',
|
|
4900
|
-
flip: true,
|
|
4901
|
-
autoPlacement: false,
|
|
4902
|
-
offset: 0,
|
|
4903
|
-
};
|
|
4904
|
-
|
|
4905
4901
|
/**
|
|
4906
4902
|
* Generate unique names for dependency components.
|
|
4907
4903
|
*/
|
|
@@ -4923,6 +4919,18 @@ class AuroDropdown extends r {
|
|
|
4923
4919
|
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4924
4920
|
}
|
|
4925
4921
|
|
|
4922
|
+
/**
|
|
4923
|
+
* @ignore
|
|
4924
|
+
*/
|
|
4925
|
+
get floaterConfig() {
|
|
4926
|
+
return {
|
|
4927
|
+
placement: this.placement,
|
|
4928
|
+
flip: !this.noFlip,
|
|
4929
|
+
autoPlacement: this.autoPlacement,
|
|
4930
|
+
offset: this.offset,
|
|
4931
|
+
};
|
|
4932
|
+
}
|
|
4933
|
+
|
|
4926
4934
|
/**
|
|
4927
4935
|
* Public method to hide the dropdown.
|
|
4928
4936
|
* @returns {void}
|
|
@@ -4943,6 +4951,15 @@ class AuroDropdown extends r {
|
|
|
4943
4951
|
static get properties() {
|
|
4944
4952
|
return {
|
|
4945
4953
|
|
|
4954
|
+
/**
|
|
4955
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
4956
|
+
* @default false
|
|
4957
|
+
*/
|
|
4958
|
+
autoPlacement: {
|
|
4959
|
+
type: Boolean,
|
|
4960
|
+
reflect: true
|
|
4961
|
+
},
|
|
4962
|
+
|
|
4946
4963
|
/**
|
|
4947
4964
|
* If declared, applies a border around the trigger slot.
|
|
4948
4965
|
*/
|
|
@@ -5023,11 +5040,11 @@ class AuroDropdown extends r {
|
|
|
5023
5040
|
},
|
|
5024
5041
|
|
|
5025
5042
|
/**
|
|
5026
|
-
* If true, the dropdown bib is taking the fullscreen when it's open
|
|
5043
|
+
* If true, the dropdown bib is taking the fullscreen when it's open.
|
|
5027
5044
|
*/
|
|
5028
5045
|
isBibFullscreen: {
|
|
5029
5046
|
type: Boolean,
|
|
5030
|
-
reflect: true
|
|
5047
|
+
reflect: true
|
|
5031
5048
|
},
|
|
5032
5049
|
|
|
5033
5050
|
/**
|
|
@@ -5053,6 +5070,15 @@ class AuroDropdown extends r {
|
|
|
5053
5070
|
reflect: true
|
|
5054
5071
|
},
|
|
5055
5072
|
|
|
5073
|
+
/**
|
|
5074
|
+
* Defines if there is a label preset.
|
|
5075
|
+
* @private
|
|
5076
|
+
*/
|
|
5077
|
+
labeled: {
|
|
5078
|
+
type: Boolean,
|
|
5079
|
+
reflect: true
|
|
5080
|
+
},
|
|
5081
|
+
|
|
5056
5082
|
/**
|
|
5057
5083
|
* If declared, the popover and trigger will be set to the same width.
|
|
5058
5084
|
*/
|
|
@@ -5061,6 +5087,16 @@ class AuroDropdown extends r {
|
|
|
5061
5087
|
reflect: true
|
|
5062
5088
|
},
|
|
5063
5089
|
|
|
5090
|
+
/**
|
|
5091
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
5092
|
+
* when there isn't enough space in the specified `placement`.
|
|
5093
|
+
* @default false
|
|
5094
|
+
*/
|
|
5095
|
+
noFlip: {
|
|
5096
|
+
type: Boolean,
|
|
5097
|
+
reflect: true
|
|
5098
|
+
},
|
|
5099
|
+
|
|
5064
5100
|
/**
|
|
5065
5101
|
* If declared, the dropdown will not hide when moving focus outside the element.
|
|
5066
5102
|
*/
|
|
@@ -5077,16 +5113,32 @@ class AuroDropdown extends r {
|
|
|
5077
5113
|
reflect: true
|
|
5078
5114
|
},
|
|
5079
5115
|
|
|
5116
|
+
/**
|
|
5117
|
+
* Gap between the trigger element and bib.
|
|
5118
|
+
* @default 0
|
|
5119
|
+
*/
|
|
5120
|
+
offset: {
|
|
5121
|
+
type: Number,
|
|
5122
|
+
reflect: true
|
|
5123
|
+
},
|
|
5124
|
+
|
|
5080
5125
|
onSlotChange: {
|
|
5081
5126
|
type: Function,
|
|
5082
5127
|
reflect: false
|
|
5083
5128
|
},
|
|
5084
5129
|
|
|
5085
5130
|
/**
|
|
5086
|
-
*
|
|
5131
|
+
* Position where the bib should appear relative to the trigger.
|
|
5132
|
+
* Accepted values:
|
|
5133
|
+
* "top" | "right" | "bottom" | "left" |
|
|
5134
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
5135
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
5136
|
+
* "left-start" | "left-end"
|
|
5137
|
+
* @default bottom-start
|
|
5087
5138
|
*/
|
|
5088
5139
|
placement: {
|
|
5089
|
-
type: String
|
|
5140
|
+
type: String,
|
|
5141
|
+
reflect: true
|
|
5090
5142
|
},
|
|
5091
5143
|
|
|
5092
5144
|
/**
|
|
@@ -5132,6 +5184,7 @@ class AuroDropdown extends r {
|
|
|
5132
5184
|
|
|
5133
5185
|
disconnectedCallback() {
|
|
5134
5186
|
super.disconnectedCallback();
|
|
5187
|
+
this.floater.disconnect();
|
|
5135
5188
|
}
|
|
5136
5189
|
|
|
5137
5190
|
updated(changedProperties) {
|
|
@@ -5261,13 +5314,21 @@ class AuroDropdown extends r {
|
|
|
5261
5314
|
handleTriggerContentSlotChange(event) {
|
|
5262
5315
|
this.floater.handleTriggerTabIndex();
|
|
5263
5316
|
|
|
5264
|
-
const
|
|
5317
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
|
|
5318
|
+
|
|
5319
|
+
if (triggerSlot) {
|
|
5320
|
+
|
|
5321
|
+
const triggerContentNodes = triggerSlot.assignedNodes();
|
|
5265
5322
|
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5323
|
+
if (triggerContentNodes) {
|
|
5324
|
+
|
|
5325
|
+
triggerContentNodes.forEach((node) => {
|
|
5326
|
+
if (!this.triggerContentFocusable) {
|
|
5327
|
+
this.triggerContentFocusable = this.containsFocusableElement(node);
|
|
5328
|
+
}
|
|
5329
|
+
});
|
|
5269
5330
|
}
|
|
5270
|
-
}
|
|
5331
|
+
}
|
|
5271
5332
|
|
|
5272
5333
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
5273
5334
|
|
|
@@ -5321,6 +5382,29 @@ class AuroDropdown extends r {
|
|
|
5321
5382
|
}
|
|
5322
5383
|
}
|
|
5323
5384
|
|
|
5385
|
+
/**
|
|
5386
|
+
* @private
|
|
5387
|
+
* @method handleLabelSlotChange
|
|
5388
|
+
* @param {event} event - The event object representing the slot change.
|
|
5389
|
+
* @description Handles the slot change event for the label slot.
|
|
5390
|
+
*/
|
|
5391
|
+
handleLabelSlotChange (event) {
|
|
5392
|
+
|
|
5393
|
+
// Get the nodes from the event
|
|
5394
|
+
const nodes = event.target.assignedNodes();
|
|
5395
|
+
|
|
5396
|
+
// Guard clause for no nodes
|
|
5397
|
+
if (!nodes) {
|
|
5398
|
+
return;
|
|
5399
|
+
}
|
|
5400
|
+
|
|
5401
|
+
// Convert the nodes to a measurable array so we can get the length
|
|
5402
|
+
const nodesArr = Array.from(nodes);
|
|
5403
|
+
|
|
5404
|
+
// If the nodes array has a length, the dropdown is labeled
|
|
5405
|
+
this.labeled = nodesArr.length > 0;
|
|
5406
|
+
}
|
|
5407
|
+
|
|
5324
5408
|
// function that renders the HTML and CSS into the scope of the component
|
|
5325
5409
|
render() {
|
|
5326
5410
|
return u`
|
|
@@ -5335,7 +5419,7 @@ class AuroDropdown extends r {
|
|
|
5335
5419
|
>
|
|
5336
5420
|
<div class="triggerContentWrapper">
|
|
5337
5421
|
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5338
|
-
<slot name="label"></slot>
|
|
5422
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5339
5423
|
</label>
|
|
5340
5424
|
<div class="triggerContent">
|
|
5341
5425
|
<slot
|
|
@@ -6221,11 +6305,11 @@ class AuroBibtemplate extends r {
|
|
|
6221
6305
|
return {
|
|
6222
6306
|
isFullscreen: {
|
|
6223
6307
|
type: Boolean,
|
|
6224
|
-
reflect: true
|
|
6308
|
+
reflect: true
|
|
6225
6309
|
},
|
|
6226
6310
|
large: {
|
|
6227
6311
|
type: Boolean,
|
|
6228
|
-
reflect: true
|
|
6312
|
+
reflect: true
|
|
6229
6313
|
}
|
|
6230
6314
|
};
|
|
6231
6315
|
}
|
|
@@ -6312,7 +6396,7 @@ class AuroBibtemplate extends r {
|
|
|
6312
6396
|
|
|
6313
6397
|
var bibTemplateVersion = '1.0.0';
|
|
6314
6398
|
|
|
6315
|
-
var styleCss = i$5
|
|
6399
|
+
var styleCss = i$5`.wrapper{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.wrapper ::slotted(*:not(:first-child)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
6316
6400
|
|
|
6317
6401
|
var colorCss = i$5`:host ::slotted(*:not(:first-child)){border-color:var(--ds-color-border-divider-default, rgba(0, 0, 0, 0.12))}`;
|
|
6318
6402
|
|
|
@@ -6351,7 +6435,7 @@ class AuroCounterWrapper extends r {
|
|
|
6351
6435
|
|
|
6352
6436
|
// function that renders the HTML and CSS into the scope of the component
|
|
6353
6437
|
render() {
|
|
6354
|
-
return u`<slot></slot>`;
|
|
6438
|
+
return u`<div class="wrapper"><slot></slot></div>`;
|
|
6355
6439
|
}
|
|
6356
6440
|
}
|
|
6357
6441
|
|
|
@@ -6439,6 +6523,25 @@ class AuroCounterGroup extends r {
|
|
|
6439
6523
|
static get properties() {
|
|
6440
6524
|
return {
|
|
6441
6525
|
|
|
6526
|
+
/**
|
|
6527
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
6528
|
+
* @default false
|
|
6529
|
+
*/
|
|
6530
|
+
autoPlacement: {
|
|
6531
|
+
type: Boolean,
|
|
6532
|
+
reflect: true
|
|
6533
|
+
},
|
|
6534
|
+
|
|
6535
|
+
/**
|
|
6536
|
+
* Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile.
|
|
6537
|
+
* When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
6538
|
+
* @default sm
|
|
6539
|
+
*/
|
|
6540
|
+
fullscreenBreakpoint: {
|
|
6541
|
+
type: String,
|
|
6542
|
+
reflect: true
|
|
6543
|
+
},
|
|
6544
|
+
|
|
6442
6545
|
/**
|
|
6443
6546
|
* Indicates if the counter group is displayed as a dropdown.
|
|
6444
6547
|
*/
|
|
@@ -6463,45 +6566,68 @@ class AuroCounterGroup extends r {
|
|
|
6463
6566
|
},
|
|
6464
6567
|
|
|
6465
6568
|
/**
|
|
6466
|
-
*
|
|
6569
|
+
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
6570
|
+
* Otherwise, Heading 600
|
|
6467
6571
|
*/
|
|
6468
|
-
|
|
6469
|
-
type:
|
|
6470
|
-
reflect: true
|
|
6572
|
+
largeFullscreenHeadline: {
|
|
6573
|
+
type: Boolean,
|
|
6574
|
+
reflect: true
|
|
6471
6575
|
},
|
|
6472
6576
|
|
|
6473
6577
|
/**
|
|
6474
|
-
*
|
|
6578
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
6579
|
+
* when there isn't enough space in the specified `placement`.
|
|
6580
|
+
* @default false
|
|
6475
6581
|
*/
|
|
6476
|
-
|
|
6477
|
-
type:
|
|
6582
|
+
noFlip: {
|
|
6583
|
+
type: Boolean,
|
|
6584
|
+
reflect: true
|
|
6478
6585
|
},
|
|
6479
6586
|
|
|
6480
6587
|
/**
|
|
6481
|
-
*
|
|
6588
|
+
* Gap between the trigger element and bib.
|
|
6589
|
+
* @default 0
|
|
6482
6590
|
*/
|
|
6483
|
-
|
|
6484
|
-
type:
|
|
6591
|
+
offset: {
|
|
6592
|
+
type: Number,
|
|
6593
|
+
reflect: true
|
|
6485
6594
|
},
|
|
6486
6595
|
|
|
6487
6596
|
/**
|
|
6488
|
-
*
|
|
6489
|
-
*
|
|
6597
|
+
* Position where the bib should appear relative to the trigger.
|
|
6598
|
+
* Accepted values:
|
|
6599
|
+
* "top" | "right" | "bottom" | "left" |
|
|
6600
|
+
* "bottom-start" | "top-start" | "top-end" |
|
|
6601
|
+
* "right-start" | "right-end" | "bottom-end" |
|
|
6602
|
+
* "left-start" | "left-end"
|
|
6603
|
+
* @default bottom-start
|
|
6490
6604
|
*/
|
|
6491
|
-
|
|
6492
|
-
type:
|
|
6605
|
+
placement: {
|
|
6606
|
+
type: String,
|
|
6493
6607
|
reflect: true
|
|
6494
6608
|
},
|
|
6495
6609
|
|
|
6496
6610
|
/**
|
|
6497
|
-
*
|
|
6498
|
-
* When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
6499
|
-
* @default sm
|
|
6611
|
+
* The total value of the counters.
|
|
6500
6612
|
*/
|
|
6501
|
-
|
|
6613
|
+
total: {
|
|
6614
|
+
type: Number,
|
|
6615
|
+
},
|
|
6616
|
+
|
|
6617
|
+
/**
|
|
6618
|
+
* Reflects the validity state.
|
|
6619
|
+
*/
|
|
6620
|
+
validity: {
|
|
6502
6621
|
type: String,
|
|
6503
|
-
reflect: true
|
|
6504
|
-
}
|
|
6622
|
+
reflect: true,
|
|
6623
|
+
},
|
|
6624
|
+
|
|
6625
|
+
/**
|
|
6626
|
+
* The current individual values of the nested counters.
|
|
6627
|
+
*/
|
|
6628
|
+
value: {
|
|
6629
|
+
type: Object,
|
|
6630
|
+
},
|
|
6505
6631
|
};
|
|
6506
6632
|
}
|
|
6507
6633
|
|
|
@@ -6744,7 +6870,12 @@ class AuroCounterGroup extends r {
|
|
|
6744
6870
|
render() {
|
|
6745
6871
|
return u`
|
|
6746
6872
|
${this.isDropdown
|
|
6747
|
-
? u`<${this.dropdownTag} common chevron
|
|
6873
|
+
? u`<${this.dropdownTag} common chevron
|
|
6874
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6875
|
+
.placement="${this.placement}"
|
|
6876
|
+
.offset="${this.offset}"
|
|
6877
|
+
?autoPlacement="${this.autoPlacement}"
|
|
6878
|
+
?noFlip="${this.noFlip}">
|
|
6748
6879
|
<div slot="trigger"><slot name="valueText">
|
|
6749
6880
|
${this.counters && Array.from(this.counters).map((counter, index) => `${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
6750
6881
|
</slot></div>
|