@m3e/web 2.0.5 → 2.1.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/dist/all.js +801 -473
- package/dist/all.js.map +1 -1
- package/dist/all.min.js +52 -58
- package/dist/all.min.js.map +1 -1
- package/dist/autocomplete.js +342 -69
- package/dist/autocomplete.js.map +1 -1
- package/dist/autocomplete.min.js +1 -1
- package/dist/autocomplete.min.js.map +1 -1
- package/dist/chips.js +18 -4
- package/dist/chips.js.map +1 -1
- package/dist/chips.min.js +1 -1
- package/dist/chips.min.js.map +1 -1
- package/dist/core-a11y.js +3 -118
- package/dist/core-a11y.js.map +1 -1
- package/dist/core-a11y.min.js +13 -4
- package/dist/core-a11y.min.js.map +1 -1
- package/dist/core-anchoring.js +193 -1
- package/dist/core-anchoring.js.map +1 -1
- package/dist/core-anchoring.min.js +1 -1
- package/dist/core-anchoring.min.js.map +1 -1
- package/dist/core.js +147 -91
- package/dist/core.js.map +1 -1
- package/dist/core.min.js +1 -1
- package/dist/core.min.js.map +1 -1
- package/dist/css-custom-data.json +408 -328
- package/dist/custom-elements.json +5820 -4150
- package/dist/html-custom-data.json +174 -99
- package/dist/loading-indicator.js +1 -0
- package/dist/loading-indicator.js.map +1 -1
- package/dist/loading-indicator.min.js +1 -1
- package/dist/loading-indicator.min.js.map +1 -1
- package/dist/menu.js +1 -1
- package/dist/menu.js.map +1 -1
- package/dist/menu.min.js +1 -1
- package/dist/menu.min.js.map +1 -1
- package/dist/option.js +94 -121
- package/dist/option.js.map +1 -1
- package/dist/option.min.js +1 -1
- package/dist/option.min.js.map +1 -1
- package/dist/progress-indicator.js +2 -0
- package/dist/progress-indicator.js.map +1 -1
- package/dist/progress-indicator.min.js +2 -2
- package/dist/progress-indicator.min.js.map +1 -1
- package/dist/select.js +59 -23
- package/dist/select.js.map +1 -1
- package/dist/select.min.js +1 -1
- package/dist/select.min.js.map +1 -1
- package/dist/src/autocomplete/AutocompleteElement.d.ts +71 -2
- package/dist/src/autocomplete/AutocompleteElement.d.ts.map +1 -1
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts +3 -0
- package/dist/src/autocomplete/AutocompleteFilterMode.d.ts.map +1 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts +12 -0
- package/dist/src/autocomplete/QueryEventDetail.d.ts.map +1 -0
- package/dist/src/autocomplete/index.d.ts +2 -0
- package/dist/src/autocomplete/index.d.ts.map +1 -1
- package/dist/src/chips/ChipElement.d.ts +2 -0
- package/dist/src/chips/ChipElement.d.ts.map +1 -1
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts +13 -0
- package/dist/src/chips/InputChipSetChangeEventDetail.d.ts.map +1 -0
- package/dist/src/chips/InputChipSetElement.d.ts +10 -0
- package/dist/src/chips/InputChipSetElement.d.ts.map +1 -1
- package/dist/src/chips/index.d.ts +1 -0
- package/dist/src/chips/index.d.ts.map +1 -1
- package/dist/src/core/a11y/FocusTrapElement.d.ts +1 -1
- package/dist/src/core/a11y/list-key/ListKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/RadioKeyManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts +1 -2
- package/dist/src/core/a11y/list-key/SelectionManager.d.ts.map +1 -1
- package/dist/src/core/a11y/list-key/Typeahead.d.ts.map +1 -1
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts +74 -0
- package/dist/src/core/anchoring/FloatingPanelElement.d.ts.map +1 -0
- package/dist/src/core/anchoring/index.d.ts +1 -0
- package/dist/src/core/anchoring/index.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/MutationController.d.ts.map +1 -1
- package/dist/src/core/shared/controllers/ResizeController.d.ts.map +1 -1
- package/dist/src/core/shared/mixins/AttachInternals.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts +9 -2
- package/dist/src/core/shared/primitives/TextHighlightElement.d.ts.map +1 -1
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts +3 -0
- package/dist/src/core/shared/primitives/TextHighlightMode.d.ts.map +1 -0
- package/dist/src/core/shared/primitives/index.d.ts +2 -1
- package/dist/src/core/shared/primitives/index.d.ts.map +1 -1
- package/dist/src/loading-indicator/LoadingIndicatorElement.d.ts.map +1 -1
- package/dist/src/menu/MenuItemElementBase.d.ts.map +1 -1
- package/dist/src/option/OptionElement.d.ts +21 -1
- package/dist/src/option/OptionElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelElement.d.ts +11 -34
- package/dist/src/option/OptionPanelElement.d.ts.map +1 -1
- package/dist/src/option/OptionPanelState.d.ts +3 -0
- package/dist/src/option/OptionPanelState.d.ts.map +1 -0
- package/dist/src/option/index.d.ts +1 -0
- package/dist/src/option/index.d.ts.map +1 -1
- package/dist/src/progress-indicator/CircularProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/progress-indicator/LinearProgressIndicatorElement.d.ts.map +1 -1
- package/dist/src/select/SelectElement.d.ts +3 -2
- package/dist/src/select/SelectElement.d.ts.map +1 -1
- package/dist/src/toc/TocElement.d.ts.map +1 -1
- package/dist/toc.js +0 -1
- package/dist/toc.js.map +1 -1
- package/dist/toc.min.js +1 -1
- package/dist/toc.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/datepicker.js +0 -2346
- package/dist/datepicker.js.map +0 -1
- package/dist/datepicker.min.js +0 -102
- package/dist/datepicker.min.js.map +0 -1
- package/dist/src/core/shared/decorators/component.d.ts +0 -19
- package/dist/src/core/shared/decorators/component.d.ts.map +0 -1
- package/dist/src/core/shared/decorators/element.d.ts +0 -19
- package/dist/src/core/shared/decorators/element.d.ts.map +0 -1
- package/dist/src/core/shared/utils/getState.d.ts +0 -15
- package/dist/src/core/shared/utils/getState.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarElement.d.ts +0 -203
- package/dist/src/datepicker/CalendarElement.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarView.d.ts +0 -3
- package/dist/src/datepicker/CalendarView.d.ts.map +0 -1
- package/dist/src/datepicker/CalendarViewElementBase.d.ts +0 -28
- package/dist/src/datepicker/CalendarViewElementBase.d.ts.map +0 -1
- package/dist/src/datepicker/DateAdapter.d.ts +0 -4
- package/dist/src/datepicker/DateAdapter.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerElement.d.ts +0 -180
- package/dist/src/datepicker/DatepickerElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerToggleElement.d.ts +0 -21
- package/dist/src/datepicker/DatepickerToggleElement.d.ts.map +0 -1
- package/dist/src/datepicker/DatepickerVariant.d.ts +0 -3
- package/dist/src/datepicker/DatepickerVariant.d.ts.map +0 -1
- package/dist/src/datepicker/MonthViewElement.d.ts +0 -35
- package/dist/src/datepicker/MonthViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/MultiYearViewElement.d.ts +0 -27
- package/dist/src/datepicker/MultiYearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/YearViewElement.d.ts +0 -27
- package/dist/src/datepicker/YearViewElement.d.ts.map +0 -1
- package/dist/src/datepicker/index.d.ts +0 -10
- package/dist/src/datepicker/index.d.ts.map +0 -1
- package/dist/src/datepicker/utils.d.ts +0 -26
- package/dist/src/datepicker/utils.d.ts.map +0 -1
package/dist/datepicker.min.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* Copyright (c) 2025 matraic
|
|
4
|
-
* See LICENSE file in the project root for full license text.
|
|
5
|
-
*/
|
|
6
|
-
import{css as t,LitElement as e,html as a,nothing as i,unsafeCSS as r}from"lit";import{DesignToken as s,focusWhenReady as n,prefersReducedMotion as o,Role as l,ScrollController as h,HtmlFor as c,ActionElementBase as d}from"@m3e/web/core";import{M3eDirectionality as m}from"@m3e/web/core/bidi";import{positionAnchor as u}from"@m3e/web/core/anchoring";import{M3eBreakpointObserver as p,Breakpoint as g}from"@m3e/web/core/layout";function v(t,e,a,i){var r,s=arguments.length,n=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,a):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,i);else for(var o=t.length-1;o>=0;o--)(r=t[o])&&(n=(s<3?r(n):s>3?r(e,a,n):r(e,a))||n);return s>3&&n&&Object.defineProperty(e,a,n),n}function f(t,e,a,i){if("a"===a&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?i:"a"===a?i.call(t):i?i.value:e.get(t)}function b(t,e,a,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(t,a):r?r.value=a:e.set(t,a),a}"function"==typeof SuppressedError&&SuppressedError;
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2017 Google LLC
|
|
10
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/
|
|
12
|
-
const y=t=>(e,a)=>{void 0!==a?a.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},$=globalThis,w=$.ShadowRoot&&(void 0===$.ShadyCSS||$.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol(),_=new WeakMap;
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2019 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/let A=class{constructor(t,e,a){if(this._$cssResult$=!0,a!==D)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(w&&void 0===t){const a=void 0!==e&&1===e.length;a&&(t=_.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&_.set(e,t))}return t}toString(){return this.cssText}};const k=w?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const a of t.cssRules)e+=a.cssText;return(t=>new A("string"==typeof t?t:t+"",void 0,D))(e)})(t):t,{is:x,defineProperty:S,getOwnPropertyDescriptor:E,getOwnPropertyNames:M,getOwnPropertySymbols:P,getPrototypeOf:L}=Object,C=globalThis,Y=C.trustedTypes,T=Y?Y.emptyScript:"",O=C.reactiveElementPolyfillSupport,U=(t,e)=>t,F={toAttribute(t,e){switch(e){case Boolean:t=t?T:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let a=t;switch(e){case Boolean:a=null!==t;break;case Number:a=null===t?null:Number(t);break;case Object:case Array:try{a=JSON.parse(t)}catch(t){a=null}}return a}},I=(t,e)=>!x(t,e),H={attribute:!0,type:String,converter:F,reflect:!1,useDefault:!1,hasChanged:I};
|
|
18
|
-
/**
|
|
19
|
-
* @license
|
|
20
|
-
* Copyright 2017 Google LLC
|
|
21
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
|
-
*/Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;class V 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,e=H){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const a=Symbol(),i=this.getPropertyDescriptor(t,a,e);void 0!==i&&S(this.prototype,t,i)}}static getPropertyDescriptor(t,e,a){const{get:i,set:r}=E(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const s=i?.call(this);r?.call(this,e),this.requestUpdate(t,s,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??H}static _$Ei(){if(this.hasOwnProperty(U("elementProperties")))return;const t=L(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(U("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(U("properties"))){const t=this.properties,e=[...M(t),...P(t)];for(const a of e)this.createProperty(a,t[a])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,a]of e)this.elementProperties.set(t,a)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const a=this._$Eu(t,e);void 0!==a&&this._$Eh.set(a,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const a=new Set(t.flat(1/0).reverse());for(const t of a)e.unshift(k(t))}else void 0!==t&&e.push(k(t));return e}static _$Eu(t,e){const a=e.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,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,e=this.constructor.elementProperties;for(const a of e.keys())this.hasOwnProperty(a)&&(t.set(a,this[a]),delete this[a]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(w)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const a of e){const e=document.createElement("style"),i=$.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=a.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$ET(t,e){const a=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,a);if(void 0!==i&&!0===a.reflect){const r=(void 0!==a.converter?.toAttribute?a.converter:F).toAttribute(e,a.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const a=this.constructor,i=a._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=a.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:F;this._$Em=i;const s=r.fromAttribute(e,t.type);this[i]=s??this._$Ej?.get(i)??s,this._$Em=null}}requestUpdate(t,e,a){if(void 0!==t){const i=this.constructor,r=this[t];if(a??=i.getPropertyOptions(t),!((a.hasChanged??I)(r,e)||a.useDefault&&a.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,a))))return;this.C(t,e,a)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:a,reflect:i,wrapped:r},s){a&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),!0!==r||void 0!==s)||(this._$AL.has(t)||(this.hasUpdated||a||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;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,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,a]of t){const{wrapped:t}=a,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,a,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}V.elementStyles=[],V.shadowRootOptions={mode:"open"},V[U("elementProperties")]=new Map,V[U("finalized")]=new Map,O?.({ReactiveElement:V}),(C.reactiveElementVersions??=[]).push("2.1.1");
|
|
23
|
-
/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright 2017 Google LLC
|
|
26
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/
|
|
28
|
-
const N={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:I},R=(t=N,e,a)=>{const{kind:i,metadata:r}=a;let s=globalThis.litPropertyMetadata.get(r);if(void 0===s&&globalThis.litPropertyMetadata.set(r,s=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),s.set(a.name,t),"accessor"===i){const{name:i}=a;return{set(a){const r=e.get.call(this);e.set.call(this,a),this.requestUpdate(i,r,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=a;return function(a){const r=this[i];e.call(this,a),this.requestUpdate(i,r,t)}}throw Error("Unsupported decorator location: "+i)};function z(t){return(e,a)=>"object"==typeof a?R(t,e,a):((t,e,a)=>{const i=e.hasOwnProperty(a);return e.constructor.createProperty(a,t),i?Object.getOwnPropertyDescriptor(e,a):void 0})(t,e,a)}
|
|
29
|
-
/**
|
|
30
|
-
* @license
|
|
31
|
-
* Copyright 2017 Google LLC
|
|
32
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/function j(t){return z({...t,state:!0,attribute:!1})}
|
|
34
|
-
/**
|
|
35
|
-
* @license
|
|
36
|
-
* Copyright 2017 Google LLC
|
|
37
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* @license
|
|
41
|
-
* Copyright 2017 Google LLC
|
|
42
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/
|
|
44
|
-
function W(t,e){return(e,a,i)=>((t,e,a)=>(a.configurable=!0,a.enumerable=!0,Reflect.decorate&&"object"!=typeof e&&Object.defineProperty(t,e,a),a))(e,a,{get(){return(e=>e.renderRoot?.querySelector(t)??null)(this)}})}
|
|
45
|
-
/**
|
|
46
|
-
* @license
|
|
47
|
-
* Copyright 2017 Google LLC
|
|
48
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
49
|
-
*/const q=globalThis,B=q.trustedTypes,K=B?B.createPolicy("lit-html",{createHTML:t=>t}):void 0,Z="$lit$",J=`lit$${Math.random().toFixed(9).slice(2)}$`,X="?"+J,G=`<${X}>`,Q=document,tt=()=>Q.createComment(""),et=t=>null===t||"object"!=typeof t&&"function"!=typeof t,at=Array.isArray,it="[ \t\n\f\r]",rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,nt=/>/g,ot=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),lt=/'/g,ht=/"/g,ct=/^(?:script|style|textarea|title)$/i,dt=Symbol.for("lit-noChange"),mt=Symbol.for("lit-nothing"),ut=new WeakMap,pt=Q.createTreeWalker(Q,129);function gt(t,e){if(!at(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==K?K.createHTML(e):e}const vt=(t,e)=>{const a=t.length-1,i=[];let r,s=2===e?"<svg>":3===e?"<math>":"",n=rt;for(let e=0;e<a;e++){const a=t[e];let o,l,h=-1,c=0;for(;c<a.length&&(n.lastIndex=c,l=n.exec(a),null!==l);)c=n.lastIndex,n===rt?"!--"===l[1]?n=st:void 0!==l[1]?n=nt:void 0!==l[2]?(ct.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=ot):void 0!==l[3]&&(n=ot):n===ot?">"===l[0]?(n=r??rt,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,o=l[1],n=void 0===l[3]?ot:'"'===l[3]?ht:lt):n===ht||n===lt?n=ot:n===st||n===nt?n=rt:(n=ot,r=void 0);const d=n===ot&&t[e+1].startsWith("/>")?" ":"";s+=n===rt?a+G:h>=0?(i.push(o),a.slice(0,h)+Z+a.slice(h)+J+d):a+J+(-2===h?e:d)}return[gt(t,s+(t[a]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class ft{constructor({strings:t,_$litType$:e},a){let i;this.parts=[];let r=0,s=0;const n=t.length-1,o=this.parts,[l,h]=vt(t,e);if(this.el=ft.createElement(l,a),pt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=pt.nextNode())&&o.length<n;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(Z)){const e=h[s++],a=i.getAttribute(t).split(J),n=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:n[2],strings:a,ctor:"."===n[1]?Dt:"?"===n[1]?_t:"@"===n[1]?At:wt}),i.removeAttribute(t)}else t.startsWith(J)&&(o.push({type:6,index:r}),i.removeAttribute(t));if(ct.test(i.tagName)){const t=i.textContent.split(J),e=t.length-1;if(e>0){i.textContent=B?B.emptyScript:"";for(let a=0;a<e;a++)i.append(t[a],tt()),pt.nextNode(),o.push({type:2,index:++r});i.append(t[e],tt())}}}else if(8===i.nodeType)if(i.data===X)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(J,t+1));)o.push({type:7,index:r}),t+=J.length-1}r++}}static createElement(t,e){const a=Q.createElement("template");return a.innerHTML=t,a}}function bt(t,e,a=t,i){if(e===dt)return e;let r=void 0!==i?a._$Co?.[i]:a._$Cl;const s=et(e)?void 0:e._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),void 0===s?r=void 0:(r=new s(t),r._$AT(t,a,i)),void 0!==i?(a._$Co??=[])[i]=r:a._$Cl=r),void 0!==r&&(e=bt(t,r._$AS(t,e.values),r,i)),e}class yt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:a}=this._$AD,i=(t?.creationScope??Q).importNode(e,!0);pt.currentNode=i;let r=pt.nextNode(),s=0,n=0,o=a[0];for(;void 0!==o;){if(s===o.index){let e;2===o.type?e=new $t(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new kt(r,this,t)),this._$AV.push(e),o=a[++n]}s!==o?.index&&(r=pt.nextNode(),s++)}return pt.currentNode=Q,i}p(t){let e=0;for(const a of this._$AV)void 0!==a&&(void 0!==a.strings?(a._$AI(t,a,e),e+=a.strings.length-2):a._$AI(t[e])),e++}}class $t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,a,i){this.type=2,this._$AH=mt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=a,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=bt(this,t,e),et(t)?t===mt||null==t||""===t?(this._$AH!==mt&&this._$AR(),this._$AH=mt):t!==this._$AH&&t!==dt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>at(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==mt&&et(this._$AH)?this._$AA.nextSibling.data=t:this.T(Q.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:a}=t,i="number"==typeof a?this._$AC(t):(void 0===a.el&&(a.el=ft.createElement(gt(a.h,a.h[0]),this.options)),a);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new yt(i,this),a=t.u(this.options);t.p(e),this.T(a),this._$AH=t}}_$AC(t){let e=ut.get(t.strings);return void 0===e&&ut.set(t.strings,e=new ft(t)),e}k(t){at(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let a,i=0;for(const r of t)i===e.length?e.push(a=new $t(this.O(tt()),this.O(tt()),this,this.options)):a=e[i],a._$AI(r),i++;i<e.length&&(this._$AR(a&&a._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class wt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,a,i,r){this.type=1,this._$AH=mt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,a.length>2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=mt}_$AI(t,e=this,a,i){const r=this.strings;let s=!1;if(void 0===r)t=bt(this,t,e,0),s=!et(t)||t!==this._$AH&&t!==dt,s&&(this._$AH=t);else{const i=t;let n,o;for(t=r[0],n=0;n<r.length-1;n++)o=bt(this,i[a+n],e,n),o===dt&&(o=this._$AH[n]),s||=!et(o)||o!==this._$AH[n],o===mt?t=mt:t!==mt&&(t+=(o??"")+r[n+1]),this._$AH[n]=o}s&&!i&&this.j(t)}j(t){t===mt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Dt extends wt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===mt?void 0:t}}class _t extends wt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==mt)}}class At extends wt{constructor(t,e,a,i,r){super(t,e,a,i,r),this.type=5}_$AI(t,e=this){if((t=bt(this,t,e,0)??mt)===dt)return;const a=this._$AH,i=t===mt&&a!==mt||t.capture!==a.capture||t.once!==a.once||t.passive!==a.passive,r=t!==mt&&(a===mt||i);i&&this.element.removeEventListener(this.name,this,a),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class kt{constructor(t,e,a){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=a}get _$AU(){return this._$AM._$AU}_$AI(t){bt(this,t)}}const xt=q.litHtmlPolyfillSupport;xt?.(ft,$t),(q.litHtmlVersions??=[]).push("3.3.1");
|
|
50
|
-
/**
|
|
51
|
-
* @license
|
|
52
|
-
* Copyright 2017 Google LLC
|
|
53
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/
|
|
55
|
-
const St=1;class Et{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,a){this._$Ct=t,this._$AM=e,this._$Ci=a}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
56
|
-
/**
|
|
57
|
-
* @license
|
|
58
|
-
* Copyright 2018 Google LLC
|
|
59
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
|
-
*/const Mt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends Et{constructor(t){if(super(t),t.type!==St||"class"!==t.name||t.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(e=>t[e]).join(" ")+" "}update(t,[e]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter(t=>""!==t)));for(const t in e)e[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(e)}const a=t.element.classList;for(const t of this.st)t in e||(a.remove(t),this.st.delete(t));for(const t in e){const i=!!e[t];i===this.st.has(t)||this.nt?.has(t)||(i?(a.add(t),this.st.add(t)):(a.remove(t),this.st.delete(t)))}return dt}}),Pt=t=>t??mt;
|
|
61
|
-
/**
|
|
62
|
-
* @license
|
|
63
|
-
* Copyright 2018 Google LLC
|
|
64
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
-
*/function Lt(t,e,a){const i=new Date;return i.setFullYear(t,e,a),i.setHours(0,0,0,0),i}function Ct(t,e){return Lt(t.getFullYear(),t.getMonth(),t.getDate()+e)}function Yt(t,e){let a=Lt(t.getFullYear(),t.getMonth()+e,t.getDate());return a.getMonth()!=((t.getMonth()+e)%12+12)%12&&(a=Lt(a.getFullYear(),a.getMonth(),0)),a}function Tt(t,e){return Yt(t,12*e)}function Ot(t,e){return t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()}function Ut(t,e){return t&&e?0==Ot(t,e):t==e}function Ft(t){return t?new Date(t):null}function It(t,e,a){return function(t,e){return(t%e+e)%e}(t.getFullYear()-function(t,e){return e?e.getFullYear()-Rt+1:t?t.getFullYear():0}(e,a),Rt)}function Ht(t,e,a){return t.getFullYear()-It(t,e,a)}function Vt(t,e,a){return Ht(t,e,a)+Rt-1}function Nt(t,e,a){return e&&Ot(t,e)<0?e:a&&Ot(t,a)>0?a:t}const Rt=15;class zt extends e{constructor(){super(...arguments),this.today=new Date,this.date=null,this.activeDate=new Date,this.minDate=null,this.maxDate=null}async focusActiveCell(){this.isUpdatePending&&await this.updateComplete,this._activeItem&&await n(this._activeItem)}_changeActiveDate(t){Ut(t=Nt(t,this.minDate,this.maxDate),this.activeDate)||(this._activeItem?.style.setProperty("--m3e-state-layer-duration","0ms"),this._activeItem?.blur(),this._activeItem?.style.removeProperty("--m3e-state-layer-duration"),this.activeDate=t,this.dispatchEvent(new Event("active-change",{bubbles:!1})))}}
|
|
66
|
-
/**
|
|
67
|
-
* Adapted from Angular Material Datepicker
|
|
68
|
-
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/month-view.ts
|
|
69
|
-
*
|
|
70
|
-
* @license MIT
|
|
71
|
-
* Copyright (c) 2025 Google LLC
|
|
72
|
-
* See LICENSE file in the project root for full license text.
|
|
73
|
-
*/
|
|
74
|
-
var jt,Wt,qt,Bt,Kt,Zt,Jt;zt.styles=t`:host { display: inline-block; user-select: none; vertical-align: top; } .visually-hidden { position: absolute; appearance: none; visibility: hidden; border: none; outline: none; overflow: hidden; left: 0; height: 1px; width: 1px; margin: -1px; padding: 0; white-space: nowrap; } table { border-collapse: collapse; border-spacing: 0; width: calc(3rem * 7); } td, th { font: inherit; text-align: center; padding: unset; } td { box-sizing: border-box; height: 3rem; padding: 0.25rem; position: relative; } .item, .item > span { position: relative; } .item { display: flex; align-items: center; justify-content: center; border-radius: inherit; outline: none; width: 100%; height: 100%; border-radius: ${s.shape.corner.full}; } .item:not([aria-disabled]) { cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .touch { position: absolute; height: 3rem; width: 3rem; margin: auto; } td:not(:has(.item[aria-disabled])).selected { color: var(--m3e-calendar-item-selected-color, ${s.color.onPrimary}); --m3e-ripple-color: var(--m3e-calendar-item-selected-ripple-color, ${s.color.onPrimary}); --m3e-state-layer-hover-color: var(--m3e-calendar-item-selected-hover-color, ${s.color.onPrimary}); --m3e-state-layer-focus-color: var(--m3e-calendar-item-selected-focus-color, ${s.color.onPrimary}); } td:not(:has(.item[aria-disabled])).selected .state-layer { background-color: var(--m3e-calendar-item-selected-container-color, ${s.color.primary}); } td.current:not(.selected):not(.special):not(.range-start):not(.range-end) { color: var(--m3e-calendar-item-current-outline-color, ${s.color.primary}); } td.current:not(.selected):not(.special):not(.range-start):not(.range-end) .state-layer { border-style: solid; border-width: var(--m3e-calendar-item-current-outline-thickness, 0.0625rem); border-color: var(--m3e-calendar-item-current-outline-color, ${s.color.primary}); } td:has(.item[aria-disabled]) { color: color-mix( in srgb, var(--m3e-calendar-item-disabled-color, ${s.color.onSurface}) var(--m3e-calendar-item-disabled-color-opacity, 38%), transparent ); }`,v([W(".active > .item")],zt.prototype,"_activeItem",void 0),v([z({converter:{fromAttribute:Ft}})],zt.prototype,"today",void 0),v([z({converter:{fromAttribute:Ft}})],zt.prototype,"date",void 0),v([z({attribute:"active-date",converter:{fromAttribute:Ft}})],zt.prototype,"activeDate",void 0),v([z({attribute:"min-date",converter:{fromAttribute:Ft}})],zt.prototype,"minDate",void 0),v([z({attribute:"max-date",converter:{fromAttribute:Ft}})],zt.prototype,"maxDate",void 0);let Xt=class extends zt{constructor(){super(...arguments),jt.add(this),this.rangeStart=null,this.rangeEnd=null,this.blackoutDates=null,this.specialDates=null}render(){const t=new Date(this.today);for(t.setDate(1);0!=t.getDay();)t.setDate(t.getDate()+1);const e=new Array,r=new Intl.DateTimeFormat(navigator.language,{weekday:"narrow"}),s=new Intl.DateTimeFormat(navigator.language,{weekday:"long"});for(let a=0;a<7;a++)e.push({id:a,narrow:r.format(t),long:s.format(t)}),t.setDate(t.getDate()+1);const n=this.activeDate.getFullYear(),o=this.activeDate.getMonth(),l=new Date(n,o,1),h=new Date(n,o+1,0).getDate();let c=[],d=l.getDay();for(let t=1;t<=h;t++)0!==d&&0!==c.length||c.push([]),c[c.length-1].push(t),d=(d+1)%7;return c=c.filter(t=>!!t.length),a`<table role="grid"><thead><tr>${e.map(t=>a`<th scope="col"><span class="visually-hidden">${t.long}</span><div id="weekday-${t.id}-month-${o}" aria-hidden="true">${t.narrow}</div><m3e-tooltip for="weekday-${t.id}-month-${o}">${t.long}</m3e-tooltip></th>`)}</tr></thead><tbody>${c.map((t,e)=>a`<tr role="row">${0===e&&t.length<7?a`<td colspan="${7-t.length}"></td>`:i} ${t.map(t=>f(this,jt,"m",Wt).call(this,new Date(n,o,t)))} ${e>0&&t.length<7?a`<td colspan="${7-t.length}"></td>`:i}</tr>`)}</tbody></table>`}};
|
|
75
|
-
/**
|
|
76
|
-
* Adapted from Angular Material Datepicker
|
|
77
|
-
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/calendar.ts
|
|
78
|
-
*
|
|
79
|
-
* @license MIT
|
|
80
|
-
* Copyright (c) 2025 Google LLC
|
|
81
|
-
* See LICENSE file in the project root for full license text.
|
|
82
|
-
*/
|
|
83
|
-
var Gt,Qt,te,ee,ae,ie,re,se,ne,oe;jt=new WeakSet,Wt=function(t){const e=new Intl.DateTimeFormat(navigator.language,{year:"numeric",month:"long",day:"numeric"}).format(t),i=this.specialDates?.(t)??!1,r=Ut(this.date,t),s=Ut(this.activeDate,t),n=Ut(this.today,t),o=this.minDate&&Ot(t,this.minDate)<0||this.maxDate&&Ot(t,this.maxDate)>0||!0===this.blackoutDates?.(t),l=`date-${t.getMonth()}-${t.getDate()}-${t.getFullYear()}`;let h=!1,c=!1,d=!1,m=!1;return this.rangeStart&&(this.rangeEnd?(h=Ot(t,this.rangeStart)>0&&Ot(t,this.rangeEnd)<0,h||(c=Ot(t,this.rangeStart)>=0&&Ot(t,this.rangeEnd)<0,c?m=!0:d=Ot(t,this.rangeStart)>0&&Ot(t,this.rangeEnd)<=0)):c=Ut(t,this.rangeStart)),a`<td role="gridcell" class="${Mt({current:n,selected:r,active:s,special:i,range:h,"range-start":c,"range-start-range":m,"range-end":d})}"><div id="${l}" role="button" class="item" data-value="${t.toISOString()}" tabindex="${s?"0":"-1"}" aria-disabled="${Pt(o||void 0)}" aria-current="${Pt(n?"date":void 0)}" aria-pressed="${r||c||d}" @click="${f(this,jt,"m",qt)}" @mouseenter="${f(this,jt,"m",Kt)}" @focus="${f(this,jt,"m",Kt)}" @mouseleave="${f(this,jt,"m",Jt)}" @blur="${f(this,jt,"m",Jt)}" @keydown="${f(this,jt,"m",Bt)}"><m3e-focus-ring class="focus-ring" for="${l}"></m3e-focus-ring><m3e-state-layer class="state-layer" for="${l}" ?disable-hover="${o}"></m3e-state-layer><m3e-ripple class="ripple" centered for="${l}" ?disabled="${o}"></m3e-ripple><div class="touch"></div><span class="visually-hidden">${e}</span> <span aria-hidden="true">${t.getDate()}</span></div></td>`},qt=function(t){const e=t.currentTarget;"true"!==e.ariaDisabled&&e.dataset.value&&(this.activeDate=new Date(e.dataset.value),this.activeDate=Nt(this.activeDate,this.minDate,this.maxDate),this.rangeStart&&(Ot(this.activeDate,this.rangeStart)<0?(this.rangeStart=this.activeDate,this.rangeEnd=null):this.rangeEnd=this.activeDate,f(this,jt,"m",Jt).call(this)),this.dispatchEvent(new Event("change",{bubbles:!1})))},Bt=function(t){let e=this.activeDate;switch(t.key){case" ":case"Enter":return t.preventDefault(),void t.currentTarget.click();case"ArrowLeft":case"Left":e=Ct(this.activeDate,"rtl"===m.current?1:-1);break;case"ArrowRight":case"Right":e=Ct(this.activeDate,"rtl"===m.current?-1:1);break;case"ArrowUp":case"Up":e=Ct(this.activeDate,-7);break;case"ArrowDown":case"Down":e=Ct(this.activeDate,7);break;case"Home":e=Ct(this.activeDate,1-this.activeDate.getDate());break;case"End":e=Ct(this.activeDate,Lt((a=this.activeDate).getFullYear(),a.getMonth()+1,0).getDate()-this.activeDate.getDate());break;case"PageUp":e=t.altKey?Tt(this.activeDate,-1):Yt(this.activeDate,-1);break;case"PageDown":e=t.altKey?Tt(this.activeDate,1):Yt(this.activeDate,1);break;default:return}var a;t.preventDefault(),this._changeActiveDate(e)},Kt=function(t){f(this,jt,"m",Zt).call(this,t.currentTarget)},Zt=function(t){if(f(this,jt,"m",Jt).call(this),this.rangeStart&&t.dataset.value){Ot(new Date(t.dataset.value),this.rangeStart)>0&&t.parentElement.classList.add("range-highlight-end");for(const e of t.closest("table")?.querySelectorAll(".item")??[]){if(e===t)break;const a=new Date(e.dataset.value);Ot(a,this.rangeStart)>0?e.parentElement.classList.add("range-highlight"):Ot(a,this.rangeStart)>=0&&e.parentElement.classList.add("range-highlight-start")}}},Jt=function(){this.rangeStart&&this.shadowRoot?.querySelectorAll(".range-highlight,.range-highlight-end,.range-highlight-start").forEach(t=>t.classList.remove("range-highlight","range-highlight-end","range-highlight-start"))},Xt.styles=[zt.styles,t`thead { font-size: var(--m3e-calendar-weekday-font-size, ${s.typescale.standard.title.small.fontSize}); font-weight: var(--m3e-calendar-weekday-font-weight, ${s.typescale.standard.title.small.fontWeight}); line-height: var(--m3e-calendar-weekday-line-height, ${s.typescale.standard.title.small.lineHeight}); letter-spacing: var(--m3e-calendar-weekday-tracking, ${s.typescale.standard.title.small.tracking}); } th { height: 1.5rem; padding-block-start: 1.875rem; padding-block-end: 1rem; } tbody { font-size: var(--m3e-calendar-date-font-size, ${s.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-calendar-date-font-weight, ${s.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-calendar-date-line-height, ${s.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-calendar-date-tracking, ${s.typescale.standard.body.medium.tracking}); } td:not(:has(.item[aria-disabled])):not(.selected):not(.range-start):not(.range-end).special { color: var(--m3e-calendar-item-special-color, ${s.color.onTertiaryContainer}); --m3e-ripple-color: var(--m3e-calendar-item-special-ripple-color, ${s.color.onTertiaryContainer}); --m3e-state-layer-hover-color: var( --m3e-calendar-item-special-hover-color, ${s.color.onTertiaryContainer} ); --m3e-state-layer-focus-color: var( --m3e-calendar-item-special-focus-color, ${s.color.onTertiaryContainer} ); } td:not(:has(.item[aria-disabled])):not(.selected):not(.range-start):not(.range-end).special .state-layer { background-color: var(--m3e-calendar-item-special-container-color, ${s.color.tertiaryContainer}); } td:not(:has(.item[aria-disabled])).range-start, td:not(:has(.item[aria-disabled])).range-end { color: var(--m3e-calendar-item-selected-color, ${s.color.onPrimary}); --m3e-ripple-color: var(--m3e-calendar-item-selected-ripple-color, ${s.color.onPrimary}); } td:not(:has(.item[aria-disabled])).range-start .state-layer, td:not(:has(.item[aria-disabled])).range-end .state-layer { background-color: var(--m3e-calendar-item-selected-container-color, ${s.color.primary}); } td:not(:has(.item[aria-disabled])).range::before, td:not(:has(.item[aria-disabled])).range-start-range::before, td:not(:has(.item[aria-disabled])).range-end::before { content: ""; position: absolute; left: 0; right: 0; top: 0.25rem; bottom: 0.25rem; background-color: var(--m3e-calendar-range-container-color, ${s.color.primaryContainer}); } td:not(:has(.item[aria-disabled])):not(.selected).range { color: var(--m3e-calendar-range-color, ${s.color.onPrimaryContainer}); } td:not(:has(.item[aria-disabled])).range-start::before { inset-inline-start: 50%; width: 50%; } td:not(:has(.item[aria-disabled])).range-end::before { inset-inline-end: 50%; width: 50%; } td:not(:has(.item[aria-disabled])).range-highlight-start .item::after, td:not(:has(.item[aria-disabled])).range-highlight .item::after, td:not(:has(.item[aria-disabled])).range-highlight-end .item::after { content: ""; position: absolute; top: 0; left: calc(0px - 0.1875rem); right: calc(0px - 0.1875rem); bottom: 0; border-style: dashed; border-color: ${s.color.primary}; border-width: 1px; } td:not(:has(.item[aria-disabled])).range-highlight-start .item::after { margin-inline-start: 50%; } td:not(:has(.item[aria-disabled])).range-highlight-end .item::after { margin-inline-end: 0.1875rem; } td:not(:has(.item[aria-disabled])).range-highlight-start .item::after, td:not(:has(.item[aria-disabled])).range-highlight .item::after { border-inline-style: none; } td:not(:has(.item[aria-disabled])).range-highlight-end .item::after { border-start-end-radius: ${s.shape.corner.full}; border-end-end-radius: ${s.shape.corner.full}; border-inline-start-style: none; }`],v([z({attribute:"range-start",converter:{fromAttribute:Ft}})],Xt.prototype,"rangeStart",void 0),v([z({attribute:"range-end",converter:{fromAttribute:Ft}})],Xt.prototype,"rangeEnd",void 0),v([z({attribute:!1})],Xt.prototype,"blackoutDates",void 0),v([z({attribute:!1})],Xt.prototype,"specialDates",void 0),Xt=v([y("m3e-month-view")],Xt);let le=class extends e{constructor(){super(...arguments),Gt.add(this),Qt.set(this,void 0),this._today=new Date,this._activeView="month",this._activeDate=new Date,this.startView="month",this.date=null,this.startAt=null,this.minDate=null,this.maxDate=null,this.rangeStart=null,this.rangeEnd=null,this.blackoutDates=null,this.specialDates=null,this.previousMonthLabel="Previous month",this.previousYearLabel="Previous year",this.previousMultiYearLabel="Previous 24 years",this.nextMonthLabel="Next month",this.nextYearLabel="Next year",this.nextMultiYearLabel="Next 24 years"}get periodLabel(){switch(this._activeView){case"month":return new Intl.DateTimeFormat(navigator.language,{month:"short",year:"numeric"}).format(this._activeDate);case"year":return new Intl.DateTimeFormat(navigator.language,{year:"numeric"}).format(new Date(this._activeDate.getFullYear(),0,1));case"multi-year":return new Intl.DateTimeFormat(navigator.language,{year:"numeric"}).formatRange(new Date(Ht(this._activeDate,this.minDate,this.maxDate),0,1),new Date(Vt(this._activeDate,this.minDate,this.maxDate),0,1))}}get canMovePreviousPeriod(){if(!this.minDate)return!0;switch(this._activeView){case"month":return new Date(this._activeDate.getFullYear(),this._activeDate.getMonth(),0)>=this.minDate;case"year":return new Date(this._activeDate.getFullYear()-1,12,1)>=this.minDate;case"multi-year":return new Date(Ht(this._activeDate,this.minDate,this.maxDate)-1,12,1)>=this.minDate}}get canMoveNextPeriod(){if(!this.maxDate)return!0;switch(this._activeView){case"month":return new Date(this._activeDate.getFullYear(),this._activeDate.getMonth()+1,1)<=this.maxDate;case"year":return new Date(this._activeDate.getFullYear()+1,1,1)<=this.maxDate;case"multi-year":return new Date(Vt(this._activeDate,this.minDate,this.maxDate)+1,12,1)<=this.maxDate}}async focusActiveCell(){this.isUpdatePending&&await this.updateComplete,await(this._view?.focusActiveCell())}updateTodayDate(){this._today=new Date}async movePreviousPeriod(){if(!this.canMovePreviousPeriod)return;if(o())return void(this._activeDate=f(this,Gt,"m",ne).call(this,this._activeView));await f(this,Qt,"f");const t=[...this.shadowRoot?.querySelectorAll(`.row.${this._activeView} .view`)??[]];3==t.length&&(b(this,Qt,new Promise(e=>{t[0].addEventListener("transitionend",()=>{this._activeDate=f(this,Gt,"m",ne).call(this,this._activeView),t.forEach(t=>t.classList.add("no-animate")),t[1].classList.remove("after"),t[0].classList.add("before"),setTimeout(()=>{t.forEach(t=>t.classList.remove("no-animate")),e()})},{once:!0})}),"f"),t[1].classList.add("after"),t[0].classList.remove("before"),await f(this,Qt,"f"))}async moveNextPeriod(){if(!this.canMoveNextPeriod)return;if(o())return void(this._activeDate=f(this,Gt,"m",oe).call(this,this._activeView));await f(this,Qt,"f");const t=[...this.shadowRoot?.querySelectorAll(`.row.${this._activeView} .view`)??[]];3==t.length&&(b(this,Qt,new Promise(e=>{t[2].addEventListener("transitionend",()=>{this._activeDate=f(this,Gt,"m",oe).call(this,this._activeView),t.forEach(t=>t.classList.add("no-animate")),t[1].classList.remove("before"),t[2].classList.add("after"),setTimeout(()=>{t.forEach(t=>t.classList.remove("no-animate")),e()})},{once:!0})}),"f"),t[1].classList.add("before"),t[2].classList.remove("after"),await f(this,Qt,"f"))}async togglePeriod(){await f(this,Qt,"f"),this._activeView="month"===this._activeView?"multi-year":"month",await this.focusActiveCell()}update(t){super.update(t),t.has("date")&&(this._activeDate=new Date(this.date??this._today)),t.has("startAt")&&(this._activeDate=new Date(this.startAt??this.date??this._today)),t.has("startView")&&(this._activeView=this.startView)}updated(t){super.updated(t),this._view instanceof Xt&&(t.has("specialDates")||t.has("blackoutDates"))&&this.shadowRoot?.querySelectorAll("m3e-month-view").forEach(t=>{t.specialDates=this.specialDates,t.blackoutDates=this.blackoutDates})}render(){return a`<slot name="header">${f(this,Gt,"m",te).call(this)}</slot><div class="body ${this._activeView}"><div class="row multi-year">${f(this,Gt,"m",ee).call(this,"multi-year",-1)}${f(this,Gt,"m",ee).call(this,"multi-year",0)}${f(this,Gt,"m",ee).call(this,"multi-year",1)}</div><div class="row year">${f(this,Gt,"m",ee).call(this,"year",-1)}${f(this,Gt,"m",ee).call(this,"year",0)}${f(this,Gt,"m",ee).call(this,"year",1)}</div><div class="row month">${f(this,Gt,"m",ee).call(this,"month",-1)}${f(this,Gt,"m",ee).call(this,"month",0)}${f(this,Gt,"m",ee).call(this,"month",1)}</div></div>`}};var he,ce,de,me,ue,pe,ge,ve,fe,be,ye,$e,we,De,_e,Ae,ke;Qt=new WeakMap,Gt=new WeakSet,te=function(){return a`<div class="header"><m3e-button @click="${this.togglePeriod}">${this.periodLabel} <svg class="${Mt({rotate:"month"!==this._activeView})}" slot="trailing-icon" viewBox="0 -960 960 960" fill="currentColor"><path d="M480-360 280-560h400L480-360Z"/></svg></m3e-button><div class="spacer"></div><m3e-icon-button ?disabled="${!this.canMovePreviousPeriod}" @click="${this.movePreviousPeriod}" aria-label="${"month"===this._activeView?this.previousMonthLabel:"year"===this._activeView?this.previousYearLabel:this.previousMultiYearLabel}">${"ltr"===m.current?a`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>`:a`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>`}</m3e-icon-button><m3e-icon-button ?disabled="${!this.canMoveNextPeriod}" @click="${this.moveNextPeriod}" aria-label="${"month"===this._activeView?this.nextMonthLabel:"year"===this._activeView?this.nextYearLabel:this.nextMultiYearLabel}">${"ltr"===m.current?a`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>`:a`<svg viewBox="0 -960 960 960" fill="currentColor"><path d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>`}</m3e-icon-button></div>`},ee=function(t,e){const i=e<0?f(this,Gt,"m",ne).call(this,t):e>0?f(this,Gt,"m",oe).call(this,t):new Date(this._activeDate);switch(t){case"month":return a`<m3e-month-view class="view ${Mt({before:e<0,after:e>0,active:t===this._activeView&&0===e})}" ?inert="${0!==e}" today="${this._today.toISOString()}" date="${Pt(this.date?.toISOString())}" active-date="${i.toISOString()}" min-date="${Pt(this.minDate?.toISOString())}" max-date="${Pt(this.maxDate?.toISOString())}" range-start="${Pt(this.rangeStart?.toISOString())}" range-end="${Pt(this.rangeEnd?.toISOString())}" @active-change="${0===e?f(this,Gt,"m",se):void 0}" @change="${0===e?f(this,Gt,"m",ae):void 0}"></m3e-month-view>`;case"year":return a`<m3e-year-view class="view ${Mt({before:e<0,after:e>0,active:t===this._activeView&&0===e})}" ?inert="${0!==e}" today="${this._today.toISOString()}" date="${Pt(this.date?.toISOString())}" active-date="${i.toISOString()}" min-date="${Pt(this.minDate?.toISOString())}" max-date="${Pt(this.maxDate?.toISOString())}" @active-change="${0===e?f(this,Gt,"m",se):void 0}" @change="${0===e?f(this,Gt,"m",ie):void 0}"></m3e-year-view>`;case"multi-year":return a`<m3e-multi-year-view class="view ${Mt({before:e<0,after:e>0,active:t===this._activeView&&0===e})}" ?inert="${0!==e}" today="${this._today.toISOString()}" date="${Pt(this.date?.toISOString())}" active-date="${i.toISOString()}" min-date="${Pt(this.minDate?.toISOString())}" max-date="${Pt(this.maxDate?.toISOString())}" @active-change="${0===e?f(this,Gt,"m",se):void 0}" @change="${0===e?f(this,Gt,"m",re):void 0}"></m3e-multi-year-view>`}},ae=function(t){const e=t.currentTarget;this._activeDate=new Date(e.activeDate),this.rangeStart=e.rangeStart,this.rangeEnd=e.rangeEnd,this.date=new Date(this._activeDate),this.dispatchEvent(new Event("change",{bubbles:!0}))},ie=async function(t){this._activeDate=new Date(t.currentTarget.activeDate),this._activeView="month",this.focusActiveCell()},re=function(t){this._activeDate=new Date(t.currentTarget.activeDate),this._activeView="year",this.focusActiveCell()},se=async function(t){this._activeDate=new Date(t.currentTarget.activeDate),await this.focusActiveCell()},ne=function(t){const e=new Date(this._activeDate);switch(t){case"month":for(e.setMonth(this._activeDate.getMonth()-1);e.getMonth()===this._activeDate.getMonth();)e.setDate(e.getDate()-1);break;case"year":e.setFullYear(this._activeDate.getFullYear()-1);break;case"multi-year":e.setDate(1),e.setFullYear(Ht(this._activeDate,this.minDate,this.maxDate)-1)}return e},oe=function(t){const e=new Date(this._activeDate);switch(t){case"month":for(e.setMonth(this._activeDate.getMonth()+1);e.getMonth()===this._activeDate.getMonth();)e.setDate(e.getDate()+1);break;case"year":e.setFullYear(this._activeDate.getFullYear()+1);break;case"multi-year":e.setDate(1),e.setFullYear(Vt(this._activeDate,this.minDate,this.maxDate)+1)}return e},le.styles=t`:host { display: inline-block; vertical-align: top; } .header { display: flex; align-items: center; padding-block-start: var(--m3e-calendar-padding, 0.5rem); padding-inline: var(--m3e-calendar-padding, 0.5rem); --m3e-text-button-label-text-color: var( --m3e-calendar-period-button-text-color, ${s.color.onSurfaceVariant} ); --m3e-text-button-hover-label-text-color: var( --m3e-calendar-period-button-text-color, ${s.color.onSurfaceVariant} ); --m3e-text-button-focus-label-text-color: var( --m3e-calendar-period-button-text-color, ${s.color.onSurfaceVariant} ); --m3e-text-button-pressed-label-text-color: var( --m3e-calendar-period-button-text-color, ${s.color.onSurfaceVariant} ); } .spacer { flex: 1 1 auto; } svg { transition: transform ${s.motion.spring.fastEffects}; } svg.rotate { transform: rotate(-180deg); } .body { position: relative; overflow: hidden; padding-inline: var(--m3e-calendar-padding, 0.5rem); padding-block-end: var(--m3e-calendar-padding, 0.5rem); } .view:not(.no-animate) { transition: ${r(`margin var(--m3e-calendar-slide-animation-duration, ${s.motion.duration.long2}) ${s.motion.easing.standard},\n visibility var(--m3e-calendar-slide-animation-duration, ${s.motion.duration.long2}) ${s.motion.easing.standard} allow-discrete`)}; } .view.before, .view.after { visibility: hidden; position: absolute; } .view.before { margin-inline-start: -100%; } .view.after { margin-inline-start: 100%; } .view:not(.before):not(.after) { visibility: visible; position: relative; left: 0; margin-inline-start: 0; } .row { opacity: 1; transform: translateY(0); } .row.multi-year { transition: ${r(`transform var(--m3e-calendar-slide-animation-duration, ${s.motion.duration.long2}) ${s.motion.easing.standard} allow-discrete,\n opacity var(--m3e-calendar-slide-animation-duration, ${s.motion.duration.long2}) ${s.motion.easing.standard} allow-discrete`)}; } .row:not(.multi-year) { transition: ${r(`opacity var(--m3e-calendar-slide-animation-duration, ${s.motion.duration.long2}) ${s.motion.easing.standard} allow-discrete`)}; } .body.month > .row:not(.month), .body.year > .row:not(.year), .body.multi-year > .row:not(.multi-year) { visibility: hidden; position: absolute; transform: translateY(-10%); opacity: 0; } .body.month > .row:not(.month) .view:not(.before):not(.after), .body.year > .row:not(.year) .view:not(.before):not(.after), .body.multi-year > .row:not(.multi-year) .view:not(.before):not(.after) { visibility: hidden; transition: none; } @media (prefers-reduced-motion) { .row:not(.multi-year), .row.multi-year, .view:not(.no-animate), svg { transition: none; } }`,v([j()],le.prototype,"_today",void 0),v([j()],le.prototype,"_activeView",void 0),v([j()],le.prototype,"_activeDate",void 0),v([W(".active")],le.prototype,"_view",void 0),v([z({attribute:"start-view"})],le.prototype,"startView",void 0),v([z({converter:{fromAttribute:Ft}})],le.prototype,"date",void 0),v([z({attribute:"start-at",converter:{fromAttribute:Ft}})],le.prototype,"startAt",void 0),v([z({attribute:"min-date",converter:{fromAttribute:Ft}})],le.prototype,"minDate",void 0),v([z({attribute:"max-date",converter:{fromAttribute:Ft}})],le.prototype,"maxDate",void 0),v([z({attribute:"range-start",converter:{fromAttribute:Ft}})],le.prototype,"rangeStart",void 0),v([z({attribute:"range-end",converter:{fromAttribute:Ft}})],le.prototype,"rangeEnd",void 0),v([z({attribute:!1})],le.prototype,"blackoutDates",void 0),v([z({attribute:!1})],le.prototype,"specialDates",void 0),v([z({attribute:"previous-month-label"})],le.prototype,"previousMonthLabel",void 0),v([z({attribute:"previous-year-label"})],le.prototype,"previousYearLabel",void 0),v([z({attribute:"previous-multi-year-label"})],le.prototype,"previousMultiYearLabel",void 0),v([z({attribute:"next-month-label"})],le.prototype,"nextMonthLabel",void 0),v([z({attribute:"next-year-label"})],le.prototype,"nextYearLabel",void 0),v([z({attribute:"next-multi-year-label"})],le.prototype,"nextMultiYearLabel",void 0),le=v([y("m3e-calendar")],le);let xe=ke=class extends(l(e,"dialog")){constructor(){super(...arguments),he.add(this),ce.set(this,void 0),de.set(this,void 0),me.set(this,void 0),ue.set(this,void 0),pe.set(this,t=>f(this,he,"m",be).call(this,t)),ge.set(this,new h(this,{target:null,callback:()=>this.hide(!1)})),ve.set(this,t=>{"closed"===t.newState&&(f(this,he,"m",Ae).call(this),f(this,ue,"f")?.call(this),b(this,ue,void 0,"f"))}),this.variant="docked",this.startView="month",this.date=null,this.startAt=null,this.minDate=null,this.maxDate=null,this.rangeStart=null,this.rangeEnd=null,this.blackoutDates=null,this.specialDates=null,this.previousMonthLabel="Previous month",this.previousYearLabel="Previous year",this.previousMultiYearLabel="Previous 24 years",this.nextMonthLabel="Next month",this.nextYearLabel="Next year",this.nextMultiYearLabel="Next 24 years",this.confirmLabel="OK",this.dismissLabel="Cancel",this.label="Select date"}get isOpen(){return void 0!==f(this,de,"f")}get currentVariant(){return this._variant??("modal"!==this.variant?"docked":"modal")}connectedCallback(){super.connectedCallback(),this.ariaModal="true",this.classList.add("-no-animate"),this.setAttribute("popover","manual"),this.addEventListener("toggle",f(this,ve,"f")),document.addEventListener("click",f(this,pe,"f"))}disconnectedCallback(){super.disconnectedCallback(),this._variant=void 0,f(this,ce,"f")?.call(this),this.classList.remove("-docked"),this.classList.remove("-modal"),this.removeEventListener("toggle",f(this,ve,"f")),document.removeEventListener("click",f(this,pe,"f"))}async show(t,e){f(this,de,"f")&&f(this,de,"f")!==t&&this.hide(),this._calendar.date=this.date,this._calendar.rangeStart=this.rangeStart,this._calendar.rangeEnd=this.rangeEnd,b(this,de,t,"f"),f(this,de,"f").ariaExpanded="true",b(this,me,e,"f"),await f(this,he,"m",_e).call(this),this.showPopover(),f(this,ge,"f").observe(f(this,de,"f")),await this._calendar.focusActiveCell()}hide(t=!1){this.hidePopover(),f(this,de,"f")&&(f(this,de,"f").ariaExpanded="false",t&&f(this,de,"f").focus(),f(this,ge,"f").unobserve(f(this,de,"f")),b(this,de,void 0,"f"))}async toggle(t,e){f(this,de,"f")?this.hide():await this.show(t,e)}render(){return a`<m3e-focus-trap>${f(this,he,"m",fe).call(this)}<m3e-calendar start-view="${this.startView}" start-at="${Pt(this.startAt?.toISOString())}" min-date="${Pt(this.minDate?.toISOString())}" max-date="${Pt(this.maxDate?.toISOString())}" @change="${f(this,he,"m",ye)}"></m3e-calendar><div class="actions"><m3e-button @click="${f(this,he,"m",$e)}">${this.dismissLabel}</m3e-button><m3e-button @click="${f(this,he,"m",we)}">${this.confirmLabel}</m3e-button></div></m3e-focus-trap>`}firstUpdated(t){super.firstUpdated(t),requestAnimationFrame(()=>this.classList.remove("-no-animate"))}update(t){super.update(t),["date","rangeStart","rangeEnd"].some(e=>t.has(e))&&f(this,he,"m",Ae).call(this),t.has("variant")&&(f(this,ce,"f")?.call(this),"auto"===this.variant?b(this,ce,p.observe([g.XSmall,g.Small],t=>{this._variant=t.get(g.XSmall)||t.get(g.Small)?"modal":"docked",f(this,he,"m",De).call(this)}),"f"):(this._variant=void 0,f(this,he,"m",De).call(this)))}updated(t){super.updated(t),(t.has("specialDates")||t.has("blackoutDates"))&&(this._calendar.specialDates=this.specialDates,this._calendar.blackoutDates=this.blackoutDates)}};function Se(t){return t?new Date(t):null}ce=new WeakMap,de=new WeakMap,me=new WeakMap,ue=new WeakMap,pe=new WeakMap,ge=new WeakMap,ve=new WeakMap,he=new WeakSet,fe=function(){if("docked"===this.currentVariant)return i;const t=this._date??this.date;return a`<div class="supporting-text">${this.label}</div><div class="headline">${t?new Intl.DateTimeFormat(navigator.language,{weekday:"short",month:"short",day:"numeric"}).format(t):"––"}</div><div class="divider"></div>`},be=function(t){t.composedPath().some(t=>t instanceof ke||t===f(this,de,"f")||t===f(this,me,"f"))||this.hide()},ye=function(){this._date=this._calendar.date,this._rangeStart=this._calendar.rangeStart,this._rangeEnd=this._calendar.rangeEnd},$e=function(){this.hide(!0)},we=function(){this.date=this._date??this.date,this.rangeStart=this._rangeStart??this.rangeStart,this.rangeEnd=this._rangeEnd??this.rangeEnd,this.hide(!0),this.dispatchEvent(new Event("change",{bubbles:!0}))},De=function(){switch(this.currentVariant){case"docked":this.classList.remove("-modal"),this.classList.add("-docked");break;case"modal":this.classList.remove("-docked"),this.classList.add("-modal")}this.isOpen&&f(this,he,"m",_e).call(this)},_e=async function(){"docked"===this.currentVariant&&f(this,de,"f")?b(this,ue,await u(this,f(this,me,"f")??f(this,de,"f"),{position:"bottom-start",inline:!0,flip:!0},(t,e,a)=>{this.classList.toggle("-top",a.includes("top")),this.classList.toggle("-bottom",a.includes("bottom")),"rtl"===m.current?(this.style.right=window.innerWidth-t-this.clientWidth+"px",this.style.left=""):(this.style.left=`${t}px`,this.style.right=""),this.style.top=`${e}px`}),"f"):(f(this,ue,"f")?.call(this),b(this,ue,void 0,"f"),this.style.left="",this.style.right="",this.style.top="")},Ae=function(){this._date=this._rangeStart=this._rangeEnd=void 0},xe.styles=t`:host { flex-direction: column; margin: unset; border: unset; padding-block: var(--m3e-datepicker-container-padding-block, 0.75rem); padding-inline: var(--m3e-datepicker-container-padding-inline, 0.25rem); background-color: var(--m3e-datepicker-container-color, ${s.color.surfaceContainer}); box-shadow: var(--m3e-datepicker-container-elevation, ${s.elevation.level3}); opacity: 0; display: none; } .headline { font-size: var( --m3e-datepicker-modal-headline-font-size, ${s.typescale.standard.headline.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-headline-font-weight, ${s.typescale.standard.headline.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-headline-line-height, ${s.typescale.standard.headline.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-headline-tracking, ${s.typescale.standard.headline.large.tracking} ); margin-block-start: 2.25rem; margin-block-end: 0.75rem; margin-inline: 1.5rem; } .supporting-text { font-size: var( --m3e-datepicker-modal-supporting-text-font-size, ${s.typescale.standard.label.large.fontSize} ); font-weight: var( --m3e-datepicker-modal-supporting-text-font-weight, ${s.typescale.standard.label.large.fontWeight} ); line-height: var( --m3e-datepicker-modal-supporting-text-line-height, ${s.typescale.standard.label.large.lineHeight} ); letter-spacing: var( --m3e-datepicker-modal-supporting-text-tracking, ${s.typescale.standard.label.large.tracking} ); margin-block-start: 1rem; margin-inline: 1.5rem; } .divider { height: var(--m3e-divider-thickness, 1px); width: 100%; position: relative; } .divider::before { content: ""; box-sizing: border-box; position: absolute; border-bottom: var(--m3e-divider-thickness, 1px) solid var(--m3e-divider-color, ${s.color.outlineVariant}); height: inherit; left: -0.25rem; right: -0.25rem; } .actions { display: flex; align-items: center; justify-content: flex-end; column-gap: 0.5rem; padding-inline: var(--m3e-datepicker-actions-padding-inline, 0.5rem); } :host(.-docked) { position: absolute; background-color: var(--m3e-datepicker-docked-container-color, ${s.color.surfaceContainer}); border-radius: var(--m3e-datepicker-docked-container-shape, ${s.shape.corner.large}); } :host(.-modal) { position: fixed; inset: 0; margin: auto; transform-origin: top; background-color: var(--m3e-datepicker-modal-container-color, ${s.color.surfaceContainerHigh}); border-radius: var(--m3e-datepicker-modal-container-shape, ${s.shape.corner.extraLarge}); } :host(:not(.-no-animate)) { transition: ${r(`opacity ${s.motion.duration.short2} ${s.motion.easing.standard}, \n transform ${s.motion.duration.short2} ${s.motion.easing.standard},\n overlay ${s.motion.duration.short2} ${s.motion.easing.standard} allow-discrete,\n display ${s.motion.duration.short2} ${s.motion.easing.standard} allow-discrete`)}; } :host { transform: scaleY(0.8); } :host(:popover-open) { transform: scaleY(1); display: inline-flex; opacity: 1; } :host(.-docked)::backdrop { background-color: transparent; } :host(.-modal)::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${s.color.scrim}) 0%, transparent); margin-inline-end: -20px; } :host(.-modal:not(:popover-open))::backdrop { transition: ${r(`background-color ${s.motion.duration.short3} ${s.motion.easing.standard}, \n overlay ${s.motion.duration.short3} ${s.motion.easing.standard} allow-discrete,\n visibility ${s.motion.duration.short3} ${s.motion.easing.standard} allow-discrete`)}; } :host(.-modal:popover-open)::backdrop { background-color: color-mix( in srgb, var(--m3e-dialog-scrim-color, ${s.color.scrim}) var(--m3e-dialog-scrim-opacity, 32%), transparent ); transition: ${r(`background-color ${s.motion.duration.long2} ${s.motion.easing.standard}, \n overlay ${s.motion.duration.long2} ${s.motion.easing.standard} allow-discrete,\n visibility ${s.motion.duration.long2} ${s.motion.easing.standard} allow-discrete`)}; } :host(.-bottom) { transform-origin: top; } :host(.-top) { transform-origin: bottom; } @starting-style { :host(:popover-open) { transform: scaleY(0.8); } :host(.-modal:popover-open)::backdrop { background-color: color-mix(in srgb, var(--m3e-dialog-scrim-color, ${s.color.scrim}) 0%, transparent); } } @media (prefers-reduced-motion) { :host(:not(.-no-animate)) { transition: none; } } @media (forced-colors: active) { :host { background-color: Menu; color: MenuText; border: 1px solid CanvasText; } }`,v([j()],xe.prototype,"_date",void 0),v([j()],xe.prototype,"_rangeStart",void 0),v([j()],xe.prototype,"_rangeEnd",void 0),v([W("m3e-calendar")],xe.prototype,"_calendar",void 0),v([j()],xe.prototype,"_variant",void 0),v([z()],xe.prototype,"variant",void 0),v([z({attribute:"start-view"})],xe.prototype,"startView",void 0),v([z({converter:{fromAttribute:Se}})],xe.prototype,"date",void 0),v([z({attribute:"start-at",converter:{fromAttribute:Se}})],xe.prototype,"startAt",void 0),v([z({attribute:"min-date",converter:{fromAttribute:Se}})],xe.prototype,"minDate",void 0),v([z({attribute:"max-date",converter:{fromAttribute:Se}})],xe.prototype,"maxDate",void 0),v([z({attribute:"range-start",converter:{fromAttribute:Se}})],xe.prototype,"rangeStart",void 0),v([z({attribute:"range-end",converter:{fromAttribute:Se}})],xe.prototype,"rangeEnd",void 0),v([z({attribute:!1})],xe.prototype,"blackoutDates",void 0),v([z({attribute:!1})],xe.prototype,"specialDates",void 0),v([z({attribute:"previous-month-label"})],xe.prototype,"previousMonthLabel",void 0),v([z({attribute:"previous-year-label"})],xe.prototype,"previousYearLabel",void 0),v([z({attribute:"previous-multi-year-label"})],xe.prototype,"previousMultiYearLabel",void 0),v([z({attribute:"next-month-label"})],xe.prototype,"nextMonthLabel",void 0),v([z({attribute:"next-year-label"})],xe.prototype,"nextYearLabel",void 0),v([z({attribute:"next-multi-year-label"})],xe.prototype,"nextMultiYearLabel",void 0),v([z({attribute:"confirm-label"})],xe.prototype,"confirmLabel",void 0),v([z({attribute:"dismiss-label"})],xe.prototype,"dismissLabel",void 0),v([z()],xe.prototype,"label",void 0),xe=ke=v([y("m3e-datepicker")],xe);let Ee=class extends(c(d)){connectedCallback(){super.connectedCallback(),this.parentElement&&(this.parentElement.ariaHasPopup="dialog")}disconnectedCallback(){super.disconnectedCallback(),this.parentElement&&(this.parentElement.ariaHasPopup=null)}_onClick(){this.control instanceof xe&&this.parentElement&&this.control.toggle(this.parentElement,this.closest("m3e-form-field")??void 0)}};
|
|
84
|
-
/**
|
|
85
|
-
* Adapted from Angular Material Datepicker
|
|
86
|
-
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.ts
|
|
87
|
-
*
|
|
88
|
-
* @license MIT
|
|
89
|
-
* Copyright (c) 2025 Google LLC
|
|
90
|
-
* See LICENSE file in the project root for full license text.
|
|
91
|
-
*/
|
|
92
|
-
var Me,Pe,Le,Ce;Ee=v([y("m3e-datepicker-toggle")],Ee);let Ye=class extends zt{constructor(){super(...arguments),Me.add(this)}render(){const t=new Array,e=Ht(this.activeDate,this.minDate,this.maxDate);for(let a=0,i=[];a<Rt;a++)i.push(e+a),3===i.length&&(t.push(i),i=new Array);return a`<table role="grid"><thead aria-hidden="true"><tr><th colspan="${3}"></th></tr></thead><tbody>${t.map(t=>a`<tr role="row">${t.map(t=>f(this,Me,"m",Pe).call(this,t))}</tr>`)}</tbody></table>`}};
|
|
93
|
-
/**
|
|
94
|
-
* Adapted from Angular Material Datepicker
|
|
95
|
-
* Source: https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts
|
|
96
|
-
*
|
|
97
|
-
* @license MIT
|
|
98
|
-
* Copyright (c) 2025 Google LLC
|
|
99
|
-
* See LICENSE file in the project root for full license text.
|
|
100
|
-
*/
|
|
101
|
-
var Te,Oe,Ue,Fe;Me=new WeakSet,Pe=function(t){const e=new Intl.DateTimeFormat(navigator.language,{year:"numeric"}),i=this.activeDate.getFullYear()===t,r=this.date?.getFullYear()===t,s=this.today.getFullYear()===t,n=this.minDate&&t<this.minDate.getFullYear()||this.maxDate&&t>this.maxDate.getFullYear(),o=`year-${t}`;return a`<td role="gridcell" class="${Mt({current:s,selected:r,active:i})}"><div id="${o}" class="item" role="button" tabindex="${i?"0":"-1"}" data-value="${t}" aria-disabled="${Pt(n||void 0)}" aria-current="${Pt(s?"date":void 0)}" aria-pressed="${r}" @click="${f(this,Me,"m",Le)}" @keydown="${f(this,Me,"m",Ce)}"><m3e-focus-ring class="focus-ring" for="${o}"></m3e-focus-ring><m3e-state-layer class="state-layer" for="${o}" ?disable-hover="${n}"></m3e-state-layer><m3e-ripple class="ripple" for="${o}" centered ?disabled="${n}"></m3e-ripple><div class="touch"></div><span>${e.format(new Date(t,0,1))}</span></div></td>`},Le=function(t){const e=t.currentTarget;"true"!==e.ariaDisabled&&e.dataset.value&&(this.activeDate=new Date(this.activeDate),this.activeDate.setFullYear(Number(e.dataset.value)),this.activeDate=Nt(this.activeDate,this.minDate,this.maxDate),this.dispatchEvent(new Event("change",{bubbles:!1})))},Ce=function(t){let e=this.activeDate;switch(t.key){case" ":case"Enter":return t.preventDefault(),void t.currentTarget.click();case"ArrowLeft":case"Left":e=Tt(this.activeDate,"rtl"===m.current?1:-1);break;case"ArrowRight":case"Right":e=Tt(this.activeDate,"rtl"===m.current?-1:1);break;case"ArrowUp":case"Up":e=Tt(this.activeDate,-3);break;case"ArrowDown":case"Down":e=Tt(this.activeDate,3);break;case"Home":e=Tt(this.activeDate,-It(this.activeDate,this.minDate,this.maxDate));break;case"End":e=Tt(this.activeDate,Rt-It(this.activeDate,this.minDate,this.maxDate)-1);break;case"PageUp":e=Tt(this.activeDate,t.altKey?10*-Rt:-Rt);break;case"PageDown":e=Tt(this.activeDate,t.altKey?10*Rt:Rt);break;default:return}t.preventDefault(),this._changeActiveDate(e)},Ye.styles=[zt.styles,t`.item { height: 2.25rem; } .touch { width: 100%; } th { height: 1rem; } td { padding-inline: 1rem; } tbody { font-size: var(--m3e-calendar-item-font-size, ${s.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-calendar-item-font-weight, ${s.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-calendar-item-line-height, ${s.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-calendar-item-tracking, ${s.typescale.standard.body.medium.tracking}); }`],Ye=v([y("m3e-multi-year-view")],Ye);let Ie=class extends zt{constructor(){super(...arguments),Te.add(this)}render(){const t=new Array,e=new Intl.DateTimeFormat(navigator.language,{month:"short"}),i=new Intl.DateTimeFormat(navigator.language,{month:"long"}),r=this.activeDate.getFullYear();for(let a=0,s=new Array;a<12;a++){const n=new Date(r,a,1);s.push({narrow:e.format(n),long:i.format(n),date:n}),4==s.length&&(t.push(s),s=[])}return a`<table role="grid"><thead aria-hidden="true"><tr><th colspan="${4}"></th></tr></thead><tbody>${t.map(t=>a`<tr role="row">${t.map(t=>f(this,Te,"m",Oe).call(this,t))}</tr>`)}</tbody></table>`}};Te=new WeakSet,Oe=function(t){const e=this.activeDate.getFullYear()===t.date.getFullYear()&&this.activeDate.getMonth()===t.date.getMonth(),i=this.date?.getFullYear()===t.date.getFullYear()&&this.date?.getMonth()===t.date.getMonth(),r=this.today.getFullYear()===t.date.getFullYear()&&this.today.getMonth()===t.date.getMonth(),s=this.minDate&&(t.date.getFullYear()<this.minDate.getFullYear()||t.date.getFullYear()===this.minDate.getFullYear()&&t.date.getMonth()<this.minDate.getMonth())||this.maxDate&&(t.date.getFullYear()>this.maxDate.getFullYear()||t.date.getFullYear()===this.maxDate.getFullYear()&&t.date.getMonth()>this.maxDate.getMonth()),n=`month-${t.date.getMonth()}`;return a`<td role="gridcell" class="${Mt({current:r,selected:i,active:e})}"><div id="${n}" class="item" role="button" tabindex="${e?"0":"-1"}" data-value="${t.date.toISOString()}" aria-disabled="${Pt(s||void 0)}" aria-current="${Pt(r?"date":void 0)}" aria-pressed="${i}" @click="${f(this,Te,"m",Ue)}" @keydown="${f(this,Te,"m",Fe)}"><m3e-focus-ring class="focus-ring" for="${n}"></m3e-focus-ring><m3e-state-layer class="state-layer" for="${n}" ?disable-hover="${s}"></m3e-state-layer><m3e-ripple class="ripple" centered for="${n}" ?disabled="${s}"></m3e-ripple><div class="touch"></div><span class="visually-hidden">${t.long}</span> <span aria-hidden="true">${t.narrow}</span></div></td>`},Ue=function(t){const e=t.currentTarget;"true"!==e.ariaDisabled&&e.dataset.value&&(this.activeDate=Nt(new Date(e.dataset.value),this.minDate,this.maxDate),this.dispatchEvent(new Event("change",{bubbles:!1})))},Fe=function(t){let e=this.activeDate;switch(t.key){case" ":case"Enter":return t.preventDefault(),void t.currentTarget.click();case"ArrowLeft":case"Left":e=Yt(this.activeDate,"rtl"===m.current?1:-1);break;case"ArrowRight":case"Right":e=Yt(this.activeDate,"rtl"===m.current?-1:1);break;case"ArrowUp":case"Up":e=Yt(this.activeDate,-4);break;case"ArrowDown":case"Down":e=Yt(this.activeDate,4);break;case"Home":e=Yt(this.activeDate,-this.activeDate.getMonth());break;case"End":e=Yt(this.activeDate,11-this.activeDate.getMonth());break;case"PageUp":e=Tt(this.activeDate,t.altKey?-10:-1);break;case"PageDown":e=Tt(this.activeDate,t.altKey?10:1);break;default:return}t.preventDefault(),this._changeActiveDate(e)},Ie.styles=[zt.styles,t`.item { height: 2.25rem; } .touch { width: 100%; } th { height: 1rem; } td { padding-inline: 0.375rem; } tbody { font-size: var(--m3e-calendar-item-font-size, ${s.typescale.standard.body.medium.fontSize}); font-weight: var(--m3e-calendar-item-font-weight, ${s.typescale.standard.body.medium.fontWeight}); line-height: var(--m3e-calendar-item-line-height, ${s.typescale.standard.body.medium.lineHeight}); letter-spacing: var(--m3e-calendar-item-tracking, ${s.typescale.standard.body.medium.tracking}); }`],Ie=v([y("m3e-year-view")],Ie);export{zt as CalendarViewElementBase,le as M3eCalendarElement,xe as M3eDatepickerElement,Ee as M3eDatepickerToggleElement,Xt as M3eMonthViewElement,Ye as M3eMultiYearViewElement,Ie as M3eYearViewElement};
|
|
102
|
-
//# sourceMappingURL=datepicker.min.js.map
|