hisonvue 1.0.0

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 (155) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +248 -0
  3. package/dist/HAccordion-CPtgQUK0.js +1 -0
  4. package/dist/HAccordion-ll-4cIAw.mjs +262 -0
  5. package/dist/HBaggie-D6omQoFh.js +1 -0
  6. package/dist/HBaggie-D_7mEiuV.mjs +283 -0
  7. package/dist/HBanner-DmcMOFqS.mjs +420 -0
  8. package/dist/HBanner-Io4SdGGs.js +1 -0
  9. package/dist/HButton-DAVuDmOQ.js +1 -0
  10. package/dist/HButton-DAriO81x.mjs +256 -0
  11. package/dist/HCalendar-DKwGatUk.js +2 -0
  12. package/dist/HCalendar-w18iIB90.mjs +3387 -0
  13. package/dist/HCaption-6CbSqRA7.js +1 -0
  14. package/dist/HCaption-DwsXHDNK.mjs +275 -0
  15. package/dist/HChart-C86JXUyW.js +1 -0
  16. package/dist/HChart-CcArHFr0.mjs +179 -0
  17. package/dist/HDrawer-DG1O42iF.mjs +439 -0
  18. package/dist/HDrawer-U5VC_okK.js +1 -0
  19. package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
  20. package/dist/HDropdown-D4RAGmjE.js +1 -0
  21. package/dist/HFileset-BGuP9O4l.mjs +578 -0
  22. package/dist/HFileset-CuPR6Hwf.js +2 -0
  23. package/dist/HGap-BPAdnOQz.js +1 -0
  24. package/dist/HGap-DzGrfWVt.mjs +233 -0
  25. package/dist/HGrid-BiIhVCv_.mjs +345 -0
  26. package/dist/HGrid-C3EV_pgM.js +1 -0
  27. package/dist/HImagebox-D_DKeCrO.mjs +654 -0
  28. package/dist/HImagebox-t_UdFjQO.js +2 -0
  29. package/dist/HInput-BEyJqYkD.mjs +1103 -0
  30. package/dist/HInput-DMGLY473.js +1 -0
  31. package/dist/HInputGroup-D37WTYoI.mjs +281 -0
  32. package/dist/HInputGroup-Dcfr23sZ.js +1 -0
  33. package/dist/HLabel-B2FOqSiS.mjs +369 -0
  34. package/dist/HLabel-Dm48mSwn.js +1 -0
  35. package/dist/HLayout-BbCEm_aO.mjs +196 -0
  36. package/dist/HLayout-C1e4BZ_K.js +1 -0
  37. package/dist/HList-CAeYb-hz.mjs +419 -0
  38. package/dist/HList-eNXmMf27.js +1 -0
  39. package/dist/HModal-BDBEEpKm.mjs +778 -0
  40. package/dist/HModal-GODLq3wH.js +1 -0
  41. package/dist/HNote-CWnUjt3_.mjs +934 -0
  42. package/dist/HNote-D_Xwu9oL.js +1 -0
  43. package/dist/HPagination-Db_L9wv-.js +1 -0
  44. package/dist/HPagination-e5e2a5GS.mjs +496 -0
  45. package/dist/HParagraph-BRuSeOMU.js +1 -0
  46. package/dist/HParagraph-DYuB-qjY.mjs +463 -0
  47. package/dist/HPopup-Brp1FVpm.mjs +431 -0
  48. package/dist/HPopup-ChkoI3xm.js +1 -0
  49. package/dist/HSpinner-DDtU9PL_.js +1 -0
  50. package/dist/HSpinner-DOq2k5kT.mjs +281 -0
  51. package/dist/HTable-DGFnzD4u.js +1 -0
  52. package/dist/HTable-GCDP5O_J.mjs +620 -0
  53. package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
  54. package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
  55. package/dist/ar.es-CKau4tBl.js +5 -0
  56. package/dist/ar.es-XxSuE68c.mjs +57 -0
  57. package/dist/bg.es-BJ7fu6yy.mjs +57 -0
  58. package/dist/bg.es-Melqx1M5.js +5 -0
  59. package/dist/bn.es-CYlBkxc5.mjs +57 -0
  60. package/dist/bn.es-ClbAZ4WP.js +5 -0
  61. package/dist/bs.es-KjOcbE96.js +5 -0
  62. package/dist/bs.es-yMnaKmdi.mjs +57 -0
  63. package/dist/ca.es-BaGTENcW.js +5 -0
  64. package/dist/ca.es-DIhlxmQc.mjs +67 -0
  65. package/dist/cs.es-BN8oxRXQ.mjs +57 -0
  66. package/dist/cs.es-ChOlHqBr.js +5 -0
  67. package/dist/da.es-DJB5lAli.mjs +57 -0
  68. package/dist/da.es-DOFXbf8-.js +5 -0
  69. package/dist/de.es-DwE82Kaw.js +5 -0
  70. package/dist/de.es-glb8GeJh.mjs +57 -0
  71. package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
  72. package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
  73. package/dist/el.es-CNrCgzYI.js +5 -0
  74. package/dist/el.es-_bBZf22h.mjs +76 -0
  75. package/dist/en.es-CV9nmQGr.mjs +57 -0
  76. package/dist/en.es-CgL601qd.js +5 -0
  77. package/dist/es.es-CZjcWK54.mjs +57 -0
  78. package/dist/es.es-IdFGKY7Q.js +5 -0
  79. package/dist/et.es-BygWmV3P.js +5 -0
  80. package/dist/et.es-CjvQAzNF.mjs +57 -0
  81. package/dist/fa.es-DW_0SmsT.js +5 -0
  82. package/dist/fa.es-DykeFwDA.mjs +57 -0
  83. package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
  84. package/dist/fi.es-pgfJlZ8i.js +5 -0
  85. package/dist/fr.es-CNKVhFfO.mjs +57 -0
  86. package/dist/fr.es-OENguFuM.js +5 -0
  87. package/dist/he.es-bixEnAeH.js +5 -0
  88. package/dist/he.es-nF4GFhjH.mjs +57 -0
  89. package/dist/hisonvue.cjs.js +1 -0
  90. package/dist/hisonvue.css +1 -0
  91. package/dist/hisonvue.d.ts +19934 -0
  92. package/dist/hisonvue.es.js +114 -0
  93. package/dist/hr.es-CkRAP94O.js +5 -0
  94. package/dist/hr.es-QFfz660j.mjs +57 -0
  95. package/dist/hu.es-Ck2rE01V.mjs +57 -0
  96. package/dist/hu.es-DG6HeiQJ.js +5 -0
  97. package/dist/id.es-D4tPi6wP.js +5 -0
  98. package/dist/id.es-Je7FEUJ5.mjs +57 -0
  99. package/dist/index-BmKMHsSZ.js +153 -0
  100. package/dist/index-DUh7pai4.mjs +19976 -0
  101. package/dist/is.es-CDFqLYCV.js +5 -0
  102. package/dist/is.es-bzprHvXI.mjs +57 -0
  103. package/dist/it.es-BHgrw_C6.js +5 -0
  104. package/dist/it.es-CJtfqmNS.mjs +57 -0
  105. package/dist/ja.es-BaiGjqZ6.mjs +57 -0
  106. package/dist/ja.es-D-lxWwyb.js +5 -0
  107. package/dist/ka.es-CnnB6q4A.js +5 -0
  108. package/dist/ka.es-x9QJo_dl.mjs +57 -0
  109. package/dist/ko.es-6c447eTS.mjs +57 -0
  110. package/dist/ko.es-b18aaB3V.js +5 -0
  111. package/dist/lt.es-2twYdvmJ.mjs +57 -0
  112. package/dist/lt.es-BY9UQ6wZ.js +5 -0
  113. package/dist/mn.es-BLQRG1uu.mjs +57 -0
  114. package/dist/mn.es-YFS7gSdf.js +5 -0
  115. package/dist/nl.es-BEx-4hnj.js +5 -0
  116. package/dist/nl.es-bB1qWR_S.mjs +57 -0
  117. package/dist/no.es-BQnRWlWR.js +5 -0
  118. package/dist/no.es-CWDVXpTf.mjs +57 -0
  119. package/dist/pl.es-CKCsZ_02.js +5 -0
  120. package/dist/pl.es-Dzct23w9.mjs +57 -0
  121. package/dist/pt-br.es-BeBuiitI.mjs +57 -0
  122. package/dist/pt-br.es-oH7qh6Fd.js +5 -0
  123. package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
  124. package/dist/pt-pt.es-DLk5I0ej.js +5 -0
  125. package/dist/ro.es-DfMVJ30M.mjs +57 -0
  126. package/dist/ro.es-DgTen1Dh.js +5 -0
  127. package/dist/ru.es-Bv9UvrBe.mjs +67 -0
  128. package/dist/ru.es-jGIQfREl.js +5 -0
  129. package/dist/scrollManager-BGnq4wyt.mjs +14 -0
  130. package/dist/scrollManager-CEEWQwoK.js +1 -0
  131. package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
  132. package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
  133. package/dist/sk.es-CUOTpLuL.mjs +57 -0
  134. package/dist/sk.es-D2bhVb26.js +5 -0
  135. package/dist/sl.es-DeIGgZbR.mjs +57 -0
  136. package/dist/sl.es-TV8Uraa1.js +5 -0
  137. package/dist/sq.es-CQJJrZHv.mjs +67 -0
  138. package/dist/sq.es-Cc65zxbr.js +5 -0
  139. package/dist/sr.es-CKS0AkiW.mjs +57 -0
  140. package/dist/sr.es-D5VNA_GW.js +5 -0
  141. package/dist/sv.es-ChHQRrAe.mjs +57 -0
  142. package/dist/sv.es-dBeK_DZs.js +5 -0
  143. package/dist/tr.es-B3v90gVv.mjs +57 -0
  144. package/dist/tr.es-BUz4S13G.js +5 -0
  145. package/dist/uk.es-B8uaeLcK.js +5 -0
  146. package/dist/uk.es-CiR4NnbN.mjs +67 -0
  147. package/dist/vi.es-2OFMtbQI.js +5 -0
  148. package/dist/vi.es-DFDi5l7p.mjs +67 -0
  149. package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
  150. package/dist/zh-cn.es-fDHCbCIg.js +5 -0
  151. package/dist/zh-hk.es-COzeh5F8.js +5 -0
  152. package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
  153. package/nuxt/module.mjs +39 -0
  154. package/nuxt/plugin.mjs +21 -0
  155. package/package.json +53 -0
@@ -0,0 +1,778 @@
1
+ import { defineComponent as Qe, ref as a, computed as l, onMounted as _e, onBeforeUnmount as xe, watch as n, unref as ae, nextTick as ne, resolveComponent as ie, createElementBlock as C, openBlock as u, normalizeClass as c, createCommentVNode as s, createElementVNode as ze, normalizeStyle as re, createBlock as m, createVNode as H, withCtx as d, renderSlot as r, Fragment as B, createSlots as A } from "vue";
2
+ import { B as ue, f as J, S as eo, i as b, g as oo, u as to, j as Ae, t as ce, e as lo, b as Fe, h as D, r as so, c as ao, d as no } from "./index-DUh7pai4.mjs";
3
+ import { a as io, r as ro } from "./scrollManager-BGnq4wyt.mjs";
4
+ import { _ as uo } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
+ const co = {
6
+ /**
7
+ * Unique identifier for the modal instance.
8
+ * - You can later retrieve its methods via `hison.component.getModal(id)`
9
+ * - Duplicate `id` values will throw an error at mount time
10
+ */
11
+ id: { type: String, required: !1 },
12
+ /**
13
+ * Custom class applied to the modal wrapper scope.
14
+ * - Accepts string/array/object (Vue class binding formats)
15
+ * - You can use responsive tokens such as `hison-col-*`, `hison-size-*`, `hison-color-*`
16
+ * - Processed internally to apply device-specific classes
17
+ */
18
+ class: {
19
+ type: [String, Array, Object],
20
+ required: !1
21
+ },
22
+ /**
23
+ * Inline style(s) for the modal **dialog element** (not the overlay nor the fixed wrapper).
24
+ * - Accepts string, object, or array of objects (Vue style binding formats)
25
+ * - Use this for width/height/padding of the dialog itself
26
+ */
27
+ style: {
28
+ type: [String, Object, Array],
29
+ required: !1
30
+ },
31
+ /**
32
+ * Initial visibility of the modal.
33
+ * - Runtime visibility is controlled **only** via methods (`open/close/toggle/setVisible`)
34
+ * - Default: `false`
35
+ */
36
+ visible: { type: Boolean, default: !1 },
37
+ /**
38
+ * Whether the dialog has a border (rendered via component theme shadow).
39
+ * - Default: `true`
40
+ */
41
+ border: { type: Boolean, default: !0 },
42
+ /**
43
+ * Background fill mode of the dialog body/header/footer.
44
+ * - One of: `'empty' | 'transparent' | 'filled'` (see `BackgroundType`)
45
+ * - Default: `BackgroundType.empty`
46
+ */
47
+ backgroundType: {
48
+ type: String,
49
+ default: J.empty,
50
+ validator: (e) => ue.includes(e)
51
+ },
52
+ /**
53
+ * Stacking order for this modal **wrapper** (fixed container).
54
+ * - Applied to `.hison-modal-wrapper`; the overlay uses `zIndex - 1`
55
+ * - Default: `1300`
56
+ * - When stacking multiple modals, set different `zIndex` values to ensure the desired front/back order.
57
+ */
58
+ zIndex: { type: Number, default: 1300 },
59
+ /**
60
+ * On-screen position of the **fixed wrapper** (where the dialog is anchored).
61
+ * - Tokens: 'top-left' | 'top-center' | 'top-right' |
62
+ * 'middle-left' | 'middle-center' | 'middle-right' |
63
+ * 'bottom-left' | 'bottom-center' | 'bottom-right'
64
+ * - Default: `middle-center`
65
+ * - This controls only the fixed anchor (wrapper); dialog sizes/layout are still governed by `style`
66
+ */
67
+ position: {
68
+ type: String,
69
+ default: b.middleCenter,
70
+ validator: (e) => eo.includes(e)
71
+ },
72
+ /**
73
+ * Initial header visibility flag.
74
+ * - Final rendering also depends on **content existence**:
75
+ * header will hide if no slot and no caption/close-button are placed in header
76
+ * - Default: `true`
77
+ */
78
+ headerVisible: { type: Boolean, default: !0 },
79
+ /**
80
+ * Initial footer visibility flag.
81
+ * - Final rendering also depends on **content existence**:
82
+ * footer will hide if no slot and no caption/close-button are placed in footer
83
+ * - Default: `true`
84
+ */
85
+ footerVisible: { type: Boolean, default: !0 },
86
+ /**
87
+ * Caption text.
88
+ * - If `null`/empty string, caption is considered **not present** (affects header/footer auto visibility)
89
+ * - Default: `null`
90
+ */
91
+ caption: { type: String, default: null },
92
+ /**
93
+ * Whether caption renders with border styling.
94
+ * - Default: `false`
95
+ */
96
+ captionBorder: { type: Boolean, default: !1 },
97
+ /**
98
+ * Background type for the caption element.
99
+ * - One of `BackgroundType` tokens
100
+ * - Default: `filled`
101
+ */
102
+ captionBackgroundType: {
103
+ type: String,
104
+ default: J.filled,
105
+ validator: (e) => ue.includes(e)
106
+ },
107
+ /**
108
+ * Placement of the caption: which section and side it appears in.
109
+ * - Tokens: 'header-left' | 'header-center' | 'header-right' |
110
+ * 'footer-left' | 'footer-center' | 'footer-right'
111
+ * - Default: `'header-center'`
112
+ * - Note: Caption renders only if `caption` text is present.
113
+ */
114
+ captionPlacement: {
115
+ type: String,
116
+ default: "header-center"
117
+ },
118
+ /**
119
+ * Whether the close button is shown initially.
120
+ * - Default: `true`
121
+ */
122
+ closeButtonVisible: { type: Boolean, default: !0 },
123
+ /** Label text for the close button (e.g., 'X'). Default: 'X' */
124
+ closeButtonText: { type: String, default: "X" },
125
+ /** Title (tooltip) for the close button. Default: 'close' */
126
+ closeButtonTitle: { type: String, default: "close" },
127
+ /** Whether the close button renders with border styling. Default: `true` */
128
+ closeButtonBorder: { type: Boolean, default: !0 },
129
+ /**
130
+ * Background type for the close button.
131
+ * - One of `BackgroundType` tokens
132
+ * - Default: `empty`
133
+ */
134
+ closeButtonBackgroundType: {
135
+ type: String,
136
+ default: J.empty,
137
+ validator: (e) => ue.includes(e)
138
+ },
139
+ /**
140
+ * Placement of the close button: which section and side it appears in.
141
+ * - Tokens: 'header-left' | 'header-center' | 'header-right' |
142
+ * 'footer-left' | 'footer-center' | 'footer-right'
143
+ * - Default: `'footer-right'`
144
+ */
145
+ closeButtonPlacement: {
146
+ type: String,
147
+ default: "footer-right"
148
+ },
149
+ /**
150
+ * Whether clicking the overlay closes the modal.
151
+ * - Default: `true`
152
+ */
153
+ closeClickOverlay: { type: Boolean, default: !0 },
154
+ /**
155
+ * Whether the overlay (backdrop) is rendered at all.
156
+ * - Default: `true`
157
+ */
158
+ showOverlay: { type: Boolean, default: !0 },
159
+ /**
160
+ * Styles applied to the overlay element.
161
+ * - Accepts string/object/array; merged with an internal `{ zIndex: (zIndex - 1) }`
162
+ * - Example: `overlay-style="{ backgroundColor: 'rgba(0,0,0,.4)' }"`
163
+ */
164
+ overlayStyle: {
165
+ type: [String, Object, Array],
166
+ required: !1
167
+ },
168
+ /**
169
+ * Locks page scroll while the modal is open (reference-counted across nested modals).
170
+ * - Default: `true`
171
+ */
172
+ scrollLock: { type: Boolean, default: !0 },
173
+ /**
174
+ * Optional enter animation class for the dialog.
175
+ * - Default: internal `'hison-modal-enter'` if not provided
176
+ */
177
+ enterAnimationClass: { type: String, required: !1 },
178
+ /**
179
+ * Optional leave animation class for the dialog.
180
+ * - Default: internal `'hison-modal-leave'` if not provided
181
+ */
182
+ leaveAnimationClass: { type: String, required: !1 }
183
+ }, vo = Qe({
184
+ name: "HModal",
185
+ props: co,
186
+ inheritAttrs: !1,
187
+ emits: [
188
+ "mounted",
189
+ "responsive-change",
190
+ "open",
191
+ "close"
192
+ ],
193
+ setup(e, { emit: g, slots: Q }) {
194
+ const f = e.id || oo(), Z = `hmodal:${f}`, _ = to(), k = a(null), i = a(e.visible), p = a(e.headerVisible), T = a(e.footerVisible), $ = a(e.closeButtonVisible), L = a(e.caption ?? null), F = a(e.captionBorder), I = a(e.captionBackgroundType), W = a(e.closeButtonBorder), N = a(e.closeButtonBackgroundType), E = a(e.closeClickOverlay), q = a(e.showOverlay), V = a(e.scrollLock), U = a(e.border), M = a(e.backgroundType || J.empty), v = a(e.closeButtonPlacement), h = a(e.captionPlacement), R = a(e.zIndex ?? 1e3), j = a(e.position), Ie = l(() => {
195
+ const o = {
196
+ zIndex: R.value
197
+ };
198
+ switch (o.left = "", o.right = "", o.top = "", o.bottom = "", o.transform = "none", j.value) {
199
+ case b.topLeft:
200
+ o.left = "0", o.top = "0";
201
+ break;
202
+ case b.topCenter:
203
+ o.left = "50%", o.top = "0", o.transform = "translateX(-50%)";
204
+ break;
205
+ case b.topRight:
206
+ o.right = "0", o.top = "0";
207
+ break;
208
+ case b.middleLeft:
209
+ o.left = "0", o.top = "50%", o.transform = "translateY(-50%)";
210
+ break;
211
+ case b.middleCenter:
212
+ o.left = "50%", o.top = "50%", o.transform = "translate(-50%, -50%)";
213
+ break;
214
+ case b.middleRight:
215
+ o.right = "0", o.top = "50%", o.transform = "translateY(-50%)";
216
+ break;
217
+ case b.bottomLeft:
218
+ o.left = "0", o.bottom = "0";
219
+ break;
220
+ case b.bottomCenter:
221
+ o.left = "50%", o.bottom = "0", o.transform = "translateX(-50%)";
222
+ break;
223
+ case b.bottomRight:
224
+ o.right = "0", o.bottom = "0";
225
+ break;
226
+ }
227
+ return o;
228
+ }), We = l(() => {
229
+ const t = { zIndex: (R.value ?? 1e3) - 1 }, z = e.overlayStyle;
230
+ return z ? Array.isArray(z) ? [{ ...t }, ...z] : typeof z == "string" ? [t, z] : { ...t, ...z } : t;
231
+ }), Ne = l(() => i.value ? "" : "hison-display-none"), Ee = l(() => {
232
+ switch (M.value) {
233
+ case "transparent":
234
+ return "hison-bg-transparent";
235
+ case "filled":
236
+ return "hison-bg-filled";
237
+ default:
238
+ return "hison-bg-empty";
239
+ }
240
+ }), qe = l(() => U.value ? "hison-border" : ""), X = a([]), x = () => {
241
+ X.value = lo(ce(e.class) || "", _.value), Fe(X.value, "size", D.componentStyle.size), Fe(X.value, "color", "primary");
242
+ }, Ue = l(() => [
243
+ ...Ae(ce(e.class) || "", "size"),
244
+ ...Ae(ce(e.class) || "", "color")
245
+ ]), Me = l(() => i.value && q.value), je = l(() => !!Q.header), De = l(() => !!Q.footer), y = (o) => o.split("-")[1] || "left", de = l(() => !!(L.value && L.value.trim().length)), ee = l(() => de.value && h.value.startsWith("header")), oe = l(() => $.value && v.value.startsWith("header")), ve = l(() => ee.value && y(h.value) === "left"), he = l(() => ee.value && y(h.value) === "center"), ye = l(() => ee.value && y(h.value) === "right"), fe = l(() => oe.value && y(v.value) === "left"), Ce = l(() => oe.value && y(v.value) === "center"), be = l(() => oe.value && y(v.value) === "right"), pe = l(() => ve.value || fe.value), ke = l(() => he.value || Ce.value), me = l(() => ye.value || be.value), te = l(() => de.value && h.value.startsWith("footer")), le = l(() => $.value && v.value.startsWith("footer")), Be = l(() => te.value && y(h.value) === "left"), ge = l(() => te.value && y(h.value) === "center"), Te = l(() => te.value && y(h.value) === "right"), $e = l(() => le.value && y(v.value) === "left"), Le = l(() => le.value && y(v.value) === "center"), we = l(() => le.value && y(v.value) === "right"), Se = l(() => Be.value || $e.value), He = l(() => ge.value || Le.value), Ve = l(() => Te.value || we.value), Ze = l(
246
+ () => p.value && (je.value || pe.value || ke.value || me.value)
247
+ ), Xe = l(
248
+ () => T.value && (De.value || Se.value || He.value || Ve.value)
249
+ ), Y = () => {
250
+ V.value && io(f);
251
+ }, G = () => {
252
+ V.value && ro(f);
253
+ }, O = a(null), Ye = (o) => {
254
+ E.value && P();
255
+ }, Ge = (o) => {
256
+ P();
257
+ }, w = a(e.enterAnimationClass || "hison-modal-enter"), S = a(e.leaveAnimationClass || "hison-modal-leave"), se = a(null), Re = async () => {
258
+ const o = se.value;
259
+ !o || !w.value || (o.classList.remove(S.value), o.offsetWidth, o.classList.add(w.value));
260
+ }, Ke = async () => {
261
+ const o = se.value;
262
+ !o || !S.value || (o.classList.remove(w.value), o.offsetWidth, o.classList.add(S.value), await new Promise((t) => setTimeout(t, 200)));
263
+ }, K = async () => {
264
+ i.value || (i.value = !0, Y(), await ne(), Re(), g("open", ae(O)));
265
+ }, P = async () => {
266
+ if (i.value)
267
+ try {
268
+ await Ke();
269
+ } finally {
270
+ i.value = !1, G(), g("close", ae(O));
271
+ }
272
+ }, Je = async () => i.value ? P() : K(), Oe = () => {
273
+ D.component.modalList[f] && D.component.modalList[f].isHisonvueComponent && console.warn(`[Hisonvue] The modal ID is at risk of being duplicated. ${f}`), so(Z, () => {
274
+ Pe(), ne(Oe);
275
+ }), x(), i.value && (Y(), ne(Re)), O.value = {
276
+ isHisonvueComponent: !0,
277
+ getId: () => f,
278
+ getType: () => "modal",
279
+ isVisible: () => i.value,
280
+ open: K,
281
+ close: P,
282
+ toggle: Je,
283
+ setVisible: (o) => o ? K() : P(),
284
+ getZIndex: () => R.value,
285
+ setZIndex: (o) => {
286
+ R.value = o;
287
+ },
288
+ getPosition: () => j.value,
289
+ setPosition: (o) => {
290
+ j.value = o;
291
+ },
292
+ isHeaderVisible: () => p.value,
293
+ setHeaderVisible: (o) => {
294
+ p.value = o;
295
+ },
296
+ isFooterVisible: () => T.value,
297
+ setFooterVisible: (o) => {
298
+ T.value = o;
299
+ },
300
+ getCaption: () => L.value || "",
301
+ setCaption: (o) => {
302
+ L.value = o;
303
+ },
304
+ isCaptionBorder: () => F.value,
305
+ setCaptionBorder: (o) => {
306
+ F.value = o;
307
+ },
308
+ getCaptionBackgroundType: () => I.value,
309
+ setCaptionBackgroundType: (o) => {
310
+ I.value = o;
311
+ },
312
+ isCloseButtonVisible: () => $.value,
313
+ setCloseButtonVisible: (o) => {
314
+ $.value = o;
315
+ },
316
+ isCloseButtonBorder: () => W.value,
317
+ setCloseButtonBorder: (o) => {
318
+ W.value = o;
319
+ },
320
+ getCloseButtonBackgroundType: () => N.value,
321
+ setCloseButtonBackgroundType: (o) => {
322
+ N.value = o;
323
+ },
324
+ getButtonPlacement: () => v.value,
325
+ setButtonPlacement: (o) => {
326
+ v.value = o;
327
+ },
328
+ getCaptionPlacement: () => h.value,
329
+ setCaptionPlacement: (o) => {
330
+ h.value = o;
331
+ },
332
+ isCloseClickOverlay: () => E.value,
333
+ setCloseClickOverlay: (o) => {
334
+ E.value = o;
335
+ },
336
+ isOverlayShown: () => q.value,
337
+ setOverlayShown: (o) => {
338
+ q.value = o;
339
+ },
340
+ isBorder: () => U.value,
341
+ setBorder: (o) => {
342
+ U.value = o;
343
+ },
344
+ getBackgroundType: () => M.value,
345
+ setBackgroundType: (o) => {
346
+ M.value = o;
347
+ },
348
+ isScrollLocked: () => V.value,
349
+ setScrollLock: (o) => {
350
+ V.value = o, i.value && (o ? Y() : G());
351
+ },
352
+ getAnimationClasses: () => ({ enter: w.value, leave: S.value }),
353
+ setAnimationClasses: (o) => {
354
+ "enter" in o && (w.value = o.enter || ""), "leave" in o && (S.value = o.leave || "");
355
+ },
356
+ reload: () => ao(Z)
357
+ }, D.component.modalList[f] = O.value, g("mounted", O.value);
358
+ }, Pe = () => {
359
+ no(Z), delete D.component.modalList[f], i.value && G();
360
+ };
361
+ return _e(Oe), xe(Pe), n(_, (o) => {
362
+ x(), g("responsive-change", o);
363
+ }), n(() => e.visible, (o) => {
364
+ const t = !!o;
365
+ t && !i.value ? K() : !t && i.value && P();
366
+ }), n(() => e.headerVisible, (o) => {
367
+ const t = !!o;
368
+ t !== p.value && (p.value = t);
369
+ }), n(() => e.footerVisible, (o) => {
370
+ const t = !!o;
371
+ t !== T.value && (T.value = t);
372
+ }), n(() => e.closeButtonVisible, (o) => {
373
+ const t = !!o;
374
+ t !== $.value && ($.value = t);
375
+ }), n(() => e.caption, (o) => {
376
+ const t = o ?? null;
377
+ t !== L.value && (L.value = t);
378
+ }), n(() => e.captionBorder, (o) => {
379
+ const t = !!o;
380
+ t !== F.value && (F.value = t);
381
+ }), n(() => e.captionBackgroundType, (o) => {
382
+ o && o !== I.value && (I.value = o);
383
+ }), n(() => e.closeButtonBorder, (o) => {
384
+ const t = !!o;
385
+ t !== W.value && (W.value = t);
386
+ }), n(() => e.closeButtonBackgroundType, (o) => {
387
+ o && o !== N.value && (N.value = o);
388
+ }), n(() => e.closeButtonPlacement, (o) => {
389
+ o && o !== v.value && (v.value = o);
390
+ }), n(() => e.captionPlacement, (o) => {
391
+ o && o !== h.value && (h.value = o);
392
+ }), n(() => e.closeClickOverlay, (o) => {
393
+ const t = !!o;
394
+ t !== E.value && (E.value = t);
395
+ }), n(() => e.showOverlay, (o) => {
396
+ const t = !!o;
397
+ t !== q.value && (q.value = t);
398
+ }), n(() => e.scrollLock, (o) => {
399
+ const t = !!o;
400
+ t !== V.value && (V.value = t, i.value && (t ? Y() : G()));
401
+ }), n(() => e.border, (o) => {
402
+ const t = !!o;
403
+ t !== U.value && (U.value = t);
404
+ }), n(() => e.backgroundType, (o) => {
405
+ o && o !== M.value && (M.value = o);
406
+ }), n(() => e.zIndex, (o) => {
407
+ const t = Number(o ?? 1300);
408
+ t !== R.value && (R.value = t);
409
+ }), n(() => e.position, (o) => {
410
+ o && o !== j.value && (j.value = o);
411
+ }), n(() => e.enterAnimationClass, (o) => {
412
+ const t = o || "hison-modal-enter";
413
+ t !== w.value && (w.value = t);
414
+ }), n(() => e.leaveAnimationClass, (o) => {
415
+ const t = o || "hison-modal-leave";
416
+ t !== S.value && (S.value = t);
417
+ }), n(() => e.class, () => {
418
+ x();
419
+ }), {
420
+ id: f,
421
+ props: e,
422
+ modalRef: se,
423
+ modalWrapperRef: k,
424
+ caption: L,
425
+ responsiveClassList: X,
426
+ visibleClass: Ne,
427
+ borderClass: qe,
428
+ backgroundTypeClass: Ee,
429
+ isOverlayVisible: Me,
430
+ headerVisibleComputed: Ze,
431
+ footerVisibleComputed: Xe,
432
+ headerHasLeft: pe,
433
+ headerHasCenter: ke,
434
+ headerHasRight: me,
435
+ showHeaderCaptionLeft: ve,
436
+ showHeaderCaptionCenter: he,
437
+ showHeaderCaptionRight: ye,
438
+ showHeaderCloseLeft: fe,
439
+ showHeaderCloseCenter: Ce,
440
+ showHeaderCloseRight: be,
441
+ footerHasLeft: Se,
442
+ footerHasCenter: He,
443
+ footerHasRight: Ve,
444
+ showFooterCaptionLeft: Be,
445
+ showFooterCaptionCenter: ge,
446
+ showFooterCaptionRight: Te,
447
+ showFooterCloseLeft: $e,
448
+ showFooterCloseCenter: Le,
449
+ showFooterCloseRight: we,
450
+ childClassList: Ue,
451
+ overlayStyleWithZ: We,
452
+ wrapperStyle: Ie,
453
+ onOverlayClick: Ye,
454
+ onClickCloseButton: Ge,
455
+ modalMethods: l(() => ae(O)),
456
+ closeButtonVisible: $,
457
+ buttonPlacement: v,
458
+ captionPlacement: h,
459
+ closeButtonText: e.closeButtonText,
460
+ closeButtonTitle: e.closeButtonTitle,
461
+ closeButtonBorder: W,
462
+ closeButtonBackgroundType: N,
463
+ captionBorder: F,
464
+ captionBackgroundType: I
465
+ };
466
+ }
467
+ });
468
+ function ho(e, g, Q, f, Z, _) {
469
+ const k = ie("HLabel"), i = ie("HButton"), p = ie("HLayout");
470
+ return u(), C("div", {
471
+ class: c([
472
+ "hison-layer-host",
473
+ e.visibleClass
474
+ ])
475
+ }, [
476
+ e.isOverlayVisible ? (u(), C("div", {
477
+ key: 0,
478
+ class: "hison-modal-overlay",
479
+ style: re(e.overlayStyleWithZ),
480
+ onClick: g[0] || (g[0] = (...T) => e.onOverlayClick && e.onOverlayClick(...T))
481
+ }, null, 4)) : s("", !0),
482
+ ze("div", {
483
+ ref: "modalWrapperRef",
484
+ class: c([
485
+ "hison-modal-wrapper",
486
+ ...e.responsiveClassList
487
+ ]),
488
+ style: re(e.wrapperStyle)
489
+ }, [
490
+ ze("div", {
491
+ ref: "modalRef",
492
+ class: c([
493
+ "hison-modal",
494
+ e.borderClass,
495
+ e.backgroundTypeClass
496
+ ]),
497
+ style: re(e.props.style),
498
+ role: "dialog"
499
+ }, [
500
+ e.headerVisibleComputed ? (u(), m(p, {
501
+ key: 0,
502
+ id: `hison_modal_header_layout_${e.id}`,
503
+ class: c(["hison-modal-header", ...e.childClassList])
504
+ }, {
505
+ default: d(() => [
506
+ e.$slots.header ? r(e.$slots, "header", { key: 0 }) : (u(), C(B, { key: 1 }, [
507
+ e.headerHasLeft ? (u(), C(B, { key: 0 }, [
508
+ e.showHeaderCaptionLeft ? (u(), m(k, {
509
+ key: 0,
510
+ id: `hison_modal_caption_label_${e.id}`,
511
+ class: c(["hison-modal-caption", "hison-pos-left", "hison-pos-vertical-center", ...e.childClassList]),
512
+ text: e.caption ?? "",
513
+ border: e.captionBorder,
514
+ "background-type": e.captionBackgroundType
515
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
516
+ e.showHeaderCloseLeft ? r(e.$slots, "close-button", {
517
+ key: 1,
518
+ onClick: e.onClickCloseButton,
519
+ text: e.closeButtonText,
520
+ title: e.closeButtonTitle || "Close",
521
+ placement: "header-left"
522
+ }, () => [
523
+ H(i, {
524
+ id: `hison_modal_close_button_${e.id}`,
525
+ class: c(["hison-modal-close-btn", "hison-pos-left", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
526
+ text: e.closeButtonText,
527
+ title: e.closeButtonTitle || "Close",
528
+ border: e.closeButtonBorder,
529
+ "background-type": e.closeButtonBackgroundType,
530
+ onClick: e.onClickCloseButton
531
+ }, A({
532
+ default: d(() => [
533
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
534
+ ]),
535
+ _: 2
536
+ }, [
537
+ e.$slots["close-icon"] ? {
538
+ name: "icon",
539
+ fn: d(() => [
540
+ r(e.$slots, "close-icon")
541
+ ]),
542
+ key: "0"
543
+ } : void 0
544
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
545
+ ]) : s("", !0)
546
+ ], 64)) : s("", !0),
547
+ e.headerHasCenter ? (u(), C(B, { key: 1 }, [
548
+ e.showHeaderCaptionCenter ? (u(), m(k, {
549
+ key: 0,
550
+ id: `hison_modal_caption_label_${e.id}`,
551
+ class: c(["hison-modal-caption", "hison-pos-center", "hison-pos-vertical-center", ...e.childClassList]),
552
+ text: e.caption ?? "",
553
+ border: e.captionBorder,
554
+ "background-type": e.captionBackgroundType
555
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
556
+ e.showHeaderCloseCenter ? r(e.$slots, "close-button", {
557
+ key: 1,
558
+ onClick: e.onClickCloseButton,
559
+ text: e.closeButtonText,
560
+ title: e.closeButtonTitle || "Close",
561
+ placement: "header-center"
562
+ }, () => [
563
+ H(i, {
564
+ id: `hison_modal_close_button_${e.id}`,
565
+ class: c(["hison-modal-close-btn", "hison-pos-center", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
566
+ text: e.closeButtonText,
567
+ title: e.closeButtonTitle || "Close",
568
+ border: e.closeButtonBorder,
569
+ "background-type": e.closeButtonBackgroundType,
570
+ onClick: e.onClickCloseButton
571
+ }, A({
572
+ default: d(() => [
573
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
574
+ ]),
575
+ _: 2
576
+ }, [
577
+ e.$slots["close-icon"] ? {
578
+ name: "icon",
579
+ fn: d(() => [
580
+ r(e.$slots, "close-icon")
581
+ ]),
582
+ key: "0"
583
+ } : void 0
584
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
585
+ ]) : s("", !0)
586
+ ], 64)) : s("", !0),
587
+ e.headerHasRight ? (u(), C(B, { key: 2 }, [
588
+ e.showHeaderCaptionRight ? (u(), m(k, {
589
+ key: 0,
590
+ id: `hison_modal_caption_label_${e.id}`,
591
+ class: c(["hison-modal-caption", "hison-pos-right", "hison-pos-vertical-center", ...e.childClassList]),
592
+ text: e.caption ?? "",
593
+ border: e.captionBorder,
594
+ "background-type": e.captionBackgroundType
595
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
596
+ e.showHeaderCloseRight ? r(e.$slots, "close-button", {
597
+ key: 1,
598
+ onClick: e.onClickCloseButton,
599
+ text: e.closeButtonText,
600
+ title: e.closeButtonTitle || "Close",
601
+ placement: "header-right"
602
+ }, () => [
603
+ H(i, {
604
+ id: `hison_modal_close_button_${e.id}`,
605
+ class: c(["hison-modal-close-btn", "hison-pos-right", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
606
+ text: e.closeButtonText,
607
+ title: e.closeButtonTitle || "Close",
608
+ border: e.closeButtonBorder,
609
+ "background-type": e.closeButtonBackgroundType,
610
+ onClick: e.onClickCloseButton
611
+ }, A({
612
+ default: d(() => [
613
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
614
+ ]),
615
+ _: 2
616
+ }, [
617
+ e.$slots["close-icon"] ? {
618
+ name: "icon",
619
+ fn: d(() => [
620
+ r(e.$slots, "close-icon")
621
+ ]),
622
+ key: "0"
623
+ } : void 0
624
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
625
+ ]) : s("", !0)
626
+ ], 64)) : s("", !0)
627
+ ], 64))
628
+ ]),
629
+ _: 3
630
+ }, 8, ["id", "class"])) : s("", !0),
631
+ H(p, {
632
+ id: `hison_modal_body_layout_${e.id}`,
633
+ class: c(["hison-modal-body", ...e.childClassList])
634
+ }, {
635
+ default: d(() => [
636
+ r(e.$slots, "default")
637
+ ]),
638
+ _: 3
639
+ }, 8, ["id", "class"]),
640
+ e.footerVisibleComputed ? (u(), m(p, {
641
+ key: 1,
642
+ id: `hison_modal_footer_layout_${e.id}`,
643
+ class: c(["hison-modal-footer", ...e.childClassList])
644
+ }, {
645
+ default: d(() => [
646
+ e.$slots.footer ? r(e.$slots, "footer", { key: 0 }) : (u(), C(B, { key: 1 }, [
647
+ e.footerHasLeft ? (u(), C(B, { key: 0 }, [
648
+ e.showFooterCaptionLeft ? (u(), m(k, {
649
+ key: 0,
650
+ id: `hison_modal_caption_label_${e.id}`,
651
+ class: c(["hison-modal-caption", "hison-pos-left", "hison-pos-vertical-center", ...e.childClassList]),
652
+ text: e.caption ?? "",
653
+ border: e.captionBorder,
654
+ "background-type": e.captionBackgroundType
655
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
656
+ e.showFooterCloseLeft ? r(e.$slots, "close-button", {
657
+ key: 1,
658
+ onClick: e.onClickCloseButton,
659
+ text: e.closeButtonText,
660
+ title: e.closeButtonTitle || "Close",
661
+ placement: "footer-left"
662
+ }, () => [
663
+ H(i, {
664
+ id: `hison_modal_close_button_${e.id}`,
665
+ class: c(["hison-modal-close-btn", "hison-pos-left", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
666
+ text: e.closeButtonText,
667
+ title: e.closeButtonTitle || "Close",
668
+ border: e.closeButtonBorder,
669
+ "background-type": e.closeButtonBackgroundType,
670
+ onClick: e.onClickCloseButton
671
+ }, A({
672
+ default: d(() => [
673
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
674
+ ]),
675
+ _: 2
676
+ }, [
677
+ e.$slots["close-icon"] ? {
678
+ name: "icon",
679
+ fn: d(() => [
680
+ r(e.$slots, "close-icon")
681
+ ]),
682
+ key: "0"
683
+ } : void 0
684
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
685
+ ]) : s("", !0)
686
+ ], 64)) : s("", !0),
687
+ e.footerHasCenter ? (u(), C(B, { key: 1 }, [
688
+ e.showFooterCaptionCenter ? (u(), m(k, {
689
+ key: 0,
690
+ id: `hison_modal_caption_label_${e.id}`,
691
+ class: c(["hison-modal-caption", "hison-pos-center", "hison-pos-vertical-center", ...e.childClassList]),
692
+ text: e.caption ?? "",
693
+ border: e.captionBorder,
694
+ "background-type": e.captionBackgroundType
695
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
696
+ e.showFooterCloseCenter ? r(e.$slots, "close-button", {
697
+ key: 1,
698
+ onClick: e.onClickCloseButton,
699
+ text: e.closeButtonText,
700
+ title: e.closeButtonTitle || "Close",
701
+ placement: "footer-center"
702
+ }, () => [
703
+ H(i, {
704
+ id: `hison_modal_close_button_${e.id}`,
705
+ class: c(["hison-modal-close-btn", "hison-pos-center", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
706
+ text: e.closeButtonText,
707
+ title: e.closeButtonTitle || "Close",
708
+ border: e.closeButtonBorder,
709
+ "background-type": e.closeButtonBackgroundType,
710
+ onClick: e.onClickCloseButton
711
+ }, A({
712
+ default: d(() => [
713
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
714
+ ]),
715
+ _: 2
716
+ }, [
717
+ e.$slots["close-icon"] ? {
718
+ name: "icon",
719
+ fn: d(() => [
720
+ r(e.$slots, "close-icon")
721
+ ]),
722
+ key: "0"
723
+ } : void 0
724
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
725
+ ]) : s("", !0)
726
+ ], 64)) : s("", !0),
727
+ e.footerHasRight ? (u(), C(B, { key: 2 }, [
728
+ e.showFooterCaptionRight ? (u(), m(k, {
729
+ key: 0,
730
+ id: `hison_modal_caption_label_${e.id}`,
731
+ class: c(["hison-modal-caption", "hison-pos-right", "hison-pos-vertical-center", ...e.childClassList]),
732
+ text: e.caption ?? "",
733
+ border: e.captionBorder,
734
+ "background-type": e.captionBackgroundType
735
+ }, null, 8, ["id", "class", "text", "border", "background-type"])) : s("", !0),
736
+ e.showFooterCloseRight ? r(e.$slots, "close-button", {
737
+ key: 1,
738
+ onClick: e.onClickCloseButton,
739
+ text: e.closeButtonText,
740
+ title: e.closeButtonTitle || "Close",
741
+ placement: "footer-right"
742
+ }, () => [
743
+ H(i, {
744
+ id: `hison_modal_close_button_${e.id}`,
745
+ class: c(["hison-modal-close-btn", "hison-pos-right", "hison-pos-vertical-center", "hison-size-s", "hison-color-danger"]),
746
+ text: e.closeButtonText,
747
+ title: e.closeButtonTitle || "Close",
748
+ border: e.closeButtonBorder,
749
+ "background-type": e.closeButtonBackgroundType,
750
+ onClick: e.onClickCloseButton
751
+ }, A({
752
+ default: d(() => [
753
+ e.$slots["close-label"] ? r(e.$slots, "close-label", { key: 0 }) : s("", !0)
754
+ ]),
755
+ _: 2
756
+ }, [
757
+ e.$slots["close-icon"] ? {
758
+ name: "icon",
759
+ fn: d(() => [
760
+ r(e.$slots, "close-icon")
761
+ ]),
762
+ key: "0"
763
+ } : void 0
764
+ ]), 1032, ["id", "text", "title", "border", "background-type", "onClick"])
765
+ ]) : s("", !0)
766
+ ], 64)) : s("", !0)
767
+ ], 64))
768
+ ]),
769
+ _: 3
770
+ }, 8, ["id", "class"])) : s("", !0)
771
+ ], 6)
772
+ ], 6)
773
+ ], 2);
774
+ }
775
+ const po = /* @__PURE__ */ uo(vo, [["render", ho]]);
776
+ export {
777
+ po as default
778
+ };