@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.0 → 0.0.0-pr624.10
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/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +88 -6
- package/components/bibtemplate/dist/registered.js +88 -6
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.md +30 -29
- package/components/combobox/demo/api.min.js +609 -532
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +607 -530
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +479 -387
- package/components/combobox/dist/registered.js +479 -387
- package/components/counter/demo/api.min.js +377 -62
- package/components/counter/demo/index.min.js +377 -62
- package/components/counter/dist/index.js +377 -62
- package/components/counter/dist/registered.js +377 -62
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +868 -438
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +868 -438
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +710 -280
- package/components/datepicker/dist/registered.js +710 -280
- package/components/dropdown/demo/api.md +2 -2
- package/components/dropdown/demo/api.min.js +199 -37
- package/components/dropdown/demo/index.md +45 -0
- package/components/dropdown/demo/index.min.js +199 -37
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +199 -37
- package/components/dropdown/dist/registered.js +199 -37
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/README.md +1 -1
- package/components/input/demo/api.md +57 -53
- package/components/input/demo/api.min.js +142 -141
- package/components/input/demo/index.md +4 -4
- package/components/input/demo/index.min.js +142 -141
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/auro-input.d.ts +22 -13
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +142 -141
- package/components/input/dist/registered.js +142 -141
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +95 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +115 -130
- package/components/menu/demo/index.min.js +115 -130
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +116 -90
- package/components/menu/dist/registered.js +115 -130
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +108 -42
- package/components/select/demo/api.min.js +1264 -352
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -351
- package/components/select/dist/auro-select.d.ts +110 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1105 -190
- package/components/select/dist/registered.js +1105 -190
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/emphasized}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{style-css.d.ts → classic/bibStyles-css.d.ts} +0 -0
|
@@ -16,7 +16,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
16
16
|
|
|
17
17
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
18
18
|
|
|
19
|
-
class AuroLibraryRuntimeUtils {
|
|
19
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
20
20
|
|
|
21
21
|
/* eslint-disable jsdoc/require-param */
|
|
22
22
|
|
|
@@ -77,7 +77,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
77
77
|
|
|
78
78
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
|
|
82
82
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
83
83
|
// See LICENSE in the project root for license information.
|
|
@@ -273,6 +273,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
273
273
|
|
|
274
274
|
var colorCss = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
275
275
|
|
|
276
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
277
|
+
// See LICENSE in the project root for license information.
|
|
278
|
+
|
|
279
|
+
// ---------------------------------------------------------------------
|
|
280
|
+
|
|
281
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
282
|
+
|
|
283
|
+
class AuroLibraryRuntimeUtils {
|
|
284
|
+
|
|
285
|
+
/* eslint-disable jsdoc/require-param */
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* This will register a new custom element with the browser.
|
|
289
|
+
* @param {String} name - The name of the custom element.
|
|
290
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
291
|
+
* @returns {void}
|
|
292
|
+
*/
|
|
293
|
+
registerComponent(name, componentClass) {
|
|
294
|
+
if (!customElements.get(name)) {
|
|
295
|
+
customElements.define(name, class extends componentClass {});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
301
|
+
* @returns {void}
|
|
302
|
+
*/
|
|
303
|
+
closestElement(
|
|
304
|
+
selector, // selector like in .closest()
|
|
305
|
+
base = this, // extra functionality to skip a parent
|
|
306
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
307
|
+
!el || el === document || el === window
|
|
308
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
309
|
+
: found
|
|
310
|
+
? found // found a selector INside this element
|
|
311
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
312
|
+
) {
|
|
313
|
+
return __Closest(base);
|
|
314
|
+
}
|
|
315
|
+
/* eslint-enable jsdoc/require-param */
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* 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.
|
|
319
|
+
* @param {Object} elem - The element to check.
|
|
320
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
321
|
+
* @returns {void}
|
|
322
|
+
*/
|
|
323
|
+
handleComponentTagRename(elem, tagName) {
|
|
324
|
+
const tag = tagName.toLowerCase();
|
|
325
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
326
|
+
|
|
327
|
+
if (elemTag !== tag) {
|
|
328
|
+
elem.setAttribute(tag, true);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Validates if an element is a specific Auro component.
|
|
334
|
+
* @param {Object} elem - The element to validate.
|
|
335
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
336
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
337
|
+
*/
|
|
338
|
+
elementMatch(elem, tagName) {
|
|
339
|
+
const tag = tagName.toLowerCase();
|
|
340
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
341
|
+
|
|
342
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
276
346
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
277
347
|
// See LICENSE in the project root for license information.
|
|
278
348
|
|
|
@@ -471,7 +541,7 @@ class AuroHeader extends LitElement {
|
|
|
471
541
|
/**
|
|
472
542
|
* @private
|
|
473
543
|
*/
|
|
474
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
544
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
475
545
|
}
|
|
476
546
|
|
|
477
547
|
// function to define props used within the scope of this component
|
|
@@ -501,7 +571,7 @@ class AuroHeader extends LitElement {
|
|
|
501
571
|
*
|
|
502
572
|
*/
|
|
503
573
|
static register(name = "auro-header") {
|
|
504
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
574
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
505
575
|
}
|
|
506
576
|
|
|
507
577
|
firstUpdated() {
|
|
@@ -597,7 +667,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
597
667
|
|
|
598
668
|
this.large = false;
|
|
599
669
|
|
|
600
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
670
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
601
671
|
|
|
602
672
|
const versioning = new AuroDependencyVersioning();
|
|
603
673
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
@@ -636,7 +706,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
636
706
|
*
|
|
637
707
|
*/
|
|
638
708
|
static register(name = "auro-bibtemplate") {
|
|
639
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
709
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
640
710
|
}
|
|
641
711
|
|
|
642
712
|
/**
|
|
@@ -676,6 +746,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
676
746
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
677
747
|
}
|
|
678
748
|
|
|
749
|
+
firstUpdated(changedProperties) {
|
|
750
|
+
super.firstUpdated(changedProperties);
|
|
751
|
+
|
|
752
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
753
|
+
bubbles: true,
|
|
754
|
+
composed: true,
|
|
755
|
+
detail: {
|
|
756
|
+
element: this
|
|
757
|
+
}
|
|
758
|
+
}));
|
|
759
|
+
}
|
|
760
|
+
|
|
679
761
|
// function that renders the HTML and CSS into the scope of the component
|
|
680
762
|
render() {
|
|
681
763
|
return html$1`
|
|
@@ -16,7 +16,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
16
16
|
|
|
17
17
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
18
18
|
|
|
19
|
-
class AuroLibraryRuntimeUtils {
|
|
19
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
20
20
|
|
|
21
21
|
/* eslint-disable jsdoc/require-param */
|
|
22
22
|
|
|
@@ -77,7 +77,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
77
77
|
|
|
78
78
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
|
|
82
82
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
83
83
|
// See LICENSE in the project root for license information.
|
|
@@ -273,6 +273,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
273
273
|
|
|
274
274
|
var colorCss = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
275
275
|
|
|
276
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
277
|
+
// See LICENSE in the project root for license information.
|
|
278
|
+
|
|
279
|
+
// ---------------------------------------------------------------------
|
|
280
|
+
|
|
281
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
282
|
+
|
|
283
|
+
class AuroLibraryRuntimeUtils {
|
|
284
|
+
|
|
285
|
+
/* eslint-disable jsdoc/require-param */
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* This will register a new custom element with the browser.
|
|
289
|
+
* @param {String} name - The name of the custom element.
|
|
290
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
291
|
+
* @returns {void}
|
|
292
|
+
*/
|
|
293
|
+
registerComponent(name, componentClass) {
|
|
294
|
+
if (!customElements.get(name)) {
|
|
295
|
+
customElements.define(name, class extends componentClass {});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
301
|
+
* @returns {void}
|
|
302
|
+
*/
|
|
303
|
+
closestElement(
|
|
304
|
+
selector, // selector like in .closest()
|
|
305
|
+
base = this, // extra functionality to skip a parent
|
|
306
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
307
|
+
!el || el === document || el === window
|
|
308
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
309
|
+
: found
|
|
310
|
+
? found // found a selector INside this element
|
|
311
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
312
|
+
) {
|
|
313
|
+
return __Closest(base);
|
|
314
|
+
}
|
|
315
|
+
/* eslint-enable jsdoc/require-param */
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* 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.
|
|
319
|
+
* @param {Object} elem - The element to check.
|
|
320
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
321
|
+
* @returns {void}
|
|
322
|
+
*/
|
|
323
|
+
handleComponentTagRename(elem, tagName) {
|
|
324
|
+
const tag = tagName.toLowerCase();
|
|
325
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
326
|
+
|
|
327
|
+
if (elemTag !== tag) {
|
|
328
|
+
elem.setAttribute(tag, true);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Validates if an element is a specific Auro component.
|
|
334
|
+
* @param {Object} elem - The element to validate.
|
|
335
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
336
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
337
|
+
*/
|
|
338
|
+
elementMatch(elem, tagName) {
|
|
339
|
+
const tag = tagName.toLowerCase();
|
|
340
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
341
|
+
|
|
342
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
|
|
276
346
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
277
347
|
// See LICENSE in the project root for license information.
|
|
278
348
|
|
|
@@ -471,7 +541,7 @@ class AuroHeader extends LitElement {
|
|
|
471
541
|
/**
|
|
472
542
|
* @private
|
|
473
543
|
*/
|
|
474
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
544
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
475
545
|
}
|
|
476
546
|
|
|
477
547
|
// function to define props used within the scope of this component
|
|
@@ -501,7 +571,7 @@ class AuroHeader extends LitElement {
|
|
|
501
571
|
*
|
|
502
572
|
*/
|
|
503
573
|
static register(name = "auro-header") {
|
|
504
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
574
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
505
575
|
}
|
|
506
576
|
|
|
507
577
|
firstUpdated() {
|
|
@@ -597,7 +667,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
597
667
|
|
|
598
668
|
this.large = false;
|
|
599
669
|
|
|
600
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
670
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
601
671
|
|
|
602
672
|
const versioning = new AuroDependencyVersioning();
|
|
603
673
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
@@ -636,7 +706,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
636
706
|
*
|
|
637
707
|
*/
|
|
638
708
|
static register(name = "auro-bibtemplate") {
|
|
639
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
709
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
640
710
|
}
|
|
641
711
|
|
|
642
712
|
/**
|
|
@@ -676,6 +746,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
676
746
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
677
747
|
}
|
|
678
748
|
|
|
749
|
+
firstUpdated(changedProperties) {
|
|
750
|
+
super.firstUpdated(changedProperties);
|
|
751
|
+
|
|
752
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
753
|
+
bubbles: true,
|
|
754
|
+
composed: true,
|
|
755
|
+
detail: {
|
|
756
|
+
element: this
|
|
757
|
+
}
|
|
758
|
+
}));
|
|
759
|
+
}
|
|
760
|
+
|
|
679
761
|
// function that renders the HTML and CSS into the scope of the component
|
|
680
762
|
render() {
|
|
681
763
|
return html$1`
|
|
@@ -453,9 +453,10 @@ class DateFormatter {
|
|
|
453
453
|
/**
|
|
454
454
|
* Convert a date object to string format.
|
|
455
455
|
* @param {Object} date - Date to convert to string.
|
|
456
|
-
* @
|
|
456
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
457
|
+
* @returns {String} Returns the date as a string.
|
|
457
458
|
*/
|
|
458
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
459
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
459
460
|
year: "numeric",
|
|
460
461
|
month: "2-digit",
|
|
461
462
|
day: "2-digit",
|
|
@@ -647,7 +648,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
647
648
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
648
649
|
|
|
649
650
|
// Get the date string of the date object we created from the string date
|
|
650
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
651
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
651
652
|
|
|
652
653
|
// Guard Clause: Generated date matches date string input
|
|
653
654
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -445,9 +445,10 @@ class DateFormatter {
|
|
|
445
445
|
/**
|
|
446
446
|
* Convert a date object to string format.
|
|
447
447
|
* @param {Object} date - Date to convert to string.
|
|
448
|
-
* @
|
|
448
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
449
|
+
* @returns {String} Returns the date as a string.
|
|
449
450
|
*/
|
|
450
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
451
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
451
452
|
year: "numeric",
|
|
452
453
|
month: "2-digit",
|
|
453
454
|
day: "2-digit",
|
|
@@ -639,7 +640,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
639
640
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
640
641
|
|
|
641
642
|
// Get the date string of the date object we created from the string date
|
|
642
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
643
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
643
644
|
|
|
644
645
|
// Guard Clause: Generated date matches date string input
|
|
645
646
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -398,9 +398,10 @@ class DateFormatter {
|
|
|
398
398
|
/**
|
|
399
399
|
* Convert a date object to string format.
|
|
400
400
|
* @param {Object} date - Date to convert to string.
|
|
401
|
-
* @
|
|
401
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
402
|
+
* @returns {String} Returns the date as a string.
|
|
402
403
|
*/
|
|
403
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
404
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
404
405
|
year: "numeric",
|
|
405
406
|
month: "2-digit",
|
|
406
407
|
day: "2-digit",
|
|
@@ -592,7 +593,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
592
593
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
593
594
|
|
|
594
595
|
// Get the date string of the date object we created from the string date
|
|
595
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
596
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
596
597
|
|
|
597
598
|
// Guard Clause: Generated date matches date string input
|
|
598
599
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -398,9 +398,10 @@ class DateFormatter {
|
|
|
398
398
|
/**
|
|
399
399
|
* Convert a date object to string format.
|
|
400
400
|
* @param {Object} date - Date to convert to string.
|
|
401
|
-
* @
|
|
401
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
402
|
+
* @returns {String} Returns the date as a string.
|
|
402
403
|
*/
|
|
403
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
404
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
404
405
|
year: "numeric",
|
|
405
406
|
month: "2-digit",
|
|
406
407
|
day: "2-digit",
|
|
@@ -592,7 +593,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
592
593
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
593
594
|
|
|
594
595
|
// Get the date string of the date object we created from the string date
|
|
595
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
596
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
596
597
|
|
|
597
598
|
// Guard Clause: Generated date matches date string input
|
|
598
599
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -5,33 +5,34 @@
|
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
|
-
| Property | Attribute | Type
|
|
9
|
-
|
|
10
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
11
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
12
|
-
| [checkmark](#checkmark) | `checkmark` | `boolean`
|
|
13
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
14
|
-
| [error](#error) | `error` | `string`
|
|
15
|
-
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string`
|
|
16
|
-
| [inputmode](#inputmode) | `inputmode` | `string`
|
|
17
|
-
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean`
|
|
18
|
-
| [layout](#layout) | | `string`
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
8
|
+
| Property | Attribute | Type | Default | Description |
|
|
9
|
+
|---------------------------------|---------------------------------|---------------|----------------|--------------------------------------------------|
|
|
10
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | | If declared, bib's position will be automatically calculated where to appear. |
|
|
11
|
+
| [autocomplete](#autocomplete) | `autocomplete` | `string` | "false" | An enumerated attribute that defines what the user agent can suggest for autofill. At this time, only `autocomplete="off"` is supported. |
|
|
12
|
+
| [checkmark](#checkmark) | `checkmark` | `boolean` | | When attribute is present auro-menu will apply checkmarks to selected options. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the combobox. |
|
|
14
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [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. |
|
|
16
|
+
| [inputmode](#inputmode) | `inputmode` | `string` | | Exposes inputmode attribute for input. |
|
|
17
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600 |
|
|
18
|
+
| [layout](#layout) | | `string` | | |
|
|
19
|
+
| [matchWidth](#matchWidth) | `matchWidth` | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
|
|
20
|
+
| [noFilter](#noFilter) | `noFilter` | `boolean` | | If set, combobox will not filter menuoptions based in input. |
|
|
21
|
+
| [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`. |
|
|
22
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
23
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
24
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
25
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement` | | Specifies the current selected option. |
|
|
26
|
+
| [placeholder](#placeholder) | `placeholder` | `string` | | Define custom placeholder text, only supported by date input formats. |
|
|
27
|
+
| [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" |
|
|
28
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the input. Used for client-side validation. |
|
|
29
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
30
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
31
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
32
|
+
| [triggerIcon](#triggerIcon) | `triggerIcon` | `boolean` | | If set, the `icon` attribute will be applied to the trigger `auro-input` element. |
|
|
33
|
+
| [type](#type) | `type` | `string` | | Applies the defined value as the type attribute on auro-input. |
|
|
34
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
35
|
+
| [value](#value) | `value` | `string` | | Value selected for the dropdown menu. |
|
|
35
36
|
|
|
36
37
|
## Methods
|
|
37
38
|
|
|
@@ -687,11 +688,11 @@ export function valueExample() {
|
|
|
687
688
|
const valueExample = document.querySelector('#valueExample');
|
|
688
689
|
|
|
689
690
|
document.querySelector('#valueValidExampleBtn').addEventListener('click', () => {
|
|
690
|
-
valueExample.value =
|
|
691
|
+
valueExample.value = 'Oranges';
|
|
691
692
|
});
|
|
692
693
|
|
|
693
694
|
document.querySelector('#valueInvalidExampleBtn').addEventListener('click', () => {
|
|
694
|
-
valueExample.value =
|
|
695
|
+
valueExample.value = 'Dragon Fruit';
|
|
695
696
|
});
|
|
696
697
|
|
|
697
698
|
document.querySelector('#valueUndefinedExampleBtn').addEventListener('click', () => {
|