@aurodesignsystem-dev/auro-formkit 0.0.0-pr784.0 → 0.0.0-pr784.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/combobox/demo/api.min.js +41 -37
- package/components/combobox/demo/index.min.js +41 -37
- package/components/combobox/dist/index.js +40 -36
- package/components/combobox/dist/registered.js +40 -36
- package/components/counter/demo/api.min.js +34 -17
- package/components/counter/demo/index.min.js +34 -17
- package/components/counter/dist/index.js +34 -17
- package/components/counter/dist/registered.js +34 -17
- package/components/datepicker/demo/api.md +0 -1
- package/components/datepicker/demo/api.min.js +100 -37
- package/components/datepicker/demo/index.min.js +100 -37
- package/components/datepicker/dist/auro-datepicker.d.ts +19 -1
- package/components/datepicker/dist/index.js +100 -37
- package/components/datepicker/dist/registered.js +100 -37
- package/components/dropdown/demo/api.min.js +33 -16
- package/components/dropdown/demo/index.min.js +33 -16
- package/components/dropdown/dist/auro-dropdown.d.ts +6 -0
- package/components/dropdown/dist/index.js +33 -16
- package/components/dropdown/dist/registered.js +33 -16
- package/components/input/demo/api.min.js +7 -18
- package/components/input/demo/index.min.js +7 -18
- package/components/input/dist/auro-input.d.ts +0 -6
- package/components/input/dist/index.js +7 -18
- package/components/input/dist/registered.js +7 -18
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +35 -18
- package/components/select/demo/index.min.js +35 -18
- package/components/select/dist/index.js +34 -17
- package/components/select/dist/registered.js +34 -17
- package/package.json +2 -2
|
@@ -2687,7 +2687,7 @@ class AuroFloatingUI {
|
|
|
2687
2687
|
*/
|
|
2688
2688
|
mirrorSize() {
|
|
2689
2689
|
// mirror the boxsize from bibSizer
|
|
2690
|
-
if (this.element.bibSizer) {
|
|
2690
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2691
2691
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2692
2692
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2693
2693
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2899,13 +2899,13 @@ class AuroFloatingUI {
|
|
|
2899
2899
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2900
2900
|
return;
|
|
2901
2901
|
}
|
|
2902
|
-
|
|
2902
|
+
|
|
2903
2903
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2904
2904
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2905
2905
|
return;
|
|
2906
2906
|
}
|
|
2907
2907
|
|
|
2908
|
-
this.hideBib();
|
|
2908
|
+
this.hideBib("keydown");
|
|
2909
2909
|
}
|
|
2910
2910
|
|
|
2911
2911
|
setupHideHandlers() {
|
|
@@ -2930,7 +2930,7 @@ class AuroFloatingUI {
|
|
|
2930
2930
|
document.expandedAuroFormkitDropdown = null;
|
|
2931
2931
|
document.expandedAuroFloater = this;
|
|
2932
2932
|
} else {
|
|
2933
|
-
this.hideBib();
|
|
2933
|
+
this.hideBib("click");
|
|
2934
2934
|
}
|
|
2935
2935
|
}
|
|
2936
2936
|
};
|
|
@@ -2943,7 +2943,7 @@ class AuroFloatingUI {
|
|
|
2943
2943
|
// if something else is open, let it handle itself
|
|
2944
2944
|
return;
|
|
2945
2945
|
}
|
|
2946
|
-
this.hideBib();
|
|
2946
|
+
this.hideBib("keydown");
|
|
2947
2947
|
}
|
|
2948
2948
|
};
|
|
2949
2949
|
|
|
@@ -3026,7 +3026,11 @@ class AuroFloatingUI {
|
|
|
3026
3026
|
}
|
|
3027
3027
|
}
|
|
3028
3028
|
|
|
3029
|
-
|
|
3029
|
+
/**
|
|
3030
|
+
* Hides the floating UI element.
|
|
3031
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3032
|
+
*/
|
|
3033
|
+
hideBib(eventType = "unknown") {
|
|
3030
3034
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3031
3035
|
this.lockScroll(false);
|
|
3032
3036
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3037,7 +3041,7 @@ class AuroFloatingUI {
|
|
|
3037
3041
|
if (this.showing) {
|
|
3038
3042
|
this.cleanupHideHandlers();
|
|
3039
3043
|
this.showing = false;
|
|
3040
|
-
this.dispatchEventDropdownToggle();
|
|
3044
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3041
3045
|
}
|
|
3042
3046
|
}
|
|
3043
3047
|
document.expandedAuroFloater = null;
|
|
@@ -3046,11 +3050,13 @@ class AuroFloatingUI {
|
|
|
3046
3050
|
/**
|
|
3047
3051
|
* @private
|
|
3048
3052
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3053
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3049
3054
|
*/
|
|
3050
|
-
dispatchEventDropdownToggle() {
|
|
3055
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3051
3056
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3052
3057
|
detail: {
|
|
3053
3058
|
expanded: this.showing,
|
|
3059
|
+
eventType: eventType || "unknown",
|
|
3054
3060
|
},
|
|
3055
3061
|
composed: true
|
|
3056
3062
|
});
|
|
@@ -3060,7 +3066,7 @@ class AuroFloatingUI {
|
|
|
3060
3066
|
|
|
3061
3067
|
handleClick() {
|
|
3062
3068
|
if (this.element.isPopoverVisible) {
|
|
3063
|
-
this.hideBib();
|
|
3069
|
+
this.hideBib("click");
|
|
3064
3070
|
} else {
|
|
3065
3071
|
this.showBib();
|
|
3066
3072
|
}
|
|
@@ -3087,7 +3093,7 @@ class AuroFloatingUI {
|
|
|
3087
3093
|
|
|
3088
3094
|
event.preventDefault();
|
|
3089
3095
|
this.handleClick();
|
|
3090
|
-
}
|
|
3096
|
+
}
|
|
3091
3097
|
break;
|
|
3092
3098
|
case 'mouseenter':
|
|
3093
3099
|
if (this.element.hoverToggle) {
|
|
@@ -3096,7 +3102,7 @@ class AuroFloatingUI {
|
|
|
3096
3102
|
break;
|
|
3097
3103
|
case 'mouseleave':
|
|
3098
3104
|
if (this.element.hoverToggle) {
|
|
3099
|
-
this.hideBib();
|
|
3105
|
+
this.hideBib("mouseleave");
|
|
3100
3106
|
}
|
|
3101
3107
|
break;
|
|
3102
3108
|
case 'focus':
|
|
@@ -4484,6 +4490,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4484
4490
|
|
|
4485
4491
|
this.parentBorder = false;
|
|
4486
4492
|
|
|
4493
|
+
/** @private */
|
|
4494
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4495
|
+
|
|
4487
4496
|
this.privateDefaults();
|
|
4488
4497
|
}
|
|
4489
4498
|
|
|
@@ -4917,12 +4926,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4917
4926
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4918
4927
|
this.handleTriggerContentSlotChange();
|
|
4919
4928
|
}
|
|
4929
|
+
}
|
|
4920
4930
|
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4931
|
+
/**
|
|
4932
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
4933
|
+
* @private
|
|
4934
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
4935
|
+
*/
|
|
4936
|
+
handleDropdownToggle(event) {
|
|
4937
|
+
this.updateFocusTrap();
|
|
4938
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4939
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4940
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4941
|
+
this.trigger.focus();
|
|
4926
4942
|
}
|
|
4927
4943
|
}
|
|
4928
4944
|
|
|
@@ -4930,6 +4946,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4930
4946
|
|
|
4931
4947
|
// Configure the floater to, this will generate the ID for the bib
|
|
4932
4948
|
this.floater.configure(this, 'auroDropdown');
|
|
4949
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4933
4950
|
|
|
4934
4951
|
/**
|
|
4935
4952
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -7510,7 +7527,7 @@ class AuroHelpText extends LitElement {
|
|
|
7510
7527
|
|
|
7511
7528
|
var helpTextVersion = '1.0.0';
|
|
7512
7529
|
|
|
7513
|
-
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:var(--ds-size-
|
|
7530
|
+
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:var(--ds-size-100, 0.5rem)}.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 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}: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 var(--ds-size-100, 0.5rem)}: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]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
7514
7531
|
|
|
7515
7532
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7516
7533
|
// See LICENSE in the project root for license information.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aurodesignsystem-dev/auro-formkit",
|
|
3
|
-
"version": "0.0.0-pr784.
|
|
3
|
+
"version": "0.0.0-pr784.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": {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"local-demo": "npm run build && sh ./local-demo.sh --zip"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@aurodesignsystem/auro-library": "^5.
|
|
56
|
+
"@aurodesignsystem/auro-library": "^5.3.0",
|
|
57
57
|
"@lit/reactive-element": "^2.1.0",
|
|
58
58
|
"lit": "^3.2.1"
|
|
59
59
|
},
|