@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.77 → 0.0.0-pr624.79
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.min.js +2 -2
- package/components/checkbox/demo/index.min.js +2 -2
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +6 -61
- package/components/combobox/demo/index.min.js +6 -61
- package/components/combobox/dist/index.js +5 -60
- package/components/combobox/dist/registered.js +5 -60
- package/components/counter/demo/api.min.js +6 -61
- package/components/counter/demo/index.min.js +6 -61
- package/components/counter/dist/index.js +5 -60
- package/components/counter/dist/registered.js +5 -60
- package/components/datepicker/demo/api.min.js +74 -95
- package/components/datepicker/demo/index.min.js +74 -95
- package/components/datepicker/dist/auro-datepicker.d.ts +14 -1
- package/components/datepicker/dist/index.js +73 -94
- package/components/datepicker/dist/registered.js +73 -94
- package/components/dropdown/demo/api.min.js +6 -61
- package/components/dropdown/demo/index.min.js +6 -61
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -7
- package/components/dropdown/dist/index.js +5 -60
- package/components/dropdown/dist/registered.js +5 -60
- package/components/form/demo/api.min.js +1 -1
- package/components/form/demo/index.min.js +1 -1
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/radio/demo/api.min.js +2 -2
- package/components/radio/demo/index.min.js +2 -2
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +6 -61
- package/components/select/demo/index.min.js +6 -61
- package/components/select/dist/index.js +5 -60
- package/components/select/dist/registered.js +5 -60
- package/package.json +4 -4
|
@@ -1133,7 +1133,7 @@ const t$1=globalThis,e$1=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.na
|
|
|
1133
1133
|
* @license
|
|
1134
1134
|
* Copyright 2017 Google LLC
|
|
1135
1135
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1136
|
-
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$1}=Object,a=globalThis,c$1=a.trustedTypes,l=c$1?c$1.emptyScript:"",p$1=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e
|
|
1136
|
+
*/const{is:i$1,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r$2,getOwnPropertySymbols:o$3,getPrototypeOf:n$1}=Object,a=globalThis,c$1=a.trustedTypes,l=c$1?c$1.emptyScript:"",p$1=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f=(t,s)=>!i$1(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=n$1(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...r$2(t),...o$3(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map,y[d("finalized")]=new Map,p$1?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.1");
|
|
1137
1137
|
|
|
1138
1138
|
/**
|
|
1139
1139
|
* @license
|
|
@@ -1297,7 +1297,7 @@ class UtilitiesCalendarRender {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
1299
1299
|
|
|
1300
|
-
var styleCss$e = i$2`.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}.accents{flex-grow:0;flex-shrink:0;display:flex;align-items:center;justify-content:center}.accents.left{padding-right:var(--ds-size-100, 0.5rem)}.accents.right{width:var(--ds-size-400, 2rem)}.mainContent{height:100%;max-height:100%;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;margin:0 auto}.inputContainer{display:flex;flex-direction:row;align-items:center;width:100%}.inputContainer:first-of-type{justify-content:flex-end}.inputContainer:last-of-type{justify-content:flex-start}.dpTriggerContent{width:100%}@media screen and (max-width: 576px){::part(popover){position:fixed !important;top:0 !important;left:0 !important;width:100vw !important;height:100vh !important;margin-bottom:var(--ds-size-200, 1rem);transform:unset !important}.calendarWrapper{display:flex;height:100dvh;flex-direction:row;justify-content:center}}`;
|
|
1300
|
+
var styleCss$e = i$2`.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}.accents{flex-grow:0;flex-shrink:0;display:flex;align-items:center;justify-content:center}.accents.left{padding-right:var(--ds-size-100, 0.5rem)}.accents.right{width:var(--ds-size-400, 2rem)}.accents .notification:not(.util_displayHidden){display:flex;align-items:center;justify-content:center}.mainContent{height:100%;max-height:100%;flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center;overflow:hidden}.inputSection{display:flex;flex-direction:row;align-items:center;width:100%;margin:0 auto}.inputContainer{display:flex;flex-direction:row;align-items:center;width:100%}.inputContainer:first-of-type{justify-content:flex-end}.inputContainer:last-of-type{justify-content:flex-start}.dpTriggerContent{width:100%}@media screen and (max-width: 576px){::part(popover){position:fixed !important;top:0 !important;left:0 !important;width:100vw !important;height:100vh !important;margin-bottom:var(--ds-size-200, 1rem);transform:unset !important}.calendarWrapper{display:flex;height:100dvh;flex-direction:row;justify-content:center}}`;
|
|
1301
1301
|
|
|
1302
1302
|
var colorCss$d = i$2`.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}:host label{color:var(--ds-auro-datepicker-label-text-color)}:host .inputDivider{background-color:var(--ds-auro-datepicker-range-input-divider-color)}:host .error{color:var(--ds-auro-datepicker-error-icon-color)}[auro-input]::part(wrapper){--ds-auro-input-border-color: transparent;--ds-auro-input-container-color: transparent}.dpTriggerContent [auro-input]:nth-child(2):before{background-color:var(--ds-auro-datepicker-range-input-divider-color)}:host(:not([ondark])[disabled]){--ds-auro-datepicker-border-color: var(--ds-basic-color-border-subtle, #dddddd);--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-datepicker-placeholder-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([ondark][disabled]){--ds-auro-datepicker-border-color: var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-datepicker-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-datepicker-placeholder-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
1303
1303
|
|
|
@@ -16142,6 +16142,7 @@ class AuroFloatingUI {
|
|
|
16142
16142
|
this.element.bib.style.left = "0px";
|
|
16143
16143
|
this.element.bib.style.width = '';
|
|
16144
16144
|
this.element.bib.style.height = '';
|
|
16145
|
+
this.element.style.contain = '';
|
|
16145
16146
|
|
|
16146
16147
|
// reset the size that was mirroring `size` css-part
|
|
16147
16148
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -16166,6 +16167,7 @@ class AuroFloatingUI {
|
|
|
16166
16167
|
this.element.bib.style.position = '';
|
|
16167
16168
|
this.element.bib.removeAttribute('isfullscreen');
|
|
16168
16169
|
this.element.isBibFullscreen = false;
|
|
16170
|
+
this.element.style.contain = 'layout';
|
|
16169
16171
|
}
|
|
16170
16172
|
|
|
16171
16173
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -17780,6 +17782,7 @@ let AuroElement$4 = class AuroElement extends i {
|
|
|
17780
17782
|
// See LICENSE in the project root for license information.
|
|
17781
17783
|
|
|
17782
17784
|
|
|
17785
|
+
|
|
17783
17786
|
/*
|
|
17784
17787
|
* @slot - Default slot for the popover content.
|
|
17785
17788
|
* @slot helpText - Defines the content of the helpText.
|
|
@@ -18362,64 +18365,6 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
18362
18365
|
this.hasFocus = false;
|
|
18363
18366
|
}
|
|
18364
18367
|
|
|
18365
|
-
/**
|
|
18366
|
-
* Determines if the element or any children are focusable.
|
|
18367
|
-
* @private
|
|
18368
|
-
* @param {HTMLElement} element - Element to check.
|
|
18369
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
18370
|
-
*/
|
|
18371
|
-
containsFocusableElement(element) {
|
|
18372
|
-
this.showTriggerBorders = true;
|
|
18373
|
-
|
|
18374
|
-
const nodes = [
|
|
18375
|
-
element,
|
|
18376
|
-
...element.children
|
|
18377
|
-
];
|
|
18378
|
-
|
|
18379
|
-
const focusableElements = [
|
|
18380
|
-
'a',
|
|
18381
|
-
'auro-hyperlink',
|
|
18382
|
-
'button',
|
|
18383
|
-
'auro-button',
|
|
18384
|
-
'input',
|
|
18385
|
-
'auro-input',
|
|
18386
|
-
];
|
|
18387
|
-
|
|
18388
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
18389
|
-
|
|
18390
|
-
const result = nodes.some((node) => {
|
|
18391
|
-
const tagName = node.tagName.toLowerCase();
|
|
18392
|
-
|
|
18393
|
-
if (node.tabIndex > -1) {
|
|
18394
|
-
return true;
|
|
18395
|
-
}
|
|
18396
|
-
|
|
18397
|
-
if (focusableElements.includes(tagName)) {
|
|
18398
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
18399
|
-
return true;
|
|
18400
|
-
}
|
|
18401
|
-
if (!node.hasAttribute('disabled')) {
|
|
18402
|
-
return true;
|
|
18403
|
-
}
|
|
18404
|
-
}
|
|
18405
|
-
|
|
18406
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
18407
|
-
return true;
|
|
18408
|
-
}
|
|
18409
|
-
|
|
18410
|
-
return false;
|
|
18411
|
-
});
|
|
18412
|
-
|
|
18413
|
-
if (result) {
|
|
18414
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
18415
|
-
const tagName = node.tagName.toLowerCase();
|
|
18416
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
18417
|
-
});
|
|
18418
|
-
}
|
|
18419
|
-
|
|
18420
|
-
return result;
|
|
18421
|
-
}
|
|
18422
|
-
|
|
18423
18368
|
/**
|
|
18424
18369
|
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
18425
18370
|
* @private
|
|
@@ -18531,7 +18476,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
18531
18476
|
if (triggerContentNodes) {
|
|
18532
18477
|
|
|
18533
18478
|
// See if any of them are focusable elements
|
|
18534
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
18479
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
18535
18480
|
|
|
18536
18481
|
// If any of them are focusable elements
|
|
18537
18482
|
if (this.triggerContentFocusable) {
|
|
@@ -18603,7 +18548,7 @@ class AuroDropdown extends AuroElement$4 {
|
|
|
18603
18548
|
<div
|
|
18604
18549
|
id="trigger"
|
|
18605
18550
|
class="${e$2(this.commonWrapperClasses)}" part="wrapper"
|
|
18606
|
-
tabindex="${this.tabIndex}"
|
|
18551
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
18607
18552
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
18608
18553
|
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
18609
18554
|
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -27951,6 +27896,9 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
27951
27896
|
*/
|
|
27952
27897
|
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
27953
27898
|
|
|
27899
|
+
/** @private */
|
|
27900
|
+
this.handleClick = this.handleClick.bind(this);
|
|
27901
|
+
|
|
27954
27902
|
// Layout Config
|
|
27955
27903
|
this.layout = 'classic';
|
|
27956
27904
|
this.shape = 'classic';
|
|
@@ -28350,10 +28298,10 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28350
28298
|
* @returns {void}
|
|
28351
28299
|
*/
|
|
28352
28300
|
focus(focusInput = '') {
|
|
28301
|
+
this.hasFocus = true;
|
|
28353
28302
|
this.range && focusInput === 'endDate' ? this.inputList[1].focus() : this.inputList[0].focus();
|
|
28354
28303
|
}
|
|
28355
28304
|
|
|
28356
|
-
|
|
28357
28305
|
/**
|
|
28358
28306
|
* Converts valid time number to format used by wc-date-range API.
|
|
28359
28307
|
* @private
|
|
@@ -28555,15 +28503,18 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28555
28503
|
this.hasFocus = true;
|
|
28556
28504
|
});
|
|
28557
28505
|
|
|
28558
|
-
this.addEventListener('focusout', (
|
|
28506
|
+
this.addEventListener('focusout', () => {
|
|
28559
28507
|
this.hasFocus = false;
|
|
28560
|
-
if (!this.noValidate && !evt.detail.expanded && this.touched) {
|
|
28561
|
-
if (!this.contains(document.activeElement)) {
|
|
28562
|
-
this.validation.validate(this.inputList[0]);
|
|
28563
28508
|
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28509
|
+
if (this.noValidate) {
|
|
28510
|
+
return;
|
|
28511
|
+
}
|
|
28512
|
+
|
|
28513
|
+
if (!this.contains(document.activeElement)) {
|
|
28514
|
+
this.validation.validate(this.inputList[0]);
|
|
28515
|
+
|
|
28516
|
+
if (this.inputList[1]) {
|
|
28517
|
+
this.validation.validate(this.inputList[1]);
|
|
28567
28518
|
}
|
|
28568
28519
|
}
|
|
28569
28520
|
});
|
|
@@ -28815,8 +28766,8 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28815
28766
|
this.calendarRenderUtil.updateCentralDate(this, this.formattedValue);
|
|
28816
28767
|
}
|
|
28817
28768
|
|
|
28818
|
-
this.validate();
|
|
28819
28769
|
this.setHasValue();
|
|
28770
|
+
this.validate();
|
|
28820
28771
|
}
|
|
28821
28772
|
|
|
28822
28773
|
if (changedProperties.has('valueEnd') && this.inputList[1]) {
|
|
@@ -28972,6 +28923,39 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28972
28923
|
this.calendar.injectSlot(event.target.name, slot.cloneNode(true));
|
|
28973
28924
|
}
|
|
28974
28925
|
|
|
28926
|
+
/**
|
|
28927
|
+
* Handles click events on the datepicker.
|
|
28928
|
+
* @param {PointerEvent} event - The pointer event object.
|
|
28929
|
+
* @private
|
|
28930
|
+
* @returns {void}
|
|
28931
|
+
*/
|
|
28932
|
+
handleClick(event) {
|
|
28933
|
+
|
|
28934
|
+
// Get the initial target of the click event
|
|
28935
|
+
const [initTarget] = event.composedPath();
|
|
28936
|
+
|
|
28937
|
+
// Determine if the current layout requires special handling
|
|
28938
|
+
const layoutRequiresHandling = ['snowflake'].includes(this.layout);
|
|
28939
|
+
|
|
28940
|
+
// Determine if the target is an input element
|
|
28941
|
+
const targetIsInput = initTarget.tagName === 'INPUT';
|
|
28942
|
+
|
|
28943
|
+
if (layoutRequiresHandling && !targetIsInput) {
|
|
28944
|
+
|
|
28945
|
+
// Focus the first input
|
|
28946
|
+
this.inputList[0].focus();
|
|
28947
|
+
}
|
|
28948
|
+
}
|
|
28949
|
+
|
|
28950
|
+
/**
|
|
28951
|
+
* Set up click handling for the datepicker.
|
|
28952
|
+
* @private
|
|
28953
|
+
* @returns {void}
|
|
28954
|
+
*/
|
|
28955
|
+
configureClickHandler() {
|
|
28956
|
+
this.addEventListener('click', this.handleClick);
|
|
28957
|
+
}
|
|
28958
|
+
|
|
28975
28959
|
firstUpdated() {
|
|
28976
28960
|
// Add the tag name as an attribute if it is different than the component name
|
|
28977
28961
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-datepicker');
|
|
@@ -28980,6 +28964,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28980
28964
|
this.configureInput();
|
|
28981
28965
|
this.configureCalendar();
|
|
28982
28966
|
this.configureDatepicker();
|
|
28967
|
+
this.configureClickHandler();
|
|
28983
28968
|
|
|
28984
28969
|
window.addEventListener('resize', () => {
|
|
28985
28970
|
this.handleReadOnly();
|
|
@@ -28990,11 +28975,6 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
28990
28975
|
super.connectedCallback();
|
|
28991
28976
|
|
|
28992
28977
|
this.monthFirst = this.format.indexOf('mm') < this.format.indexOf('yyyy');
|
|
28993
|
-
|
|
28994
|
-
// setup focus/blur event listeners
|
|
28995
|
-
this.addEventListener('focus', () => {
|
|
28996
|
-
this.focus();
|
|
28997
|
-
}, true);
|
|
28998
28978
|
}
|
|
28999
28979
|
|
|
29000
28980
|
// layout render methods
|
|
@@ -29039,9 +29019,9 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29039
29019
|
</div>
|
|
29040
29020
|
<div class="accents right ${e$2(accentsClassMap)}">
|
|
29041
29021
|
${this.hasError
|
|
29042
|
-
|
|
29043
|
-
|
|
29044
|
-
|
|
29022
|
+
? this.renderHtmlIconError()
|
|
29023
|
+
: this.renderHtmlActionClear()
|
|
29024
|
+
}
|
|
29045
29025
|
</div>
|
|
29046
29026
|
</div>
|
|
29047
29027
|
`;
|
|
@@ -29086,9 +29066,9 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29086
29066
|
</div>
|
|
29087
29067
|
<div class="accents right ${e$2(accentsClassMap)}">
|
|
29088
29068
|
${this.hasError
|
|
29089
|
-
|
|
29090
|
-
|
|
29091
|
-
|
|
29069
|
+
? this.renderHtmlIconError()
|
|
29070
|
+
: this.renderHtmlActionClear()
|
|
29071
|
+
}
|
|
29092
29072
|
</div>
|
|
29093
29073
|
</div>
|
|
29094
29074
|
`;
|
|
@@ -29138,9 +29118,9 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29138
29118
|
<div>
|
|
29139
29119
|
<div class="displayValueText">
|
|
29140
29120
|
${dateValue && this.util.validDateStr(dateValue, this.format)
|
|
29141
|
-
|
|
29142
|
-
|
|
29143
|
-
|
|
29121
|
+
? this.formatShortDate(dateValue)
|
|
29122
|
+
: undefined
|
|
29123
|
+
}
|
|
29144
29124
|
</div>
|
|
29145
29125
|
</div>
|
|
29146
29126
|
`;
|
|
@@ -29182,13 +29162,13 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29182
29162
|
inputmode="${o(this.inputmode)}"
|
|
29183
29163
|
>
|
|
29184
29164
|
${this.layout !== "classic"
|
|
29185
|
-
|
|
29165
|
+
? u$3`
|
|
29186
29166
|
<span slot="displayValue">
|
|
29187
29167
|
${this.renderDisplayTextDate(this.value)}
|
|
29188
29168
|
</span>
|
|
29189
29169
|
`
|
|
29190
|
-
|
|
29191
|
-
|
|
29170
|
+
: undefined
|
|
29171
|
+
}
|
|
29192
29172
|
<span slot="label"><slot name="fromLabel"></slot></span>
|
|
29193
29173
|
</${this.inputTag}>
|
|
29194
29174
|
</div>
|
|
@@ -29219,13 +29199,13 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29219
29199
|
?disabled="${this.disabled}"
|
|
29220
29200
|
part="input">
|
|
29221
29201
|
${this.layout !== "classic"
|
|
29222
|
-
|
|
29202
|
+
? u$3`
|
|
29223
29203
|
<span slot="displayValue">
|
|
29224
29204
|
${this.renderDisplayTextDate(this.valueEnd)}
|
|
29225
29205
|
</span>
|
|
29226
29206
|
`
|
|
29227
|
-
|
|
29228
|
-
|
|
29207
|
+
: undefined
|
|
29208
|
+
}
|
|
29229
29209
|
<span slot="label"><slot name="toLabel"></slot></span>
|
|
29230
29210
|
</${this.inputTag}>
|
|
29231
29211
|
</div>
|
|
@@ -29265,7 +29245,6 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29265
29245
|
?customColor="${this.onDark}"
|
|
29266
29246
|
category="interface"
|
|
29267
29247
|
name="x-lg"
|
|
29268
|
-
slot="icon"
|
|
29269
29248
|
>
|
|
29270
29249
|
</${this.iconTag}>
|
|
29271
29250
|
</${this.buttonTag}>
|
|
@@ -29322,21 +29301,21 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
29322
29301
|
renderHtmlHelpText() {
|
|
29323
29302
|
return u$3`
|
|
29324
29303
|
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
29325
|
-
|
|
29304
|
+
? u$3`
|
|
29326
29305
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
29327
29306
|
<p id="${this.uniqueId}" part="helpText">
|
|
29328
29307
|
<slot name="helpText"></slot>
|
|
29329
29308
|
</p>
|
|
29330
29309
|
</${this.helpTextTag}>
|
|
29331
29310
|
`
|
|
29332
|
-
|
|
29311
|
+
: u$3`
|
|
29333
29312
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
29334
29313
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
29335
29314
|
${this.errorMessage}
|
|
29336
29315
|
</p>
|
|
29337
29316
|
</${this.helpTextTag}>
|
|
29338
29317
|
`
|
|
29339
|
-
|
|
29318
|
+
}
|
|
29340
29319
|
`;
|
|
29341
29320
|
}
|
|
29342
29321
|
|
|
@@ -354,6 +354,13 @@ export class AuroDatePicker extends AuroElement {
|
|
|
354
354
|
* @private
|
|
355
355
|
*/
|
|
356
356
|
private helpTextTag;
|
|
357
|
+
/**
|
|
358
|
+
* Handles click events on the datepicker.
|
|
359
|
+
* @param {PointerEvent} event - The pointer event object.
|
|
360
|
+
* @private
|
|
361
|
+
* @returns {void}
|
|
362
|
+
*/
|
|
363
|
+
private handleClick;
|
|
357
364
|
layout: string;
|
|
358
365
|
shape: string;
|
|
359
366
|
size: string;
|
|
@@ -380,6 +387,7 @@ export class AuroDatePicker extends AuroElement {
|
|
|
380
387
|
* @returns {void}
|
|
381
388
|
*/
|
|
382
389
|
focus(focusInput?: string): void;
|
|
390
|
+
hasFocus: boolean;
|
|
383
391
|
/**
|
|
384
392
|
* Converts valid time number to format used by wc-date-range API.
|
|
385
393
|
* @private
|
|
@@ -448,7 +456,6 @@ export class AuroDatePicker extends AuroElement {
|
|
|
448
456
|
* @returns {void}
|
|
449
457
|
*/
|
|
450
458
|
private configureDatepicker;
|
|
451
|
-
hasFocus: boolean;
|
|
452
459
|
/**
|
|
453
460
|
* Hides the dropdown bib if its open.
|
|
454
461
|
* @returns {void}
|
|
@@ -536,6 +543,12 @@ export class AuroDatePicker extends AuroElement {
|
|
|
536
543
|
* @throws {Error} Throws an error if the slot cannot be found or injected.
|
|
537
544
|
*/
|
|
538
545
|
private handleSlotToSlot;
|
|
546
|
+
/**
|
|
547
|
+
* Set up click handling for the datepicker.
|
|
548
|
+
* @private
|
|
549
|
+
* @returns {void}
|
|
550
|
+
*/
|
|
551
|
+
private configureClickHandler;
|
|
539
552
|
firstUpdated(): void;
|
|
540
553
|
/**
|
|
541
554
|
* Renders the snowflake layout for the datepicker.
|