@aurodesignsystem-dev/auro-formkit 0.0.0-pr1429.0 → 0.0.0-pr1430.0
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/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.html +0 -1
- package/components/combobox/demo/api.js +1 -3
- package/components/combobox/demo/api.md +0 -75
- package/components/combobox/demo/api.min.js +120 -30
- package/components/combobox/demo/index.min.js +119 -17
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +1 -1
- package/components/combobox/dist/index.js +119 -17
- package/components/combobox/dist/registered.js +119 -17
- package/components/counter/demo/api.html +0 -3
- package/components/counter/demo/api.js +0 -4
- package/components/counter/demo/api.md +0 -130
- package/components/counter/demo/api.min.js +129 -58
- package/components/counter/demo/index.min.js +129 -38
- package/components/counter/dist/index.js +129 -38
- package/components/counter/dist/registered.js +129 -38
- package/components/datepicker/demo/api.html +0 -1
- package/components/datepicker/demo/api.js +0 -2
- package/components/datepicker/demo/api.md +0 -55
- package/components/datepicker/demo/api.min.js +121 -102
- package/components/datepicker/demo/index.min.js +121 -90
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +1 -3
- package/components/datepicker/dist/index.js +121 -90
- package/components/datepicker/dist/registered.js +121 -90
- package/components/dropdown/demo/api.html +0 -1
- package/components/dropdown/demo/api.js +0 -2
- package/components/dropdown/demo/api.md +0 -95
- package/components/dropdown/demo/api.min.js +115 -24
- package/components/dropdown/demo/index.min.js +115 -4
- package/components/dropdown/dist/index.js +115 -4
- package/components/dropdown/dist/registered.js +115 -4
- package/components/form/demo/api.min.js +533 -201
- package/components/form/demo/index.min.js +533 -201
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.html +0 -1
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +0 -79
- package/components/select/demo/api.min.js +127 -35
- package/components/select/demo/index.min.js +127 -19
- package/components/select/dist/index.js +123 -15
- package/components/select/dist/registered.js +123 -15
- package/custom-elements.json +3 -27
- package/package.json +2 -3
- package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +0 -3
|
@@ -77,7 +77,7 @@ const t$1={ATTRIBUTE:1,CHILD:2},e$5=t=>(...e)=>({_$litDirective$:t,values:e});le
|
|
|
77
77
|
|
|
78
78
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
79
79
|
|
|
80
|
-
let AuroLibraryRuntimeUtils$
|
|
80
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
81
81
|
|
|
82
82
|
/* eslint-disable jsdoc/require-param */
|
|
83
83
|
|
|
@@ -1866,6 +1866,7 @@ class AuroFloatingUI {
|
|
|
1866
1866
|
this.focusHandler = null;
|
|
1867
1867
|
this.clickHandler = null;
|
|
1868
1868
|
this.keyDownHandler = null;
|
|
1869
|
+
this.touchHandler = null;
|
|
1869
1870
|
|
|
1870
1871
|
/**
|
|
1871
1872
|
* @private
|
|
@@ -2283,6 +2284,28 @@ class AuroFloatingUI {
|
|
|
2283
2284
|
setTimeout(() => {
|
|
2284
2285
|
window.addEventListener("click", this.clickHandler);
|
|
2285
2286
|
}, 0);
|
|
2287
|
+
|
|
2288
|
+
// iOS Safari does not fire `click` on non-interactive elements, so
|
|
2289
|
+
// tapping an inert backdrop never reaches the click handler above.
|
|
2290
|
+
// Mirror the same outside-tap logic with a passive touchstart listener.
|
|
2291
|
+
this.touchHandler = (evt) => {
|
|
2292
|
+
const element = this.element;
|
|
2293
|
+
if (!element?.bib) {
|
|
2294
|
+
return;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
// fullscreen (modal) dialog handles its own dismissal
|
|
2298
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
2299
|
+
return;
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
const path = evt.composedPath();
|
|
2303
|
+
if (!path.includes(element.trigger) && !path.includes(element.bib)) {
|
|
2304
|
+
this.hideBib("click");
|
|
2305
|
+
}
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
window.addEventListener("touchstart", this.touchHandler, { passive: true });
|
|
2286
2309
|
}
|
|
2287
2310
|
|
|
2288
2311
|
cleanupHideHandlers() {
|
|
@@ -2298,6 +2321,11 @@ class AuroFloatingUI {
|
|
|
2298
2321
|
this.clickHandler = null;
|
|
2299
2322
|
}
|
|
2300
2323
|
|
|
2324
|
+
if (this.touchHandler) {
|
|
2325
|
+
window.removeEventListener("touchstart", this.touchHandler);
|
|
2326
|
+
this.touchHandler = null;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2301
2329
|
if (this.keyDownHandler) {
|
|
2302
2330
|
document.removeEventListener("keydown", this.keyDownHandler);
|
|
2303
2331
|
this.keyDownHandler = null;
|
|
@@ -3115,6 +3143,89 @@ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,cl
|
|
|
3115
3143
|
|
|
3116
3144
|
var iconVersion = '9.1.2';
|
|
3117
3145
|
|
|
3146
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3147
|
+
// See LICENSE in the project root for license information.
|
|
3148
|
+
|
|
3149
|
+
// ---------------------------------------------------------------------
|
|
3150
|
+
|
|
3151
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3152
|
+
|
|
3153
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
3154
|
+
|
|
3155
|
+
/* eslint-disable jsdoc/require-param */
|
|
3156
|
+
|
|
3157
|
+
/**
|
|
3158
|
+
* This will register a new custom element with the browser.
|
|
3159
|
+
* @param {String} name - The name of the custom element.
|
|
3160
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3161
|
+
* @returns {void}
|
|
3162
|
+
*/
|
|
3163
|
+
registerComponent(name, componentClass) {
|
|
3164
|
+
if (!customElements.get(name)) {
|
|
3165
|
+
customElements.define(name, class extends componentClass {});
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/**
|
|
3170
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3171
|
+
* @returns {void}
|
|
3172
|
+
*/
|
|
3173
|
+
closestElement(
|
|
3174
|
+
selector, // selector like in .closest()
|
|
3175
|
+
base = this, // extra functionality to skip a parent
|
|
3176
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3177
|
+
!el || el === document || el === window
|
|
3178
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3179
|
+
: found
|
|
3180
|
+
? found // found a selector INside this element
|
|
3181
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3182
|
+
) {
|
|
3183
|
+
return __Closest(base);
|
|
3184
|
+
}
|
|
3185
|
+
/* eslint-enable jsdoc/require-param */
|
|
3186
|
+
|
|
3187
|
+
/**
|
|
3188
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3189
|
+
* @param {Object} elem - The element to check.
|
|
3190
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3191
|
+
* @returns {void}
|
|
3192
|
+
*/
|
|
3193
|
+
handleComponentTagRename(elem, tagName) {
|
|
3194
|
+
const tag = tagName.toLowerCase();
|
|
3195
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3196
|
+
|
|
3197
|
+
if (elemTag !== tag) {
|
|
3198
|
+
elem.setAttribute(tag, true);
|
|
3199
|
+
}
|
|
3200
|
+
}
|
|
3201
|
+
|
|
3202
|
+
/**
|
|
3203
|
+
* Validates if an element is a specific Auro component.
|
|
3204
|
+
* @param {Object} elem - The element to validate.
|
|
3205
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3206
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3207
|
+
*/
|
|
3208
|
+
elementMatch(elem, tagName) {
|
|
3209
|
+
const tag = tagName.toLowerCase();
|
|
3210
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3211
|
+
|
|
3212
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
/**
|
|
3216
|
+
* Gets the text content of a named slot.
|
|
3217
|
+
* @returns {String}
|
|
3218
|
+
* @private
|
|
3219
|
+
*/
|
|
3220
|
+
getSlotText(elem, name) {
|
|
3221
|
+
const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
|
|
3222
|
+
const nodes = slot?.assignedNodes({ flatten: true }) || [];
|
|
3223
|
+
const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
|
|
3224
|
+
|
|
3225
|
+
return text || null;
|
|
3226
|
+
}
|
|
3227
|
+
};
|
|
3228
|
+
|
|
3118
3229
|
/**
|
|
3119
3230
|
* @license
|
|
3120
3231
|
* Copyright 2017 Google LLC
|
|
@@ -3803,7 +3914,7 @@ class AuroHelpText extends i {
|
|
|
3803
3914
|
}
|
|
3804
3915
|
}
|
|
3805
3916
|
|
|
3806
|
-
var formkitVersion = '
|
|
3917
|
+
var formkitVersion = '202604082129';
|
|
3807
3918
|
|
|
3808
3919
|
class AuroElement extends i {
|
|
3809
3920
|
static get properties() {
|
|
@@ -4014,7 +4125,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4014
4125
|
/**
|
|
4015
4126
|
* @private
|
|
4016
4127
|
*/
|
|
4017
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4128
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
4018
4129
|
|
|
4019
4130
|
/**
|
|
4020
4131
|
* @private
|
|
@@ -4432,7 +4543,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4432
4543
|
*
|
|
4433
4544
|
*/
|
|
4434
4545
|
static register(name = "auro-dropdown") {
|
|
4435
|
-
AuroLibraryRuntimeUtils$
|
|
4546
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
|
|
4436
4547
|
}
|
|
4437
4548
|
|
|
4438
4549
|
/**
|
|
@@ -13,7 +13,7 @@ import 'lit-html/directives/unsafe-html.js';
|
|
|
13
13
|
|
|
14
14
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15
15
|
|
|
16
|
-
let AuroLibraryRuntimeUtils$
|
|
16
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
17
17
|
|
|
18
18
|
/* eslint-disable jsdoc/require-param */
|
|
19
19
|
|
|
@@ -1802,6 +1802,7 @@ class AuroFloatingUI {
|
|
|
1802
1802
|
this.focusHandler = null;
|
|
1803
1803
|
this.clickHandler = null;
|
|
1804
1804
|
this.keyDownHandler = null;
|
|
1805
|
+
this.touchHandler = null;
|
|
1805
1806
|
|
|
1806
1807
|
/**
|
|
1807
1808
|
* @private
|
|
@@ -2219,6 +2220,28 @@ class AuroFloatingUI {
|
|
|
2219
2220
|
setTimeout(() => {
|
|
2220
2221
|
window.addEventListener("click", this.clickHandler);
|
|
2221
2222
|
}, 0);
|
|
2223
|
+
|
|
2224
|
+
// iOS Safari does not fire `click` on non-interactive elements, so
|
|
2225
|
+
// tapping an inert backdrop never reaches the click handler above.
|
|
2226
|
+
// Mirror the same outside-tap logic with a passive touchstart listener.
|
|
2227
|
+
this.touchHandler = (evt) => {
|
|
2228
|
+
const element = this.element;
|
|
2229
|
+
if (!element?.bib) {
|
|
2230
|
+
return;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
// fullscreen (modal) dialog handles its own dismissal
|
|
2234
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
2235
|
+
return;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
const path = evt.composedPath();
|
|
2239
|
+
if (!path.includes(element.trigger) && !path.includes(element.bib)) {
|
|
2240
|
+
this.hideBib("click");
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
|
|
2244
|
+
window.addEventListener("touchstart", this.touchHandler, { passive: true });
|
|
2222
2245
|
}
|
|
2223
2246
|
|
|
2224
2247
|
cleanupHideHandlers() {
|
|
@@ -2234,6 +2257,11 @@ class AuroFloatingUI {
|
|
|
2234
2257
|
this.clickHandler = null;
|
|
2235
2258
|
}
|
|
2236
2259
|
|
|
2260
|
+
if (this.touchHandler) {
|
|
2261
|
+
window.removeEventListener("touchstart", this.touchHandler);
|
|
2262
|
+
this.touchHandler = null;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2237
2265
|
if (this.keyDownHandler) {
|
|
2238
2266
|
document.removeEventListener("keydown", this.keyDownHandler);
|
|
2239
2267
|
this.keyDownHandler = null;
|
|
@@ -3026,6 +3054,89 @@ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,cl
|
|
|
3026
3054
|
|
|
3027
3055
|
var iconVersion = '9.1.2';
|
|
3028
3056
|
|
|
3057
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3058
|
+
// See LICENSE in the project root for license information.
|
|
3059
|
+
|
|
3060
|
+
// ---------------------------------------------------------------------
|
|
3061
|
+
|
|
3062
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3063
|
+
|
|
3064
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
3065
|
+
|
|
3066
|
+
/* eslint-disable jsdoc/require-param */
|
|
3067
|
+
|
|
3068
|
+
/**
|
|
3069
|
+
* This will register a new custom element with the browser.
|
|
3070
|
+
* @param {String} name - The name of the custom element.
|
|
3071
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3072
|
+
* @returns {void}
|
|
3073
|
+
*/
|
|
3074
|
+
registerComponent(name, componentClass) {
|
|
3075
|
+
if (!customElements.get(name)) {
|
|
3076
|
+
customElements.define(name, class extends componentClass {});
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
/**
|
|
3081
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3082
|
+
* @returns {void}
|
|
3083
|
+
*/
|
|
3084
|
+
closestElement(
|
|
3085
|
+
selector, // selector like in .closest()
|
|
3086
|
+
base = this, // extra functionality to skip a parent
|
|
3087
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3088
|
+
!el || el === document || el === window
|
|
3089
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3090
|
+
: found
|
|
3091
|
+
? found // found a selector INside this element
|
|
3092
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3093
|
+
) {
|
|
3094
|
+
return __Closest(base);
|
|
3095
|
+
}
|
|
3096
|
+
/* eslint-enable jsdoc/require-param */
|
|
3097
|
+
|
|
3098
|
+
/**
|
|
3099
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3100
|
+
* @param {Object} elem - The element to check.
|
|
3101
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3102
|
+
* @returns {void}
|
|
3103
|
+
*/
|
|
3104
|
+
handleComponentTagRename(elem, tagName) {
|
|
3105
|
+
const tag = tagName.toLowerCase();
|
|
3106
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3107
|
+
|
|
3108
|
+
if (elemTag !== tag) {
|
|
3109
|
+
elem.setAttribute(tag, true);
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Validates if an element is a specific Auro component.
|
|
3115
|
+
* @param {Object} elem - The element to validate.
|
|
3116
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3117
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3118
|
+
*/
|
|
3119
|
+
elementMatch(elem, tagName) {
|
|
3120
|
+
const tag = tagName.toLowerCase();
|
|
3121
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3122
|
+
|
|
3123
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
/**
|
|
3127
|
+
* Gets the text content of a named slot.
|
|
3128
|
+
* @returns {String}
|
|
3129
|
+
* @private
|
|
3130
|
+
*/
|
|
3131
|
+
getSlotText(elem, name) {
|
|
3132
|
+
const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
|
|
3133
|
+
const nodes = slot?.assignedNodes({ flatten: true }) || [];
|
|
3134
|
+
const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
|
|
3135
|
+
|
|
3136
|
+
return text || null;
|
|
3137
|
+
}
|
|
3138
|
+
};
|
|
3139
|
+
|
|
3029
3140
|
/**
|
|
3030
3141
|
* Computes display state once per keydown event.
|
|
3031
3142
|
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
@@ -3708,7 +3819,7 @@ class AuroHelpText extends LitElement {
|
|
|
3708
3819
|
}
|
|
3709
3820
|
}
|
|
3710
3821
|
|
|
3711
|
-
var formkitVersion = '
|
|
3822
|
+
var formkitVersion = '202604082129';
|
|
3712
3823
|
|
|
3713
3824
|
class AuroElement extends LitElement {
|
|
3714
3825
|
static get properties() {
|
|
@@ -3919,7 +4030,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3919
4030
|
/**
|
|
3920
4031
|
* @private
|
|
3921
4032
|
*/
|
|
3922
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4033
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
3923
4034
|
|
|
3924
4035
|
/**
|
|
3925
4036
|
* @private
|
|
@@ -4337,7 +4448,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4337
4448
|
*
|
|
4338
4449
|
*/
|
|
4339
4450
|
static register(name = "auro-dropdown") {
|
|
4340
|
-
AuroLibraryRuntimeUtils$
|
|
4451
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
|
|
4341
4452
|
}
|
|
4342
4453
|
|
|
4343
4454
|
/**
|
|
@@ -13,7 +13,7 @@ import 'lit-html/directives/unsafe-html.js';
|
|
|
13
13
|
|
|
14
14
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15
15
|
|
|
16
|
-
let AuroLibraryRuntimeUtils$
|
|
16
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
17
17
|
|
|
18
18
|
/* eslint-disable jsdoc/require-param */
|
|
19
19
|
|
|
@@ -1802,6 +1802,7 @@ class AuroFloatingUI {
|
|
|
1802
1802
|
this.focusHandler = null;
|
|
1803
1803
|
this.clickHandler = null;
|
|
1804
1804
|
this.keyDownHandler = null;
|
|
1805
|
+
this.touchHandler = null;
|
|
1805
1806
|
|
|
1806
1807
|
/**
|
|
1807
1808
|
* @private
|
|
@@ -2219,6 +2220,28 @@ class AuroFloatingUI {
|
|
|
2219
2220
|
setTimeout(() => {
|
|
2220
2221
|
window.addEventListener("click", this.clickHandler);
|
|
2221
2222
|
}, 0);
|
|
2223
|
+
|
|
2224
|
+
// iOS Safari does not fire `click` on non-interactive elements, so
|
|
2225
|
+
// tapping an inert backdrop never reaches the click handler above.
|
|
2226
|
+
// Mirror the same outside-tap logic with a passive touchstart listener.
|
|
2227
|
+
this.touchHandler = (evt) => {
|
|
2228
|
+
const element = this.element;
|
|
2229
|
+
if (!element?.bib) {
|
|
2230
|
+
return;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
// fullscreen (modal) dialog handles its own dismissal
|
|
2234
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
2235
|
+
return;
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
const path = evt.composedPath();
|
|
2239
|
+
if (!path.includes(element.trigger) && !path.includes(element.bib)) {
|
|
2240
|
+
this.hideBib("click");
|
|
2241
|
+
}
|
|
2242
|
+
};
|
|
2243
|
+
|
|
2244
|
+
window.addEventListener("touchstart", this.touchHandler, { passive: true });
|
|
2222
2245
|
}
|
|
2223
2246
|
|
|
2224
2247
|
cleanupHideHandlers() {
|
|
@@ -2234,6 +2257,11 @@ class AuroFloatingUI {
|
|
|
2234
2257
|
this.clickHandler = null;
|
|
2235
2258
|
}
|
|
2236
2259
|
|
|
2260
|
+
if (this.touchHandler) {
|
|
2261
|
+
window.removeEventListener("touchstart", this.touchHandler);
|
|
2262
|
+
this.touchHandler = null;
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2237
2265
|
if (this.keyDownHandler) {
|
|
2238
2266
|
document.removeEventListener("keydown", this.keyDownHandler);
|
|
2239
2267
|
this.keyDownHandler = null;
|
|
@@ -3026,6 +3054,89 @@ class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,cl
|
|
|
3026
3054
|
|
|
3027
3055
|
var iconVersion = '9.1.2';
|
|
3028
3056
|
|
|
3057
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3058
|
+
// See LICENSE in the project root for license information.
|
|
3059
|
+
|
|
3060
|
+
// ---------------------------------------------------------------------
|
|
3061
|
+
|
|
3062
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3063
|
+
|
|
3064
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
3065
|
+
|
|
3066
|
+
/* eslint-disable jsdoc/require-param */
|
|
3067
|
+
|
|
3068
|
+
/**
|
|
3069
|
+
* This will register a new custom element with the browser.
|
|
3070
|
+
* @param {String} name - The name of the custom element.
|
|
3071
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3072
|
+
* @returns {void}
|
|
3073
|
+
*/
|
|
3074
|
+
registerComponent(name, componentClass) {
|
|
3075
|
+
if (!customElements.get(name)) {
|
|
3076
|
+
customElements.define(name, class extends componentClass {});
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
|
|
3080
|
+
/**
|
|
3081
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3082
|
+
* @returns {void}
|
|
3083
|
+
*/
|
|
3084
|
+
closestElement(
|
|
3085
|
+
selector, // selector like in .closest()
|
|
3086
|
+
base = this, // extra functionality to skip a parent
|
|
3087
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3088
|
+
!el || el === document || el === window
|
|
3089
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3090
|
+
: found
|
|
3091
|
+
? found // found a selector INside this element
|
|
3092
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3093
|
+
) {
|
|
3094
|
+
return __Closest(base);
|
|
3095
|
+
}
|
|
3096
|
+
/* eslint-enable jsdoc/require-param */
|
|
3097
|
+
|
|
3098
|
+
/**
|
|
3099
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
3100
|
+
* @param {Object} elem - The element to check.
|
|
3101
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3102
|
+
* @returns {void}
|
|
3103
|
+
*/
|
|
3104
|
+
handleComponentTagRename(elem, tagName) {
|
|
3105
|
+
const tag = tagName.toLowerCase();
|
|
3106
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3107
|
+
|
|
3108
|
+
if (elemTag !== tag) {
|
|
3109
|
+
elem.setAttribute(tag, true);
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
/**
|
|
3114
|
+
* Validates if an element is a specific Auro component.
|
|
3115
|
+
* @param {Object} elem - The element to validate.
|
|
3116
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3117
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3118
|
+
*/
|
|
3119
|
+
elementMatch(elem, tagName) {
|
|
3120
|
+
const tag = tagName.toLowerCase();
|
|
3121
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3122
|
+
|
|
3123
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3124
|
+
}
|
|
3125
|
+
|
|
3126
|
+
/**
|
|
3127
|
+
* Gets the text content of a named slot.
|
|
3128
|
+
* @returns {String}
|
|
3129
|
+
* @private
|
|
3130
|
+
*/
|
|
3131
|
+
getSlotText(elem, name) {
|
|
3132
|
+
const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
|
|
3133
|
+
const nodes = slot?.assignedNodes({ flatten: true }) || [];
|
|
3134
|
+
const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
|
|
3135
|
+
|
|
3136
|
+
return text || null;
|
|
3137
|
+
}
|
|
3138
|
+
};
|
|
3139
|
+
|
|
3029
3140
|
/**
|
|
3030
3141
|
* Computes display state once per keydown event.
|
|
3031
3142
|
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
@@ -3708,7 +3819,7 @@ class AuroHelpText extends LitElement {
|
|
|
3708
3819
|
}
|
|
3709
3820
|
}
|
|
3710
3821
|
|
|
3711
|
-
var formkitVersion = '
|
|
3822
|
+
var formkitVersion = '202604082129';
|
|
3712
3823
|
|
|
3713
3824
|
class AuroElement extends LitElement {
|
|
3714
3825
|
static get properties() {
|
|
@@ -3919,7 +4030,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3919
4030
|
/**
|
|
3920
4031
|
* @private
|
|
3921
4032
|
*/
|
|
3922
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
4033
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
3923
4034
|
|
|
3924
4035
|
/**
|
|
3925
4036
|
* @private
|
|
@@ -4337,7 +4448,7 @@ class AuroDropdown extends AuroElement {
|
|
|
4337
4448
|
*
|
|
4338
4449
|
*/
|
|
4339
4450
|
static register(name = "auro-dropdown") {
|
|
4340
|
-
AuroLibraryRuntimeUtils$
|
|
4451
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
|
|
4341
4452
|
}
|
|
4342
4453
|
|
|
4343
4454
|
/**
|