monobill-mintui 0.6.718 → 0.6.721

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 (165) hide show
  1. package/bin/component-dependencies.json +1 -0
  2. package/dist/checkbox.css +1 -1
  3. package/dist/components/alert/browser.js +4 -4
  4. package/dist/components/alert/index.cjs +1 -1
  5. package/dist/components/alert/index.js +4 -4
  6. package/dist/components/back-button/browser.js +1 -1
  7. package/dist/components/back-button/index.cjs +1 -1
  8. package/dist/components/back-button/index.js +1 -1
  9. package/dist/components/bottom-navigation/browser.js +2 -2
  10. package/dist/components/bottom-navigation/index.cjs +1 -1
  11. package/dist/components/bottom-navigation/index.js +2 -2
  12. package/dist/components/button/browser.js +1 -1
  13. package/dist/components/button/index.cjs +1 -1
  14. package/dist/components/button/index.js +1 -1
  15. package/dist/components/checkbox/Checkbox.d.ts +3 -0
  16. package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/components/checkbox/browser.js +2 -186
  18. package/dist/components/checkbox/index.cjs +1 -1
  19. package/dist/components/checkbox/index.js +2 -186
  20. package/dist/components/chip/browser.js +1 -1
  21. package/dist/components/chip/index.cjs +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chunks/{back-button-By8eO_KR.js → back-button-C0ajSqKu.js} +2 -2
  24. package/dist/components/chunks/{back-button-BGzrOtpx.js → back-button-Dw4NF_vN.js} +1 -1
  25. package/dist/components/chunks/{button-B_yN18B-.js → button-B4BMYTk1.js} +1 -1
  26. package/dist/components/chunks/{button-JPTyQfRs.js → button-BTQHrE0x.js} +2 -2
  27. package/dist/components/chunks/caret-down-DbFlPN-2.js +1 -0
  28. package/dist/components/chunks/{caret-down-ZjQN2yKq.js → caret-down-pn6aBT-u.js} +1 -1
  29. package/dist/components/chunks/caret-right-B8gOXLh9.js +1 -0
  30. package/dist/components/chunks/{caret-right-BlRbsLlh.js → caret-right-DDGEbhEH.js} +1 -1
  31. package/dist/components/chunks/checkbox-BKU8fiY7.js +1 -0
  32. package/dist/components/chunks/checkbox-p-Fb5ojp.js +193 -0
  33. package/dist/components/chunks/{chip-BUaS7ks-.js → chip-B0kg_vr8.js} +1 -1
  34. package/dist/components/chunks/{chip-XuYPtZ3Z.js → chip-bcCOd6-h.js} +3 -3
  35. package/dist/components/chunks/{close-Cn8XLO1c.js → close-8VXvDCau.js} +1 -1
  36. package/dist/components/chunks/close-CWAmmMRg.js +1 -0
  37. package/dist/components/chunks/{confirm-action-CX_FEzCR.js → confirm-action-BW1UwJNu.js} +2 -2
  38. package/dist/components/chunks/{confirm-action-86hDdUKT.js → confirm-action-sovGys0x.js} +1 -1
  39. package/dist/components/chunks/{date-picker-J8AtC8Py.js → date-picker-CDEVgbw7.js} +1 -1
  40. package/dist/components/chunks/{date-picker-BLqafHuc.js → date-picker-R2gbHZCP.js} +5 -5
  41. package/dist/components/chunks/{icon-CWOP4Com.js → icon-B9P0jyS2.js} +6 -6
  42. package/dist/components/chunks/icon-CIAsmizQ.js +1 -0
  43. package/dist/components/chunks/icon-Cia9x_J2.js +1 -0
  44. package/dist/components/chunks/{icon-hyFz3uhh.js → icon-DAB2KLeo.js} +217 -207
  45. package/dist/components/chunks/{input-BI4nrOaG.js → input-BXC4lMG_.js} +1 -1
  46. package/dist/components/chunks/{input-B-njkq5j.js → input-B_q63xQu.js} +3 -3
  47. package/dist/components/chunks/{modal-BEv3P1P0.js → modal-BixpSAyU.js} +10 -30
  48. package/dist/components/chunks/{modal-ux6cqTde.js → modal-BrIOYE1W.js} +1 -1
  49. package/dist/components/chunks/{popover-0YEhBrgv.js → popover-CWWKb7L1.js} +1 -1
  50. package/dist/components/chunks/{popover-CE2t5dKP.js → popover-DPNBidSz.js} +1 -1
  51. package/dist/components/chunks/search-CGQa7dR2.js +1 -0
  52. package/dist/components/chunks/{search-BwjKBnv9.js → search-COAeeXxO.js} +1 -1
  53. package/dist/components/chunks/{select-DS2CJyXR.js → select-CHImyDWO.js} +1 -1
  54. package/dist/components/chunks/{select-DDnYtBVR.js → select-CnN6eiFK.js} +3 -3
  55. package/dist/components/chunks/{table-slcPmVWy.js → table-B_S4xwx3.js} +1 -1
  56. package/dist/components/chunks/{table-B_g7lNzN.js → table-C6ufpGLx.js} +1 -1
  57. package/dist/components/chunks/{time-picker-EAyF05v1.js → time-picker-CijVykQ3.js} +1 -1
  58. package/dist/components/chunks/{time-picker-MtNyIZFb.js → time-picker-NksIqyuD.js} +3 -3
  59. package/dist/components/chunks/{warning-DKCaTYO6.js → warning-CVnTPaMj.js} +1 -1
  60. package/dist/components/chunks/{warning-DAYbxh3S.js → warning-vve-cXPr.js} +1 -1
  61. package/dist/components/confirm-action/browser.js +1 -1
  62. package/dist/components/confirm-action/index.cjs +1 -1
  63. package/dist/components/confirm-action/index.js +1 -1
  64. package/dist/components/date-picker/browser.js +1 -1
  65. package/dist/components/date-picker/index.cjs +1 -1
  66. package/dist/components/date-picker/index.js +1 -1
  67. package/dist/components/datetime-picker/browser.js +3 -3
  68. package/dist/components/datetime-picker/index.cjs +1 -1
  69. package/dist/components/datetime-picker/index.js +3 -3
  70. package/dist/components/dropzone/browser.js +4 -4
  71. package/dist/components/dropzone/index.cjs +1 -1
  72. package/dist/components/dropzone/index.js +4 -4
  73. package/dist/components/icon/browser.js +1 -1
  74. package/dist/components/icon/icons/code.d.ts +3 -0
  75. package/dist/components/icon/icons/code.d.ts.map +1 -0
  76. package/dist/components/icon/icons/index.d.ts +1 -0
  77. package/dist/components/icon/icons/index.d.ts.map +1 -1
  78. package/dist/components/icon/index.cjs +1 -1
  79. package/dist/components/icon/index.js +1 -1
  80. package/dist/components/input/browser.js +1 -1
  81. package/dist/components/input/index.cjs +1 -1
  82. package/dist/components/input/index.js +1 -1
  83. package/dist/components/link/browser.js +1 -1
  84. package/dist/components/link/index.cjs +1 -1
  85. package/dist/components/link/index.js +1 -1
  86. package/dist/components/modal/Modal.d.ts +0 -1
  87. package/dist/components/modal/Modal.d.ts.map +1 -1
  88. package/dist/components/modal/browser.js +1 -1
  89. package/dist/components/modal/index.cjs +1 -1
  90. package/dist/components/modal/index.js +1 -1
  91. package/dist/components/navigation/browser.js +4 -4
  92. package/dist/components/navigation/index.cjs +1 -1
  93. package/dist/components/navigation/index.js +4 -4
  94. package/dist/components/off-canvas/browser.js +3 -3
  95. package/dist/components/off-canvas/index.cjs +1 -1
  96. package/dist/components/off-canvas/index.js +3 -3
  97. package/dist/components/page/browser.js +4 -4
  98. package/dist/components/page/index.cjs +1 -1
  99. package/dist/components/page/index.js +4 -4
  100. package/dist/components/popover/browser.js +1 -1
  101. package/dist/components/popover/index.cjs +1 -1
  102. package/dist/components/popover/index.js +1 -1
  103. package/dist/components/resource-table/ResourceTable.d.ts +25 -0
  104. package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
  105. package/dist/components/resource-table/browser.js +127 -35
  106. package/dist/components/resource-table/index.cjs +2 -2
  107. package/dist/components/resource-table/index.js +127 -35
  108. package/dist/components/scroll-fade/browser.js +1 -1
  109. package/dist/components/scroll-fade/index.cjs +1 -1
  110. package/dist/components/scroll-fade/index.js +1 -1
  111. package/dist/components/search/browser.js +7 -7
  112. package/dist/components/search/index.cjs +1 -1
  113. package/dist/components/search/index.js +7 -7
  114. package/dist/components/select/browser.js +1 -1
  115. package/dist/components/select/index.cjs +1 -1
  116. package/dist/components/select/index.js +1 -1
  117. package/dist/components/side-navigation/browser.js +6 -6
  118. package/dist/components/side-navigation/index.cjs +1 -1
  119. package/dist/components/side-navigation/index.js +6 -6
  120. package/dist/components/sortable/browser.js +1 -1
  121. package/dist/components/sortable/index.cjs +1 -1
  122. package/dist/components/sortable/index.js +1 -1
  123. package/dist/components/stack/browser.js +1 -1
  124. package/dist/components/stack/index.cjs +1 -1
  125. package/dist/components/stack/index.js +1 -1
  126. package/dist/components/switch/browser.js +2 -2
  127. package/dist/components/switch/index.cjs +1 -1
  128. package/dist/components/switch/index.js +2 -2
  129. package/dist/components/table/browser.js +1 -1
  130. package/dist/components/table/index.cjs +1 -1
  131. package/dist/components/table/index.js +1 -1
  132. package/dist/components/tabs/browser.js +1 -1
  133. package/dist/components/tabs/index.cjs +1 -1
  134. package/dist/components/tabs/index.js +1 -1
  135. package/dist/components/tags/browser.js +4 -4
  136. package/dist/components/tags/index.cjs +1 -1
  137. package/dist/components/tags/index.js +4 -4
  138. package/dist/components/time-picker/browser.js +1 -1
  139. package/dist/components/time-picker/index.cjs +1 -1
  140. package/dist/components/time-picker/index.js +1 -1
  141. package/dist/components/tree/browser.js +5 -5
  142. package/dist/components/tree/index.cjs +1 -1
  143. package/dist/components/tree/index.js +5 -5
  144. package/dist/icons/code.svg +3 -0
  145. package/dist/index.cjs +11 -11
  146. package/dist/index.css +3 -3
  147. package/dist/index.js +521 -434
  148. package/dist/modal.css +1 -1
  149. package/dist/navigation-search.json +7 -0
  150. package/dist/resource-table.css +1 -1
  151. package/package.json +1 -1
  152. package/dist/components/chunks/caret-down-BFHFcMyL.js +0 -1
  153. package/dist/components/chunks/caret-right--YnEL-Ny.js +0 -1
  154. package/dist/components/chunks/close-DSrpkGHJ.js +0 -1
  155. package/dist/components/chunks/icon-D6C1XGp2.js +0 -1
  156. package/dist/components/chunks/icon-l34kRIZg.js +0 -1
  157. package/dist/components/chunks/search-q3dkl4-X.js +0 -1
  158. /package/dist/components/chunks/{ScrollFade-DvzPIk2A.js → ScrollFade-Cg9fVO0V.js} +0 -0
  159. /package/dist/components/chunks/{ScrollFade-BMs09zZN.js → ScrollFade-Dfq2B1Hm.js} +0 -0
  160. /package/dist/components/chunks/{link-DVKhDl3O.js → link-B_fNmwOk.js} +0 -0
  161. /package/dist/components/chunks/{link-ACOyvLkd.js → link-BxTQfAW9.js} +0 -0
  162. /package/dist/components/chunks/{sortable-BSw58wy_.js → sortable-Bql13n3L.js} +0 -0
  163. /package/dist/components/chunks/{sortable-D3et5wXB.js → sortable-DdT2ptc5.js} +0 -0
  164. /package/dist/components/chunks/{stack-DEIdHS0n.js → stack-CK2o4-As.js} +0 -0
  165. /package/dist/components/chunks/{stack-CzcHNnl8.js → stack-CKUu8IVZ.js} +0 -0
@@ -6,5 +6,5 @@ import '../../icon.css'
6
6
  import '../../text.css'
7
7
  import '../../stack.css'
8
8
  import '../../confirm-action.css'
9
- import { n as e, t } from "../chunks/confirm-action-CX_FEzCR.js";
9
+ import { n as e, t } from "../chunks/confirm-action-BW1UwJNu.js";
10
10
  export { t as confirm, e as default };
@@ -16,5 +16,5 @@ __mintLoadStyle('icon', '../../icon.css')
16
16
  __mintLoadStyle('popover', '../../popover.css')
17
17
  __mintLoadStyle('stack', '../../stack.css')
18
18
  __mintLoadStyle('date-picker', '../../date-picker.css')
19
- import { t as e } from "../chunks/date-picker-BLqafHuc.js";
19
+ import { t as e } from "../chunks/date-picker-R2gbHZCP.js";
20
20
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/date-picker-J8AtC8Py.js`);module.exports=e.t;
1
+ const e=require(`../chunks/date-picker-CDEVgbw7.js`);module.exports=e.t;
@@ -4,5 +4,5 @@ import '../../icon.css'
4
4
  import '../../popover.css'
5
5
  import '../../stack.css'
6
6
  import '../../date-picker.css'
7
- import { t as e } from "../chunks/date-picker-BLqafHuc.js";
7
+ import { t as e } from "../chunks/date-picker-R2gbHZCP.js";
8
8
  export { e as default };
@@ -19,11 +19,11 @@ __mintLoadStyle('stack', '../../stack.css')
19
19
  __mintLoadStyle('time-picker', '../../time-picker.css')
20
20
  __mintLoadStyle('text', '../../text.css')
21
21
  __mintLoadStyle('datetime-picker', '../../datetime-picker.css')
22
- import "../chunks/icon-hyFz3uhh.js";
22
+ import "../chunks/icon-DAB2KLeo.js";
23
23
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
24
24
  import "../chunks/text-C-6UCBp-.js";
25
- import "../chunks/date-picker-BLqafHuc.js";
26
- import "../chunks/time-picker-MtNyIZFb.js";
25
+ import "../chunks/date-picker-R2gbHZCP.js";
26
+ import "../chunks/time-picker-NksIqyuD.js";
27
27
  //#region src/components/datetime-picker/DateTimePicker.ts
28
28
  var t = class extends HTMLElement {
29
29
  constructor(...e) {
@@ -1 +1 @@
1
- require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/date-picker-J8AtC8Py.js`),require(`../chunks/time-picker-EAyF05v1.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._datePicker=null,this._timePicker=null,this._content=null,this._popoverContent=null,this._popoverObserver=null,this._hiddenInput=null,this._dateValue=``,this._timeValue=``,this._dateStageComplete=!1,this._ready=!1,this._writingValue=!1,this._displayControlBound=!1,this._prependSlotNodes=[],this._appendSlotNodes=[],this._slotObserver=null}static get observedAttributes(){return[`value`,`label`,`info`,`name`,`required`,`disabled`,`readonly`,`format`,`display-format`,`min`,`max`,`shortcuts`,`hours`,`minutes`,`seconds`,`error`,`error-message`]}connectedCallback(){this.classList.add(`mint-datetime-picker`),this._readValue(this.getAttribute(`value`)||``),this.render(),this._ready=!0,this._slotObserver=new MutationObserver(e=>{e.some(e=>e.type===`attributes`&&e.target.hasAttribute(`slot`)||e.type===`childList`&&e.target===this&&Array.from(e.addedNodes).some(e=>e instanceof HTMLElement&&(e.slot===`prepend`||e.slot===`append`)))&&this.render()}),this._slotObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`slot`]})}attributeChangedCallback(e,t,n){if(!(t===n||!this._ready||e===`value`&&this._writingValue)){if(e===`value`){this._readValue(n||``),this.render();return}if(e===`error`||e===`error-message`){this._syncState();return}this.render()}}get value(){return this.getAttribute(`value`)||``}set value(e){this.setValue(e||``)}getValue(){return this.getAttribute(`value`)||``}setValue(e){this._readValue(e),this._writingValue=!0,e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this._writingValue=!1,this.render(),this._syncState()}_parseDate(e,t){let n=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n)return new Date(Number(n[1]),Number(n[2])-1,Number(n[3]));let r={yyyy:`(\\d{4})`,yy:`(\\d{2})`,Y:`(\\d{4})`,y:`(\\d{2})`,mm:`(\\d{1,2})`,m:`(\\d{1,2})`,n:`(\\d{1,2})`,dd:`(\\d{1,2})`,d:`(\\d{1,2})`,j:`(\\d{1,2})`,M:`([A-Za-z]+)`,F:`([A-Za-z]+)`},i=Object.keys(r).sort((e,t)=>t.length-e.length),a=[],o=`^`;for(let e=0;e<t.length;){let n=i.find(n=>t.startsWith(n,e));n?(o+=r[n],a.push(n),e+=n.length):(o+=t[e].replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),e++)}let s=e.match(RegExp(`${o}$`,`i`));if(!s)return null;let c=2e3,l=1,u=1;a.forEach((e,t)=>{let n=s[t+1];if(e===`Y`||e===`yyyy`)c=Number(n);else if(e===`y`||e===`yy`)c=Number(n)+2e3;else if(e===`m`||e===`mm`||e===`n`)l=Number(n);else if(e===`d`||e===`dd`||e===`j`)u=Number(n);else if(e===`M`||e===`F`){let e=new Date(`${n} 1, 2000`).getMonth();Number.isNaN(e)||(l=e+1)}});let d=new Date(c,l-1,u);return d.getFullYear()===c&&d.getMonth()===l-1&&d.getDate()===u?d:null}_formatDate(e,t){let n=e=>String(e).padStart(2,`0`),r={Y:String(e.getFullYear()),yyyy:String(e.getFullYear()),yy:String(e.getFullYear()).slice(-2),y:String(e.getFullYear()).slice(-2),mm:n(e.getMonth()+1),m:n(e.getMonth()+1),n:String(e.getMonth()+1),dd:n(e.getDate()),d:n(e.getDate()),j:String(e.getDate()),M:e.toLocaleString(void 0,{month:`short`}),F:e.toLocaleString(void 0,{month:`long`})};return t.replace(/yyyy|yy|mm|dd|Y|y|m|n|d|j|M|F/g,e=>r[e])}_readValue(e){let[t=``,n=``]=e.split(/[T ]/),r=this._parseDate(t,this.getAttribute(`format`)||`mm/dd/yyyy`);this._dateValue=r?this._formatDate(r,this.getAttribute(`format`)||`mm/dd/yyyy`):``,this._timeValue=n||``,this._dateStageComplete=!!r}_toISODate(){let e=this._parseDate(this._dateValue,this.getAttribute(`format`)||`mm/dd/yyyy`);return e?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:``}_syncValue(e=!1){let t=this._toISODate(),n=this._timeValue,r=t&&n?`${t}T${n}`:``;this._writingValue=!0,r?this.setAttribute(`value`,r):this.removeAttribute(`value`),this._writingValue=!1,this._hiddenInput&&(this._hiddenInput.value=r),e&&r&&(this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})))}_syncState(){this._datePicker&&(this._datePicker.setAttribute(`value`,this._dateValue),this._datePicker.setAttribute(`error`,this.getAttribute(`error`)||`false`),this._datePicker.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._timePicker?.setAttribute(`error`,this.getAttribute(`error`)||`false`),this._timePicker?.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._hiddenInput&&(this._hiddenInput.value=this.getValue()),this._syncCombinedDisplay())}render(){let e=this.getAttribute(`label`)||``,t=this.getAttribute(`info`)||``,n=this.getAttribute(`format`)||`mm/dd/yyyy`,r=this.getAttribute(`disabled`)===`true`,i=this.getAttribute(`readonly`)===`true`;this._collectAdornmentNodes(),this._displayControlBound=!1;let a=document.createElement(`mint-date-picker`);a.setAttribute(`class`,`mint-datetime-picker-date`),a.setAttribute(`keep-open-on-select`,`true`),a.setAttribute(`format`,n),a.setAttribute(`value`,this._dateValue),a.setAttribute(`label`,e),a.setAttribute(`info`,t),a.setAttribute(`display-format`,this.getAttribute(`display-format`)||`F j, Y`);for(let e of[`min`,`max`,`shortcuts`])this.hasAttribute(e)&&a.setAttribute(e,this.getAttribute(e)||``);r&&a.setAttribute(`disabled`,`true`),i&&a.setAttribute(`readonly`,`true`),this.hasAttribute(`required`)&&a.setAttribute(`required`,this.getAttribute(`required`)||`true`),this.hasAttribute(`error`)&&a.setAttribute(`error`,this.getAttribute(`error`)||`false`),this.hasAttribute(`error-message`)&&a.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._prependSlotNodes.forEach(e=>a.appendChild(e)),this._appendSlotNodes.forEach(e=>a.appendChild(e)),a.addEventListener(`change`,e=>{e.stopPropagation();let t=e.detail?.value||a.value||``;this._parseDate(t,n)&&(this._dateValue=t,this._dateStageComplete=!0,this._syncValue(!1),this._syncCombinedDisplay(),this._openTimeStage())}),this._datePicker=a,this._bindCombinedDisplayControl();let o=document.createElement(`div`);o.className=`mint-datetime-picker-content`,this._content=o,this.innerHTML=``,this.appendChild(o),o.appendChild(a),this._hiddenInput=document.createElement(`input`),this._hiddenInput.type=`hidden`,this._hiddenInput.name=this.getAttribute(`name`)||``,this._hiddenInput.value=this.getValue(),this.appendChild(this._hiddenInput),this._waitForPopover()}_collectAdornmentNodes(){let e=[...this._prependSlotNodes,...this._appendSlotNodes,...Array.from(this.querySelectorAll(`[slot="prepend"], [slot="append"]`))];this._prependSlotNodes=e.filter(e=>e.getAttribute(`slot`)===`prepend`),this._appendSlotNodes=e.filter(e=>e.getAttribute(`slot`)===`append`)}_getPopover(){let e=this._datePicker,t=e?.getPopoverElement?.()||e?._popover;if(t)return t;let n=e?.querySelector?.(`.mint-date-picker-icon-button`)?.id;return n?document.querySelector(`mint-popover[trigger-id="${CSS.escape(n)}"]`):null}_getPopoverContent(e){return e.querySelector(`.popover-content`)||e}_waitForPopover(e=0){let t=this._getPopover();if(!t){e<120&&requestAnimationFrame(()=>this._waitForPopover(e+1));return}if(this._popoverContent=this._datePicker?.getPopoverContentElement?.()||this._getPopoverContent(t),this._bindCombinedDisplayControl(),this._syncCombinedDisplay(),this._popoverObserver?.disconnect(),this._popoverObserver=new MutationObserver(()=>{if(t.getAttribute(`open`)===`true`){let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()}}),this._popoverObserver.observe(t,{attributes:!0,attributeFilter:[`open`]}),t.getAttribute(`open`)===`true`){let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()}}_bindCombinedDisplayControl(){if(this._displayControlBound||!this._datePicker)return;this._displayControlBound=!0;let e=e=>{if(!e.target?.closest(`.mint-date-picker-field`)||this.getAttribute(`disabled`)===`true`||this.getAttribute(`readonly`)===`true`||e instanceof KeyboardEvent&&e.key!==`Enter`&&e.key!==` `)return;e.preventDefault(),e.stopImmediatePropagation();let t=this._getPopover();t?.open?t.open():t?.setAttribute(`open`,`true`)};this._datePicker.addEventListener(`click`,e,!0),this._datePicker.addEventListener(`keydown`,e,!0)}_openTimeStage(){queueMicrotask(()=>{let e=this._getPopover();if(e?.getAttribute(`open`)!==`true`){typeof e?.open==`function`?e.open():e?.setAttribute(`open`,`true`),requestAnimationFrame(()=>this._renderTimeStage());return}this._renderTimeStage()})}_renderTimeStage(){if(!this._popoverContent||!this._dateStageComplete)return;let e=document.createElement(`div`);e.className=`mint-datetime-picker-panel`;let t=document.createElement(`button`);t.type=`button`,t.className=`mint-datetime-picker-time-heading`,t.setAttribute(`aria-label`,`Change date, ${this._dateValue}`),t.textContent=this._getFormattedDate(),t.addEventListener(`click`,()=>{let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()});let n=document.createElement(`mint-time-picker`),r=this.getAttribute(`disabled`)===`true`,i=this.getAttribute(`readonly`)===`true`;n.setAttribute(`inline`,`true`),n.setAttribute(`value`,this._timeValue||`09:00`),n.setAttribute(`label`,``);for(let e of[`hours`,`minutes`,`seconds`])this.hasAttribute(e)&&n.setAttribute(e,this.getAttribute(e)||``);r&&n.setAttribute(`disabled`,`true`),i&&n.setAttribute(`readonly`,`true`),n.addEventListener(`change`,()=>{this._timeValue=n.getValue?.()||n.getAttribute(`value`)||``,this._syncValue(!0),this._syncCombinedDisplay()}),n.addEventListener(`change`,e=>e.stopPropagation()),n.addEventListener(`input`,e=>e.stopPropagation()),this._timePicker=n,e.appendChild(t),e.appendChild(n),this._popoverContent.replaceChildren(e)}_syncCombinedDisplay(){let e=this._datePicker?.getDisplayElement?.()||this._datePicker?.querySelector(`.mint-date-picker-display`);if(!e||!this._dateValue)return;let t=this._getFormattedDate();e.textContent=this._timeValue?`${t} · ${this._formatTime(this._timeValue)}`:t,e.setAttribute(`aria-label`,`${this.getAttribute(`label`)||`Date and time`}: ${e.textContent}`)}_getFormattedDate(){let e=this._parseDate(this._dateValue,this.getAttribute(`format`)||`mm/dd/yyyy`);return e?this._formatDate(e,this.getAttribute(`display-format`)||`F j, Y`):this._dateValue}_formatTime(e){let[t=`00`,n=`00`,r]=e.split(`:`),i=Number(t),a=this.getAttribute(`hours`)!==`false`,o=this.getAttribute(`minutes`)!==`false`,s=this.getAttribute(`seconds`)===`true`;if(!a)return[o?n:``,s?r||`00`:``].filter(Boolean).join(`:`);let c=i%12||12;return`${[String(c),o?n:``,s?r||`00`:``].filter(Boolean).join(`:`)} ${i>=12?`pm`:`am`}`}};customElements.get(`mint-datetime-picker`)||e.t(`mint-datetime-picker`,t),module.exports=t;
1
+ require(`../chunks/icon-B9P0jyS2.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/date-picker-CDEVgbw7.js`),require(`../chunks/time-picker-CijVykQ3.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._datePicker=null,this._timePicker=null,this._content=null,this._popoverContent=null,this._popoverObserver=null,this._hiddenInput=null,this._dateValue=``,this._timeValue=``,this._dateStageComplete=!1,this._ready=!1,this._writingValue=!1,this._displayControlBound=!1,this._prependSlotNodes=[],this._appendSlotNodes=[],this._slotObserver=null}static get observedAttributes(){return[`value`,`label`,`info`,`name`,`required`,`disabled`,`readonly`,`format`,`display-format`,`min`,`max`,`shortcuts`,`hours`,`minutes`,`seconds`,`error`,`error-message`]}connectedCallback(){this.classList.add(`mint-datetime-picker`),this._readValue(this.getAttribute(`value`)||``),this.render(),this._ready=!0,this._slotObserver=new MutationObserver(e=>{e.some(e=>e.type===`attributes`&&e.target.hasAttribute(`slot`)||e.type===`childList`&&e.target===this&&Array.from(e.addedNodes).some(e=>e instanceof HTMLElement&&(e.slot===`prepend`||e.slot===`append`)))&&this.render()}),this._slotObserver.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`slot`]})}attributeChangedCallback(e,t,n){if(!(t===n||!this._ready||e===`value`&&this._writingValue)){if(e===`value`){this._readValue(n||``),this.render();return}if(e===`error`||e===`error-message`){this._syncState();return}this.render()}}get value(){return this.getAttribute(`value`)||``}set value(e){this.setValue(e||``)}getValue(){return this.getAttribute(`value`)||``}setValue(e){this._readValue(e),this._writingValue=!0,e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this._writingValue=!1,this.render(),this._syncState()}_parseDate(e,t){let n=e.match(/^(\d{4})-(\d{2})-(\d{2})/);if(n)return new Date(Number(n[1]),Number(n[2])-1,Number(n[3]));let r={yyyy:`(\\d{4})`,yy:`(\\d{2})`,Y:`(\\d{4})`,y:`(\\d{2})`,mm:`(\\d{1,2})`,m:`(\\d{1,2})`,n:`(\\d{1,2})`,dd:`(\\d{1,2})`,d:`(\\d{1,2})`,j:`(\\d{1,2})`,M:`([A-Za-z]+)`,F:`([A-Za-z]+)`},i=Object.keys(r).sort((e,t)=>t.length-e.length),a=[],o=`^`;for(let e=0;e<t.length;){let n=i.find(n=>t.startsWith(n,e));n?(o+=r[n],a.push(n),e+=n.length):(o+=t[e].replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),e++)}let s=e.match(RegExp(`${o}$`,`i`));if(!s)return null;let c=2e3,l=1,u=1;a.forEach((e,t)=>{let n=s[t+1];if(e===`Y`||e===`yyyy`)c=Number(n);else if(e===`y`||e===`yy`)c=Number(n)+2e3;else if(e===`m`||e===`mm`||e===`n`)l=Number(n);else if(e===`d`||e===`dd`||e===`j`)u=Number(n);else if(e===`M`||e===`F`){let e=new Date(`${n} 1, 2000`).getMonth();Number.isNaN(e)||(l=e+1)}});let d=new Date(c,l-1,u);return d.getFullYear()===c&&d.getMonth()===l-1&&d.getDate()===u?d:null}_formatDate(e,t){let n=e=>String(e).padStart(2,`0`),r={Y:String(e.getFullYear()),yyyy:String(e.getFullYear()),yy:String(e.getFullYear()).slice(-2),y:String(e.getFullYear()).slice(-2),mm:n(e.getMonth()+1),m:n(e.getMonth()+1),n:String(e.getMonth()+1),dd:n(e.getDate()),d:n(e.getDate()),j:String(e.getDate()),M:e.toLocaleString(void 0,{month:`short`}),F:e.toLocaleString(void 0,{month:`long`})};return t.replace(/yyyy|yy|mm|dd|Y|y|m|n|d|j|M|F/g,e=>r[e])}_readValue(e){let[t=``,n=``]=e.split(/[T ]/),r=this._parseDate(t,this.getAttribute(`format`)||`mm/dd/yyyy`);this._dateValue=r?this._formatDate(r,this.getAttribute(`format`)||`mm/dd/yyyy`):``,this._timeValue=n||``,this._dateStageComplete=!!r}_toISODate(){let e=this._parseDate(this._dateValue,this.getAttribute(`format`)||`mm/dd/yyyy`);return e?`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`:``}_syncValue(e=!1){let t=this._toISODate(),n=this._timeValue,r=t&&n?`${t}T${n}`:``;this._writingValue=!0,r?this.setAttribute(`value`,r):this.removeAttribute(`value`),this._writingValue=!1,this._hiddenInput&&(this._hiddenInput.value=r),e&&r&&(this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:{value:r},bubbles:!0,composed:!0})))}_syncState(){this._datePicker&&(this._datePicker.setAttribute(`value`,this._dateValue),this._datePicker.setAttribute(`error`,this.getAttribute(`error`)||`false`),this._datePicker.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._timePicker?.setAttribute(`error`,this.getAttribute(`error`)||`false`),this._timePicker?.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._hiddenInput&&(this._hiddenInput.value=this.getValue()),this._syncCombinedDisplay())}render(){let e=this.getAttribute(`label`)||``,t=this.getAttribute(`info`)||``,n=this.getAttribute(`format`)||`mm/dd/yyyy`,r=this.getAttribute(`disabled`)===`true`,i=this.getAttribute(`readonly`)===`true`;this._collectAdornmentNodes(),this._displayControlBound=!1;let a=document.createElement(`mint-date-picker`);a.setAttribute(`class`,`mint-datetime-picker-date`),a.setAttribute(`keep-open-on-select`,`true`),a.setAttribute(`format`,n),a.setAttribute(`value`,this._dateValue),a.setAttribute(`label`,e),a.setAttribute(`info`,t),a.setAttribute(`display-format`,this.getAttribute(`display-format`)||`F j, Y`);for(let e of[`min`,`max`,`shortcuts`])this.hasAttribute(e)&&a.setAttribute(e,this.getAttribute(e)||``);r&&a.setAttribute(`disabled`,`true`),i&&a.setAttribute(`readonly`,`true`),this.hasAttribute(`required`)&&a.setAttribute(`required`,this.getAttribute(`required`)||`true`),this.hasAttribute(`error`)&&a.setAttribute(`error`,this.getAttribute(`error`)||`false`),this.hasAttribute(`error-message`)&&a.setAttribute(`error-message`,this.getAttribute(`error-message`)||``),this._prependSlotNodes.forEach(e=>a.appendChild(e)),this._appendSlotNodes.forEach(e=>a.appendChild(e)),a.addEventListener(`change`,e=>{e.stopPropagation();let t=e.detail?.value||a.value||``;this._parseDate(t,n)&&(this._dateValue=t,this._dateStageComplete=!0,this._syncValue(!1),this._syncCombinedDisplay(),this._openTimeStage())}),this._datePicker=a,this._bindCombinedDisplayControl();let o=document.createElement(`div`);o.className=`mint-datetime-picker-content`,this._content=o,this.innerHTML=``,this.appendChild(o),o.appendChild(a),this._hiddenInput=document.createElement(`input`),this._hiddenInput.type=`hidden`,this._hiddenInput.name=this.getAttribute(`name`)||``,this._hiddenInput.value=this.getValue(),this.appendChild(this._hiddenInput),this._waitForPopover()}_collectAdornmentNodes(){let e=[...this._prependSlotNodes,...this._appendSlotNodes,...Array.from(this.querySelectorAll(`[slot="prepend"], [slot="append"]`))];this._prependSlotNodes=e.filter(e=>e.getAttribute(`slot`)===`prepend`),this._appendSlotNodes=e.filter(e=>e.getAttribute(`slot`)===`append`)}_getPopover(){let e=this._datePicker,t=e?.getPopoverElement?.()||e?._popover;if(t)return t;let n=e?.querySelector?.(`.mint-date-picker-icon-button`)?.id;return n?document.querySelector(`mint-popover[trigger-id="${CSS.escape(n)}"]`):null}_getPopoverContent(e){return e.querySelector(`.popover-content`)||e}_waitForPopover(e=0){let t=this._getPopover();if(!t){e<120&&requestAnimationFrame(()=>this._waitForPopover(e+1));return}if(this._popoverContent=this._datePicker?.getPopoverContentElement?.()||this._getPopoverContent(t),this._bindCombinedDisplayControl(),this._syncCombinedDisplay(),this._popoverObserver?.disconnect(),this._popoverObserver=new MutationObserver(()=>{if(t.getAttribute(`open`)===`true`){let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()}}),this._popoverObserver.observe(t,{attributes:!0,attributeFilter:[`open`]}),t.getAttribute(`open`)===`true`){let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()}}_bindCombinedDisplayControl(){if(this._displayControlBound||!this._datePicker)return;this._displayControlBound=!0;let e=e=>{if(!e.target?.closest(`.mint-date-picker-field`)||this.getAttribute(`disabled`)===`true`||this.getAttribute(`readonly`)===`true`||e instanceof KeyboardEvent&&e.key!==`Enter`&&e.key!==` `)return;e.preventDefault(),e.stopImmediatePropagation();let t=this._getPopover();t?.open?t.open():t?.setAttribute(`open`,`true`)};this._datePicker.addEventListener(`click`,e,!0),this._datePicker.addEventListener(`keydown`,e,!0)}_openTimeStage(){queueMicrotask(()=>{let e=this._getPopover();if(e?.getAttribute(`open`)!==`true`){typeof e?.open==`function`?e.open():e?.setAttribute(`open`,`true`),requestAnimationFrame(()=>this._renderTimeStage());return}this._renderTimeStage()})}_renderTimeStage(){if(!this._popoverContent||!this._dateStageComplete)return;let e=document.createElement(`div`);e.className=`mint-datetime-picker-panel`;let t=document.createElement(`button`);t.type=`button`,t.className=`mint-datetime-picker-time-heading`,t.setAttribute(`aria-label`,`Change date, ${this._dateValue}`),t.textContent=this._getFormattedDate(),t.addEventListener(`click`,()=>{let e=this._datePicker;typeof e?.refreshCalendar==`function`?e.refreshCalendar():e?._buildCalendar?.()});let n=document.createElement(`mint-time-picker`),r=this.getAttribute(`disabled`)===`true`,i=this.getAttribute(`readonly`)===`true`;n.setAttribute(`inline`,`true`),n.setAttribute(`value`,this._timeValue||`09:00`),n.setAttribute(`label`,``);for(let e of[`hours`,`minutes`,`seconds`])this.hasAttribute(e)&&n.setAttribute(e,this.getAttribute(e)||``);r&&n.setAttribute(`disabled`,`true`),i&&n.setAttribute(`readonly`,`true`),n.addEventListener(`change`,()=>{this._timeValue=n.getValue?.()||n.getAttribute(`value`)||``,this._syncValue(!0),this._syncCombinedDisplay()}),n.addEventListener(`change`,e=>e.stopPropagation()),n.addEventListener(`input`,e=>e.stopPropagation()),this._timePicker=n,e.appendChild(t),e.appendChild(n),this._popoverContent.replaceChildren(e)}_syncCombinedDisplay(){let e=this._datePicker?.getDisplayElement?.()||this._datePicker?.querySelector(`.mint-date-picker-display`);if(!e||!this._dateValue)return;let t=this._getFormattedDate();e.textContent=this._timeValue?`${t} · ${this._formatTime(this._timeValue)}`:t,e.setAttribute(`aria-label`,`${this.getAttribute(`label`)||`Date and time`}: ${e.textContent}`)}_getFormattedDate(){let e=this._parseDate(this._dateValue,this.getAttribute(`format`)||`mm/dd/yyyy`);return e?this._formatDate(e,this.getAttribute(`display-format`)||`F j, Y`):this._dateValue}_formatTime(e){let[t=`00`,n=`00`,r]=e.split(`:`),i=Number(t),a=this.getAttribute(`hours`)!==`false`,o=this.getAttribute(`minutes`)!==`false`,s=this.getAttribute(`seconds`)===`true`;if(!a)return[o?n:``,s?r||`00`:``].filter(Boolean).join(`:`);let c=i%12||12;return`${[String(c),o?n:``,s?r||`00`:``].filter(Boolean).join(`:`)} ${i>=12?`pm`:`am`}`}};customElements.get(`mint-datetime-picker`)||e.t(`mint-datetime-picker`,t),module.exports=t;
@@ -7,11 +7,11 @@ import '../../stack.css'
7
7
  import '../../time-picker.css'
8
8
  import '../../text.css'
9
9
  import '../../datetime-picker.css'
10
- import "../chunks/icon-hyFz3uhh.js";
10
+ import "../chunks/icon-DAB2KLeo.js";
11
11
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
12
12
  import "../chunks/text-C-6UCBp-.js";
13
- import "../chunks/date-picker-BLqafHuc.js";
14
- import "../chunks/time-picker-MtNyIZFb.js";
13
+ import "../chunks/date-picker-R2gbHZCP.js";
14
+ import "../chunks/time-picker-NksIqyuD.js";
15
15
  //#region src/components/datetime-picker/DateTimePicker.ts
16
16
  var t = class extends HTMLElement {
17
17
  constructor(...e) {
@@ -13,11 +13,11 @@ const __mintLoadStyle = (key, url) => {
13
13
  __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('icon', '../../icon.css')
15
15
  __mintLoadStyle('dropzone', '../../dropzone.css')
16
- import { a as e } from "../chunks/icon-hyFz3uhh.js";
16
+ import { a as e } from "../chunks/icon-DAB2KLeo.js";
17
17
  import { t } from "../chunks/register-element-BFYmIynH.js";
18
- import "../chunks/icon-l34kRIZg.js";
19
- import "../chunks/warning-DAYbxh3S.js";
20
- import "../chunks/close-Cn8XLO1c.js";
18
+ import "../chunks/icon-CIAsmizQ.js";
19
+ import "../chunks/warning-vve-cXPr.js";
20
+ import "../chunks/close-8VXvDCau.js";
21
21
  e({
22
22
  name: "upload",
23
23
  viewBox: "0 0 24 24",
@@ -1 +1 @@
1
- const e=require(`../chunks/icon-CWOP4Com.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-D6C1XGp2.js`),require(`../chunks/warning-DKCaTYO6.js`),require(`../chunks/close-DSrpkGHJ.js`),e.a({name:`upload`,viewBox:`0 0 24 24`,path:`M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`attach`,viewBox:`0 0 24 24`,path:`M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`label`,`accept`,`multiple`,`width`,`height`,`disabled`,`name`,`error`,`error-message`,`loading`,`aria-label`,`aria-describedby`]}constructor(){super(),this._dropzone=null,this._fileInput=null,this._previewContainer=null,this._isDragging=!1,this._wasDragging=!1,this._isUpdatingFiles=!1,this._listenersInitialized=!1,this._selectedFiles=[],this._previewUrls=[],this._fileStates=new Map,this._emptyState=null,this._iconContainer=null,this._labelElement=null,this._transitionTimer=null,this._resizeObserver=null,this._showFileList=!1,this._resetHandler=null,this._a11yId=`mint-dropzone-${Math.random().toString(36).slice(2,10)}`}connectedCallback(){this.classList.add(`mint-dropzone`),this.render(),this._attachFormResetListener()}disconnectedCallback(){if(this.removeEventListeners(),this._cleanupPreviewUrls(),this._resizeObserver?.disconnect(),this._transitionTimer&&clearTimeout(this._transitionTimer),this._resetHandler){let e=this.closest(`form`);e&&e.removeEventListener(`reset`,this._resetHandler),this._resetHandler=null}}attributeChangedCallback(e,t,n){if(t!==n){if(e===`error`||e===`error-message`){this._updateDragStateClass(),this._renderErrorState(this.hasError(),this.getErrorMessage());return}if(e===`loading`){this.render();return}this.render()}}getLabel(){return this.getAttribute(`label`)||``}getAccept(){return this.getAttribute(`accept`)||``}isMultiple(){return this.getAttribute(`multiple`)===`true`}getWidth(){return this.getAttribute(`width`)||`200px`}getHeight(){return this.getAttribute(`height`)||`200px`}_renderSkeleton(e){let t=this.querySelector(`.mint-dropzone-skeleton-container`),n=this._dropzone;if(e){this.classList.add(`is-loading`),t||(t=document.createElement(`div`),t.className=`mint-dropzone-skeleton-container`,n?(n.classList.add(`is-positioned`),n.appendChild(t)):this.appendChild(t));let e=t.querySelector(`.mint-dropzone-skeleton`);e||(e=document.createElement(`div`),e.className=`mint-dropzone-skeleton`,t.appendChild(e)),t.classList.add(`is-visible`),n?.classList.add(`is-loading`)}else this.classList.remove(`is-loading`),t&&t.classList.remove(`is-visible`),n?.classList.remove(`is-loading`)}getName(){return this.getAttribute(`name`)||``}hasError(){return this.getAttribute(`error`)===`true`}getErrorMessage(){return this.getAttribute(`error-message`)||``}isDisabled(){return this.getAttribute(`disabled`)===`true`}isLoading(){return this.getAttribute(`loading`)===`true`}render(){let e=this.isLoading(),t=this.getLabel(),n=this.getAccept(),r=this.isMultiple(),i=this.isDisabled(),a=this.getWidth(),o=this.getHeight(),s=this.getName(),c=this.hasError(),l=this.getErrorMessage();if(this._dropzone||(this._dropzone=document.createElement(`div`),this.appendChild(this._dropzone)),this._updateDragStateClass(),this._dropzone.setAttribute(`aria-invalid`,c?`true`:`false`),i)this._dropzone.setAttribute(`tabindex`,`-1`),this._dropzone.removeAttribute(`role`);else{this._dropzone.setAttribute(`tabindex`,`0`),this._dropzone.setAttribute(`role`,`button`),this._dropzone.setAttribute(`aria-label`,this.getAttribute(`aria-label`)||t||`File upload dropzone`);let e=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean),n=this.querySelector(`.mint-dropzone-error`);n&&(n.id=`${this.id||this._a11yId}-error`,e.push(n.id)),e.length?this._dropzone.setAttribute(`aria-describedby`,Array.from(new Set(e)).join(` `)):this._dropzone.removeAttribute(`aria-describedby`)}if(this._dropzone.style.width=a,this._dropzone.style.height=o,this._dropzone.style.minWidth=`0`,this._dropzone.style.minHeight=`0`,this._dropzone.style.maxWidth=`100%`,this._fileInput||(this._fileInput=document.createElement(`input`),this._fileInput.type=`file`,this._fileInput.className=`mint-dropzone-file-input`,this._fileInput.setAttribute(`tabindex`,`-1`),this._fileInput.setAttribute(`aria-hidden`,`true`),this._dropzone.appendChild(this._fileInput)),this._fileInput.accept=n,this._fileInput.multiple=r,this._fileInput.disabled=i,s?this._fileInput.name=s:this._fileInput.removeAttribute(`name`),this._fileInput.setAttribute(`aria-invalid`,c?`true`:`false`),!this._emptyState){this._emptyState=document.createElement(`div`),this._emptyState.className=`mint-dropzone-empty-state`,this._iconContainer=document.createElement(`div`),this._iconContainer.className=`mint-dropzone-icon`;let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`upload`),e.className=`mint-dropzone-upload-icon`,this._iconContainer.appendChild(e),this._emptyState.appendChild(this._iconContainer),this._labelElement=document.createElement(`div`),this._labelElement.className=`mint-dropzone-label`,this._emptyState.appendChild(this._labelElement),this._dropzone.appendChild(this._emptyState)}this._labelElement&&(this._labelElement.textContent=t,this._labelElement.hidden=!t),this._dropzone.classList.toggle(`has-files`,this._selectedFiles.length>0),this._emptyState.classList.toggle(`is-hidden`,this._selectedFiles.length>0),this._emptyState.classList.remove(`is-showing`),!this._resizeObserver&&typeof ResizeObserver<`u`&&(this._resizeObserver=new ResizeObserver(([e])=>{let{width:t,height:n}=e.contentRect;this._dropzone?.classList.toggle(`is-wide`,t>=520&&t>=n)}),this._resizeObserver.observe(this._dropzone)),this.setupEventListeners(),this._renderErrorState(c,l),this._renderPreviews(),this._renderSkeleton(e)}_updateDragState(){this._dropzone&&this._updateDragStateClass()}_renderErrorState(e,t){let n=this.querySelector(`.mint-dropzone-error`);if(e&&t?(n||(n=document.createElement(`div`),n.className=`mint-dropzone-error`,this.appendChild(n)),n.textContent=t):n&&n.remove(),this._dropzone){this._dropzone.setAttribute(`aria-invalid`,String(e)),n&&(n.id=`${this.id||this._a11yId}-error`);let t=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);n&&t.push(n.id),t.length?this._dropzone.setAttribute(`aria-describedby`,Array.from(new Set(t)).join(` `)):this._dropzone.removeAttribute(`aria-describedby`)}}_updateDragStateClass(){if(!this._dropzone)return;let e=this.isDisabled(),t=this.hasError();this._dropzone.className=`mint-dropzone-target`,this._dropzone.classList.toggle(`has-files`,this._selectedFiles.length>0),this._dropzone.classList.toggle(`is-dragging`,this._isDragging),this._dropzone.classList.toggle(`has-error`,t),this._dropzone.classList.toggle(`is-disabled`,e)}setupEventListeners(){this._listenersInitialized||(this._listenersInitialized=!0,this.removeEventListeners(),!(!this._dropzone||!this._fileInput||this.isDisabled())&&(this._onDropzoneClick||=e=>{if(!(this.isDisabled()||!this._fileInput)&&e.target!==this._fileInput&&(e.stopPropagation(),e.preventDefault(),e.isTrusted))try{this._fileInput.click()}catch(e){console.debug(`File chooser blocked:`,e)}},this._onDragOver||=e=>{e.preventDefault(),e.stopPropagation(),this.isDisabled()||this._isDragging||(this._isDragging=!0,this._wasDragging=!0,this._updateDragState())},this._onDragLeave||=e=>{e.preventDefault(),e.stopPropagation();let t=this._dropzone?.getBoundingClientRect();t&&(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&this._isDragging&&(this._isDragging=!1,this._wasDragging=!1,this._updateDragState())},this._onDrop||=e=>{if(e.preventDefault(),e.stopPropagation(),this._isDragging&&(this._isDragging=!1,this._wasDragging=!1,this._updateDragState()),this.isDisabled())return;let t=e.dataTransfer?.files;t&&t.length>0&&this._handleFiles(t)},this._onFileInputInput||=e=>{e.stopImmediatePropagation(),e.stopPropagation()},this._onKeyDown||=e=>{if(!(this.isDisabled()||!this._fileInput)&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),e.isTrusted))try{this._fileInput.click()}catch(e){console.debug(`File chooser blocked:`,e)}},this._onFocus||=e=>{this._dropzone&&!this.isDisabled()&&this._dropzone.classList.add(`is-focused`)},this._onBlur||=e=>{this._dropzone},this._onFileInputChange||=e=>{if(e.stopImmediatePropagation(),e.stopPropagation(),this._isUpdatingFiles)return;let t=e.target.files;if(t&&t.length>0){let e=this.getAccept(),n=this.isMultiple(),r=[],i=[];for(let n=0;n<t.length;n++){let a=t[n];this._isFileAccepted(a,e)?r.push(a):i.push(a)}if(!n&&r.length>1&&(i.push(...r.slice(1)),r.splice(1)),i.length>0){let e=new CustomEvent(`dropRejected`,{detail:{files:i,reason:`File type not accepted or multiple files not allowed`},bubbles:!0,cancelable:!0});this.dispatchEvent(e)}r.length>0&&this._applyValidFiles(r)}},this._dropzone.addEventListener(`click`,this._onDropzoneClick),this._dropzone.addEventListener(`dragover`,this._onDragOver),this._dropzone.addEventListener(`dragleave`,this._onDragLeave),this._dropzone.addEventListener(`drop`,this._onDrop),this._dropzone.addEventListener(`keydown`,this._onKeyDown),this._dropzone.addEventListener(`focus`,this._onFocus),this._dropzone.addEventListener(`blur`,this._onBlur),this._fileInput.addEventListener(`change`,this._onFileInputChange),this._fileInput.addEventListener(`input`,this._onFileInputInput,!0)))}removeEventListeners(){this._dropzone&&(this._onDropzoneClick&&this._dropzone.removeEventListener(`click`,this._onDropzoneClick),this._onDragOver&&this._dropzone.removeEventListener(`dragover`,this._onDragOver),this._onDragLeave&&this._dropzone.removeEventListener(`dragleave`,this._onDragLeave),this._onDrop&&this._dropzone.removeEventListener(`drop`,this._onDrop),this._onKeyDown&&this._dropzone.removeEventListener(`keydown`,this._onKeyDown),this._onFocus&&this._dropzone.removeEventListener(`focus`,this._onFocus),this._onBlur&&this._dropzone.removeEventListener(`blur`,this._onBlur)),this._fileInput&&(this._onFileInputChange&&this._fileInput.removeEventListener(`change`,this._onFileInputChange),this._onFileInputInput&&this._fileInput.removeEventListener(`input`,this._onFileInputInput,!0)),this._isDragging=!1,this._listenersInitialized=!1}_handleFiles(e){let t=this.getAccept(),n=this.isMultiple(),r=[],i=[];for(let n=0;n<e.length;n++){let a=e[n];this._isFileAccepted(a,t)?r.push(a):i.push(a)}if(!n&&r.length>1&&(i.push(...r.slice(1)),r.splice(1)),i.length>0){let e=new CustomEvent(`dropRejected`,{detail:{files:i,reason:`File type not accepted or multiple files not allowed`},bubbles:!0,cancelable:!0});this.dispatchEvent(e)}r.length>0&&this._applyValidFiles(r)}_isFileAccepted(e,t){if(!t)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase());for(let t of n)if(t.startsWith(`.`)){if(`.`+e.name.split(`.`).pop()?.toLowerCase()===t)return!0}else if(t.includes(`/*`)){if(t.split(`/`)[0]===e.type.split(`/`)[0])return!0}else if(e.type===t)return!0;return!1}_dispatchEvent(e,t){let n=t.target,r=new CustomEvent(e,{detail:{files:n.files?Array.from(n.files):[],value:n.value||``},bubbles:!0,cancelable:!0});this.dispatchEvent(r)}_dispatchSelectionEvents(){let e={files:[...this._selectedFiles],value:``};this.dispatchEvent(new CustomEvent(`input`,{detail:e,bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}_syncFileInputFromSelected(){if(!this._fileInput)return;let e=new DataTransfer;this._selectedFiles.forEach(t=>{try{e.items.add(t)}catch(e){console.warn(`Failed to add file to DataTransfer:`,e)}}),this._isUpdatingFiles=!0;try{this._fileInput.files=e.files}catch(e){console.warn(`Failed to set files on input:`,e)}setTimeout(()=>{this._isUpdatingFiles=!1},0)}get files(){return this._syncFileInputFromSelected(),this._fileInput?.files||null}getFiles(){return[...this._selectedFiles]}getFileEntries(){return this._selectedFiles.map(e=>({file:e,...this._fileStates.get(e)||{progress:null,error:``,uploaded:!1}}))}removeFile(e){let t=typeof e==`number`?e:this._selectedFiles.findIndex(t=>typeof e==`string`?t.name===e:t===e);return t<0||t>=this._selectedFiles.length?!1:(this._removeFileAt(t),!0)}setFileProgress(e,t){if(!this._selectedFiles.includes(e))return;let n=this._fileStates.get(e)||{progress:null,error:``,uploaded:!1};n.progress=t===null?null:Math.max(0,Math.min(100,t)),n.uploaded=!1,this._fileStates.set(e,n),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileprogress`,{detail:{file:e,progress:n.progress},bubbles:!0,composed:!0}))}setFileError(e,t){this._selectedFiles.includes(e)&&(this._fileStates.set(e,{progress:null,error:t,uploaded:!1}),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileerror`,{detail:{file:e,message:t},bubbles:!0,composed:!0})))}setFileUploaded(e){this._selectedFiles.includes(e)&&(this._fileStates.set(e,{progress:null,error:``,uploaded:!0}),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileuploaded`,{detail:{file:e},bubbles:!0,composed:!0})))}syncFiles(){this._syncFileInputFromSelected()}_renderPreviews(){if(!this._dropzone)return;if(this._previewContainer&&(this._cleanupPreviewUrls(),this._previewContainer.remove()),this._selectedFiles.length===0){this._previewContainer=null,this._updateDragStateClass();return}let e=document.createElement(`div`);e.className=`mint-dropzone-previews-wrapper`,e.classList.toggle(`has-error`,this.hasError()),e.classList.toggle(`is-dragging`,this._isDragging);let t=document.createElement(`div`);t.className=`mint-dropzone-previews`,this._selectedFiles.forEach((e,n)=>{let r=this._fileStates.get(e)||{progress:null,error:``,uploaded:!1},i=document.createElement(`div`);if(i.className=`mint-dropzone-file`,i.classList.toggle(`has-upload-error`,!!r.error),e.type.startsWith(`image/`)){let t=document.createElement(`img`);t.className=`mint-dropzone-file-image`;let n=URL.createObjectURL(e);this._previewUrls.push(n),t.src=n,i.appendChild(t)}else{let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`attach`),e.className=`mint-dropzone-file-icon`,i.appendChild(e)}let a=document.createElement(`div`);if(a.className=`mint-dropzone-file-name`,a.textContent=e.name,i.appendChild(a),r.uploaded){let t=document.createElement(`span`);t.className=`mint-dropzone-file-uploaded`,t.setAttribute(`role`,`img`),t.setAttribute(`aria-label`,`${e.name} uploaded successfully`);let n=document.createElement(`mint-icon`);n.setAttribute(`name`,`check`),t.appendChild(n),i.appendChild(t)}else if(r.progress!==null&&!r.error){let t=document.createElement(`progress`);t.className=`mint-dropzone-file-progress`,t.max=100,t.value=r.progress,t.setAttribute(`aria-label`,`Uploading ${e.name}: ${r.progress}%`),i.appendChild(t)}if(r.error){let t=document.createElement(`button`);t.type=`button`,t.className=`mint-dropzone-file-error`,t.setAttribute(`aria-label`,`Upload failed for ${e.name}`),t.setAttribute(`aria-expanded`,`false`);let n=document.createElement(`mint-icon`);n.setAttribute(`name`,`warning`),t.appendChild(n);let a=document.createElement(`span`);a.className=`mint-dropzone-file-error-message`,a.setAttribute(`role`,`tooltip`),a.textContent=r.error,t.appendChild(a),t.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation();let n=t.classList.toggle(`is-open`);t.setAttribute(`aria-expanded`,String(n))}),i.appendChild(t)}let o=document.createElement(`button`);o.type=`button`,o.className=`mint-dropzone-file-remove`;let s=document.createElement(`mint-icon`);s.setAttribute(`name`,`close`),s.className=`mint-dropzone-file-remove-icon`,o.appendChild(s),o.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),this._removeFileAt(n)}),i.appendChild(o),t.appendChild(i)});let n=document.createElement(`div`);n.className=`mint-dropzone-preview-fade is-top`,e.appendChild(n);let r=document.createElement(`div`);r.className=`mint-dropzone-preview-fade is-bottom is-visible`,e.appendChild(r);let i=()=>{let e=t.scrollTop,i=t.scrollHeight,a=t.clientHeight;e>0?n.classList.add(`is-visible`):n.classList.remove(`is-visible`),e+a<i-1?r.classList.add(`is-visible`):r.classList.remove(`is-visible`)};i(),t.addEventListener(`scroll`,i),e.appendChild(t),this._previewContainer=e,e.classList.toggle(`is-visible`,this._showFileList),this._dropzone.appendChild(e),this._updateDragStateClass()}_removeFileAt(e){if(e<0||e>=this._selectedFiles.length)return;let[t]=this._selectedFiles.splice(e,1);t&&(this._cleanupPreviewUrls(),this._fileStates.delete(t)),this._syncFileInputFromSelected(),this._selectedFiles.length===0?this._animateListIn():this._renderPreviews(),this._dispatchSelectionEvents()}_cleanupPreviewUrls(){this._previewUrls.forEach(e=>URL.revokeObjectURL(e)),this._previewUrls=[]}_attachFormResetListener(){let e=this.closest(`form`);!e||this._resetHandler||(this._resetHandler=()=>{this._selectedFiles=[],this._fileStates.clear(),this._syncFileInputFromSelected(),this._animateListIn(),this._cleanupPreviewUrls()},e.addEventListener(`reset`,this._resetHandler))}_applyValidFiles(e){if(this.isMultiple()){let t=e.filter(e=>!this._isDuplicateFile(e));this._selectedFiles.push(...t),t.forEach(e=>this._fileStates.set(e,{progress:null,error:``,uploaded:!1}))}else this._selectedFiles=[e[0]],this._fileStates.clear(),this._fileStates.set(e[0],{progress:null,error:``,uploaded:!1});this._syncFileInputFromSelected(),this._selectedFiles.length>0&&(this.removeAttribute(`error`),this.removeAttribute(`error-message`),this._fileInput&&this._fileInput.removeAttribute(`aria-invalid`)),this._renderPreviews(),this._animateListIn(),this._dispatchSelectionEvents()}_animateListIn(){if(this._transitionTimer&&clearTimeout(this._transitionTimer),!this._selectedFiles.length){this._showFileList=!1,this._dropzone?.classList.remove(`has-files`),this._emptyState?.classList.remove(`is-hidden`,`is-hiding`),this._emptyState?.classList.add(`is-showing`),this._transitionTimer=setTimeout(()=>this._emptyState?.classList.remove(`is-showing`),220),this._renderPreviews();return}this._showFileList=!1,this._dropzone?.classList.add(`has-files`,`is-upload-transition`),this._emptyState?.classList.remove(`is-hidden`,`is-showing`),this._emptyState?.classList.add(`is-hiding`),this._transitionTimer=setTimeout(()=>{this._showFileList=!0,this._emptyState?.classList.remove(`is-hiding`),this._emptyState?.classList.add(`is-hidden`),this._dropzone?.classList.remove(`is-upload-transition`),this._renderPreviews()},580)}_isDuplicateFile(e){return this._selectedFiles.some(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)}};customElements.get(`mint-dropzone`)||t.t(`mint-dropzone`,n),module.exports=n;
1
+ const e=require(`../chunks/icon-B9P0jyS2.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-Cia9x_J2.js`),require(`../chunks/warning-CVnTPaMj.js`),require(`../chunks/close-CWAmmMRg.js`),e.a({name:`upload`,viewBox:`0 0 24 24`,path:`M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12`,strokeLinecap:`round`,strokeLinejoin:`round`}),e.a({name:`attach`,viewBox:`0 0 24 24`,path:`M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13`,strokeLinecap:`round`,strokeLinejoin:`round`});var n=class extends HTMLElement{static get observedAttributes(){return[`label`,`accept`,`multiple`,`width`,`height`,`disabled`,`name`,`error`,`error-message`,`loading`,`aria-label`,`aria-describedby`]}constructor(){super(),this._dropzone=null,this._fileInput=null,this._previewContainer=null,this._isDragging=!1,this._wasDragging=!1,this._isUpdatingFiles=!1,this._listenersInitialized=!1,this._selectedFiles=[],this._previewUrls=[],this._fileStates=new Map,this._emptyState=null,this._iconContainer=null,this._labelElement=null,this._transitionTimer=null,this._resizeObserver=null,this._showFileList=!1,this._resetHandler=null,this._a11yId=`mint-dropzone-${Math.random().toString(36).slice(2,10)}`}connectedCallback(){this.classList.add(`mint-dropzone`),this.render(),this._attachFormResetListener()}disconnectedCallback(){if(this.removeEventListeners(),this._cleanupPreviewUrls(),this._resizeObserver?.disconnect(),this._transitionTimer&&clearTimeout(this._transitionTimer),this._resetHandler){let e=this.closest(`form`);e&&e.removeEventListener(`reset`,this._resetHandler),this._resetHandler=null}}attributeChangedCallback(e,t,n){if(t!==n){if(e===`error`||e===`error-message`){this._updateDragStateClass(),this._renderErrorState(this.hasError(),this.getErrorMessage());return}if(e===`loading`){this.render();return}this.render()}}getLabel(){return this.getAttribute(`label`)||``}getAccept(){return this.getAttribute(`accept`)||``}isMultiple(){return this.getAttribute(`multiple`)===`true`}getWidth(){return this.getAttribute(`width`)||`200px`}getHeight(){return this.getAttribute(`height`)||`200px`}_renderSkeleton(e){let t=this.querySelector(`.mint-dropzone-skeleton-container`),n=this._dropzone;if(e){this.classList.add(`is-loading`),t||(t=document.createElement(`div`),t.className=`mint-dropzone-skeleton-container`,n?(n.classList.add(`is-positioned`),n.appendChild(t)):this.appendChild(t));let e=t.querySelector(`.mint-dropzone-skeleton`);e||(e=document.createElement(`div`),e.className=`mint-dropzone-skeleton`,t.appendChild(e)),t.classList.add(`is-visible`),n?.classList.add(`is-loading`)}else this.classList.remove(`is-loading`),t&&t.classList.remove(`is-visible`),n?.classList.remove(`is-loading`)}getName(){return this.getAttribute(`name`)||``}hasError(){return this.getAttribute(`error`)===`true`}getErrorMessage(){return this.getAttribute(`error-message`)||``}isDisabled(){return this.getAttribute(`disabled`)===`true`}isLoading(){return this.getAttribute(`loading`)===`true`}render(){let e=this.isLoading(),t=this.getLabel(),n=this.getAccept(),r=this.isMultiple(),i=this.isDisabled(),a=this.getWidth(),o=this.getHeight(),s=this.getName(),c=this.hasError(),l=this.getErrorMessage();if(this._dropzone||(this._dropzone=document.createElement(`div`),this.appendChild(this._dropzone)),this._updateDragStateClass(),this._dropzone.setAttribute(`aria-invalid`,c?`true`:`false`),i)this._dropzone.setAttribute(`tabindex`,`-1`),this._dropzone.removeAttribute(`role`);else{this._dropzone.setAttribute(`tabindex`,`0`),this._dropzone.setAttribute(`role`,`button`),this._dropzone.setAttribute(`aria-label`,this.getAttribute(`aria-label`)||t||`File upload dropzone`);let e=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean),n=this.querySelector(`.mint-dropzone-error`);n&&(n.id=`${this.id||this._a11yId}-error`,e.push(n.id)),e.length?this._dropzone.setAttribute(`aria-describedby`,Array.from(new Set(e)).join(` `)):this._dropzone.removeAttribute(`aria-describedby`)}if(this._dropzone.style.width=a,this._dropzone.style.height=o,this._dropzone.style.minWidth=`0`,this._dropzone.style.minHeight=`0`,this._dropzone.style.maxWidth=`100%`,this._fileInput||(this._fileInput=document.createElement(`input`),this._fileInput.type=`file`,this._fileInput.className=`mint-dropzone-file-input`,this._fileInput.setAttribute(`tabindex`,`-1`),this._fileInput.setAttribute(`aria-hidden`,`true`),this._dropzone.appendChild(this._fileInput)),this._fileInput.accept=n,this._fileInput.multiple=r,this._fileInput.disabled=i,s?this._fileInput.name=s:this._fileInput.removeAttribute(`name`),this._fileInput.setAttribute(`aria-invalid`,c?`true`:`false`),!this._emptyState){this._emptyState=document.createElement(`div`),this._emptyState.className=`mint-dropzone-empty-state`,this._iconContainer=document.createElement(`div`),this._iconContainer.className=`mint-dropzone-icon`;let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`upload`),e.className=`mint-dropzone-upload-icon`,this._iconContainer.appendChild(e),this._emptyState.appendChild(this._iconContainer),this._labelElement=document.createElement(`div`),this._labelElement.className=`mint-dropzone-label`,this._emptyState.appendChild(this._labelElement),this._dropzone.appendChild(this._emptyState)}this._labelElement&&(this._labelElement.textContent=t,this._labelElement.hidden=!t),this._dropzone.classList.toggle(`has-files`,this._selectedFiles.length>0),this._emptyState.classList.toggle(`is-hidden`,this._selectedFiles.length>0),this._emptyState.classList.remove(`is-showing`),!this._resizeObserver&&typeof ResizeObserver<`u`&&(this._resizeObserver=new ResizeObserver(([e])=>{let{width:t,height:n}=e.contentRect;this._dropzone?.classList.toggle(`is-wide`,t>=520&&t>=n)}),this._resizeObserver.observe(this._dropzone)),this.setupEventListeners(),this._renderErrorState(c,l),this._renderPreviews(),this._renderSkeleton(e)}_updateDragState(){this._dropzone&&this._updateDragStateClass()}_renderErrorState(e,t){let n=this.querySelector(`.mint-dropzone-error`);if(e&&t?(n||(n=document.createElement(`div`),n.className=`mint-dropzone-error`,this.appendChild(n)),n.textContent=t):n&&n.remove(),this._dropzone){this._dropzone.setAttribute(`aria-invalid`,String(e)),n&&(n.id=`${this.id||this._a11yId}-error`);let t=(this.getAttribute(`aria-describedby`)||``).split(/\s+/).filter(Boolean);n&&t.push(n.id),t.length?this._dropzone.setAttribute(`aria-describedby`,Array.from(new Set(t)).join(` `)):this._dropzone.removeAttribute(`aria-describedby`)}}_updateDragStateClass(){if(!this._dropzone)return;let e=this.isDisabled(),t=this.hasError();this._dropzone.className=`mint-dropzone-target`,this._dropzone.classList.toggle(`has-files`,this._selectedFiles.length>0),this._dropzone.classList.toggle(`is-dragging`,this._isDragging),this._dropzone.classList.toggle(`has-error`,t),this._dropzone.classList.toggle(`is-disabled`,e)}setupEventListeners(){this._listenersInitialized||(this._listenersInitialized=!0,this.removeEventListeners(),!(!this._dropzone||!this._fileInput||this.isDisabled())&&(this._onDropzoneClick||=e=>{if(!(this.isDisabled()||!this._fileInput)&&e.target!==this._fileInput&&(e.stopPropagation(),e.preventDefault(),e.isTrusted))try{this._fileInput.click()}catch(e){console.debug(`File chooser blocked:`,e)}},this._onDragOver||=e=>{e.preventDefault(),e.stopPropagation(),this.isDisabled()||this._isDragging||(this._isDragging=!0,this._wasDragging=!0,this._updateDragState())},this._onDragLeave||=e=>{e.preventDefault(),e.stopPropagation();let t=this._dropzone?.getBoundingClientRect();t&&(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&this._isDragging&&(this._isDragging=!1,this._wasDragging=!1,this._updateDragState())},this._onDrop||=e=>{if(e.preventDefault(),e.stopPropagation(),this._isDragging&&(this._isDragging=!1,this._wasDragging=!1,this._updateDragState()),this.isDisabled())return;let t=e.dataTransfer?.files;t&&t.length>0&&this._handleFiles(t)},this._onFileInputInput||=e=>{e.stopImmediatePropagation(),e.stopPropagation()},this._onKeyDown||=e=>{if(!(this.isDisabled()||!this._fileInput)&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),e.isTrusted))try{this._fileInput.click()}catch(e){console.debug(`File chooser blocked:`,e)}},this._onFocus||=e=>{this._dropzone&&!this.isDisabled()&&this._dropzone.classList.add(`is-focused`)},this._onBlur||=e=>{this._dropzone},this._onFileInputChange||=e=>{if(e.stopImmediatePropagation(),e.stopPropagation(),this._isUpdatingFiles)return;let t=e.target.files;if(t&&t.length>0){let e=this.getAccept(),n=this.isMultiple(),r=[],i=[];for(let n=0;n<t.length;n++){let a=t[n];this._isFileAccepted(a,e)?r.push(a):i.push(a)}if(!n&&r.length>1&&(i.push(...r.slice(1)),r.splice(1)),i.length>0){let e=new CustomEvent(`dropRejected`,{detail:{files:i,reason:`File type not accepted or multiple files not allowed`},bubbles:!0,cancelable:!0});this.dispatchEvent(e)}r.length>0&&this._applyValidFiles(r)}},this._dropzone.addEventListener(`click`,this._onDropzoneClick),this._dropzone.addEventListener(`dragover`,this._onDragOver),this._dropzone.addEventListener(`dragleave`,this._onDragLeave),this._dropzone.addEventListener(`drop`,this._onDrop),this._dropzone.addEventListener(`keydown`,this._onKeyDown),this._dropzone.addEventListener(`focus`,this._onFocus),this._dropzone.addEventListener(`blur`,this._onBlur),this._fileInput.addEventListener(`change`,this._onFileInputChange),this._fileInput.addEventListener(`input`,this._onFileInputInput,!0)))}removeEventListeners(){this._dropzone&&(this._onDropzoneClick&&this._dropzone.removeEventListener(`click`,this._onDropzoneClick),this._onDragOver&&this._dropzone.removeEventListener(`dragover`,this._onDragOver),this._onDragLeave&&this._dropzone.removeEventListener(`dragleave`,this._onDragLeave),this._onDrop&&this._dropzone.removeEventListener(`drop`,this._onDrop),this._onKeyDown&&this._dropzone.removeEventListener(`keydown`,this._onKeyDown),this._onFocus&&this._dropzone.removeEventListener(`focus`,this._onFocus),this._onBlur&&this._dropzone.removeEventListener(`blur`,this._onBlur)),this._fileInput&&(this._onFileInputChange&&this._fileInput.removeEventListener(`change`,this._onFileInputChange),this._onFileInputInput&&this._fileInput.removeEventListener(`input`,this._onFileInputInput,!0)),this._isDragging=!1,this._listenersInitialized=!1}_handleFiles(e){let t=this.getAccept(),n=this.isMultiple(),r=[],i=[];for(let n=0;n<e.length;n++){let a=e[n];this._isFileAccepted(a,t)?r.push(a):i.push(a)}if(!n&&r.length>1&&(i.push(...r.slice(1)),r.splice(1)),i.length>0){let e=new CustomEvent(`dropRejected`,{detail:{files:i,reason:`File type not accepted or multiple files not allowed`},bubbles:!0,cancelable:!0});this.dispatchEvent(e)}r.length>0&&this._applyValidFiles(r)}_isFileAccepted(e,t){if(!t)return!0;let n=t.split(`,`).map(e=>e.trim().toLowerCase());for(let t of n)if(t.startsWith(`.`)){if(`.`+e.name.split(`.`).pop()?.toLowerCase()===t)return!0}else if(t.includes(`/*`)){if(t.split(`/`)[0]===e.type.split(`/`)[0])return!0}else if(e.type===t)return!0;return!1}_dispatchEvent(e,t){let n=t.target,r=new CustomEvent(e,{detail:{files:n.files?Array.from(n.files):[],value:n.value||``},bubbles:!0,cancelable:!0});this.dispatchEvent(r)}_dispatchSelectionEvents(){let e={files:[...this._selectedFiles],value:``};this.dispatchEvent(new CustomEvent(`input`,{detail:e,bubbles:!0,cancelable:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,cancelable:!0,composed:!0}))}_syncFileInputFromSelected(){if(!this._fileInput)return;let e=new DataTransfer;this._selectedFiles.forEach(t=>{try{e.items.add(t)}catch(e){console.warn(`Failed to add file to DataTransfer:`,e)}}),this._isUpdatingFiles=!0;try{this._fileInput.files=e.files}catch(e){console.warn(`Failed to set files on input:`,e)}setTimeout(()=>{this._isUpdatingFiles=!1},0)}get files(){return this._syncFileInputFromSelected(),this._fileInput?.files||null}getFiles(){return[...this._selectedFiles]}getFileEntries(){return this._selectedFiles.map(e=>({file:e,...this._fileStates.get(e)||{progress:null,error:``,uploaded:!1}}))}removeFile(e){let t=typeof e==`number`?e:this._selectedFiles.findIndex(t=>typeof e==`string`?t.name===e:t===e);return t<0||t>=this._selectedFiles.length?!1:(this._removeFileAt(t),!0)}setFileProgress(e,t){if(!this._selectedFiles.includes(e))return;let n=this._fileStates.get(e)||{progress:null,error:``,uploaded:!1};n.progress=t===null?null:Math.max(0,Math.min(100,t)),n.uploaded=!1,this._fileStates.set(e,n),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileprogress`,{detail:{file:e,progress:n.progress},bubbles:!0,composed:!0}))}setFileError(e,t){this._selectedFiles.includes(e)&&(this._fileStates.set(e,{progress:null,error:t,uploaded:!1}),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileerror`,{detail:{file:e,message:t},bubbles:!0,composed:!0})))}setFileUploaded(e){this._selectedFiles.includes(e)&&(this._fileStates.set(e,{progress:null,error:``,uploaded:!0}),this._renderPreviews(),this.dispatchEvent(new CustomEvent(`fileuploaded`,{detail:{file:e},bubbles:!0,composed:!0})))}syncFiles(){this._syncFileInputFromSelected()}_renderPreviews(){if(!this._dropzone)return;if(this._previewContainer&&(this._cleanupPreviewUrls(),this._previewContainer.remove()),this._selectedFiles.length===0){this._previewContainer=null,this._updateDragStateClass();return}let e=document.createElement(`div`);e.className=`mint-dropzone-previews-wrapper`,e.classList.toggle(`has-error`,this.hasError()),e.classList.toggle(`is-dragging`,this._isDragging);let t=document.createElement(`div`);t.className=`mint-dropzone-previews`,this._selectedFiles.forEach((e,n)=>{let r=this._fileStates.get(e)||{progress:null,error:``,uploaded:!1},i=document.createElement(`div`);if(i.className=`mint-dropzone-file`,i.classList.toggle(`has-upload-error`,!!r.error),e.type.startsWith(`image/`)){let t=document.createElement(`img`);t.className=`mint-dropzone-file-image`;let n=URL.createObjectURL(e);this._previewUrls.push(n),t.src=n,i.appendChild(t)}else{let e=document.createElement(`mint-icon`);e.setAttribute(`name`,`attach`),e.className=`mint-dropzone-file-icon`,i.appendChild(e)}let a=document.createElement(`div`);if(a.className=`mint-dropzone-file-name`,a.textContent=e.name,i.appendChild(a),r.uploaded){let t=document.createElement(`span`);t.className=`mint-dropzone-file-uploaded`,t.setAttribute(`role`,`img`),t.setAttribute(`aria-label`,`${e.name} uploaded successfully`);let n=document.createElement(`mint-icon`);n.setAttribute(`name`,`check`),t.appendChild(n),i.appendChild(t)}else if(r.progress!==null&&!r.error){let t=document.createElement(`progress`);t.className=`mint-dropzone-file-progress`,t.max=100,t.value=r.progress,t.setAttribute(`aria-label`,`Uploading ${e.name}: ${r.progress}%`),i.appendChild(t)}if(r.error){let t=document.createElement(`button`);t.type=`button`,t.className=`mint-dropzone-file-error`,t.setAttribute(`aria-label`,`Upload failed for ${e.name}`),t.setAttribute(`aria-expanded`,`false`);let n=document.createElement(`mint-icon`);n.setAttribute(`name`,`warning`),t.appendChild(n);let a=document.createElement(`span`);a.className=`mint-dropzone-file-error-message`,a.setAttribute(`role`,`tooltip`),a.textContent=r.error,t.appendChild(a),t.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation();let n=t.classList.toggle(`is-open`);t.setAttribute(`aria-expanded`,String(n))}),i.appendChild(t)}let o=document.createElement(`button`);o.type=`button`,o.className=`mint-dropzone-file-remove`;let s=document.createElement(`mint-icon`);s.setAttribute(`name`,`close`),s.className=`mint-dropzone-file-remove-icon`,o.appendChild(s),o.addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),this._removeFileAt(n)}),i.appendChild(o),t.appendChild(i)});let n=document.createElement(`div`);n.className=`mint-dropzone-preview-fade is-top`,e.appendChild(n);let r=document.createElement(`div`);r.className=`mint-dropzone-preview-fade is-bottom is-visible`,e.appendChild(r);let i=()=>{let e=t.scrollTop,i=t.scrollHeight,a=t.clientHeight;e>0?n.classList.add(`is-visible`):n.classList.remove(`is-visible`),e+a<i-1?r.classList.add(`is-visible`):r.classList.remove(`is-visible`)};i(),t.addEventListener(`scroll`,i),e.appendChild(t),this._previewContainer=e,e.classList.toggle(`is-visible`,this._showFileList),this._dropzone.appendChild(e),this._updateDragStateClass()}_removeFileAt(e){if(e<0||e>=this._selectedFiles.length)return;let[t]=this._selectedFiles.splice(e,1);t&&(this._cleanupPreviewUrls(),this._fileStates.delete(t)),this._syncFileInputFromSelected(),this._selectedFiles.length===0?this._animateListIn():this._renderPreviews(),this._dispatchSelectionEvents()}_cleanupPreviewUrls(){this._previewUrls.forEach(e=>URL.revokeObjectURL(e)),this._previewUrls=[]}_attachFormResetListener(){let e=this.closest(`form`);!e||this._resetHandler||(this._resetHandler=()=>{this._selectedFiles=[],this._fileStates.clear(),this._syncFileInputFromSelected(),this._animateListIn(),this._cleanupPreviewUrls()},e.addEventListener(`reset`,this._resetHandler))}_applyValidFiles(e){if(this.isMultiple()){let t=e.filter(e=>!this._isDuplicateFile(e));this._selectedFiles.push(...t),t.forEach(e=>this._fileStates.set(e,{progress:null,error:``,uploaded:!1}))}else this._selectedFiles=[e[0]],this._fileStates.clear(),this._fileStates.set(e[0],{progress:null,error:``,uploaded:!1});this._syncFileInputFromSelected(),this._selectedFiles.length>0&&(this.removeAttribute(`error`),this.removeAttribute(`error-message`),this._fileInput&&this._fileInput.removeAttribute(`aria-invalid`)),this._renderPreviews(),this._animateListIn(),this._dispatchSelectionEvents()}_animateListIn(){if(this._transitionTimer&&clearTimeout(this._transitionTimer),!this._selectedFiles.length){this._showFileList=!1,this._dropzone?.classList.remove(`has-files`),this._emptyState?.classList.remove(`is-hidden`,`is-hiding`),this._emptyState?.classList.add(`is-showing`),this._transitionTimer=setTimeout(()=>this._emptyState?.classList.remove(`is-showing`),220),this._renderPreviews();return}this._showFileList=!1,this._dropzone?.classList.add(`has-files`,`is-upload-transition`),this._emptyState?.classList.remove(`is-hidden`,`is-showing`),this._emptyState?.classList.add(`is-hiding`),this._transitionTimer=setTimeout(()=>{this._showFileList=!0,this._emptyState?.classList.remove(`is-hiding`),this._emptyState?.classList.add(`is-hidden`),this._dropzone?.classList.remove(`is-upload-transition`),this._renderPreviews()},580)}_isDuplicateFile(e){return this._selectedFiles.some(t=>t.name===e.name&&t.size===e.size&&t.lastModified===e.lastModified)}};customElements.get(`mint-dropzone`)||t.t(`mint-dropzone`,n),module.exports=n;
@@ -1,11 +1,11 @@
1
1
  import '../../theme.css'
2
2
  import '../../icon.css'
3
3
  import '../../dropzone.css'
4
- import { a as e } from "../chunks/icon-hyFz3uhh.js";
4
+ import { a as e } from "../chunks/icon-DAB2KLeo.js";
5
5
  import { t } from "../chunks/register-element-BFYmIynH.js";
6
- import "../chunks/icon-l34kRIZg.js";
7
- import "../chunks/warning-DAYbxh3S.js";
8
- import "../chunks/close-Cn8XLO1c.js";
6
+ import "../chunks/icon-CIAsmizQ.js";
7
+ import "../chunks/warning-vve-cXPr.js";
8
+ import "../chunks/close-8VXvDCau.js";
9
9
  e({
10
10
  name: "upload",
11
11
  viewBox: "0 0 24 24",
@@ -12,5 +12,5 @@ const __mintLoadStyle = (key, url) => {
12
12
  }
13
13
  __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('icon', '../../icon.css')
15
- import { a as e, i as t, n, r, t as i } from "../chunks/icon-hyFz3uhh.js";
15
+ import { a as e, i as t, n, r, t as i } from "../chunks/icon-DAB2KLeo.js";
16
16
  export { i as default, n as getAllIcons, r as getIcon, t as hasIcon, e as registerIcon };
@@ -0,0 +1,3 @@
1
+ import { type IconData } from '../registry';
2
+ export declare const codeIcon: IconData;
3
+ //# sourceMappingURL=code.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/icons/code.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAMtB,CAAA"}
@@ -99,6 +99,7 @@ export { removeIcon } from './remove';
99
99
  export { checkIcon } from './check';
100
100
  export { collapseIcon } from './collapse';
101
101
  export { closeIcon } from './close';
102
+ export { codeIcon } from './code';
102
103
  export { warningIcon } from './warning';
103
104
  export { errorIcon } from './error';
104
105
  export { successIcon } from './success';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/icons/index.ts"],"names":[],"mappings":"AAsIA,OAAO,SAAS,CAAA;AAChB,OAAO,WAAW,CAAA;AAClB,OAAO,YAAY,CAAA;AACnB,OAAO,eAAe,CAAA;AACtB,OAAO,gBAAgB,CAAA;AACvB,OAAO,cAAc,CAAA;AACrB,OAAO,OAAO,CAAA;AACd,OAAO,WAAW,CAAA;AAClB,OAAO,gBAAgB,CAAA;AACvB,OAAO,gBAAgB,CAAA;AACvB,OAAO,iBAAiB,CAAA;AACxB,OAAO,UAAU,CAAA;AACjB,OAAO,cAAc,CAAA;AACrB,OAAO,WAAW,CAAA;AAClB,OAAO,WAAW,CAAA;AAClB,OAAO,YAAY,CAAA;AACnB,OAAO,UAAU,CAAA;AACjB,OAAO,iBAAiB,CAAA;AACxB,OAAO,gBAAgB,CAAA;AACvB,OAAO,cAAc,CAAA;AACrB,OAAO,gBAAgB,CA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e,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA"}
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../chunks/icon-CWOP4Com.js`);exports.default=e.t,exports.getAllIcons=e.n,exports.getIcon=e.r,exports.hasIcon=e.i,exports.registerIcon=e.a;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../chunks/icon-B9P0jyS2.js`);exports.default=e.t,exports.getAllIcons=e.n,exports.getIcon=e.r,exports.hasIcon=e.i,exports.registerIcon=e.a;
@@ -1,4 +1,4 @@
1
1
  import '../../theme.css'
2
2
  import '../../icon.css'
3
- import { a as e, i as t, n, r, t as i } from "../chunks/icon-hyFz3uhh.js";
3
+ import { a as e, i as t, n, r, t as i } from "../chunks/icon-DAB2KLeo.js";
4
4
  export { i as default, n as getAllIcons, r as getIcon, t as hasIcon, e as registerIcon };
@@ -13,5 +13,5 @@ const __mintLoadStyle = (key, url) => {
13
13
  __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('icon', '../../icon.css')
15
15
  __mintLoadStyle('input', '../../input.css')
16
- import { t as e } from "../chunks/input-B-njkq5j.js";
16
+ import { t as e } from "../chunks/input-B_q63xQu.js";
17
17
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/input-BI4nrOaG.js`);module.exports=e.t;
1
+ const e=require(`../chunks/input-BXC4lMG_.js`);module.exports=e.t;
@@ -1,5 +1,5 @@
1
1
  import '../../theme.css'
2
2
  import '../../icon.css'
3
3
  import '../../input.css'
4
- import { t as e } from "../chunks/input-B-njkq5j.js";
4
+ import { t as e } from "../chunks/input-B_q63xQu.js";
5
5
  export { e as default };
@@ -12,5 +12,5 @@ const __mintLoadStyle = (key, url) => {
12
12
  }
13
13
  __mintLoadStyle('theme', '../../theme.css')
14
14
  __mintLoadStyle('link', '../../link.css')
15
- import { t as e } from "../chunks/link-ACOyvLkd.js";
15
+ import { t as e } from "../chunks/link-BxTQfAW9.js";
16
16
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/link-DVKhDl3O.js`);module.exports=e.t;
1
+ const e=require(`../chunks/link-B_fNmwOk.js`);module.exports=e.t;
@@ -1,4 +1,4 @@
1
1
  import '../../theme.css'
2
2
  import '../../link.css'
3
- import { t as e } from "../chunks/link-ACOyvLkd.js";
3
+ import { t as e } from "../chunks/link-BxTQfAW9.js";
4
4
  export { e as default };
@@ -43,7 +43,6 @@ declare class MintModal extends HTMLElement {
43
43
  private _animateEnter;
44
44
  private _findTriggerElement;
45
45
  private _findTriggerPoint;
46
- private _setTransformOrigin;
47
46
  private _animateExit;
48
47
  }
49
48
  export default MintModal;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/Modal.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,CAAA;AACxB,OAAO,eAAe,CAAA;AACtB,OAAO,qBAAqB,CAAA;AAC5B,OAAO,eAAe,CAAA;AACtB,OAAO,gBAAgB,CAAA;AA0CvB,cAAM,SAAU,SAAQ,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AAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAY9F,OAAO,CAAC,eAAe;IAQvB,KAAK,IAAI,MAAM;IAIf,UAAU,IAAI,MAAM;IAIpB,OAAO,IAAI,OAAO,GAAG,SAAS,GAAG,OAAO;IAOxC,MAAM,IAAI,OAAO;IAKjB,IAAI,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IAM1C,KAAK,IAAI,IAAI;IAIb,MAAM,IAAI,IAAI;IAuSd,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,wBAAwB;IAyChC,OAAO,CAAC,2BAA2B;IASnC,OAAO,CAAC,aAAa;IAsCrB,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,YAAY;CAiCrB;AAOD,eAAe,SAAS,CAAA"}
@@ -17,5 +17,5 @@ __mintLoadStyle('icon', '../../icon.css')
17
17
  __mintLoadStyle('text', '../../text.css')
18
18
  __mintLoadStyle('stack', '../../stack.css')
19
19
  __mintLoadStyle('modal', '../../modal.css')
20
- import { t as e } from "../chunks/modal-BEv3P1P0.js";
20
+ import { t as e } from "../chunks/modal-BixpSAyU.js";
21
21
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/modal-ux6cqTde.js`);module.exports=e.t;
1
+ const e=require(`../chunks/modal-BrIOYE1W.js`);module.exports=e.t;
@@ -5,5 +5,5 @@ import '../../icon.css'
5
5
  import '../../text.css'
6
6
  import '../../stack.css'
7
7
  import '../../modal.css'
8
- import { t as e } from "../chunks/modal-BEv3P1P0.js";
8
+ import { t as e } from "../chunks/modal-BixpSAyU.js";
9
9
  export { e as default };
@@ -18,11 +18,11 @@ __mintLoadStyle('link', '../../link.css')
18
18
  __mintLoadStyle('popover', '../../popover.css')
19
19
  __mintLoadStyle('stack', '../../stack.css')
20
20
  __mintLoadStyle('navigation', '../../navigation.css')
21
- import "../chunks/icon-hyFz3uhh.js";
21
+ import "../chunks/icon-DAB2KLeo.js";
22
22
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
23
- import "../chunks/button-JPTyQfRs.js";
24
- import "../chunks/popover-CE2t5dKP.js";
25
- import "../chunks/link-ACOyvLkd.js";
23
+ import "../chunks/button-BTQHrE0x.js";
24
+ import "../chunks/popover-DPNBidSz.js";
25
+ import "../chunks/link-BxTQfAW9.js";
26
26
  //#region src/components/navigation/Navigation.js
27
27
  var t = 0, n = class extends HTMLElement {
28
28
  static get observedAttributes() {
@@ -1 +1 @@
1
- require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/button-B_yN18B-.js`),require(`../chunks/popover-0YEhBrgv.js`),require(`../chunks/link-DVKhDl3O.js`);var t=0,n=class extends HTMLElement{static get observedAttributes(){return[`brand`,`brand-href`,`direction`,`label`,`open`,`fixed`]}constructor(){super(),this._built=!1,this._brand=null,this._brandLink=null,this._leadingActions=null,this._items=null,this._toggle=null,this._toggleLabel=null,this._mobileActions=null,this._mobileActionNodes=[],this._instanceId=++t,this._dropdowns=[],this._content=null,this._actions=null,this._activeDropdown=null,this._layoutObserver=null}connectedCallback(){this._built||this._build(),this._observeDropdowns(),this._syncResponsiveDropdowns(),this._syncMobileActions(),typeof ResizeObserver<`u`&&(this._layoutObserver=new ResizeObserver(()=>{this._syncResponsiveDropdowns(),this._syncMobileActions()}),this._layoutObserver.observe(this)),this._syncAttributes()}disconnectedCallback(){for(let e of this._dropdowns)e.observer?.disconnect();this._layoutObserver?.disconnect(),this._layoutObserver=null}attributeChangedCallback(e,t,n){t===n||!this._built||(e===`open`?this._syncOpenState():this._syncAttributes())}getDirection(){return this.getAttribute(`direction`)===`vertical`?`vertical`:`horizontal`}getBrand(){return this.getAttribute(`brand`)||``}getBrandHref(){return this.getAttribute(`brand-href`)||`/`}getLabel(){return this.getAttribute(`label`)||`Primary navigation`}_build(){let e=Array.from(this.childNodes),t=e.find(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`brand`),n=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`leading-actions`),r=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&[`actions`,`mobile-actions`].includes(e.getAttribute(`slot`)));this._mobileActionNodes=r.filter(e=>e.getAttribute(`slot`)===`mobile-actions`);let i=e.filter(e=>e!==t&&!n.includes(e)&&!r.includes(e));this.replaceChildren();let a=document.createElement(`div`);a.className=`mint-navigation-shell`;let o=document.createElement(`div`);o.className=`mint-navigation-bar`,this._leadingActions=document.createElement(`div`),this._leadingActions.className=`mint-navigation-leading-actions`;for(let e of n)e.removeAttribute(`slot`),this._leadingActions.appendChild(e);this._brand=document.createElement(`div`),this._brand.className=`mint-navigation-brand`,t?(t.removeAttribute(`slot`),this._brand.appendChild(t)):this.getBrand()&&(this._brandLink=document.createElement(`mint-link`),this._brandLink.className=`mint-navigation-brand-link`,this._brandLink.textContent=this.getBrand(),this._brandLink.setAttribute(`href`,this.getBrandHref()),this._brand.appendChild(this._brandLink)),this._toggle=document.createElement(`mint-button`),this._toggle.className=`mint-navigation-toggle`,this._toggle.setAttribute(`aria-expanded`,`false`),this._toggle.addEventListener(`click`,()=>this.toggleMenu()),this._toggleLabel=document.createElement(`span`),this._toggleLabel.className=`mint-navigation-visually-hidden`,this._toggleLabel.textContent=`Open navigation menu`,this._toggle.append(this._toggleLabel),this._toggle.setAttribute(`variant`,`ghost`),this._toggle.setAttribute(`tone`,`action`),this._toggle.setAttribute(`button-type`,`button`),this._toggle.setAttribute(`icon`,`menu`),this._mobileActions=document.createElement(`div`),this._mobileActions.className=`mint-navigation-mobile-actions`,o.append(this._leadingActions,this._brand,this._mobileActions,this._toggle);let s=document.createElement(`div`);this._content=s,s.className=`mint-navigation-content`,this._items=document.createElement(`nav`),this._items.className=`mint-navigation-items`,this._items.setAttribute(`aria-label`,this.getLabel()),this._items.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()});let c=0;for(let e of i)if(e.nodeType!==Node.ELEMENT_NODE)this._items.appendChild(e);else if(e.tagName===`DETAILS`){let t=this._createDropdown(e,c++);this._items.append(t.trigger,t.popover),this._registerDropdown(t.trigger,t.popover)}else{let t=this._toMintLink(e);if(this._items.appendChild(t),t.nodeType===Node.ELEMENT_NODE&&t.tagName===`MINT-POPOVER`){let e=t.getAttribute(`trigger-id`),n=Array.from(this._items.querySelectorAll(`mint-button`)).find(t=>t.id===e);this._registerDropdown(n,t)}}let l=document.createElement(`div`);this._actions=l,l.className=`mint-navigation-actions`;for(let e of r)e.removeAttribute(`slot`),l.appendChild(e);let u=document.createElement(`section`);u.className=`mint-navigation-submenu`,u.setAttribute(`aria-label`,`Navigation submenu`);let d=document.createElement(`div`);d.className=`mint-navigation-submenu-header`;let f=document.createElement(`mint-button`);f.className=`mint-navigation-submenu-back`,f.setAttribute(`variant`,`ghost`),f.setAttribute(`tone`,`action`),f.setAttribute(`button-type`,`button`),f.setAttribute(`icon`,`arrow-left`),f.setAttribute(`aria-label`,`Back to main navigation`),f.addEventListener(`click`,()=>this._closeSubmenu());let p=document.createElement(`h3`);p.className=`mint-navigation-submenu-title`,d.append(f,p);let m=document.createElement(`nav`);m.className=`mint-navigation-submenu-items`,m.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()}),u.append(d,m),this._submenu=u,this._submenuTitle=p,this._submenuItems=m;for(let e of this._dropdowns)m.append(...e.submenuItems);s.append(this._items,l,u),a.append(o,s),this.appendChild(a),this._built=!0,this._syncMobileActions()}_syncMobileActions(){if(!this._mobileActions||!this._actions)return;let e=this._isMobileLayout()?this._mobileActions:this._actions;for(let t of this._mobileActionNodes)e.appendChild(t)}_toMintLink(e){if(e.nodeType!==Node.ELEMENT_NODE||e.tagName!==`A`)return e;let t=document.createElement(`mint-link`);for(;e.firstChild;)t.appendChild(e.firstChild);for(let n of Array.from(e.attributes))n.name!==`slot`&&t.setAttribute(n.name,n.value);return t}_createDropdown(e,t){let n=e.querySelector(`:scope > summary`),r=document.createElement(`mint-button`),i=`mint-navigation-${this._instanceId}-dropdown-${t}`,a=`${i}-popover`;if(r.id=i,r.className=`mint-navigation-dropdown-trigger`,r.setAttribute(`aria-haspopup`,`dialog`),r.setAttribute(`aria-expanded`,`false`),r.setAttribute(`aria-controls`,a),n){for(;n.firstChild;)r.appendChild(n.firstChild);n.remove()}else r.textContent=e.getAttribute(`label`)||`More`;r.setAttribute(`variant`,`ghost`),r.setAttribute(`tone`,`action`),r.setAttribute(`button-type`,`button`),r.setAttribute(`icon-position`,`right`);let o=document.createElement(`mint-popover`);o.id=a,o.className=`mint-navigation-dropdown`,o.setAttribute(`trigger-id`,i),o.setAttribute(`direction`,`down`),o.setAttribute(`aria-label`,`${r.textContent.trim()} links`);for(let t of Array.from(e.childNodes))o.appendChild(this._toMintLink(t));return{trigger:r,popover:o,observer:null}}_registerDropdown(e,t){if(!e||!t)return;t.id||=`mint-navigation-${this._instanceId}-popover-${this._dropdowns.length}`,e.classList.add(`mint-navigation-dropdown-trigger`),e.setAttribute(`aria-haspopup`,`dialog`),e.setAttribute(`aria-expanded`,String(t.hasAttribute(`open`))),e.setAttribute(`aria-controls`,t.id),t.classList.add(`mint-navigation-dropdown`),t.hasAttribute(`role`)||t.setAttribute(`role`,`group`),t.hasAttribute(`aria-label`)||t.setAttribute(`aria-label`,`${e.textContent.trim()} links`);let n=Array.from(t.querySelectorAll(`mint-link`)).map(e=>e.cloneNode(!0)),r={trigger:e,popover:t,observer:null,triggerId:t.getAttribute(`trigger-id`)||e.id,submenuItems:n};e.addEventListener(`click`,()=>{this._isMobileLayout()&&this._openSubmenu(r)}),this._dropdowns.push(r)}_observeDropdowns(){for(let e of this._dropdowns)e.observer||(e.observer=new MutationObserver(()=>{e.trigger.setAttribute(`aria-expanded`,String(e.popover.hasAttribute(`open`)))}),e.observer.observe(e.popover,{attributes:!0,attributeFilter:[`open`]}))}_isMobileLayout(){return this.getBoundingClientRect().width<=640}_syncResponsiveDropdowns(){let e=this._isMobileLayout();for(let t of this._dropdowns)e?(t.popover.hasAttribute(`open`)&&t.popover.close(),t.popover.getAttribute(`trigger-id`)&&t.popover.setAttribute(`trigger-id`,``)):t.triggerId&&t.popover.getAttribute(`trigger-id`)!==t.triggerId&&t.popover.setAttribute(`trigger-id`,t.triggerId);!e&&this._activeDropdown&&this._closeSubmenu()}_openSubmenu(e){this._isMobileLayout()&&(this._activeDropdown&&this._activeDropdown!==e&&this._activeDropdown.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=e,e.trigger.setAttribute(`aria-expanded`,`true`),this._submenuTitle.textContent=e.trigger.textContent.trim(),this._submenuItems.replaceChildren(...e.submenuItems),this._content.setAttribute(`data-submenu-open`,``))}_closeSubmenu(){this._activeDropdown?.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=null,this._content?.removeAttribute(`data-submenu-open`)}_syncAttributes(){if(this._brandLink){this._brandLink.setAttribute(`href`,this.getBrandHref());let e=this._brandLink.querySelector(`a`);e?e.textContent=this.getBrand():this._brandLink.textContent=this.getBrand()}this._items&&this._items.setAttribute(`aria-label`,this.getLabel()),this._syncOpenState()}_syncOpenState(){if(!this._toggle)return;let e=this.hasAttribute(`open`);this._toggle.setAttribute(`aria-expanded`,String(e));let t=e?`Close navigation menu`:`Open navigation menu`;this._toggle.setAttribute(`aria-label`,t),this._toggleLabel&&(this._toggleLabel.textContent=t),this._toggle.setAttribute(`icon`,e?`close`:`menu`)}openMenu(){this.setAttribute(`open`,``)}closeMenu(){this._closeSubmenu(),this.removeAttribute(`open`)}toggleMenu(){this.hasAttribute(`open`)?this.closeMenu():this.openMenu()}};typeof customElements<`u`&&!customElements.get(`mint-navigation`)&&e.t(`mint-navigation`,n),module.exports=n;
1
+ require(`../chunks/icon-B9P0jyS2.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/button-B4BMYTk1.js`),require(`../chunks/popover-CWWKb7L1.js`),require(`../chunks/link-B_fNmwOk.js`);var t=0,n=class extends HTMLElement{static get observedAttributes(){return[`brand`,`brand-href`,`direction`,`label`,`open`,`fixed`]}constructor(){super(),this._built=!1,this._brand=null,this._brandLink=null,this._leadingActions=null,this._items=null,this._toggle=null,this._toggleLabel=null,this._mobileActions=null,this._mobileActionNodes=[],this._instanceId=++t,this._dropdowns=[],this._content=null,this._actions=null,this._activeDropdown=null,this._layoutObserver=null}connectedCallback(){this._built||this._build(),this._observeDropdowns(),this._syncResponsiveDropdowns(),this._syncMobileActions(),typeof ResizeObserver<`u`&&(this._layoutObserver=new ResizeObserver(()=>{this._syncResponsiveDropdowns(),this._syncMobileActions()}),this._layoutObserver.observe(this)),this._syncAttributes()}disconnectedCallback(){for(let e of this._dropdowns)e.observer?.disconnect();this._layoutObserver?.disconnect(),this._layoutObserver=null}attributeChangedCallback(e,t,n){t===n||!this._built||(e===`open`?this._syncOpenState():this._syncAttributes())}getDirection(){return this.getAttribute(`direction`)===`vertical`?`vertical`:`horizontal`}getBrand(){return this.getAttribute(`brand`)||``}getBrandHref(){return this.getAttribute(`brand-href`)||`/`}getLabel(){return this.getAttribute(`label`)||`Primary navigation`}_build(){let e=Array.from(this.childNodes),t=e.find(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`brand`),n=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(`slot`)===`leading-actions`),r=e.filter(e=>e.nodeType===Node.ELEMENT_NODE&&[`actions`,`mobile-actions`].includes(e.getAttribute(`slot`)));this._mobileActionNodes=r.filter(e=>e.getAttribute(`slot`)===`mobile-actions`);let i=e.filter(e=>e!==t&&!n.includes(e)&&!r.includes(e));this.replaceChildren();let a=document.createElement(`div`);a.className=`mint-navigation-shell`;let o=document.createElement(`div`);o.className=`mint-navigation-bar`,this._leadingActions=document.createElement(`div`),this._leadingActions.className=`mint-navigation-leading-actions`;for(let e of n)e.removeAttribute(`slot`),this._leadingActions.appendChild(e);this._brand=document.createElement(`div`),this._brand.className=`mint-navigation-brand`,t?(t.removeAttribute(`slot`),this._brand.appendChild(t)):this.getBrand()&&(this._brandLink=document.createElement(`mint-link`),this._brandLink.className=`mint-navigation-brand-link`,this._brandLink.textContent=this.getBrand(),this._brandLink.setAttribute(`href`,this.getBrandHref()),this._brand.appendChild(this._brandLink)),this._toggle=document.createElement(`mint-button`),this._toggle.className=`mint-navigation-toggle`,this._toggle.setAttribute(`aria-expanded`,`false`),this._toggle.addEventListener(`click`,()=>this.toggleMenu()),this._toggleLabel=document.createElement(`span`),this._toggleLabel.className=`mint-navigation-visually-hidden`,this._toggleLabel.textContent=`Open navigation menu`,this._toggle.append(this._toggleLabel),this._toggle.setAttribute(`variant`,`ghost`),this._toggle.setAttribute(`tone`,`action`),this._toggle.setAttribute(`button-type`,`button`),this._toggle.setAttribute(`icon`,`menu`),this._mobileActions=document.createElement(`div`),this._mobileActions.className=`mint-navigation-mobile-actions`,o.append(this._leadingActions,this._brand,this._mobileActions,this._toggle);let s=document.createElement(`div`);this._content=s,s.className=`mint-navigation-content`,this._items=document.createElement(`nav`),this._items.className=`mint-navigation-items`,this._items.setAttribute(`aria-label`,this.getLabel()),this._items.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()});let c=0;for(let e of i)if(e.nodeType!==Node.ELEMENT_NODE)this._items.appendChild(e);else if(e.tagName===`DETAILS`){let t=this._createDropdown(e,c++);this._items.append(t.trigger,t.popover),this._registerDropdown(t.trigger,t.popover)}else{let t=this._toMintLink(e);if(this._items.appendChild(t),t.nodeType===Node.ELEMENT_NODE&&t.tagName===`MINT-POPOVER`){let e=t.getAttribute(`trigger-id`),n=Array.from(this._items.querySelectorAll(`mint-button`)).find(t=>t.id===e);this._registerDropdown(n,t)}}let l=document.createElement(`div`);this._actions=l,l.className=`mint-navigation-actions`;for(let e of r)e.removeAttribute(`slot`),l.appendChild(e);let u=document.createElement(`section`);u.className=`mint-navigation-submenu`,u.setAttribute(`aria-label`,`Navigation submenu`);let d=document.createElement(`div`);d.className=`mint-navigation-submenu-header`;let f=document.createElement(`mint-button`);f.className=`mint-navigation-submenu-back`,f.setAttribute(`variant`,`ghost`),f.setAttribute(`tone`,`action`),f.setAttribute(`button-type`,`button`),f.setAttribute(`icon`,`arrow-left`),f.setAttribute(`aria-label`,`Back to main navigation`),f.addEventListener(`click`,()=>this._closeSubmenu());let p=document.createElement(`h3`);p.className=`mint-navigation-submenu-title`,d.append(f,p);let m=document.createElement(`nav`);m.className=`mint-navigation-submenu-items`,m.addEventListener(`click`,e=>{e.target.closest(`a, mint-link`)&&this.closeMenu()}),u.append(d,m),this._submenu=u,this._submenuTitle=p,this._submenuItems=m;for(let e of this._dropdowns)m.append(...e.submenuItems);s.append(this._items,l,u),a.append(o,s),this.appendChild(a),this._built=!0,this._syncMobileActions()}_syncMobileActions(){if(!this._mobileActions||!this._actions)return;let e=this._isMobileLayout()?this._mobileActions:this._actions;for(let t of this._mobileActionNodes)e.appendChild(t)}_toMintLink(e){if(e.nodeType!==Node.ELEMENT_NODE||e.tagName!==`A`)return e;let t=document.createElement(`mint-link`);for(;e.firstChild;)t.appendChild(e.firstChild);for(let n of Array.from(e.attributes))n.name!==`slot`&&t.setAttribute(n.name,n.value);return t}_createDropdown(e,t){let n=e.querySelector(`:scope > summary`),r=document.createElement(`mint-button`),i=`mint-navigation-${this._instanceId}-dropdown-${t}`,a=`${i}-popover`;if(r.id=i,r.className=`mint-navigation-dropdown-trigger`,r.setAttribute(`aria-haspopup`,`dialog`),r.setAttribute(`aria-expanded`,`false`),r.setAttribute(`aria-controls`,a),n){for(;n.firstChild;)r.appendChild(n.firstChild);n.remove()}else r.textContent=e.getAttribute(`label`)||`More`;r.setAttribute(`variant`,`ghost`),r.setAttribute(`tone`,`action`),r.setAttribute(`button-type`,`button`),r.setAttribute(`icon-position`,`right`);let o=document.createElement(`mint-popover`);o.id=a,o.className=`mint-navigation-dropdown`,o.setAttribute(`trigger-id`,i),o.setAttribute(`direction`,`down`),o.setAttribute(`aria-label`,`${r.textContent.trim()} links`);for(let t of Array.from(e.childNodes))o.appendChild(this._toMintLink(t));return{trigger:r,popover:o,observer:null}}_registerDropdown(e,t){if(!e||!t)return;t.id||=`mint-navigation-${this._instanceId}-popover-${this._dropdowns.length}`,e.classList.add(`mint-navigation-dropdown-trigger`),e.setAttribute(`aria-haspopup`,`dialog`),e.setAttribute(`aria-expanded`,String(t.hasAttribute(`open`))),e.setAttribute(`aria-controls`,t.id),t.classList.add(`mint-navigation-dropdown`),t.hasAttribute(`role`)||t.setAttribute(`role`,`group`),t.hasAttribute(`aria-label`)||t.setAttribute(`aria-label`,`${e.textContent.trim()} links`);let n=Array.from(t.querySelectorAll(`mint-link`)).map(e=>e.cloneNode(!0)),r={trigger:e,popover:t,observer:null,triggerId:t.getAttribute(`trigger-id`)||e.id,submenuItems:n};e.addEventListener(`click`,()=>{this._isMobileLayout()&&this._openSubmenu(r)}),this._dropdowns.push(r)}_observeDropdowns(){for(let e of this._dropdowns)e.observer||(e.observer=new MutationObserver(()=>{e.trigger.setAttribute(`aria-expanded`,String(e.popover.hasAttribute(`open`)))}),e.observer.observe(e.popover,{attributes:!0,attributeFilter:[`open`]}))}_isMobileLayout(){return this.getBoundingClientRect().width<=640}_syncResponsiveDropdowns(){let e=this._isMobileLayout();for(let t of this._dropdowns)e?(t.popover.hasAttribute(`open`)&&t.popover.close(),t.popover.getAttribute(`trigger-id`)&&t.popover.setAttribute(`trigger-id`,``)):t.triggerId&&t.popover.getAttribute(`trigger-id`)!==t.triggerId&&t.popover.setAttribute(`trigger-id`,t.triggerId);!e&&this._activeDropdown&&this._closeSubmenu()}_openSubmenu(e){this._isMobileLayout()&&(this._activeDropdown&&this._activeDropdown!==e&&this._activeDropdown.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=e,e.trigger.setAttribute(`aria-expanded`,`true`),this._submenuTitle.textContent=e.trigger.textContent.trim(),this._submenuItems.replaceChildren(...e.submenuItems),this._content.setAttribute(`data-submenu-open`,``))}_closeSubmenu(){this._activeDropdown?.trigger.setAttribute(`aria-expanded`,`false`),this._activeDropdown=null,this._content?.removeAttribute(`data-submenu-open`)}_syncAttributes(){if(this._brandLink){this._brandLink.setAttribute(`href`,this.getBrandHref());let e=this._brandLink.querySelector(`a`);e?e.textContent=this.getBrand():this._brandLink.textContent=this.getBrand()}this._items&&this._items.setAttribute(`aria-label`,this.getLabel()),this._syncOpenState()}_syncOpenState(){if(!this._toggle)return;let e=this.hasAttribute(`open`);this._toggle.setAttribute(`aria-expanded`,String(e));let t=e?`Close navigation menu`:`Open navigation menu`;this._toggle.setAttribute(`aria-label`,t),this._toggleLabel&&(this._toggleLabel.textContent=t),this._toggle.setAttribute(`icon`,e?`close`:`menu`)}openMenu(){this.setAttribute(`open`,``)}closeMenu(){this._closeSubmenu(),this.removeAttribute(`open`)}toggleMenu(){this.hasAttribute(`open`)?this.closeMenu():this.openMenu()}};typeof customElements<`u`&&!customElements.get(`mint-navigation`)&&e.t(`mint-navigation`,n),module.exports=n;
@@ -6,11 +6,11 @@ import '../../link.css'
6
6
  import '../../popover.css'
7
7
  import '../../stack.css'
8
8
  import '../../navigation.css'
9
- import "../chunks/icon-hyFz3uhh.js";
9
+ import "../chunks/icon-DAB2KLeo.js";
10
10
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
11
- import "../chunks/button-JPTyQfRs.js";
12
- import "../chunks/popover-CE2t5dKP.js";
13
- import "../chunks/link-ACOyvLkd.js";
11
+ import "../chunks/button-BTQHrE0x.js";
12
+ import "../chunks/popover-DPNBidSz.js";
13
+ import "../chunks/link-BxTQfAW9.js";
14
14
  //#region src/components/navigation/Navigation.js
15
15
  var t = 0, n = class extends HTMLElement {
16
16
  static get observedAttributes() {
@@ -17,11 +17,11 @@ __mintLoadStyle('icon', '../../icon.css')
17
17
  __mintLoadStyle('text', '../../text.css')
18
18
  __mintLoadStyle('stack', '../../stack.css')
19
19
  __mintLoadStyle('off-canvas', '../../off-canvas.css')
20
- import "../chunks/icon-hyFz3uhh.js";
20
+ import "../chunks/icon-DAB2KLeo.js";
21
21
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
22
22
  import "../chunks/text-C-6UCBp-.js";
23
- import "../chunks/button-JPTyQfRs.js";
24
- import "../chunks/stack-CzcHNnl8.js";
23
+ import "../chunks/button-BTQHrE0x.js";
24
+ import "../chunks/stack-CKUu8IVZ.js";
25
25
  //#region src/components/off-canvas/OffCanvas.ts
26
26
  var t = class extends HTMLElement {
27
27
  static get observedAttributes() {
@@ -1 +1 @@
1
- require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/stack-DEIdHS0n.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._enterPending=!1,this._exitPending=!1,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||(this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._enterPending=!1,this._exitPending=!1}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e||(this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._exitPending=!1,this._enterPending||this.classList.contains(`mint-off-canvas-open`)))return;this._enterPending=!0;let t=this.getPosition(),n=!this._dialogWasOpen;if(n){this._dialogWasOpen=!0;let e=document.activeElement;this._previousFocus=e instanceof HTMLElement&&e!==document.body?e:null}e.style.transition=`none`,e.style.transform=this._getTransformValue(t,!1),this.style.display=`block`,this.classList.remove(`mint-off-canvas-hidden`),e.getBoundingClientRect(),e.style.transition=`transform 200ms ease-out`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!this.isOpen()){this._enterPending=!1;return}this.classList.add(`mint-off-canvas-open`),e.style.transform=this._getTransformValue(t,!0),this._enterPending=!1,n&&(this._getDialogFocusableElements(e)[0]??e).focus()})})}_animateExit(){if(this.classList.contains(`mint-off-canvas-hidden`)||this._exitPending)return;this._enterPending=!1,this._exitPending=!0,this.classList.remove(`mint-off-canvas-open`);let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e){this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,this._dialogWasOpen=!1,this._exitPending=!1;return}let t=this.getPosition();e.style.transition=`transform 200ms ease-in`,e.style.transform=this._getTransformValue(t,!1),this._exitTimer!==null&&clearTimeout(this._exitTimer),this._exitTimer=window.setTimeout(()=>{if(this._exitTimer=null,this.isOpen())return;this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,e.style.transform=``,e.style.transition=``,this._exitPending=!1;let t=this._previousFocus;this._previousFocus=null,t?.isConnected&&t.focus()},200)}};customElements.get(`mint-off-canvas`)||e.t(`mint-off-canvas`,t),module.exports=t;
1
+ require(`../chunks/icon-B9P0jyS2.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/button-B4BMYTk1.js`),require(`../chunks/stack-CK2o4-As.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`id`,`heading`,`open`,`position`,`full-page`,`width`,`height`]}constructor(){super(),this._overlay=null,this._offCanvas=null,this._header=null,this._headingSlot=null,this._bodySlot=null,this._actionsSlot=null,this._closeButton=null,this._contentObserver=null,this._renderFrame=null,this._exitTimer=null,this._enterPending=!1,this._exitPending=!1,this._previousFocus=null,this._dialogWasOpen=!1,this._dialogKeydownHandler=null}connectedCallback(){this.classList.add(`mint-off-canvas-host`),this.isOpen()||(this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`),this.render(),this._observeContentMutations(),this._dialogKeydownHandler=e=>{if(!this.isOpen())return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),this.close();return}if(e.key!==`Tab`)return;let t=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!t)return;let n=this._getDialogFocusableElements(t);if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||!t.contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===i||!t.contains(a))&&(e.preventDefault(),r.focus())},document.addEventListener(`keydown`,this._dialogKeydownHandler,!0)}disconnectedCallback(){this._dialogKeydownHandler&&=(document.removeEventListener(`keydown`,this._dialogKeydownHandler,!0),null),this._contentObserver&&=(this._contentObserver.disconnect(),null),this._renderFrame!==null&&(cancelAnimationFrame(this._renderFrame),this._renderFrame=null),this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._enterPending=!1,this._exitPending=!1}attributeChangedCallback(e,t,n){t!==n&&this.isConnected&&this.render()}_scheduleRender(){this._renderFrame===null&&(this._renderFrame=requestAnimationFrame(()=>{this._renderFrame=null,this.render()}))}getId(){return this.getAttribute(`id`)||``}getHeading(){return this.getAttribute(`heading`)||``}getPosition(){let e=this.getAttribute(`position`)?.toLowerCase();return e===`top`||e===`bottom`||e===`left`||e===`right`?e:`right`}isFullPage(){return this.getAttribute(`full-page`)===`true`}getWidth(){return this.getAttribute(`width`)||`320px`}getHeight(){return this.getAttribute(`height`)||``}_normalizeCssValue(e){return/^\d+(\.\d+)?$/.test(e.trim())?`${e.trim()}px`:e.trim()}isOpen(){return this.getAttribute(`open`)===`true`}open(){this.setAttribute(`open`,`true`)}close(){this.removeAttribute(`open`)}render(){let e=this.getId(),t=this.getHeading(),n=this.isOpen(),r=this.getPosition(),i=this.isFullPage(),a=this.getHeight();e&&(this.id=e),this._overlay||(this._overlay=document.createElement(`div`),this._overlay.className=`mint-off-canvas-overlay`,this._overlay.setAttribute(`aria-hidden`,`true`),this._overlay.addEventListener(`click`,()=>this.close()),this.appendChild(this._overlay)),this._offCanvas||(this._offCanvas=document.createElement(`div`),this.appendChild(this._offCanvas)),this._offCanvas.className=`mint-off-canvas-shell`,this._offCanvas.dataset.position=r,this._offCanvas.dataset.fullPage=String(i);let o=this._offCanvas.querySelector(`.mint-off-canvas-panel`);o||(o=document.createElement(`div`),o.className=`mint-off-canvas-panel`,o.style.transform=this._getTransformValue(r,!1),this._offCanvas.appendChild(o)),o.setAttribute(`role`,`dialog`),o.setAttribute(`aria-modal`,`true`),o.hasAttribute(`tabindex`)||(o.tabIndex=-1),n?this._animateEnter():this._animateExit(),o.style.removeProperty(`--off-canvas-width`),o.style.removeProperty(`--off-canvas-height`),r===`top`||r===`bottom`?a&&o.style.setProperty(`--off-canvas-height`,this._normalizeCssValue(a)):o.style.setProperty(`--off-canvas-width`,this._normalizeCssValue(this.getWidth())),this._header||(this._header=document.createElement(`div`),this._header.className=`mint-off-canvas-header`,o.appendChild(this._header)),this._headingSlot||(this._headingSlot=document.createElement(`div`),this._headingSlot.className=`mint-off-canvas-heading`,this._headingSlot.setAttribute(`slot`,`heading`),this._header.appendChild(this._headingSlot));let s=this._headingSlot.querySelector(`mint-text`);if(t?(s||(s=document.createElement(`mint-text`),s.setAttribute(`size`,`sub-heading`),s.setAttribute(`bold`,`true`),this._headingSlot.appendChild(s)),s.textContent=t,s.id=`${e||`mint-off-canvas`}-heading`,o.setAttribute(`aria-labelledby`,s.id),o.removeAttribute(`aria-label`)):s&&s.remove(),!t){let e=this.getAttribute(`aria-label`)?.trim();e?o.setAttribute(`aria-label`,e):o.hasAttribute(`aria-label`)||o.setAttribute(`aria-label`,`Dialog`)}Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._headingSlot&&e.getAttribute(`slot`)===`heading`).forEach(e=>{this._headingSlot&&e.parentElement!==this._headingSlot&&this._headingSlot.appendChild(e)}),this._closeButton||(this._closeButton=document.createElement(`mint-button`),this._closeButton.setAttribute(`variant`,`ghost`),this._closeButton.setAttribute(`icon`,`close`),this._closeButton.setAttribute(`aria-label`,`Close panel`),this._closeButton.addEventListener(`click`,()=>this.close()),this._header.appendChild(this._closeButton)),this._bodySlot||(this._bodySlot=document.createElement(`div`),this._bodySlot.className=`mint-off-canvas-body`,this._bodySlot.setAttribute(`slot`,`body`),o.appendChild(this._bodySlot)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._bodySlot&&e.getAttribute(`slot`)===`body`).forEach(e=>{this._bodySlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)}),this._actionsSlot||(this._actionsSlot=document.createElement(`div`),this._actionsSlot.className=`mint-off-canvas-actions`,this._actionsSlot.setAttribute(`slot`,`actions`),o.appendChild(this._actionsSlot));let c=this._actionsSlot.querySelector(`mint-stack`);c||(c=document.createElement(`mint-stack`),c.setAttribute(`direction`,`horizontal`),c.className=`mint-off-canvas-actions-stack`,this._actionsSlot.appendChild(c)),Array.from(this.children).filter(e=>e!==this._overlay&&e!==this._offCanvas&&e!==this._actionsSlot&&e.getAttribute(`slot`)===`actions`).forEach(e=>{Array.from(e.children).forEach(e=>{e.parentElement!==c&&c.appendChild(e)}),e.parentElement&&e.remove()}),Array.from(this.children).forEach(e=>{e!==this._overlay&&e!==this._offCanvas&&e.getAttribute(`slot`)!==`heading`&&e.getAttribute(`slot`)!==`body`&&e.getAttribute(`slot`)!==`actions`&&e!==this._headingSlot&&e!==this._bodySlot&&e!==this._actionsSlot&&e.parentElement!==this._bodySlot&&this._bodySlot.appendChild(e)})}_getTransformValue(e,t){if(t)switch(e){case`top`:return`translateY(0)`;case`bottom`:return`translateY(0)`;case`left`:return`translateX(0)`;case`right`:return`translateX(0)`;default:return`translateX(0)`}else switch(e){case`top`:return`translateY(-100%)`;case`bottom`:return`translateY(100%)`;case`left`:return`translateX(-100%)`;case`right`:return`translateX(100%)`;default:return`translateX(100%)`}}_observeContentMutations(){this._contentObserver||=new MutationObserver(()=>{this._scheduleRender()}),this._contentObserver.disconnect(),this._contentObserver.observe(this,{childList:!0,attributes:!0,attributeFilter:[`slot`]})}_getDialogFocusableElements(e){return Array.from(e.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>{if(e.closest(`[hidden], [aria-hidden="true"]`))return!1;let t=window.getComputedStyle(e);return t.display!==`none`&&t.visibility!==`hidden`})}_animateEnter(){let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e||(this._exitTimer!==null&&(clearTimeout(this._exitTimer),this._exitTimer=null),this._exitPending=!1,this._enterPending||this.classList.contains(`mint-off-canvas-open`)))return;this._enterPending=!0;let t=this.getPosition(),n=!this._dialogWasOpen;if(n){this._dialogWasOpen=!0;let e=document.activeElement;this._previousFocus=e instanceof HTMLElement&&e!==document.body?e:null}e.style.transition=`none`,e.style.transform=this._getTransformValue(t,!1),this.style.display=`block`,this.classList.remove(`mint-off-canvas-hidden`),e.getBoundingClientRect(),e.style.transition=`transform 200ms ease-out`,requestAnimationFrame(()=>{requestAnimationFrame(()=>{if(!this.isOpen()){this._enterPending=!1;return}this.classList.add(`mint-off-canvas-open`),e.style.transform=this._getTransformValue(t,!0),this._enterPending=!1,n&&(this._getDialogFocusableElements(e)[0]??e).focus()})})}_animateExit(){if(this.classList.contains(`mint-off-canvas-hidden`)||this._exitPending)return;this._enterPending=!1,this._exitPending=!0,this.classList.remove(`mint-off-canvas-open`);let e=this._offCanvas?.querySelector(`.mint-off-canvas-panel`);if(!e){this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,this._dialogWasOpen=!1,this._exitPending=!1;return}let t=this.getPosition();e.style.transition=`transform 200ms ease-in`,e.style.transform=this._getTransformValue(t,!1),this._exitTimer!==null&&clearTimeout(this._exitTimer),this._exitTimer=window.setTimeout(()=>{if(this._exitTimer=null,this.isOpen())return;this.classList.add(`mint-off-canvas-hidden`),this.style.display=`none`,e.style.transform=``,e.style.transition=``,this._exitPending=!1;let t=this._previousFocus;this._previousFocus=null,t?.isConnected&&t.focus()},200)}};customElements.get(`mint-off-canvas`)||e.t(`mint-off-canvas`,t),module.exports=t;
@@ -5,11 +5,11 @@ import '../../icon.css'
5
5
  import '../../text.css'
6
6
  import '../../stack.css'
7
7
  import '../../off-canvas.css'
8
- import "../chunks/icon-hyFz3uhh.js";
8
+ import "../chunks/icon-DAB2KLeo.js";
9
9
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
10
10
  import "../chunks/text-C-6UCBp-.js";
11
- import "../chunks/button-JPTyQfRs.js";
12
- import "../chunks/stack-CzcHNnl8.js";
11
+ import "../chunks/button-BTQHrE0x.js";
12
+ import "../chunks/stack-CKUu8IVZ.js";
13
13
  //#region src/components/off-canvas/OffCanvas.ts
14
14
  var t = class extends HTMLElement {
15
15
  static get observedAttributes() {
@@ -18,11 +18,11 @@ __mintLoadStyle('popover', '../../popover.css')
18
18
  __mintLoadStyle('stack', '../../stack.css')
19
19
  __mintLoadStyle('back-button', '../../back-button.css')
20
20
  __mintLoadStyle('page', '../../page.css')
21
- import "../chunks/icon-hyFz3uhh.js";
21
+ import "../chunks/icon-DAB2KLeo.js";
22
22
  import { t as e } from "../chunks/register-element-BFYmIynH.js";
23
- import "../chunks/back-button-By8eO_KR.js";
24
- import "../chunks/button-JPTyQfRs.js";
25
- import "../chunks/popover-CE2t5dKP.js";
23
+ import "../chunks/back-button-C0ajSqKu.js";
24
+ import "../chunks/button-BTQHrE0x.js";
25
+ import "../chunks/popover-DPNBidSz.js";
26
26
  //#region src/components/page/Page.js
27
27
  var t = class extends HTMLElement {
28
28
  static get observedAttributes() {
@@ -1,4 +1,4 @@
1
- require(`../chunks/icon-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-BGzrOtpx.js`),require(`../chunks/button-B_yN18B-.js`),require(`../chunks/popover-0YEhBrgv.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`,`containered`]}constructor(){super(),this._actionsResizeObserver=null,this._actionsMutationObserver=null,this._actionsFrame=null,this._groupingActions=!1,this._actionFullWidthOriginal=new WeakMap,this._autoGroupedActions=new WeakSet,this._explicitOverflowActions=new WeakSet,this._root=this.attachShadow({mode:`open`}),this._root.innerHTML=`
1
+ require(`../chunks/icon-B9P0jyS2.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/back-button-Dw4NF_vN.js`),require(`../chunks/button-B4BMYTk1.js`),require(`../chunks/popover-CWWKb7L1.js`);var t=class extends HTMLElement{static get observedAttributes(){return[`heading`,`fallback-href`,`show-back-button`,`containered`]}constructor(){super(),this._actionsResizeObserver=null,this._actionsMutationObserver=null,this._actionsFrame=null,this._groupingActions=!1,this._actionFullWidthOriginal=new WeakMap,this._autoGroupedActions=new WeakSet,this._explicitOverflowActions=new WeakSet,this._root=this.attachShadow({mode:`open`}),this._root.innerHTML=`
2
2
  <style>
3
3
  /* The built-in back button lives inside this component's shadow root,
4
4
  so document-level button.css cannot reach its light-DOM button. */