monobill-mintui 0.6.707 → 0.6.709

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 (153) hide show
  1. package/bin/component-dependencies.json +4 -3
  2. package/dist/components/alert/browser.js +4 -4
  3. package/dist/components/alert/index.cjs +1 -1
  4. package/dist/components/alert/index.js +4 -4
  5. package/dist/components/back-button/browser.js +1 -1
  6. package/dist/components/back-button/index.cjs +1 -1
  7. package/dist/components/back-button/index.js +1 -1
  8. package/dist/components/bottom-navigation/browser.js +2 -2
  9. package/dist/components/bottom-navigation/index.cjs +1 -1
  10. package/dist/components/bottom-navigation/index.js +2 -2
  11. package/dist/components/button/browser.js +1 -1
  12. package/dist/components/button/index.cjs +1 -1
  13. package/dist/components/button/index.js +1 -1
  14. package/dist/components/checkbox/browser.js +2 -2
  15. package/dist/components/checkbox/index.cjs +1 -1
  16. package/dist/components/checkbox/index.js +2 -2
  17. package/dist/components/chip/browser.js +1 -1
  18. package/dist/components/chip/index.cjs +1 -1
  19. package/dist/components/chip/index.js +1 -1
  20. package/dist/components/chunks/{back-button-lIFHlWjY.js → back-button-BGzrOtpx.js} +1 -1
  21. package/dist/components/chunks/{back-button-B7uDpX7F.js → back-button-By8eO_KR.js} +2 -2
  22. package/dist/components/chunks/{button-imX8FM_Q.js → button-B_yN18B-.js} +1 -1
  23. package/dist/components/chunks/{button-CUWUQAt8.js → button-JPTyQfRs.js} +2 -2
  24. package/dist/components/chunks/caret-down-BFHFcMyL.js +1 -0
  25. package/dist/components/chunks/{caret-down-oeRBseTW.js → caret-down-ZjQN2yKq.js} +1 -1
  26. package/dist/components/chunks/caret-right--YnEL-Ny.js +1 -0
  27. package/dist/components/chunks/{caret-right-DMCejGQ6.js → caret-right-BlRbsLlh.js} +1 -1
  28. package/dist/components/chunks/{chip-BeGxDLpQ.js → chip-BUaS7ks-.js} +1 -1
  29. package/dist/components/chunks/{chip-CbfqkmGQ.js → chip-XuYPtZ3Z.js} +3 -3
  30. package/dist/components/chunks/{close-C5b9RhcK.js → close-Cn8XLO1c.js} +1 -1
  31. package/dist/components/chunks/close-DSrpkGHJ.js +1 -0
  32. package/dist/components/chunks/{confirm-action-ChDVVaGR.js → confirm-action-86hDdUKT.js} +1 -1
  33. package/dist/components/chunks/{confirm-action-FF25UbZj.js → confirm-action-CX_FEzCR.js} +2 -2
  34. package/dist/components/chunks/{date-picker-DGXeCDmc.js → date-picker-D3l2uFzg.js} +26 -8
  35. package/dist/components/chunks/date-picker-DY0mlT4u.js +1 -0
  36. package/dist/components/chunks/{icon-B8hR_TFn.js → icon-CWOP4Com.js} +6 -6
  37. package/dist/components/chunks/icon-D6C1XGp2.js +1 -0
  38. package/dist/components/chunks/{icon-D7kATeRr.js → icon-hyFz3uhh.js} +181 -171
  39. package/dist/components/chunks/icon-l34kRIZg.js +1 -0
  40. package/dist/components/chunks/{input-B3XZ9L6B.js → input-BTRS6ggP.js} +92 -14
  41. package/dist/components/chunks/input-D9FDLgwb.js +1 -0
  42. package/dist/components/chunks/{modal-DEl06xn_.js → modal-BEv3P1P0.js} +2 -2
  43. package/dist/components/chunks/{modal-CEH_XEC0.js → modal-ux6cqTde.js} +1 -1
  44. package/dist/components/chunks/{search-EHzNkMA7.js → search-BwjKBnv9.js} +1 -1
  45. package/dist/components/chunks/search-q3dkl4-X.js +1 -0
  46. package/dist/components/chunks/select-Bs4-xwX6.js +1 -0
  47. package/dist/components/chunks/select-ByoX89vD.js +615 -0
  48. package/dist/components/chunks/{time-picker-NlZ9LSyD.js → time-picker-BczVLEX_.js} +22 -7
  49. package/dist/components/chunks/time-picker-CEEByAUI.js +1 -0
  50. package/dist/components/chunks/{warning-D4JUMfwk.js → warning-DAYbxh3S.js} +1 -1
  51. package/dist/components/chunks/{warning-fwqtKFLY.js → warning-DKCaTYO6.js} +1 -1
  52. package/dist/components/confirm-action/browser.js +1 -1
  53. package/dist/components/confirm-action/index.cjs +1 -1
  54. package/dist/components/confirm-action/index.js +1 -1
  55. package/dist/components/date-picker/DatePicker.d.ts +6 -0
  56. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  57. package/dist/components/date-picker/browser.js +1 -1
  58. package/dist/components/date-picker/index.cjs +1 -1
  59. package/dist/components/date-picker/index.js +1 -1
  60. package/dist/components/datetime-picker/DateTimePicker.d.ts +4 -0
  61. package/dist/components/datetime-picker/DateTimePicker.d.ts.map +1 -1
  62. package/dist/components/datetime-picker/browser.js +22 -7
  63. package/dist/components/datetime-picker/index.cjs +1 -1
  64. package/dist/components/datetime-picker/index.js +22 -7
  65. package/dist/components/dropzone/browser.js +4 -4
  66. package/dist/components/dropzone/index.cjs +1 -1
  67. package/dist/components/dropzone/index.js +4 -4
  68. package/dist/components/icon/browser.js +1 -1
  69. package/dist/components/icon/icons/funnel.d.ts +3 -0
  70. package/dist/components/icon/icons/funnel.d.ts.map +1 -0
  71. package/dist/components/icon/icons/index.d.ts +1 -0
  72. package/dist/components/icon/icons/index.d.ts.map +1 -1
  73. package/dist/components/icon/index.cjs +1 -1
  74. package/dist/components/icon/index.js +1 -1
  75. package/dist/components/input/Input.d.ts +3 -0
  76. package/dist/components/input/Input.d.ts.map +1 -1
  77. package/dist/components/input/browser.js +1 -1
  78. package/dist/components/input/index.cjs +1 -1
  79. package/dist/components/input/index.js +1 -1
  80. package/dist/components/modal/browser.js +1 -1
  81. package/dist/components/modal/index.cjs +1 -1
  82. package/dist/components/modal/index.js +1 -1
  83. package/dist/components/navigation/browser.js +2 -2
  84. package/dist/components/navigation/index.cjs +1 -1
  85. package/dist/components/navigation/index.js +2 -2
  86. package/dist/components/off-canvas/OffCanvas.d.ts +2 -0
  87. package/dist/components/off-canvas/OffCanvas.d.ts.map +1 -1
  88. package/dist/components/off-canvas/browser.js +19 -14
  89. package/dist/components/off-canvas/index.cjs +1 -1
  90. package/dist/components/off-canvas/index.js +19 -14
  91. package/dist/components/page/browser.js +3 -3
  92. package/dist/components/page/index.cjs +1 -1
  93. package/dist/components/page/index.js +3 -3
  94. package/dist/components/resource-table/ResourceTable.d.ts +7 -0
  95. package/dist/components/resource-table/ResourceTable.d.ts.map +1 -1
  96. package/dist/components/resource-table/browser.js +41 -15
  97. package/dist/components/resource-table/index.cjs +2 -2
  98. package/dist/components/resource-table/index.js +41 -15
  99. package/dist/components/search/browser.js +7 -7
  100. package/dist/components/search/index.cjs +1 -1
  101. package/dist/components/search/index.js +7 -7
  102. package/dist/components/select/NativeSelect.d.ts +4 -0
  103. package/dist/components/select/NativeSelect.d.ts.map +1 -1
  104. package/dist/components/select/Select.d.ts +4 -0
  105. package/dist/components/select/Select.d.ts.map +1 -1
  106. package/dist/components/select/browser.js +2 -578
  107. package/dist/components/select/index.cjs +1 -1
  108. package/dist/components/select/index.js +2 -578
  109. package/dist/components/side-navigation/browser.js +4 -4
  110. package/dist/components/side-navigation/index.cjs +1 -1
  111. package/dist/components/side-navigation/index.js +4 -4
  112. package/dist/components/sortable/browser.js +1 -1
  113. package/dist/components/sortable/index.cjs +1 -1
  114. package/dist/components/sortable/index.js +1 -1
  115. package/dist/components/switch/browser.js +2 -2
  116. package/dist/components/switch/index.cjs +1 -1
  117. package/dist/components/switch/index.js +2 -2
  118. package/dist/components/tabs/browser.js +1 -1
  119. package/dist/components/tabs/index.cjs +1 -1
  120. package/dist/components/tabs/index.js +1 -1
  121. package/dist/components/tags/browser.js +3 -3
  122. package/dist/components/tags/index.cjs +1 -1
  123. package/dist/components/tags/index.js +3 -3
  124. package/dist/components/time-picker/TimePicker.d.ts +4 -0
  125. package/dist/components/time-picker/TimePicker.d.ts.map +1 -1
  126. package/dist/components/time-picker/browser.js +1 -1
  127. package/dist/components/time-picker/index.cjs +1 -1
  128. package/dist/components/time-picker/index.js +1 -1
  129. package/dist/components/tree/browser.js +4 -4
  130. package/dist/components/tree/index.cjs +1 -1
  131. package/dist/components/tree/index.js +4 -4
  132. package/dist/date-picker.css +1 -1
  133. package/dist/icons/funnel.svg +3 -0
  134. package/dist/index.cjs +11 -11
  135. package/dist/index.css +5 -5
  136. package/dist/index.js +2774 -2572
  137. package/dist/input.css +1 -1
  138. package/dist/navigation-search.json +7 -0
  139. package/dist/off-canvas.css +1 -1
  140. package/dist/resource-table.css +1 -1
  141. package/dist/select.css +1 -1
  142. package/package.json +1 -1
  143. package/dist/components/chunks/caret-down-BC4shv_d.js +0 -1
  144. package/dist/components/chunks/caret-right-jB9sLJG2.js +0 -1
  145. package/dist/components/chunks/close-BNbAeJPY.js +0 -1
  146. package/dist/components/chunks/date-picker-C5srl0J1.js +0 -1
  147. package/dist/components/chunks/icon-BQqwHk-o.js +0 -1
  148. package/dist/components/chunks/icon-CzgI_MCf.js +0 -1
  149. package/dist/components/chunks/input-C1O8znJn.js +0 -1
  150. package/dist/components/chunks/search-TahAPcYA.js +0 -1
  151. package/dist/components/chunks/time-picker-DJ_Z6L5m.js +0 -1
  152. /package/dist/components/chunks/{sortable-Dgk6LvmB.js → sortable-BSw58wy_.js} +0 -0
  153. /package/dist/components/chunks/{sortable-BAL3k9Se.js → sortable-D3et5wXB.js} +0 -0
@@ -1,12 +1,12 @@
1
- import "./icon-D7kATeRr.js";
1
+ import "./icon-hyFz3uhh.js";
2
2
  import { t as e } from "./register-element-BFYmIynH.js";
3
3
  import "./text-C-6UCBp-.js";
4
- import "./input-B3XZ9L6B.js";
4
+ import "./input-BTRS6ggP.js";
5
5
  import "./popover-C1qiTAvR.js";
6
6
  //#region src/components/time-picker/TimePicker.ts
7
7
  var t = class extends HTMLElement {
8
8
  constructor(...e) {
9
- super(...e), this._triggerId = `mint-time-picker-trigger-${Math.random().toString(36).slice(2, 10)}`, this._popover = null, this._popoverObserver = null, this._triggerClickObserver = null, this._inputEl = null, this._hiddenInput = null, this._single = {
9
+ super(...e), this._triggerId = `mint-time-picker-trigger-${Math.random().toString(36).slice(2, 10)}`, this._popover = null, this._popoverObserver = null, this._triggerClickObserver = null, this._inputEl = null, this._hiddenInput = null, this._prependSlotNodes = [], this._appendSlotNodes = [], this._slotObserver = null, this._single = {
10
10
  hour: 9,
11
11
  minute: 0,
12
12
  second: 0,
@@ -43,10 +43,17 @@ var t = class extends HTMLElement {
43
43
  ];
44
44
  }
45
45
  connectedCallback() {
46
- this.classList.add("mint-time-picker-host"), this._parseAndApplyValue(this.getAttribute("value") || ""), this.render();
46
+ this.classList.add("mint-time-picker-host"), this._parseAndApplyValue(this.getAttribute("value") || ""), this.render(), this._slotObserver = new MutationObserver((e) => {
47
+ 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();
48
+ }), this._slotObserver.observe(this, {
49
+ childList: !0,
50
+ subtree: !0,
51
+ attributes: !0,
52
+ attributeFilter: ["slot"]
53
+ });
47
54
  }
48
55
  disconnectedCallback() {
49
- this._popoverObserver &&= (this._popoverObserver.disconnect(), null), this._triggerClickObserver &&= (document.removeEventListener("click", this._triggerClickObserver, !0), null);
56
+ this._slotObserver?.disconnect(), this._slotObserver = null, this._popoverObserver &&= (this._popoverObserver.disconnect(), null), this._triggerClickObserver &&= (document.removeEventListener("click", this._triggerClickObserver, !0), null);
50
57
  }
51
58
  attributeChangedCallback(e, t, n) {
52
59
  if (t !== n) {
@@ -329,11 +336,11 @@ var t = class extends HTMLElement {
329
336
  }
330
337
  render() {
331
338
  let e = this.isDisabled(), t = this.isReadonly(), n = this._getEffectiveError();
332
- this._triggerClickObserver &&= (document.removeEventListener("click", this._triggerClickObserver, !0), null), this.innerHTML = "";
339
+ this._collectAdornmentNodes(), this._triggerClickObserver &&= (document.removeEventListener("click", this._triggerClickObserver, !0), null), this.innerHTML = "";
333
340
  let r = document.createElement("div");
334
341
  r.className = "mint-time-picker-control";
335
342
  let i = this.getAttribute("inline") === "true";
336
- i || (this._inputEl = document.createElement("mint-input"), this._inputEl.id = this._triggerId, this._inputEl.classList.add("mint-time-picker-trigger"), this._inputEl.setAttribute("type", "text"), this._inputEl.setAttribute("icon", "clock"), this._inputEl.setAttribute("placeholder", this._getExpectedFormat()), this._inputEl.setAttribute("label", this.getLabel()), this._inputEl.setAttribute("info", this.getInfo()), this._inputEl.setAttribute("value", this._getDisplayValue()), this._inputEl.setAttribute("error", n.hasError ? "true" : "false"), this._inputEl.setAttribute("error-message", n.message || ""), e && this._inputEl.setAttribute("disabled", "true"), t && this._inputEl.setAttribute("readonly", "true"), this._inputEl.addEventListener("change", (n) => {
343
+ i || (this._inputEl = document.createElement("mint-input"), this._inputEl.id = this._triggerId, this._inputEl.classList.add("mint-time-picker-trigger"), this._inputEl.setAttribute("type", "text"), this._inputEl.setAttribute("icon", "clock"), this._inputEl.setAttribute("placeholder", this._getExpectedFormat()), this._inputEl.setAttribute("label", this.getLabel()), this._inputEl.setAttribute("info", this.getInfo()), this._inputEl.setAttribute("value", this._getDisplayValue()), this._inputEl.setAttribute("error", n.hasError ? "true" : "false"), this._inputEl.setAttribute("error-message", n.message || ""), this._prependSlotNodes.forEach((e) => this._inputEl.appendChild(e)), this._appendSlotNodes.forEach((e) => this._inputEl.appendChild(e)), e && this._inputEl.setAttribute("disabled", "true"), t && this._inputEl.setAttribute("readonly", "true"), this._inputEl.addEventListener("change", (n) => {
337
344
  if (e || t) return;
338
345
  let r = n.target;
339
346
  this._handleTypedValue((r?.value || "").toString());
@@ -354,6 +361,14 @@ var t = class extends HTMLElement {
354
361
  }, document.addEventListener("click", this._triggerClickObserver, !0);
355
362
  }
356
363
  }
364
+ _collectAdornmentNodes() {
365
+ let e = [
366
+ ...this._prependSlotNodes,
367
+ ...this._appendSlotNodes,
368
+ ...Array.from(this.querySelectorAll("[slot=\"prepend\"], [slot=\"append\"]"))
369
+ ];
370
+ this._prependSlotNodes = e.filter((e) => e.getAttribute("slot") === "prepend"), this._appendSlotNodes = e.filter((e) => e.getAttribute("slot") === "append");
371
+ }
357
372
  };
358
373
  customElements.get("mint-time-picker") || e("mint-time-picker", t);
359
374
  //#endregion
@@ -0,0 +1 @@
1
+ require(`./icon-CWOP4Com.js`);const e=require(`./register-element-tCL_F1YI.js`);require(`./text-CfvRRKGZ.js`),require(`./input-D9FDLgwb.js`),require(`./popover-6cborap6.js`);var t=class extends HTMLElement{constructor(...e){super(...e),this._triggerId=`mint-time-picker-trigger-${Math.random().toString(36).slice(2,10)}`,this._popover=null,this._popoverObserver=null,this._triggerClickObserver=null,this._inputEl=null,this._hiddenInput=null,this._prependSlotNodes=[],this._appendSlotNodes=[],this._slotObserver=null,this._single={hour:9,minute:0,second:0,meridiem:`AM`},this._rangeStart={hour:9,minute:0,second:0,meridiem:`AM`},this._rangeEnd={hour:5,minute:0,second:0,meridiem:`PM`},this._invalidFromInput=!1}static get observedAttributes(){return[`value`,`inline`,`label`,`info`,`disabled`,`id`,`name`,`required`,`readonly`,`range`,`hours`,`minutes`,`seconds`,`error`,`error-message`]}connectedCallback(){this.classList.add(`mint-time-picker-host`),this._parseAndApplyValue(this.getAttribute(`value`)||``),this.render(),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`]})}disconnectedCallback(){this._slotObserver?.disconnect(),this._slotObserver=null,this._popoverObserver&&=(this._popoverObserver.disconnect(),null),this._triggerClickObserver&&=(document.removeEventListener(`click`,this._triggerClickObserver,!0),null)}attributeChangedCallback(e,t,n){if(t!==n){if(e===`value`){this._parseAndApplyValue(n||``),this._syncHiddenInput(),this._syncInputValue();{let e=(this._popover||this).querySelector(`[data-mint-time-picker-body="true"]`);e&&this._buildPopoverContent(e)}return}e!==`error`&&e!==`error-message`&&(this._invalidFromInput=!1),this.render()}}get value(){return this.getValue()}set value(e){this.setValue(e||``)}getValue(){return this.getAttribute(`value`)||``}setValue(e){e?this.setAttribute(`value`,e):this.removeAttribute(`value`),this._parseAndApplyValue(e||``),this._syncHiddenInput(),this._syncInputValue()}isRange(){return this.getAttribute(`range`)===`true`}isHoursEnabled(){let e=this.getAttribute(`hours`);return e===null?!0:e!==`false`}isMinutesEnabled(){let e=this.getAttribute(`minutes`);return e===null?!0:e!==`false`}isSecondsEnabled(){let e=this.getAttribute(`seconds`);return e===null?!1:e!==`false`}isDisabled(){return this.getAttribute(`disabled`)===`true`}isReadonly(){return this.getAttribute(`readonly`)===`true`}isRequired(){return this.getAttribute(`required`)===`true`}hasExternalError(){return this.getAttribute(`error`)===`true`}getExternalErrorMessage(){return this.getAttribute(`error-message`)||``}getLabel(){return this.getAttribute(`label`)||``}getInfo(){return this.getAttribute(`info`)||``}getName(){return this.getAttribute(`name`)||``}_getEffectiveError(){return{hasError:this.hasExternalError(),message:this.getExternalErrorMessage()}}_formatParts(e){let t=this.isHoursEnabled(),n=this.isMinutesEnabled(),r=this.isSecondsEnabled(),i=[];return t&&i.push(e.hour.toString()),n&&i.push(e.minute.toString().padStart(2,`0`)),r&&i.push(e.second.toString().padStart(2,`0`)),t?`${i.join(`:`)} ${e.meridiem.toLowerCase()}`:i.join(`:`)}_to24Hour(e){let t=e.hour%12;return e.meridiem===`PM`&&(t+=12),{hour:t,minute:e.minute,second:e.second}}_formatParts24(e){let t=this.isHoursEnabled(),n=this.isMinutesEnabled(),r=this.isSecondsEnabled(),i=this._to24Hour(e),a=[];return t&&a.push(i.hour.toString().padStart(2,`0`)),n&&a.push(i.minute.toString().padStart(2,`0`)),r&&a.push(i.second.toString().padStart(2,`0`)),a.join(`:`)}_getDisplayValue(){return this.isRange()?`${this._formatParts(this._rangeStart)} - ${this._formatParts(this._rangeEnd)}`:this._formatParts(this._single)}_getOutputValue(){return this.isRange()?`${this._formatParts24(this._rangeStart)} - ${this._formatParts24(this._rangeEnd)}`:this._formatParts24(this._single)}_getExpectedFormat(){let e=this.isHoursEnabled(),t=this.isMinutesEnabled(),n=this.isSecondsEnabled(),r=[];e&&r.push(`h`),t&&r.push(`mm`),n&&r.push(`ss`);let i=e?`${r.join(`:`)} am/pm`:r.join(`:`);return this.isRange()?`${i} - ${i}`:i}_syncHiddenInput(){this._hiddenInput&&(this._hiddenInput.value=this.getValue()||this._getOutputValue())}_syncInputValue(){this._inputEl&&(this._inputEl.value=this._getDisplayValue(),typeof this._inputEl.render==`function`&&this._inputEl.render())}_emitChangeFromPicker(){let e=this._getOutputValue();this._invalidFromInput=!1,this.setAttribute(`value`,e),this._syncHiddenInput(),this._syncInputValue(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_parseSingle(e){let t=this.isHoursEnabled(),n=this.isMinutesEnabled(),r=this.isSecondsEnabled(),i=e.trim();if(t){let e=i.match(/^(\d{1,2})(?::(\d{2}))?(?::(\d{2}))?\s*(am|pm)$/i);if(!e)return null;let t=Number(e[1]),a=Number(e[2]??0),o=Number(e[3]??0),s=e[4].toUpperCase();return t<1||t>12||n&&(a<0||a>59)||r&&(o<0||o>59)?null:{hour:t,minute:a,second:o,meridiem:s}}let a=i.match(/^(\d{2})(?::(\d{2}))?$/);if(!a)return null;let o=Number(a[1]),s=Number(a[2]??0);return n&&(o<0||o>59)||r&&(s<0||s>59)?null:{hour:12,minute:o,second:s,meridiem:`AM`}}_parseSingleOutput24(e){let t=this.isHoursEnabled(),n=this.isMinutesEnabled(),r=this.isSecondsEnabled(),i=e.trim();if(t){let e=i.match(/^(\d{2})(?::(\d{2}))?(?::(\d{2}))?$/);if(!e)return null;let t=Number(e[1]),a=Number(e[2]??0),o=Number(e[3]??0);if(t<0||t>23||n&&(a<0||a>59)||r&&(o<0||o>59))return null;let s=t>=12?`PM`:`AM`;return{hour:t%12==0?12:t%12,minute:a,second:o,meridiem:s}}let a=i.match(/^(\d{2})(?::(\d{2}))?$/);if(!a)return null;let o=Number(a[1]),s=Number(a[2]??0);return n&&(o<0||o>59)||r&&(s<0||s>59)?null:{hour:12,minute:o,second:s,meridiem:`AM`}}_parseAndApplyValue(e){if(!e)return!1;if(this.isRange()){let[t,n]=e.split(`-`).map(e=>e.trim()),r=this._parseSingleOutput24(t||``),i=this._parseSingleOutput24(n||``);return!r||!i?!1:(this._rangeStart=r,this._rangeEnd=i,!0)}let t=this._parseSingleOutput24(e);return t?(this._single=t,!0):!1}_parseAndApplyDisplayValue(e){if(!e)return!1;if(this.isRange()){let[t,n]=e.split(`-`).map(e=>e.trim()),r=this._parseSingle(t||``),i=this._parseSingle(n||``);return!r||!i?!1:(this._rangeStart=r,this._rangeEnd=i,!0)}let t=this._parseSingle(e);return t?(this._single=t,!0):!1}_handleTypedValue(e){let t=e.trim();if(!t){this._invalidFromInput=!1,this.removeAttribute(`value`),this._syncHiddenInput(),this._syncInputValue();return}if(!this._parseAndApplyDisplayValue(t)){this._invalidFromInput=!0,this.removeAttribute(`value`),this._inputEl&&(this._inputEl.value=``),this._syncHiddenInput(),this.render(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}));return}this._invalidFromInput=!1;let n=this._getOutputValue();this.setAttribute(`value`,n),this._syncHiddenInput(),this._syncInputValue(),this.dispatchEvent(new Event(`input`,{bubbles:!0,composed:!0})),this.dispatchEvent(new Event(`change`,{bubbles:!0}))}_buildColumn(e,t,n,r=!0,i=`standard`,a=`Time`){let o=document.createElement(`div`);return o.className=`mint-time-picker-column mint-time-picker-column-${i}${r?` mint-time-picker-column-divider`:``}`,o.setAttribute(`role`,`group`),o.setAttribute(`aria-label`,a),e.forEach(e=>{let r=document.createElement(`button`);r.type=`button`;let i=e===t;r.className=`mint-time-picker-option${i?` is-selected`:``}`,r.dataset.selected=i?`true`:`false`,r.setAttribute(`aria-pressed`,String(i)),r.setAttribute(`aria-label`,`${a}: ${e}`),r.textContent=e,r.addEventListener(`click`,()=>n(e)),o.appendChild(r)}),o}_centerSelectedInColumn(e){let t=e.querySelector(`button[data-selected="true"]`);if(!t)return;let n=t.offsetTop-e.offsetTop-(e.clientHeight/2-t.offsetHeight/2),r=Math.max(0,Math.min(e.scrollHeight-e.clientHeight,n));e.scrollTo({top:r,behavior:`instant`})}_centerAllColumnsInPopoverBody(){let e=(this._popover||this).querySelector(`[data-mint-time-picker-body="true"]`);e&&Array.from(e.querySelectorAll(`.mint-time-picker-column`)).forEach(e=>this._centerSelectedInColumn(e))}_setupPopoverOpenObserver(){this._popover&&(this._popoverObserver&&=(this._popoverObserver.disconnect(),null),this._popoverObserver=new MutationObserver(()=>{this._popover?.getAttribute(`open`)===`true`&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{this._centerAllColumnsInPopoverBody()})})}),this._popoverObserver.observe(this._popover,{attributes:!0,attributeFilter:[`open`]}))}_buildPickerSet(e,t,n){let r=this.isHoursEnabled(),i=this.isMinutesEnabled(),a=this.isSecondsEnabled(),o=document.createElement(`div`),s=(r?1:0)+(i?1:0)+(a?1:0)+(r?1:0);o.className=`mint-time-picker-wheel`,o.style.gridTemplateColumns=`repeat(${Math.max(s,1)}, minmax(0, 1fr))`;let c=Array.from({length:12},(e,t)=>(t+1).toString().padStart(2,`0`)),l=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`)),u=Array.from({length:60},(e,t)=>t.toString().padStart(2,`0`)),d=[`AM`,`PM`],f=[];r&&f.push(this._buildColumn(c,t.hour.toString().padStart(2,`0`),e=>{n({...t,hour:Number(e)})},!0,`tall`,`Hour`)),i&&f.push(this._buildColumn(l,t.minute.toString().padStart(2,`0`),e=>{n({...t,minute:Number(e)})},!0,`tall`,`Minute`)),a&&f.push(this._buildColumn(u,t.second.toString().padStart(2,`0`),e=>{n({...t,second:Number(e)})},!0,`tall`,`Second`)),r&&f.push(this._buildColumn(d,t.meridiem,e=>{n({...t,meridiem:e})},!0,`tall`,`Meridiem`)),f.forEach((e,t)=>{t===f.length-1&&e.classList.remove(`mint-time-picker-column-divider`),o.appendChild(e)}),e.appendChild(o)}_buildPopoverContent(e){if(e.innerHTML=``,!this.isRange()){this._buildPickerSet(e,this._single,t=>{this._single=t,this._emitChangeFromPicker(),this._buildPopoverContent(e)}),requestAnimationFrame(()=>this._centerAllColumnsInPopoverBody());return}let t=document.createElement(`div`);t.className=`mint-time-picker-range`;let n=document.createElement(`div`),r=document.createElement(`mint-text`);r.setAttribute(`variant`,`muted`),r.className=`mint-time-picker-range-label`,r.textContent=`Start`,n.appendChild(r),this._buildPickerSet(n,this._rangeStart,t=>{this._rangeStart=t,this._emitChangeFromPicker(),this._buildPopoverContent(e)});let i=document.createElement(`div`),a=document.createElement(`mint-text`);a.setAttribute(`variant`,`muted`),a.className=`mint-time-picker-range-label`,a.textContent=`End`,i.appendChild(a),this._buildPickerSet(i,this._rangeEnd,t=>{this._rangeEnd=t,this._emitChangeFromPicker(),this._buildPopoverContent(e)}),t.appendChild(n),t.appendChild(i),e.appendChild(t),requestAnimationFrame(()=>{this._centerAllColumnsInPopoverBody()})}render(){let e=this.isDisabled(),t=this.isReadonly(),n=this._getEffectiveError();this._collectAdornmentNodes(),this._triggerClickObserver&&=(document.removeEventListener(`click`,this._triggerClickObserver,!0),null),this.innerHTML=``;let r=document.createElement(`div`);r.className=`mint-time-picker-control`;let i=this.getAttribute(`inline`)===`true`;i||(this._inputEl=document.createElement(`mint-input`),this._inputEl.id=this._triggerId,this._inputEl.classList.add(`mint-time-picker-trigger`),this._inputEl.setAttribute(`type`,`text`),this._inputEl.setAttribute(`icon`,`clock`),this._inputEl.setAttribute(`placeholder`,this._getExpectedFormat()),this._inputEl.setAttribute(`label`,this.getLabel()),this._inputEl.setAttribute(`info`,this.getInfo()),this._inputEl.setAttribute(`value`,this._getDisplayValue()),this._inputEl.setAttribute(`error`,n.hasError?`true`:`false`),this._inputEl.setAttribute(`error-message`,n.message||``),this._prependSlotNodes.forEach(e=>this._inputEl.appendChild(e)),this._appendSlotNodes.forEach(e=>this._inputEl.appendChild(e)),e&&this._inputEl.setAttribute(`disabled`,`true`),t&&this._inputEl.setAttribute(`readonly`,`true`),this._inputEl.addEventListener(`change`,n=>{if(e||t)return;let r=n.target;this._handleTypedValue((r?.value||``).toString())}),this._inputEl.addEventListener(`blur`,n=>{if(e||t)return;let r=n.target;this._handleTypedValue((r?.value||``).toString())},!0),r.appendChild(this._inputEl)),this._hiddenInput=document.createElement(`input`),this._hiddenInput.type=`hidden`,this._hiddenInput.name=this.getName(),this._hiddenInput.required=this.isRequired(),r.appendChild(this._hiddenInput),this._syncHiddenInput();let a=document.createElement(`div`);if(a.setAttribute(`data-mint-time-picker-body`,`true`),a.className=`mint-time-picker-popover`,this._buildPopoverContent(a),i?(this._popover=null,r.appendChild(a),requestAnimationFrame(()=>this._centerAllColumnsInPopoverBody())):(this._popover=document.createElement(`mint-popover`),this._popover.setAttribute(`trigger-id`,this._triggerId),this._popover.setAttribute(`direction`,`down`),this._popover.setAttribute(`padding`,`0`),this._popover.setAttribute(`distance`,`6px`),(e||t)&&this._popover.setAttribute(`open`,`false`),this._popover.appendChild(a),r.appendChild(this._popover),this._setupPopoverOpenObserver()),this.appendChild(r),!i&&this._inputEl){let e=this._inputEl;this._triggerClickObserver=t=>{t.composedPath().includes(e)&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{this._popover?.getAttribute(`open`)===`true`&&this._centerAllColumnsInPopoverBody()})})},document.addEventListener(`click`,this._triggerClickObserver,!0)}}_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`)}};customElements.get(`mint-time-picker`)||e.t(`mint-time-picker`,t),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
@@ -1,4 +1,4 @@
1
- import { a as e } from "./icon-D7kATeRr.js";
1
+ import { a as e } from "./icon-hyFz3uhh.js";
2
2
  e({
3
3
  name: "warning",
4
4
  viewBox: "0 0 24 24",
@@ -1 +1 @@
1
- require(`./icon-B8hR_TFn.js`).a({name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`});
1
+ require(`./icon-CWOP4Com.js`).a({name:`warning`,viewBox:`0 0 24 24`,path:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`,strokeLinecap:`round`,strokeLinejoin:`round`});
@@ -18,5 +18,5 @@ __mintLoadStyle('icon', '../../icon.css')
18
18
  __mintLoadStyle('text', '../../text.css')
19
19
  __mintLoadStyle('stack', '../../stack.css')
20
20
  __mintLoadStyle('confirm-action', '../../confirm-action.css')
21
- import { n as e, t } from "../chunks/confirm-action-FF25UbZj.js";
21
+ import { n as e, t } from "../chunks/confirm-action-CX_FEzCR.js";
22
22
  export { t as confirm, e as default };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../chunks/confirm-action-ChDVVaGR.js`);exports.confirm=e.t,exports.default=e.n;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../chunks/confirm-action-86hDdUKT.js`);exports.confirm=e.t,exports.default=e.n;
@@ -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-FF25UbZj.js";
9
+ import { n as e, t } from "../chunks/confirm-action-CX_FEzCR.js";
10
10
  export { t as confirm, e as default };
@@ -36,6 +36,11 @@ declare class MintDatePicker extends HTMLElement {
36
36
  private _isTouchActive;
37
37
  private _resizeObserver;
38
38
  private _popoverObserver;
39
+ private _slotObserver;
40
+ private _prependSlotNodes;
41
+ private _appendSlotNodes;
42
+ private _prependSlotContainer;
43
+ private _appendSlotContainer;
39
44
  private _focusTrapHandler;
40
45
  private _escapeHandler;
41
46
  private _a11yId;
@@ -92,6 +97,7 @@ declare class MintDatePicker extends HTMLElement {
92
97
  private _formatDatePhp;
93
98
  private _validateDateString;
94
99
  render(): void;
100
+ private _syncSlotAdornments;
95
101
  private _renderErrorState;
96
102
  private _syncDateFieldDescriptions;
97
103
  private _applyErrorVisuals;
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../src/components/date-picker/DatePicker.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,CAAA;AACvB,OAAO,kBAAkB,CAAA;AACzB,OAAO,eAAe,CAAA;AAItB,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,IAAI,GAAG;QAAE,KAAK,EAAE,IAAI,CAAC;QAAC,GAAG,EAAE,IAAI,CAAA;KAAE,GAAG,IAAI,CAAA;CACvD;AAED,cAAM,cAAe,SAAQ,WAAW;IACtC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,OAAO,CAAC,MAAM,CAA2B;IACzC,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,kBAAkB,CAA2B;IACrD,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,YAAY,CAAgC;IACpD,OAAO,CAAC,gBAAgB,CAAyB;IACjD,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,gBAAgB,CAA2B;IACnD,OAAO,CAAC,gBAAgB,CAA2B;IACnD,OAAO,CAAC,aAAa,CAAoC;IACzD,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,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,WAAW;IAQnB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,gBAAgB;IA0MxB,OAAO,CAAC,kBAAkB;IA+B1B,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;IA4CvB,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,eAAe;IA2EvB,OAAO,CAAC,gBAAgB;CAUzB;AAOD,eAAe,cAAc,CAAA"}
@@ -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-DGXeCDmc.js";
19
+ import { t as e } from "../chunks/date-picker-D3l2uFzg.js";
20
20
  export { e as default };
@@ -1 +1 @@
1
- const e=require(`../chunks/date-picker-C5srl0J1.js`);module.exports=e.t;
1
+ const e=require(`../chunks/date-picker-DY0mlT4u.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-DGXeCDmc.js";
7
+ import { t as e } from "../chunks/date-picker-D3l2uFzg.js";
8
8
  export { e as default };
@@ -17,6 +17,9 @@ declare class MintDateTimePicker extends HTMLElement {
17
17
  private _ready;
18
18
  private _writingValue;
19
19
  private _displayControlBound;
20
+ private _prependSlotNodes;
21
+ private _appendSlotNodes;
22
+ private _slotObserver;
20
23
  connectedCallback(): void;
21
24
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
22
25
  get value(): string;
@@ -30,6 +33,7 @@ declare class MintDateTimePicker extends HTMLElement {
30
33
  private _syncValue;
31
34
  private _syncState;
32
35
  private render;
36
+ private _collectAdornmentNodes;
33
37
  private _getPopover;
34
38
  private _getPopoverContent;
35
39
  private _waitForP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K,CAAC,KAAK,EAAE,MAAM,EAAgC;IACvD,QAAQ,IAAI,MAAM;IAClB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAU7B,OAAO,CAAC,UAAU;IA2BlB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;IAMlB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,MAAM;IAmDd,OAAO,CAAC,sBAAsB;IAO9B,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,kBAAkB;IAK1B,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,2BAA2B;IAoBnC,OAAO,CAAC,cAAc;IAoBtB,OAAO,CAAC,gBAAgB;IAoCxB,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,WAAW;CAWpB;AAGD,eAAe,kBAAkB,CAAA"}
@@ -19,15 +19,15 @@ __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-D7kATeRr.js";
22
+ import "../chunks/icon-hyFz3uhh.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-DGXeCDmc.js";
26
- import "../chunks/time-picker-NlZ9LSyD.js";
25
+ import "../chunks/date-picker-D3l2uFzg.js";
26
+ import "../chunks/time-picker-BczVLEX_.js";
27
27
  //#region src/components/datetime-picker/DateTimePicker.ts
28
28
  var t = class extends HTMLElement {
29
29
  constructor(...e) {
30
- 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;
30
+ 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;
31
31
  }
32
32
  static get observedAttributes() {
33
33
  return [
@@ -51,7 +51,14 @@ var t = class extends HTMLElement {
51
51
  ];
52
52
  }
53
53
  connectedCallback() {
54
- this.classList.add("mint-datetime-picker"), this._readValue(this.getAttribute("value") || ""), this.render(), this._ready = !0;
54
+ this.classList.add("mint-datetime-picker"), this._readValue(this.getAttribute("value") || ""), this.render(), this._ready = !0, this._slotObserver = new MutationObserver((e) => {
55
+ 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();
56
+ }), this._slotObserver.observe(this, {
57
+ childList: !0,
58
+ subtree: !0,
59
+ attributes: !0,
60
+ attributeFilter: ["slot"]
61
+ });
55
62
  }
56
63
  attributeChangedCallback(e, t, n) {
57
64
  if (!(t === n || !this._ready || e === "value" && this._writingValue)) {
@@ -157,7 +164,7 @@ var t = class extends HTMLElement {
157
164
  }
158
165
  render() {
159
166
  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";
160
- this._displayControlBound = !1;
167
+ this._collectAdornmentNodes(), this._displayControlBound = !1;
161
168
  let a = document.createElement("mint-date-picker");
162
169
  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");
163
170
  for (let e of [
@@ -165,7 +172,7 @@ var t = class extends HTMLElement {
165
172
  "max",
166
173
  "shortcuts"
167
174
  ]) this.hasAttribute(e) && a.setAttribute(e, this.getAttribute(e) || "");
168
- 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") || ""), a.addEventListener("change", (e) => {
175
+ 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) => {
169
176
  e.stopPropagation();
170
177
  let t = e.detail?.value || a.value || "";
171
178
  this._parseDate(t, n) && (this._dateValue = t, this._dateStageComplete = !0, this._syncValue(!1), this._syncCombinedDisplay(), this._openTimeStage());
@@ -173,6 +180,14 @@ var t = class extends HTMLElement {
173
180
  let o = document.createElement("div");
174
181
  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();
175
182
  }
183
+ _collectAdornmentNodes() {
184
+ let e = [
185
+ ...this._prependSlotNodes,
186
+ ...this._appendSlotNodes,
187
+ ...Array.from(this.querySelectorAll("[slot=\"prepend\"], [slot=\"append\"]"))
188
+ ];
189
+ this._prependSlotNodes = e.filter((e) => e.getAttribute("slot") === "prepend"), this._appendSlotNodes = e.filter((e) => e.getAttribute("slot") === "append");
190
+ }
176
191
  _getPopover() {
177
192
  let e = this._datePicker, t = e?.getPopoverElement?.() || e?._popover;
178
193
  if (t) return t;
@@ -1 +1 @@
1
- require(`../chunks/icon-B8hR_TFn.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/date-picker-C5srl0J1.js`),require(`../chunks/time-picker-DJ_Z6L5m.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}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}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._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`)||``),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()}_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-CWOP4Com.js`);const e=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/text-CfvRRKGZ.js`),require(`../chunks/date-picker-DY0mlT4u.js`),require(`../chunks/time-picker-CEEByAUI.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,15 +7,15 @@ import '../../stack.css'
7
7
  import '../../time-picker.css'
8
8
  import '../../text.css'
9
9
  import '../../datetime-picker.css'
10
- import "../chunks/icon-D7kATeRr.js";
10
+ import "../chunks/icon-hyFz3uhh.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-DGXeCDmc.js";
14
- import "../chunks/time-picker-NlZ9LSyD.js";
13
+ import "../chunks/date-picker-D3l2uFzg.js";
14
+ import "../chunks/time-picker-BczVLEX_.js";
15
15
  //#region src/components/datetime-picker/DateTimePicker.ts
16
16
  var t = class extends HTMLElement {
17
17
  constructor(...e) {
18
- 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;
18
+ 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;
19
19
  }
20
20
  static get observedAttributes() {
21
21
  return [
@@ -39,7 +39,14 @@ var t = class extends HTMLElement {
39
39
  ];
40
40
  }
41
41
  connectedCallback() {
42
- this.classList.add("mint-datetime-picker"), this._readValue(this.getAttribute("value") || ""), this.render(), this._ready = !0;
42
+ this.classList.add("mint-datetime-picker"), this._readValue(this.getAttribute("value") || ""), this.render(), this._ready = !0, this._slotObserver = new MutationObserver((e) => {
43
+ 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();
44
+ }), this._slotObserver.observe(this, {
45
+ childList: !0,
46
+ subtree: !0,
47
+ attributes: !0,
48
+ attributeFilter: ["slot"]
49
+ });
43
50
  }
44
51
  attributeChangedCallback(e, t, n) {
45
52
  if (!(t === n || !this._ready || e === "value" && this._writingValue)) {
@@ -145,7 +152,7 @@ var t = class extends HTMLElement {
145
152
  }
146
153
  render() {
147
154
  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";
148
- this._displayControlBound = !1;
155
+ this._collectAdornmentNodes(), this._displayControlBound = !1;
149
156
  let a = document.createElement("mint-date-picker");
150
157
  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");
151
158
  for (let e of [
@@ -153,7 +160,7 @@ var t = class extends HTMLElement {
153
160
  "max",
154
161
  "shortcuts"
155
162
  ]) this.hasAttribute(e) && a.setAttribute(e, this.getAttribute(e) || "");
156
- 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") || ""), a.addEventListener("change", (e) => {
163
+ 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) => {
157
164
  e.stopPropagation();
158
165
  let t = e.detail?.value || a.value || "";
159
166
  this._parseDate(t, n) && (this._dateValue = t, this._dateStageComplete = !0, this._syncValue(!1), this._syncCombinedDisplay(), this._openTimeStage());
@@ -161,6 +168,14 @@ var t = class extends HTMLElement {
161
168
  let o = document.createElement("div");
162
169
  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();
163
170
  }
171
+ _collectAdornmentNodes() {
172
+ let e = [
173
+ ...this._prependSlotNodes,
174
+ ...this._appendSlotNodes,
175
+ ...Array.from(this.querySelectorAll("[slot=\"prepend\"], [slot=\"append\"]"))
176
+ ];
177
+ this._prependSlotNodes = e.filter((e) => e.getAttribute("slot") === "prepend"), this._appendSlotNodes = e.filter((e) => e.getAttribute("slot") === "append");
178
+ }
164
179
  _getPopover() {
165
180
  let e = this._datePicker, t = e?.getPopoverElement?.() || e?._popover;
166
181
  if (t) return t;
@@ -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-D7kATeRr.js";
16
+ import { a as e } from "../chunks/icon-hyFz3uhh.js";
17
17
  import { t } from "../chunks/register-element-BFYmIynH.js";
18
- import "../chunks/icon-BQqwHk-o.js";
19
- import "../chunks/warning-D4JUMfwk.js";
20
- import "../chunks/close-C5b9RhcK.js";
18
+ import "../chunks/icon-l34kRIZg.js";
19
+ import "../chunks/warning-DAYbxh3S.js";
20
+ import "../chunks/close-Cn8XLO1c.js";
21
21
  e({
22
22
  name: "upload",
23
23
  viewBox: "0 0 24 24",
@@ -1 +1 @@
1
- const e=require(`../chunks/icon-B8hR_TFn.js`),t=require(`../chunks/register-element-tCL_F1YI.js`);require(`../chunks/icon-CzgI_MCf.js`),require(`../chunks/warning-fwqtKFLY.js`),require(`../chunks/close-BNbAeJPY.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-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,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-D7kATeRr.js";
4
+ import { a as e } from "../chunks/icon-hyFz3uhh.js";
5
5
  import { t } from "../chunks/register-element-BFYmIynH.js";
6
- import "../chunks/icon-BQqwHk-o.js";
7
- import "../chunks/warning-D4JUMfwk.js";
8
- import "../chunks/close-C5b9RhcK.js";
6
+ import "../chunks/icon-l34kRIZg.js";
7
+ import "../chunks/warning-DAYbxh3S.js";
8
+ import "../chunks/close-Cn8XLO1c.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-D7kATeRr.js";
15
+ import { a as e, i as t, n, r, t as i } from "../chunks/icon-hyFz3uhh.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 funnelIcon: IconData;
3
+ //# sourceMappingURL=funnel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"funnel.d.ts","sourceRoot":"","sources":["../../../../src/components/icon/icons/funnel.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEzD,eAAO,MAAM,UAAU,EAAE,QAMxB,CAAA"}
@@ -79,6 +79,7 @@ export { bookmarkIcon } from './bookmark';
79
79
  export { starIcon } from './star';
80
80
  export { pinIcon } from './pin';
81
81
  export { filterIcon } from './filter';
82
+ export { funnelIcon } from './funnel';
82
83
  export { sortIcon } from './sort';
83
84
  export { sortArrowsIcon } from './sort-arrows';
84
85
  export { refreshIcon } from './refresh';