@editora/ui-core 0.1.12 → 0.1.14

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.
Files changed (141) hide show
  1. package/README.md +95 -5
  2. package/dist/alert-dialog.cjs.js +18 -18
  3. package/dist/alert-dialog.esm.js +130 -117
  4. package/dist/app-header.cjs.js +22 -2
  5. package/dist/app-header.esm.js +22 -2
  6. package/dist/badge.cjs.js +5 -5
  7. package/dist/badge.esm.js +9 -8
  8. package/dist/color-picker.cjs.js +4 -4
  9. package/dist/color-picker.esm.js +40 -31
  10. package/dist/combobox.cjs.js +21 -21
  11. package/dist/combobox.esm.js +79 -40
  12. package/dist/command-palette.cjs.js +1 -1
  13. package/dist/command-palette.esm.js +2 -2
  14. package/dist/components/date-time-utils.d.ts +2 -1
  15. package/dist/components/date-time-utils.d.ts.map +1 -1
  16. package/dist/components/ui-alert-dialog.d.ts +2 -0
  17. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  18. package/dist/components/ui-app-header.d.ts.map +1 -1
  19. package/dist/components/ui-badge.d.ts.map +1 -1
  20. package/dist/components/ui-color-picker.d.ts.map +1 -1
  21. package/dist/components/ui-combobox.d.ts +4 -1
  22. package/dist/components/ui-combobox.d.ts.map +1 -1
  23. package/dist/components/ui-context-menu.d.ts +6 -0
  24. package/dist/components/ui-context-menu.d.ts.map +1 -1
  25. package/dist/components/ui-date-picker.d.ts +3 -0
  26. package/dist/components/ui-date-picker.d.ts.map +1 -1
  27. package/dist/components/ui-date-range-picker.d.ts +3 -0
  28. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  29. package/dist/components/ui-date-range-time-picker.d.ts +3 -0
  30. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  31. package/dist/components/ui-date-time-picker.d.ts +3 -0
  32. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  33. package/dist/components/ui-dialog.d.ts +3 -0
  34. package/dist/components/ui-dialog.d.ts.map +1 -1
  35. package/dist/components/ui-drawer.d.ts +14 -0
  36. package/dist/components/ui-drawer.d.ts.map +1 -1
  37. package/dist/components/ui-floating-toolbar.d.ts +3 -0
  38. package/dist/components/ui-floating-toolbar.d.ts.map +1 -1
  39. package/dist/components/ui-gantt.d.ts +30 -1
  40. package/dist/components/ui-gantt.d.ts.map +1 -1
  41. package/dist/components/ui-hover-card.d.ts +3 -0
  42. package/dist/components/ui-hover-card.d.ts.map +1 -1
  43. package/dist/components/ui-menu.d.ts +1 -0
  44. package/dist/components/ui-menu.d.ts.map +1 -1
  45. package/dist/components/ui-menubar.d.ts +1 -0
  46. package/dist/components/ui-menubar.d.ts.map +1 -1
  47. package/dist/components/ui-positioner.d.ts.map +1 -1
  48. package/dist/components/ui-quick-actions.d.ts.map +1 -1
  49. package/dist/components/ui-radio.d.ts +47 -0
  50. package/dist/components/ui-radio.d.ts.map +1 -0
  51. package/dist/components/ui-select.d.ts +8 -0
  52. package/dist/components/ui-select.d.ts.map +1 -1
  53. package/dist/components/ui-selection-popup.d.ts.map +1 -1
  54. package/dist/components/ui-stepper.d.ts.map +1 -1
  55. package/dist/components/ui-time-picker.d.ts +3 -0
  56. package/dist/components/ui-time-picker.d.ts.map +1 -1
  57. package/dist/context-menu.cjs.js +12 -12
  58. package/dist/context-menu.esm.js +160 -133
  59. package/dist/date-field.cjs.js +1 -1
  60. package/dist/date-field.esm.js +3 -2
  61. package/dist/date-picker.cjs.js +13 -13
  62. package/dist/date-picker.esm.js +101 -67
  63. package/dist/date-range-picker.cjs.js +14 -14
  64. package/dist/date-range-picker.esm.js +99 -65
  65. package/dist/date-range-time-picker.cjs.js +13 -13
  66. package/dist/date-range-time-picker.esm.js +77 -45
  67. package/dist/date-time-picker.cjs.js +13 -13
  68. package/dist/date-time-picker.esm.js +133 -101
  69. package/dist/date-time-utils-66480de4.js +1 -0
  70. package/dist/date-time-utils-a2c7af25.mjs +307 -0
  71. package/dist/dialog.cjs.js +29 -20
  72. package/dist/dialog.esm.js +90 -70
  73. package/dist/drawer.cjs.js +16 -16
  74. package/dist/drawer.esm.js +216 -98
  75. package/dist/floating-toolbar.cjs.js +6 -16
  76. package/dist/floating-toolbar.esm.js +57 -40
  77. package/dist/gantt.cjs.js +656 -74
  78. package/dist/gantt.esm.js +1050 -100
  79. package/dist/hover-card.cjs.js +4 -4
  80. package/dist/hover-card.esm.js +62 -39
  81. package/dist/index.cjs.js +1 -1
  82. package/dist/index.d.ts +2 -0
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.esm.js +300 -286
  85. package/dist/menu.cjs.js +2 -2
  86. package/dist/menu.esm.js +118 -110
  87. package/dist/menubar.cjs.js +5 -5
  88. package/dist/menubar.esm.js +83 -78
  89. package/dist/{overlayManager-ece06517.js → overlayManager-0eda4e08.js} +1 -1
  90. package/dist/{overlayManager-86454af7.mjs → overlayManager-5bbd4dc3.mjs} +1 -1
  91. package/dist/popover.cjs.js +1 -1
  92. package/dist/popover.esm.js +2 -2
  93. package/dist/portal-c69756c0.js +1 -0
  94. package/dist/portal-fe73e5cc.mjs +123 -0
  95. package/dist/portal.d.ts +29 -3
  96. package/dist/portal.d.ts.map +1 -1
  97. package/dist/positioner-33529bb8.js +1 -0
  98. package/dist/positioner-e9770c66.mjs +582 -0
  99. package/dist/positioner.cjs.js +2 -2
  100. package/dist/positioner.esm.js +36 -26
  101. package/dist/primitives/positioner.d.ts +199 -1
  102. package/dist/primitives/positioner.d.ts.map +1 -1
  103. package/dist/quick-actions.cjs.js +10 -4
  104. package/dist/quick-actions.esm.js +27 -21
  105. package/dist/radio.cjs.js +259 -0
  106. package/dist/radio.esm.js +455 -0
  107. package/dist/{runtime-4ac0107b.mjs → runtime-161f68a2.mjs} +24 -23
  108. package/dist/runtime-3f13807b.js +1 -0
  109. package/dist/runtime.cjs.js +1 -1
  110. package/dist/runtime.d.ts +2 -0
  111. package/dist/runtime.d.ts.map +1 -1
  112. package/dist/runtime.esm.js +39 -24
  113. package/dist/scroll-lock-31da444f.mjs +56 -0
  114. package/dist/scroll-lock-d7b0df21.js +1 -0
  115. package/dist/scroll-lock.d.ts.map +1 -1
  116. package/dist/select.cjs.js +14 -15
  117. package/dist/select.esm.js +117 -97
  118. package/dist/selection-popup.cjs.js +4 -7
  119. package/dist/selection-popup.esm.js +8 -11
  120. package/dist/split-button.cjs.js +1 -1
  121. package/dist/split-button.esm.js +2 -2
  122. package/dist/standalone/radio.d.ts +2 -0
  123. package/dist/standalone/radio.d.ts.map +1 -0
  124. package/dist/stepper.cjs.js +19 -50
  125. package/dist/stepper.esm.js +17 -48
  126. package/dist/time-field.cjs.js +1 -1
  127. package/dist/time-field.esm.js +3 -2
  128. package/dist/time-picker.cjs.js +15 -15
  129. package/dist/time-picker.esm.js +100 -68
  130. package/dist/tooltip.cjs.js +1 -1
  131. package/dist/tooltip.esm.js +2 -1
  132. package/package.json +1 -1
  133. package/dist/date-time-utils-5cf58cd0.js +0 -1
  134. package/dist/date-time-utils-bdceb7af.mjs +0 -273
  135. package/dist/portal-1cf392ca.mjs +0 -114
  136. package/dist/portal-d8d7fbca.js +0 -1
  137. package/dist/positioner-accc6e5f.js +0 -1
  138. package/dist/positioner-fbd61bf1.mjs +0 -132
  139. package/dist/runtime-5f282bc8.js +0 -1
  140. package/dist/scroll-lock-48793569.js +0 -1
  141. package/dist/scroll-lock-9de6d328.mjs +0 -53
@@ -1,16 +1,16 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("./ElementBase-1b301e7f.js"),w=require("./calendar-a8735e40.js"),s=require("./date-time-utils-5cf58cd0.js");require("./scroll-lock-48793569.js");let L=0;const q=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("./ElementBase-1b301e7f.js"),L=require("./dismissable-layer-193e3bed.js"),w=require("./calendar-a8735e40.js"),a=require("./date-time-utils-66480de4.js");require("./scroll-lock-d7b0df21.js");require("./positioner-33529bb8.js");let q=0;const M=`
2
2
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
3
3
  <path d="M6 2a1 1 0 0 1 1 1v1h6V3a1 1 0 1 1 2 0v1h.5A2.5 2.5 0 0 1 18 6.5v9A2.5 2.5 0 0 1 15.5 18h-11A2.5 2.5 0 0 1 2 15.5v-9A2.5 2.5 0 0 1 4.5 4H5V3a1 1 0 0 1 1-1Zm10 7H4v6.5c0 .276.224.5.5.5h11a.5.5 0 0 0 .5-.5V9ZM4.5 6a.5.5 0 0 0-.5.5V7h12v-.5a.5.5 0 0 0-.5-.5h-11Z" fill="currentColor"/>
4
4
  </svg>
5
- `,M=`
5
+ `,V=`
6
6
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
7
7
  <path d="M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.12l3.71-3.9a.75.75 0 1 1 1.08 1.04l-4.25 4.47a.75.75 0 0 1-1.08 0L5.2 8.27a.75.75 0 0 1 .02-1.06Z" fill="currentColor"/>
8
8
  </svg>
9
- `,V=`
9
+ `,E=`
10
10
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
11
11
  <path d="M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06Z" fill="currentColor"/>
12
12
  </svg>
13
- `,E=`
13
+ `,$=`
14
14
  :host {
15
15
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
16
16
  --ui-dp-surface: linear-gradient(
@@ -381,7 +381,7 @@
381
381
  transform: rotate(360deg);
382
382
  }
383
383
  }
384
- `,$=`
384
+ `,R=`
385
385
  .overlay {
386
386
  position: fixed;
387
387
  z-index: var(--ui-dp-z, 1600);
@@ -524,10 +524,10 @@
524
524
  transform: translateY(0);
525
525
  }
526
526
  }
527
- `;function v(S){return S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}class z extends P.ElementBase{constructor(){super(...arguments),this._value=null,this._pendingValue=null,this._draftInput="",this._inlineError="",this._open=!1,this._syncing=!1,this._overlay=null,this._releaseScrollLock=null,this._lastOpenSource="api",this._restoreFocusEl=null,this._isInitialized=!1,this._hasView=!1,this._overlayMode=null,this._uid=`ui-dp-${++L}`,this._inputId=`${this._uid}-input`,this._labelId=`${this._uid}-label`,this._hintId=`${this._uid}-hint`,this._errorId=`${this._uid}-error`,this._panelId=`${this._uid}-panel`,this._panelTitleId=`${this._uid}-panel-title`,this._overlayFocusedOnOpen=!1,this._inlineCalendarFramePending=!1,this._inlineCalendarUpgradePending=!1,this._schedulePosition=s.rafThrottle(()=>this._positionOverlay()),this._onRootClickBound=e=>this._onRootClick(e),this._onRootInputBound=e=>this._onRootInput(e),this._onRootBlurBound=e=>this._onRootBlur(e),this._onRootKeyDownBound=e=>this._onRootKeyDown(e),this._onDocumentPointerDownBound=e=>this._onDocumentPointerDown(e),this._onDocumentKeyDownBound=e=>this._onDocumentKeyDown(e),this._onWindowResizeBound=()=>this._schedulePosition.run(),this._onWindowScrollBound=()=>this._schedulePosition.run(),this._onOverlayClickBound=e=>this._onOverlayClick(e),this._onOverlaySelectBound=e=>this._onCalendarSelect(e)}static get observedAttributes(){return["open","default-open","value","default-value","min","max","locale","translations","week-start","size","shape","bare","variant","state","placeholder","label","hint","error","clearable","allow-input","close-on-select","outside-click","disabled","readonly","required","name","mode","events","events-max","events-display","format","display-format","show-footer"]}connectedCallback(){if(super.connectedCallback(),this.root.addEventListener("click",this._onRootClickBound),this.root.addEventListener("input",this._onRootInputBound),this.root.addEventListener("focusout",this._onRootBlurBound),this.root.addEventListener("keydown",this._onRootKeyDownBound),!this._isInitialized){const e=this._clampToBounds(s.normalizeDateIso(this.getAttribute("value"))||s.normalizeDateIso(this.getAttribute("default-value")));this._value=e,this._pendingValue=e,this._draftInput=this._formatDisplay(e),this._open=this.hasAttribute("open")||s.isTruthyAttr(this.getAttribute("default-open")),this._isInitialized=!0}this._open&&!this._isInlineMode()&&this._ensureOverlay(),this._isInlineMode()&&this._scheduleInlineCalendarSync()}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("focusout",this._onRootBlurBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this._destroyOverlay(),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(t!==i){if(e==="value"&&!this._syncing&&(this._value=this._clampToBounds(s.normalizeDateIso(i)),this._pendingValue=this._value,this._draftInput=this._formatDisplay(this._value),this._inlineError="",this._syncValueAttribute(this._value)),e==="open"&&!this._syncing&&(this._open=this.hasAttribute("open"),this._syncOverlay(this._open?"api":"outside")),e==="mode"&&this._syncOverlay("attribute"),e==="disabled"&&this.hasAttribute("disabled")&&this._setOpen(!1,"outside"),(e==="min"||e==="max")&&!this._syncing){const r=this._clampToBounds(this._value),n=this._clampToBounds(this._pendingValue);this._value=r,this._pendingValue=n,this._draftInput=this._formatDisplay(this._allowInput()?n:r),this._syncValueAttribute(r)}if(e==="state"&&this._state()==="loading"&&this._setOpen(!1,"outside"),!!this.isConnected){if(!this._hasView){this.requestRender();return}this._updateHostState()}}}_isInlineMode(){return(this.getAttribute("mode")||"popover")==="inline"}_isMobileSheet(){return s.shouldUseMobileSheet(this.getAttribute("mode"))}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_allowInput(){return s.isTruthyAttr(this.getAttribute("allow-input"),!0)}_clearable(){return s.isTruthyAttr(this.getAttribute("clearable"),!0)}_closeOnSelect(){return s.isTruthyAttr(this.getAttribute("close-on-select"),!0)}_showFooter(){return s.isTruthyAttr(this.getAttribute("show-footer"),!0)}_isBare(){return s.isTruthyAttr(this.getAttribute("bare"),!1)}_locale(){return s.normalizeLocale(this.getAttribute("locale"))}_translations(){return w.resolveDateTimeTranslations(this.getAttribute("locale"),this.getAttribute("translations"))}_formatMode(){const e=(this.getAttribute("format")||"locale").trim();return e==="iso"||e==="custom"?e:"locale"}_displayFormat(){return(this.getAttribute("display-format")||"").trim()||null}_placeholder(){const e=this._translations(),t=this.getAttribute("placeholder");return t||(this._formatMode()==="iso"?"YYYY-MM-DD":e.selectDate)}_todayIso(){const e=new Date,t=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${t}-${i}`}_state(){const e=(this.getAttribute("state")||"").trim().toLowerCase();return e==="loading"||e==="success"||e==="error"?e:"idle"}_isInteractionBlocked(){return this._isDisabled()||this._state()==="loading"}_minIso(){return s.parseConstraintDate(this.getAttribute("min"))}_maxIso(){return s.parseConstraintDate(this.getAttribute("max"))}_resolvedBounds(){let e=this._minIso(),t=this._maxIso();if(e&&t&&w.compareISO(e,t)>0){const i=e;e=t,t=i}return{min:e,max:t}}_clampToBounds(e){if(!e)return null;const{min:t,max:i}=this._resolvedBounds();return s.clampDateIso(e,t,i)}_isWithinBounds(e){const{min:t,max:i}=this._resolvedBounds();return!(t&&w.compareISO(e,t)<0||i&&w.compareISO(e,i)>0)}_formatDisplay(e){return s.formatDateForDisplay(e,this._locale(),this._formatMode(),this._displayFormat())}_syncValueAttribute(e){this._syncing=!0;try{e?this.getAttribute("value")!==e&&this.setAttribute("value",e):this.hasAttribute("value")&&this.removeAttribute("value")}finally{this._syncing=!1}}_syncOpenAttribute(e){this._syncing=!0;try{e?this.hasAttribute("open")||this.setAttribute("open",""):this.hasAttribute("open")&&this.removeAttribute("open")}finally{this._syncing=!1}}_emitInput(e){const t={mode:"single",value:this._pendingValue,displayValue:this._formatDisplay(this._pendingValue),source:e};this.dispatchEvent(new CustomEvent("input",{detail:t,bubbles:!0,composed:!0}))}_emitChange(e){const t={mode:"single",value:this._value,displayValue:this._formatDisplay(this._value),source:e};this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}_emitInvalid(e,t){this.dispatchEvent(new CustomEvent("invalid",{detail:{raw:e,reason:t},bubbles:!0,composed:!0}))}_setOpen(e,t){e&&this._isInteractionBlocked()||this._open!==e&&(this._open=e,this._overlayFocusedOnOpen=!1,this._lastOpenSource=t,this._syncOpenAttribute(e),this._syncOverlay(t),this._updateHostState(),this.dispatchEvent(new CustomEvent(e?"open":"close",{bubbles:!0,composed:!0})))}_syncOverlay(e){if(this._isInlineMode()){this._destroyOverlay();return}if(this._open)this._ensureOverlay(),this._syncOverlayState();else if(this._destroyOverlay(),e!=="outside"){const t=this._restoreFocusEl||this.root.querySelector(".input");if(this._restoreFocusEl=null,t&&t.isConnected)try{t.focus()}catch{}}}_ensureOverlay(){if(this._overlay||typeof document>"u")return;const e=document.createElement("div");e.className="ui-date-picker-overlay-host",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.zIndex="1100",e.style.pointerEvents="none",e.addEventListener("click",this._onOverlayClickBound),e.addEventListener("select",this._onOverlaySelectBound),e.addEventListener("change",this._onOverlaySelectBound),document.body.appendChild(e),this._overlay=e,document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound),window.addEventListener("resize",this._onWindowResizeBound),window.addEventListener("scroll",this._onWindowScrollBound,!0),this._isMobileSheet()&&(this._releaseScrollLock=s.lockBodyScroll())}_destroyOverlay(){this._overlay&&(this._schedulePosition.cancel(),document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound),window.removeEventListener("resize",this._onWindowResizeBound),window.removeEventListener("scroll",this._onWindowScrollBound,!0),this._overlay.removeEventListener("click",this._onOverlayClickBound),this._overlay.removeEventListener("select",this._onOverlaySelectBound),this._overlay.removeEventListener("change",this._onOverlaySelectBound),this._overlay.parentElement&&this._overlay.parentElement.removeChild(this._overlay),this._overlay=null,this._overlayMode=null,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null))}_positionOverlay(){if(!this._overlay||!this._open||this._isMobileSheet())return;const e=this.root.querySelector(".field"),t=this._overlay.querySelector(".panel");if(!e||!t)return;const i=e.getBoundingClientRect();t.style.setProperty("--ui-dp-panel-width",`${Math.round(i.width)}px`);const r=t.getBoundingClientRect(),n=s.computePopoverPosition(i,r);t.style.position="absolute",t.style.top=`${Math.round(n.top)}px`,t.style.left=`${Math.round(n.left)}px`,t.setAttribute("data-placement",n.placement)}_parseAndValidate(e){return s.parseUserDateInput(e,this._locale())}_commit(e,t){if(this._isReadonly()||this._isInteractionBlocked())return;const i=this._clampToBounds(e);this._value=i,this._pendingValue=i,this._draftInput=this._formatDisplay(i),this._inlineError="",this._syncValueAttribute(i),this._emitInput(t),this._emitChange(t),this._updateHostState()}_renderPanelInner(e){const t=this._translations(),i=(this.getAttribute("label")||"").trim(),r=!!i||e,n=!this._closeOnSelect()||e,o=e?"sheet":"panel",l=e?"true":"false";return`
528
- <style>${$}</style>
527
+ `;function v(S){return S.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}class z extends P.ElementBase{constructor(){super(...arguments),this._value=null,this._pendingValue=null,this._draftInput="",this._inlineError="",this._open=!1,this._syncing=!1,this._overlay=null,this._dismissableLayer=null,this._releaseScrollLock=null,this._lastOpenSource="api",this._restoreFocusEl=null,this._isInitialized=!1,this._hasView=!1,this._overlayMode=null,this._uid=`ui-dp-${++q}`,this._inputId=`${this._uid}-input`,this._labelId=`${this._uid}-label`,this._hintId=`${this._uid}-hint`,this._errorId=`${this._uid}-error`,this._panelId=`${this._uid}-panel`,this._panelTitleId=`${this._uid}-panel-title`,this._overlayFocusedOnOpen=!1,this._inlineCalendarFramePending=!1,this._inlineCalendarUpgradePending=!1,this._schedulePosition=a.rafThrottle(()=>this._positionOverlay()),this._onRootClickBound=e=>this._onRootClick(e),this._onRootInputBound=e=>this._onRootInput(e),this._onRootBlurBound=e=>this._onRootBlur(e),this._onRootKeyDownBound=e=>this._onRootKeyDown(e),this._onDocumentPointerDownBound=e=>this._onDocumentPointerDown(e),this._onDocumentKeyDownBound=e=>this._onDocumentKeyDown(e),this._onWindowResizeBound=()=>this._schedulePosition.run(),this._onWindowScrollBound=e=>{a.eventOriginatesWithin(e,[this._overlay])||this._schedulePosition.run()},this._onOverlayClickBound=e=>this._onOverlayClick(e),this._onOverlaySelectBound=e=>this._onCalendarSelect(e)}static get observedAttributes(){return["open","default-open","value","default-value","min","max","locale","translations","week-start","size","shape","bare","variant","state","placeholder","label","hint","error","clearable","allow-input","close-on-select","outside-click","disabled","readonly","required","name","mode","events","events-max","events-display","format","display-format","show-footer"]}connectedCallback(){if(super.connectedCallback(),this.root.addEventListener("click",this._onRootClickBound),this.root.addEventListener("input",this._onRootInputBound),this.root.addEventListener("focusout",this._onRootBlurBound),this.root.addEventListener("keydown",this._onRootKeyDownBound),!this._isInitialized){const e=this._clampToBounds(a.normalizeDateIso(this.getAttribute("value"))||a.normalizeDateIso(this.getAttribute("default-value")));this._value=e,this._pendingValue=e,this._draftInput=this._formatDisplay(e),this._open=this.hasAttribute("open")||a.isTruthyAttr(this.getAttribute("default-open")),this._isInitialized=!0}this._open&&!this._isInlineMode()&&this._ensureOverlay(),this._isInlineMode()&&this._scheduleInlineCalendarSync()}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClickBound),this.root.removeEventListener("input",this._onRootInputBound),this.root.removeEventListener("focusout",this._onRootBlurBound),this.root.removeEventListener("keydown",this._onRootKeyDownBound),this._destroyOverlay(),super.disconnectedCallback()}attributeChangedCallback(e,t,i){if(t!==i){if(e==="value"&&!this._syncing&&(this._value=this._clampToBounds(a.normalizeDateIso(i)),this._pendingValue=this._value,this._draftInput=this._formatDisplay(this._value),this._inlineError="",this._syncValueAttribute(this._value)),e==="open"&&!this._syncing&&(this._open=this.hasAttribute("open"),this._syncOverlay(this._open?"api":"outside")),e==="mode"&&this._syncOverlay("attribute"),e==="disabled"&&this.hasAttribute("disabled")&&this._setOpen(!1,"outside"),(e==="min"||e==="max")&&!this._syncing){const r=this._clampToBounds(this._value),n=this._clampToBounds(this._pendingValue);this._value=r,this._pendingValue=n,this._draftInput=this._formatDisplay(this._allowInput()?n:r),this._syncValueAttribute(r)}if(e==="state"&&this._state()==="loading"&&this._setOpen(!1,"outside"),!!this.isConnected){if(!this._hasView){this.requestRender();return}this._updateHostState()}}}_isInlineMode(){return(this.getAttribute("mode")||"popover")==="inline"}_isMobileSheet(){return a.shouldUseMobileSheet(this.getAttribute("mode"))}_isDisabled(){return this.hasAttribute("disabled")}_isReadonly(){return this.hasAttribute("readonly")}_allowInput(){return a.isTruthyAttr(this.getAttribute("allow-input"),!0)}_clearable(){return a.isTruthyAttr(this.getAttribute("clearable"),!0)}_closeOnSelect(){return a.isTruthyAttr(this.getAttribute("close-on-select"),!0)}_showFooter(){return a.isTruthyAttr(this.getAttribute("show-footer"),!0)}_isBare(){return a.isTruthyAttr(this.getAttribute("bare"),!1)}_locale(){return a.normalizeLocale(this.getAttribute("locale"))}_translations(){return w.resolveDateTimeTranslations(this.getAttribute("locale"),this.getAttribute("translations"))}_formatMode(){const e=(this.getAttribute("format")||"locale").trim();return e==="iso"||e==="custom"?e:"locale"}_displayFormat(){return(this.getAttribute("display-format")||"").trim()||null}_placeholder(){const e=this._translations(),t=this.getAttribute("placeholder");return t||(this._formatMode()==="iso"?"YYYY-MM-DD":e.selectDate)}_todayIso(){const e=new Date,t=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${t}-${i}`}_state(){const e=(this.getAttribute("state")||"").trim().toLowerCase();return e==="loading"||e==="success"||e==="error"?e:"idle"}_isInteractionBlocked(){return this._isDisabled()||this._state()==="loading"}_minIso(){return a.parseConstraintDate(this.getAttribute("min"))}_maxIso(){return a.parseConstraintDate(this.getAttribute("max"))}_resolvedBounds(){let e=this._minIso(),t=this._maxIso();if(e&&t&&w.compareISO(e,t)>0){const i=e;e=t,t=i}return{min:e,max:t}}_clampToBounds(e){if(!e)return null;const{min:t,max:i}=this._resolvedBounds();return a.clampDateIso(e,t,i)}_isWithinBounds(e){const{min:t,max:i}=this._resolvedBounds();return!(t&&w.compareISO(e,t)<0||i&&w.compareISO(e,i)>0)}_formatDisplay(e){return a.formatDateForDisplay(e,this._locale(),this._formatMode(),this._displayFormat())}_syncValueAttribute(e){this._syncing=!0;try{e?this.getAttribute("value")!==e&&this.setAttribute("value",e):this.hasAttribute("value")&&this.removeAttribute("value")}finally{this._syncing=!1}}_syncOpenAttribute(e){this._syncing=!0;try{e?this.hasAttribute("open")||this.setAttribute("open",""):this.hasAttribute("open")&&this.removeAttribute("open")}finally{this._syncing=!1}}_emitInput(e){const t={mode:"single",value:this._pendingValue,displayValue:this._formatDisplay(this._pendingValue),source:e};this.dispatchEvent(new CustomEvent("input",{detail:t,bubbles:!0,composed:!0}))}_emitChange(e){const t={mode:"single",value:this._value,displayValue:this._formatDisplay(this._value),source:e};this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))}_emitInvalid(e,t){this.dispatchEvent(new CustomEvent("invalid",{detail:{raw:e,reason:t},bubbles:!0,composed:!0}))}_setOpen(e,t){e&&this._isInteractionBlocked()||this._open!==e&&(this._open=e,this._overlayFocusedOnOpen=!1,this._lastOpenSource=t,this._syncOpenAttribute(e),this._syncOverlay(t),this._updateHostState(),this.dispatchEvent(new CustomEvent(e?"open":"close",{bubbles:!0,composed:!0})))}_syncOverlay(e){if(this._isInlineMode()){this._destroyOverlay();return}if(this._open)this._ensureOverlay(),this._syncOverlayState();else if(this._destroyOverlay(),e!=="outside"){const t=this._restoreFocusEl||this.root.querySelector(".input");if(this._restoreFocusEl=null,t&&t.isConnected)try{t.focus()}catch{}}}_ensureOverlay(){if(this._overlay||typeof document>"u")return;const e=document.createElement("div");e.className="ui-date-picker-overlay-host",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.pointerEvents="none",e.addEventListener("click",this._onOverlayClickBound),e.addEventListener("select",this._onOverlaySelectBound),e.addEventListener("change",this._onOverlaySelectBound),document.body.appendChild(e),this._overlay=e,this._syncOverlayHostZIndex(),document.addEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.addEventListener("keydown",this._onDocumentKeyDownBound),window.addEventListener("resize",this._onWindowResizeBound),window.addEventListener("scroll",this._onWindowScrollBound,{passive:!0,capture:!0}),this._isMobileSheet()&&(this._releaseScrollLock=a.lockBodyScroll())}_syncOverlayHostZIndex(){if(!this._overlay||typeof window>"u")return;const e=window.getComputedStyle(this).getPropertyValue("--ui-dp-z").trim();this._overlay.style.zIndex=e||"1600"}_destroyOverlay(){var e;(e=this._dismissableLayer)==null||e.destroy(),this._dismissableLayer=null,this._overlay&&(this._schedulePosition.cancel(),document.removeEventListener("pointerdown",this._onDocumentPointerDownBound,!0),document.removeEventListener("keydown",this._onDocumentKeyDownBound),window.removeEventListener("resize",this._onWindowResizeBound),window.removeEventListener("scroll",this._onWindowScrollBound,!0),this._overlay.removeEventListener("click",this._onOverlayClickBound),this._overlay.removeEventListener("select",this._onOverlaySelectBound),this._overlay.removeEventListener("change",this._onOverlaySelectBound),this._overlay.parentElement&&this._overlay.parentElement.removeChild(this._overlay),this._overlay=null,this._overlayMode=null,this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null))}_syncDismissableLayer(){var i;if((i=this._dismissableLayer)==null||i.destroy(),this._dismissableLayer=null,!this._open||!this._overlay)return;const e=this._overlay.querySelector(".panel, .sheet"),t=this.root.querySelector(".field");e&&(this._dismissableLayer=L.createDismissableLayer({node:e,trigger:t,closeOnEscape:!0,closeOnPointerOutside:!0,closeOnFocusOutside:!1,onBeforeDismiss:r=>r==="escape-key"?(this._setOpen(!1,"escape"),!1):(r==="outside-pointer"&&this._setOpen(!1,"outside"),!1)}))}_positionOverlay(){if(!this._overlay||!this._open||this._isMobileSheet())return;const e=this.root.querySelector(".field"),t=this._overlay.querySelector(".panel");if(!e||!t)return;const i=e.getBoundingClientRect();t.style.setProperty("--ui-dp-panel-width",`${Math.round(i.width)}px`);const r=t.getBoundingClientRect(),n=t.getAttribute("data-placement"),s=a.computePopoverPosition(i,r,8,8,n==="top"?"top":n==="bottom"?"bottom":null);t.style.position="absolute",t.style.top=`${Math.round(s.top)}px`,t.style.left=`${Math.round(s.left)}px`,t.setAttribute("data-placement",s.placement)}_parseAndValidate(e){return a.parseUserDateInput(e,this._locale())}_commit(e,t){if(this._isReadonly()||this._isInteractionBlocked())return;const i=this._clampToBounds(e);this._value=i,this._pendingValue=i,this._draftInput=this._formatDisplay(i),this._inlineError="",this._syncValueAttribute(i),this._emitInput(t),this._emitChange(t),this._updateHostState()}_renderPanelInner(e){const t=this._translations(),i=(this.getAttribute("label")||"").trim(),r=!!i||e,n=!this._closeOnSelect()||e,s=e?"sheet":"panel",l=e?"true":"false";return`
528
+ <style>${R}</style>
529
529
  ${e?'<div class="sheet-backdrop" data-action="backdrop"></div>':""}
530
- <section class="${o}" id="${this._panelId}" part="${e?"sheet":"popover"}" role="dialog" aria-modal="${l}" aria-labelledby="${this._panelTitleId}" aria-label="${v(t.datePickerPanel)}">
530
+ <section class="${s}" id="${this._panelId}" part="${e?"sheet":"popover"}" role="dialog" aria-modal="${l}" aria-labelledby="${this._panelTitleId}" aria-label="${v(t.datePickerPanel)}">
531
531
  <header class="header" part="header" ${r?"":"hidden"}>
532
532
  <p class="title" id="${this._panelTitleId}" ${i?"":"hidden"}>${v(i)}</p>
533
533
  ${e?`<button type="button" class="action" data-action="cancel">${v(t.cancel)}</button>`:""}
@@ -539,19 +539,19 @@
539
539
  ${n?`<button type="button" class="action" data-tone="primary" data-action="apply" part="apply">${v(t.apply)}</button>`:""}
540
540
  </footer>
541
541
  </section>
542
- `}_syncCalendarElement(e){const t=(a,c)=>{if(c==null||c===""){e.hasAttribute(a)&&e.removeAttribute(a);return}e.getAttribute(a)!==c&&e.setAttribute(a,c)},i=(a,c)=>{c?e.hasAttribute(a)||e.setAttribute(a,""):e.hasAttribute(a)&&e.removeAttribute(a)},{min:r,max:n}=this._resolvedBounds();t("selection","single"),t("value",this._pendingValue),t("min",r),t("max",n),t("locale",this.getAttribute("locale")),t("translations",this.getAttribute("translations")),t("week-start",this.getAttribute("week-start"));const l=this.getAttribute("size")||"sm";t("size",l==="lg"?"md":"sm"),t("variant",this.getAttribute("variant")),t("outside-click",this.getAttribute("outside-click")),t("events",this.getAttribute("events")),t("events-max",this.getAttribute("events-max")),t("events-display",this.getAttribute("events-display"));const u=e.classList.contains("inline-calendar");l==="lg"?(e.style.setProperty("--ui-calendar-day-height","1.95em"),e.style.setProperty("--ui-calendar-day-padding-block","0.2em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.26em"),e.style.setProperty("--ui-calendar-gap","0.42em"),e.style.setProperty("--ui-calendar-day-font-size","0.78em"),e.style.setProperty("--ui-calendar-weekday-font-size","0.7em"),e.style.setProperty("--ui-calendar-title-font-size","0.88em")):(e.style.setProperty("--ui-calendar-day-height","2.4em"),e.style.setProperty("--ui-calendar-day-padding-block","0.14em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.22em"),e.style.setProperty("--ui-calendar-gap","0.34em"),e.style.setProperty("--ui-calendar-day-font-size","0.72em"),e.style.setProperty("--ui-calendar-weekday-font-size","0.64em"),e.style.setProperty("--ui-calendar-title-font-size","0.8em")),u?(e.style.setProperty("--ui-calendar-day-height",l==="lg"?"2.1em":"1.92em"),e.style.setProperty("--ui-calendar-day-padding-block","0.08em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.14em"),e.style.setProperty("--ui-calendar-frame-padding","0.28em"),e.style.setProperty("--ui-calendar-week-gap","0.16em"),e.style.setProperty("--ui-calendar-control-height","1.64em"),e.style.setProperty("--ui-calendar-gap","0.2em"),e.style.setProperty("--ui-calendar-day-font-size",l==="lg"?"0.76em":"0.68em"),e.style.setProperty("--ui-calendar-weekday-font-size",l==="lg"?"0.66em":"0.58em"),e.style.setProperty("--ui-calendar-title-font-size",l==="lg"?"0.84em":"0.76em")):(e.style.removeProperty("--ui-calendar-frame-padding"),e.style.removeProperty("--ui-calendar-week-gap"),e.style.removeProperty("--ui-calendar-control-height")),i("readonly",this._isReadonly()),i("disabled",this._isInteractionBlocked()),i("bare",this._isBare()),t("tabindex","-1"),t("aria-label",this.getAttribute("label")||this._translations().selectDate)}_ensureOverlayContent(e){if(!this._overlay)return;const t=e?"sheet":"popover";this._overlayMode===t&&this._overlay.querySelector(".dp-calendar")||(this._overlayMode=t,this._overlay.innerHTML=e?`<div class="sheet-wrap">${this._renderPanelInner(!0)}</div>`:`<div class="overlay">${this._renderPanelInner(!1)}</div>`)}_syncOverlayState(){if(!this._overlay)return;const e=this._isMobileSheet();e&&!this._releaseScrollLock?this._releaseScrollLock=s.lockBodyScroll():!e&&this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null),this._ensureOverlayContent(e);const t=this._overlay.querySelector(".title"),i=this._overlay.querySelector(".panel, .sheet"),r=this._overlay.querySelector(".header"),n=this._overlay.querySelector(".footer"),o=this._translations();if(i&&(i.dataset.bare=this._isBare()?"true":"false"),n&&(n.hidden=!this._showFooter()),r&&(r.hidden=!(this.getAttribute("label")||"").trim()&&!e),t){const p=(this.getAttribute("label")||"").trim();t.textContent=p,t.hidden=!p}const l=this._overlay.querySelector('[data-action="today"]');l&&(l.textContent=o.today);const u=this._overlay.querySelector('[data-action="clear"]');u&&(u.textContent=o.clear);const a=this._overlay.querySelector('[data-action="cancel"]');a&&(a.textContent=o.cancel);const c=this._overlay.querySelector('[data-action="apply"]');c&&(c.textContent=o.apply);const m=this._overlay.querySelector('[data-action="apply"]');m&&(m.hidden=this._closeOnSelect()&&!e);const f=this._overlay.querySelectorAll(".action"),g=this._isInteractionBlocked();f.forEach(p=>{p.disabled=g});const _=this._overlay.querySelector(".dp-calendar");_&&(this._syncCalendarElement(_),this._open&&!this._overlayFocusedOnOpen&&this._lastOpenSource!=="attribute"&&(this._overlayFocusedOnOpen=!0,requestAnimationFrame(()=>{if(!(!this._open||!this._overlay))try{_.focus({preventScroll:!0})}catch{}}))),e||this._schedulePosition.run()}_renderOverlay(){this._syncOverlayState()}_renderInlineCalendar(){const e=this.root.querySelector(".inline-calendar");e&&this._syncCalendarElement(e)}_scheduleInlineCalendarSync(){const e=()=>{!this.isConnected||!this._hasView||!this._isInlineMode()||this._renderInlineCalendar()};e(),this._inlineCalendarFramePending||(this._inlineCalendarFramePending=!0,requestAnimationFrame(()=>{this._inlineCalendarFramePending=!1,e()})),!this._inlineCalendarUpgradePending&&typeof customElements<"u"&&!customElements.get("ui-calendar")&&(this._inlineCalendarUpgradePending=!0,customElements.whenDefined("ui-calendar").then(()=>{this._inlineCalendarUpgradePending=!1,requestAnimationFrame(()=>{e()})}))}_handleDraftCommit(e){const t=this._draftInput.trim();if(!t){this._commit(null,e);return}const i=this._parseAndValidate(t);if(!i){this._inlineError=this.getAttribute("error")||this._translations().invalidDate,this._emitInvalid(t,"parse"),this._updateHostState();return}if(!this._isWithinBounds(i)){this._inlineError=this.getAttribute("error")||this._translations().dateOutOfRange,this._emitInvalid(t,"range"),this._updateHostState();return}this._pendingValue=i,this._commit(i,e)}_onRootClick(e){const t=e.target;if(!t)return;const i=t.closest("[data-action]"),r=i==null?void 0:i.getAttribute("data-action");if(!(!r||this._isInteractionBlocked())){if(r==="toggle"){this._restoreFocusEl=i,this._setOpen(!this._open,"api");return}if(r==="clear"){e.preventDefault(),this._commit(null,"clear");return}if(r==="today"){e.preventDefault();const n=this._todayIso(),o=this._parseAndValidate(n);if(!o)return;const{min:l,max:u}=this._resolvedBounds(),a=s.clampDateIso(o,l,u);if(!a)return;this._pendingValue=a,this._emitInput("today"),this._closeOnSelect()&&!this._isInlineMode()?(this._commit(a,"today"),this._setOpen(!1,"today")):this._updateHostState();return}if(r==="apply"){e.preventDefault(),this._commit(this._pendingValue,"apply"),this._isInlineMode()||this._setOpen(!1,"apply");return}if(r==="cancel"){e.preventDefault(),this._pendingValue=this._value,this._draftInput=this._formatDisplay(this._value),this._inlineError="",this._isInlineMode()||this._setOpen(!1,"outside"),this._updateHostState();return}}}_onRootInput(e){const t=e.target;if(!(t instanceof HTMLInputElement)||!t.classList.contains("input")||this._isInteractionBlocked()||!this._allowInput())return;this._draftInput=t.value,this._inlineError="";const i=this._parseAndValidate(t.value);this._pendingValue=i,this._emitInput("typing")}_onRootBlur(e){var n;const t=e,i=t.target;if(!(i instanceof HTMLInputElement)||!i.classList.contains("input")||!this._allowInput())return;this._draftInput=i.value;const r=t.relatedTarget;r&&((n=this._overlay)!=null&&n.contains(r))||this._open&&!this._isInlineMode()||this._handleDraftCommit("blur")}_onRootKeyDown(e){const t=e,i=t.target;if(i instanceof HTMLInputElement&&i.classList.contains("input")&&!this._isInteractionBlocked()){if(t.key==="Enter"){t.preventDefault(),this._draftInput=i.value,this._handleDraftCommit("enter"),this._isInlineMode()||this._setOpen(!1,"enter");return}if(t.key==="ArrowDown"&&!this._open&&!this._isInlineMode()){t.preventDefault(),this._setOpen(!0,"api");return}t.key==="Escape"&&this._open&&!this._isInlineMode()&&(t.preventDefault(),this._setOpen(!1,"escape"))}}_onDocumentPointerDown(e){if(!this._open||!this._overlay)return;const t=e.composedPath();t.includes(this)||t.includes(this._overlay)||this._setOpen(!1,"outside")}_onDocumentKeyDown(e){this._open&&e.key==="Escape"&&(e.preventDefault(),this._setOpen(!1,"escape"))}_onOverlayClick(e){const t=e.target;if(!t)return;const i=t.closest("[data-action]"),r=i==null?void 0:i.getAttribute("data-action");if(r&&!this._isInteractionBlocked()){if(r==="backdrop"){this._setOpen(!1,"outside");return}if(r==="today"){const n=this._parseAndValidate(this._todayIso());if(!n)return;const{min:o,max:l}=this._resolvedBounds(),u=s.clampDateIso(n,o,l);if(!u)return;this._pendingValue=u,this._emitInput("today"),this._closeOnSelect()?(this._commit(u,"today"),this._setOpen(!1,"today")):this._renderOverlay();return}if(r==="clear"){this._pendingValue=null,this._emitInput("clear"),this._closeOnSelect()?(this._commit(null,"clear"),this._setOpen(!1,"clear")):this._renderOverlay();return}if(r==="apply"){this._commit(this._pendingValue,"apply"),this._setOpen(!1,"apply");return}r==="cancel"&&(this._pendingValue=this._value,this._setOpen(!1,"outside"))}}_onCalendarSelect(e){var o,l;if(this._isInteractionBlocked())return;const t=e,i=e.target;if(!i||i.tagName.toLowerCase()!=="ui-calendar")return;let r=null;if(t.type==="select")r=s.normalizeDateIso(((o=t.detail)==null?void 0:o.value)||null);else if(t.type==="change"){const u=(l=t.detail)==null?void 0:l.value;typeof u=="string"&&(r=s.normalizeDateIso(u))}if(!r)return;const n=this._clampToBounds(r);n&&(this._pendingValue=n,this._emitInput("calendar"),this._closeOnSelect()?(this._commit(n,"calendar"),this._isInlineMode()||this._setOpen(!1,"calendar")):this._updateHostState())}_updateHostState(){if(!this._hasView)return;const e=this.getAttribute("label")||"",t=this.getAttribute("hint")||"",i=this.getAttribute("error")||"",r=this._inlineError||i,n=this._placeholder(),o=this._translations(),l=!!(this._value||this._pendingValue),u=this.getAttribute("name")||"",a=this._isInlineMode(),c=r?"error":this._state(),m=this._allowInput()?this._draftInput:this._formatDisplay(this._pendingValue||this._value),f=this.root.querySelector(".label"),g=this.root.querySelector(".label-text"),_=this.root.querySelector(".required"),p=this.root.querySelector(".field"),d=this.root.querySelector(".input"),x=this.root.querySelector('.btn[data-action="clear"]'),b=this.root.querySelector('.btn[data-action="toggle"]'),y=this.root.querySelector(".hint"),I=this.root.querySelector(".error"),k=this.root.querySelector(".hidden-input"),h=this.root.querySelector(".inline-panel"),B=this.root.querySelector('.inline-panel [data-action="today"]'),C=this.root.querySelector('.inline-panel [data-action="clear"]'),O=this.root.querySelector('.inline-panel [data-action="apply"]'),D=this.root.querySelector(".inline-panel .footer");if(f&&(f.hidden=!e,f.id=this._labelId,f.setAttribute("for",this._inputId)),g&&(g.textContent=e),_&&(_.hidden=!this.hasAttribute("required")),p&&(p.dataset.invalid=r?"true":"false",p.dataset.open=this._open&&!a?"true":"false",p.dataset.state=c,p.setAttribute("aria-disabled",this._isInteractionBlocked()?"true":"false")),d&&(d.value!==m&&(d.value=m),d.id=this._inputId,d.placeholder=n,d.readOnly=!this._allowInput()||this._isReadonly(),d.disabled=this._isInteractionBlocked(),d.required=this.hasAttribute("required"),d.autocomplete="off",d.setAttribute("role","combobox"),d.setAttribute("aria-haspopup","dialog"),d.setAttribute("aria-expanded",a?"false":String(this._open)),d.setAttribute("aria-controls",this._panelId),d.setAttribute("aria-invalid",r?"true":"false"),e?d.setAttribute("aria-labelledby",this._labelId):d.removeAttribute("aria-labelledby")),x&&(x.hidden=!(this._clearable()&&l),x.disabled=this._isInteractionBlocked(),x.setAttribute("aria-label",o.clearDate)),b&&(b.hidden=a,b.disabled=this._isInteractionBlocked(),b.setAttribute("aria-expanded",a?"false":String(this._open)),b.setAttribute("aria-controls",this._panelId),b.setAttribute("aria-label",o.toggleCalendar)),y&&(y.id=this._hintId,y.hidden=!t,y.textContent=t),I&&(I.id=this._errorId,I.hidden=!r,I.textContent=r),d){const A=[];t&&y&&!y.hidden&&A.push(this._hintId),r&&A.push(this._errorId),A.length?d.setAttribute("aria-describedby",A.join(" ")):d.removeAttribute("aria-describedby")}if(k&&(k.disabled=!u,k.name=u,k.value=this._value||""),h&&(h.hidden=!a,h.id=this._panelId,h.dataset.bare=this._isBare()?"true":"false",h.setAttribute("role","dialog"),h.setAttribute("aria-modal","false"),h.setAttribute("aria-label",e||o.selectDate)),D&&(D.hidden=!this._showFooter()),B&&(B.textContent=o.today),C&&(C.textContent=o.clear),O&&(O.textContent=o.apply),a){this._scheduleInlineCalendarSync(),this._destroyOverlay();return}this._open&&this._syncOverlayState()}render(){this._hasView||(this.setContent(`
543
- <style>${E}</style>
542
+ `}_syncCalendarElement(e){const t=(o,c)=>{if(c==null||c===""){e.hasAttribute(o)&&e.removeAttribute(o);return}e.getAttribute(o)!==c&&e.setAttribute(o,c)},i=(o,c)=>{c?e.hasAttribute(o)||e.setAttribute(o,""):e.hasAttribute(o)&&e.removeAttribute(o)},{min:r,max:n}=this._resolvedBounds();t("selection","single"),t("value",this._pendingValue),t("min",r),t("max",n),t("locale",this.getAttribute("locale")),t("translations",this.getAttribute("translations")),t("week-start",this.getAttribute("week-start"));const l=this.getAttribute("size")||"sm";t("size",l==="lg"?"md":"sm"),t("variant",this.getAttribute("variant")),t("outside-click",this.getAttribute("outside-click")),t("events",this.getAttribute("events")),t("events-max",this.getAttribute("events-max")),t("events-display",this.getAttribute("events-display"));const u=e.classList.contains("inline-calendar");l==="lg"?(e.style.setProperty("--ui-calendar-day-height","1.95em"),e.style.setProperty("--ui-calendar-day-padding-block","0.2em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.26em"),e.style.setProperty("--ui-calendar-gap","0.42em"),e.style.setProperty("--ui-calendar-day-font-size","0.78em"),e.style.setProperty("--ui-calendar-weekday-font-size","0.7em"),e.style.setProperty("--ui-calendar-title-font-size","0.88em")):(e.style.setProperty("--ui-calendar-day-height","2.4em"),e.style.setProperty("--ui-calendar-day-padding-block","0.14em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.22em"),e.style.setProperty("--ui-calendar-gap","0.34em"),e.style.setProperty("--ui-calendar-day-font-size","0.72em"),e.style.setProperty("--ui-calendar-weekday-font-size","0.64em"),e.style.setProperty("--ui-calendar-title-font-size","0.8em")),u?(e.style.setProperty("--ui-calendar-day-height",l==="lg"?"2.1em":"1.92em"),e.style.setProperty("--ui-calendar-day-padding-block","0.08em"),e.style.setProperty("--ui-calendar-day-padding-inline","0.14em"),e.style.setProperty("--ui-calendar-frame-padding","0.28em"),e.style.setProperty("--ui-calendar-week-gap","0.16em"),e.style.setProperty("--ui-calendar-control-height","1.64em"),e.style.setProperty("--ui-calendar-gap","0.2em"),e.style.setProperty("--ui-calendar-day-font-size",l==="lg"?"0.76em":"0.68em"),e.style.setProperty("--ui-calendar-weekday-font-size",l==="lg"?"0.66em":"0.58em"),e.style.setProperty("--ui-calendar-title-font-size",l==="lg"?"0.84em":"0.76em")):(e.style.removeProperty("--ui-calendar-frame-padding"),e.style.removeProperty("--ui-calendar-week-gap"),e.style.removeProperty("--ui-calendar-control-height")),i("readonly",this._isReadonly()),i("disabled",this._isInteractionBlocked()),i("bare",this._isBare()),t("tabindex","-1"),t("aria-label",this.getAttribute("label")||this._translations().selectDate)}_ensureOverlayContent(e){if(!this._overlay)return;const t=e?"sheet":"popover";this._overlayMode===t&&this._overlay.querySelector(".dp-calendar")||(this._overlayMode=t,this._overlay.innerHTML=e?`<div class="sheet-wrap">${this._renderPanelInner(!0)}</div>`:`<div class="overlay">${this._renderPanelInner(!1)}</div>`)}_syncOverlayState(){if(!this._overlay)return;this._syncOverlayHostZIndex();const e=this._isMobileSheet();e&&!this._releaseScrollLock?this._releaseScrollLock=a.lockBodyScroll():!e&&this._releaseScrollLock&&(this._releaseScrollLock(),this._releaseScrollLock=null),this._ensureOverlayContent(e);const t=this._overlay.querySelector(".title"),i=this._overlay.querySelector(".panel, .sheet");this._syncDismissableLayer();const r=this._overlay.querySelector(".header"),n=this._overlay.querySelector(".footer"),s=this._translations();if(i&&(i.dataset.bare=this._isBare()?"true":"false"),n&&(n.hidden=!this._showFooter()),r&&(r.hidden=!(this.getAttribute("label")||"").trim()&&!e),t){const p=(this.getAttribute("label")||"").trim();t.textContent=p,t.hidden=!p}const l=this._overlay.querySelector('[data-action="today"]');l&&(l.textContent=s.today);const u=this._overlay.querySelector('[data-action="clear"]');u&&(u.textContent=s.clear);const o=this._overlay.querySelector('[data-action="cancel"]');o&&(o.textContent=s.cancel);const c=this._overlay.querySelector('[data-action="apply"]');c&&(c.textContent=s.apply);const m=this._overlay.querySelector('[data-action="apply"]');m&&(m.hidden=this._closeOnSelect()&&!e);const f=this._overlay.querySelectorAll(".action"),g=this._isInteractionBlocked();f.forEach(p=>{p.disabled=g});const _=this._overlay.querySelector(".dp-calendar");_&&(this._syncCalendarElement(_),this._open&&!this._overlayFocusedOnOpen&&this._lastOpenSource!=="attribute"&&(this._overlayFocusedOnOpen=!0,requestAnimationFrame(()=>{if(!(!this._open||!this._overlay))try{_.focus({preventScroll:!0})}catch{}}))),e||this._schedulePosition.run()}_renderOverlay(){this._syncOverlayState()}_renderInlineCalendar(){const e=this.root.querySelector(".inline-calendar");e&&this._syncCalendarElement(e)}_scheduleInlineCalendarSync(){const e=()=>{!this.isConnected||!this._hasView||!this._isInlineMode()||this._renderInlineCalendar()};e(),this._inlineCalendarFramePending||(this._inlineCalendarFramePending=!0,requestAnimationFrame(()=>{this._inlineCalendarFramePending=!1,e()})),!this._inlineCalendarUpgradePending&&typeof customElements<"u"&&!customElements.get("ui-calendar")&&(this._inlineCalendarUpgradePending=!0,customElements.whenDefined("ui-calendar").then(()=>{this._inlineCalendarUpgradePending=!1,requestAnimationFrame(()=>{e()})}))}_handleDraftCommit(e){const t=this._draftInput.trim();if(!t){this._commit(null,e);return}const i=this._parseAndValidate(t);if(!i){this._inlineError=this.getAttribute("error")||this._translations().invalidDate,this._emitInvalid(t,"parse"),this._updateHostState();return}if(!this._isWithinBounds(i)){this._inlineError=this.getAttribute("error")||this._translations().dateOutOfRange,this._emitInvalid(t,"range"),this._updateHostState();return}this._pendingValue=i,this._commit(i,e)}_onRootClick(e){const t=e.target;if(!t)return;const i=t.closest("[data-action]"),r=i==null?void 0:i.getAttribute("data-action");if(!(!r||this._isInteractionBlocked())){if(r==="toggle"){this._restoreFocusEl=i,this._setOpen(!this._open,"api");return}if(r==="clear"){e.preventDefault(),this._commit(null,"clear");return}if(r==="today"){e.preventDefault();const n=this._todayIso(),s=this._parseAndValidate(n);if(!s)return;const{min:l,max:u}=this._resolvedBounds(),o=a.clampDateIso(s,l,u);if(!o)return;this._pendingValue=o,this._emitInput("today"),this._closeOnSelect()&&!this._isInlineMode()?(this._commit(o,"today"),this._setOpen(!1,"today")):this._updateHostState();return}if(r==="apply"){e.preventDefault(),this._commit(this._pendingValue,"apply"),this._isInlineMode()||this._setOpen(!1,"apply");return}if(r==="cancel"){e.preventDefault(),this._pendingValue=this._value,this._draftInput=this._formatDisplay(this._value),this._inlineError="",this._isInlineMode()||this._setOpen(!1,"outside"),this._updateHostState();return}}}_onRootInput(e){const t=e.target;if(!(t instanceof HTMLInputElement)||!t.classList.contains("input")||this._isInteractionBlocked()||!this._allowInput())return;this._draftInput=t.value,this._inlineError="";const i=this._parseAndValidate(t.value);this._pendingValue=i,this._emitInput("typing")}_onRootBlur(e){var n;const t=e,i=t.target;if(!(i instanceof HTMLInputElement)||!i.classList.contains("input")||!this._allowInput())return;this._draftInput=i.value;const r=t.relatedTarget;r&&((n=this._overlay)!=null&&n.contains(r))||this._open&&!this._isInlineMode()||this._handleDraftCommit("blur")}_onRootKeyDown(e){const t=e,i=t.target;if(i instanceof HTMLInputElement&&i.classList.contains("input")&&!this._isInteractionBlocked()){if(t.key==="Enter"){t.preventDefault(),this._draftInput=i.value,this._handleDraftCommit("enter"),this._isInlineMode()||this._setOpen(!1,"enter");return}if(t.key==="ArrowDown"&&!this._open&&!this._isInlineMode()){t.preventDefault(),this._setOpen(!0,"api");return}t.key==="Escape"&&this._open&&!this._isInlineMode()&&(t.preventDefault(),this._setOpen(!1,"escape"))}}_onDocumentPointerDown(e){if(!this._open||!this._overlay)return;const t=e.composedPath();t.includes(this)||t.includes(this._overlay)||this._setOpen(!1,"outside")}_onDocumentKeyDown(e){this._open&&e.key==="Escape"&&(e.preventDefault(),this._setOpen(!1,"escape"))}_onOverlayClick(e){const t=e.target;if(!t)return;const i=t.closest("[data-action]"),r=i==null?void 0:i.getAttribute("data-action");if(r&&!this._isInteractionBlocked()){if(r==="backdrop"){this._setOpen(!1,"outside");return}if(r==="today"){const n=this._parseAndValidate(this._todayIso());if(!n)return;const{min:s,max:l}=this._resolvedBounds(),u=a.clampDateIso(n,s,l);if(!u)return;this._pendingValue=u,this._emitInput("today"),this._closeOnSelect()?(this._commit(u,"today"),this._setOpen(!1,"today")):this._renderOverlay();return}if(r==="clear"){this._pendingValue=null,this._emitInput("clear"),this._closeOnSelect()?(this._commit(null,"clear"),this._setOpen(!1,"clear")):this._renderOverlay();return}if(r==="apply"){this._commit(this._pendingValue,"apply"),this._setOpen(!1,"apply");return}r==="cancel"&&(this._pendingValue=this._value,this._setOpen(!1,"outside"))}}_onCalendarSelect(e){var s,l;if(this._isInteractionBlocked())return;const t=e,i=e.target;if(!i||i.tagName.toLowerCase()!=="ui-calendar")return;let r=null;if(t.type==="select")r=a.normalizeDateIso(((s=t.detail)==null?void 0:s.value)||null);else if(t.type==="change"){const u=(l=t.detail)==null?void 0:l.value;typeof u=="string"&&(r=a.normalizeDateIso(u))}if(!r)return;const n=this._clampToBounds(r);n&&(this._pendingValue=n,this._emitInput("calendar"),this._closeOnSelect()?(this._commit(n,"calendar"),this._isInlineMode()||this._setOpen(!1,"calendar")):this._updateHostState())}_updateHostState(){if(!this._hasView)return;const e=this.getAttribute("label")||"",t=this.getAttribute("hint")||"",i=this.getAttribute("error")||"",r=this._inlineError||i,n=this._placeholder(),s=this._translations(),l=!!(this._value||this._pendingValue),u=this.getAttribute("name")||"",o=this._isInlineMode(),c=r?"error":this._state(),m=this._allowInput()?this._draftInput:this._formatDisplay(this._pendingValue||this._value),f=this.root.querySelector(".label"),g=this.root.querySelector(".label-text"),_=this.root.querySelector(".required"),p=this.root.querySelector(".field"),d=this.root.querySelector(".input"),x=this.root.querySelector('.btn[data-action="clear"]'),b=this.root.querySelector('.btn[data-action="toggle"]'),y=this.root.querySelector(".hint"),I=this.root.querySelector(".error"),k=this.root.querySelector(".hidden-input"),h=this.root.querySelector(".inline-panel"),O=this.root.querySelector('.inline-panel [data-action="today"]'),B=this.root.querySelector('.inline-panel [data-action="clear"]'),C=this.root.querySelector('.inline-panel [data-action="apply"]'),D=this.root.querySelector(".inline-panel .footer");if(f&&(f.hidden=!e,f.id=this._labelId,f.setAttribute("for",this._inputId)),g&&(g.textContent=e),_&&(_.hidden=!this.hasAttribute("required")),p&&(p.dataset.invalid=r?"true":"false",p.dataset.open=this._open&&!o?"true":"false",p.dataset.state=c,p.setAttribute("aria-disabled",this._isInteractionBlocked()?"true":"false")),d&&(d.value!==m&&(d.value=m),d.id=this._inputId,d.placeholder=n,d.readOnly=!this._allowInput()||this._isReadonly(),d.disabled=this._isInteractionBlocked(),d.required=this.hasAttribute("required"),d.autocomplete="off",d.setAttribute("role","combobox"),d.setAttribute("aria-haspopup","dialog"),d.setAttribute("aria-expanded",o?"false":String(this._open)),d.setAttribute("aria-controls",this._panelId),d.setAttribute("aria-invalid",r?"true":"false"),e?d.setAttribute("aria-labelledby",this._labelId):d.removeAttribute("aria-labelledby")),x&&(x.hidden=!(this._clearable()&&l),x.disabled=this._isInteractionBlocked(),x.setAttribute("aria-label",s.clearDate)),b&&(b.hidden=o,b.disabled=this._isInteractionBlocked(),b.setAttribute("aria-expanded",o?"false":String(this._open)),b.setAttribute("aria-controls",this._panelId),b.setAttribute("aria-label",s.toggleCalendar)),y&&(y.id=this._hintId,y.hidden=!t,y.textContent=t),I&&(I.id=this._errorId,I.hidden=!r,I.textContent=r),d){const A=[];t&&y&&!y.hidden&&A.push(this._hintId),r&&A.push(this._errorId),A.length?d.setAttribute("aria-describedby",A.join(" ")):d.removeAttribute("aria-describedby")}if(k&&(k.disabled=!u,k.name=u,k.value=this._value||""),h&&(h.hidden=!o,h.id=this._panelId,h.dataset.bare=this._isBare()?"true":"false",h.setAttribute("role","dialog"),h.setAttribute("aria-modal","false"),h.setAttribute("aria-label",e||s.selectDate)),D&&(D.hidden=!this._showFooter()),O&&(O.textContent=s.today),B&&(B.textContent=s.clear),C&&(C.textContent=s.apply),o){this._scheduleInlineCalendarSync(),this._destroyOverlay();return}this._open&&this._syncOverlayState()}render(){this._hasView||(this.setContent(`
543
+ <style>${$}</style>
544
544
  <div class="root">
545
545
  <label class="label" part="label" id="${this._labelId}">
546
546
  <span class="label-text"></span>
547
547
  <span class="required">*</span>
548
548
  </label>
549
549
  <div class="field" part="field input">
550
- <span class="icon" part="icon" aria-hidden="true">${q}</span>
550
+ <span class="icon" part="icon" aria-hidden="true">${M}</span>
551
551
  <input class="input" id="${this._inputId}" part="input" />
552
- <button type="button" class="btn" part="clear" data-action="clear">${V}</button>
552
+ <button type="button" class="btn" part="clear" data-action="clear">${E}</button>
553
553
  <button type="button" class="btn" part="toggle" data-action="toggle">
554
- <span class="toggle-icon">${M}</span>
554
+ <span class="toggle-icon">${V}</span>
555
555
  <span class="spinner" aria-hidden="true"></span>
556
556
  </button>
557
557
  </div>
@@ -1,21 +1,23 @@
1
- import { E as V } from "./ElementBase-909688f3.mjs";
2
- import { r as q, c as S } from "./calendar-2c11b824.mjs";
3
- import { r as E, n as g, i as y, s as $, b as R, p as L, a as B, f as F, l as M, c as T, d as H } from "./date-time-utils-bdceb7af.mjs";
4
- import "./scroll-lock-9de6d328.mjs";
5
- let U = 0;
6
- const Y = `
1
+ import { E as q } from "./ElementBase-909688f3.mjs";
2
+ import { c as M } from "./dismissable-layer-9c7e6b58.mjs";
3
+ import { r as E, c as S } from "./calendar-2c11b824.mjs";
4
+ import { r as $, e as R, n as g, i as y, s as F, b as T, p as L, a as O, f as H, l as V, c as U, d as Y } from "./date-time-utils-a2c7af25.mjs";
5
+ import "./scroll-lock-31da444f.mjs";
6
+ import "./positioner-e9770c66.mjs";
7
+ let K = 0;
8
+ const W = `
7
9
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
8
10
  <path d="M6 2a1 1 0 0 1 1 1v1h6V3a1 1 0 1 1 2 0v1h.5A2.5 2.5 0 0 1 18 6.5v9A2.5 2.5 0 0 1 15.5 18h-11A2.5 2.5 0 0 1 2 15.5v-9A2.5 2.5 0 0 1 4.5 4H5V3a1 1 0 0 1 1-1Zm10 7H4v6.5c0 .276.224.5.5.5h11a.5.5 0 0 0 .5-.5V9ZM4.5 6a.5.5 0 0 0-.5.5V7h12v-.5a.5.5 0 0 0-.5-.5h-11Z" fill="currentColor"/>
9
11
  </svg>
10
- `, K = `
12
+ `, Z = `
11
13
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
12
14
  <path d="M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.12l3.71-3.9a.75.75 0 1 1 1.08 1.04l-4.25 4.47a.75.75 0 0 1-1.08 0L5.2 8.27a.75.75 0 0 1 .02-1.06Z" fill="currentColor"/>
13
15
  </svg>
14
- `, W = `
16
+ `, N = `
15
17
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
16
18
  <path d="M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06Z" fill="currentColor"/>
17
19
  </svg>
18
- `, N = `
20
+ `, j = `
19
21
  :host {
20
22
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
21
23
  --ui-dp-surface: linear-gradient(
@@ -386,7 +388,7 @@ const Y = `
386
388
  transform: rotate(360deg);
387
389
  }
388
390
  }
389
- `, j = `
391
+ `, G = `
390
392
  .overlay {
391
393
  position: fixed;
392
394
  z-index: var(--ui-dp-z, 1600);
@@ -530,12 +532,14 @@ const Y = `
530
532
  }
531
533
  }
532
534
  `;
533
- function v(C) {
534
- return C.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
535
+ function v(B) {
536
+ return B.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
535
537
  }
536
- class Z extends V {
538
+ class J extends q {
537
539
  constructor() {
538
- super(...arguments), this._value = null, this._pendingValue = null, this._draftInput = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._releaseScrollLock = null, this._lastOpenSource = "api", this._restoreFocusEl = null, this._isInitialized = !1, this._hasView = !1, this._overlayMode = null, this._uid = `ui-dp-${++U}`, this._inputId = `${this._uid}-input`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._panelTitleId = `${this._uid}-panel-title`, this._overlayFocusedOnOpen = !1, this._inlineCalendarFramePending = !1, this._inlineCalendarUpgradePending = !1, this._schedulePosition = E(() => this._positionOverlay()), this._onRootClickBound = (e) => this._onRootClick(e), this._onRootInputBound = (e) => this._onRootInput(e), this._onRootBlurBound = (e) => this._onRootBlur(e), this._onRootKeyDownBound = (e) => this._onRootKeyDown(e), this._onDocumentPointerDownBound = (e) => this._onDocumentPointerDown(e), this._onDocumentKeyDownBound = (e) => this._onDocumentKeyDown(e), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = () => this._schedulePosition.run(), this._onOverlayClickBound = (e) => this._onOverlayClick(e), this._onOverlaySelectBound = (e) => this._onCalendarSelect(e);
540
+ super(...arguments), this._value = null, this._pendingValue = null, this._draftInput = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._dismissableLayer = null, this._releaseScrollLock = null, this._lastOpenSource = "api", this._restoreFocusEl = null, this._isInitialized = !1, this._hasView = !1, this._overlayMode = null, this._uid = `ui-dp-${++K}`, this._inputId = `${this._uid}-input`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._panelTitleId = `${this._uid}-panel-title`, this._overlayFocusedOnOpen = !1, this._inlineCalendarFramePending = !1, this._inlineCalendarUpgradePending = !1, this._schedulePosition = $(() => this._positionOverlay()), this._onRootClickBound = (e) => this._onRootClick(e), this._onRootInputBound = (e) => this._onRootInput(e), this._onRootBlurBound = (e) => this._onRootBlur(e), this._onRootKeyDownBound = (e) => this._onRootKeyDown(e), this._onDocumentPointerDownBound = (e) => this._onDocumentPointerDown(e), this._onDocumentKeyDownBound = (e) => this._onDocumentKeyDown(e), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (e) => {
541
+ R(e, [this._overlay]) || this._schedulePosition.run();
542
+ }, this._onOverlayClickBound = (e) => this._onOverlayClick(e), this._onOverlaySelectBound = (e) => this._onCalendarSelect(e);
539
543
  }
540
544
  static get observedAttributes() {
541
545
  return [
@@ -589,8 +593,8 @@ class Z extends V {
589
593
  attributeChangedCallback(e, t, i) {
590
594
  if (t !== i) {
591
595
  if (e === "value" && !this._syncing && (this._value = this._clampToBounds(g(i)), this._pendingValue = this._value, this._draftInput = this._formatDisplay(this._value), this._inlineError = "", this._syncValueAttribute(this._value)), e === "open" && !this._syncing && (this._open = this.hasAttribute("open"), this._syncOverlay(this._open ? "api" : "outside")), e === "mode" && this._syncOverlay("attribute"), e === "disabled" && this.hasAttribute("disabled") && this._setOpen(!1, "outside"), (e === "min" || e === "max") && !this._syncing) {
592
- const r = this._clampToBounds(this._value), n = this._clampToBounds(this._pendingValue);
593
- this._value = r, this._pendingValue = n, this._draftInput = this._formatDisplay(this._allowInput() ? n : r), this._syncValueAttribute(r);
596
+ const r = this._clampToBounds(this._value), s = this._clampToBounds(this._pendingValue);
597
+ this._value = r, this._pendingValue = s, this._draftInput = this._formatDisplay(this._allowInput() ? s : r), this._syncValueAttribute(r);
594
598
  }
595
599
  if (e === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected) {
596
600
  if (!this._hasView) {
@@ -605,7 +609,7 @@ class Z extends V {
605
609
  return (this.getAttribute("mode") || "popover") === "inline";
606
610
  }
607
611
  _isMobileSheet() {
608
- return $(this.getAttribute("mode"));
612
+ return F(this.getAttribute("mode"));
609
613
  }
610
614
  _isDisabled() {
611
615
  return this.hasAttribute("disabled");
@@ -629,10 +633,10 @@ class Z extends V {
629
633
  return y(this.getAttribute("bare"), !1);
630
634
  }
631
635
  _locale() {
632
- return R(this.getAttribute("locale"));
636
+ return T(this.getAttribute("locale"));
633
637
  }
634
638
  _translations() {
635
- return q(
639
+ return E(
636
640
  this.getAttribute("locale"),
637
641
  this.getAttribute("translations")
638
642
  );
@@ -677,14 +681,14 @@ class Z extends V {
677
681
  if (!e)
678
682
  return null;
679
683
  const { min: t, max: i } = this._resolvedBounds();
680
- return B(e, t, i);
684
+ return O(e, t, i);
681
685
  }
682
686
  _isWithinBounds(e) {
683
687
  const { min: t, max: i } = this._resolvedBounds();
684
688
  return !(t && S(e, t) < 0 || i && S(e, i) > 0);
685
689
  }
686
690
  _formatDisplay(e) {
687
- return F(e, this._locale(), this._formatMode(), this._displayFormat());
691
+ return H(e, this._locale(), this._formatMode(), this._displayFormat());
688
692
  }
689
693
  _syncValueAttribute(e) {
690
694
  this._syncing = !0;
@@ -752,10 +756,31 @@ class Z extends V {
752
756
  if (this._overlay || typeof document > "u")
753
757
  return;
754
758
  const e = document.createElement("div");
755
- e.className = "ui-date-picker-overlay-host", e.style.position = "fixed", e.style.left = "0", e.style.top = "0", e.style.zIndex = "1100", e.style.pointerEvents = "none", e.addEventListener("click", this._onOverlayClickBound), e.addEventListener("select", this._onOverlaySelectBound), e.addEventListener("change", this._onOverlaySelectBound), document.body.appendChild(e), this._overlay = e, document.addEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.addEventListener("keydown", this._onDocumentKeyDownBound), window.addEventListener("resize", this._onWindowResizeBound), window.addEventListener("scroll", this._onWindowScrollBound, !0), this._isMobileSheet() && (this._releaseScrollLock = M());
759
+ e.className = "ui-date-picker-overlay-host", e.style.position = "fixed", e.style.left = "0", e.style.top = "0", e.style.pointerEvents = "none", e.addEventListener("click", this._onOverlayClickBound), e.addEventListener("select", this._onOverlaySelectBound), e.addEventListener("change", this._onOverlaySelectBound), document.body.appendChild(e), this._overlay = e, this._syncOverlayHostZIndex(), document.addEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.addEventListener("keydown", this._onDocumentKeyDownBound), window.addEventListener("resize", this._onWindowResizeBound), window.addEventListener("scroll", this._onWindowScrollBound, { passive: !0, capture: !0 }), this._isMobileSheet() && (this._releaseScrollLock = V());
760
+ }
761
+ _syncOverlayHostZIndex() {
762
+ if (!this._overlay || typeof window > "u")
763
+ return;
764
+ const e = window.getComputedStyle(this).getPropertyValue("--ui-dp-z").trim();
765
+ this._overlay.style.zIndex = e || "1600";
756
766
  }
757
767
  _destroyOverlay() {
758
- this._overlay && (this._schedulePosition.cancel(), document.removeEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.removeEventListener("keydown", this._onDocumentKeyDownBound), window.removeEventListener("resize", this._onWindowResizeBound), window.removeEventListener("scroll", this._onWindowScrollBound, !0), this._overlay.removeEventListener("click", this._onOverlayClickBound), this._overlay.removeEventListener("select", this._onOverlaySelectBound), this._overlay.removeEventListener("change", this._onOverlaySelectBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayMode = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
768
+ var e;
769
+ (e = this._dismissableLayer) == null || e.destroy(), this._dismissableLayer = null, this._overlay && (this._schedulePosition.cancel(), document.removeEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.removeEventListener("keydown", this._onDocumentKeyDownBound), window.removeEventListener("resize", this._onWindowResizeBound), window.removeEventListener("scroll", this._onWindowScrollBound, !0), this._overlay.removeEventListener("click", this._onOverlayClickBound), this._overlay.removeEventListener("select", this._onOverlaySelectBound), this._overlay.removeEventListener("change", this._onOverlaySelectBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayMode = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
770
+ }
771
+ _syncDismissableLayer() {
772
+ var i;
773
+ if ((i = this._dismissableLayer) == null || i.destroy(), this._dismissableLayer = null, !this._open || !this._overlay)
774
+ return;
775
+ const e = this._overlay.querySelector(".panel, .sheet"), t = this.root.querySelector(".field");
776
+ e && (this._dismissableLayer = M({
777
+ node: e,
778
+ trigger: t,
779
+ closeOnEscape: !0,
780
+ closeOnPointerOutside: !0,
781
+ closeOnFocusOutside: !1,
782
+ onBeforeDismiss: (r) => r === "escape-key" ? (this._setOpen(!1, "escape"), !1) : (r === "outside-pointer" && this._setOpen(!1, "outside"), !1)
783
+ }));
759
784
  }
760
785
  _positionOverlay() {
761
786
  if (!this._overlay || !this._open || this._isMobileSheet())
@@ -765,11 +790,17 @@ class Z extends V {
765
790
  return;
766
791
  const i = e.getBoundingClientRect();
767
792
  t.style.setProperty("--ui-dp-panel-width", `${Math.round(i.width)}px`);
768
- const r = t.getBoundingClientRect(), n = T(i, r);
793
+ const r = t.getBoundingClientRect(), s = t.getAttribute("data-placement"), n = U(
794
+ i,
795
+ r,
796
+ 8,
797
+ 8,
798
+ s === "top" ? "top" : s === "bottom" ? "bottom" : null
799
+ );
769
800
  t.style.position = "absolute", t.style.top = `${Math.round(n.top)}px`, t.style.left = `${Math.round(n.left)}px`, t.setAttribute("data-placement", n.placement);
770
801
  }
771
802
  _parseAndValidate(e) {
772
- return H(e, this._locale());
803
+ return Y(e, this._locale());
773
804
  }
774
805
  _commit(e, t) {
775
806
  if (this._isReadonly() || this._isInteractionBlocked())
@@ -778,11 +809,11 @@ class Z extends V {
778
809
  this._value = i, this._pendingValue = i, this._draftInput = this._formatDisplay(i), this._inlineError = "", this._syncValueAttribute(i), this._emitInput(t), this._emitChange(t), this._updateHostState();
779
810
  }
780
811
  _renderPanelInner(e) {
781
- const t = this._translations(), i = (this.getAttribute("label") || "").trim(), r = !!i || e, n = !this._closeOnSelect() || e, a = e ? "sheet" : "panel", o = e ? "true" : "false";
812
+ const t = this._translations(), i = (this.getAttribute("label") || "").trim(), r = !!i || e, s = !this._closeOnSelect() || e, n = e ? "sheet" : "panel", o = e ? "true" : "false";
782
813
  return `
783
- <style>${j}</style>
814
+ <style>${G}</style>
784
815
  ${e ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
785
- <section class="${a}" id="${this._panelId}" part="${e ? "sheet" : "popover"}" role="dialog" aria-modal="${o}" aria-labelledby="${this._panelTitleId}" aria-label="${v(t.datePickerPanel)}">
816
+ <section class="${n}" id="${this._panelId}" part="${e ? "sheet" : "popover"}" role="dialog" aria-modal="${o}" aria-labelledby="${this._panelTitleId}" aria-label="${v(t.datePickerPanel)}">
786
817
  <header class="header" part="header" ${r ? "" : "hidden"}>
787
818
  <p class="title" id="${this._panelTitleId}" ${i ? "" : "hidden"}>${v(i)}</p>
788
819
  ${e ? `<button type="button" class="action" data-action="cancel">${v(t.cancel)}</button>` : ""}
@@ -791,22 +822,22 @@ class Z extends V {
791
822
  <footer class="footer" part="footer">
792
823
  <button type="button" class="action" data-action="today" part="presets">${v(t.today)}</button>
793
824
  <button type="button" class="action" data-action="clear" part="clear">${v(t.clear)}</button>
794
- ${n ? `<button type="button" class="action" data-tone="primary" data-action="apply" part="apply">${v(t.apply)}</button>` : ""}
825
+ ${s ? `<button type="button" class="action" data-tone="primary" data-action="apply" part="apply">${v(t.apply)}</button>` : ""}
795
826
  </footer>
796
827
  </section>
797
828
  `;
798
829
  }
799
830
  _syncCalendarElement(e) {
800
- const t = (s, u) => {
831
+ const t = (a, u) => {
801
832
  if (u == null || u === "") {
802
- e.hasAttribute(s) && e.removeAttribute(s);
833
+ e.hasAttribute(a) && e.removeAttribute(a);
803
834
  return;
804
835
  }
805
- e.getAttribute(s) !== u && e.setAttribute(s, u);
806
- }, i = (s, u) => {
807
- u ? e.hasAttribute(s) || e.setAttribute(s, "") : e.hasAttribute(s) && e.removeAttribute(s);
808
- }, { min: r, max: n } = this._resolvedBounds();
809
- t("selection", "single"), t("value", this._pendingValue), t("min", r), t("max", n), t("locale", this.getAttribute("locale")), t("translations", this.getAttribute("translations")), t("week-start", this.getAttribute("week-start"));
836
+ e.getAttribute(a) !== u && e.setAttribute(a, u);
837
+ }, i = (a, u) => {
838
+ u ? e.hasAttribute(a) || e.setAttribute(a, "") : e.hasAttribute(a) && e.removeAttribute(a);
839
+ }, { min: r, max: s } = this._resolvedBounds();
840
+ t("selection", "single"), t("value", this._pendingValue), t("min", r), t("max", s), t("locale", this.getAttribute("locale")), t("translations", this.getAttribute("translations")), t("week-start", this.getAttribute("week-start"));
810
841
  const o = this.getAttribute("size") || "sm";
811
842
  t("size", o === "lg" ? "md" : "sm"), t("variant", this.getAttribute("variant")), t("outside-click", this.getAttribute("outside-click")), t("events", this.getAttribute("events")), t("events-max", this.getAttribute("events-max")), t("events-display", this.getAttribute("events-display"));
812
843
  const d = e.classList.contains("inline-calendar");
@@ -821,21 +852,24 @@ class Z extends V {
821
852
  _syncOverlayState() {
822
853
  if (!this._overlay)
823
854
  return;
855
+ this._syncOverlayHostZIndex();
824
856
  const e = this._isMobileSheet();
825
- e && !this._releaseScrollLock ? this._releaseScrollLock = M() : !e && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(e);
826
- const t = this._overlay.querySelector(".title"), i = this._overlay.querySelector(".panel, .sheet"), r = this._overlay.querySelector(".header"), n = this._overlay.querySelector(".footer"), a = this._translations();
827
- if (i && (i.dataset.bare = this._isBare() ? "true" : "false"), n && (n.hidden = !this._showFooter()), r && (r.hidden = !(this.getAttribute("label") || "").trim() && !e), t) {
857
+ e && !this._releaseScrollLock ? this._releaseScrollLock = V() : !e && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(e);
858
+ const t = this._overlay.querySelector(".title"), i = this._overlay.querySelector(".panel, .sheet");
859
+ this._syncDismissableLayer();
860
+ const r = this._overlay.querySelector(".header"), s = this._overlay.querySelector(".footer"), n = this._translations();
861
+ if (i && (i.dataset.bare = this._isBare() ? "true" : "false"), s && (s.hidden = !this._showFooter()), r && (r.hidden = !(this.getAttribute("label") || "").trim() && !e), t) {
828
862
  const c = (this.getAttribute("label") || "").trim();
829
863
  t.textContent = c, t.hidden = !c;
830
864
  }
831
865
  const o = this._overlay.querySelector('[data-action="today"]');
832
- o && (o.textContent = a.today);
866
+ o && (o.textContent = n.today);
833
867
  const d = this._overlay.querySelector('[data-action="clear"]');
834
- d && (d.textContent = a.clear);
835
- const s = this._overlay.querySelector('[data-action="cancel"]');
836
- s && (s.textContent = a.cancel);
868
+ d && (d.textContent = n.clear);
869
+ const a = this._overlay.querySelector('[data-action="cancel"]');
870
+ a && (a.textContent = n.cancel);
837
871
  const u = this._overlay.querySelector('[data-action="apply"]');
838
- u && (u.textContent = a.apply);
872
+ u && (u.textContent = n.apply);
839
873
  const m = this._overlay.querySelector('[data-action="apply"]');
840
874
  m && (m.hidden = this._closeOnSelect() && !e);
841
875
  const h = this._overlay.querySelectorAll(".action"), x = this._isInteractionBlocked();
@@ -903,13 +937,13 @@ class Z extends V {
903
937
  }
904
938
  if (r === "today") {
905
939
  e.preventDefault();
906
- const n = this._todayIso(), a = this._parseAndValidate(n);
907
- if (!a)
940
+ const s = this._todayIso(), n = this._parseAndValidate(s);
941
+ if (!n)
908
942
  return;
909
- const { min: o, max: d } = this._resolvedBounds(), s = B(a, o, d);
910
- if (!s)
943
+ const { min: o, max: d } = this._resolvedBounds(), a = O(n, o, d);
944
+ if (!a)
911
945
  return;
912
- this._pendingValue = s, this._emitInput("today"), this._closeOnSelect() && !this._isInlineMode() ? (this._commit(s, "today"), this._setOpen(!1, "today")) : this._updateHostState();
946
+ this._pendingValue = a, this._emitInput("today"), this._closeOnSelect() && !this._isInlineMode() ? (this._commit(a, "today"), this._setOpen(!1, "today")) : this._updateHostState();
913
947
  return;
914
948
  }
915
949
  if (r === "apply") {
@@ -931,13 +965,13 @@ class Z extends V {
931
965
  this._pendingValue = i, this._emitInput("typing");
932
966
  }
933
967
  _onRootBlur(e) {
934
- var n;
968
+ var s;
935
969
  const t = e, i = t.target;
936
970
  if (!(i instanceof HTMLInputElement) || !i.classList.contains("input") || !this._allowInput())
937
971
  return;
938
972
  this._draftInput = i.value;
939
973
  const r = t.relatedTarget;
940
- r && ((n = this._overlay) != null && n.contains(r)) || this._open && !this._isInlineMode() || this._handleDraftCommit("blur");
974
+ r && ((s = this._overlay) != null && s.contains(r)) || this._open && !this._isInlineMode() || this._handleDraftCommit("blur");
941
975
  }
942
976
  _onRootKeyDown(e) {
943
977
  const t = e, i = t.target;
@@ -973,10 +1007,10 @@ class Z extends V {
973
1007
  return;
974
1008
  }
975
1009
  if (r === "today") {
976
- const n = this._parseAndValidate(this._todayIso());
977
- if (!n)
1010
+ const s = this._parseAndValidate(this._todayIso());
1011
+ if (!s)
978
1012
  return;
979
- const { min: a, max: o } = this._resolvedBounds(), d = B(n, a, o);
1013
+ const { min: n, max: o } = this._resolvedBounds(), d = O(s, n, o);
980
1014
  if (!d)
981
1015
  return;
982
1016
  this._pendingValue = d, this._emitInput("today"), this._closeOnSelect() ? (this._commit(d, "today"), this._setOpen(!1, "today")) : this._renderOverlay();
@@ -994,7 +1028,7 @@ class Z extends V {
994
1028
  }
995
1029
  }
996
1030
  _onCalendarSelect(e) {
997
- var a, o;
1031
+ var n, o;
998
1032
  if (this._isInteractionBlocked())
999
1033
  return;
1000
1034
  const t = e, i = e.target;
@@ -1002,25 +1036,25 @@ class Z extends V {
1002
1036
  return;
1003
1037
  let r = null;
1004
1038
  if (t.type === "select")
1005
- r = g(((a = t.detail) == null ? void 0 : a.value) || null);
1039
+ r = g(((n = t.detail) == null ? void 0 : n.value) || null);
1006
1040
  else if (t.type === "change") {
1007
1041
  const d = (o = t.detail) == null ? void 0 : o.value;
1008
1042
  typeof d == "string" && (r = g(d));
1009
1043
  }
1010
1044
  if (!r)
1011
1045
  return;
1012
- const n = this._clampToBounds(r);
1013
- n && (this._pendingValue = n, this._emitInput("calendar"), this._closeOnSelect() ? (this._commit(n, "calendar"), this._isInlineMode() || this._setOpen(!1, "calendar")) : this._updateHostState());
1046
+ const s = this._clampToBounds(r);
1047
+ s && (this._pendingValue = s, this._emitInput("calendar"), this._closeOnSelect() ? (this._commit(s, "calendar"), this._isInlineMode() || this._setOpen(!1, "calendar")) : this._updateHostState());
1014
1048
  }
1015
1049
  _updateHostState() {
1016
1050
  if (!this._hasView)
1017
1051
  return;
1018
- const e = this.getAttribute("label") || "", t = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, n = this._placeholder(), a = this._translations(), o = !!(this._value || this._pendingValue), d = this.getAttribute("name") || "", s = this._isInlineMode(), u = r ? "error" : this._state(), m = this._allowInput() ? this._draftInput : this._formatDisplay(this._pendingValue || this._value), h = this.root.querySelector(".label"), x = this.root.querySelector(".label-text"), f = this.root.querySelector(".required"), c = this.root.querySelector(".field"), l = this.root.querySelector(".input"), I = this.root.querySelector('.btn[data-action="clear"]'), _ = this.root.querySelector('.btn[data-action="toggle"]'), b = this.root.querySelector(".hint"), k = this.root.querySelector(".error"), A = this.root.querySelector(".hidden-input"), p = this.root.querySelector(".inline-panel"), O = this.root.querySelector('.inline-panel [data-action="today"]'), D = this.root.querySelector('.inline-panel [data-action="clear"]'), z = this.root.querySelector('.inline-panel [data-action="apply"]'), P = this.root.querySelector(".inline-panel .footer");
1019
- if (h && (h.hidden = !e, h.id = this._labelId, h.setAttribute("for", this._inputId)), x && (x.textContent = e), f && (f.hidden = !this.hasAttribute("required")), c && (c.dataset.invalid = r ? "true" : "false", c.dataset.open = this._open && !s ? "true" : "false", c.dataset.state = u, c.setAttribute("aria-disabled", this._isInteractionBlocked() ? "true" : "false")), l && (l.value !== m && (l.value = m), l.id = this._inputId, l.placeholder = n, l.readOnly = !this._allowInput() || this._isReadonly(), l.disabled = this._isInteractionBlocked(), l.required = this.hasAttribute("required"), l.autocomplete = "off", l.setAttribute("role", "combobox"), l.setAttribute("aria-haspopup", "dialog"), l.setAttribute("aria-expanded", s ? "false" : String(this._open)), l.setAttribute("aria-controls", this._panelId), l.setAttribute("aria-invalid", r ? "true" : "false"), e ? l.setAttribute("aria-labelledby", this._labelId) : l.removeAttribute("aria-labelledby")), I && (I.hidden = !(this._clearable() && o), I.disabled = this._isInteractionBlocked(), I.setAttribute("aria-label", a.clearDate)), _ && (_.hidden = s, _.disabled = this._isInteractionBlocked(), _.setAttribute("aria-expanded", s ? "false" : String(this._open)), _.setAttribute("aria-controls", this._panelId), _.setAttribute("aria-label", a.toggleCalendar)), b && (b.id = this._hintId, b.hidden = !t, b.textContent = t), k && (k.id = this._errorId, k.hidden = !r, k.textContent = r), l) {
1052
+ const e = this.getAttribute("label") || "", t = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, s = this._placeholder(), n = this._translations(), o = !!(this._value || this._pendingValue), d = this.getAttribute("name") || "", a = this._isInlineMode(), u = r ? "error" : this._state(), m = this._allowInput() ? this._draftInput : this._formatDisplay(this._pendingValue || this._value), h = this.root.querySelector(".label"), x = this.root.querySelector(".label-text"), f = this.root.querySelector(".required"), c = this.root.querySelector(".field"), l = this.root.querySelector(".input"), I = this.root.querySelector('.btn[data-action="clear"]'), _ = this.root.querySelector('.btn[data-action="toggle"]'), b = this.root.querySelector(".hint"), k = this.root.querySelector(".error"), A = this.root.querySelector(".hidden-input"), p = this.root.querySelector(".inline-panel"), C = this.root.querySelector('.inline-panel [data-action="today"]'), D = this.root.querySelector('.inline-panel [data-action="clear"]'), z = this.root.querySelector('.inline-panel [data-action="apply"]'), P = this.root.querySelector(".inline-panel .footer");
1053
+ if (h && (h.hidden = !e, h.id = this._labelId, h.setAttribute("for", this._inputId)), x && (x.textContent = e), f && (f.hidden = !this.hasAttribute("required")), c && (c.dataset.invalid = r ? "true" : "false", c.dataset.open = this._open && !a ? "true" : "false", c.dataset.state = u, c.setAttribute("aria-disabled", this._isInteractionBlocked() ? "true" : "false")), l && (l.value !== m && (l.value = m), l.id = this._inputId, l.placeholder = s, l.readOnly = !this._allowInput() || this._isReadonly(), l.disabled = this._isInteractionBlocked(), l.required = this.hasAttribute("required"), l.autocomplete = "off", l.setAttribute("role", "combobox"), l.setAttribute("aria-haspopup", "dialog"), l.setAttribute("aria-expanded", a ? "false" : String(this._open)), l.setAttribute("aria-controls", this._panelId), l.setAttribute("aria-invalid", r ? "true" : "false"), e ? l.setAttribute("aria-labelledby", this._labelId) : l.removeAttribute("aria-labelledby")), I && (I.hidden = !(this._clearable() && o), I.disabled = this._isInteractionBlocked(), I.setAttribute("aria-label", n.clearDate)), _ && (_.hidden = a, _.disabled = this._isInteractionBlocked(), _.setAttribute("aria-expanded", a ? "false" : String(this._open)), _.setAttribute("aria-controls", this._panelId), _.setAttribute("aria-label", n.toggleCalendar)), b && (b.id = this._hintId, b.hidden = !t, b.textContent = t), k && (k.id = this._errorId, k.hidden = !r, k.textContent = r), l) {
1020
1054
  const w = [];
1021
1055
  t && b && !b.hidden && w.push(this._hintId), r && w.push(this._errorId), w.length ? l.setAttribute("aria-describedby", w.join(" ")) : l.removeAttribute("aria-describedby");
1022
1056
  }
1023
- if (A && (A.disabled = !d, A.name = d, A.value = this._value || ""), p && (p.hidden = !s, p.id = this._panelId, p.dataset.bare = this._isBare() ? "true" : "false", p.setAttribute("role", "dialog"), p.setAttribute("aria-modal", "false"), p.setAttribute("aria-label", e || a.selectDate)), P && (P.hidden = !this._showFooter()), O && (O.textContent = a.today), D && (D.textContent = a.clear), z && (z.textContent = a.apply), s) {
1057
+ if (A && (A.disabled = !d, A.name = d, A.value = this._value || ""), p && (p.hidden = !a, p.id = this._panelId, p.dataset.bare = this._isBare() ? "true" : "false", p.setAttribute("role", "dialog"), p.setAttribute("aria-modal", "false"), p.setAttribute("aria-label", e || n.selectDate)), P && (P.hidden = !this._showFooter()), C && (C.textContent = n.today), D && (D.textContent = n.clear), z && (z.textContent = n.apply), a) {
1024
1058
  this._scheduleInlineCalendarSync(), this._destroyOverlay();
1025
1059
  return;
1026
1060
  }
@@ -1028,18 +1062,18 @@ class Z extends V {
1028
1062
  }
1029
1063
  render() {
1030
1064
  this._hasView || (this.setContent(`
1031
- <style>${N}</style>
1065
+ <style>${j}</style>
1032
1066
  <div class="root">
1033
1067
  <label class="label" part="label" id="${this._labelId}">
1034
1068
  <span class="label-text"></span>
1035
1069
  <span class="required">*</span>
1036
1070
  </label>
1037
1071
  <div class="field" part="field input">
1038
- <span class="icon" part="icon" aria-hidden="true">${Y}</span>
1072
+ <span class="icon" part="icon" aria-hidden="true">${W}</span>
1039
1073
  <input class="input" id="${this._inputId}" part="input" />
1040
- <button type="button" class="btn" part="clear" data-action="clear">${W}</button>
1074
+ <button type="button" class="btn" part="clear" data-action="clear">${N}</button>
1041
1075
  <button type="button" class="btn" part="toggle" data-action="toggle">
1042
- <span class="toggle-icon">${K}</span>
1076
+ <span class="toggle-icon">${Z}</span>
1043
1077
  <span class="spinner" aria-hidden="true"></span>
1044
1078
  </button>
1045
1079
  </div>
@@ -1061,7 +1095,7 @@ class Z extends V {
1061
1095
  return !1;
1062
1096
  }
1063
1097
  }
1064
- typeof customElements < "u" && !customElements.get("ui-date-picker") && customElements.define("ui-date-picker", Z);
1098
+ typeof customElements < "u" && !customElements.get("ui-date-picker") && customElements.define("ui-date-picker", J);
1065
1099
  export {
1066
- Z as UIDatePicker
1100
+ J as UIDatePicker
1067
1101
  };