@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.2 → 0.0.0-pr624.21
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 +13 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1292 -79
- package/components/bibtemplate/dist/registered.js +1292 -79
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +8 -9
- package/components/checkbox/demo/api.min.js +30 -24
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +30 -24
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +30 -24
- package/components/checkbox/dist/registered.js +30 -24
- package/components/combobox/demo/api.md +53 -0
- package/components/combobox/demo/api.min.js +2898 -753
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2898 -753
- package/components/combobox/dist/auro-combobox.d.ts +12 -12
- package/components/combobox/dist/index.js +2646 -642
- package/components/combobox/dist/registered.js +2646 -642
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +3648 -929
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +3648 -929
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +105 -6
- package/components/counter/dist/auro-counter.d.ts +6 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +3648 -929
- package/components/counter/dist/registered.js +3648 -929
- package/components/datepicker/demo/api.md +36 -19
- package/components/datepicker/demo/api.min.js +11437 -7744
- package/components/datepicker/demo/index.md +80 -0
- package/components/datepicker/demo/index.min.js +11437 -7744
- package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
- package/components/datepicker/dist/buttonVersion.d.ts +1 -1
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +13847 -10154
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +13847 -10154
- package/components/dropdown/demo/api.md +6 -7
- package/components/dropdown/demo/api.min.js +238 -144
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +238 -144
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -9
- package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
- package/components/dropdown/dist/index.js +238 -144
- package/components/dropdown/dist/registered.js +238 -144
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/form/dist/index.js +1 -1
- package/components/form/dist/registered.js +1 -1
- package/components/helptext/dist/index.js +2 -2
- package/components/helptext/dist/registered.js +2 -2
- package/components/input/demo/api.md +63 -56
- package/components/input/demo/api.min.js +983 -269
- package/components/input/demo/index.min.js +982 -268
- package/components/input/dist/auro-input.d.ts +202 -14
- package/components/input/dist/base-input.d.ts +30 -7
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +982 -268
- package/components/input/dist/registered.js +982 -268
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +68 -7
- package/components/menu/demo/api.min.js +278 -42
- package/components/menu/demo/index.min.js +278 -42
- package/components/menu/dist/auro-menu.d.ts +28 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +278 -42
- package/components/menu/dist/registered.js +278 -42
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.md +2 -2
- package/components/radio/demo/api.min.js +10 -7
- package/components/radio/demo/index.min.js +10 -7
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +10 -7
- package/components/radio/dist/registered.js +10 -7
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +78 -12
- package/components/select/demo/api.min.js +2797 -538
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +325 -763
- package/components/select/demo/index.min.js +2790 -543
- package/components/select/dist/auro-select.d.ts +111 -11
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +2533 -427
- package/components/select/dist/registered.js +2533 -427
- 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 +6 -4
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
- /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
- /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
- /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
|
@@ -76,7 +76,7 @@ const t=globalThis,e$1=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShad
|
|
|
76
76
|
|
|
77
77
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
78
78
|
|
|
79
|
-
let AuroLibraryRuntimeUtils$
|
|
79
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
80
80
|
|
|
81
81
|
/* eslint-disable jsdoc/require-param */
|
|
82
82
|
|
|
@@ -659,10 +659,11 @@ const flip$1 = function (options) {
|
|
|
659
659
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
660
660
|
const nextPlacement = placements[nextIndex];
|
|
661
661
|
if (nextPlacement) {
|
|
662
|
-
var _overflowsData$;
|
|
663
662
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
664
|
-
|
|
665
|
-
if
|
|
663
|
+
if (!ignoreCrossAxisOverflow ||
|
|
664
|
+
// We leave the current main axis only if every placement on that axis
|
|
665
|
+
// overflows the main axis.
|
|
666
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
666
667
|
// Try next placement and re-run the lifecycle.
|
|
667
668
|
return {
|
|
668
669
|
data: {
|
|
@@ -1683,8 +1684,28 @@ class AuroFloatingUI {
|
|
|
1683
1684
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
1684
1685
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
1685
1686
|
|
|
1687
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
1688
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
1689
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1690
|
+
}
|
|
1686
1691
|
const mouseEventGlobalHandler = (event) => {
|
|
1687
|
-
|
|
1692
|
+
const isPressed = event.type === 'mousedown';
|
|
1693
|
+
if (isPressed) {
|
|
1694
|
+
// Clear any pending timeout to prevent race condition
|
|
1695
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
1696
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
1697
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1698
|
+
}
|
|
1699
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
1700
|
+
AuroFloatingUI.isMousePressed = true;
|
|
1701
|
+
}
|
|
1702
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
1703
|
+
// Schedule reset and track timeout ID
|
|
1704
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
1705
|
+
AuroFloatingUI.isMousePressed = false;
|
|
1706
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1707
|
+
}, 0);
|
|
1708
|
+
}
|
|
1688
1709
|
};
|
|
1689
1710
|
|
|
1690
1711
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -1811,6 +1832,7 @@ class AuroFloatingUI {
|
|
|
1811
1832
|
|
|
1812
1833
|
// Compute the position of the bib
|
|
1813
1834
|
computePosition(this.element.trigger, this.element.bib, {
|
|
1835
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
1814
1836
|
placement: this.element.floaterConfig?.placement,
|
|
1815
1837
|
middleware: middleware || []
|
|
1816
1838
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -1945,8 +1967,9 @@ class AuroFloatingUI {
|
|
|
1945
1967
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
1946
1968
|
return;
|
|
1947
1969
|
}
|
|
1948
|
-
|
|
1949
|
-
if
|
|
1970
|
+
|
|
1971
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
1972
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
1950
1973
|
return;
|
|
1951
1974
|
}
|
|
1952
1975
|
|
|
@@ -2247,8 +2270,6 @@ class AuroFloatingUI {
|
|
|
2247
2270
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
2248
2271
|
}
|
|
2249
2272
|
|
|
2250
|
-
document.body.append(this.element.bib);
|
|
2251
|
-
|
|
2252
2273
|
this.regenerateBibId();
|
|
2253
2274
|
this.handleTriggerTabIndex();
|
|
2254
2275
|
|
|
@@ -2485,6 +2506,76 @@ var tokensCss$2 = i$2`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
2485
2506
|
|
|
2486
2507
|
var colorCss$3 = i$2`: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)}`;
|
|
2487
2508
|
|
|
2509
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2510
|
+
// See LICENSE in the project root for license information.
|
|
2511
|
+
|
|
2512
|
+
// ---------------------------------------------------------------------
|
|
2513
|
+
|
|
2514
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
2515
|
+
|
|
2516
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
2517
|
+
|
|
2518
|
+
/* eslint-disable jsdoc/require-param */
|
|
2519
|
+
|
|
2520
|
+
/**
|
|
2521
|
+
* This will register a new custom element with the browser.
|
|
2522
|
+
* @param {String} name - The name of the custom element.
|
|
2523
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
2524
|
+
* @returns {void}
|
|
2525
|
+
*/
|
|
2526
|
+
registerComponent(name, componentClass) {
|
|
2527
|
+
if (!customElements.get(name)) {
|
|
2528
|
+
customElements.define(name, class extends componentClass {});
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
/**
|
|
2533
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
2534
|
+
* @returns {void}
|
|
2535
|
+
*/
|
|
2536
|
+
closestElement(
|
|
2537
|
+
selector, // selector like in .closest()
|
|
2538
|
+
base = this, // extra functionality to skip a parent
|
|
2539
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
2540
|
+
!el || el === document || el === window
|
|
2541
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
2542
|
+
: found
|
|
2543
|
+
? found // found a selector INside this element
|
|
2544
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
2545
|
+
) {
|
|
2546
|
+
return __Closest(base);
|
|
2547
|
+
}
|
|
2548
|
+
/* eslint-enable jsdoc/require-param */
|
|
2549
|
+
|
|
2550
|
+
/**
|
|
2551
|
+
* 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.
|
|
2552
|
+
* @param {Object} elem - The element to check.
|
|
2553
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
2554
|
+
* @returns {void}
|
|
2555
|
+
*/
|
|
2556
|
+
handleComponentTagRename(elem, tagName) {
|
|
2557
|
+
const tag = tagName.toLowerCase();
|
|
2558
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2559
|
+
|
|
2560
|
+
if (elemTag !== tag) {
|
|
2561
|
+
elem.setAttribute(tag, true);
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* Validates if an element is a specific Auro component.
|
|
2567
|
+
* @param {Object} elem - The element to validate.
|
|
2568
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
2569
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
2570
|
+
*/
|
|
2571
|
+
elementMatch(elem, tagName) {
|
|
2572
|
+
const tag = tagName.toLowerCase();
|
|
2573
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2574
|
+
|
|
2575
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
2576
|
+
}
|
|
2577
|
+
};
|
|
2578
|
+
|
|
2488
2579
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2489
2580
|
// See LICENSE in the project root for license information.
|
|
2490
2581
|
|
|
@@ -2607,8 +2698,12 @@ class AuroIcon extends BaseIcon {
|
|
|
2607
2698
|
async firstUpdated() {
|
|
2608
2699
|
await super.firstUpdated();
|
|
2609
2700
|
|
|
2610
|
-
|
|
2611
|
-
|
|
2701
|
+
/**
|
|
2702
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
2703
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
2704
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
2705
|
+
*/
|
|
2706
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
2612
2707
|
const svgDesc = this.svg.querySelector('desc');
|
|
2613
2708
|
|
|
2614
2709
|
if (svgDesc) {
|
|
@@ -2654,17 +2749,16 @@ class AuroIcon extends BaseIcon {
|
|
|
2654
2749
|
|
|
2655
2750
|
var iconVersion = '6.1.2';
|
|
2656
2751
|
|
|
2657
|
-
var styleCss$1 = i$2`:host{position:
|
|
2752
|
+
var styleCss$1 = i$2`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
2658
2753
|
|
|
2659
2754
|
var colorCss$2 = i$2`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2660
2755
|
|
|
2661
|
-
var tokensCss$1 = i$2`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color:
|
|
2756
|
+
var tokensCss$1 = i$2`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
2662
2757
|
|
|
2663
2758
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2664
2759
|
// See LICENSE in the project root for license information.
|
|
2665
2760
|
|
|
2666
2761
|
|
|
2667
|
-
|
|
2668
2762
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2669
2763
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2670
2764
|
'xl',
|
|
@@ -2680,7 +2774,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
2680
2774
|
*/
|
|
2681
2775
|
|
|
2682
2776
|
class AuroDropdownBib extends i {
|
|
2683
|
-
|
|
2777
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
2684
2778
|
constructor() {
|
|
2685
2779
|
super();
|
|
2686
2780
|
|
|
@@ -2689,7 +2783,10 @@ class AuroDropdownBib extends i {
|
|
|
2689
2783
|
*/
|
|
2690
2784
|
this._mobileBreakpointValue = undefined;
|
|
2691
2785
|
|
|
2692
|
-
AuroLibraryRuntimeUtils$
|
|
2786
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
2787
|
+
|
|
2788
|
+
this.shape = "rounded";
|
|
2789
|
+
this.matchWidth = false;
|
|
2693
2790
|
}
|
|
2694
2791
|
|
|
2695
2792
|
static get styles() {
|
|
@@ -2727,6 +2824,15 @@ class AuroDropdownBib extends i {
|
|
|
2727
2824
|
reflect: true
|
|
2728
2825
|
},
|
|
2729
2826
|
|
|
2827
|
+
/**
|
|
2828
|
+
* If declared, the bib width will match the trigger width.
|
|
2829
|
+
* @private
|
|
2830
|
+
*/
|
|
2831
|
+
matchWidth: {
|
|
2832
|
+
type: Boolean,
|
|
2833
|
+
reflect: true
|
|
2834
|
+
},
|
|
2835
|
+
|
|
2730
2836
|
/**
|
|
2731
2837
|
* If declared, will apply border-radius to the bib.
|
|
2732
2838
|
*/
|
|
@@ -2734,6 +2840,18 @@ class AuroDropdownBib extends i {
|
|
|
2734
2840
|
type: Boolean,
|
|
2735
2841
|
reflect: true
|
|
2736
2842
|
},
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* A reference to the associated bib template element.
|
|
2846
|
+
*/
|
|
2847
|
+
bibTemplate: {
|
|
2848
|
+
type: Object
|
|
2849
|
+
},
|
|
2850
|
+
|
|
2851
|
+
shape: {
|
|
2852
|
+
type: String,
|
|
2853
|
+
reflect: true
|
|
2854
|
+
}
|
|
2737
2855
|
};
|
|
2738
2856
|
}
|
|
2739
2857
|
|
|
@@ -2766,13 +2884,62 @@ class AuroDropdownBib extends i {
|
|
|
2766
2884
|
}
|
|
2767
2885
|
}
|
|
2768
2886
|
});
|
|
2887
|
+
|
|
2888
|
+
if (this.bibTemplate) {
|
|
2889
|
+
// If the bib template is found, set the fullscreen attribute
|
|
2890
|
+
if (this.isFullscreen) {
|
|
2891
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
2892
|
+
} else {
|
|
2893
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2769
2896
|
}
|
|
2770
2897
|
}
|
|
2771
2898
|
|
|
2899
|
+
connectedCallback() {
|
|
2900
|
+
super.connectedCallback();
|
|
2901
|
+
|
|
2902
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
2903
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
2904
|
+
const bibTemplate = event.detail.element;
|
|
2905
|
+
this.bibTemplate = bibTemplate;
|
|
2906
|
+
|
|
2907
|
+
if (bibTemplate) {
|
|
2908
|
+
// If the bib template is found, set the fullscreen attribute
|
|
2909
|
+
if (this.isFullscreen) {
|
|
2910
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
2911
|
+
} else {
|
|
2912
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
});
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
firstUpdated(changedProperties) {
|
|
2919
|
+
super.firstUpdated(changedProperties);
|
|
2920
|
+
|
|
2921
|
+
// Dispatch a custom event when the component is connected
|
|
2922
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
2923
|
+
bubbles: true,
|
|
2924
|
+
composed: true,
|
|
2925
|
+
detail: {
|
|
2926
|
+
element: this
|
|
2927
|
+
}
|
|
2928
|
+
}));
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2772
2931
|
// function that renders the HTML and CSS into the scope of the component
|
|
2773
2932
|
render() {
|
|
2933
|
+
const classes = {
|
|
2934
|
+
container: true
|
|
2935
|
+
};
|
|
2936
|
+
|
|
2937
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
2938
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
2939
|
+
classes[`shape-${this.shape}`] = true;
|
|
2940
|
+
|
|
2774
2941
|
return u$1`
|
|
2775
|
-
<div class="
|
|
2942
|
+
<div class="${e$2(classes)}" part="bibContainer">
|
|
2776
2943
|
<slot></slot>
|
|
2777
2944
|
</div>
|
|
2778
2945
|
`;
|
|
@@ -2781,21 +2948,21 @@ class AuroDropdownBib extends i {
|
|
|
2781
2948
|
|
|
2782
2949
|
var dropdownVersion = '3.0.0';
|
|
2783
2950
|
|
|
2784
|
-
var shapeSizeCss = i$2`.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:
|
|
2951
|
+
var shapeSizeCss = i$2`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
2785
2952
|
|
|
2786
|
-
var colorCss$1 = i$2`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-
|
|
2953
|
+
var colorCss$1 = i$2`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
2787
2954
|
|
|
2788
|
-
var classicColorCss = i$2`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)
|
|
2955
|
+
var classicColorCss = i$2`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][disabled]:not([onDark])){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic][onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
2789
2956
|
|
|
2790
|
-
var classicLayoutCss = i$2`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;
|
|
2957
|
+
var classicLayoutCss = i$2`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
|
|
2791
2958
|
|
|
2792
|
-
var styleEmphasizedCss = i$2`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
2959
|
+
var styleEmphasizedCss = i$2`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
2793
2960
|
|
|
2794
|
-
var styleSnowflakeCss = i$2`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
2961
|
+
var styleSnowflakeCss = i$2`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
2795
2962
|
|
|
2796
|
-
var colorCss = i$2`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-
|
|
2963
|
+
var colorCss = i$2`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
2797
2964
|
|
|
2798
|
-
var styleCss = i$2`.helptext-wrapper{display:none;font-size:
|
|
2965
|
+
var styleCss = i$2`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
2799
2966
|
|
|
2800
2967
|
var tokensCss = i$2`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
2801
2968
|
|
|
@@ -3036,18 +3203,21 @@ class AuroElement extends i {
|
|
|
3036
3203
|
}
|
|
3037
3204
|
|
|
3038
3205
|
resetShapeClasses() {
|
|
3039
|
-
|
|
3040
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
3206
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
3041
3207
|
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3208
|
+
if (wrapper) {
|
|
3209
|
+
wrapper.classList.forEach((className) => {
|
|
3210
|
+
if (className.startsWith('shape-')) {
|
|
3211
|
+
wrapper.classList.remove(className);
|
|
3212
|
+
}
|
|
3213
|
+
});
|
|
3048
3214
|
|
|
3049
|
-
|
|
3050
|
-
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
if (this.shape && this.size) {
|
|
3218
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
3219
|
+
} else {
|
|
3220
|
+
wrapper.classList.add('shape-none');
|
|
3051
3221
|
}
|
|
3052
3222
|
}
|
|
3053
3223
|
|
|
@@ -3119,20 +3289,16 @@ class AuroDropdown extends AuroElement {
|
|
|
3119
3289
|
this.matchWidth = false;
|
|
3120
3290
|
this.noHideOnThisFocusLoss = false;
|
|
3121
3291
|
|
|
3122
|
-
this.errorMessage = ''; // TODO
|
|
3292
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
3123
3293
|
|
|
3124
3294
|
// Layout Config
|
|
3125
3295
|
this.layout = 'classic';
|
|
3126
|
-
this.shape = '
|
|
3296
|
+
this.shape = 'classic';
|
|
3127
3297
|
this.size = 'xl';
|
|
3128
3298
|
|
|
3129
|
-
this.
|
|
3130
|
-
}
|
|
3299
|
+
this.parentBorder = false;
|
|
3131
3300
|
|
|
3132
|
-
|
|
3133
|
-
return {
|
|
3134
|
-
// 'withValue': this.value && this.value.length > 0
|
|
3135
|
-
};
|
|
3301
|
+
this.privateDefaults();
|
|
3136
3302
|
}
|
|
3137
3303
|
|
|
3138
3304
|
get commonWrapperClasses() {
|
|
@@ -3140,7 +3306,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3140
3306
|
'trigger': true,
|
|
3141
3307
|
'wrapper': true,
|
|
3142
3308
|
'hasFocus': this.hasFocus,
|
|
3143
|
-
'simple': this.simple
|
|
3309
|
+
'simple': this.simple,
|
|
3310
|
+
'parentBorder': this.parentBorder
|
|
3144
3311
|
};
|
|
3145
3312
|
}
|
|
3146
3313
|
|
|
@@ -3192,7 +3359,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3192
3359
|
/**
|
|
3193
3360
|
* @private
|
|
3194
3361
|
*/
|
|
3195
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
3362
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
3196
3363
|
|
|
3197
3364
|
/**
|
|
3198
3365
|
* @private
|
|
@@ -3407,6 +3574,15 @@ class AuroDropdown extends AuroElement {
|
|
|
3407
3574
|
reflect: true
|
|
3408
3575
|
},
|
|
3409
3576
|
|
|
3577
|
+
/**
|
|
3578
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3579
|
+
* @private
|
|
3580
|
+
*/
|
|
3581
|
+
parentBorder: {
|
|
3582
|
+
type: Boolean,
|
|
3583
|
+
reflect: true
|
|
3584
|
+
},
|
|
3585
|
+
|
|
3410
3586
|
/**
|
|
3411
3587
|
* If declared, the popover and trigger will be set to the same width.
|
|
3412
3588
|
*/
|
|
@@ -3534,7 +3710,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3534
3710
|
*
|
|
3535
3711
|
*/
|
|
3536
3712
|
static register(name = "auro-dropdown") {
|
|
3537
|
-
AuroLibraryRuntimeUtils$
|
|
3713
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
|
|
3538
3714
|
}
|
|
3539
3715
|
|
|
3540
3716
|
/**
|
|
@@ -3797,14 +3973,13 @@ class AuroDropdown extends AuroElement {
|
|
|
3797
3973
|
* @returns {void}
|
|
3798
3974
|
*/
|
|
3799
3975
|
handleTriggerContentSlotChange(event) {
|
|
3800
|
-
|
|
3801
3976
|
this.floater.handleTriggerTabIndex();
|
|
3802
3977
|
|
|
3803
3978
|
// Get the trigger
|
|
3804
3979
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
3805
3980
|
|
|
3806
3981
|
// Get the trigger slot
|
|
3807
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
3982
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
3808
3983
|
|
|
3809
3984
|
// If there's a trigger slot
|
|
3810
3985
|
if (triggerSlot) {
|
|
@@ -3867,40 +4042,15 @@ class AuroDropdown extends AuroElement {
|
|
|
3867
4042
|
*
|
|
3868
4043
|
* @private
|
|
3869
4044
|
* @method handleDefaultSlot
|
|
3870
|
-
* @param {Event} event - The event object representing the slot change.
|
|
3871
4045
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
3872
4046
|
*/
|
|
3873
|
-
handleDefaultSlot(
|
|
3874
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4047
|
+
handleDefaultSlot() {
|
|
3875
4048
|
|
|
3876
4049
|
if (this.onSlotChange) {
|
|
3877
4050
|
this.onSlotChange();
|
|
3878
4051
|
}
|
|
3879
4052
|
}
|
|
3880
4053
|
|
|
3881
|
-
/**
|
|
3882
|
-
* @private
|
|
3883
|
-
* @method handleLabelSlotChange
|
|
3884
|
-
* @param {event} event - The event object representing the slot change.
|
|
3885
|
-
* @description Handles the slot change event for the label slot.
|
|
3886
|
-
*/
|
|
3887
|
-
handleLabelSlotChange (event) {
|
|
3888
|
-
|
|
3889
|
-
// Get the nodes from the event
|
|
3890
|
-
const nodes = event.target.assignedNodes();
|
|
3891
|
-
|
|
3892
|
-
// Guard clause for no nodes
|
|
3893
|
-
if (!nodes) {
|
|
3894
|
-
return;
|
|
3895
|
-
}
|
|
3896
|
-
|
|
3897
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
3898
|
-
const nodesArr = Array.from(nodes);
|
|
3899
|
-
|
|
3900
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
3901
|
-
this.labeled = nodesArr.length > 0;
|
|
3902
|
-
}
|
|
3903
|
-
|
|
3904
4054
|
/**
|
|
3905
4055
|
* Returns HTML for the common portion of the layouts.
|
|
3906
4056
|
* @private
|
|
@@ -3915,24 +4065,20 @@ class AuroDropdown extends AuroElement {
|
|
|
3915
4065
|
class="${e$2(this.commonWrapperClasses)}" part="wrapper"
|
|
3916
4066
|
tabindex="${this.tabIndex}"
|
|
3917
4067
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
3918
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
3919
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4068
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4069
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
3920
4070
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
3921
4071
|
@focusin="${this.handleFocusin}"
|
|
3922
4072
|
@blur="${this.handleFocusOut}">
|
|
3923
|
-
<div class="triggerContentWrapper">
|
|
3924
|
-
<
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
<div class="triggerContent">
|
|
3928
|
-
<slot
|
|
3929
|
-
name="trigger"
|
|
3930
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
3931
|
-
</div>
|
|
4073
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
4074
|
+
<slot
|
|
4075
|
+
name="trigger"
|
|
4076
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
3932
4077
|
</div>
|
|
3933
|
-
${this.chevron
|
|
4078
|
+
${this.chevron ? u$1`
|
|
3934
4079
|
<div
|
|
3935
4080
|
id="showStateIcon"
|
|
4081
|
+
class="chevron"
|
|
3936
4082
|
part="chevron">
|
|
3937
4083
|
<${this.iconTag}
|
|
3938
4084
|
category="interface"
|
|
@@ -3947,17 +4093,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3947
4093
|
<div class="${e$2(helpTextClasses)}">
|
|
3948
4094
|
<slot name="helpText"></slot>
|
|
3949
4095
|
</div>
|
|
3950
|
-
<div class="slotContent">
|
|
3951
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
3952
|
-
</div>
|
|
3953
4096
|
<div id="bibSizer" part="size"></div>
|
|
3954
4097
|
<${this.dropdownBibTag}
|
|
3955
4098
|
id="bib"
|
|
4099
|
+
shape="${this.shape}"
|
|
3956
4100
|
?data-show="${this.isPopoverVisible}"
|
|
3957
4101
|
?isfullscreen="${this.isBibFullscreen}"
|
|
3958
4102
|
?common="${this.common}"
|
|
3959
4103
|
?rounded="${this.common || this.rounded}"
|
|
3960
4104
|
?inset="${this.common || this.inset}">
|
|
4105
|
+
<div class="slotContent">
|
|
4106
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4107
|
+
</div>
|
|
3961
4108
|
</${this.dropdownBibTag}>
|
|
3962
4109
|
</div>
|
|
3963
4110
|
`;
|
|
@@ -3969,67 +4116,14 @@ class AuroDropdown extends AuroElement {
|
|
|
3969
4116
|
* @returns {html} - Returns HTML for the classic layout.
|
|
3970
4117
|
*/
|
|
3971
4118
|
renderLayoutClassic() {
|
|
4119
|
+
// TODO: check with Doug why this was never used?
|
|
3972
4120
|
const helpTextClasses = {
|
|
3973
|
-
'helpText': true
|
|
3974
|
-
'leftIndent': false,
|
|
3975
|
-
'rightIndent': false
|
|
4121
|
+
'helpText': true
|
|
3976
4122
|
};
|
|
3977
4123
|
|
|
3978
4124
|
return u$1`
|
|
3979
4125
|
${this.renderBasicHtml(helpTextClasses)}
|
|
3980
4126
|
`;
|
|
3981
|
-
// return html`
|
|
3982
|
-
// <div>
|
|
3983
|
-
// <div
|
|
3984
|
-
// id="trigger"
|
|
3985
|
-
// class="trigger"
|
|
3986
|
-
// part="trigger"
|
|
3987
|
-
// tabindex="${this.tabIndex}"
|
|
3988
|
-
// ?showBorder="${this.showTriggerBorders}"
|
|
3989
|
-
// role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
3990
|
-
// aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
3991
|
-
// aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
3992
|
-
// aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
3993
|
-
// >
|
|
3994
|
-
// <div class="triggerContentWrapper">
|
|
3995
|
-
// <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
3996
|
-
// <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
3997
|
-
// </label>
|
|
3998
|
-
// <div class="triggerContent">
|
|
3999
|
-
// <slot
|
|
4000
|
-
// name="trigger"
|
|
4001
|
-
// @slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4002
|
-
// </div>
|
|
4003
|
-
// </div>
|
|
4004
|
-
// ${this.chevron || this.common ? html`
|
|
4005
|
-
// <div
|
|
4006
|
-
// id="showStateIcon"
|
|
4007
|
-
// part="chevron">
|
|
4008
|
-
// <${this.iconTag}
|
|
4009
|
-
// category="interface"
|
|
4010
|
-
// name="chevron-down"
|
|
4011
|
-
// ?onDark="${this.onDark}"
|
|
4012
|
-
// variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
4013
|
-
// >
|
|
4014
|
-
// </${this.iconTag}>
|
|
4015
|
-
// </div>
|
|
4016
|
-
// ` : undefined }
|
|
4017
|
-
// </div>
|
|
4018
|
-
// <div class="slotContent">
|
|
4019
|
-
// <slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4020
|
-
// </div>
|
|
4021
|
-
// <div id="bibSizer" part="size"></div>
|
|
4022
|
-
// <${this.dropdownBibTag}
|
|
4023
|
-
// id="bib"
|
|
4024
|
-
// ?data-show="${this.isPopoverVisible}"
|
|
4025
|
-
// ?isfullscreen="${this.isBibFullscreen}"
|
|
4026
|
-
// ?common="${this.common}"
|
|
4027
|
-
// ?rounded="${this.common || this.rounded}"
|
|
4028
|
-
// ?inset="${this.common || this.inset}"
|
|
4029
|
-
// >
|
|
4030
|
-
// </${this.dropdownBibTag}>
|
|
4031
|
-
// </div>
|
|
4032
|
-
// `;
|
|
4033
4127
|
}
|
|
4034
4128
|
|
|
4035
4129
|
/**
|