@aurodesignsystem-dev/auro-formkit 0.0.0-pr753.0 → 0.0.0-pr754.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/api.html +10 -16
- package/components/checkbox/demo/api.min.js +2 -2
- package/components/checkbox/demo/index.html +10 -16
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/demo/readme.html +9 -16
- package/components/checkbox/dist/index.js +2 -2
- package/components/checkbox/dist/registered.js +2 -2
- package/components/combobox/demo/api.min.js +36 -12
- package/components/combobox/demo/index.min.js +36 -12
- package/components/combobox/dist/index.js +1 -1
- package/components/combobox/dist/registered.js +1 -1
- package/components/counter/demo/api.min.js +1 -1
- package/components/counter/demo/index.min.js +1 -1
- package/components/counter/dist/index.js +1 -1
- package/components/counter/dist/registered.js +1 -1
- package/components/datepicker/demo/api.min.js +1 -1
- package/components/datepicker/demo/index.min.js +1 -1
- package/components/datepicker/dist/index.js +1 -1
- package/components/datepicker/dist/registered.js +1 -1
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/menu/demo/api.md +15 -14
- package/components/menu/demo/api.min.js +35 -11
- package/components/menu/demo/index.min.js +35 -11
- package/components/menu/dist/auro-menu.d.ts +12 -2
- package/components/menu/dist/index.js +35 -11
- package/components/menu/dist/registered.js +35 -11
- package/components/select/demo/api.md +34 -36
- package/components/select/demo/api.min.js +75 -192
- package/components/select/demo/index.min.js +75 -192
- package/components/select/dist/auro-select.d.ts +24 -6
- package/components/select/dist/index.js +40 -181
- package/components/select/dist/registered.js +40 -181
- package/package.json +24 -24
|
@@ -4131,7 +4131,7 @@ var colorCss$1$1 = css`:host(:not([ondark])) .wrapper{border-color:var(--ds-auro
|
|
|
4131
4131
|
|
|
4132
4132
|
var classicColorCss = css``;
|
|
4133
4133
|
|
|
4134
|
-
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([
|
|
4134
|
+
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
4135
4135
|
|
|
4136
4136
|
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
4137
4137
|
|
|
@@ -7541,67 +7541,6 @@ class AuroHelpText extends LitElement {
|
|
|
7541
7541
|
|
|
7542
7542
|
var helpTextVersion = '1.0.0';
|
|
7543
7543
|
|
|
7544
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding: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 [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
|
|
7545
|
-
|
|
7546
|
-
css`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
7547
|
-
|
|
7548
|
-
css`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
|
|
7549
|
-
|
|
7550
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7551
|
-
// See LICENSE in the project root for license information.
|
|
7552
|
-
|
|
7553
|
-
// ---------------------------------------------------------------------
|
|
7554
|
-
|
|
7555
|
-
/**
|
|
7556
|
-
* Converts value to an array.
|
|
7557
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
7558
|
-
* If the value is already an array, it is returned.
|
|
7559
|
-
* If the value is undefined, it returns undefined.
|
|
7560
|
-
* @private
|
|
7561
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
7562
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
7563
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
7564
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
7565
|
-
*/
|
|
7566
|
-
function arrayConverter(value) {
|
|
7567
|
-
// Allow undefined
|
|
7568
|
-
if (value === undefined) {
|
|
7569
|
-
return undefined;
|
|
7570
|
-
}
|
|
7571
|
-
|
|
7572
|
-
// Return the value if it is already an array
|
|
7573
|
-
if (Array.isArray(value)) {
|
|
7574
|
-
return value;
|
|
7575
|
-
}
|
|
7576
|
-
|
|
7577
|
-
try {
|
|
7578
|
-
// If value is a JSON string, parse it
|
|
7579
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
7580
|
-
|
|
7581
|
-
// Check if the parsed value is an array
|
|
7582
|
-
if (Array.isArray(parsed)) {
|
|
7583
|
-
return parsed;
|
|
7584
|
-
}
|
|
7585
|
-
} catch (error) {
|
|
7586
|
-
// If JSON parsing fails, continue to throw an error below
|
|
7587
|
-
/* eslint-disable no-console */
|
|
7588
|
-
console.error('JSON parsing failed:', error);
|
|
7589
|
-
}
|
|
7590
|
-
|
|
7591
|
-
// Throw error if the input is not an array or undefined
|
|
7592
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
7593
|
-
}
|
|
7594
|
-
|
|
7595
|
-
css`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem)}:host .wrapper[class*=-lg]:not(:last-child){margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem)}:host .wrapper[class*=-xl]:not(:last-child){margin-bottom:var(--ds-size-100, 0.5rem)}: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([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
7596
|
-
|
|
7597
|
-
css`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
7598
|
-
|
|
7599
|
-
css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
7600
|
-
|
|
7601
|
-
css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
7602
|
-
|
|
7603
|
-
css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
7604
|
-
|
|
7605
7544
|
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 8px 0 24px}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 8px}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
7606
7545
|
|
|
7607
7546
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -7933,11 +7872,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7933
7872
|
},
|
|
7934
7873
|
|
|
7935
7874
|
/**
|
|
7936
|
-
* Value selected for the component.
|
|
7937
|
-
* @type {String|Array<String>}
|
|
7875
|
+
* Value selected for the component.
|
|
7938
7876
|
*/
|
|
7939
7877
|
value: {
|
|
7940
|
-
type:
|
|
7878
|
+
type: String,
|
|
7879
|
+
reflect: true,
|
|
7880
|
+
attribute: 'value'
|
|
7941
7881
|
},
|
|
7942
7882
|
|
|
7943
7883
|
/**
|
|
@@ -7989,6 +7929,24 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7989
7929
|
];
|
|
7990
7930
|
}
|
|
7991
7931
|
|
|
7932
|
+
/**
|
|
7933
|
+
* Formatted value based on `multiSelect` state.
|
|
7934
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7935
|
+
* @returns {String|Array<String>}
|
|
7936
|
+
*/
|
|
7937
|
+
get formattedValue() {
|
|
7938
|
+
if (this.multiSelect) {
|
|
7939
|
+
if (!this.value) {
|
|
7940
|
+
return undefined;
|
|
7941
|
+
}
|
|
7942
|
+
if (this.value.startsWith("[")) {
|
|
7943
|
+
return JSON.parse(this.value);
|
|
7944
|
+
}
|
|
7945
|
+
return [this.value];
|
|
7946
|
+
}
|
|
7947
|
+
return this.value;
|
|
7948
|
+
}
|
|
7949
|
+
|
|
7992
7950
|
/**
|
|
7993
7951
|
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7994
7952
|
* @private
|
|
@@ -8407,14 +8365,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8407
8365
|
this.configureDropdown();
|
|
8408
8366
|
this.configureMenu();
|
|
8409
8367
|
this.configureSelect();
|
|
8410
|
-
|
|
8411
|
-
// Set the initial value in auro-menu if defined
|
|
8412
|
-
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
8413
|
-
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
8414
|
-
if (this.menu) {
|
|
8415
|
-
this.menu.value = this.value;
|
|
8416
|
-
}
|
|
8417
|
-
}
|
|
8418
8368
|
}
|
|
8419
8369
|
|
|
8420
8370
|
/**
|
|
@@ -8426,19 +8376,18 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8426
8376
|
async updateMenuValue(value) {
|
|
8427
8377
|
if (!this.menu) return;
|
|
8428
8378
|
|
|
8379
|
+
this.menu.setAttribute('value', value);
|
|
8429
8380
|
this.menu.value = value;
|
|
8430
8381
|
await this.menu.updateComplete;
|
|
8431
8382
|
}
|
|
8432
8383
|
|
|
8433
8384
|
async updated(changedProperties) {
|
|
8434
|
-
if (changedProperties.has('multiSelect')) {
|
|
8385
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
8435
8386
|
this.clearSelection();
|
|
8436
8387
|
}
|
|
8437
8388
|
|
|
8438
8389
|
if (changedProperties.has('value')) {
|
|
8439
8390
|
if (this.value) {
|
|
8440
|
-
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
8441
|
-
|
|
8442
8391
|
await this.updateMenuValue(this.value);
|
|
8443
8392
|
|
|
8444
8393
|
if (this.menu) {
|
|
@@ -8464,7 +8413,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8464
8413
|
composed: true,
|
|
8465
8414
|
detail: {
|
|
8466
8415
|
optionSelected: this.optionSelected,
|
|
8467
|
-
value: this.
|
|
8416
|
+
value: this.formattedValue
|
|
8468
8417
|
}
|
|
8469
8418
|
}));
|
|
8470
8419
|
}
|
|
@@ -8523,13 +8472,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8523
8472
|
const selectedValue = selectedOption.value;
|
|
8524
8473
|
|
|
8525
8474
|
if (this.multiSelect) {
|
|
8526
|
-
const currentArray =
|
|
8475
|
+
const currentArray = this.formattedValue;
|
|
8527
8476
|
|
|
8528
8477
|
if (!currentArray.includes(selectedValue)) {
|
|
8529
|
-
this.value = [
|
|
8478
|
+
this.value = JSON.stringify([
|
|
8530
8479
|
...currentArray,
|
|
8531
8480
|
selectedValue
|
|
8532
|
-
];
|
|
8481
|
+
]);
|
|
8533
8482
|
}
|
|
8534
8483
|
} else {
|
|
8535
8484
|
const currentValue = this.value;
|
|
@@ -8552,12 +8501,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8552
8501
|
}
|
|
8553
8502
|
|
|
8554
8503
|
if (this.multiSelect) {
|
|
8555
|
-
nativeSelect.value = this.
|
|
8504
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
8556
8505
|
} else {
|
|
8557
8506
|
nativeSelect.value = this.value || '';
|
|
8558
8507
|
}
|
|
8559
8508
|
}
|
|
8560
8509
|
|
|
8510
|
+
/**
|
|
8511
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8512
|
+
* @private
|
|
8513
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8514
|
+
*/
|
|
8561
8515
|
renderAriaHtml() {
|
|
8562
8516
|
return html`
|
|
8563
8517
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -8578,6 +8532,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8578
8532
|
`;
|
|
8579
8533
|
}
|
|
8580
8534
|
|
|
8535
|
+
/**
|
|
8536
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8537
|
+
* @private
|
|
8538
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8539
|
+
*/
|
|
8581
8540
|
renderNativeSelect() {
|
|
8582
8541
|
return html`
|
|
8583
8542
|
<div class="nativeSelectWrapper util_displayHidden">
|
|
@@ -8907,106 +8866,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
8907
8866
|
|
|
8908
8867
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
8909
8868
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
8910
|
-
|
|
8911
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
8912
|
-
renderBACKUP() {
|
|
8913
|
-
const placeholderClass = {
|
|
8914
|
-
hidden: this.value,
|
|
8915
|
-
};
|
|
8916
|
-
|
|
8917
|
-
return html`
|
|
8918
|
-
<div class="outerWrapper">
|
|
8919
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
8920
|
-
${this.optionActive && this.options.length > 0
|
|
8921
|
-
? html`
|
|
8922
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
8923
|
-
`
|
|
8924
|
-
: undefined
|
|
8925
|
-
};
|
|
8926
|
-
|
|
8927
|
-
${this.optionSelected && this.options.length > 0
|
|
8928
|
-
? html`
|
|
8929
|
-
${`${this.optionSelected.innerText} selected`}
|
|
8930
|
-
`
|
|
8931
|
-
: undefined
|
|
8932
|
-
};
|
|
8933
|
-
</div>
|
|
8934
|
-
<div id="slotHolder" aria-hidden="true">
|
|
8935
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8936
|
-
</div>
|
|
8937
|
-
<${this.dropdownTag}
|
|
8938
|
-
?autoPlacement="${this.autoPlacement}"
|
|
8939
|
-
?disabled="${this.disabled}"
|
|
8940
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8941
|
-
?matchWidth="${this.matchWidth}"
|
|
8942
|
-
?noFlip="${this.noFlip}"
|
|
8943
|
-
?onDark="${this.onDark}"
|
|
8944
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8945
|
-
.offset="${this.offset}"
|
|
8946
|
-
.placement="${this.placement}"
|
|
8947
|
-
chevron
|
|
8948
|
-
fluid
|
|
8949
|
-
for="selectMenu"
|
|
8950
|
-
layout="${this.layout}"
|
|
8951
|
-
part="dropdown"
|
|
8952
|
-
shape="${this.shape}"
|
|
8953
|
-
size="${this.size}">
|
|
8954
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
8955
|
-
<span id="placeholder"
|
|
8956
|
-
class="${classMap(placeholderClass)}"
|
|
8957
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
8958
|
-
>
|
|
8959
|
-
<slot name="placeholder"></slot>
|
|
8960
|
-
</span>
|
|
8961
|
-
<slot name="valueText" id="valueText"></slot>
|
|
8962
|
-
</span>
|
|
8963
|
-
|
|
8964
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8965
|
-
<slot></slot>
|
|
8966
|
-
</${this.bibtemplateTag}>
|
|
8967
|
-
<slot name="label" slot="label"></slot>
|
|
8968
|
-
${this.required ? undefined : html`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8969
|
-
<p slot="helpText">
|
|
8970
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
8971
|
-
? html`
|
|
8972
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
8973
|
-
<slot name="helpText"></slot>
|
|
8974
|
-
</span>`
|
|
8975
|
-
: html`
|
|
8976
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
8977
|
-
${this.errorMessage}
|
|
8978
|
-
</span>`
|
|
8979
|
-
}
|
|
8980
|
-
</p>
|
|
8981
|
-
</${this.dropdownTag}>
|
|
8982
|
-
<div class="nativeSelectWrapper">
|
|
8983
|
-
<select
|
|
8984
|
-
tabindex="-1"
|
|
8985
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
8986
|
-
name="${this.name || ''}"
|
|
8987
|
-
?disabled="${this.disabled}"
|
|
8988
|
-
?required="${this.required}"
|
|
8989
|
-
aria-hidden="true"
|
|
8990
|
-
autocomplete="${ifDefined$1(this.autocomplete)}"
|
|
8991
|
-
@change="${this._handleNativeSelectChange}">
|
|
8992
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
8993
|
-
${this.options.map((option) => {
|
|
8994
|
-
const optionValue = option.value || option.textContent;
|
|
8995
|
-
return html`
|
|
8996
|
-
<option
|
|
8997
|
-
value="${optionValue}"
|
|
8998
|
-
?selected="${this.value === optionValue}">
|
|
8999
|
-
${option.textContent}
|
|
9000
|
-
</option>
|
|
9001
|
-
`;
|
|
9002
|
-
})}
|
|
9003
|
-
</select>
|
|
9004
|
-
</div>
|
|
9005
|
-
<!-- Help text and error message template -->
|
|
9006
|
-
${this.renderHtmlHelpText()}
|
|
9007
|
-
</div>
|
|
9008
|
-
`;
|
|
9009
|
-
}
|
|
9010
8869
|
}
|
|
9011
8870
|
|
|
9012
8871
|
AuroSelect.register();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem-dev/auro-formkit",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-pr754.1",
|
|
4
4
|
"description": "A collection of web components used to build forms.",
|
|
5
5
|
"homepage": "https://github.com/AlaskaAirlines/auro-formkit#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": "^20.x || ^22.x"
|
|
17
17
|
},
|
|
18
|
-
"packageManager": "npm@11.
|
|
18
|
+
"packageManager": "npm@11.4.2",
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
@@ -62,45 +62,45 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@aurodesignsystem/design-tokens": "^8.2.1",
|
|
64
64
|
"@aurodesignsystem/eslint-config": "^1.3.4",
|
|
65
|
-
"@aurodesignsystem/webcorestylesheets": "
|
|
66
|
-
"@commitlint/cli": "^19.8.
|
|
67
|
-
"@commitlint/config-conventional": "^19.8.
|
|
65
|
+
"@aurodesignsystem/webcorestylesheets": "^9.0.3",
|
|
66
|
+
"@commitlint/cli": "^19.8.1",
|
|
67
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
68
68
|
"@open-wc/testing": "^4.0.0",
|
|
69
69
|
"@semantic-release/changelog": "^6.0.3",
|
|
70
70
|
"@semantic-release/git": "^10.0.1",
|
|
71
|
-
"@semantic-release/npm": "^12.0.
|
|
72
|
-
"@types/chai": "^5.2.
|
|
71
|
+
"@semantic-release/npm": "^12.0.2",
|
|
72
|
+
"@types/chai": "^5.2.2",
|
|
73
73
|
"@types/mocha": "^10.0.10",
|
|
74
74
|
"@web/dev-server": "^0.4.6",
|
|
75
75
|
"@web/dev-server-hmr": "^0.4.1",
|
|
76
|
-
"@web/test-runner": "^0.20.
|
|
76
|
+
"@web/test-runner": "^0.20.2",
|
|
77
77
|
"autoprefixer": "^10.4.21",
|
|
78
78
|
"babel-loader": "^10.0.0",
|
|
79
79
|
"compression": "^1.8.0",
|
|
80
80
|
"concat": "^1.0.3",
|
|
81
|
-
"concurrently": "^9.
|
|
81
|
+
"concurrently": "^9.2.0",
|
|
82
82
|
"copyfiles": "^2.4.1",
|
|
83
|
-
"core-js": "^3.
|
|
84
|
-
"eslint": "^9.
|
|
85
|
-
"eslint-plugin-jsdoc": "^
|
|
83
|
+
"core-js": "^3.43.0",
|
|
84
|
+
"eslint": "^9.30.0",
|
|
85
|
+
"eslint-plugin-jsdoc": "^51.3.1",
|
|
86
86
|
"husky": "^9.1.7",
|
|
87
87
|
"lodash": "^4.17.21",
|
|
88
88
|
"markdown-magic": "^3.4.1",
|
|
89
|
-
"nodemon": "^3.1.
|
|
89
|
+
"nodemon": "^3.1.10",
|
|
90
90
|
"npm-run-all": "^4.1.5",
|
|
91
|
-
"postcss": "^8.5.
|
|
92
|
-
"postcss-custom-properties": "^14.0.
|
|
93
|
-
"postcss-discard-comments": "^7.0.
|
|
94
|
-
"prettier": "^3.
|
|
95
|
-
"sass": "^1.
|
|
96
|
-
"semantic-release": "^24.2.
|
|
97
|
-
"stylelint": "^16.
|
|
91
|
+
"postcss": "^8.5.6",
|
|
92
|
+
"postcss-custom-properties": "^14.0.6",
|
|
93
|
+
"postcss-discard-comments": "^7.0.4",
|
|
94
|
+
"prettier": "^3.6.2",
|
|
95
|
+
"sass": "^1.89.2",
|
|
96
|
+
"semantic-release": "^24.2.6",
|
|
97
|
+
"stylelint": "^16.21.0",
|
|
98
98
|
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
99
99
|
"stylelint-config-standard": "^38.0.0",
|
|
100
|
-
"stylelint-config-standard-scss": "^
|
|
101
|
-
"stylelint-order": "^
|
|
102
|
-
"stylelint-scss": "^6.
|
|
103
|
-
"turbo": "^2.5.
|
|
100
|
+
"stylelint-config-standard-scss": "^15.0.1",
|
|
101
|
+
"stylelint-order": "^7.0.0",
|
|
102
|
+
"stylelint-scss": "^6.12.1",
|
|
103
|
+
"turbo": "^2.5.4",
|
|
104
104
|
"typescript": "^5.8.3",
|
|
105
105
|
"whatwg-fetch": "^3.6.20",
|
|
106
106
|
"yaml-lint": "^1.7.0"
|