@aurodesignsystem/auro-formkit 3.0.0 → 3.1.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 +19 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +2 -0
- package/components/bibtemplate/dist/registered.js +2 -0
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.md +5 -5
- package/components/combobox/demo/api.min.js +54 -18
- package/components/combobox/demo/index.min.js +54 -18
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/auro-combobox.d.ts +16 -7
- package/components/combobox/dist/index.js +54 -18
- package/components/combobox/dist/registered.js +54 -18
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.md +2 -2
- package/components/counter/demo/api.min.js +33 -6
- package/components/counter/demo/index.min.js +33 -6
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/auro-counter-group.d.ts +9 -3
- package/components/counter/dist/index.js +33 -6
- package/components/counter/dist/registered.js +33 -6
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +3 -2
- package/components/datepicker/demo/api.min.js +63 -14
- package/components/datepicker/demo/index.min.js +63 -14
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-calendar-cell.d.ts +1 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +1 -0
- package/components/datepicker/dist/auro-calendar.d.ts +3 -2
- package/components/datepicker/dist/auro-datepicker.d.ts +16 -0
- package/components/datepicker/dist/index.js +63 -14
- package/components/datepicker/dist/registered.js +63 -14
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +21 -3
- package/components/dropdown/demo/index.md +83 -0
- package/components/dropdown/demo/index.min.js +21 -3
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/auro-dropdown.d.ts +12 -1
- package/components/dropdown/dist/index.js +21 -3
- package/components/dropdown/dist/registered.js +21 -3
- package/components/form/README.md +1 -1
- package/components/form/demo/autocomplete.html +15 -0
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +10 -5
- package/components/input/demo/index.min.js +10 -5
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/base-input.d.ts +5 -0
- package/components/input/dist/index.js +10 -5
- package/components/input/dist/registered.js +10 -5
- 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 +1 -1
- package/components/select/demo/api.md +1 -1
- package/components/select/demo/api.min.js +28 -5
- package/components/select/demo/index.md +46 -1
- package/components/select/demo/index.min.js +28 -5
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/auro-select.d.ts +5 -2
- package/components/select/dist/index.js +28 -5
- package/components/select/dist/registered.js +28 -5
- package/package.json +1 -1
|
@@ -9419,7 +9419,10 @@ class AuroCalendarCell extends LitElement {
|
|
|
9419
9419
|
month: { type: String },
|
|
9420
9420
|
min: { type: Number },
|
|
9421
9421
|
max: { type: Number },
|
|
9422
|
-
disabled: {
|
|
9422
|
+
disabled: {
|
|
9423
|
+
type: Boolean,
|
|
9424
|
+
reflect: true
|
|
9425
|
+
},
|
|
9423
9426
|
disabledDays: { type: Array },
|
|
9424
9427
|
hoveredDate: { type: String },
|
|
9425
9428
|
isCurrentDate: { type: Boolean },
|
|
@@ -9760,7 +9763,8 @@ class AuroCalendarMonth extends RangeDatepickerCalendar {
|
|
|
9760
9763
|
* @private
|
|
9761
9764
|
*/
|
|
9762
9765
|
monthFirst: {
|
|
9763
|
-
type: Boolean
|
|
9766
|
+
type: Boolean,
|
|
9767
|
+
reflect: true
|
|
9764
9768
|
}
|
|
9765
9769
|
};
|
|
9766
9770
|
}
|
|
@@ -10952,6 +10956,8 @@ class AuroBibtemplate extends LitElement {
|
|
|
10952
10956
|
constructor() {
|
|
10953
10957
|
super();
|
|
10954
10958
|
|
|
10959
|
+
this.large = false;
|
|
10960
|
+
|
|
10955
10961
|
AuroLibraryRuntimeUtils$1$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
10956
10962
|
|
|
10957
10963
|
const versioning = new AuroDependencyVersioning$2();
|
|
@@ -11551,6 +11557,10 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
11551
11557
|
this.showPrevMonthBtn = true;
|
|
11552
11558
|
this.showNextMonthBtn = true;
|
|
11553
11559
|
|
|
11560
|
+
this.visible = false;
|
|
11561
|
+
this.largeFullscreenHeadline = false;
|
|
11562
|
+
this.isFullscreen = false;
|
|
11563
|
+
|
|
11554
11564
|
/**
|
|
11555
11565
|
* @private
|
|
11556
11566
|
*/
|
|
@@ -11566,8 +11576,6 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
11566
11576
|
*/
|
|
11567
11577
|
this.numCalendars = undefined;
|
|
11568
11578
|
|
|
11569
|
-
this.visible = false;
|
|
11570
|
-
|
|
11571
11579
|
/**
|
|
11572
11580
|
* @private
|
|
11573
11581
|
*/
|
|
@@ -14436,6 +14444,7 @@ var tokensCss$1$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basi
|
|
|
14436
14444
|
|
|
14437
14445
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
14438
14446
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
14447
|
+
'xl',
|
|
14439
14448
|
'lg',
|
|
14440
14449
|
'md',
|
|
14441
14450
|
'sm',
|
|
@@ -14507,6 +14516,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
14507
14516
|
|
|
14508
14517
|
set mobileFullscreenBreakpoint(value) {
|
|
14509
14518
|
// verify the defined breakpoint is valid and exit out if not
|
|
14519
|
+
// 'disabled' is a design token breakpoint so it acts as our "undefined" value
|
|
14510
14520
|
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
14511
14521
|
if (!validatedValue) {
|
|
14512
14522
|
this._mobileBreakpointValue = undefined;
|
|
@@ -15019,7 +15029,12 @@ class AuroDropdown extends LitElement {
|
|
|
15019
15029
|
},
|
|
15020
15030
|
|
|
15021
15031
|
/**
|
|
15022
|
-
* Defines the screen size breakpoint (`
|
|
15032
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
15033
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
15034
|
+
*
|
|
15035
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
15036
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
15037
|
+
* @default sm
|
|
15023
15038
|
*/
|
|
15024
15039
|
fullscreenBreakpoint: {
|
|
15025
15040
|
type: String,
|
|
@@ -15142,6 +15157,15 @@ class AuroDropdown extends LitElement {
|
|
|
15142
15157
|
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroDropdown);
|
|
15143
15158
|
}
|
|
15144
15159
|
|
|
15160
|
+
/**
|
|
15161
|
+
* Accessor for reusing the focusable entity query string.
|
|
15162
|
+
* @private
|
|
15163
|
+
* @returns {string}
|
|
15164
|
+
*/
|
|
15165
|
+
get focusableEntityQuery () {
|
|
15166
|
+
return 'auro-input, [auro-input], auro-button, [auro-button], button, input';
|
|
15167
|
+
}
|
|
15168
|
+
|
|
15145
15169
|
connectedCallback() {
|
|
15146
15170
|
super.connectedCallback();
|
|
15147
15171
|
}
|
|
@@ -15155,6 +15179,8 @@ class AuroDropdown extends LitElement {
|
|
|
15155
15179
|
updated(changedProperties) {
|
|
15156
15180
|
this.floater.handleUpdate(changedProperties);
|
|
15157
15181
|
|
|
15182
|
+
// Note: `disabled` is not a breakpoint (it is not a screen size),
|
|
15183
|
+
// so it looks like we never consume this - however, dropdownBib handles this in the setter as "undefined"
|
|
15158
15184
|
if (changedProperties.has('fullscreenBreakpoint')) {
|
|
15159
15185
|
this.bibContent.mobileFullscreenBreakpoint = this.fullscreenBreakpoint;
|
|
15160
15186
|
}
|
|
@@ -15290,7 +15316,7 @@ class AuroDropdown extends LitElement {
|
|
|
15290
15316
|
|
|
15291
15317
|
this.triggerContentSlot.forEach((node) => {
|
|
15292
15318
|
if (node.querySelectorAll) {
|
|
15293
|
-
const auroElements = node.querySelectorAll(
|
|
15319
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
15294
15320
|
auroElements.forEach((auroEl) => {
|
|
15295
15321
|
auroEl.addEventListener('focus', this.bindFocusEventToTrigger);
|
|
15296
15322
|
auroEl.addEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -15311,7 +15337,7 @@ class AuroDropdown extends LitElement {
|
|
|
15311
15337
|
|
|
15312
15338
|
this.triggerContentSlot.forEach((node) => {
|
|
15313
15339
|
if (node.querySelectorAll) {
|
|
15314
|
-
const auroElements = node.querySelectorAll(
|
|
15340
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
15315
15341
|
auroElements.forEach((auroEl) => {
|
|
15316
15342
|
auroEl.removeEventListener('focus', this.bindFocusEventToTrigger);
|
|
15317
15343
|
auroEl.removeEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -19973,7 +19999,8 @@ class BaseInput extends LitElement {
|
|
|
19973
19999
|
* If set, disables the input.
|
|
19974
20000
|
*/
|
|
19975
20001
|
disabled: {
|
|
19976
|
-
type: Boolean
|
|
20002
|
+
type: Boolean,
|
|
20003
|
+
reflect: true
|
|
19977
20004
|
},
|
|
19978
20005
|
|
|
19979
20006
|
/**
|
|
@@ -20003,7 +20030,8 @@ class BaseInput extends LitElement {
|
|
|
20003
20030
|
* If set, will render an icon inside the input to the left of the value. Support is limited to auro-input instances with credit card format.
|
|
20004
20031
|
*/
|
|
20005
20032
|
icon: {
|
|
20006
|
-
type: Boolean
|
|
20033
|
+
type: Boolean,
|
|
20034
|
+
reflect: true
|
|
20007
20035
|
},
|
|
20008
20036
|
|
|
20009
20037
|
/**
|
|
@@ -20059,7 +20087,8 @@ class BaseInput extends LitElement {
|
|
|
20059
20087
|
* If set, disables auto-validation on blur.
|
|
20060
20088
|
*/
|
|
20061
20089
|
noValidate: {
|
|
20062
|
-
type: Boolean
|
|
20090
|
+
type: Boolean,
|
|
20091
|
+
reflect: true
|
|
20063
20092
|
},
|
|
20064
20093
|
|
|
20065
20094
|
/**
|
|
@@ -20089,14 +20118,16 @@ class BaseInput extends LitElement {
|
|
|
20089
20118
|
* Makes the input read-only, but can be set programmatically.
|
|
20090
20119
|
*/
|
|
20091
20120
|
readonly: {
|
|
20092
|
-
type: Boolean
|
|
20121
|
+
type: Boolean,
|
|
20122
|
+
reflect: true
|
|
20093
20123
|
},
|
|
20094
20124
|
|
|
20095
20125
|
/**
|
|
20096
20126
|
* Populates the `required` attribute on the input. Used for client-side validation.
|
|
20097
20127
|
*/
|
|
20098
20128
|
required: {
|
|
20099
|
-
type: Boolean
|
|
20129
|
+
type: Boolean,
|
|
20130
|
+
reflect: true
|
|
20100
20131
|
},
|
|
20101
20132
|
|
|
20102
20133
|
/**
|
|
@@ -22076,6 +22107,7 @@ class AuroDatePicker extends LitElement {
|
|
|
22076
22107
|
this.required = false;
|
|
22077
22108
|
this.onDark = false;
|
|
22078
22109
|
this.range = false;
|
|
22110
|
+
this.stacked = false;
|
|
22079
22111
|
this.noValidate = false;
|
|
22080
22112
|
this.validity = undefined;
|
|
22081
22113
|
this.value = undefined;
|
|
@@ -22084,6 +22116,7 @@ class AuroDatePicker extends LitElement {
|
|
|
22084
22116
|
this.calendarEndDate = undefined;
|
|
22085
22117
|
this.calendarFocusDate = this.value;
|
|
22086
22118
|
this.format = 'mm/dd/yyyy';
|
|
22119
|
+
this.fullscreenBreakpoint = 'sm';
|
|
22087
22120
|
this.monthNames = [
|
|
22088
22121
|
'January',
|
|
22089
22122
|
'February',
|
|
@@ -22107,6 +22140,8 @@ class AuroDatePicker extends LitElement {
|
|
|
22107
22140
|
this.noFlip = false;
|
|
22108
22141
|
this.autoPlacement = false;
|
|
22109
22142
|
|
|
22143
|
+
this.largeFullscreenHeadline = false;
|
|
22144
|
+
|
|
22110
22145
|
/**
|
|
22111
22146
|
* @private
|
|
22112
22147
|
*/
|
|
@@ -22219,6 +22254,19 @@ class AuroDatePicker extends LitElement {
|
|
|
22219
22254
|
reflect: true
|
|
22220
22255
|
},
|
|
22221
22256
|
|
|
22257
|
+
/**
|
|
22258
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
22259
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
22260
|
+
*
|
|
22261
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
22262
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
22263
|
+
* @default sm
|
|
22264
|
+
*/
|
|
22265
|
+
fullscreenBreakpoint: {
|
|
22266
|
+
type: String,
|
|
22267
|
+
reflect: true
|
|
22268
|
+
},
|
|
22269
|
+
|
|
22222
22270
|
/**
|
|
22223
22271
|
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
22224
22272
|
* Otherwise, Heading 600.
|
|
@@ -22272,7 +22320,8 @@ class AuroDatePicker extends LitElement {
|
|
|
22272
22320
|
* If set, disables auto-validation on blur.
|
|
22273
22321
|
*/
|
|
22274
22322
|
noValidate: {
|
|
22275
|
-
type: Boolean
|
|
22323
|
+
type: Boolean,
|
|
22324
|
+
reflect: true
|
|
22276
22325
|
},
|
|
22277
22326
|
|
|
22278
22327
|
/**
|
|
@@ -23044,7 +23093,7 @@ class AuroDatePicker extends LitElement {
|
|
|
23044
23093
|
?disabled="${this.disabled}"
|
|
23045
23094
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
23046
23095
|
disableEventShow
|
|
23047
|
-
fullscreenBreakpoint="
|
|
23096
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
23048
23097
|
.placement="${this.placement}"
|
|
23049
23098
|
.offset="${this.offset}"
|
|
23050
23099
|
?autoPlacement="${this.autoPlacement}"
|
|
@@ -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" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@
|
|
110
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.0.1/auro-dropdown/+esm"></script>
|
|
111
111
|
```
|
|
112
112
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
113
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
| [error](#error) | `error` | ` Boolean ` | | If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both. |
|
|
22
22
|
| [fluid](#fluid) | `fluid` | `Boolean` | | Makes the trigger to be full width of its parent container. |
|
|
23
23
|
| [focusShow](#focusShow) | `focusShow` | ` Boolean ` | | If declared, the bib will display when focus is applied to the trigger. |
|
|
24
|
-
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | ` String ` |
|
|
24
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | ` String ` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
25
25
|
| [hoverToggle](#hoverToggle) | `hoverToggle` | ` Boolean ` | | If declared, the trigger will toggle the dropdown on mouseover/mouseout. |
|
|
26
26
|
| [inset](#inset) | `inset` | ` Boolean ` | | If declared, will apply padding around trigger slot content. |
|
|
27
27
|
| [isBibFullscreen](#isBibFullscreen) | `isBibFullscreen` | `boolean` | false | If true, the dropdown bib is taking the fullscreen when it's open. |
|
|
@@ -2653,6 +2653,7 @@ var tokensCss$1 = i$3`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
|
|
|
2653
2653
|
|
|
2654
2654
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2655
2655
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2656
|
+
'xl',
|
|
2656
2657
|
'lg',
|
|
2657
2658
|
'md',
|
|
2658
2659
|
'sm',
|
|
@@ -2724,6 +2725,7 @@ class AuroDropdownBib extends r {
|
|
|
2724
2725
|
|
|
2725
2726
|
set mobileFullscreenBreakpoint(value) {
|
|
2726
2727
|
// verify the defined breakpoint is valid and exit out if not
|
|
2728
|
+
// 'disabled' is a design token breakpoint so it acts as our "undefined" value
|
|
2727
2729
|
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
2728
2730
|
if (!validatedValue) {
|
|
2729
2731
|
this._mobileBreakpointValue = undefined;
|
|
@@ -3236,7 +3238,12 @@ class AuroDropdown extends r {
|
|
|
3236
3238
|
},
|
|
3237
3239
|
|
|
3238
3240
|
/**
|
|
3239
|
-
* Defines the screen size breakpoint (`
|
|
3241
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
3242
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3243
|
+
*
|
|
3244
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3245
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3246
|
+
* @default sm
|
|
3240
3247
|
*/
|
|
3241
3248
|
fullscreenBreakpoint: {
|
|
3242
3249
|
type: String,
|
|
@@ -3359,6 +3366,15 @@ class AuroDropdown extends r {
|
|
|
3359
3366
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3360
3367
|
}
|
|
3361
3368
|
|
|
3369
|
+
/**
|
|
3370
|
+
* Accessor for reusing the focusable entity query string.
|
|
3371
|
+
* @private
|
|
3372
|
+
* @returns {string}
|
|
3373
|
+
*/
|
|
3374
|
+
get focusableEntityQuery () {
|
|
3375
|
+
return 'auro-input, [auro-input], auro-button, [auro-button], button, input';
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3362
3378
|
connectedCallback() {
|
|
3363
3379
|
super.connectedCallback();
|
|
3364
3380
|
}
|
|
@@ -3372,6 +3388,8 @@ class AuroDropdown extends r {
|
|
|
3372
3388
|
updated(changedProperties) {
|
|
3373
3389
|
this.floater.handleUpdate(changedProperties);
|
|
3374
3390
|
|
|
3391
|
+
// Note: `disabled` is not a breakpoint (it is not a screen size),
|
|
3392
|
+
// so it looks like we never consume this - however, dropdownBib handles this in the setter as "undefined"
|
|
3375
3393
|
if (changedProperties.has('fullscreenBreakpoint')) {
|
|
3376
3394
|
this.bibContent.mobileFullscreenBreakpoint = this.fullscreenBreakpoint;
|
|
3377
3395
|
}
|
|
@@ -3507,7 +3525,7 @@ class AuroDropdown extends r {
|
|
|
3507
3525
|
|
|
3508
3526
|
this.triggerContentSlot.forEach((node) => {
|
|
3509
3527
|
if (node.querySelectorAll) {
|
|
3510
|
-
const auroElements = node.querySelectorAll(
|
|
3528
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3511
3529
|
auroElements.forEach((auroEl) => {
|
|
3512
3530
|
auroEl.addEventListener('focus', this.bindFocusEventToTrigger);
|
|
3513
3531
|
auroEl.addEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -3528,7 +3546,7 @@ class AuroDropdown extends r {
|
|
|
3528
3546
|
|
|
3529
3547
|
this.triggerContentSlot.forEach((node) => {
|
|
3530
3548
|
if (node.querySelectorAll) {
|
|
3531
|
-
const auroElements = node.querySelectorAll(
|
|
3549
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3532
3550
|
auroElements.forEach((auroEl) => {
|
|
3533
3551
|
auroEl.removeEventListener('focus', this.bindFocusEventToTrigger);
|
|
3534
3552
|
auroEl.removeEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -411,6 +411,89 @@ To make the dropdown to be just big as the trigger's content, style the `auro-dr
|
|
|
411
411
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
412
412
|
</auro-accordion>
|
|
413
413
|
|
|
414
|
+
## Triggering a fullscreen dropdown
|
|
415
|
+
This example shows how to set a dropdown fullscreen breakpoint attribute. Most consuming components use `sm` by default, but
|
|
416
|
+
dropdown supports `xs`, `sm`, `md`, `lg`, `xl` and `disabled`, with `disabled` ensuring that the dropdown will never be fullscreen.
|
|
417
|
+
|
|
418
|
+
<div class="exampleWrapper">
|
|
419
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/fullscreen.html) -->
|
|
420
|
+
<!-- The below content is automatically added from ./../apiExamples/fullscreen.html -->
|
|
421
|
+
<h3>Never fullscreen</h3>
|
|
422
|
+
<auro-dropdown id="common-never-fullscreen" common aria-label="Label content for screen reader" fullscreenBreakpoint="disabled">
|
|
423
|
+
<div style="padding: var(--ds-size-150);">
|
|
424
|
+
Lorem ipsum solar
|
|
425
|
+
<br />
|
|
426
|
+
<auro-button onclick="document.querySelector('#common-never-fullscreen').hide()">
|
|
427
|
+
Dismiss Dropdown
|
|
428
|
+
</auro-button>
|
|
429
|
+
</div>
|
|
430
|
+
<span slot="helpText">
|
|
431
|
+
Help text
|
|
432
|
+
</span>
|
|
433
|
+
<div slot="trigger">
|
|
434
|
+
Trigger
|
|
435
|
+
</div>
|
|
436
|
+
</auro-dropdown>
|
|
437
|
+
<h3>Always fullscreen</h3>
|
|
438
|
+
<auro-dropdown id="common-always-fullscreen" common aria-label="Label content for screen reader" fullscreenBreakpoint="xl">
|
|
439
|
+
<div style="padding: var(--ds-size-150);">
|
|
440
|
+
Lorem ipsum solar
|
|
441
|
+
<br />
|
|
442
|
+
<auro-button onclick="document.querySelector('#common-always-fullscreen').hide()">
|
|
443
|
+
Dismiss Dropdown
|
|
444
|
+
</auro-button>
|
|
445
|
+
</div>
|
|
446
|
+
<span slot="helpText">
|
|
447
|
+
Help text
|
|
448
|
+
</span>
|
|
449
|
+
<div slot="trigger">
|
|
450
|
+
Trigger
|
|
451
|
+
</div>
|
|
452
|
+
</auro-dropdown>
|
|
453
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
454
|
+
</div>
|
|
455
|
+
<auro-accordion alignRight>
|
|
456
|
+
<span slot="trigger">See code</span>
|
|
457
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/fullscreen.html) -->
|
|
458
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/fullscreen.html -->
|
|
459
|
+
|
|
460
|
+
```html
|
|
461
|
+
<h3>Never fullscreen</h3>
|
|
462
|
+
<auro-dropdown id="common-never-fullscreen" common aria-label="Label content for screen reader" fullscreenBreakpoint="disabled">
|
|
463
|
+
<div style="padding: var(--ds-size-150);">
|
|
464
|
+
Lorem ipsum solar
|
|
465
|
+
<br />
|
|
466
|
+
<auro-button onclick="document.querySelector('#common-never-fullscreen').hide()">
|
|
467
|
+
Dismiss Dropdown
|
|
468
|
+
</auro-button>
|
|
469
|
+
</div>
|
|
470
|
+
<span slot="helpText">
|
|
471
|
+
Help text
|
|
472
|
+
</span>
|
|
473
|
+
<div slot="trigger">
|
|
474
|
+
Trigger
|
|
475
|
+
</div>
|
|
476
|
+
</auro-dropdown>
|
|
477
|
+
<h3>Always fullscreen</h3>
|
|
478
|
+
<auro-dropdown id="common-always-fullscreen" common aria-label="Label content for screen reader" fullscreenBreakpoint="xl">
|
|
479
|
+
<div style="padding: var(--ds-size-150);">
|
|
480
|
+
Lorem ipsum solar
|
|
481
|
+
<br />
|
|
482
|
+
<auro-button onclick="document.querySelector('#common-always-fullscreen').hide()">
|
|
483
|
+
Dismiss Dropdown
|
|
484
|
+
</auro-button>
|
|
485
|
+
</div>
|
|
486
|
+
<span slot="helpText">
|
|
487
|
+
Help text
|
|
488
|
+
</span>
|
|
489
|
+
<div slot="trigger">
|
|
490
|
+
Trigger
|
|
491
|
+
</div>
|
|
492
|
+
</auro-dropdown>
|
|
493
|
+
```
|
|
494
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
495
|
+
</auro-accordion>
|
|
496
|
+
|
|
414
497
|
## Supported standard and accessible interactions
|
|
415
498
|
|
|
416
499
|
The dropdown can be opened with the following actions:
|
|
@@ -2628,6 +2628,7 @@ var tokensCss$1 = i$3`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
|
|
|
2628
2628
|
|
|
2629
2629
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2630
2630
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2631
|
+
'xl',
|
|
2631
2632
|
'lg',
|
|
2632
2633
|
'md',
|
|
2633
2634
|
'sm',
|
|
@@ -2699,6 +2700,7 @@ class AuroDropdownBib extends r {
|
|
|
2699
2700
|
|
|
2700
2701
|
set mobileFullscreenBreakpoint(value) {
|
|
2701
2702
|
// verify the defined breakpoint is valid and exit out if not
|
|
2703
|
+
// 'disabled' is a design token breakpoint so it acts as our "undefined" value
|
|
2702
2704
|
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
2703
2705
|
if (!validatedValue) {
|
|
2704
2706
|
this._mobileBreakpointValue = undefined;
|
|
@@ -3211,7 +3213,12 @@ class AuroDropdown extends r {
|
|
|
3211
3213
|
},
|
|
3212
3214
|
|
|
3213
3215
|
/**
|
|
3214
|
-
* Defines the screen size breakpoint (`
|
|
3216
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
3217
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3218
|
+
*
|
|
3219
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3220
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3221
|
+
* @default sm
|
|
3215
3222
|
*/
|
|
3216
3223
|
fullscreenBreakpoint: {
|
|
3217
3224
|
type: String,
|
|
@@ -3334,6 +3341,15 @@ class AuroDropdown extends r {
|
|
|
3334
3341
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3335
3342
|
}
|
|
3336
3343
|
|
|
3344
|
+
/**
|
|
3345
|
+
* Accessor for reusing the focusable entity query string.
|
|
3346
|
+
* @private
|
|
3347
|
+
* @returns {string}
|
|
3348
|
+
*/
|
|
3349
|
+
get focusableEntityQuery () {
|
|
3350
|
+
return 'auro-input, [auro-input], auro-button, [auro-button], button, input';
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3337
3353
|
connectedCallback() {
|
|
3338
3354
|
super.connectedCallback();
|
|
3339
3355
|
}
|
|
@@ -3347,6 +3363,8 @@ class AuroDropdown extends r {
|
|
|
3347
3363
|
updated(changedProperties) {
|
|
3348
3364
|
this.floater.handleUpdate(changedProperties);
|
|
3349
3365
|
|
|
3366
|
+
// Note: `disabled` is not a breakpoint (it is not a screen size),
|
|
3367
|
+
// so it looks like we never consume this - however, dropdownBib handles this in the setter as "undefined"
|
|
3350
3368
|
if (changedProperties.has('fullscreenBreakpoint')) {
|
|
3351
3369
|
this.bibContent.mobileFullscreenBreakpoint = this.fullscreenBreakpoint;
|
|
3352
3370
|
}
|
|
@@ -3482,7 +3500,7 @@ class AuroDropdown extends r {
|
|
|
3482
3500
|
|
|
3483
3501
|
this.triggerContentSlot.forEach((node) => {
|
|
3484
3502
|
if (node.querySelectorAll) {
|
|
3485
|
-
const auroElements = node.querySelectorAll(
|
|
3503
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3486
3504
|
auroElements.forEach((auroEl) => {
|
|
3487
3505
|
auroEl.addEventListener('focus', this.bindFocusEventToTrigger);
|
|
3488
3506
|
auroEl.addEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -3503,7 +3521,7 @@ class AuroDropdown extends r {
|
|
|
3503
3521
|
|
|
3504
3522
|
this.triggerContentSlot.forEach((node) => {
|
|
3505
3523
|
if (node.querySelectorAll) {
|
|
3506
|
-
const auroElements = node.querySelectorAll(
|
|
3524
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3507
3525
|
auroElements.forEach((auroEl) => {
|
|
3508
3526
|
auroEl.removeEventListener('focus', this.bindFocusEventToTrigger);
|
|
3509
3527
|
auroEl.removeEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -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" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@
|
|
110
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@3.0.1/auro-dropdown/+esm"></script>
|
|
111
111
|
```
|
|
112
112
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
113
|
|
|
@@ -110,7 +110,12 @@ export class AuroDropdown extends LitElement {
|
|
|
110
110
|
type: BooleanConstructor;
|
|
111
111
|
};
|
|
112
112
|
/**
|
|
113
|
-
* Defines the screen size breakpoint (`
|
|
113
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
114
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
115
|
+
*
|
|
116
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
117
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
118
|
+
* @default sm
|
|
114
119
|
*/
|
|
115
120
|
fullscreenBreakpoint: {
|
|
116
121
|
type: StringConstructor;
|
|
@@ -293,6 +298,12 @@ export class AuroDropdown extends LitElement {
|
|
|
293
298
|
* @returns {void}
|
|
294
299
|
*/
|
|
295
300
|
show(): void;
|
|
301
|
+
/**
|
|
302
|
+
* Accessor for reusing the focusable entity query string.
|
|
303
|
+
* @private
|
|
304
|
+
* @returns {string}
|
|
305
|
+
*/
|
|
306
|
+
private get focusableEntityQuery();
|
|
296
307
|
updated(changedProperties: any): void;
|
|
297
308
|
firstUpdated(): void;
|
|
298
309
|
bibContent: any;
|
|
@@ -2581,6 +2581,7 @@ var tokensCss$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
|
|
|
2581
2581
|
|
|
2582
2582
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2583
2583
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2584
|
+
'xl',
|
|
2584
2585
|
'lg',
|
|
2585
2586
|
'md',
|
|
2586
2587
|
'sm',
|
|
@@ -2652,6 +2653,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
2652
2653
|
|
|
2653
2654
|
set mobileFullscreenBreakpoint(value) {
|
|
2654
2655
|
// verify the defined breakpoint is valid and exit out if not
|
|
2656
|
+
// 'disabled' is a design token breakpoint so it acts as our "undefined" value
|
|
2655
2657
|
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
2656
2658
|
if (!validatedValue) {
|
|
2657
2659
|
this._mobileBreakpointValue = undefined;
|
|
@@ -3164,7 +3166,12 @@ class AuroDropdown extends LitElement {
|
|
|
3164
3166
|
},
|
|
3165
3167
|
|
|
3166
3168
|
/**
|
|
3167
|
-
* Defines the screen size breakpoint (`
|
|
3169
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
3170
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3171
|
+
*
|
|
3172
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3173
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3174
|
+
* @default sm
|
|
3168
3175
|
*/
|
|
3169
3176
|
fullscreenBreakpoint: {
|
|
3170
3177
|
type: String,
|
|
@@ -3287,6 +3294,15 @@ class AuroDropdown extends LitElement {
|
|
|
3287
3294
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3288
3295
|
}
|
|
3289
3296
|
|
|
3297
|
+
/**
|
|
3298
|
+
* Accessor for reusing the focusable entity query string.
|
|
3299
|
+
* @private
|
|
3300
|
+
* @returns {string}
|
|
3301
|
+
*/
|
|
3302
|
+
get focusableEntityQuery () {
|
|
3303
|
+
return 'auro-input, [auro-input], auro-button, [auro-button], button, input';
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3290
3306
|
connectedCallback() {
|
|
3291
3307
|
super.connectedCallback();
|
|
3292
3308
|
}
|
|
@@ -3300,6 +3316,8 @@ class AuroDropdown extends LitElement {
|
|
|
3300
3316
|
updated(changedProperties) {
|
|
3301
3317
|
this.floater.handleUpdate(changedProperties);
|
|
3302
3318
|
|
|
3319
|
+
// Note: `disabled` is not a breakpoint (it is not a screen size),
|
|
3320
|
+
// so it looks like we never consume this - however, dropdownBib handles this in the setter as "undefined"
|
|
3303
3321
|
if (changedProperties.has('fullscreenBreakpoint')) {
|
|
3304
3322
|
this.bibContent.mobileFullscreenBreakpoint = this.fullscreenBreakpoint;
|
|
3305
3323
|
}
|
|
@@ -3435,7 +3453,7 @@ class AuroDropdown extends LitElement {
|
|
|
3435
3453
|
|
|
3436
3454
|
this.triggerContentSlot.forEach((node) => {
|
|
3437
3455
|
if (node.querySelectorAll) {
|
|
3438
|
-
const auroElements = node.querySelectorAll(
|
|
3456
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3439
3457
|
auroElements.forEach((auroEl) => {
|
|
3440
3458
|
auroEl.addEventListener('focus', this.bindFocusEventToTrigger);
|
|
3441
3459
|
auroEl.addEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -3456,7 +3474,7 @@ class AuroDropdown extends LitElement {
|
|
|
3456
3474
|
|
|
3457
3475
|
this.triggerContentSlot.forEach((node) => {
|
|
3458
3476
|
if (node.querySelectorAll) {
|
|
3459
|
-
const auroElements = node.querySelectorAll(
|
|
3477
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3460
3478
|
auroElements.forEach((auroEl) => {
|
|
3461
3479
|
auroEl.removeEventListener('focus', this.bindFocusEventToTrigger);
|
|
3462
3480
|
auroEl.removeEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -2581,6 +2581,7 @@ var tokensCss$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
|
|
|
2581
2581
|
|
|
2582
2582
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2583
2583
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2584
|
+
'xl',
|
|
2584
2585
|
'lg',
|
|
2585
2586
|
'md',
|
|
2586
2587
|
'sm',
|
|
@@ -2652,6 +2653,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
2652
2653
|
|
|
2653
2654
|
set mobileFullscreenBreakpoint(value) {
|
|
2654
2655
|
// verify the defined breakpoint is valid and exit out if not
|
|
2656
|
+
// 'disabled' is a design token breakpoint so it acts as our "undefined" value
|
|
2655
2657
|
const validatedValue = DESIGN_TOKEN_BREAKPOINT_OPTIONS.includes(value) ? value : undefined;
|
|
2656
2658
|
if (!validatedValue) {
|
|
2657
2659
|
this._mobileBreakpointValue = undefined;
|
|
@@ -3164,7 +3166,12 @@ class AuroDropdown extends LitElement {
|
|
|
3164
3166
|
},
|
|
3165
3167
|
|
|
3166
3168
|
/**
|
|
3167
|
-
* Defines the screen size breakpoint (`
|
|
3169
|
+
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
3170
|
+
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3171
|
+
*
|
|
3172
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3173
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3174
|
+
* @default sm
|
|
3168
3175
|
*/
|
|
3169
3176
|
fullscreenBreakpoint: {
|
|
3170
3177
|
type: String,
|
|
@@ -3287,6 +3294,15 @@ class AuroDropdown extends LitElement {
|
|
|
3287
3294
|
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3288
3295
|
}
|
|
3289
3296
|
|
|
3297
|
+
/**
|
|
3298
|
+
* Accessor for reusing the focusable entity query string.
|
|
3299
|
+
* @private
|
|
3300
|
+
* @returns {string}
|
|
3301
|
+
*/
|
|
3302
|
+
get focusableEntityQuery () {
|
|
3303
|
+
return 'auro-input, [auro-input], auro-button, [auro-button], button, input';
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3290
3306
|
connectedCallback() {
|
|
3291
3307
|
super.connectedCallback();
|
|
3292
3308
|
}
|
|
@@ -3300,6 +3316,8 @@ class AuroDropdown extends LitElement {
|
|
|
3300
3316
|
updated(changedProperties) {
|
|
3301
3317
|
this.floater.handleUpdate(changedProperties);
|
|
3302
3318
|
|
|
3319
|
+
// Note: `disabled` is not a breakpoint (it is not a screen size),
|
|
3320
|
+
// so it looks like we never consume this - however, dropdownBib handles this in the setter as "undefined"
|
|
3303
3321
|
if (changedProperties.has('fullscreenBreakpoint')) {
|
|
3304
3322
|
this.bibContent.mobileFullscreenBreakpoint = this.fullscreenBreakpoint;
|
|
3305
3323
|
}
|
|
@@ -3435,7 +3453,7 @@ class AuroDropdown extends LitElement {
|
|
|
3435
3453
|
|
|
3436
3454
|
this.triggerContentSlot.forEach((node) => {
|
|
3437
3455
|
if (node.querySelectorAll) {
|
|
3438
|
-
const auroElements = node.querySelectorAll(
|
|
3456
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3439
3457
|
auroElements.forEach((auroEl) => {
|
|
3440
3458
|
auroEl.addEventListener('focus', this.bindFocusEventToTrigger);
|
|
3441
3459
|
auroEl.addEventListener('blur', this.bindFocusEventToTrigger);
|
|
@@ -3456,7 +3474,7 @@ class AuroDropdown extends LitElement {
|
|
|
3456
3474
|
|
|
3457
3475
|
this.triggerContentSlot.forEach((node) => {
|
|
3458
3476
|
if (node.querySelectorAll) {
|
|
3459
|
-
const auroElements = node.querySelectorAll(
|
|
3477
|
+
const auroElements = node.querySelectorAll(this.focusableEntityQuery);
|
|
3460
3478
|
auroElements.forEach((auroEl) => {
|
|
3461
3479
|
auroEl.removeEventListener('focus', this.bindFocusEventToTrigger);
|
|
3462
3480
|
auroEl.removeEventListener('blur', this.bindFocusEventToTrigger);
|