@aurodesignsystem/auro-formkit 1.6.0-beta.5 → 1.6.0-beta.7
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/.turbo/cache/01de6ab3df8b7e1e-meta.json +1 -0
- package/.turbo/cache/{754a6b5c5ce1ed00.tar.zst → 01de6ab3df8b7e1e.tar.zst} +0 -0
- package/.turbo/cache/10feda0f037804bb-meta.json +1 -1
- package/.turbo/cache/11079d2746265545-meta.json +1 -0
- package/.turbo/cache/11079d2746265545.tar.zst +0 -0
- package/.turbo/cache/115c4b73a12f5275-meta.json +1 -0
- package/.turbo/cache/144e8e78657bf800-meta.json +1 -1
- package/.turbo/cache/18939b2c7c83b163-meta.json +1 -1
- package/.turbo/cache/1de685df0eaa39c8-meta.json +1 -1
- package/.turbo/cache/1ec139dcf090d547-meta.json +1 -0
- package/.turbo/cache/1f53ce3a28c56cdf-meta.json +1 -1
- package/.turbo/cache/23bf100310bd9f5a-meta.json +1 -1
- package/.turbo/cache/2900e7ec28e1488f-meta.json +1 -1
- package/.turbo/cache/296074aadfa2f8c9-meta.json +1 -1
- package/.turbo/cache/296074aadfa2f8c9.tar.zst +0 -0
- package/.turbo/cache/29e29355bf6fb4fd-meta.json +1 -1
- package/.turbo/cache/2cbcbc4a17387253-meta.json +1 -0
- package/.turbo/cache/2cbcbc4a17387253.tar.zst +0 -0
- package/.turbo/cache/2f6c898fbb51e995-meta.json +1 -0
- package/.turbo/cache/2f6c898fbb51e995.tar.zst +0 -0
- package/.turbo/cache/3073b96f6e4d867c-meta.json +1 -1
- package/.turbo/cache/33466ea2930c3714-meta.json +1 -1
- package/.turbo/cache/3426941a74b0731e-meta.json +1 -0
- package/.turbo/cache/3426941a74b0731e.tar.zst +0 -0
- package/.turbo/cache/38b0799e2f7e62c5-meta.json +1 -0
- package/.turbo/cache/38b0799e2f7e62c5.tar.zst +0 -0
- package/.turbo/cache/3fbc89f461c495db-meta.json +1 -0
- package/.turbo/cache/3fbc89f461c495db.tar.zst +0 -0
- package/.turbo/cache/451e562c76f74ec6-meta.json +1 -1
- package/.turbo/cache/4520919609c97850-meta.json +1 -1
- package/.turbo/cache/452908d0b0b676bc-meta.json +1 -1
- package/.turbo/cache/48c197e39ed31fd2-meta.json +1 -1
- package/.turbo/cache/48c197e39ed31fd2.tar.zst +0 -0
- package/.turbo/cache/5058ecc7f1e34496-meta.json +1 -1
- package/.turbo/cache/5a66a99aa1344401-meta.json +1 -1
- package/.turbo/cache/5b66ce21630716cc-meta.json +1 -1
- package/.turbo/cache/6002b76d50b8d1ff-meta.json +1 -0
- package/.turbo/cache/6002b76d50b8d1ff.tar.zst +0 -0
- package/.turbo/cache/627e964e19b2bda5-meta.json +1 -0
- package/.turbo/cache/{3ac4a22a21bdc2be.tar.zst → 627e964e19b2bda5.tar.zst} +0 -0
- package/.turbo/cache/6907ebaae4f3a96b-meta.json +1 -0
- package/.turbo/cache/6907ebaae4f3a96b.tar.zst +0 -0
- package/.turbo/cache/6f7175be597945f7-meta.json +1 -0
- package/.turbo/cache/6f7175be597945f7.tar.zst +0 -0
- package/.turbo/cache/70d7b72f15ee97a4-meta.json +1 -1
- package/.turbo/cache/7cfdc01c415c836c-meta.json +1 -0
- package/.turbo/cache/7cfdc01c415c836c.tar.zst +0 -0
- package/.turbo/cache/897b0d8a0c301207-meta.json +1 -1
- package/.turbo/cache/8b7cdb9a0d4c3112-meta.json +1 -1
- package/.turbo/cache/8e1f402b247ebed6-meta.json +1 -1
- package/.turbo/cache/8e1f402b247ebed6.tar.zst +0 -0
- package/.turbo/cache/90b8d9ccef5e09aa-meta.json +1 -0
- package/.turbo/cache/90b8d9ccef5e09aa.tar.zst +0 -0
- package/.turbo/cache/936bccb44ade3650-meta.json +1 -0
- package/.turbo/cache/936bccb44ade3650.tar.zst +0 -0
- package/.turbo/cache/94bcc4c6536ada9d-meta.json +1 -0
- package/.turbo/cache/94bcc4c6536ada9d.tar.zst +0 -0
- package/.turbo/cache/990b9def0e83d33c-meta.json +1 -0
- package/.turbo/cache/990b9def0e83d33c.tar.zst +0 -0
- package/.turbo/cache/a532f4b8302ca13e-meta.json +1 -0
- package/.turbo/cache/a532f4b8302ca13e.tar.zst +0 -0
- package/.turbo/cache/a7bf477bbdabc7bc-meta.json +1 -1
- package/.turbo/cache/a90aa34f427a2f62-meta.json +1 -1
- package/.turbo/cache/aedda428051043c4-meta.json +1 -0
- package/.turbo/cache/aedda428051043c4.tar.zst +0 -0
- package/.turbo/cache/afc38ab505ef6dbb-meta.json +1 -0
- package/.turbo/cache/{2ca214d032893e74.tar.zst → afc38ab505ef6dbb.tar.zst} +0 -0
- package/.turbo/cache/b1ed317b29e85c9d-meta.json +1 -0
- package/.turbo/cache/b1ed317b29e85c9d.tar.zst +0 -0
- package/.turbo/cache/b61416daf63fbaad-meta.json +1 -1
- package/.turbo/cache/b76edfbd1c076b0a-meta.json +1 -0
- package/.turbo/cache/b76edfbd1c076b0a.tar.zst +0 -0
- package/.turbo/cache/b9463532618cdc61-meta.json +1 -1
- package/.turbo/cache/bb3afea40c91e8ba-meta.json +1 -1
- package/.turbo/cache/c4df38a7e2cc767a-meta.json +1 -0
- package/.turbo/cache/{77bf3068f493ef24.tar.zst → c4df38a7e2cc767a.tar.zst} +0 -0
- package/.turbo/cache/c63dc7b6157da70b-meta.json +1 -1
- package/.turbo/cache/c8b63b6e8a190eb9-meta.json +1 -1
- package/.turbo/cache/d35b1eee9f2881af-meta.json +1 -1
- package/.turbo/cache/d5188c0fbe45d578-meta.json +1 -1
- package/.turbo/cache/e4b3ec56d4ae56ba-meta.json +1 -1
- package/.turbo/cache/e6f030eddf6fbf4e-meta.json +1 -1
- package/.turbo/cache/ff7e6d09efd93145-meta.json +1 -1
- package/.turbo/cache/ff7e6d09efd93145.tar.zst +0 -0
- package/CHANGELOG.md +26 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/combobox/.turbo/turbo-build.log +6 -3
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +2 -0
- package/components/combobox/demo/api.md +73 -0
- package/components/combobox/demo/api.min.js +966 -833
- package/components/combobox/demo/index.min.js +931 -837
- package/components/combobox/dist/auro-combobox.d.ts +20 -0
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +69 -27
- package/components/combobox/src/auro-combobox.js +60 -23
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/counter/demo/api.md +1053 -0
- package/components/datepicker/demo/api.min.js +10 -4
- package/components/datepicker/demo/index.min.js +10 -4
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +10 -4
- package/components/datepicker/src/auro-datepicker.js +1 -0
- package/components/dropdown/.turbo/turbo-build.log +7 -7
- package/components/dropdown/.turbo/turbo-bundler.log +3 -3
- package/components/dropdown/demo/api.html +2 -0
- package/components/dropdown/demo/api.md +47 -41
- package/components/dropdown/demo/api.min.js +9 -4
- package/components/dropdown/demo/index.md +97 -53
- package/components/dropdown/demo/index.min.js +9 -4
- package/components/dropdown/dist/auro-dropdown.d.ts +7 -2
- package/components/dropdown/dist/auro-dropdown.d.ts.map +1 -1
- package/components/dropdown/dist/index.js +9 -4
- package/components/dropdown/src/auro-dropdown.js +7 -2
- package/components/dropdown/src/styles/bibStyles-css.js +1 -1
- package/components/dropdown/src/styles/bibStyles.css +2 -2
- package/components/dropdown/src/styles/bibStyles.scss +2 -2
- package/components/dropdown/src/styles/style-css.js +1 -1
- package/components/dropdown/src/styles/style.css +6 -0
- package/components/dropdown/src/styles/style.scss +6 -0
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build.log +3 -3
- package/components/input/.turbo/turbo-bundler.log +3 -3
- package/components/menu/.turbo/turbo-build.log +6 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.html +2 -0
- package/components/menu/demo/api.js +2 -0
- package/components/menu/demo/api.md +164 -22
- package/components/menu/demo/api.min.js +912 -853
- package/components/menu/demo/index.min.js +905 -853
- package/components/menu/dist/auro-menu.d.ts +28 -2
- package/components/menu/dist/auro-menu.d.ts.map +1 -1
- package/components/menu/dist/auro-menuoption.d.ts +1 -1
- package/components/menu/dist/index.js +905 -853
- package/components/menu/src/auro-menu.js +57 -7
- package/components/menu/src/auro-menuoption.js +1 -1
- package/components/menu/src/styles/style-menu-css.js +1 -1
- package/components/menu/src/styles/style-menu.css +21 -3
- package/components/menu/src/styles/style-menu.scss +25 -3
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/select/.turbo/turbo-build.log +6 -3
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +66 -0
- package/components/select/demo/api.min.js +938 -816
- package/components/select/demo/index.min.js +905 -815
- package/components/select/dist/auro-select.d.ts +19 -0
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +42 -4
- package/components/select/src/auro-select.js +33 -0
- package/package.json +1 -1
- package/packages/build-tools/src/docProcessor.mjs +4 -4
- package/packages/build-tools/src/kitDocProcessor.mjs +4 -4
- package/.turbo/cache/01aa76a50fa4c8ad-meta.json +0 -1
- package/.turbo/cache/01aa76a50fa4c8ad.tar.zst +0 -0
- package/.turbo/cache/05be1236a4cd5e72-meta.json +0 -1
- package/.turbo/cache/05be1236a4cd5e72.tar.zst +0 -0
- package/.turbo/cache/1f3b6e5b310ff590-meta.json +0 -1
- package/.turbo/cache/1f3b6e5b310ff590.tar.zst +0 -0
- package/.turbo/cache/2ca214d032893e74-meta.json +0 -1
- package/.turbo/cache/2dd00eb6e255bd02-meta.json +0 -1
- package/.turbo/cache/2dd00eb6e255bd02.tar.zst +0 -0
- package/.turbo/cache/3792d285b464b3e6-meta.json +0 -1
- package/.turbo/cache/3792d285b464b3e6.tar.zst +0 -0
- package/.turbo/cache/38030191e9c3ecd0-meta.json +0 -1
- package/.turbo/cache/38030191e9c3ecd0.tar.zst +0 -0
- package/.turbo/cache/3ac4a22a21bdc2be-meta.json +0 -1
- package/.turbo/cache/54475627b302de03-meta.json +0 -1
- package/.turbo/cache/54475627b302de03.tar.zst +0 -0
- package/.turbo/cache/5d064e768a262314-meta.json +0 -1
- package/.turbo/cache/5d064e768a262314.tar.zst +0 -0
- package/.turbo/cache/5f324af6052902f3-meta.json +0 -1
- package/.turbo/cache/6bc6e817c13e2b9d-meta.json +0 -1
- package/.turbo/cache/6bc6e817c13e2b9d.tar.zst +0 -0
- package/.turbo/cache/6f2c238248445944-meta.json +0 -1
- package/.turbo/cache/754a6b5c5ce1ed00-meta.json +0 -1
- package/.turbo/cache/77bf3068f493ef24-meta.json +0 -1
- package/.turbo/cache/7ddb7ace73fe6ec2-meta.json +0 -1
- package/.turbo/cache/7ddb7ace73fe6ec2.tar.zst +0 -0
- package/.turbo/cache/8a47fd250364f95a-meta.json +0 -1
- package/.turbo/cache/8a47fd250364f95a.tar.zst +0 -0
- package/.turbo/cache/9135f474c69d1b3c-meta.json +0 -1
- package/.turbo/cache/9135f474c69d1b3c.tar.zst +0 -0
- package/.turbo/cache/9a7ab914e08ce75f-meta.json +0 -1
- package/.turbo/cache/9a7ab914e08ce75f.tar.zst +0 -0
- package/.turbo/cache/ae152fd876a6f549-meta.json +0 -1
- package/.turbo/cache/ae152fd876a6f549.tar.zst +0 -0
- package/.turbo/cache/d8bd6f80733c28af-meta.json +0 -1
- package/.turbo/cache/d8bd6f80733c28af.tar.zst +0 -0
- package/.turbo/cache/dce6f67be2b63c18-meta.json +0 -1
- package/.turbo/cache/dce6f67be2b63c18.tar.zst +0 -0
- package/.turbo/cache/dfe3a7b21c7fcb08-meta.json +0 -1
- package/.turbo/cache/dfe3a7b21c7fcb08.tar.zst +0 -0
- package/.turbo/cache/f8664d3dce006bdf-meta.json +0 -1
- package/.turbo/cache/f8664d3dce006bdf.tar.zst +0 -0
- /package/.turbo/cache/{6f2c238248445944.tar.zst → 115c4b73a12f5275.tar.zst} +0 -0
- /package/.turbo/cache/{5f324af6052902f3.tar.zst → 1ec139dcf090d547.tar.zst} +0 -0
|
@@ -2791,13 +2791,13 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
2791
2791
|
|
|
2792
2792
|
var iconVersion$2 = '6.1.1';
|
|
2793
2793
|
|
|
2794
|
-
var styleCss$1$2 = i$3$1`:host{position:relative}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2794
|
+
var styleCss$1$2 = i$3$1`:host{position:relative;display:inline-block;max-width:100%}:host([fluid]){display:block}#bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}.label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);white-space:normal}.trigger{position:relative;display:flex;align-items:center;border-width:1px;border-style:solid}@media(hover: hover){.trigger:hover{cursor:pointer}}.triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}#showStateIcon{display:flex;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}#showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}#showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}.helpText{margin-top:var(--ds-size-50, 0.25rem);font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem)}:host([matchwidth]) #bibSizer{width:100%}:host([disabled]){pointer-events:none}:host([inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([common]) .trigger,:host([inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([common]) .trigger,:host([rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
2795
2795
|
|
|
2796
2796
|
var colorCss$1$2 = i$3$1`.label{color:var(--ds-auro-dropdown-label-text-color)}.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)}.trigger:focus-within,.trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-active-default, #0074c8)}.trigger:focus-within:not(:active){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-color-border-ui-focus-default, #2c67b5)}.trigger:hover{--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}.helpText{color:var(--ds-auro-dropdown-help-text-color)}:host([disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-ui-disabled-default, #adadad);--ds-auro-dropdown-label-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host([common]),:host([bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-primary-default, #585e67)}:host([common]) .trigger:active,:host([common]) .trigger:focus-within,:host([bordered]) .trigger:active,:host([bordered]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5)}:host([error]){--ds-auro-dropdown-help-text-color: var(--ds-color-text-error-default, #cc1816);--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-error-default, #cc1816)}:host([error]) .trigger{box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-border-color)}:host([error]) .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:none}:host([error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-focus-default, #2c67b5);box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-border-color)}:host([disabled][common]),:host([disabled][bordered]){--ds-auro-dropdown-trigger-border-color: var(--ds-color-border-ui-disabled-default, #adadad)}`;
|
|
2797
2797
|
|
|
2798
2798
|
var tokensCss$5 = i$3$1`:host{--ds-auro-dropdown-help-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-label-text-color: var(--ds-color-text-secondary-default, #525252);--ds-auro-dropdown-popover-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-popover-border-color: transparent;--ds-auro-dropdown-popover-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdown-trigger-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-color-text-primary-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-color-container-primary-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-color-text-primary-default, #2a2a2a)}`;
|
|
2799
2799
|
|
|
2800
|
-
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin
|
|
2800
|
+
var styleCss$5 = i$3$1`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.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}: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]) .container,:host([inset]) .container{padding:var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
|
|
2801
2801
|
|
|
2802
2802
|
var colorCss$5 = i$3$1`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
2803
2803
|
|
|
@@ -2900,12 +2900,13 @@ if (!customElements.get("auro-dropdownbib")) {
|
|
|
2900
2900
|
* @attr { Boolean } disabled - If declared, the dropdown is not interactive.
|
|
2901
2901
|
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
2902
2902
|
* @attr { Boolean } error - If declared in combination with `bordered` property or `helpText` slot content, will apply red color to both.
|
|
2903
|
+
* @attr {Boolean} fluid - Makes the trigger to be full width of its parent container
|
|
2903
2904
|
* @attr { Boolean } matchWidth - If declared, the popover and trigger will be set to the same width.
|
|
2904
2905
|
* @attr { Boolean } inset - If declared, will apply padding around trigger slot content.
|
|
2905
2906
|
* @attr { Boolean } rounded - If declared, will apply border-radius to trigger and default slots.
|
|
2906
2907
|
* @attr { Boolean } hoverToggle - if declared, the trigger will toggle the big on mouseover/mouseout.
|
|
2907
|
-
* @attr { Boolean } noToggle - If declared, the trigger will only show the
|
|
2908
|
-
* @attr { Boolean } focusShow - if declared, the
|
|
2908
|
+
* @attr { Boolean } noToggle - If declared, the trigger will only show the dropdown bib.
|
|
2909
|
+
* @attr { Boolean } focusShow - if declared, the bib will display when focus is applied to the trigger.
|
|
2909
2910
|
* @attr { Boolean } noHideOnThisFocusLoss - If declared, the dropdown will not hide when moving focus outside the element.
|
|
2910
2911
|
* @attr { String } mobileFullscreenBreakpoint - Defines the screen size breakpoint (`lg`, `md`, `sm`, or `xs`) at which the dropdown switches to fullscreen mode on mobile. When expanded, the dropdown will automatically display in fullscreen mode if the screen size is equal to or smaller than the selected breakpoint.
|
|
2911
2912
|
* @prop { Boolean } isPopoverVisible - If true, the dropdown bib is displayed.
|
|
@@ -3008,6 +3009,10 @@ class AuroDropdown extends r$5 {
|
|
|
3008
3009
|
type: Boolean,
|
|
3009
3010
|
reflect: true
|
|
3010
3011
|
},
|
|
3012
|
+
fluid: {
|
|
3013
|
+
type: Boolean,
|
|
3014
|
+
reflect: true,
|
|
3015
|
+
},
|
|
3011
3016
|
focusShow: {
|
|
3012
3017
|
type: Boolean,
|
|
3013
3018
|
reflect: true
|
|
@@ -7252,6 +7257,11 @@ class AuroCombobox extends r$6 {
|
|
|
7252
7257
|
*/
|
|
7253
7258
|
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7254
7259
|
|
|
7260
|
+
/**
|
|
7261
|
+
* @private
|
|
7262
|
+
*/
|
|
7263
|
+
this.isHiddenWhileLoading = false;
|
|
7264
|
+
|
|
7255
7265
|
/**
|
|
7256
7266
|
* Generate unique names for dependency components.
|
|
7257
7267
|
*/
|
|
@@ -7387,7 +7397,7 @@ class AuroCombobox extends r$6 {
|
|
|
7387
7397
|
this.noMatchOption = undefined;
|
|
7388
7398
|
|
|
7389
7399
|
this.options.forEach((option) => {
|
|
7390
|
-
let matchString = option.
|
|
7400
|
+
let matchString = option.textContent.toLowerCase();
|
|
7391
7401
|
|
|
7392
7402
|
if (option.hasAttribute('nomatch')) {
|
|
7393
7403
|
this.noMatchOption = option;
|
|
@@ -7463,8 +7473,12 @@ class AuroCombobox extends r$6 {
|
|
|
7463
7473
|
return;
|
|
7464
7474
|
}
|
|
7465
7475
|
if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
|
|
7466
|
-
if ((this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
|
|
7467
|
-
this.
|
|
7476
|
+
if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
|
|
7477
|
+
if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
|
|
7478
|
+
this.isHiddenWhileLoading = true;
|
|
7479
|
+
} else {
|
|
7480
|
+
this.dropdown.show();
|
|
7481
|
+
}
|
|
7468
7482
|
}
|
|
7469
7483
|
}
|
|
7470
7484
|
}
|
|
@@ -7496,7 +7510,7 @@ class AuroCombobox extends r$6 {
|
|
|
7496
7510
|
*/
|
|
7497
7511
|
configureMenu() {
|
|
7498
7512
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
7499
|
-
|
|
7513
|
+
this.menu.addEventListener("auroMenu-loadingChange", (event) => this.handleMenuLoadingChange(event));
|
|
7500
7514
|
|
|
7501
7515
|
// a racing condition on custom-combobox with custom-menu
|
|
7502
7516
|
if (!this.menu) {
|
|
@@ -7507,7 +7521,7 @@ class AuroCombobox extends r$6 {
|
|
|
7507
7521
|
return;
|
|
7508
7522
|
}
|
|
7509
7523
|
|
|
7510
|
-
this.menu.shadowRoot.addEventListener('slotchange', () => this.handleSlotChange());
|
|
7524
|
+
this.menu.shadowRoot.addEventListener('slotchange', (event) => this.handleSlotChange(event));
|
|
7511
7525
|
|
|
7512
7526
|
if (this.checkmark) {
|
|
7513
7527
|
this.menu.removeAttribute('nocheckmark');
|
|
@@ -7529,8 +7543,8 @@ class AuroCombobox extends r$6 {
|
|
|
7529
7543
|
this.value = this.optionSelected.value;
|
|
7530
7544
|
}
|
|
7531
7545
|
|
|
7532
|
-
if (this.input.value !== this.optionSelected.
|
|
7533
|
-
this.input.value = this.optionSelected.
|
|
7546
|
+
if (this.input.value !== this.optionSelected.textContent) {
|
|
7547
|
+
this.input.value = this.optionSelected.textContent;
|
|
7534
7548
|
}
|
|
7535
7549
|
|
|
7536
7550
|
if (this.menu.matchWord !== this.input.value) {
|
|
@@ -7606,7 +7620,7 @@ class AuroCombobox extends r$6 {
|
|
|
7606
7620
|
this.menu.value = this.value;
|
|
7607
7621
|
}
|
|
7608
7622
|
|
|
7609
|
-
if (this.optionSelected && this.input.value !== this.optionSelected.
|
|
7623
|
+
if (this.optionSelected && this.input.value !== this.optionSelected.textContent) {
|
|
7610
7624
|
this.optionSelected = undefined;
|
|
7611
7625
|
}
|
|
7612
7626
|
|
|
@@ -7615,7 +7629,7 @@ class AuroCombobox extends r$6 {
|
|
|
7615
7629
|
this.handleMenuOptions();
|
|
7616
7630
|
|
|
7617
7631
|
this.handleInputValueChange();
|
|
7618
|
-
// validate only if the
|
|
7632
|
+
// validate only if the value was set programmatically
|
|
7619
7633
|
if (document.activeElement !== this) {
|
|
7620
7634
|
this.validation.validate(this);
|
|
7621
7635
|
}
|
|
@@ -7647,6 +7661,29 @@ class AuroCombobox extends r$6 {
|
|
|
7647
7661
|
});
|
|
7648
7662
|
}
|
|
7649
7663
|
|
|
7664
|
+
/**
|
|
7665
|
+
* Manages the visibility of the dropdown based on loading state changes.
|
|
7666
|
+
*
|
|
7667
|
+
* This method listens for loading state changes and adjusts the visibility of the dropdown accordingly.
|
|
7668
|
+
* If the dropdown is visible and loading is true without any loading placeholders, it hides the dropdown
|
|
7669
|
+
* and sets a flag to indicate it is hidden while loading. If loading is false and the dropdown was previously
|
|
7670
|
+
* hidden, it checks if the active element is within the dropdown and shows it again if true.
|
|
7671
|
+
*
|
|
7672
|
+
* @private
|
|
7673
|
+
* @param {CustomEvent} event - The event object containing details about the loading state change.
|
|
7674
|
+
* @param {boolean} event.detail.loading - Indicates whether the menu is currently loading.
|
|
7675
|
+
* @param {boolean} event.detail.hasLoadingPlaceholder - Indicates if there are loading placeholders present.
|
|
7676
|
+
* @returns {void}
|
|
7677
|
+
*/
|
|
7678
|
+
handleMenuLoadingChange(event) {
|
|
7679
|
+
if (!event.detail.loading && this.isHiddenWhileLoading) {
|
|
7680
|
+
if (this.contains(document.activeElement)) {
|
|
7681
|
+
this.dropdown.show();
|
|
7682
|
+
}
|
|
7683
|
+
this.isHiddenWhileLoading = false;
|
|
7684
|
+
}
|
|
7685
|
+
}
|
|
7686
|
+
|
|
7650
7687
|
/**
|
|
7651
7688
|
* Handle changes to the input value and trigger changes that should result.
|
|
7652
7689
|
* @private
|
|
@@ -7693,7 +7730,7 @@ class AuroCombobox extends r$6 {
|
|
|
7693
7730
|
*/
|
|
7694
7731
|
if (evt.key === 'ArrowUp' || evt.key === 'ArrowDown') {
|
|
7695
7732
|
if (this.availableOptions.length > 0) {
|
|
7696
|
-
this.
|
|
7733
|
+
this.showBib();
|
|
7697
7734
|
}
|
|
7698
7735
|
|
|
7699
7736
|
if (this.dropdown.isPopoverVisible) {
|
|
@@ -7765,8 +7802,8 @@ class AuroCombobox extends r$6 {
|
|
|
7765
7802
|
if (this.value) {
|
|
7766
7803
|
if (this.optionSelected && this.optionSelected.value === this.value) {
|
|
7767
7804
|
// If value updates and the previously selected option already matches the new value
|
|
7768
|
-
// just update the input value to use the
|
|
7769
|
-
this.input.value = this.optionSelected.
|
|
7805
|
+
// just update the input value to use the textContent of the optionSelected
|
|
7806
|
+
this.input.value = this.optionSelected.textContent;
|
|
7770
7807
|
} else {
|
|
7771
7808
|
// Otherwise just enter the value into the input
|
|
7772
7809
|
this.optionSelected = undefined;
|
|
@@ -7796,19 +7833,23 @@ class AuroCombobox extends r$6 {
|
|
|
7796
7833
|
/**
|
|
7797
7834
|
* Watch for slot changes and recalculate the menuoptions.
|
|
7798
7835
|
* @private
|
|
7836
|
+
* @param {Event} event - slotchange event
|
|
7799
7837
|
* @returns {void}
|
|
7800
7838
|
*/
|
|
7801
|
-
handleSlotChange() {
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7839
|
+
handleSlotChange(event) {
|
|
7840
|
+
// treat only generic menuoptions
|
|
7841
|
+
if (!event.target.name) {
|
|
7842
|
+
this.options = this.menu.querySelectorAll('auro-menuoption, [auro-menuoption]');
|
|
7843
|
+
this.options.forEach((opt) => {
|
|
7844
|
+
if (this.checkmark) {
|
|
7845
|
+
opt.removeAttribute('nocheckmark');
|
|
7846
|
+
} else {
|
|
7847
|
+
opt.setAttribute('nocheckmark', '');
|
|
7848
|
+
}
|
|
7849
|
+
});
|
|
7810
7850
|
|
|
7811
|
-
|
|
7851
|
+
this.handleMenuOptions();
|
|
7852
|
+
}
|
|
7812
7853
|
}
|
|
7813
7854
|
|
|
7814
7855
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -7818,13 +7859,14 @@ class AuroCombobox extends r$6 {
|
|
|
7818
7859
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7819
7860
|
${this.optionActive && this.availableOptions.length > 0
|
|
7820
7861
|
? u$6`
|
|
7821
|
-
${`${this.optionActive.
|
|
7862
|
+
${`${this.optionActive.textContent}, selected, ${this.availableOptions.indexOf(this.optionActive) + 1} of ${this.availableOptions.length}`}
|
|
7822
7863
|
`
|
|
7823
7864
|
: undefined
|
|
7824
7865
|
}
|
|
7825
7866
|
</div>
|
|
7826
7867
|
<${this.dropdownTag}
|
|
7827
7868
|
for="dropdownMenu"
|
|
7869
|
+
fluid
|
|
7828
7870
|
bordered
|
|
7829
7871
|
rounded
|
|
7830
7872
|
matchWidth
|
|
@@ -7860,1033 +7902,1085 @@ class AuroCombobox extends r$6 {
|
|
|
7860
7902
|
}
|
|
7861
7903
|
}
|
|
7862
7904
|
|
|
7863
|
-
var styleCss$2 = i$c`:root{--ds-asset-font-circular-family-name: "AS Circular";--ds-asset-font-circular-filename: "ASCircularWeb";--ds-asset-font-circular-weight-light: "-Light";--ds-asset-font-circular-weight-medium: "-Medium";--ds-asset-font-circular-weight-book: "-Book";--ds-border-radius: 0.375rem;--ds-size-25: 0.125rem;--ds-size-50: 0.25rem;--ds-size-75: 0.375rem;--ds-size-100: 0.5rem;--ds-size-150: 0.75rem;--ds-size-200: 1rem;--ds-size-250: 1.25rem;--ds-size-300: 1.5rem;--ds-size-400: 2rem;--ds-size-500: 2.5rem;--ds-size-600: 3rem;--ds-size-700: 3.5rem;--ds-size-800: 4rem;--ds-size-900: 4.5rem;--ds-size-1000: 5rem;--ds-unitless-scale-20: 0.25;--ds-unitless-scale-50: 0.5;--ds-unitless-scale-100: 1;--ds-unitless-scale-140: 1.4;--ds-unitless-scale-150: 1.5;--ds-unitless-scale-200: 2;--ds-unitless-scale-300: 3;--ds-unitless-scale-350: 3.5;--ds-animation-default-property: all;--ds-animation-default-duration: 0.3s;--ds-animation-default-timing: ease-out;--ds-depth-overlay: 200;--ds-depth-modal: 300;--ds-depth-tooltip: 400;--ds-elevation-100: 0px 0px 5px rgba(0, 0, 0, 0.15);--ds-elevation-200: 0px 0px 10px rgba(0, 0, 0, 0.15);--ds-elevation-300: 0px 0px 15px rgba(0, 0, 0, 0.2);--ds-grid-breakpoint-xs: 320px;--ds-grid-breakpoint-sm: 576px;--ds-grid-breakpoint-md: 768px;--ds-grid-breakpoint-lg: 1024px;--ds-grid-breakpoint-xl: 1232px;--ds-grid-column-xs: 6;--ds-grid-column-sm: 12;--ds-grid-column-md: 12;--ds-grid-column-lg: 12;--ds-grid-column-xl: 12;--ds-grid-gutter-xs: 0.5rem;--ds-grid-gutter-sm: 1rem;--ds-grid-gutter-md: 1.5rem;--ds-grid-gutter-lg: 1.5rem;--ds-grid-gutter-xl: 2rem;--ds-grid-margin-xs: 1rem;--ds-grid-margin-sm: 1rem;--ds-grid-margin-md: 1.5rem;--ds-grid-margin-lg: 2rem;--ds-grid-margin-xl: 2rem;--ds-font-family-default: "AS Circular", Helvetica Neue, Arial, sans-serif;--ds-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;--ds-text-heading-300-weight: 300;--ds-text-heading-300-px: 18px;--ds-text-heading-300-size: 1.125rem;--ds-text-heading-300-height: 1.625rem;--ds-text-heading-300-height-px: 26px;--ds-text-heading-400-weight: 300;--ds-text-heading-400-px: 20px;--ds-text-heading-400-size: 1.25rem;--ds-text-heading-400-height: 1.625rem;--ds-text-heading-400-height-px: 26px;--ds-text-heading-500-weight: 300;--ds-text-heading-500-px-breakpoint-sm: 22px;--ds-text-heading-500-px-breakpoint-md: 24px;--ds-text-heading-500-px-breakpoint-lg: 24px;--ds-text-heading-500-size-breakpoint-sm: 1.375rem;--ds-text-heading-500-size-breakpoint-md: 1.5rem;--ds-text-heading-500-size-breakpoint-lg: 1.5rem;--ds-text-heading-500-height-breakpoint-sm: 1.625rem;--ds-text-heading-500-height-breakpoint-px-sm: 26px;--ds-text-heading-500-height-breakpoint-md: 1.875rem;--ds-text-heading-500-height-breakpoint-px-md: 30px;--ds-text-heading-500-height-breakpoint-lg: 2rem;--ds-text-heading-500-height-breakpoint-px-lg: 32px;--ds-text-heading-600-weight: 300;--ds-text-heading-600-px-breakpoint-sm: 26px;--ds-text-heading-600-px-breakpoint-md: 28px;--ds-text-heading-600-px-breakpoint-lg: 28px;--ds-text-heading-600-size-breakpoint-sm: 1.625rem;--ds-text-heading-600-size-breakpoint-md: 1.75rem;--ds-text-heading-600-size-breakpoint-lg: 1.75rem;--ds-text-heading-600-height-breakpoint-sm: 1.875rem;--ds-text-heading-600-height-breakpoint-px-sm: 30px;--ds-text-heading-600-height-breakpoint-md: 2.125rem;--ds-text-heading-600-height-breakpoint-px-md: 34px;--ds-text-heading-600-height-breakpoint-lg: 2.25rem;--ds-text-heading-600-height-breakpoint-px-lg: 36px;--ds-text-heading-700-weight: 500;--ds-text-heading-700-px-breakpoint-sm: 28px;--ds-text-heading-700-px-breakpoint-md: 32px;--ds-text-heading-700-px-breakpoint-lg: 36px;--ds-text-heading-700-size-breakpoint-sm: 1.75rem;--ds-text-heading-700-size-breakpoint-md: 2rem;--ds-text-heading-700-size-breakpoint-lg: 2.25rem;--ds-text-heading-700-height-breakpoint-sm: 2.125rem;--ds-text-heading-700-height-breakpoint-px-sm: 34px;--ds-text-heading-700-height-breakpoint-md: 2.375rem;--ds-text-heading-700-height-breakpoint-px-md: 38px;--ds-text-heading-700-height-breakpoint-lg: 2.75rem;--ds-text-heading-700-height-breakpoint-px-lg: 44px;--ds-text-heading-800-weight: 500;--ds-text-heading-800-px-breakpoint-sm: 32px;--ds-text-heading-800-px-breakpoint-md: 36px;--ds-text-heading-800-px-breakpoint-lg: 40px;--ds-text-heading-800-size-breakpoint-sm: 2rem;--ds-text-heading-800-size-breakpoint-md: 2.25rem;--ds-text-heading-800-size-breakpoint-lg: 2.5rem;--ds-text-heading-800-height-breakpoint-sm: 2.375rem;--ds-text-heading-800-height-breakpoint-px-sm: 38px;--ds-text-heading-800-height-breakpoint-md: 2.625rem;--ds-text-heading-800-height-breakpoint-px-md: 42px;--ds-text-heading-800-height-breakpoint-lg: 3rem;--ds-text-heading-800-height-breakpoint-px-lg: 48px;--ds-text-heading-default-weight: 500;--ds-text-heading-default-margin: 0;--ds-text-heading-default-spacing: -0.2px;--ds-text-heading-medium-weight: 300;--ds-text-heading-display-weight: 100;--ds-text-heading-display-px-breakpoint-sm: 44px;--ds-text-heading-display-px-breakpoint-md: 48px;--ds-text-heading-display-px-breakpoint-lg: 56px;--ds-text-heading-display-size-breakpoint-sm: 2.75rem;--ds-text-heading-display-size-breakpoint-md: 3rem;--ds-text-heading-display-size-breakpoint-lg: 3.5rem;--ds-text-heading-display-height-breakpoint-sm: 3.375rem;--ds-text-heading-display-height-breakpoint-px-sm: 54px;--ds-text-heading-display-height-breakpoint-md: 3.75rem;--ds-text-heading-display-height-breakpoint-px-md: 60px;--ds-text-heading-display-height-breakpoint-lg: 4.25rem;--ds-text-heading-display-height-breakpoint-px-lg: 68px;--ds-text-body-default-weight: 500;--ds-text-body-size-xxs: 0.625rem;--ds-text-body-size-xs: 0.75rem;--ds-text-body-size-sm: 0.875rem;--ds-text-body-size-default: 1rem;--ds-text-body-size-lg: 1.125rem;--ds-text-body-height-xs: 1rem;--ds-text-body-height-sm: 1.25rem;--ds-text-body-height-default: 1.5rem;--ds-text-body-height-lg: 1.625rem;--ds-color-alert-notification-default: #0074c8;--ds-color-alert-warning-default: #de750c;--ds-color-alert-error-default: #df0b37;--ds-color-alert-success-default: #00805d;--ds-color-alert-advisory-default: #fff0cd;--ds-color-alert-bkg-success-default: #ddf6e8;--ds-color-alert-bkg-error-default: #ffedf1;--ds-color-background-primary-100-default: #ffffff;--ds-color-background-primary-100-inverse: #0e2b4f;--ds-color-background-primary-200-default: #f7f7f7;--ds-color-background-primary-200-inverse: #194069;--ds-color-background-primary-300-default: #e4e8ec;--ds-color-background-primary-300-inverse: #265688;--ds-color-background-primary-400-default: #dddddd;--ds-color-background-primary-400-inverse: #326aa5;--ds-color-background-success-default: #eef8f5;--ds-color-background-success-inverse: #173c30;--ds-color-background-error-default: #fff4f4;--ds-color-background-error-inverse: #74110e;--ds-color-background-warning-default: #fef8e9;--ds-color-background-warning-inverse: #5d4514;--ds-color-background-info-default: #f0f7fd;--ds-color-background-info-inverse: #193d73;--ds-color-background-subtle-default: #f7f8fa;--ds-color-background-subtle-inverse: #2a2a2a;--ds-color-background-accent-default: #ebfafd;--ds-color-background-accent-inverse: #275b72;--ds-color-background-emphasis-default: #c9e0f7;--ds-color-background-emphasis-inverse: #225296;--ds-color-background-scrimmed-default: rgba(0, 0, 0, 0.5);--ds-color-background-lightest: #ffffff;--ds-color-background-lighter: #f7f7f7;--ds-color-background-darker: #01426a;--ds-color-background-darkest: #00274a;--ds-color-background-gradient-default: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));--ds-color-base-white: #ffffff;--ds-color-base-white-100: rgba(255, 255, 255, 0.03);--ds-color-base-white-200: rgba(255, 255, 255, 0.06);--ds-color-base-white-300: rgba(255, 255, 255, 0.12);--ds-color-base-white-400: rgba(255, 255, 255, 0.25);--ds-color-base-white-500: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-50: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-40: rgba(255, 255, 255, 0.4);--ds-color-base-white-opacity-0: rgba(255, 255, 255, 0);--ds-color-base-black: #000000;--ds-color-base-black-100: rgba(0, 0, 0, 0.03);--ds-color-base-black-200: rgba(0, 0, 0, 0.06);--ds-color-base-black-300: rgba(0, 0, 0, 0.12);--ds-color-base-black-400: rgba(0, 0, 0, 0.25);--ds-color-base-black-500: rgba(0, 0, 0, 0.5);--ds-color-base-black-opacity-15: rgba(0, 0, 0, 0.15);--ds-color-base-blue-100: #f0f7fd;--ds-color-base-blue-200: #c9e0f7;--ds-color-base-blue-300: #a0c9f1;--ds-color-base-blue-400: #79b2ec;--ds-color-base-blue-500: #5398e6;--ds-color-base-blue-600: #3b7fd2;--ds-color-base-blue-700: #2c67b5;--ds-color-base-blue-800: #225296;--ds-color-base-blue-900: #193d73;--ds-color-base-blue-1000: #102a51;--ds-color-base-cyan-100: #ebfafd;--ds-color-base-cyan-200: #a8e9f7;--ds-color-base-cyan-300: #6ad5ef;--ds-color-base-cyan-400: #56bbde;--ds-color-base-cyan-500: #4aa2c7;--ds-color-base-cyan-600: #3e89aa;--ds-color-base-cyan-700: #32718e;--ds-color-base-cyan-800: #275b72;--ds-color-base-cyan-900: #1d4658;--ds-color-base-cyan-1000: #12303d;--ds-color-base-error-100: #fff4f4;--ds-color-base-error-200: #f9aca6;--ds-color-base-error-300: #f16359;--ds-color-base-error-400: #cc1816;--ds-color-base-error-500: #74110e;--ds-color-base-gray-100: #f7f7f7;--ds-color-base-gray-200: #d4d4d4;--ds-color-base-gray-300: #c5c5c5;--ds-color-base-gray-400: #adadad;--ds-color-base-gray-500: #959595;--ds-color-base-gray-600: #7e7e7e;--ds-color-base-gray-700: #676767;--ds-color-base-gray-800: #525252;--ds-color-base-gray-900: #3d3d3d;--ds-color-base-gray-1000: #2a2a2a;--ds-color-base-green-100: #f3faf7;--ds-color-base-green-200: #000000;--ds-color-base-green-300: #addbca;--ds-color-base-green-400: #7ec6ac;--ds-color-base-green-500: #51ae8c;--ds-color-base-green-600: #459578;--ds-color-base-green-700: #3a7d64;--ds-color-base-green-800: #306854;--ds-color-base-green-900: #285545;--ds-color-base-green-1000: #1f4436;--ds-color-base-lime-100: #f5fbeb;--ds-color-base-lime-200: #d8efb4;--ds-color-base-lime-300: #badd81;--ds-color-base-lime-400: #a2c270;--ds-color-base-lime-500: #8ca761;--ds-color-base-lime-600: #778f53;--ds-color-base-lime-700: #647845;--ds-color-base-lime-800: #53643a;--ds-color-base-lime-900: #44522f;--ds-color-base-lime-1000: #364126;--ds-color-base-navy-100: #f2f7fb;--ds-color-base-navy-200: #cfe0ef;--ds-color-base-navy-300: #acc9e2;--ds-color-base-navy-400: #89b2d4;--ds-color-base-navy-500: #6899c6;--ds-color-base-navy-600: #4a82b7;--ds-color-base-navy-700: #326aa5;--ds-color-base-navy-800: #265688;--ds-color-base-navy-900: #194069;--ds-color-base-navy-1000: #0e2b4f;--ds-color-base-neutral-100: #f7f8fa;--ds-color-base-neutral-200: #e4e8ec;--ds-color-base-neutral-300: #ccd2db;--ds-color-base-neutral-400: #afb9c6;--ds-color-base-neutral-500: #939fad;--ds-color-base-neutral-600: #7e8894;--ds-color-base-neutral-700: #6a717c;--ds-color-base-neutral-800: #585e67;--ds-color-base-neutral-900: #484d55;--ds-color-base-neutral-1000: #393d43;--ds-color-base-pink-100: #fff7f8;--ds-color-base-pink-200: #fde0e6;--ds-color-base-pink-300: #fcc2ce;--ds-color-base-pink-400: #fa9db0;--ds-color-base-pink-500: #f7738e;--ds-color-base-pink-600: #e45472;--ds-color-base-pink-700: #bf475f;--ds-color-base-pink-800: #a03b50;--ds-color-base-pink-900: #833142;--ds-color-base-pink-1000: #692734;--ds-color-base-purple-100: #fbf8fe;--ds-color-base-purple-200: #ede3fd;--ds-color-base-purple-300: #ddc9fb;--ds-color-base-purple-400: #c9a9f8;--ds-color-base-purple-500: #b588f5;--ds-color-base-purple-600: #a268f3;--ds-color-base-purple-700: #8d47f0;--ds-color-base-purple-800: #7633d7;--ds-color-base-purple-900: #622ab2;--ds-color-base-purple-1000: #4e228d;--ds-color-base-red-100: #fef7f5;--ds-color-base-red-200: #fae2da;--ds-color-base-red-300: #f5c7b8;--ds-color-base-red-400: #f0a68d;--ds-color-base-red-500: #e9815e;--ds-color-base-red-600: #e35c2f;--ds-color-base-red-700: #d03a08;--ds-color-base-red-800: #ae3007;--ds-color-base-red-900: #902806;--ds-color-base-red-1000: #732005;--ds-color-base-success-100: #eef8f5;--ds-color-base-success-200: #8eceb9;--ds-color-base-success-300: #40a080;--ds-color-base-success-400: #0b6f4d;--ds-color-base-success-500: #173c30;--ds-color-base-turquoise-100: #f7fafa;--ds-color-base-turquoise-200: #dfe9ea;--ds-color-base-turquoise-300: #c2d5d6;--ds-color-base-turquoise-400: #9fbdbe;--ds-color-base-turquoise-500: #7ba5a6;--ds-color-base-turquoise-600: #5c8f91;--ds-color-base-turquoise-700: #3d7a7d;--ds-color-base-turquoise-800: #21686a;--ds-color-base-turquoise-900: #085659;--ds-color-base-turquoise-1000: #004447;--ds-color-base-yellow-100: #fff9df;--ds-color-base-yellow-200: #ffe87e;--ds-color-base-yellow-300: #f9ce06;--ds-color-base-yellow-400: #d6b622;--ds-color-base-yellow-500: #b49d35;--ds-color-base-yellow-600: #96873e;--ds-color-base-yellow-700: #7c7140;--ds-color-base-yellow-800: #665e3d;--ds-color-base-yellow-900: #524e38;--ds-color-base-yellow-1000: #403d30;--ds-color-base-warning-100: #fef8e9;--ds-color-base-warning-200: #f2c153;--ds-color-base-warning-300: #c49432;--ds-color-base-warning-400: #8e6b22;--ds-color-base-warning-500: #5d4514;--ds-color-state-error-100: #ff999b;--ds-color-state-error-500: #df0b37;--ds-color-state-success-100: #69cf96;--ds-color-state-success-500: #00805d;--ds-color-state-warning-500: #de750c;--ds-color-border-primary-default: #585e67;--ds-color-border-primary-inverse: #afb9c6;--ds-color-border-secondary-default: #939fad;--ds-color-border-secondary-inverse: #7e8894;--ds-color-border-tertiary-default: #dddddd;--ds-color-border-tertiary-inverse: #676767;--ds-color-border-error-default: #cc1816;--ds-color-border-error-inverse: #f9aca6;--ds-color-border-divider-default: rgba(0, 0, 0, 0.12);--ds-color-border-divider-inverse: rgba(255, 255, 255, 0.25);--ds-color-border-subtle-default: #f0f7fd;--ds-color-border-subtle-inverse: #326aa5;--ds-color-border-emphasis-default: #194069;--ds-color-border-emphasis-inverse: #f2f7fb;--ds-color-border-accent-default: #badd81;--ds-color-border-accent-inverse: #a2c270;--ds-color-border-success-default: #0b6f4d;--ds-color-border-success-inverse: #8eceb9;--ds-color-border-warning-default: #c49432;--ds-color-border-warning-inverse: #f2c153;--ds-color-border-info-default: #326aa5;--ds-color-border-info-inverse: #89b2d4;--ds-color-border-ui-default-default: #2c67b5;--ds-color-border-ui-default-inverse: #56bbde;--ds-color-border-ui-hover-default: #193d73;--ds-color-border-ui-hover-inverse: #a8e9f7;--ds-color-border-ui-active-default: #225296;--ds-color-border-ui-active-inverse: #6ad5ef;--ds-color-border-ui-focus-default: #2c67b5;--ds-color-border-ui-focus-inverse: #56bbde;--ds-color-border-ui-disabled-default: #adadad;--ds-color-border-ui-disabled-inverse: #7e7e7e;--ds-color-border-active-default: #0074c8;--ds-color-border-active-inverse: #00cff0;--ds-color-border-disabled-default: #d4d4d4;--ds-color-border-focus-default: #959595;--ds-color-brand-neutral-100: #f7f8fa;--ds-color-brand-neutral-200: #e4e8ec;--ds-color-brand-neutral-300: #ccd2db;--ds-color-brand-neutral-400: #afb9c6;--ds-color-brand-neutral-500: #939fad;--ds-color-brand-neutral-600: #7e8894;--ds-color-brand-neutral-700: #6a717c;--ds-color-brand-neutral-800: #585e67;--ds-color-brand-neutral-900: #484d55;--ds-color-brand-neutral-1000: #393d43;--ds-color-brand-gray-100: #f7f7f7;--ds-color-brand-gray-200: #dddddd;--ds-color-brand-gray-300: #c5c5c5;--ds-color-brand-gray-400: #adadad;--ds-color-brand-gray-500: #959595;--ds-color-brand-gray-600: #7e7e7e;--ds-color-brand-gray-700: #676767;--ds-color-brand-gray-800: #525252;--ds-color-brand-gray-900: #3d3d3d;--ds-color-brand-gray-1000: #2a2a2a;--ds-color-brand-red-100: #fef7f5;--ds-color-brand-red-200: #fae2da;--ds-color-brand-red-300: #f5c7b8;--ds-color-brand-red-400: #f0a68d;--ds-color-brand-red-500: #e9815e;--ds-color-brand-red-600: #e35c2f;--ds-color-brand-red-700: #d03a08;--ds-color-brand-red-800: #ae3007;--ds-color-brand-red-900: #902806;--ds-color-brand-red-1000: #732005;--ds-color-brand-yellow-100: #fff9df;--ds-color-brand-yellow-200: #ffe87e;--ds-color-brand-yellow-300: #f9ce06;--ds-color-brand-yellow-400: #d6b622;--ds-color-brand-yellow-500: #b49d35;--ds-color-brand-yellow-600: #96873e;--ds-color-brand-yellow-700: #7c7140;--ds-color-brand-yellow-800: #665e3d;--ds-color-brand-yellow-900: #524e38;--ds-color-brand-yellow-1000: #403d30;--ds-color-brand-lime-100: #f5fbeb;--ds-color-brand-lime-200: #d8efb4;--ds-color-brand-lime-300: #badd81;--ds-color-brand-lime-400: #a2c270;--ds-color-brand-lime-500: #8ca761;--ds-color-brand-lime-600: #778f53;--ds-color-brand-lime-700: #647845;--ds-color-brand-lime-800: #53643a;--ds-color-brand-lime-900: #44522f;--ds-color-brand-lime-1000: #364126;--ds-color-brand-green-100: #f3faf7;--ds-color-brand-green-200: #d4ece4;--ds-color-brand-green-300: #addbca;--ds-color-brand-green-400: #7ec6ac;--ds-color-brand-green-500: #51ae8c;--ds-color-brand-green-600: #459578;--ds-color-brand-green-700: #3a7d64;--ds-color-brand-green-800: #306854;--ds-color-brand-green-900: #285545;--ds-color-brand-green-1000: #1f4436;--ds-color-brand-turquoise-100: #f7fafa;--ds-color-brand-turquoise-200: #dfe9ea;--ds-color-brand-turquoise-300: #c2d5d6;--ds-color-brand-turquoise-400: #9fbdbe;--ds-color-brand-turquoise-500: #7ba5a6;--ds-color-brand-turquoise-600: #5c8f91;--ds-color-brand-turquoise-700: #3d7a7d;--ds-color-brand-turquoise-800: #21686a;--ds-color-brand-turquoise-900: #085659;--ds-color-brand-turquoise-1000: #004447;--ds-color-brand-cyan-100: #ebfafd;--ds-color-brand-cyan-200: #a8e9f7;--ds-color-brand-cyan-300: #6ad5ef;--ds-color-brand-cyan-400: #56bbde;--ds-color-brand-cyan-500: #4aa2c7;--ds-color-brand-cyan-600: #3e89aa;--ds-color-brand-cyan-700: #32718e;--ds-color-brand-cyan-800: #275b72;--ds-color-brand-cyan-900: #1d4658;--ds-color-brand-cyan-1000: #12303d;--ds-color-brand-blue-100: #f0f7fd;--ds-color-brand-blue-200: #c9e0f7;--ds-color-brand-blue-300: #a0c9f1;--ds-color-brand-blue-400: #79b2ec;--ds-color-brand-blue-500: #5398e6;--ds-color-brand-blue-600: #3b7fd2;--ds-color-brand-blue-700: #2c67b5;--ds-color-brand-blue-800: #225296;--ds-color-brand-blue-900: #193d73;--ds-color-brand-blue-1000: #102a51;--ds-color-brand-navy-100: #f2f7fb;--ds-color-brand-navy-200: #cfe0ef;--ds-color-brand-navy-300: #acc9e2;--ds-color-brand-navy-400: #89b2d4;--ds-color-brand-navy-500: #6899c6;--ds-color-brand-navy-600: #4a82b7;--ds-color-brand-navy-700: #326aa5;--ds-color-brand-navy-800: #265688;--ds-color-brand-navy-900: #194069;--ds-color-brand-navy-1000: #0e2b4f;--ds-color-brand-purple-100: #fbf8fe;--ds-color-brand-purple-200: #ede3fd;--ds-color-brand-purple-300: #ddc9fb;--ds-color-brand-purple-400: #c9a9f8;--ds-color-brand-purple-500: #b588f5;--ds-color-brand-purple-600: #a268f3;--ds-color-brand-purple-700: #8d47f0;--ds-color-brand-purple-800: #7633d7;--ds-color-brand-purple-900: #622ab2;--ds-color-brand-purple-1000: #4e228d;--ds-color-brand-pink-100: #fff7f8;--ds-color-brand-pink-200: #fde0e6;--ds-color-brand-pink-300: #fcc2ce;--ds-color-brand-pink-400: #fa9db0;--ds-color-brand-pink-500: #f7738e;--ds-color-brand-pink-600: #e45472;--ds-color-brand-pink-700: #bf475f;--ds-color-brand-pink-800: #a03b50;--ds-color-brand-pink-900: #833142;--ds-color-brand-pink-1000: #692734;--ds-color-brand-midnight-100: #c1daf0;--ds-color-brand-midnight-200: #569ed7;--ds-color-brand-midnight-300: #156fad;--ds-color-brand-midnight-400: #01426a;--ds-color-brand-midnight-500: #00274a;--ds-color-brand-atlas-100: #cde6ff;--ds-color-brand-atlas-200: #6bb7fb;--ds-color-brand-atlas-300: #2492eb;--ds-color-brand-atlas-400: #0074c8;--ds-color-brand-atlas-500: #054687;--ds-color-brand-atlas-400-opacity-20: rgba(0, 116, 200, 0.2);--ds-color-brand-breeze-100: #c0f7ff;--ds-color-brand-breeze-200: #5de3f7;--ds-color-brand-breeze-300: #00cff0;--ds-color-brand-breeze-400: #099dc5;--ds-color-brand-breeze-500: #0b5575;--ds-color-brand-breeze-300-opacity-30: rgba(0, 207, 240, 0.3);--ds-color-brand-tropical-100: #e2ffcd;--ds-color-brand-tropical-200: #d0fba6;--ds-color-brand-tropical-300: #c0e585;--ds-color-brand-tropical-400: #91be62;--ds-color-brand-tropical-500: #5e8741;--ds-color-brand-alpine-100: #bcaae6;--ds-color-brand-alpine-200: #9e73ea;--ds-color-brand-alpine-300: #8439ef;--ds-color-brand-alpine-400: #631db8;--ds-color-brand-alpine-500: #39115c;--ds-color-brand-flamingo-100: #ffebee;--ds-color-brand-flamingo-200: #ffc0ca;--ds-color-brand-flamingo-300: #ff94a7;--ds-color-brand-flamingo-400: #f65b7b;--ds-color-brand-flamingo-500: #b82b47;--ds-color-brand-canyon-100: #ffcab6;--ds-color-brand-canyon-200: #f99574;--ds-color-brand-canyon-300: #f26135;--ds-color-brand-canyon-400: #de3e09;--ds-color-brand-canyon-500: #b83302;--ds-color-brand-goldcoast-100: #fff0cd;--ds-color-brand-goldcoast-200: #ffdb67;--ds-color-brand-goldcoast-300: #ffd200;--ds-color-brand-goldcoast-400: #e5ad07;--ds-color-brand-goldcoast-500: #b88624;--ds-color-brand-goldgray-100: #c5c1bf;--ds-color-brand-goldgray-200: #726e6c;--ds-color-brand-gold-100: #ccbc94;--ds-color-brand-gold-200: #7f682e;--ds-color-brand-emerald: #139142;--ds-color-brand-sapphire: #015daa;--ds-color-brand-ruby: #a41d4a;--ds-color-brand-lounge: #01426a;--ds-color-brand-loungeplus: #53b390;--ds-color-container-accent-default: #f5fbeb;--ds-color-container-accent-inverse: #badd81;--ds-color-container-emphasis-default: #ebfafd;--ds-color-container-emphasis-inverse: #6ad5ef;--ds-color-container-error-default: #fff4f4;--ds-color-container-error-inverse: #74110e;--ds-color-container-info-default: #f0f7fd;--ds-color-container-info-inverse: #193d73;--ds-color-container-primary-default: #ffffff;--ds-color-container-primary-inverse: #0e2b4f;--ds-color-container-secondary-default: #f7f7f7;--ds-color-container-secondary-inverse: #194069;--ds-color-container-subtle-default: #f7f8fa;--ds-color-container-subtle-inverse: #393d43;--ds-color-container-success-default: #eef8f5;--ds-color-container-success-inverse: #173c30;--ds-color-container-tertiary-default: rgba(0, 0, 0, 0.03);--ds-color-container-tertiary-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-warning-default: #fef8e9;--ds-color-container-warning-inverse: #5d4514;--ds-color-container-ui-primary-active-default: #225296;--ds-color-container-ui-primary-active-inverse: #6ad5ef;--ds-color-container-ui-primary-default-default: #2c67b5;--ds-color-container-ui-primary-default-inverse: #56bbde;--ds-color-container-ui-primary-disabled-default: #a0c9f1;--ds-color-container-ui-primary-disabled-inverse: #275b72;--ds-color-container-ui-primary-focus-default: #2c67b5;--ds-color-container-ui-primary-focus-inverse: #56bbde;--ds-color-container-ui-primary-hover-default: #193d73;--ds-color-container-ui-primary-hover-inverse: #a8e9f7;--ds-color-container-ui-secondary-active-default: #f0f7fd;--ds-color-container-ui-secondary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-secondary-default-default: #ffffff;--ds-color-container-ui-secondary-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-disabled-default: #f7f7f7;--ds-color-container-ui-secondary-disabled-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-secondary-focus-default: #ffffff;--ds-color-container-ui-secondary-focus-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-hover-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-secondary-hover-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-active-default: rgba(0, 0, 0, 0.06);--ds-color-container-ui-tertiary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-tertiary-default-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-default-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-disabled-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-disabled-inverse: rgba(255, 255, 255, 0.25);--ds-color-container-ui-tertiary-focus-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-focus-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-hover-default: rgba(0, 0, 0, 0.12);--ds-color-container-ui-tertiary-hover-inverse: rgba(255, 255, 255, 0.25);--ds-color-icon-primary-default: #676767;--ds-color-icon-primary-inverse: #f7f7f7;--ds-color-icon-secondary-default: #7e8894;--ds-color-icon-secondary-inverse: #ccd2db;--ds-color-icon-tertiary-default: #afb9c6;--ds-color-icon-tertiary-inverse: #939fad;--ds-color-icon-emphasis-default: #2a2a2a;--ds-color-icon-emphasis-inverse: #ffffff;--ds-color-icon-accent-default: #a2c270;--ds-color-icon-accent-inverse: #badd81;--ds-color-icon-info-default: #326aa5;--ds-color-icon-info-inverse: #89b2d4;--ds-color-icon-error-default: #cc1816;--ds-color-icon-error-inverse: #f9aca6;--ds-color-icon-warning-default: #c49432;--ds-color-icon-warning-inverse: #f2c153;--ds-color-icon-success-default: #40a080;--ds-color-icon-success-inverse: #8eceb9;--ds-color-icon-subtle-default: #a0c9f1;--ds-color-icon-subtle-inverse: #326aa5;--ds-color-icon-ui-primary-default-default: #2c67b5;--ds-color-icon-ui-primary-default-inverse: #56bbde;--ds-color-icon-ui-primary-hover-default: #193d73;--ds-color-icon-ui-primary-hover-inverse: #a8e9f7;--ds-color-icon-ui-primary-active-default: #225296;--ds-color-icon-ui-primary-active-inverse: #6ad5ef;--ds-color-icon-ui-primary-disabled-default: #adadad;--ds-color-icon-ui-primary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-primary-focus-default: #2c67b5;--ds-color-icon-ui-primary-focus-inverse: #56bbde;--ds-color-icon-ui-secondary-active-default: #676767;--ds-color-icon-ui-secondary-active-inverse: #c5c5c5;--ds-color-icon-ui-secondary-default-default: #7e7e7e;--ds-color-icon-ui-secondary-default-inverse: #adadad;--ds-color-icon-ui-secondary-disabled-default: #adadad;--ds-color-icon-ui-secondary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-secondary-focus-default: #7e7e7e;--ds-color-icon-ui-secondary-focus-inverse: #adadad;--ds-color-icon-ui-secondary-hover-default: #525252;--ds-color-icon-ui-secondary-hover-inverse: #dddddd;--ds-color-icon-brand-red-default: #d03a08;--ds-color-icon-brand-red-inverse: #e9815e;--ds-color-icon-brand-yellow-default: #7c7140;--ds-color-icon-brand-yellow-inverse: #f9ce06;--ds-color-icon-brand-pink-default: #bf475f;--ds-color-icon-brand-pink-inverse: #f7738e;--ds-color-icon-brand-purple-default: #8d47f0;--ds-color-icon-brand-purple-inverse: #b588f5;--ds-color-icon-brand-lime-default: #647845;--ds-color-icon-brand-lime-inverse: #badd81;--ds-color-icon-brand-green-default: #3a7d64;--ds-color-icon-brand-green-inverse: #51ae8c;--ds-color-icon-brand-turquoise-default: #3d7a7d;--ds-color-icon-brand-turquoise-inverse: #7ba5a6;--ds-color-icon-brand-navy-default: #265688;--ds-color-icon-brand-navy-inverse: #6899c6;--ds-color-icon-brand-blue-default: #2c67b5;--ds-color-icon-brand-blue-inverse: #5398e6;--ds-color-icon-brand-cyan-default: #32718e;--ds-color-icon-brand-cyan-inverse: #6ad5ef;--ds-color-icon-brand-gray-default: #676767;--ds-color-icon-brand-gray-inverse: #c5c5c5;--ds-color-icon-brand-neutral-default: #6a717c;--ds-color-icon-brand-neutral-inverse: #afb9c6;--ds-color-icon-disabled-default: rgba(0, 0, 0, 0.15);--ds-color-text-primary-default: #2a2a2a;--ds-color-text-primary-inverse: #ffffff;--ds-color-text-secondary-default: #525252;--ds-color-text-secondary-inverse: #dddddd;--ds-color-text-tertiary-default: #6a717c;--ds-color-text-tertiary-inverse: #adadad;--ds-color-text-error-default: #cc1816;--ds-color-text-error-inverse: #f9aca6;--ds-color-text-emphasis-default: #265688;--ds-color-text-emphasis-inverse: #cfe0ef;--ds-color-text-accent-default: #647845;--ds-color-text-accent-inverse: #badd81;--ds-color-text-info-default: #326aa5;--ds-color-text-info-inverse: #acc9e2;--ds-color-text-subtle-default: #32718e;--ds-color-text-subtle-inverse: #56bbde;--ds-color-text-success-default: #0b6f4d;--ds-color-text-success-inverse: #8eceb9;--ds-color-text-ui-active-default: #225296;--ds-color-text-ui-active-inverse: #6ad5ef;--ds-color-text-ui-default-default: #2c67b5;--ds-color-text-ui-default-inverse: #56bbde;--ds-color-text-ui-disabled-default: #adadad;--ds-color-text-ui-disabled-inverse: #7e7e7e;--ds-color-text-ui-focus-default: #2c67b5;--ds-color-text-ui-focus-inverse: #56bbde;--ds-color-text-ui-hover-default: #193d73;--ds-color-text-ui-hover-inverse: #a8e9f7;--ds-color-text-link-default: #0074c8;--ds-color-text-link-inverse: #00cff0;--ds-color-tier-alaska-mvp-default: #726e6c;--ds-color-tier-alaska-mvp-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold-default: #7f682e;--ds-color-tier-alaska-mvpgold-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold75k-default: #7f682e;--ds-color-tier-alaska-mvpgold75k-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold100k-default: #7f682e;--ds-color-tier-alaska-mvpgold100k-inverse: #c5c1bf;--ds-color-tier-alaska-lounge: #01426a;--ds-color-tier-alaska-loungeplus: #53b390;--ds-color-tier-fare-business-default: #005154;--ds-color-tier-fare-business-inverse: #9fbdbe;--ds-color-tier-fare-economy-default: #2c67b5;--ds-color-tier-fare-economy-inverse: #a0c9f1;--ds-color-tier-fare-first-class-default: #002c4e;--ds-color-tier-fare-first-class-inverse: #89b2d4;--ds-color-tier-fare-saver-default: #4aa2c7;--ds-color-tier-fare-saver-inverse: #a8e9f7;--ds-color-tier-oneworld-emerald: #139142;--ds-color-tier-oneworld-sapphire: #015daa;--ds-color-tier-oneworld-ruby: #a41d4a;--ds-color-ui-default-default: #0074c8;--ds-color-ui-default-inverse: #00cff0;--ds-color-ui-hover-default: #054687;--ds-color-ui-hover-inverse: #5de3f7;--ds-color-ui-active-default: #054687;--ds-color-ui-active-inverse: #5de3f7;--ds-color-ui-disabled-default: rgba(0, 116, 200, 0.2);--ds-color-ui-bkg-default-default: rgba(0, 0, 0, 0.03);--ds-color-ui-bkg-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-ui-bkg-hover-default: rgba(0, 0, 0, 0.06);--ds-color-ui-bkg-hover-inverse: rgba(255, 255, 255, 0.06);--ds-color-utility-blue-default: #79b2ec;--ds-color-utility-blue-inverse: #c9e0f7;--ds-color-utility-cyan-default: #6ad5ef;--ds-color-utility-cyan-inverse: #a8e9f7;--ds-color-utility-green-default: #7ec6ac;--ds-color-utility-green-inverse: #addbca;--ds-color-utility-gray-default: #adadad;--ds-color-utility-gray-inverse: #dddddd;--ds-color-utility-lime-default: #badd81;--ds-color-utility-lime-inverse: #d8efb4;--ds-color-utility-navy-default: #265688;--ds-color-utility-navy-inverse: #acc9e2;--ds-color-utility-neutral-default: #7e8894;--ds-color-utility-neutral-inverse: #ccd2db;--ds-color-utility-pink-default: #f7738e;--ds-color-utility-pink-inverse: #fcc2ce;--ds-color-utility-purple-default: #8d47f0;--ds-color-utility-purple-inverse: #ddc9fb;--ds-color-utility-red-default: #e35c2f;--ds-color-utility-red-inverse: #f0a68d;--ds-color-utility-turquoise-default: #5c8f91;--ds-color-utility-turquoise-inverse: #9fbdbe;--ds-color-utility-yellow-default: #f9ce06;--ds-color-utility-yellow-inverse: #ffe87e;--ds-color-utility-error-default: #cc1816;--ds-color-utility-error-inverse: #f9aca6;--ds-color-utility-warning-default: #f2c153;--ds-color-utility-warning-inverse: #f2c153;--ds-color-utility-success-default: #0b6f4d;--ds-color-utility-success-inverse: #8eceb9}*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]){padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption){padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}`;
|
|
7905
|
+
var styleCss$2 = i$c`:root{--ds-asset-font-circular-family-name: "AS Circular";--ds-asset-font-circular-filename: "ASCircularWeb";--ds-asset-font-circular-weight-light: "-Light";--ds-asset-font-circular-weight-medium: "-Medium";--ds-asset-font-circular-weight-book: "-Book";--ds-border-radius: 0.375rem;--ds-size-25: 0.125rem;--ds-size-50: 0.25rem;--ds-size-75: 0.375rem;--ds-size-100: 0.5rem;--ds-size-150: 0.75rem;--ds-size-200: 1rem;--ds-size-250: 1.25rem;--ds-size-300: 1.5rem;--ds-size-400: 2rem;--ds-size-500: 2.5rem;--ds-size-600: 3rem;--ds-size-700: 3.5rem;--ds-size-800: 4rem;--ds-size-900: 4.5rem;--ds-size-1000: 5rem;--ds-unitless-scale-20: 0.25;--ds-unitless-scale-50: 0.5;--ds-unitless-scale-100: 1;--ds-unitless-scale-140: 1.4;--ds-unitless-scale-150: 1.5;--ds-unitless-scale-200: 2;--ds-unitless-scale-300: 3;--ds-unitless-scale-350: 3.5;--ds-animation-default-property: all;--ds-animation-default-duration: 0.3s;--ds-animation-default-timing: ease-out;--ds-depth-overlay: 200;--ds-depth-modal: 300;--ds-depth-tooltip: 400;--ds-elevation-100: 0px 0px 5px rgba(0, 0, 0, 0.15);--ds-elevation-200: 0px 0px 10px rgba(0, 0, 0, 0.15);--ds-elevation-300: 0px 0px 15px rgba(0, 0, 0, 0.2);--ds-grid-breakpoint-xs: 320px;--ds-grid-breakpoint-sm: 576px;--ds-grid-breakpoint-md: 768px;--ds-grid-breakpoint-lg: 1024px;--ds-grid-breakpoint-xl: 1232px;--ds-grid-column-xs: 6;--ds-grid-column-sm: 12;--ds-grid-column-md: 12;--ds-grid-column-lg: 12;--ds-grid-column-xl: 12;--ds-grid-gutter-xs: 0.5rem;--ds-grid-gutter-sm: 1rem;--ds-grid-gutter-md: 1.5rem;--ds-grid-gutter-lg: 1.5rem;--ds-grid-gutter-xl: 2rem;--ds-grid-margin-xs: 1rem;--ds-grid-margin-sm: 1rem;--ds-grid-margin-md: 1.5rem;--ds-grid-margin-lg: 2rem;--ds-grid-margin-xl: 2rem;--ds-font-family-default: "AS Circular", Helvetica Neue, Arial, sans-serif;--ds-font-family-mono: Menlo, Monaco, Consolas, "Courier New", monospace;--ds-text-heading-300-weight: 300;--ds-text-heading-300-px: 18px;--ds-text-heading-300-size: 1.125rem;--ds-text-heading-300-height: 1.625rem;--ds-text-heading-300-height-px: 26px;--ds-text-heading-400-weight: 300;--ds-text-heading-400-px: 20px;--ds-text-heading-400-size: 1.25rem;--ds-text-heading-400-height: 1.625rem;--ds-text-heading-400-height-px: 26px;--ds-text-heading-500-weight: 300;--ds-text-heading-500-px-breakpoint-sm: 22px;--ds-text-heading-500-px-breakpoint-md: 24px;--ds-text-heading-500-px-breakpoint-lg: 24px;--ds-text-heading-500-size-breakpoint-sm: 1.375rem;--ds-text-heading-500-size-breakpoint-md: 1.5rem;--ds-text-heading-500-size-breakpoint-lg: 1.5rem;--ds-text-heading-500-height-breakpoint-sm: 1.625rem;--ds-text-heading-500-height-breakpoint-px-sm: 26px;--ds-text-heading-500-height-breakpoint-md: 1.875rem;--ds-text-heading-500-height-breakpoint-px-md: 30px;--ds-text-heading-500-height-breakpoint-lg: 2rem;--ds-text-heading-500-height-breakpoint-px-lg: 32px;--ds-text-heading-600-weight: 300;--ds-text-heading-600-px-breakpoint-sm: 26px;--ds-text-heading-600-px-breakpoint-md: 28px;--ds-text-heading-600-px-breakpoint-lg: 28px;--ds-text-heading-600-size-breakpoint-sm: 1.625rem;--ds-text-heading-600-size-breakpoint-md: 1.75rem;--ds-text-heading-600-size-breakpoint-lg: 1.75rem;--ds-text-heading-600-height-breakpoint-sm: 1.875rem;--ds-text-heading-600-height-breakpoint-px-sm: 30px;--ds-text-heading-600-height-breakpoint-md: 2.125rem;--ds-text-heading-600-height-breakpoint-px-md: 34px;--ds-text-heading-600-height-breakpoint-lg: 2.25rem;--ds-text-heading-600-height-breakpoint-px-lg: 36px;--ds-text-heading-700-weight: 500;--ds-text-heading-700-px-breakpoint-sm: 28px;--ds-text-heading-700-px-breakpoint-md: 32px;--ds-text-heading-700-px-breakpoint-lg: 36px;--ds-text-heading-700-size-breakpoint-sm: 1.75rem;--ds-text-heading-700-size-breakpoint-md: 2rem;--ds-text-heading-700-size-breakpoint-lg: 2.25rem;--ds-text-heading-700-height-breakpoint-sm: 2.125rem;--ds-text-heading-700-height-breakpoint-px-sm: 34px;--ds-text-heading-700-height-breakpoint-md: 2.375rem;--ds-text-heading-700-height-breakpoint-px-md: 38px;--ds-text-heading-700-height-breakpoint-lg: 2.75rem;--ds-text-heading-700-height-breakpoint-px-lg: 44px;--ds-text-heading-800-weight: 500;--ds-text-heading-800-px-breakpoint-sm: 32px;--ds-text-heading-800-px-breakpoint-md: 36px;--ds-text-heading-800-px-breakpoint-lg: 40px;--ds-text-heading-800-size-breakpoint-sm: 2rem;--ds-text-heading-800-size-breakpoint-md: 2.25rem;--ds-text-heading-800-size-breakpoint-lg: 2.5rem;--ds-text-heading-800-height-breakpoint-sm: 2.375rem;--ds-text-heading-800-height-breakpoint-px-sm: 38px;--ds-text-heading-800-height-breakpoint-md: 2.625rem;--ds-text-heading-800-height-breakpoint-px-md: 42px;--ds-text-heading-800-height-breakpoint-lg: 3rem;--ds-text-heading-800-height-breakpoint-px-lg: 48px;--ds-text-heading-default-weight: 500;--ds-text-heading-default-margin: 0;--ds-text-heading-default-spacing: -0.2px;--ds-text-heading-medium-weight: 300;--ds-text-heading-display-weight: 100;--ds-text-heading-display-px-breakpoint-sm: 44px;--ds-text-heading-display-px-breakpoint-md: 48px;--ds-text-heading-display-px-breakpoint-lg: 56px;--ds-text-heading-display-size-breakpoint-sm: 2.75rem;--ds-text-heading-display-size-breakpoint-md: 3rem;--ds-text-heading-display-size-breakpoint-lg: 3.5rem;--ds-text-heading-display-height-breakpoint-sm: 3.375rem;--ds-text-heading-display-height-breakpoint-px-sm: 54px;--ds-text-heading-display-height-breakpoint-md: 3.75rem;--ds-text-heading-display-height-breakpoint-px-md: 60px;--ds-text-heading-display-height-breakpoint-lg: 4.25rem;--ds-text-heading-display-height-breakpoint-px-lg: 68px;--ds-text-body-default-weight: 500;--ds-text-body-size-xxs: 0.625rem;--ds-text-body-size-xs: 0.75rem;--ds-text-body-size-sm: 0.875rem;--ds-text-body-size-default: 1rem;--ds-text-body-size-lg: 1.125rem;--ds-text-body-height-xs: 1rem;--ds-text-body-height-sm: 1.25rem;--ds-text-body-height-default: 1.5rem;--ds-text-body-height-lg: 1.625rem;--ds-color-alert-notification-default: #0074c8;--ds-color-alert-warning-default: #de750c;--ds-color-alert-error-default: #df0b37;--ds-color-alert-success-default: #00805d;--ds-color-alert-advisory-default: #fff0cd;--ds-color-alert-bkg-success-default: #ddf6e8;--ds-color-alert-bkg-error-default: #ffedf1;--ds-color-background-primary-100-default: #ffffff;--ds-color-background-primary-100-inverse: #0e2b4f;--ds-color-background-primary-200-default: #f7f7f7;--ds-color-background-primary-200-inverse: #194069;--ds-color-background-primary-300-default: #e4e8ec;--ds-color-background-primary-300-inverse: #265688;--ds-color-background-primary-400-default: #dddddd;--ds-color-background-primary-400-inverse: #326aa5;--ds-color-background-success-default: #eef8f5;--ds-color-background-success-inverse: #173c30;--ds-color-background-error-default: #fff4f4;--ds-color-background-error-inverse: #74110e;--ds-color-background-warning-default: #fef8e9;--ds-color-background-warning-inverse: #5d4514;--ds-color-background-info-default: #f0f7fd;--ds-color-background-info-inverse: #193d73;--ds-color-background-subtle-default: #f7f8fa;--ds-color-background-subtle-inverse: #2a2a2a;--ds-color-background-accent-default: #ebfafd;--ds-color-background-accent-inverse: #275b72;--ds-color-background-emphasis-default: #c9e0f7;--ds-color-background-emphasis-inverse: #225296;--ds-color-background-scrimmed-default: rgba(0, 0, 0, 0.5);--ds-color-background-lightest: #ffffff;--ds-color-background-lighter: #f7f7f7;--ds-color-background-darker: #01426a;--ds-color-background-darkest: #00274a;--ds-color-background-gradient-default: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.5));--ds-color-base-white: #ffffff;--ds-color-base-white-100: rgba(255, 255, 255, 0.03);--ds-color-base-white-200: rgba(255, 255, 255, 0.06);--ds-color-base-white-300: rgba(255, 255, 255, 0.12);--ds-color-base-white-400: rgba(255, 255, 255, 0.25);--ds-color-base-white-500: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-50: rgba(255, 255, 255, 0.5);--ds-color-base-white-opacity-40: rgba(255, 255, 255, 0.4);--ds-color-base-white-opacity-0: rgba(255, 255, 255, 0);--ds-color-base-black: #000000;--ds-color-base-black-100: rgba(0, 0, 0, 0.03);--ds-color-base-black-200: rgba(0, 0, 0, 0.06);--ds-color-base-black-300: rgba(0, 0, 0, 0.12);--ds-color-base-black-400: rgba(0, 0, 0, 0.25);--ds-color-base-black-500: rgba(0, 0, 0, 0.5);--ds-color-base-black-opacity-15: rgba(0, 0, 0, 0.15);--ds-color-base-blue-100: #f0f7fd;--ds-color-base-blue-200: #c9e0f7;--ds-color-base-blue-300: #a0c9f1;--ds-color-base-blue-400: #79b2ec;--ds-color-base-blue-500: #5398e6;--ds-color-base-blue-600: #3b7fd2;--ds-color-base-blue-700: #2c67b5;--ds-color-base-blue-800: #225296;--ds-color-base-blue-900: #193d73;--ds-color-base-blue-1000: #102a51;--ds-color-base-cyan-100: #ebfafd;--ds-color-base-cyan-200: #a8e9f7;--ds-color-base-cyan-300: #6ad5ef;--ds-color-base-cyan-400: #56bbde;--ds-color-base-cyan-500: #4aa2c7;--ds-color-base-cyan-600: #3e89aa;--ds-color-base-cyan-700: #32718e;--ds-color-base-cyan-800: #275b72;--ds-color-base-cyan-900: #1d4658;--ds-color-base-cyan-1000: #12303d;--ds-color-base-error-100: #fff4f4;--ds-color-base-error-200: #f9aca6;--ds-color-base-error-300: #f16359;--ds-color-base-error-400: #cc1816;--ds-color-base-error-500: #74110e;--ds-color-base-gray-100: #f7f7f7;--ds-color-base-gray-200: #d4d4d4;--ds-color-base-gray-300: #c5c5c5;--ds-color-base-gray-400: #adadad;--ds-color-base-gray-500: #959595;--ds-color-base-gray-600: #7e7e7e;--ds-color-base-gray-700: #676767;--ds-color-base-gray-800: #525252;--ds-color-base-gray-900: #3d3d3d;--ds-color-base-gray-1000: #2a2a2a;--ds-color-base-green-100: #f3faf7;--ds-color-base-green-200: #000000;--ds-color-base-green-300: #addbca;--ds-color-base-green-400: #7ec6ac;--ds-color-base-green-500: #51ae8c;--ds-color-base-green-600: #459578;--ds-color-base-green-700: #3a7d64;--ds-color-base-green-800: #306854;--ds-color-base-green-900: #285545;--ds-color-base-green-1000: #1f4436;--ds-color-base-lime-100: #f5fbeb;--ds-color-base-lime-200: #d8efb4;--ds-color-base-lime-300: #badd81;--ds-color-base-lime-400: #a2c270;--ds-color-base-lime-500: #8ca761;--ds-color-base-lime-600: #778f53;--ds-color-base-lime-700: #647845;--ds-color-base-lime-800: #53643a;--ds-color-base-lime-900: #44522f;--ds-color-base-lime-1000: #364126;--ds-color-base-navy-100: #f2f7fb;--ds-color-base-navy-200: #cfe0ef;--ds-color-base-navy-300: #acc9e2;--ds-color-base-navy-400: #89b2d4;--ds-color-base-navy-500: #6899c6;--ds-color-base-navy-600: #4a82b7;--ds-color-base-navy-700: #326aa5;--ds-color-base-navy-800: #265688;--ds-color-base-navy-900: #194069;--ds-color-base-navy-1000: #0e2b4f;--ds-color-base-neutral-100: #f7f8fa;--ds-color-base-neutral-200: #e4e8ec;--ds-color-base-neutral-300: #ccd2db;--ds-color-base-neutral-400: #afb9c6;--ds-color-base-neutral-500: #939fad;--ds-color-base-neutral-600: #7e8894;--ds-color-base-neutral-700: #6a717c;--ds-color-base-neutral-800: #585e67;--ds-color-base-neutral-900: #484d55;--ds-color-base-neutral-1000: #393d43;--ds-color-base-pink-100: #fff7f8;--ds-color-base-pink-200: #fde0e6;--ds-color-base-pink-300: #fcc2ce;--ds-color-base-pink-400: #fa9db0;--ds-color-base-pink-500: #f7738e;--ds-color-base-pink-600: #e45472;--ds-color-base-pink-700: #bf475f;--ds-color-base-pink-800: #a03b50;--ds-color-base-pink-900: #833142;--ds-color-base-pink-1000: #692734;--ds-color-base-purple-100: #fbf8fe;--ds-color-base-purple-200: #ede3fd;--ds-color-base-purple-300: #ddc9fb;--ds-color-base-purple-400: #c9a9f8;--ds-color-base-purple-500: #b588f5;--ds-color-base-purple-600: #a268f3;--ds-color-base-purple-700: #8d47f0;--ds-color-base-purple-800: #7633d7;--ds-color-base-purple-900: #622ab2;--ds-color-base-purple-1000: #4e228d;--ds-color-base-red-100: #fef7f5;--ds-color-base-red-200: #fae2da;--ds-color-base-red-300: #f5c7b8;--ds-color-base-red-400: #f0a68d;--ds-color-base-red-500: #e9815e;--ds-color-base-red-600: #e35c2f;--ds-color-base-red-700: #d03a08;--ds-color-base-red-800: #ae3007;--ds-color-base-red-900: #902806;--ds-color-base-red-1000: #732005;--ds-color-base-success-100: #eef8f5;--ds-color-base-success-200: #8eceb9;--ds-color-base-success-300: #40a080;--ds-color-base-success-400: #0b6f4d;--ds-color-base-success-500: #173c30;--ds-color-base-turquoise-100: #f7fafa;--ds-color-base-turquoise-200: #dfe9ea;--ds-color-base-turquoise-300: #c2d5d6;--ds-color-base-turquoise-400: #9fbdbe;--ds-color-base-turquoise-500: #7ba5a6;--ds-color-base-turquoise-600: #5c8f91;--ds-color-base-turquoise-700: #3d7a7d;--ds-color-base-turquoise-800: #21686a;--ds-color-base-turquoise-900: #085659;--ds-color-base-turquoise-1000: #004447;--ds-color-base-yellow-100: #fff9df;--ds-color-base-yellow-200: #ffe87e;--ds-color-base-yellow-300: #f9ce06;--ds-color-base-yellow-400: #d6b622;--ds-color-base-yellow-500: #b49d35;--ds-color-base-yellow-600: #96873e;--ds-color-base-yellow-700: #7c7140;--ds-color-base-yellow-800: #665e3d;--ds-color-base-yellow-900: #524e38;--ds-color-base-yellow-1000: #403d30;--ds-color-base-warning-100: #fef8e9;--ds-color-base-warning-200: #f2c153;--ds-color-base-warning-300: #c49432;--ds-color-base-warning-400: #8e6b22;--ds-color-base-warning-500: #5d4514;--ds-color-state-error-100: #ff999b;--ds-color-state-error-500: #df0b37;--ds-color-state-success-100: #69cf96;--ds-color-state-success-500: #00805d;--ds-color-state-warning-500: #de750c;--ds-color-border-primary-default: #585e67;--ds-color-border-primary-inverse: #afb9c6;--ds-color-border-secondary-default: #939fad;--ds-color-border-secondary-inverse: #7e8894;--ds-color-border-tertiary-default: #dddddd;--ds-color-border-tertiary-inverse: #676767;--ds-color-border-error-default: #cc1816;--ds-color-border-error-inverse: #f9aca6;--ds-color-border-divider-default: rgba(0, 0, 0, 0.12);--ds-color-border-divider-inverse: rgba(255, 255, 255, 0.25);--ds-color-border-subtle-default: #f0f7fd;--ds-color-border-subtle-inverse: #326aa5;--ds-color-border-emphasis-default: #194069;--ds-color-border-emphasis-inverse: #f2f7fb;--ds-color-border-accent-default: #badd81;--ds-color-border-accent-inverse: #a2c270;--ds-color-border-success-default: #0b6f4d;--ds-color-border-success-inverse: #8eceb9;--ds-color-border-warning-default: #c49432;--ds-color-border-warning-inverse: #f2c153;--ds-color-border-info-default: #326aa5;--ds-color-border-info-inverse: #89b2d4;--ds-color-border-ui-default-default: #2c67b5;--ds-color-border-ui-default-inverse: #56bbde;--ds-color-border-ui-hover-default: #193d73;--ds-color-border-ui-hover-inverse: #a8e9f7;--ds-color-border-ui-active-default: #225296;--ds-color-border-ui-active-inverse: #6ad5ef;--ds-color-border-ui-focus-default: #2c67b5;--ds-color-border-ui-focus-inverse: #56bbde;--ds-color-border-ui-disabled-default: #adadad;--ds-color-border-ui-disabled-inverse: #7e7e7e;--ds-color-border-active-default: #0074c8;--ds-color-border-active-inverse: #00cff0;--ds-color-border-disabled-default: #d4d4d4;--ds-color-border-focus-default: #959595;--ds-color-brand-neutral-100: #f7f8fa;--ds-color-brand-neutral-200: #e4e8ec;--ds-color-brand-neutral-300: #ccd2db;--ds-color-brand-neutral-400: #afb9c6;--ds-color-brand-neutral-500: #939fad;--ds-color-brand-neutral-600: #7e8894;--ds-color-brand-neutral-700: #6a717c;--ds-color-brand-neutral-800: #585e67;--ds-color-brand-neutral-900: #484d55;--ds-color-brand-neutral-1000: #393d43;--ds-color-brand-gray-100: #f7f7f7;--ds-color-brand-gray-200: #dddddd;--ds-color-brand-gray-300: #c5c5c5;--ds-color-brand-gray-400: #adadad;--ds-color-brand-gray-500: #959595;--ds-color-brand-gray-600: #7e7e7e;--ds-color-brand-gray-700: #676767;--ds-color-brand-gray-800: #525252;--ds-color-brand-gray-900: #3d3d3d;--ds-color-brand-gray-1000: #2a2a2a;--ds-color-brand-red-100: #fef7f5;--ds-color-brand-red-200: #fae2da;--ds-color-brand-red-300: #f5c7b8;--ds-color-brand-red-400: #f0a68d;--ds-color-brand-red-500: #e9815e;--ds-color-brand-red-600: #e35c2f;--ds-color-brand-red-700: #d03a08;--ds-color-brand-red-800: #ae3007;--ds-color-brand-red-900: #902806;--ds-color-brand-red-1000: #732005;--ds-color-brand-yellow-100: #fff9df;--ds-color-brand-yellow-200: #ffe87e;--ds-color-brand-yellow-300: #f9ce06;--ds-color-brand-yellow-400: #d6b622;--ds-color-brand-yellow-500: #b49d35;--ds-color-brand-yellow-600: #96873e;--ds-color-brand-yellow-700: #7c7140;--ds-color-brand-yellow-800: #665e3d;--ds-color-brand-yellow-900: #524e38;--ds-color-brand-yellow-1000: #403d30;--ds-color-brand-lime-100: #f5fbeb;--ds-color-brand-lime-200: #d8efb4;--ds-color-brand-lime-300: #badd81;--ds-color-brand-lime-400: #a2c270;--ds-color-brand-lime-500: #8ca761;--ds-color-brand-lime-600: #778f53;--ds-color-brand-lime-700: #647845;--ds-color-brand-lime-800: #53643a;--ds-color-brand-lime-900: #44522f;--ds-color-brand-lime-1000: #364126;--ds-color-brand-green-100: #f3faf7;--ds-color-brand-green-200: #d4ece4;--ds-color-brand-green-300: #addbca;--ds-color-brand-green-400: #7ec6ac;--ds-color-brand-green-500: #51ae8c;--ds-color-brand-green-600: #459578;--ds-color-brand-green-700: #3a7d64;--ds-color-brand-green-800: #306854;--ds-color-brand-green-900: #285545;--ds-color-brand-green-1000: #1f4436;--ds-color-brand-turquoise-100: #f7fafa;--ds-color-brand-turquoise-200: #dfe9ea;--ds-color-brand-turquoise-300: #c2d5d6;--ds-color-brand-turquoise-400: #9fbdbe;--ds-color-brand-turquoise-500: #7ba5a6;--ds-color-brand-turquoise-600: #5c8f91;--ds-color-brand-turquoise-700: #3d7a7d;--ds-color-brand-turquoise-800: #21686a;--ds-color-brand-turquoise-900: #085659;--ds-color-brand-turquoise-1000: #004447;--ds-color-brand-cyan-100: #ebfafd;--ds-color-brand-cyan-200: #a8e9f7;--ds-color-brand-cyan-300: #6ad5ef;--ds-color-brand-cyan-400: #56bbde;--ds-color-brand-cyan-500: #4aa2c7;--ds-color-brand-cyan-600: #3e89aa;--ds-color-brand-cyan-700: #32718e;--ds-color-brand-cyan-800: #275b72;--ds-color-brand-cyan-900: #1d4658;--ds-color-brand-cyan-1000: #12303d;--ds-color-brand-blue-100: #f0f7fd;--ds-color-brand-blue-200: #c9e0f7;--ds-color-brand-blue-300: #a0c9f1;--ds-color-brand-blue-400: #79b2ec;--ds-color-brand-blue-500: #5398e6;--ds-color-brand-blue-600: #3b7fd2;--ds-color-brand-blue-700: #2c67b5;--ds-color-brand-blue-800: #225296;--ds-color-brand-blue-900: #193d73;--ds-color-brand-blue-1000: #102a51;--ds-color-brand-navy-100: #f2f7fb;--ds-color-brand-navy-200: #cfe0ef;--ds-color-brand-navy-300: #acc9e2;--ds-color-brand-navy-400: #89b2d4;--ds-color-brand-navy-500: #6899c6;--ds-color-brand-navy-600: #4a82b7;--ds-color-brand-navy-700: #326aa5;--ds-color-brand-navy-800: #265688;--ds-color-brand-navy-900: #194069;--ds-color-brand-navy-1000: #0e2b4f;--ds-color-brand-purple-100: #fbf8fe;--ds-color-brand-purple-200: #ede3fd;--ds-color-brand-purple-300: #ddc9fb;--ds-color-brand-purple-400: #c9a9f8;--ds-color-brand-purple-500: #b588f5;--ds-color-brand-purple-600: #a268f3;--ds-color-brand-purple-700: #8d47f0;--ds-color-brand-purple-800: #7633d7;--ds-color-brand-purple-900: #622ab2;--ds-color-brand-purple-1000: #4e228d;--ds-color-brand-pink-100: #fff7f8;--ds-color-brand-pink-200: #fde0e6;--ds-color-brand-pink-300: #fcc2ce;--ds-color-brand-pink-400: #fa9db0;--ds-color-brand-pink-500: #f7738e;--ds-color-brand-pink-600: #e45472;--ds-color-brand-pink-700: #bf475f;--ds-color-brand-pink-800: #a03b50;--ds-color-brand-pink-900: #833142;--ds-color-brand-pink-1000: #692734;--ds-color-brand-midnight-100: #c1daf0;--ds-color-brand-midnight-200: #569ed7;--ds-color-brand-midnight-300: #156fad;--ds-color-brand-midnight-400: #01426a;--ds-color-brand-midnight-500: #00274a;--ds-color-brand-atlas-100: #cde6ff;--ds-color-brand-atlas-200: #6bb7fb;--ds-color-brand-atlas-300: #2492eb;--ds-color-brand-atlas-400: #0074c8;--ds-color-brand-atlas-500: #054687;--ds-color-brand-atlas-400-opacity-20: rgba(0, 116, 200, 0.2);--ds-color-brand-breeze-100: #c0f7ff;--ds-color-brand-breeze-200: #5de3f7;--ds-color-brand-breeze-300: #00cff0;--ds-color-brand-breeze-400: #099dc5;--ds-color-brand-breeze-500: #0b5575;--ds-color-brand-breeze-300-opacity-30: rgba(0, 207, 240, 0.3);--ds-color-brand-tropical-100: #e2ffcd;--ds-color-brand-tropical-200: #d0fba6;--ds-color-brand-tropical-300: #c0e585;--ds-color-brand-tropical-400: #91be62;--ds-color-brand-tropical-500: #5e8741;--ds-color-brand-alpine-100: #bcaae6;--ds-color-brand-alpine-200: #9e73ea;--ds-color-brand-alpine-300: #8439ef;--ds-color-brand-alpine-400: #631db8;--ds-color-brand-alpine-500: #39115c;--ds-color-brand-flamingo-100: #ffebee;--ds-color-brand-flamingo-200: #ffc0ca;--ds-color-brand-flamingo-300: #ff94a7;--ds-color-brand-flamingo-400: #f65b7b;--ds-color-brand-flamingo-500: #b82b47;--ds-color-brand-canyon-100: #ffcab6;--ds-color-brand-canyon-200: #f99574;--ds-color-brand-canyon-300: #f26135;--ds-color-brand-canyon-400: #de3e09;--ds-color-brand-canyon-500: #b83302;--ds-color-brand-goldcoast-100: #fff0cd;--ds-color-brand-goldcoast-200: #ffdb67;--ds-color-brand-goldcoast-300: #ffd200;--ds-color-brand-goldcoast-400: #e5ad07;--ds-color-brand-goldcoast-500: #b88624;--ds-color-brand-goldgray-100: #c5c1bf;--ds-color-brand-goldgray-200: #726e6c;--ds-color-brand-gold-100: #ccbc94;--ds-color-brand-gold-200: #7f682e;--ds-color-brand-emerald: #139142;--ds-color-brand-sapphire: #015daa;--ds-color-brand-ruby: #a41d4a;--ds-color-brand-lounge: #01426a;--ds-color-brand-loungeplus: #53b390;--ds-color-container-accent-default: #f5fbeb;--ds-color-container-accent-inverse: #badd81;--ds-color-container-emphasis-default: #ebfafd;--ds-color-container-emphasis-inverse: #6ad5ef;--ds-color-container-error-default: #fff4f4;--ds-color-container-error-inverse: #74110e;--ds-color-container-info-default: #f0f7fd;--ds-color-container-info-inverse: #193d73;--ds-color-container-primary-default: #ffffff;--ds-color-container-primary-inverse: #0e2b4f;--ds-color-container-secondary-default: #f7f7f7;--ds-color-container-secondary-inverse: #194069;--ds-color-container-subtle-default: #f7f8fa;--ds-color-container-subtle-inverse: #393d43;--ds-color-container-success-default: #eef8f5;--ds-color-container-success-inverse: #173c30;--ds-color-container-tertiary-default: rgba(0, 0, 0, 0.03);--ds-color-container-tertiary-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-warning-default: #fef8e9;--ds-color-container-warning-inverse: #5d4514;--ds-color-container-ui-primary-active-default: #225296;--ds-color-container-ui-primary-active-inverse: #6ad5ef;--ds-color-container-ui-primary-default-default: #2c67b5;--ds-color-container-ui-primary-default-inverse: #56bbde;--ds-color-container-ui-primary-disabled-default: #a0c9f1;--ds-color-container-ui-primary-disabled-inverse: #275b72;--ds-color-container-ui-primary-focus-default: #2c67b5;--ds-color-container-ui-primary-focus-inverse: #56bbde;--ds-color-container-ui-primary-hover-default: #193d73;--ds-color-container-ui-primary-hover-inverse: #a8e9f7;--ds-color-container-ui-secondary-active-default: #f0f7fd;--ds-color-container-ui-secondary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-secondary-default-default: #ffffff;--ds-color-container-ui-secondary-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-disabled-default: #f7f7f7;--ds-color-container-ui-secondary-disabled-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-secondary-focus-default: #ffffff;--ds-color-container-ui-secondary-focus-inverse: rgba(255, 255, 255, 0.03);--ds-color-container-ui-secondary-hover-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-secondary-hover-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-active-default: rgba(0, 0, 0, 0.06);--ds-color-container-ui-tertiary-active-inverse: rgba(255, 255, 255, 0.06);--ds-color-container-ui-tertiary-default-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-default-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-disabled-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-disabled-inverse: rgba(255, 255, 255, 0.25);--ds-color-container-ui-tertiary-focus-default: rgba(0, 0, 0, 0.03);--ds-color-container-ui-tertiary-focus-inverse: rgba(255, 255, 255, 0.12);--ds-color-container-ui-tertiary-hover-default: rgba(0, 0, 0, 0.12);--ds-color-container-ui-tertiary-hover-inverse: rgba(255, 255, 255, 0.25);--ds-color-icon-primary-default: #676767;--ds-color-icon-primary-inverse: #f7f7f7;--ds-color-icon-secondary-default: #7e8894;--ds-color-icon-secondary-inverse: #ccd2db;--ds-color-icon-tertiary-default: #afb9c6;--ds-color-icon-tertiary-inverse: #939fad;--ds-color-icon-emphasis-default: #2a2a2a;--ds-color-icon-emphasis-inverse: #ffffff;--ds-color-icon-accent-default: #a2c270;--ds-color-icon-accent-inverse: #badd81;--ds-color-icon-info-default: #326aa5;--ds-color-icon-info-inverse: #89b2d4;--ds-color-icon-error-default: #cc1816;--ds-color-icon-error-inverse: #f9aca6;--ds-color-icon-warning-default: #c49432;--ds-color-icon-warning-inverse: #f2c153;--ds-color-icon-success-default: #40a080;--ds-color-icon-success-inverse: #8eceb9;--ds-color-icon-subtle-default: #a0c9f1;--ds-color-icon-subtle-inverse: #326aa5;--ds-color-icon-ui-primary-default-default: #2c67b5;--ds-color-icon-ui-primary-default-inverse: #56bbde;--ds-color-icon-ui-primary-hover-default: #193d73;--ds-color-icon-ui-primary-hover-inverse: #a8e9f7;--ds-color-icon-ui-primary-active-default: #225296;--ds-color-icon-ui-primary-active-inverse: #6ad5ef;--ds-color-icon-ui-primary-disabled-default: #adadad;--ds-color-icon-ui-primary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-primary-focus-default: #2c67b5;--ds-color-icon-ui-primary-focus-inverse: #56bbde;--ds-color-icon-ui-secondary-active-default: #676767;--ds-color-icon-ui-secondary-active-inverse: #c5c5c5;--ds-color-icon-ui-secondary-default-default: #7e7e7e;--ds-color-icon-ui-secondary-default-inverse: #adadad;--ds-color-icon-ui-secondary-disabled-default: #adadad;--ds-color-icon-ui-secondary-disabled-inverse: #7e7e7e;--ds-color-icon-ui-secondary-focus-default: #7e7e7e;--ds-color-icon-ui-secondary-focus-inverse: #adadad;--ds-color-icon-ui-secondary-hover-default: #525252;--ds-color-icon-ui-secondary-hover-inverse: #dddddd;--ds-color-icon-brand-red-default: #d03a08;--ds-color-icon-brand-red-inverse: #e9815e;--ds-color-icon-brand-yellow-default: #7c7140;--ds-color-icon-brand-yellow-inverse: #f9ce06;--ds-color-icon-brand-pink-default: #bf475f;--ds-color-icon-brand-pink-inverse: #f7738e;--ds-color-icon-brand-purple-default: #8d47f0;--ds-color-icon-brand-purple-inverse: #b588f5;--ds-color-icon-brand-lime-default: #647845;--ds-color-icon-brand-lime-inverse: #badd81;--ds-color-icon-brand-green-default: #3a7d64;--ds-color-icon-brand-green-inverse: #51ae8c;--ds-color-icon-brand-turquoise-default: #3d7a7d;--ds-color-icon-brand-turquoise-inverse: #7ba5a6;--ds-color-icon-brand-navy-default: #265688;--ds-color-icon-brand-navy-inverse: #6899c6;--ds-color-icon-brand-blue-default: #2c67b5;--ds-color-icon-brand-blue-inverse: #5398e6;--ds-color-icon-brand-cyan-default: #32718e;--ds-color-icon-brand-cyan-inverse: #6ad5ef;--ds-color-icon-brand-gray-default: #676767;--ds-color-icon-brand-gray-inverse: #c5c5c5;--ds-color-icon-brand-neutral-default: #6a717c;--ds-color-icon-brand-neutral-inverse: #afb9c6;--ds-color-icon-disabled-default: rgba(0, 0, 0, 0.15);--ds-color-text-primary-default: #2a2a2a;--ds-color-text-primary-inverse: #ffffff;--ds-color-text-secondary-default: #525252;--ds-color-text-secondary-inverse: #dddddd;--ds-color-text-tertiary-default: #6a717c;--ds-color-text-tertiary-inverse: #adadad;--ds-color-text-error-default: #cc1816;--ds-color-text-error-inverse: #f9aca6;--ds-color-text-emphasis-default: #265688;--ds-color-text-emphasis-inverse: #cfe0ef;--ds-color-text-accent-default: #647845;--ds-color-text-accent-inverse: #badd81;--ds-color-text-info-default: #326aa5;--ds-color-text-info-inverse: #acc9e2;--ds-color-text-subtle-default: #32718e;--ds-color-text-subtle-inverse: #56bbde;--ds-color-text-success-default: #0b6f4d;--ds-color-text-success-inverse: #8eceb9;--ds-color-text-ui-active-default: #225296;--ds-color-text-ui-active-inverse: #6ad5ef;--ds-color-text-ui-default-default: #2c67b5;--ds-color-text-ui-default-inverse: #56bbde;--ds-color-text-ui-disabled-default: #adadad;--ds-color-text-ui-disabled-inverse: #7e7e7e;--ds-color-text-ui-focus-default: #2c67b5;--ds-color-text-ui-focus-inverse: #56bbde;--ds-color-text-ui-hover-default: #193d73;--ds-color-text-ui-hover-inverse: #a8e9f7;--ds-color-text-link-default: #0074c8;--ds-color-text-link-inverse: #00cff0;--ds-color-tier-alaska-mvp-default: #726e6c;--ds-color-tier-alaska-mvp-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold-default: #7f682e;--ds-color-tier-alaska-mvpgold-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold75k-default: #7f682e;--ds-color-tier-alaska-mvpgold75k-inverse: #c5c1bf;--ds-color-tier-alaska-mvpgold100k-default: #7f682e;--ds-color-tier-alaska-mvpgold100k-inverse: #c5c1bf;--ds-color-tier-alaska-lounge: #01426a;--ds-color-tier-alaska-loungeplus: #53b390;--ds-color-tier-fare-business-default: #005154;--ds-color-tier-fare-business-inverse: #9fbdbe;--ds-color-tier-fare-economy-default: #2c67b5;--ds-color-tier-fare-economy-inverse: #a0c9f1;--ds-color-tier-fare-first-class-default: #002c4e;--ds-color-tier-fare-first-class-inverse: #89b2d4;--ds-color-tier-fare-saver-default: #4aa2c7;--ds-color-tier-fare-saver-inverse: #a8e9f7;--ds-color-tier-oneworld-emerald: #139142;--ds-color-tier-oneworld-sapphire: #015daa;--ds-color-tier-oneworld-ruby: #a41d4a;--ds-color-ui-default-default: #0074c8;--ds-color-ui-default-inverse: #00cff0;--ds-color-ui-hover-default: #054687;--ds-color-ui-hover-inverse: #5de3f7;--ds-color-ui-active-default: #054687;--ds-color-ui-active-inverse: #5de3f7;--ds-color-ui-disabled-default: rgba(0, 116, 200, 0.2);--ds-color-ui-bkg-default-default: rgba(0, 0, 0, 0.03);--ds-color-ui-bkg-default-inverse: rgba(255, 255, 255, 0.03);--ds-color-ui-bkg-hover-default: rgba(0, 0, 0, 0.06);--ds-color-ui-bkg-hover-inverse: rgba(255, 255, 255, 0.06);--ds-color-utility-blue-default: #79b2ec;--ds-color-utility-blue-inverse: #c9e0f7;--ds-color-utility-cyan-default: #6ad5ef;--ds-color-utility-cyan-inverse: #a8e9f7;--ds-color-utility-green-default: #7ec6ac;--ds-color-utility-green-inverse: #addbca;--ds-color-utility-gray-default: #adadad;--ds-color-utility-gray-inverse: #dddddd;--ds-color-utility-lime-default: #badd81;--ds-color-utility-lime-inverse: #d8efb4;--ds-color-utility-navy-default: #265688;--ds-color-utility-navy-inverse: #acc9e2;--ds-color-utility-neutral-default: #7e8894;--ds-color-utility-neutral-inverse: #ccd2db;--ds-color-utility-pink-default: #f7738e;--ds-color-utility-pink-inverse: #fcc2ce;--ds-color-utility-purple-default: #8d47f0;--ds-color-utility-purple-inverse: #ddc9fb;--ds-color-utility-red-default: #e35c2f;--ds-color-utility-red-inverse: #f0a68d;--ds-color-utility-turquoise-default: #5c8f91;--ds-color-utility-turquoise-inverse: #9fbdbe;--ds-color-utility-yellow-default: #f9ce06;--ds-color-utility-yellow-inverse: #ffe87e;--ds-color-utility-error-default: #cc1816;--ds-color-utility-error-inverse: #f9aca6;--ds-color-utility-warning-default: #f2c153;--ds-color-utility-warning-inverse: #f2c153;--ds-color-utility-success-default: #0b6f4d;--ds-color-utility-success-inverse: #8eceb9}*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder]{color:var(--ds-color-text-secondary-default, #525252)}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
|
|
7864
7906
|
|
|
7865
7907
|
var colorCss$2 = i$c`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color) !important}`;
|
|
7866
7908
|
|
|
7867
7909
|
var tokensCss$1 = i$c`:host{--ds-auro-menu-divider-color: var(--ds-color-border-divider-default, $ds-color-border-divider-default);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-color-text-primary-default, $ds-color-text-primary-default)}`;
|
|
7868
7910
|
|
|
7869
|
-
|
|
7911
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7912
|
+
// See LICENSE in the project root for license information.
|
|
7870
7913
|
|
|
7871
|
-
var colorCss$1 = i$c`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
|
|
7872
7914
|
|
|
7915
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
7873
7916
|
/**
|
|
7874
|
-
*
|
|
7875
|
-
*
|
|
7876
|
-
*
|
|
7917
|
+
* The auro-menu element provides users a way to select from a list of options.
|
|
7918
|
+
* @attr {Object} optionSelected - Specifies the current selected menuOption.
|
|
7919
|
+
* @attr {String} matchWord - Specifies a string used to highlight matched string parts in options.
|
|
7920
|
+
* @attr {Boolean} disabled - When true, the entire menu and all options are disabled;
|
|
7921
|
+
* @attr {Boolean} noCheckmark - When true, selected option will not show the checkmark.
|
|
7922
|
+
* @attr {Boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7923
|
+
* @attr {String} value - Value selected for the menu.
|
|
7924
|
+
* @prop {Boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7925
|
+
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
7926
|
+
* @event selectedOption - (DEPRECATED) Notifies that a new menuoption selection has been made.
|
|
7927
|
+
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7928
|
+
* @event auroMenuActivatedOption - (DEPRECATED) Notifies that a menuoption has been made `active`.
|
|
7929
|
+
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
7930
|
+
* @event auroMenuSelectValueFailure - (DEPRECATED) Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
7931
|
+
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
7932
|
+
* @event auroMenuCustomEventFired - (DEPRECATED) Notifies that a custom event has been fired.
|
|
7933
|
+
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
7934
|
+
* @event auroMenu-loadingChange - Notifies when the loading attribute is changed.
|
|
7935
|
+
* @slot loadingText - Text to show while loading attribute is set
|
|
7936
|
+
* @slot loadingIcon - Icon to show while loading attribute is set
|
|
7937
|
+
* @slot - Slot for insertion of menu options.
|
|
7877
7938
|
*/
|
|
7878
|
-
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
7879
7939
|
|
|
7880
|
-
|
|
7881
|
-
* @license
|
|
7882
|
-
* Copyright 2018 Google LLC
|
|
7883
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
7884
|
-
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$2}});
|
|
7940
|
+
/* eslint-disable no-magic-numbers, max-lines */
|
|
7885
7941
|
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7942
|
+
class AuroMenu extends r$6 {
|
|
7943
|
+
constructor() {
|
|
7944
|
+
super();
|
|
7945
|
+
this.value = undefined;
|
|
7946
|
+
this.optionSelected = undefined;
|
|
7947
|
+
this.matchWord = undefined;
|
|
7948
|
+
this.noCheckmark = false;
|
|
7949
|
+
this.optionActive = undefined;
|
|
7950
|
+
this.loading = false;
|
|
7891
7951
|
|
|
7892
|
-
|
|
7893
|
-
|
|
7952
|
+
/**
|
|
7953
|
+
* @private
|
|
7954
|
+
*/
|
|
7955
|
+
this.rootMenu = true;
|
|
7894
7956
|
|
|
7957
|
+
/**
|
|
7958
|
+
* @private
|
|
7959
|
+
*/
|
|
7960
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7895
7961
|
|
|
7896
|
-
/**
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
*/
|
|
7962
|
+
/**
|
|
7963
|
+
* @private
|
|
7964
|
+
*/
|
|
7965
|
+
this.nestingSpacer = '<span class="nestingSpacer"></span>';
|
|
7901
7966
|
|
|
7902
|
-
|
|
7967
|
+
/**
|
|
7968
|
+
* @private
|
|
7969
|
+
*/
|
|
7970
|
+
this.loadingSlots = null;
|
|
7971
|
+
}
|
|
7903
7972
|
|
|
7904
|
-
// function to define props used within the scope of this component
|
|
7905
7973
|
static get properties() {
|
|
7906
7974
|
return {
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7975
|
+
noCheckmark: {
|
|
7976
|
+
type: Boolean,
|
|
7977
|
+
reflect: true
|
|
7978
|
+
},
|
|
7979
|
+
disabled: {
|
|
7980
|
+
type: Boolean,
|
|
7981
|
+
reflect: true
|
|
7982
|
+
},
|
|
7983
|
+
loading: {
|
|
7984
|
+
type: Boolean,
|
|
7985
|
+
reflect: true
|
|
7986
|
+
},
|
|
7987
|
+
optionSelected: { type: Object },
|
|
7988
|
+
optionActive: { type: Object },
|
|
7989
|
+
matchWord: { type: String },
|
|
7990
|
+
value: { type: String }
|
|
7913
7991
|
};
|
|
7914
7992
|
}
|
|
7915
7993
|
|
|
7994
|
+
static get styles() {
|
|
7995
|
+
return [
|
|
7996
|
+
styleCss$2,
|
|
7997
|
+
colorCss$2,
|
|
7998
|
+
tokensCss$1
|
|
7999
|
+
];
|
|
8000
|
+
}
|
|
8001
|
+
|
|
7916
8002
|
/**
|
|
7917
|
-
*
|
|
8003
|
+
* This will register this element with the browser.
|
|
8004
|
+
* @param {string} [name="auro-menu"] - The name of element that you want to register to.
|
|
8005
|
+
*
|
|
8006
|
+
* @example
|
|
8007
|
+
* AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
|
|
8008
|
+
*
|
|
7918
8009
|
*/
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
return 'true'
|
|
7922
|
-
}
|
|
7923
|
-
|
|
7924
|
-
return 'false'
|
|
8010
|
+
static register(name = "auro-menu") {
|
|
8011
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroMenu);
|
|
7925
8012
|
}
|
|
7926
|
-
}
|
|
7927
8013
|
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
8014
|
+
/**
|
|
8015
|
+
* Passes the noCheckmark attribute to all nested auro-menuoptions.
|
|
8016
|
+
* @private
|
|
8017
|
+
* @returns {void}
|
|
8018
|
+
*/
|
|
8019
|
+
handleNoCheckmarkAttr() {
|
|
8020
|
+
if (this.noCheckmark) {
|
|
8021
|
+
const menus = this.querySelectorAll('auro-menu, [auro-menu]');
|
|
7931
8022
|
|
|
7932
|
-
|
|
8023
|
+
menus.forEach((menu) => {
|
|
8024
|
+
menu.setAttribute('noCheckmark', '');
|
|
8025
|
+
});
|
|
7933
8026
|
|
|
7934
|
-
|
|
7935
|
-
* A callback to parse Response body.
|
|
7936
|
-
*
|
|
7937
|
-
* @callback ResponseParser
|
|
7938
|
-
* @param {Fetch.Response} response
|
|
7939
|
-
* @returns {Promise}
|
|
7940
|
-
*/
|
|
8027
|
+
const options = this.querySelectorAll('auro-menuoption, [auro-menuoption]');
|
|
7941
8028
|
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
* @param {Object} [options={}]
|
|
7947
|
-
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
7948
|
-
* @returns {Promise}
|
|
7949
|
-
*/
|
|
7950
|
-
const cacheFetch = (uri, options = {}) => {
|
|
7951
|
-
const responseParser = options.responseParser || ((response) => response.text());
|
|
7952
|
-
if (!_fetchMap.has(uri)) {
|
|
7953
|
-
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
8029
|
+
options.forEach((option) => {
|
|
8030
|
+
option.setAttribute('noCheckmark', '');
|
|
8031
|
+
});
|
|
8032
|
+
}
|
|
7954
8033
|
}
|
|
7955
|
-
return _fetchMap.get(uri);
|
|
7956
|
-
};
|
|
7957
8034
|
|
|
7958
|
-
|
|
8035
|
+
firstUpdated() {
|
|
8036
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
8037
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-menu');
|
|
7959
8038
|
|
|
7960
|
-
|
|
7961
|
-
// See LICENSE in the project root for license information.
|
|
8039
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
7962
8040
|
|
|
8041
|
+
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
8042
|
+
}
|
|
7963
8043
|
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
*/
|
|
8044
|
+
updated(changedProperties) {
|
|
8045
|
+
if (changedProperties.has('matchWord')) {
|
|
8046
|
+
this.markOptions();
|
|
8047
|
+
}
|
|
7969
8048
|
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
super();
|
|
7974
|
-
this.onDark = false;
|
|
7975
|
-
}
|
|
8049
|
+
if (changedProperties.has('value')) {
|
|
8050
|
+
this.selectByValue(this.value);
|
|
8051
|
+
}
|
|
7976
8052
|
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
return {
|
|
7980
|
-
...super.properties,
|
|
7981
|
-
onDark: {
|
|
7982
|
-
type: Boolean,
|
|
7983
|
-
reflect: true
|
|
7984
|
-
},
|
|
8053
|
+
if (changedProperties.has('disabled')) {
|
|
8054
|
+
const options = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
|
|
7985
8055
|
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
*/
|
|
7989
|
-
svg: {
|
|
7990
|
-
attribute: false,
|
|
7991
|
-
reflect: true
|
|
8056
|
+
for (const element of options) {
|
|
8057
|
+
element.disabled = this.disabled;
|
|
7992
8058
|
}
|
|
7993
|
-
}
|
|
7994
|
-
}
|
|
8059
|
+
}
|
|
7995
8060
|
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8061
|
+
if (changedProperties.has('loading')) {
|
|
8062
|
+
const event = new CustomEvent("auroMenu-loadingChange", {
|
|
8063
|
+
detail: {
|
|
8064
|
+
loading: this.loading,
|
|
8065
|
+
hasLoadingPlaceholder:
|
|
8066
|
+
this.hasLoadingPlaceholder
|
|
8067
|
+
}
|
|
8068
|
+
});
|
|
8069
|
+
this.setAttribute("aria-busy", this.hasAttribute("loading"));
|
|
8070
|
+
this.dispatchEvent(event);
|
|
8071
|
+
}
|
|
8000
8072
|
}
|
|
8001
8073
|
|
|
8002
8074
|
/**
|
|
8003
|
-
* Async function to fetch requested icon from npm CDN.
|
|
8004
8075
|
* @private
|
|
8005
|
-
* @param {
|
|
8006
|
-
* @
|
|
8007
|
-
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
8076
|
+
* @param {Object} option - The menuoption to check for interactive state.
|
|
8077
|
+
* @returns {Boolean} Returns true if the option is interactive.
|
|
8008
8078
|
*/
|
|
8009
|
-
|
|
8010
|
-
|
|
8079
|
+
optionInteractive(option) {
|
|
8080
|
+
return !option.hasAttribute('hidden') && !option.hasAttribute('disabled') && !option.hasAttribute('static');
|
|
8081
|
+
}
|
|
8011
8082
|
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
8083
|
+
/**
|
|
8084
|
+
* @private
|
|
8085
|
+
* @returns {void} When called will update the DOM with visible suggest text matches.
|
|
8086
|
+
*/
|
|
8087
|
+
markOptions() {
|
|
8088
|
+
if (this.items && this.items.length > 0 && (this.matchWord && this.matchWord.length > 0)) {
|
|
8019
8089
|
|
|
8020
|
-
|
|
8021
|
-
|
|
8090
|
+
// Escape special regex characters
|
|
8091
|
+
const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
|
|
8022
8092
|
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
if (!this.customSvg) {
|
|
8026
|
-
const svg = await this.fetchIcon(this.category, this.name);
|
|
8093
|
+
// Global, case-insensitive, unicode matching regex pattern
|
|
8094
|
+
const regexWord = new RegExp(escapedWord, 'giu');
|
|
8027
8095
|
|
|
8028
|
-
|
|
8029
|
-
this.
|
|
8030
|
-
|
|
8031
|
-
|
|
8096
|
+
this.items.forEach((item) => {
|
|
8097
|
+
if (this.optionInteractive(item) && !item.hasAttribute('persistent')) {
|
|
8098
|
+
const nested = item.querySelectorAll('.nestingSpacer');
|
|
8099
|
+
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
8032
8100
|
|
|
8033
|
-
|
|
8034
|
-
|
|
8101
|
+
item.innerHTML = nestingSpacerBundle + item.textContent.replace(regexWord, (match) => `<strong>${match}</strong>`);
|
|
8102
|
+
}
|
|
8103
|
+
});
|
|
8035
8104
|
}
|
|
8036
8105
|
}
|
|
8037
|
-
}
|
|
8038
|
-
|
|
8039
|
-
var tokensCss = i$c`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
|
|
8040
|
-
|
|
8041
|
-
var colorCss = i$c`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
8042
|
-
|
|
8043
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8044
|
-
// See LICENSE in the project root for license information.
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
8048
|
-
/**
|
|
8049
|
-
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
8050
|
-
*
|
|
8051
|
-
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
8052
|
-
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
8053
|
-
* @attr {Boolean} customColor - Removes primary selector.
|
|
8054
|
-
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
8055
|
-
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
8056
|
-
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
8057
|
-
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
8058
|
-
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
8059
|
-
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
8060
|
-
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
8061
|
-
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
8062
|
-
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
8063
|
-
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
8064
|
-
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
8065
|
-
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
8066
|
-
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
8067
|
-
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
8068
|
-
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
8069
|
-
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
8070
|
-
* @slot svg - Used for custom SVG content.
|
|
8071
|
-
*/
|
|
8072
|
-
|
|
8073
|
-
// build the component class
|
|
8074
|
-
class AuroIcon extends BaseIcon {
|
|
8075
|
-
constructor() {
|
|
8076
|
-
super();
|
|
8077
|
-
|
|
8078
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
8079
8106
|
|
|
8080
|
-
|
|
8107
|
+
/**
|
|
8108
|
+
* Reset the menu and all options.
|
|
8109
|
+
*/
|
|
8110
|
+
resetOptionsStates() {
|
|
8111
|
+
this.optionSelected = undefined;
|
|
8112
|
+
if (this.items) {
|
|
8113
|
+
this.items.forEach((item) => {
|
|
8114
|
+
item.classList.remove('active');
|
|
8115
|
+
item.removeAttribute('selected');
|
|
8116
|
+
});
|
|
8117
|
+
}
|
|
8081
8118
|
}
|
|
8082
8119
|
|
|
8083
8120
|
/**
|
|
8084
|
-
*
|
|
8121
|
+
* Set the attributes on the selected menuoption, the menu value and stored option.
|
|
8122
|
+
* @param {Object} option - The menuoption to be selected.
|
|
8085
8123
|
* @private
|
|
8086
|
-
* @returns {void}
|
|
8087
8124
|
*/
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
this.disabled = false;
|
|
8093
|
-
this.emphasis = false;
|
|
8094
|
-
this.error = false;
|
|
8095
|
-
this.info = false;
|
|
8096
|
-
this.label = false;
|
|
8097
|
-
this.primary = false;
|
|
8098
|
-
this.secondary = false;
|
|
8099
|
-
this.subtle = false;
|
|
8100
|
-
this.success = false;
|
|
8101
|
-
this.tertiary = false;
|
|
8102
|
-
this.warning = false;
|
|
8103
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
8104
|
-
}
|
|
8105
|
-
|
|
8106
|
-
// function to define props used within the scope of this component
|
|
8107
|
-
static get properties() {
|
|
8108
|
-
return {
|
|
8109
|
-
...super.properties,
|
|
8110
|
-
accent: {
|
|
8111
|
-
type: Boolean,
|
|
8112
|
-
reflect: true
|
|
8113
|
-
},
|
|
8114
|
-
ariaHidden: {
|
|
8115
|
-
type: String,
|
|
8116
|
-
reflect: true
|
|
8117
|
-
},
|
|
8118
|
-
category: {
|
|
8119
|
-
type: String,
|
|
8120
|
-
reflect: true
|
|
8121
|
-
},
|
|
8122
|
-
customColor: {
|
|
8123
|
-
type: Boolean
|
|
8124
|
-
},
|
|
8125
|
-
customSvg: {
|
|
8126
|
-
type: Boolean
|
|
8127
|
-
},
|
|
8128
|
-
disabled: {
|
|
8129
|
-
type: Boolean,
|
|
8130
|
-
reflect: true
|
|
8131
|
-
},
|
|
8132
|
-
emphasis: {
|
|
8133
|
-
type: Boolean,
|
|
8134
|
-
reflect: true
|
|
8135
|
-
},
|
|
8136
|
-
error: {
|
|
8137
|
-
type: Boolean,
|
|
8138
|
-
reflect: true
|
|
8139
|
-
},
|
|
8140
|
-
info: {
|
|
8141
|
-
type: Boolean,
|
|
8142
|
-
reflect: true
|
|
8143
|
-
},
|
|
8144
|
-
label: {
|
|
8145
|
-
type: Boolean,
|
|
8146
|
-
reflect: true
|
|
8147
|
-
},
|
|
8148
|
-
name: {
|
|
8149
|
-
type: String,
|
|
8150
|
-
reflect: true
|
|
8151
|
-
},
|
|
8152
|
-
primary: {
|
|
8153
|
-
type: Boolean,
|
|
8154
|
-
reflect: true
|
|
8155
|
-
},
|
|
8156
|
-
secondary: {
|
|
8157
|
-
type: Boolean,
|
|
8158
|
-
reflect: true
|
|
8159
|
-
},
|
|
8160
|
-
subtle: {
|
|
8161
|
-
type: Boolean,
|
|
8162
|
-
reflect: true
|
|
8163
|
-
},
|
|
8164
|
-
success: {
|
|
8165
|
-
type: Boolean,
|
|
8166
|
-
reflect: true
|
|
8167
|
-
},
|
|
8168
|
-
tertiary: {
|
|
8169
|
-
type: Boolean,
|
|
8170
|
-
reflect: true
|
|
8171
|
-
},
|
|
8172
|
-
uri: {
|
|
8173
|
-
type: String
|
|
8174
|
-
},
|
|
8175
|
-
warning: {
|
|
8176
|
-
type: Boolean,
|
|
8177
|
-
reflect: true
|
|
8178
|
-
}
|
|
8179
|
-
};
|
|
8180
|
-
}
|
|
8125
|
+
handleLocalSelectState(option) {
|
|
8126
|
+
option.setAttribute('selected', '');
|
|
8127
|
+
option.classList.add('active');
|
|
8128
|
+
option.ariaSelected = true;
|
|
8181
8129
|
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
i$c`${tokensCss}`,
|
|
8186
|
-
i$c`${styleCss}`,
|
|
8187
|
-
i$c`${colorCss}`
|
|
8188
|
-
];
|
|
8130
|
+
this.value = option.value;
|
|
8131
|
+
this.optionSelected = option;
|
|
8132
|
+
this.index = this.items.indexOf(option);
|
|
8189
8133
|
}
|
|
8190
8134
|
|
|
8191
8135
|
/**
|
|
8192
|
-
*
|
|
8193
|
-
* @
|
|
8194
|
-
*
|
|
8195
|
-
* @example
|
|
8196
|
-
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
8197
|
-
*
|
|
8136
|
+
* Notify selection change.
|
|
8137
|
+
* @private
|
|
8138
|
+
* @return {void}
|
|
8198
8139
|
*/
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
|
|
8140
|
+
notifySelectionChange() {
|
|
8141
|
+
// this event needs to be removed after select and combobox are updated to use the new standard name
|
|
8142
|
+
this.dispatchEvent(new CustomEvent('selectedOption', {
|
|
8143
|
+
bubbles: true,
|
|
8144
|
+
cancelable: false,
|
|
8145
|
+
composed: true,
|
|
8146
|
+
}));
|
|
8205
8147
|
|
|
8206
|
-
|
|
8207
|
-
|
|
8148
|
+
this.dispatchEvent(new CustomEvent('auroMenu-selectedOption', {
|
|
8149
|
+
bubbles: true,
|
|
8150
|
+
cancelable: false,
|
|
8151
|
+
composed: true,
|
|
8152
|
+
}));
|
|
8208
8153
|
}
|
|
8209
8154
|
|
|
8210
8155
|
/**
|
|
8211
|
-
*
|
|
8156
|
+
* Process actions for making making a menuoption selection.
|
|
8212
8157
|
*/
|
|
8213
|
-
|
|
8214
|
-
this.
|
|
8215
|
-
|
|
8158
|
+
makeSelection() {
|
|
8159
|
+
if (!this.items) {
|
|
8160
|
+
this.initItems();
|
|
8161
|
+
}
|
|
8216
8162
|
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
const a11y = {
|
|
8220
|
-
'labelContainer': true,
|
|
8221
|
-
'util_displayHiddenVisually': !this.label
|
|
8222
|
-
};
|
|
8163
|
+
if (this.items[this.index] && !this.items[this.index].hasAttribute('disabled')) {
|
|
8164
|
+
this.resetOptionsStates();
|
|
8223
8165
|
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
};
|
|
8166
|
+
if (this.index >= 0) {
|
|
8167
|
+
const option = this.items[this.index];
|
|
8227
8168
|
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
`
|
|
8238
|
-
}
|
|
8239
|
-
</span>
|
|
8240
|
-
|
|
8241
|
-
<div class="${e(a11y)}">
|
|
8242
|
-
<slot></slot>
|
|
8243
|
-
</div>
|
|
8244
|
-
</div>
|
|
8245
|
-
`;
|
|
8246
|
-
}
|
|
8247
|
-
}
|
|
8248
|
-
|
|
8249
|
-
var iconVersion = '6.1.1';
|
|
8250
|
-
|
|
8251
|
-
var checkmarkIcon = {"role":"img","color":"currentColor","title":"","desc":"a small check mark.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"checkmark-sm","category":"interface","svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
8169
|
+
// only handle options that are not disabled, hidden or static
|
|
8170
|
+
if (option && this.optionInteractive(option)) {
|
|
8171
|
+
// fire custom event if defined otherwise make selection
|
|
8172
|
+
if (option.hasAttribute('event')) {
|
|
8173
|
+
this.dispatchEvent(new CustomEvent(option.getAttribute('event'), {
|
|
8174
|
+
bubbles: true,
|
|
8175
|
+
cancelable: false,
|
|
8176
|
+
composed: true,
|
|
8177
|
+
}));
|
|
8252
8178
|
|
|
8253
|
-
//
|
|
8254
|
-
|
|
8179
|
+
// this event needs to be removed after select and combobox are updated to use the new standard name
|
|
8180
|
+
this.dispatchEvent(new CustomEvent('auroMenuCustomEventFired', {
|
|
8181
|
+
bubbles: true,
|
|
8182
|
+
cancelable: false,
|
|
8183
|
+
composed: true,
|
|
8184
|
+
}));
|
|
8255
8185
|
|
|
8186
|
+
this.dispatchEvent(new CustomEvent('auroMenu-customEventFired', {
|
|
8187
|
+
bubbles: true,
|
|
8188
|
+
cancelable: false,
|
|
8189
|
+
composed: true,
|
|
8190
|
+
}));
|
|
8191
|
+
} else {
|
|
8192
|
+
this.handleLocalSelectState(option);
|
|
8193
|
+
}
|
|
8194
|
+
}
|
|
8195
|
+
}
|
|
8196
|
+
}
|
|
8256
8197
|
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
*
|
|
8260
|
-
* @attr {String} value - Specifies the value to be sent to a server.
|
|
8261
|
-
* @attr {String} noCheckmark - When true, selected option will not show the checkmark.
|
|
8262
|
-
* @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
|
|
8263
|
-
* @attr {Boolean} selected - Specifies that an option is selected.
|
|
8264
|
-
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8265
|
-
* @slot Specifies text for an option, but is not the value.
|
|
8266
|
-
*/
|
|
8267
|
-
class AuroMenuOption extends r$6 {
|
|
8268
|
-
constructor() {
|
|
8269
|
-
super();
|
|
8198
|
+
this.notifySelectionChange();
|
|
8199
|
+
}
|
|
8270
8200
|
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8201
|
+
/**
|
|
8202
|
+
* Manage ArrowDown, ArrowUp and Enter keyboard events.
|
|
8203
|
+
* @private
|
|
8204
|
+
* @param {Object} event - Event object from the browser.
|
|
8205
|
+
*/
|
|
8206
|
+
handleKeyDown(event) {
|
|
8207
|
+
event.preventDefault();
|
|
8276
8208
|
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8209
|
+
// With ArrowDown/ArrowUp events, pass new value to selectNextItem()
|
|
8210
|
+
// With Enter event, set value and apply attrs
|
|
8211
|
+
switch (event.key) {
|
|
8212
|
+
case "ArrowDown":
|
|
8213
|
+
this.selectNextItem('down');
|
|
8214
|
+
break;
|
|
8280
8215
|
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
this.tabIndex = -1;
|
|
8216
|
+
case "ArrowUp":
|
|
8217
|
+
this.selectNextItem('up');
|
|
8218
|
+
break;
|
|
8285
8219
|
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8220
|
+
case "Enter":
|
|
8221
|
+
this.makeSelection();
|
|
8222
|
+
break;
|
|
8223
|
+
}
|
|
8290
8224
|
}
|
|
8291
8225
|
|
|
8292
|
-
|
|
8293
|
-
|
|
8294
|
-
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
type: Boolean,
|
|
8300
|
-
reflect: true
|
|
8301
|
-
},
|
|
8302
|
-
disabled: {
|
|
8303
|
-
type: Boolean,
|
|
8304
|
-
reflect: true
|
|
8305
|
-
},
|
|
8306
|
-
value: {
|
|
8307
|
-
type: String,
|
|
8308
|
-
reflect: true
|
|
8309
|
-
},
|
|
8310
|
-
tabIndex: {
|
|
8311
|
-
type: Number,
|
|
8312
|
-
reflect: true
|
|
8313
|
-
}
|
|
8314
|
-
};
|
|
8226
|
+
/**
|
|
8227
|
+
* Initializes all menu options in the DOM. This must be re-run every time the options are changed.
|
|
8228
|
+
* @private
|
|
8229
|
+
*/
|
|
8230
|
+
initItems() {
|
|
8231
|
+
this.items = Array.from(this.querySelectorAll('auro-menuoption, [auro-menuoption]'));
|
|
8232
|
+
this.handleNoCheckmarkAttr();
|
|
8315
8233
|
}
|
|
8316
8234
|
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8321
|
-
|
|
8322
|
-
|
|
8235
|
+
/**
|
|
8236
|
+
* Sets the index value of the selected item or first non-disabled menuoption.
|
|
8237
|
+
* @private
|
|
8238
|
+
*/
|
|
8239
|
+
getSelectedIndex() {
|
|
8240
|
+
// find the first `selected` and not `disabled`, `hidden` or `static` option
|
|
8241
|
+
const index = this.items.findIndex((option) => option.hasAttribute('selected') && this.optionInteractive(option));
|
|
8242
|
+
|
|
8243
|
+
if (index >= 0) {
|
|
8244
|
+
this.index = index;
|
|
8245
|
+
this.makeSelection();
|
|
8246
|
+
}
|
|
8323
8247
|
}
|
|
8324
8248
|
|
|
8325
8249
|
/**
|
|
8326
|
-
*
|
|
8327
|
-
*
|
|
8328
|
-
*
|
|
8329
|
-
* @example
|
|
8330
|
-
* AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
|
|
8250
|
+
* Using value of current this.index evaluates index
|
|
8251
|
+
* of next :focus to set based on array of this.items ignoring items
|
|
8252
|
+
* with disabled attr.
|
|
8331
8253
|
*
|
|
8254
|
+
* The event.target is not used as the function needs to know where to go,
|
|
8255
|
+
* versus knowing where it is.
|
|
8256
|
+
* @param {String} moveDirection - Up or Down based on keyboard event.
|
|
8332
8257
|
*/
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8258
|
+
selectNextItem(moveDirection) {
|
|
8259
|
+
if (this.index >= 0) {
|
|
8260
|
+
this.items[this.index].classList.remove('active');
|
|
8336
8261
|
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
|
|
8262
|
+
// calculate which is the selection we should focus next
|
|
8263
|
+
let increment = 0;
|
|
8340
8264
|
|
|
8341
|
-
|
|
8342
|
-
|
|
8265
|
+
if (moveDirection === 'down') {
|
|
8266
|
+
increment = 1;
|
|
8267
|
+
} else if (moveDirection === 'up') {
|
|
8268
|
+
increment = -1;
|
|
8269
|
+
}
|
|
8343
8270
|
|
|
8344
|
-
|
|
8345
|
-
this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
|
|
8346
|
-
bubbles: true,
|
|
8347
|
-
cancelable: false,
|
|
8348
|
-
composed: true,
|
|
8349
|
-
detail: this
|
|
8350
|
-
}));
|
|
8351
|
-
});
|
|
8352
|
-
}
|
|
8271
|
+
this.index += increment;
|
|
8353
8272
|
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
this.
|
|
8273
|
+
// keep looping inside the array of options
|
|
8274
|
+
if (this.index > this.items.length - 1) {
|
|
8275
|
+
this.index = 0;
|
|
8276
|
+
} else if (this.index < 0) {
|
|
8277
|
+
this.index = this.items.length - 1;
|
|
8278
|
+
}
|
|
8279
|
+
|
|
8280
|
+
// check if new index is disabled, static or hidden, if so, execute again
|
|
8281
|
+
if (!this.optionInteractive(this.items[this.index])) {
|
|
8282
|
+
this.selectNextItem(moveDirection);
|
|
8283
|
+
} else {
|
|
8284
|
+
// apply focus to new index
|
|
8285
|
+
this.updateActiveOption(this.index);
|
|
8286
|
+
}
|
|
8287
|
+
} else {
|
|
8288
|
+
this.index = 0;
|
|
8289
|
+
|
|
8290
|
+
if (this.items[this.index].hasAttribute('hidden') || this.items[this.index].hasAttribute('disabled')) {
|
|
8291
|
+
this.selectNextItem(moveDirection);
|
|
8292
|
+
} else {
|
|
8293
|
+
this.updateActiveOption(this.index);
|
|
8294
|
+
}
|
|
8358
8295
|
}
|
|
8359
8296
|
}
|
|
8360
8297
|
|
|
8361
8298
|
/**
|
|
8362
|
-
*
|
|
8363
|
-
*
|
|
8299
|
+
* Used for applying indentation to each level of nested menu.
|
|
8364
8300
|
* @private
|
|
8365
|
-
* @param {
|
|
8366
|
-
* @returns {Element} The HTML element containing the SVG icon.
|
|
8301
|
+
* @param {String} menu - Root level menu object.
|
|
8367
8302
|
*/
|
|
8368
|
-
|
|
8369
|
-
const
|
|
8370
|
-
const svg = dom.body.firstChild;
|
|
8303
|
+
handleNestedMenus(menu) {
|
|
8304
|
+
const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu');
|
|
8371
8305
|
|
|
8372
|
-
|
|
8306
|
+
if (nestedMenus.length === 0) {
|
|
8307
|
+
return;
|
|
8308
|
+
}
|
|
8373
8309
|
|
|
8374
|
-
|
|
8375
|
-
|
|
8310
|
+
nestedMenus.forEach((nestedMenu) => {
|
|
8311
|
+
const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption');
|
|
8376
8312
|
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8313
|
+
options.forEach((option) => {
|
|
8314
|
+
option.innerHTML = this.nestingSpacer + option.innerHTML;
|
|
8315
|
+
});
|
|
8316
|
+
|
|
8317
|
+
this.handleNestedMenus(nestedMenu);
|
|
8318
|
+
});
|
|
8382
8319
|
}
|
|
8383
|
-
}
|
|
8384
8320
|
|
|
8385
|
-
|
|
8386
|
-
|
|
8321
|
+
/**
|
|
8322
|
+
* Method to apply `selected` attribute to `menuoption` via `value`.
|
|
8323
|
+
* @private
|
|
8324
|
+
* @param {String} value - Must match a unique `menuoption` value.
|
|
8325
|
+
*/
|
|
8326
|
+
selectByValue(value) {
|
|
8327
|
+
let valueMatch = false;
|
|
8328
|
+
if (!this.items) {
|
|
8329
|
+
this.initItems();
|
|
8330
|
+
}
|
|
8387
8331
|
|
|
8332
|
+
this.index = undefined;
|
|
8388
8333
|
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
* @attr {String} value - Value selected for the menu.
|
|
8397
|
-
* @event auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
|
|
8398
|
-
* @event selectedOption - (DEPRECATED) Notifies that a new menuoption selection has been made.
|
|
8399
|
-
* @event auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
8400
|
-
* @event auroMenuActivatedOption - (DEPRECATED) Notifies that a menuoption has been made `active`.
|
|
8401
|
-
* @event auroMenu-selectValueFailure - Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
8402
|
-
* @event auroMenuSelectValueFailure - (DEPRECATED) Notifies that a an attempt to select a menuoption by matching a value has failed.
|
|
8403
|
-
* @event auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
8404
|
-
* @event auroMenuCustomEventFired - (DEPRECATED) Notifies that a custom event has been fired.
|
|
8405
|
-
* @event auroMenu-selectValueReset - Notifies that the component value has been reset.
|
|
8406
|
-
* @slot Slot for insertion of menu options.
|
|
8407
|
-
*/
|
|
8408
|
-
|
|
8409
|
-
/* eslint-disable no-magic-numbers, max-lines */
|
|
8334
|
+
if (this.value && this.value.length > 0) {
|
|
8335
|
+
for (let index = 0; index < this.items.length; index += 1) {
|
|
8336
|
+
if (this.items[index].value === value) {
|
|
8337
|
+
valueMatch = true;
|
|
8338
|
+
this.index = index;
|
|
8339
|
+
}
|
|
8340
|
+
}
|
|
8410
8341
|
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
this.value = undefined;
|
|
8415
|
-
this.optionSelected = undefined;
|
|
8416
|
-
this.matchWord = undefined;
|
|
8417
|
-
this.noCheckmark = false;
|
|
8418
|
-
this.optionActive = undefined;
|
|
8342
|
+
if (!valueMatch) {
|
|
8343
|
+
// reset the menu to no selection
|
|
8344
|
+
this.index = undefined;
|
|
8419
8345
|
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8346
|
+
// this event needs to be removed after select and combobox are updated to use the new standard name
|
|
8347
|
+
this.dispatchEvent(new CustomEvent('auroMenuSelectValueFailure', {
|
|
8348
|
+
bubbles: true,
|
|
8349
|
+
cancelable: false,
|
|
8350
|
+
composed: true,
|
|
8351
|
+
}));
|
|
8424
8352
|
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8353
|
+
this.dispatchEvent(new CustomEvent('auroMenu-selectValueFailure', {
|
|
8354
|
+
bubbles: true,
|
|
8355
|
+
cancelable: false,
|
|
8356
|
+
composed: true,
|
|
8357
|
+
}));
|
|
8358
|
+
} else {
|
|
8359
|
+
this.makeSelection();
|
|
8360
|
+
}
|
|
8361
|
+
} else {
|
|
8362
|
+
this.resetOptionsStates();
|
|
8429
8363
|
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8364
|
+
this.dispatchEvent(new CustomEvent('auroMenu-selectValueReset', {
|
|
8365
|
+
bubbles: true,
|
|
8366
|
+
cancelable: false,
|
|
8367
|
+
composed: true,
|
|
8368
|
+
}));
|
|
8369
|
+
}
|
|
8434
8370
|
}
|
|
8435
8371
|
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8372
|
+
/**
|
|
8373
|
+
* Used to make the active state for options follow mouseover.
|
|
8374
|
+
* @param {Number} index - Index of the menuoption that will be made active.
|
|
8375
|
+
* @private
|
|
8376
|
+
*/
|
|
8377
|
+
updateActiveOption(index) {
|
|
8378
|
+
this.items.forEach((item) => {
|
|
8379
|
+
item.classList.remove('active');
|
|
8380
|
+
});
|
|
8381
|
+
this.items[index].classList.add('active');
|
|
8382
|
+
this.optionActive = this.items[index];
|
|
8383
|
+
|
|
8384
|
+
this.dispatchEvent(new CustomEvent('auroMenuActivatedOption', {
|
|
8385
|
+
bubbles: true,
|
|
8386
|
+
cancelable: false,
|
|
8387
|
+
composed: true,
|
|
8388
|
+
detail: this.items[index]
|
|
8389
|
+
}));
|
|
8390
|
+
|
|
8391
|
+
this.dispatchEvent(new CustomEvent('auroMenu-activatedOption', {
|
|
8392
|
+
bubbles: true,
|
|
8393
|
+
cancelable: false,
|
|
8394
|
+
composed: true,
|
|
8395
|
+
detail: this.items[index]
|
|
8396
|
+
}));
|
|
8451
8397
|
}
|
|
8452
8398
|
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8399
|
+
/**
|
|
8400
|
+
* Used to only make a selection when a menuoption is receiving a mousedown event.
|
|
8401
|
+
* @param {Event} evt - Mousedown event.
|
|
8402
|
+
* @private
|
|
8403
|
+
*/
|
|
8404
|
+
handleMenuMouseDown(evt) {
|
|
8405
|
+
if (evt.target !== this) {
|
|
8406
|
+
this.makeSelection();
|
|
8407
|
+
}
|
|
8459
8408
|
}
|
|
8460
8409
|
|
|
8461
8410
|
/**
|
|
8462
|
-
*
|
|
8463
|
-
* @param {string} [name="auro-menu"] - The name of element that you want to register to.
|
|
8411
|
+
* Checks if there are any loading placeholders in the component.
|
|
8464
8412
|
*
|
|
8465
|
-
*
|
|
8466
|
-
*
|
|
8413
|
+
* This getter evaluates the `loadingSlots` collection to determine if it contains any items.
|
|
8414
|
+
* If the size of the collection is greater than zero, it indicates the presence of loading
|
|
8415
|
+
* placeholders, returning true; otherwise, it returns false.
|
|
8467
8416
|
*
|
|
8417
|
+
* @getter hasLoadingPlaceholder
|
|
8418
|
+
* @type {boolean}
|
|
8419
|
+
* @returns {boolean} Returns true if loading placeholders exist; false otherwise.
|
|
8468
8420
|
*/
|
|
8469
|
-
|
|
8470
|
-
|
|
8421
|
+
get hasLoadingPlaceholder() {
|
|
8422
|
+
return this.loadingSlots.length > 0;
|
|
8471
8423
|
}
|
|
8472
8424
|
|
|
8473
8425
|
/**
|
|
8474
|
-
*
|
|
8426
|
+
* Used for @slotchange event on slotted element.
|
|
8475
8427
|
* @private
|
|
8476
|
-
* @returns {void}
|
|
8477
8428
|
*/
|
|
8478
|
-
|
|
8479
|
-
if
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
menu.setAttribute('noCheckmark', '');
|
|
8484
|
-
});
|
|
8429
|
+
handleSlotItems() {
|
|
8430
|
+
// Determine if this is the root of the menu/submenu layout.
|
|
8431
|
+
if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
|
|
8432
|
+
this.rootMenu = false;
|
|
8433
|
+
}
|
|
8485
8434
|
|
|
8486
|
-
|
|
8435
|
+
// If this is the root menu (not a nested menu) handle events, states and styling.
|
|
8436
|
+
if (this.rootMenu) {
|
|
8437
|
+
this.initItems();
|
|
8438
|
+
this.setAttribute('role', 'listbox');
|
|
8439
|
+
this.setAttribute('root', '');
|
|
8440
|
+
this.handleNestedMenus(this);
|
|
8441
|
+
this.markOptions();
|
|
8442
|
+
this.index = -1;
|
|
8443
|
+
this.getSelectedIndex();
|
|
8487
8444
|
|
|
8488
|
-
|
|
8489
|
-
|
|
8445
|
+
this.addEventListener('keydown', this.handleKeyDown);
|
|
8446
|
+
this.addEventListener('mousedown', this.handleMenuMouseDown);
|
|
8447
|
+
this.addEventListener('auroMenuOption-mouseover', (evt) => {
|
|
8448
|
+
this.index = this.items.indexOf(evt.target);
|
|
8449
|
+
this.updateActiveOption(this.index);
|
|
8490
8450
|
});
|
|
8451
|
+
} else {
|
|
8452
|
+
// make sure to update all menuoption noCheckmark attributes when the menu is dynamically changed
|
|
8453
|
+
this.handleNoCheckmarkAttr();
|
|
8491
8454
|
}
|
|
8492
8455
|
}
|
|
8493
8456
|
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8457
|
+
render() {
|
|
8458
|
+
if (this.loading) {
|
|
8459
|
+
return x$2`
|
|
8460
|
+
<auro-menuoption disabled loadingplaceholder class="${this.hasLoadingPlaceholder ? '' : 'empty'}">
|
|
8461
|
+
<div>
|
|
8462
|
+
<slot name="loadingIcon"></slot>
|
|
8463
|
+
<slot name="loadingText"></slot>
|
|
8464
|
+
</div>
|
|
8465
|
+
</auro-menuoption>
|
|
8466
|
+
`;
|
|
8467
|
+
}
|
|
8468
|
+
return x$2`<slot @slotchange=${this.handleSlotItems}></slot>`;
|
|
8499
8469
|
}
|
|
8470
|
+
}
|
|
8500
8471
|
|
|
8501
|
-
|
|
8502
|
-
if (changedProperties.has('matchWord')) {
|
|
8503
|
-
this.markOptions();
|
|
8504
|
-
}
|
|
8472
|
+
var styleCss$1 = i$c`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
8505
8473
|
|
|
8506
|
-
|
|
8507
|
-
this.selectByValue(this.value);
|
|
8508
|
-
}
|
|
8474
|
+
var colorCss$1 = i$c`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color) !important}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-color-text-ui-disabled-default, #adadad)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-secondary-hover-default, rgba(0, 0, 0, 0.03))}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-menuoption-text-color: var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}`;
|
|
8509
8475
|
|
|
8510
|
-
|
|
8511
|
-
|
|
8476
|
+
/**
|
|
8477
|
+
* @license
|
|
8478
|
+
* Copyright 2017 Google LLC
|
|
8479
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8480
|
+
*/
|
|
8481
|
+
const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
8512
8482
|
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8483
|
+
/**
|
|
8484
|
+
* @license
|
|
8485
|
+
* Copyright 2018 Google LLC
|
|
8486
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8487
|
+
*/const e=e$1(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$2}});
|
|
8518
8488
|
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
optionInteractive(option) {
|
|
8525
|
-
return !option.hasAttribute('hidden') && !option.hasAttribute('disabled') && !option.hasAttribute('static');
|
|
8526
|
-
}
|
|
8489
|
+
/**
|
|
8490
|
+
* @license
|
|
8491
|
+
* Copyright 2018 Google LLC
|
|
8492
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
8493
|
+
*/const o=o=>o??E$2;
|
|
8527
8494
|
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
* @returns {void} When called will update the DOM with visible suggest text matches.
|
|
8531
|
-
*/
|
|
8532
|
-
markOptions() {
|
|
8533
|
-
if (this.items && this.items.length > 0 && (this.matchWord && this.matchWord.length > 0)) {
|
|
8495
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8496
|
+
// See LICENSE in the project root for license information.
|
|
8534
8497
|
|
|
8535
|
-
// Escape special regex characters
|
|
8536
|
-
const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
|
|
8537
8498
|
|
|
8538
|
-
|
|
8539
|
-
|
|
8499
|
+
/**
|
|
8500
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
8501
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
8502
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
8503
|
+
*/
|
|
8540
8504
|
|
|
8541
|
-
|
|
8542
|
-
if (this.optionInteractive(item) && !item.hasAttribute('persistent')) {
|
|
8543
|
-
const nested = item.querySelectorAll('.nestingSpacer');
|
|
8544
|
-
const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
|
|
8505
|
+
class AuroElement extends r$6 {
|
|
8545
8506
|
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8507
|
+
// function to define props used within the scope of this component
|
|
8508
|
+
static get properties() {
|
|
8509
|
+
return {
|
|
8510
|
+
hidden: { type: Boolean,
|
|
8511
|
+
reflect: true },
|
|
8512
|
+
hiddenVisually: { type: Boolean,
|
|
8513
|
+
reflect: true },
|
|
8514
|
+
hiddenAudible: { type: Boolean,
|
|
8515
|
+
reflect: true },
|
|
8516
|
+
};
|
|
8550
8517
|
}
|
|
8551
8518
|
|
|
8552
8519
|
/**
|
|
8553
|
-
*
|
|
8520
|
+
* @private Function that determines state of aria-hidden
|
|
8554
8521
|
*/
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
this.items.forEach((item) => {
|
|
8559
|
-
item.classList.remove('active');
|
|
8560
|
-
item.removeAttribute('selected');
|
|
8561
|
-
});
|
|
8522
|
+
hideAudible(value) {
|
|
8523
|
+
if (value) {
|
|
8524
|
+
return 'true'
|
|
8562
8525
|
}
|
|
8526
|
+
|
|
8527
|
+
return 'false'
|
|
8563
8528
|
}
|
|
8529
|
+
}
|
|
8564
8530
|
|
|
8565
|
-
|
|
8566
|
-
* Set the attributes on the selected menuoption, the menu value and stored option.
|
|
8567
|
-
* @param {Object} option - The menuoption to be selected.
|
|
8568
|
-
* @private
|
|
8569
|
-
*/
|
|
8570
|
-
handleLocalSelectState(option) {
|
|
8571
|
-
option.setAttribute('selected', '');
|
|
8572
|
-
option.classList.add('active');
|
|
8573
|
-
option.ariaSelected = true;
|
|
8531
|
+
var error = {"role":"img","color":"currentColor","title":"","desc":"Error alert indicator.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"error","category":"alert","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
8574
8532
|
|
|
8575
|
-
|
|
8576
|
-
this.optionSelected = option;
|
|
8577
|
-
this.index = this.items.indexOf(option);
|
|
8578
|
-
}
|
|
8533
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
8579
8534
|
|
|
8580
|
-
|
|
8581
|
-
* Notify selection change.
|
|
8582
|
-
* @private
|
|
8583
|
-
* @return {void}
|
|
8584
|
-
*/
|
|
8585
|
-
notifySelectionChange() {
|
|
8586
|
-
// this event needs to be removed after select and combobox are updated to use the new standard name
|
|
8587
|
-
this.dispatchEvent(new CustomEvent('selectedOption', {
|
|
8588
|
-
bubbles: true,
|
|
8589
|
-
cancelable: false,
|
|
8590
|
-
composed: true,
|
|
8591
|
-
}));
|
|
8535
|
+
const _fetchMap = new Map();
|
|
8592
8536
|
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8537
|
+
/**
|
|
8538
|
+
* A callback to parse Response body.
|
|
8539
|
+
*
|
|
8540
|
+
* @callback ResponseParser
|
|
8541
|
+
* @param {Fetch.Response} response
|
|
8542
|
+
* @returns {Promise}
|
|
8543
|
+
*/
|
|
8544
|
+
|
|
8545
|
+
/**
|
|
8546
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
8547
|
+
*
|
|
8548
|
+
* @param {String} uri
|
|
8549
|
+
* @param {Object} [options={}]
|
|
8550
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
8551
|
+
* @returns {Promise}
|
|
8552
|
+
*/
|
|
8553
|
+
const cacheFetch = (uri, options = {}) => {
|
|
8554
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
8555
|
+
if (!_fetchMap.has(uri)) {
|
|
8556
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
8598
8557
|
}
|
|
8558
|
+
return _fetchMap.get(uri);
|
|
8559
|
+
};
|
|
8599
8560
|
|
|
8600
|
-
|
|
8601
|
-
* Process actions for making making a menuoption selection.
|
|
8602
|
-
*/
|
|
8603
|
-
makeSelection() {
|
|
8604
|
-
if (!this.items) {
|
|
8605
|
-
this.initItems();
|
|
8606
|
-
}
|
|
8561
|
+
var styleCss = i$c`*,*:before,*:after{box-sizing:border-box}@media(prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important}}*:focus-visible{outline:0}*:focus-visible{outline:0}: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}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}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}.label{display:flex;align-items:flex-start}.label svg{margin:0 var(--ds-size-50, 0.25rem)}.labelContainer{line-height:1.8}`;
|
|
8607
8562
|
|
|
8608
|
-
|
|
8609
|
-
|
|
8563
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8564
|
+
// See LICENSE in the project root for license information.
|
|
8610
8565
|
|
|
8611
|
-
if (this.index >= 0) {
|
|
8612
|
-
const option = this.items[this.index];
|
|
8613
8566
|
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
bubbles: true,
|
|
8620
|
-
cancelable: false,
|
|
8621
|
-
composed: true,
|
|
8622
|
-
}));
|
|
8567
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
8568
|
+
/**
|
|
8569
|
+
* @attr {Boolean} onDark - Set value for on-dark version of auro-icon
|
|
8570
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
8571
|
+
*/
|
|
8623
8572
|
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8573
|
+
// build the component class
|
|
8574
|
+
class BaseIcon extends AuroElement {
|
|
8575
|
+
constructor() {
|
|
8576
|
+
super();
|
|
8577
|
+
this.onDark = false;
|
|
8578
|
+
}
|
|
8630
8579
|
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8580
|
+
// function to define props used within the scope of this component
|
|
8581
|
+
static get properties() {
|
|
8582
|
+
return {
|
|
8583
|
+
...super.properties,
|
|
8584
|
+
onDark: {
|
|
8585
|
+
type: Boolean,
|
|
8586
|
+
reflect: true
|
|
8587
|
+
},
|
|
8588
|
+
|
|
8589
|
+
/**
|
|
8590
|
+
* @private
|
|
8591
|
+
*/
|
|
8592
|
+
svg: {
|
|
8593
|
+
attribute: false,
|
|
8594
|
+
reflect: true
|
|
8640
8595
|
}
|
|
8641
|
-
}
|
|
8596
|
+
};
|
|
8597
|
+
}
|
|
8642
8598
|
|
|
8643
|
-
|
|
8599
|
+
static get styles() {
|
|
8600
|
+
return i$c`
|
|
8601
|
+
${styleCss}
|
|
8602
|
+
`;
|
|
8644
8603
|
}
|
|
8645
8604
|
|
|
8646
8605
|
/**
|
|
8647
|
-
*
|
|
8606
|
+
* Async function to fetch requested icon from npm CDN.
|
|
8648
8607
|
* @private
|
|
8649
|
-
* @param {
|
|
8608
|
+
* @param {string} category - Icon category.
|
|
8609
|
+
* @param {string} name - Icon name.
|
|
8610
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
8650
8611
|
*/
|
|
8651
|
-
|
|
8652
|
-
|
|
8612
|
+
async fetchIcon(category, name) {
|
|
8613
|
+
let iconHTML = '';
|
|
8653
8614
|
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
break;
|
|
8615
|
+
if (category === 'logos') {
|
|
8616
|
+
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
8617
|
+
} else {
|
|
8618
|
+
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
8619
|
+
}
|
|
8660
8620
|
|
|
8661
|
-
|
|
8662
|
-
this.selectNextItem('up');
|
|
8663
|
-
break;
|
|
8621
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
8664
8622
|
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8623
|
+
return dom.body.querySelector('svg');
|
|
8624
|
+
}
|
|
8625
|
+
|
|
8626
|
+
// lifecycle function
|
|
8627
|
+
async firstUpdated() {
|
|
8628
|
+
if (!this.customSvg) {
|
|
8629
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
8630
|
+
|
|
8631
|
+
if (svg) {
|
|
8632
|
+
this.svg = svg;
|
|
8633
|
+
} else if (!svg) {
|
|
8634
|
+
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
8635
|
+
|
|
8636
|
+
this.svg = penDOM.body.firstChild;
|
|
8637
|
+
}
|
|
8668
8638
|
}
|
|
8669
8639
|
}
|
|
8640
|
+
}
|
|
8670
8641
|
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8642
|
+
var tokensCss = i$c`:host{--ds-auro-icon-color: var(--ds-color-icon-primary-default, $ds-color-icon-primary-default);--ds-auro-icon-size: var(--ds-size-300, $ds-size-300)}`;
|
|
8643
|
+
|
|
8644
|
+
var colorCss = i$c`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color: var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color: var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color: var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color: var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color: var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color: var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color: var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color: var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color: var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color: var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color: var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color: var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color: var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color: var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
8645
|
+
|
|
8646
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8647
|
+
// See LICENSE in the project root for license information.
|
|
8648
|
+
|
|
8649
|
+
|
|
8650
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
8651
|
+
/**
|
|
8652
|
+
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
8653
|
+
*
|
|
8654
|
+
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
8655
|
+
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
8656
|
+
* @attr {Boolean} customColor - Removes primary selector.
|
|
8657
|
+
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
8658
|
+
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
8659
|
+
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
8660
|
+
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
8661
|
+
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
8662
|
+
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
8663
|
+
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
8664
|
+
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
8665
|
+
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
8666
|
+
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
8667
|
+
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
8668
|
+
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
8669
|
+
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
8670
|
+
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
8671
|
+
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
8672
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
8673
|
+
* @slot svg - Used for custom SVG content.
|
|
8674
|
+
*/
|
|
8675
|
+
|
|
8676
|
+
// build the component class
|
|
8677
|
+
class AuroIcon extends BaseIcon {
|
|
8678
|
+
constructor() {
|
|
8679
|
+
super();
|
|
8680
|
+
|
|
8681
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
8682
|
+
|
|
8683
|
+
this.privateDefaults();
|
|
8678
8684
|
}
|
|
8679
8685
|
|
|
8680
8686
|
/**
|
|
8681
|
-
*
|
|
8687
|
+
* Internal Defaults.
|
|
8682
8688
|
* @private
|
|
8689
|
+
* @returns {void}
|
|
8683
8690
|
*/
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8691
|
+
privateDefaults() {
|
|
8692
|
+
this.accent = false;
|
|
8693
|
+
this.customColor = false;
|
|
8694
|
+
this.customSvg = false;
|
|
8695
|
+
this.disabled = false;
|
|
8696
|
+
this.emphasis = false;
|
|
8697
|
+
this.error = false;
|
|
8698
|
+
this.info = false;
|
|
8699
|
+
this.label = false;
|
|
8700
|
+
this.primary = false;
|
|
8701
|
+
this.secondary = false;
|
|
8702
|
+
this.subtle = false;
|
|
8703
|
+
this.success = false;
|
|
8704
|
+
this.tertiary = false;
|
|
8705
|
+
this.warning = false;
|
|
8706
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
8707
|
+
}
|
|
8687
8708
|
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8709
|
+
// function to define props used within the scope of this component
|
|
8710
|
+
static get properties() {
|
|
8711
|
+
return {
|
|
8712
|
+
...super.properties,
|
|
8713
|
+
accent: {
|
|
8714
|
+
type: Boolean,
|
|
8715
|
+
reflect: true
|
|
8716
|
+
},
|
|
8717
|
+
ariaHidden: {
|
|
8718
|
+
type: String,
|
|
8719
|
+
reflect: true
|
|
8720
|
+
},
|
|
8721
|
+
category: {
|
|
8722
|
+
type: String,
|
|
8723
|
+
reflect: true
|
|
8724
|
+
},
|
|
8725
|
+
customColor: {
|
|
8726
|
+
type: Boolean
|
|
8727
|
+
},
|
|
8728
|
+
customSvg: {
|
|
8729
|
+
type: Boolean
|
|
8730
|
+
},
|
|
8731
|
+
disabled: {
|
|
8732
|
+
type: Boolean,
|
|
8733
|
+
reflect: true
|
|
8734
|
+
},
|
|
8735
|
+
emphasis: {
|
|
8736
|
+
type: Boolean,
|
|
8737
|
+
reflect: true
|
|
8738
|
+
},
|
|
8739
|
+
error: {
|
|
8740
|
+
type: Boolean,
|
|
8741
|
+
reflect: true
|
|
8742
|
+
},
|
|
8743
|
+
info: {
|
|
8744
|
+
type: Boolean,
|
|
8745
|
+
reflect: true
|
|
8746
|
+
},
|
|
8747
|
+
label: {
|
|
8748
|
+
type: Boolean,
|
|
8749
|
+
reflect: true
|
|
8750
|
+
},
|
|
8751
|
+
name: {
|
|
8752
|
+
type: String,
|
|
8753
|
+
reflect: true
|
|
8754
|
+
},
|
|
8755
|
+
primary: {
|
|
8756
|
+
type: Boolean,
|
|
8757
|
+
reflect: true
|
|
8758
|
+
},
|
|
8759
|
+
secondary: {
|
|
8760
|
+
type: Boolean,
|
|
8761
|
+
reflect: true
|
|
8762
|
+
},
|
|
8763
|
+
subtle: {
|
|
8764
|
+
type: Boolean,
|
|
8765
|
+
reflect: true
|
|
8766
|
+
},
|
|
8767
|
+
success: {
|
|
8768
|
+
type: Boolean,
|
|
8769
|
+
reflect: true
|
|
8770
|
+
},
|
|
8771
|
+
tertiary: {
|
|
8772
|
+
type: Boolean,
|
|
8773
|
+
reflect: true
|
|
8774
|
+
},
|
|
8775
|
+
uri: {
|
|
8776
|
+
type: String
|
|
8777
|
+
},
|
|
8778
|
+
warning: {
|
|
8779
|
+
type: Boolean,
|
|
8780
|
+
reflect: true
|
|
8781
|
+
}
|
|
8782
|
+
};
|
|
8783
|
+
}
|
|
8784
|
+
|
|
8785
|
+
static get styles() {
|
|
8786
|
+
return [
|
|
8787
|
+
super.styles,
|
|
8788
|
+
i$c`${tokensCss}`,
|
|
8789
|
+
i$c`${styleCss}`,
|
|
8790
|
+
i$c`${colorCss}`
|
|
8791
|
+
];
|
|
8692
8792
|
}
|
|
8693
8793
|
|
|
8694
8794
|
/**
|
|
8695
|
-
*
|
|
8696
|
-
*
|
|
8697
|
-
*
|
|
8795
|
+
* This will register this element with the browser.
|
|
8796
|
+
* @param {string} [name="auro-icon"] - The name of element that you want to register to.
|
|
8797
|
+
*
|
|
8798
|
+
* @example
|
|
8799
|
+
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
8698
8800
|
*
|
|
8699
|
-
* The event.target is not used as the function needs to know where to go,
|
|
8700
|
-
* versus knowing where it is.
|
|
8701
|
-
* @param {String} moveDirection - Up or Down based on keyboard event.
|
|
8702
8801
|
*/
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
// calculate which is the selection we should focus next
|
|
8708
|
-
let increment = 0;
|
|
8709
|
-
|
|
8710
|
-
if (moveDirection === 'down') {
|
|
8711
|
-
increment = 1;
|
|
8712
|
-
} else if (moveDirection === 'up') {
|
|
8713
|
-
increment = -1;
|
|
8714
|
-
}
|
|
8715
|
-
|
|
8716
|
-
this.index += increment;
|
|
8717
|
-
|
|
8718
|
-
// keep looping inside the array of options
|
|
8719
|
-
if (this.index > this.items.length - 1) {
|
|
8720
|
-
this.index = 0;
|
|
8721
|
-
} else if (this.index < 0) {
|
|
8722
|
-
this.index = this.items.length - 1;
|
|
8723
|
-
}
|
|
8802
|
+
static register(name = "auro-icon") {
|
|
8803
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
8804
|
+
}
|
|
8724
8805
|
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
this.selectNextItem(moveDirection);
|
|
8728
|
-
} else {
|
|
8729
|
-
// apply focus to new index
|
|
8730
|
-
this.updateActiveOption(this.index);
|
|
8731
|
-
}
|
|
8732
|
-
} else {
|
|
8733
|
-
this.index = 0;
|
|
8806
|
+
connectedCallback() {
|
|
8807
|
+
super.connectedCallback();
|
|
8734
8808
|
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
} else {
|
|
8738
|
-
this.updateActiveOption(this.index);
|
|
8739
|
-
}
|
|
8740
|
-
}
|
|
8809
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
8810
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
|
|
8741
8811
|
}
|
|
8742
8812
|
|
|
8743
8813
|
/**
|
|
8744
|
-
*
|
|
8745
|
-
* @private
|
|
8746
|
-
* @param {String} menu - Root level menu object.
|
|
8814
|
+
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
8747
8815
|
*/
|
|
8748
|
-
|
|
8749
|
-
|
|
8816
|
+
exposeCssParts() {
|
|
8817
|
+
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
8818
|
+
}
|
|
8750
8819
|
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8820
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
8821
|
+
render() {
|
|
8822
|
+
const a11y = {
|
|
8823
|
+
'labelContainer': true,
|
|
8824
|
+
'util_displayHiddenVisually': !this.label
|
|
8825
|
+
};
|
|
8754
8826
|
|
|
8755
|
-
|
|
8756
|
-
|
|
8827
|
+
const classes = {
|
|
8828
|
+
'label': this.label
|
|
8829
|
+
};
|
|
8757
8830
|
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8831
|
+
return x$2`
|
|
8832
|
+
<div
|
|
8833
|
+
class="${e(classes)}"
|
|
8834
|
+
title="${o(this.title || undefined)}">
|
|
8835
|
+
<span aria-hidden="${o(this.ariaHidden ? this.ariaHidden : true)}" part="svg">
|
|
8836
|
+
${this.customSvg ? x$2`
|
|
8837
|
+
<slot name="svg"></slot>
|
|
8838
|
+
` : x$2`
|
|
8839
|
+
${this.svg}
|
|
8840
|
+
`
|
|
8841
|
+
}
|
|
8842
|
+
</span>
|
|
8761
8843
|
|
|
8762
|
-
|
|
8763
|
-
|
|
8844
|
+
<div class="${e(a11y)}">
|
|
8845
|
+
<slot></slot>
|
|
8846
|
+
</div>
|
|
8847
|
+
</div>
|
|
8848
|
+
`;
|
|
8764
8849
|
}
|
|
8850
|
+
}
|
|
8765
8851
|
|
|
8766
|
-
|
|
8767
|
-
* Method to apply `selected` attribute to `menuoption` via `value`.
|
|
8768
|
-
* @private
|
|
8769
|
-
* @param {String} value - Must match a unique `menuoption` value.
|
|
8770
|
-
*/
|
|
8771
|
-
selectByValue(value) {
|
|
8772
|
-
let valueMatch = false;
|
|
8773
|
-
if (!this.items) {
|
|
8774
|
-
this.initItems();
|
|
8775
|
-
}
|
|
8852
|
+
var iconVersion = '6.1.1';
|
|
8776
8853
|
|
|
8777
|
-
|
|
8854
|
+
var checkmarkIcon = {"role":"img","color":"currentColor","title":"","desc":"a small check mark.","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"checkmark-sm","category":"interface","svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
8778
8855
|
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
if (this.items[index].value === value) {
|
|
8782
|
-
valueMatch = true;
|
|
8783
|
-
this.index = index;
|
|
8784
|
-
}
|
|
8785
|
-
}
|
|
8856
|
+
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8857
|
+
// See LICENSE in the project root for license information.
|
|
8786
8858
|
|
|
8787
|
-
if (!valueMatch) {
|
|
8788
|
-
// reset the menu to no selection
|
|
8789
|
-
this.index = undefined;
|
|
8790
8859
|
|
|
8791
|
-
|
|
8792
|
-
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
|
|
8860
|
+
/**
|
|
8861
|
+
* The auro-menu element provides users a way to define a menu option.
|
|
8862
|
+
*
|
|
8863
|
+
* @attr {String} value - Specifies the value to be sent to a server.
|
|
8864
|
+
* @attr {String} noCheckmark - When true, selected option will not show the checkmark.
|
|
8865
|
+
* @attr {Boolean} disabled - When true specifies that the menuoption is disabled.
|
|
8866
|
+
* @attr {Boolean} selected - Specifies that an option is selected.
|
|
8867
|
+
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8868
|
+
* @slot - Specifies text for an option, but is not the value.
|
|
8869
|
+
*/
|
|
8870
|
+
class AuroMenuOption extends r$6 {
|
|
8871
|
+
constructor() {
|
|
8872
|
+
super();
|
|
8797
8873
|
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8874
|
+
/**
|
|
8875
|
+
* Generate unique names for dependency components.
|
|
8876
|
+
*/
|
|
8877
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
8878
|
+
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
8879
|
+
|
|
8880
|
+
this.selected = false;
|
|
8881
|
+
this.nocheckmark = false;
|
|
8882
|
+
this.disabled = false;
|
|
8883
|
+
|
|
8884
|
+
/**
|
|
8885
|
+
* @private
|
|
8886
|
+
*/
|
|
8887
|
+
this.tabIndex = -1;
|
|
8888
|
+
|
|
8889
|
+
/**
|
|
8890
|
+
* @private
|
|
8891
|
+
*/
|
|
8892
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
8893
|
+
}
|
|
8894
|
+
|
|
8895
|
+
static get properties() {
|
|
8896
|
+
return {
|
|
8897
|
+
nocheckmark: {
|
|
8898
|
+
type: Boolean,
|
|
8899
|
+
reflect: true
|
|
8900
|
+
},
|
|
8901
|
+
selected: {
|
|
8902
|
+
type: Boolean,
|
|
8903
|
+
reflect: true
|
|
8904
|
+
},
|
|
8905
|
+
disabled: {
|
|
8906
|
+
type: Boolean,
|
|
8907
|
+
reflect: true
|
|
8908
|
+
},
|
|
8909
|
+
value: {
|
|
8910
|
+
type: String,
|
|
8911
|
+
reflect: true
|
|
8912
|
+
},
|
|
8913
|
+
tabIndex: {
|
|
8914
|
+
type: Number,
|
|
8915
|
+
reflect: true
|
|
8805
8916
|
}
|
|
8806
|
-
}
|
|
8807
|
-
|
|
8917
|
+
};
|
|
8918
|
+
}
|
|
8808
8919
|
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8920
|
+
static get styles() {
|
|
8921
|
+
return [
|
|
8922
|
+
styleCss$1,
|
|
8923
|
+
colorCss$1,
|
|
8924
|
+
tokensCss$1
|
|
8925
|
+
];
|
|
8815
8926
|
}
|
|
8816
8927
|
|
|
8817
8928
|
/**
|
|
8818
|
-
*
|
|
8819
|
-
* @param {
|
|
8820
|
-
*
|
|
8929
|
+
* This will register this element with the browser.
|
|
8930
|
+
* @param {string} [name="auro-menuoption"] - The name of element that you want to register to.
|
|
8931
|
+
*
|
|
8932
|
+
* @example
|
|
8933
|
+
* AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
|
|
8934
|
+
*
|
|
8821
8935
|
*/
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
});
|
|
8826
|
-
this.items[index].classList.add('active');
|
|
8827
|
-
this.optionActive = this.items[index];
|
|
8936
|
+
static register(name = "auro-menuoption") {
|
|
8937
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroMenuOption);
|
|
8938
|
+
}
|
|
8828
8939
|
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
composed: true,
|
|
8833
|
-
detail: this.items[index]
|
|
8834
|
-
}));
|
|
8940
|
+
firstUpdated() {
|
|
8941
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
8942
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
|
|
8835
8943
|
|
|
8836
|
-
this.
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8944
|
+
this.setAttribute('role', 'option');
|
|
8945
|
+
this.setAttribute('aria-selected', 'false');
|
|
8946
|
+
|
|
8947
|
+
this.addEventListener('mouseover', () => {
|
|
8948
|
+
this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
|
|
8949
|
+
bubbles: true,
|
|
8950
|
+
cancelable: false,
|
|
8951
|
+
composed: true,
|
|
8952
|
+
detail: this
|
|
8953
|
+
}));
|
|
8954
|
+
});
|
|
8842
8955
|
}
|
|
8843
8956
|
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
*/
|
|
8849
|
-
handleMenuMouseDown(evt) {
|
|
8850
|
-
if (evt.target !== this) {
|
|
8851
|
-
this.makeSelection();
|
|
8957
|
+
// observer for selected property changes
|
|
8958
|
+
updated(changedProperties) {
|
|
8959
|
+
if (changedProperties.has('selected')) {
|
|
8960
|
+
this.setAttribute('aria-selected', this.selected.toString());
|
|
8852
8961
|
}
|
|
8853
8962
|
}
|
|
8854
8963
|
|
|
8855
8964
|
/**
|
|
8856
|
-
*
|
|
8965
|
+
* Generates an HTML element containing an SVG icon based on the provided `svgContent`.
|
|
8966
|
+
*
|
|
8857
8967
|
* @private
|
|
8968
|
+
* @param {string} svgContent - The SVG content to be embedded.
|
|
8969
|
+
* @returns {Element} The HTML element containing the SVG icon.
|
|
8858
8970
|
*/
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
this.rootMenu = false;
|
|
8863
|
-
}
|
|
8971
|
+
generateIconHtml(svgContent) {
|
|
8972
|
+
const dom = new DOMParser().parseFromString(svgContent, 'text/html');
|
|
8973
|
+
const svg = dom.body.firstChild;
|
|
8864
8974
|
|
|
8865
|
-
|
|
8866
|
-
if (this.rootMenu) {
|
|
8867
|
-
this.initItems();
|
|
8868
|
-
this.setAttribute('role', 'listbox');
|
|
8869
|
-
this.setAttribute('root', '');
|
|
8870
|
-
this.handleNestedMenus(this);
|
|
8871
|
-
this.markOptions();
|
|
8872
|
-
this.index = -1;
|
|
8873
|
-
this.getSelectedIndex();
|
|
8975
|
+
svg.setAttribute('slot', 'svg');
|
|
8874
8976
|
|
|
8875
|
-
|
|
8876
|
-
this.addEventListener('mousedown', this.handleMenuMouseDown);
|
|
8877
|
-
this.addEventListener('auroMenuOption-mouseover', (evt) => {
|
|
8878
|
-
this.index = this.items.indexOf(evt.target);
|
|
8879
|
-
this.updateActiveOption(this.index);
|
|
8880
|
-
});
|
|
8881
|
-
} else {
|
|
8882
|
-
// make sure to update all menuoption noCheckmark attributes when the menu is dynamically changed
|
|
8883
|
-
this.handleNoCheckmarkAttr();
|
|
8884
|
-
}
|
|
8977
|
+
return u$6`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
|
|
8885
8978
|
}
|
|
8886
8979
|
|
|
8887
8980
|
render() {
|
|
8888
|
-
return
|
|
8889
|
-
|
|
8981
|
+
return u$6`
|
|
8982
|
+
${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
|
|
8983
|
+
<slot></slot>
|
|
8890
8984
|
`;
|
|
8891
8985
|
}
|
|
8892
8986
|
}
|