@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.1 → 0.0.0-pr624.11
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 +598 -428
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +596 -426
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +458 -273
- package/components/combobox/dist/registered.js +458 -273
- 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 +847 -324
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +847 -324
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +677 -154
- package/components/datepicker/dist/registered.js +677 -154
- 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/demo/api.md +53 -49
- package/components/input/demo/api.min.js +121 -27
- package/components/input/demo/index.min.js +121 -27
- package/components/input/dist/auro-input.d.ts +22 -14
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +121 -27
- package/components/input/dist/registered.js +121 -27
- 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 -353
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -352
- 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 -191
- package/components/select/dist/registered.js +1105 -191
- 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
|
@@ -10,7 +10,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
10
10
|
|
|
11
11
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12
12
|
|
|
13
|
-
let AuroLibraryRuntimeUtils$
|
|
13
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
14
14
|
|
|
15
15
|
/* eslint-disable jsdoc/require-param */
|
|
16
16
|
|
|
@@ -593,10 +593,11 @@ const flip$1 = function (options) {
|
|
|
593
593
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
594
594
|
const nextPlacement = placements[nextIndex];
|
|
595
595
|
if (nextPlacement) {
|
|
596
|
-
var _overflowsData$;
|
|
597
596
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
598
|
-
|
|
599
|
-
if
|
|
597
|
+
if (!ignoreCrossAxisOverflow ||
|
|
598
|
+
// We leave the current main axis only if every placement on that axis
|
|
599
|
+
// overflows the main axis.
|
|
600
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
600
601
|
// Try next placement and re-run the lifecycle.
|
|
601
602
|
return {
|
|
602
603
|
data: {
|
|
@@ -1617,8 +1618,28 @@ class AuroFloatingUI {
|
|
|
1617
1618
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
1618
1619
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
1619
1620
|
|
|
1621
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
1622
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
1623
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1624
|
+
}
|
|
1620
1625
|
const mouseEventGlobalHandler = (event) => {
|
|
1621
|
-
|
|
1626
|
+
const isPressed = event.type === 'mousedown';
|
|
1627
|
+
if (isPressed) {
|
|
1628
|
+
// Clear any pending timeout to prevent race condition
|
|
1629
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
1630
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
1631
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1632
|
+
}
|
|
1633
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
1634
|
+
AuroFloatingUI.isMousePressed = true;
|
|
1635
|
+
}
|
|
1636
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
1637
|
+
// Schedule reset and track timeout ID
|
|
1638
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
1639
|
+
AuroFloatingUI.isMousePressed = false;
|
|
1640
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
1641
|
+
}, 0);
|
|
1642
|
+
}
|
|
1622
1643
|
};
|
|
1623
1644
|
|
|
1624
1645
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -1745,6 +1766,7 @@ class AuroFloatingUI {
|
|
|
1745
1766
|
|
|
1746
1767
|
// Compute the position of the bib
|
|
1747
1768
|
computePosition(this.element.trigger, this.element.bib, {
|
|
1769
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
1748
1770
|
placement: this.element.floaterConfig?.placement,
|
|
1749
1771
|
middleware: middleware || []
|
|
1750
1772
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -1879,8 +1901,9 @@ class AuroFloatingUI {
|
|
|
1879
1901
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
1880
1902
|
return;
|
|
1881
1903
|
}
|
|
1882
|
-
|
|
1883
|
-
if
|
|
1904
|
+
|
|
1905
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
1906
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
1884
1907
|
return;
|
|
1885
1908
|
}
|
|
1886
1909
|
|
|
@@ -2181,8 +2204,6 @@ class AuroFloatingUI {
|
|
|
2181
2204
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
2182
2205
|
}
|
|
2183
2206
|
|
|
2184
|
-
document.body.append(this.element.bib);
|
|
2185
|
-
|
|
2186
2207
|
this.regenerateBibId();
|
|
2187
2208
|
this.handleTriggerTabIndex();
|
|
2188
2209
|
|
|
@@ -2325,7 +2346,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
2325
2346
|
return _fetchMap.get(uri);
|
|
2326
2347
|
};
|
|
2327
2348
|
|
|
2328
|
-
var styleCss$
|
|
2349
|
+
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
2329
2350
|
|
|
2330
2351
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2331
2352
|
// See LICENSE in the project root for license information.
|
|
@@ -2368,7 +2389,7 @@ class BaseIcon extends AuroElement$1 {
|
|
|
2368
2389
|
|
|
2369
2390
|
static get styles() {
|
|
2370
2391
|
return css`
|
|
2371
|
-
${styleCss$
|
|
2392
|
+
${styleCss$2}
|
|
2372
2393
|
`;
|
|
2373
2394
|
}
|
|
2374
2395
|
|
|
@@ -2413,6 +2434,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
2413
2434
|
|
|
2414
2435
|
var colorCss$3 = 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)}`;
|
|
2415
2436
|
|
|
2437
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2438
|
+
// See LICENSE in the project root for license information.
|
|
2439
|
+
|
|
2440
|
+
// ---------------------------------------------------------------------
|
|
2441
|
+
|
|
2442
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
2443
|
+
|
|
2444
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
2445
|
+
|
|
2446
|
+
/* eslint-disable jsdoc/require-param */
|
|
2447
|
+
|
|
2448
|
+
/**
|
|
2449
|
+
* This will register a new custom element with the browser.
|
|
2450
|
+
* @param {String} name - The name of the custom element.
|
|
2451
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
2452
|
+
* @returns {void}
|
|
2453
|
+
*/
|
|
2454
|
+
registerComponent(name, componentClass) {
|
|
2455
|
+
if (!customElements.get(name)) {
|
|
2456
|
+
customElements.define(name, class extends componentClass {});
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
/**
|
|
2461
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
2462
|
+
* @returns {void}
|
|
2463
|
+
*/
|
|
2464
|
+
closestElement(
|
|
2465
|
+
selector, // selector like in .closest()
|
|
2466
|
+
base = this, // extra functionality to skip a parent
|
|
2467
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
2468
|
+
!el || el === document || el === window
|
|
2469
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
2470
|
+
: found
|
|
2471
|
+
? found // found a selector INside this element
|
|
2472
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
2473
|
+
) {
|
|
2474
|
+
return __Closest(base);
|
|
2475
|
+
}
|
|
2476
|
+
/* eslint-enable jsdoc/require-param */
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* 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.
|
|
2480
|
+
* @param {Object} elem - The element to check.
|
|
2481
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
2482
|
+
* @returns {void}
|
|
2483
|
+
*/
|
|
2484
|
+
handleComponentTagRename(elem, tagName) {
|
|
2485
|
+
const tag = tagName.toLowerCase();
|
|
2486
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2487
|
+
|
|
2488
|
+
if (elemTag !== tag) {
|
|
2489
|
+
elem.setAttribute(tag, true);
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
/**
|
|
2494
|
+
* Validates if an element is a specific Auro component.
|
|
2495
|
+
* @param {Object} elem - The element to validate.
|
|
2496
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
2497
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
2498
|
+
*/
|
|
2499
|
+
elementMatch(elem, tagName) {
|
|
2500
|
+
const tag = tagName.toLowerCase();
|
|
2501
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2502
|
+
|
|
2503
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
2504
|
+
}
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2416
2507
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2417
2508
|
// See LICENSE in the project root for license information.
|
|
2418
2509
|
|
|
@@ -2500,7 +2591,7 @@ class AuroIcon extends BaseIcon {
|
|
|
2500
2591
|
return [
|
|
2501
2592
|
super.styles,
|
|
2502
2593
|
css`${tokensCss$2}`,
|
|
2503
|
-
css`${styleCss$
|
|
2594
|
+
css`${styleCss$2}`,
|
|
2504
2595
|
css`${colorCss$3}`
|
|
2505
2596
|
];
|
|
2506
2597
|
}
|
|
@@ -2582,7 +2673,7 @@ class AuroIcon extends BaseIcon {
|
|
|
2582
2673
|
|
|
2583
2674
|
var iconVersion = '6.1.2';
|
|
2584
2675
|
|
|
2585
|
-
var styleCss$
|
|
2676
|
+
var styleCss$1 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}: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}`;
|
|
2586
2677
|
|
|
2587
2678
|
var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2588
2679
|
|
|
@@ -2592,7 +2683,6 @@ var tokensCss$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color:
|
|
|
2592
2683
|
// See LICENSE in the project root for license information.
|
|
2593
2684
|
|
|
2594
2685
|
|
|
2595
|
-
|
|
2596
2686
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
2597
2687
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
2598
2688
|
'xl',
|
|
@@ -2617,12 +2707,12 @@ class AuroDropdownBib extends LitElement {
|
|
|
2617
2707
|
*/
|
|
2618
2708
|
this._mobileBreakpointValue = undefined;
|
|
2619
2709
|
|
|
2620
|
-
AuroLibraryRuntimeUtils$
|
|
2710
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
2621
2711
|
}
|
|
2622
2712
|
|
|
2623
2713
|
static get styles() {
|
|
2624
2714
|
return [
|
|
2625
|
-
styleCss$
|
|
2715
|
+
styleCss$1,
|
|
2626
2716
|
colorCss$2,
|
|
2627
2717
|
tokensCss$1
|
|
2628
2718
|
];
|
|
@@ -2662,6 +2752,13 @@ class AuroDropdownBib extends LitElement {
|
|
|
2662
2752
|
type: Boolean,
|
|
2663
2753
|
reflect: true
|
|
2664
2754
|
},
|
|
2755
|
+
|
|
2756
|
+
/**
|
|
2757
|
+
* A reference to the associated bib template element.
|
|
2758
|
+
*/
|
|
2759
|
+
bibTemplate: {
|
|
2760
|
+
type: Object
|
|
2761
|
+
}
|
|
2665
2762
|
};
|
|
2666
2763
|
}
|
|
2667
2764
|
|
|
@@ -2694,9 +2791,50 @@ class AuroDropdownBib extends LitElement {
|
|
|
2694
2791
|
}
|
|
2695
2792
|
}
|
|
2696
2793
|
});
|
|
2794
|
+
|
|
2795
|
+
if (this.bibTemplate) {
|
|
2796
|
+
// If the bib template is found, set the fullscreen attribute
|
|
2797
|
+
if (this.isFullscreen) {
|
|
2798
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
2799
|
+
} else {
|
|
2800
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2697
2803
|
}
|
|
2698
2804
|
}
|
|
2699
2805
|
|
|
2806
|
+
connectedCallback() {
|
|
2807
|
+
super.connectedCallback();
|
|
2808
|
+
|
|
2809
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
2810
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
2811
|
+
const bibTemplate = event.detail.element;
|
|
2812
|
+
this.bibTemplate = bibTemplate;
|
|
2813
|
+
|
|
2814
|
+
if (bibTemplate) {
|
|
2815
|
+
// If the bib template is found, set the fullscreen attribute
|
|
2816
|
+
if (this.isFullscreen) {
|
|
2817
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
2818
|
+
} else {
|
|
2819
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
firstUpdated(changedProperties) {
|
|
2826
|
+
super.firstUpdated(changedProperties);
|
|
2827
|
+
|
|
2828
|
+
// Dispatch a custom event when the component is connected
|
|
2829
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
2830
|
+
bubbles: true,
|
|
2831
|
+
composed: true,
|
|
2832
|
+
detail: {
|
|
2833
|
+
element: this
|
|
2834
|
+
}
|
|
2835
|
+
}));
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2700
2838
|
// function that renders the HTML and CSS into the scope of the component
|
|
2701
2839
|
render() {
|
|
2702
2840
|
return html$1`
|
|
@@ -2709,15 +2847,17 @@ class AuroDropdownBib extends LitElement {
|
|
|
2709
2847
|
|
|
2710
2848
|
var dropdownVersion = '3.0.0';
|
|
2711
2849
|
|
|
2712
|
-
var shapeSizeCss = css`.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:
|
|
2713
|
-
|
|
2714
|
-
var styleCss$1 = css`:host([layout*=classic]){position:relative;display:inline-block;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{position:relative;display:flex;align-items:center}:host([layout*=classic]) .trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@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;margin-left:var(--ds-size-100, 0.5rem)}: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][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2850
|
+
var shapeSizeCss = css`.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}.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;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}.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;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}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;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}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;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}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;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}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;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}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;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}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;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}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;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}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
2715
2851
|
|
|
2716
2852
|
var colorCss$1 = css`: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-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
2717
2853
|
|
|
2718
|
-
var
|
|
2854
|
+
var classicColorCss = css`: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);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}:host([layout*=classic]) .trigger:focus-within,:host([layout*=classic]) .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]{--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)}:host([layout*=classic])[common],:host([layout*=classic])[bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67)}:host([layout*=classic])[common] .trigger:active,:host([layout*=classic])[common] .trigger:focus-within,:host([layout*=classic])[bordered] .trigger:active,:host([layout*=classic])[bordered] .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[error]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic])[error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[error] .trigger:focus-within,:host([layout*=classic])[error] .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][common],:host([layout*=classic])[disabled][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic])[onDark]{--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([layout*=classic])[onDark]:focus-within,:host([layout*=classic])[onDark]: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)}:host([layout*=classic])[onDark][common],:host([layout*=classic])[onDark][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic])[onDark][common] .trigger:focus-within,:host([layout*=classic])[onDark][common] .trigger:active,:host([layout*=classic])[onDark][bordered] .trigger:focus-within,:host([layout*=classic])[onDark][bordered] .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][error]{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic])[onDark][error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}: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)}:host([layout*=classic])[onDark][disabled][common],:host([layout*=classic])[onDark][disabled][bordered]{--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
|
|
2855
|
+
|
|
2856
|
+
var classicLayoutCss = css`: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;margin-left:var(--ds-size-100, 0.5rem)}: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][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2719
2857
|
|
|
2720
|
-
var
|
|
2858
|
+
var styleEmphasizedCss = css`: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;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{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)}`;
|
|
2859
|
+
|
|
2860
|
+
var styleSnowflakeCss = css`: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;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{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)}`;
|
|
2721
2861
|
|
|
2722
2862
|
var colorCss = css`: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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
2723
2863
|
|
|
@@ -3045,12 +3185,13 @@ class AuroDropdown extends AuroElement {
|
|
|
3045
3185
|
this.matchWidth = false;
|
|
3046
3186
|
this.noHideOnThisFocusLoss = false;
|
|
3047
3187
|
|
|
3048
|
-
this.errorMessage = ''; // TODO
|
|
3188
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
3049
3189
|
|
|
3050
3190
|
// Layout Config
|
|
3051
|
-
this.layout = '
|
|
3191
|
+
this.layout = 'classic';
|
|
3052
3192
|
this.shape = 'rounded';
|
|
3053
3193
|
this.size = 'xl';
|
|
3194
|
+
this.parentBorder = false;
|
|
3054
3195
|
|
|
3055
3196
|
this.privateDefaults();
|
|
3056
3197
|
}
|
|
@@ -3066,7 +3207,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3066
3207
|
'trigger': true,
|
|
3067
3208
|
'wrapper': true,
|
|
3068
3209
|
'hasFocus': this.hasFocus,
|
|
3069
|
-
'simple': this.simple
|
|
3210
|
+
'simple': this.simple,
|
|
3211
|
+
'parentBorder': this.parentBorder
|
|
3070
3212
|
};
|
|
3071
3213
|
}
|
|
3072
3214
|
|
|
@@ -3118,7 +3260,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3118
3260
|
/**
|
|
3119
3261
|
* @private
|
|
3120
3262
|
*/
|
|
3121
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
3263
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
3122
3264
|
|
|
3123
3265
|
/**
|
|
3124
3266
|
* @private
|
|
@@ -3333,6 +3475,15 @@ class AuroDropdown extends AuroElement {
|
|
|
3333
3475
|
reflect: true
|
|
3334
3476
|
},
|
|
3335
3477
|
|
|
3478
|
+
/**
|
|
3479
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3480
|
+
* @private
|
|
3481
|
+
*/
|
|
3482
|
+
parentBorder: {
|
|
3483
|
+
type: Boolean,
|
|
3484
|
+
reflect: true
|
|
3485
|
+
},
|
|
3486
|
+
|
|
3336
3487
|
/**
|
|
3337
3488
|
* If declared, the popover and trigger will be set to the same width.
|
|
3338
3489
|
*/
|
|
@@ -3435,10 +3586,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3435
3586
|
static get styles() {
|
|
3436
3587
|
return [
|
|
3437
3588
|
colorCss$1,
|
|
3438
|
-
styleCss$1,
|
|
3439
3589
|
tokensCss$1,
|
|
3590
|
+
|
|
3591
|
+
// default layout
|
|
3592
|
+
classicColorCss,
|
|
3593
|
+
classicLayoutCss,
|
|
3594
|
+
|
|
3595
|
+
// emphasized layout
|
|
3440
3596
|
styleEmphasizedCss,
|
|
3597
|
+
|
|
3598
|
+
// snowflake layout
|
|
3441
3599
|
styleSnowflakeCss,
|
|
3600
|
+
|
|
3442
3601
|
shapeSizeCss
|
|
3443
3602
|
];
|
|
3444
3603
|
}
|
|
@@ -3452,7 +3611,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3452
3611
|
*
|
|
3453
3612
|
*/
|
|
3454
3613
|
static register(name = "auro-dropdown") {
|
|
3455
|
-
AuroLibraryRuntimeUtils$
|
|
3614
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
|
|
3456
3615
|
}
|
|
3457
3616
|
|
|
3458
3617
|
/**
|
|
@@ -3785,11 +3944,9 @@ class AuroDropdown extends AuroElement {
|
|
|
3785
3944
|
*
|
|
3786
3945
|
* @private
|
|
3787
3946
|
* @method handleDefaultSlot
|
|
3788
|
-
* @param {Event} event - The event object representing the slot change.
|
|
3789
3947
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
3790
3948
|
*/
|
|
3791
|
-
handleDefaultSlot(
|
|
3792
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
3949
|
+
handleDefaultSlot() {
|
|
3793
3950
|
|
|
3794
3951
|
if (this.onSlotChange) {
|
|
3795
3952
|
this.onSlotChange();
|
|
@@ -3832,7 +3989,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3832
3989
|
id="trigger"
|
|
3833
3990
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
3834
3991
|
tabindex="${this.tabIndex}"
|
|
3835
|
-
?showBorder="${this.showTriggerBorders}"
|
|
3836
3992
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
3837
3993
|
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
3838
3994
|
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -3852,6 +4008,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3852
4008
|
${this.chevron || this.common ? html$1`
|
|
3853
4009
|
<div
|
|
3854
4010
|
id="showStateIcon"
|
|
4011
|
+
class="chevron"
|
|
3855
4012
|
part="chevron">
|
|
3856
4013
|
<${this.iconTag}
|
|
3857
4014
|
category="interface"
|
|
@@ -3866,9 +4023,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3866
4023
|
<div class="${classMap(helpTextClasses)}">
|
|
3867
4024
|
<slot name="helpText"></slot>
|
|
3868
4025
|
</div>
|
|
3869
|
-
<div class="slotContent">
|
|
3870
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
3871
|
-
</div>
|
|
3872
4026
|
<div id="bibSizer" part="size"></div>
|
|
3873
4027
|
<${this.dropdownBibTag}
|
|
3874
4028
|
id="bib"
|
|
@@ -3877,6 +4031,9 @@ class AuroDropdown extends AuroElement {
|
|
|
3877
4031
|
?common="${this.common}"
|
|
3878
4032
|
?rounded="${this.common || this.rounded}"
|
|
3879
4033
|
?inset="${this.common || this.inset}">
|
|
4034
|
+
<div class="slotContent">
|
|
4035
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4036
|
+
</div>
|
|
3880
4037
|
</${this.dropdownBibTag}>
|
|
3881
4038
|
</div>
|
|
3882
4039
|
`;
|
|
@@ -3888,6 +4045,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3888
4045
|
* @returns {html} - Returns HTML for the classic layout.
|
|
3889
4046
|
*/
|
|
3890
4047
|
renderLayoutClassic() {
|
|
4048
|
+
|
|
3891
4049
|
return html$1`
|
|
3892
4050
|
<div>
|
|
3893
4051
|
<div
|
|
@@ -3925,9 +4083,10 @@ class AuroDropdown extends AuroElement {
|
|
|
3925
4083
|
</div>
|
|
3926
4084
|
` : undefined }
|
|
3927
4085
|
</div>
|
|
3928
|
-
|
|
3929
|
-
<slot
|
|
3930
|
-
|
|
4086
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
4087
|
+
<slot name="helpText"></slot>
|
|
4088
|
+
</${this.helpTextTag}>
|
|
4089
|
+
|
|
3931
4090
|
<div id="bibSizer" part="size"></div>
|
|
3932
4091
|
<${this.dropdownBibTag}
|
|
3933
4092
|
id="bib"
|
|
@@ -3937,6 +4096,9 @@ class AuroDropdown extends AuroElement {
|
|
|
3937
4096
|
?rounded="${this.common || this.rounded}"
|
|
3938
4097
|
?inset="${this.common || this.inset}"
|
|
3939
4098
|
>
|
|
4099
|
+
<div class="slotContent">
|
|
4100
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4101
|
+
</div>
|
|
3940
4102
|
</${this.dropdownBibTag}>
|
|
3941
4103
|
</div>
|
|
3942
4104
|
`;
|