hisonvue 1.1.16 → 1.1.18

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 (61) hide show
  1. package/dist/{HAccordion-lIL8UGRX.mjs → HAccordion-DcBSqGEg.mjs} +2 -2
  2. package/dist/{HAccordion-siQaLAoK.js → HAccordion-kLooMayD.js} +1 -1
  3. package/dist/{HBaggie-Cs_-3k4M.mjs → HBaggie-C6f9nC4M.mjs} +2 -2
  4. package/dist/{HBaggie-D1vkaljq.js → HBaggie-uyGznd4G.js} +1 -1
  5. package/dist/{HBanner-BqBIINgJ.mjs → HBanner-BJxs-91M.mjs} +2 -2
  6. package/dist/{HBanner-C8vF-YOX.js → HBanner-BlFnKTdl.js} +1 -1
  7. package/dist/{HButton-C6snZhs5.js → HButton-C0B-GYLI.js} +1 -1
  8. package/dist/{HButton-BUY3zQMk.mjs → HButton-C_VAbACh.mjs} +2 -2
  9. package/dist/{HCalendar-BqyfeGfZ.mjs → HCalendar-Db6pocNb.mjs} +1 -1
  10. package/dist/{HCalendar-S2Bgjnyy.js → HCalendar-FpKn-Qqp.js} +1 -1
  11. package/dist/{HCaption-icMp3A1j.mjs → HCaption-DrFvAUQk.mjs} +1 -1
  12. package/dist/{HCaption-BBkA5LCw.js → HCaption-Ro_KdpAz.js} +1 -1
  13. package/dist/{HChart-BDnVqO99.js → HChart-Cc8h6tul.js} +1 -1
  14. package/dist/{HChart-BjpuQd29.mjs → HChart-pHv4-Pox.mjs} +1 -1
  15. package/dist/{HDrawer-B6M4eOq5.mjs → HDrawer-BeWd8Wqh.mjs} +1 -1
  16. package/dist/{HDrawer-D3JaNCUq.js → HDrawer-CSD8eE9O.js} +1 -1
  17. package/dist/{HDropdown-DHIEnS5Q.js → HDropdown-B6GgKbRK.js} +1 -1
  18. package/dist/{HDropdown-CIf0ARhc.mjs → HDropdown-DL50k2zB.mjs} +2 -2
  19. package/dist/{HFileset-BHCZQ0y0.js → HFileset-Bv4JMkL8.js} +1 -1
  20. package/dist/{HFileset-D9t9qsVS.mjs → HFileset-CZUHl9uC.mjs} +1 -1
  21. package/dist/{HGap-B0xx04DS.js → HGap-DpEsjxzv.js} +1 -1
  22. package/dist/{HGap-TNS70G9l.mjs → HGap-L0rf1Utr.mjs} +1 -1
  23. package/dist/{HGrid-B8Kp5qcZ.js → HGrid-DARQl-Gk.js} +1 -1
  24. package/dist/{HGrid-DWkk1uo9.mjs → HGrid-WldfaDhY.mjs} +1 -1
  25. package/dist/{HImagebox-IvXpEWz7.mjs → HImagebox-BHo9AsJn.mjs} +1 -1
  26. package/dist/{HImagebox-BOCLg6NX.js → HImagebox-BWYB9zcy.js} +1 -1
  27. package/dist/{HInput-Cupw-34B.js → HInput-ChxKbM9j.js} +1 -1
  28. package/dist/{HInput-DNJ-iBPP.mjs → HInput-DpyeWPGZ.mjs} +1 -1
  29. package/dist/{HInputGroup-ByBCd1j0.mjs → HInputGroup-BT8F4jcD.mjs} +20 -20
  30. package/dist/HInputGroup-DVVfCSIz.js +1 -0
  31. package/dist/{HLabel-EopKJw5B.js → HLabel-B34Wc_Et.js} +1 -1
  32. package/dist/{HLabel-4caR33Aw.mjs → HLabel-BsnPOH8t.mjs} +2 -2
  33. package/dist/{HLayout-BA4T709Y.mjs → HLayout-CHXrR60F.mjs} +1 -1
  34. package/dist/{HLayout-CPflD0kD.js → HLayout-DPJSRuCg.js} +1 -1
  35. package/dist/HList-CmfFvcuV.mjs +483 -0
  36. package/dist/HList-DDnoVe5Q.js +1 -0
  37. package/dist/{HModal-B9aHgVnm.js → HModal-Dg2g4Cbj.js} +1 -1
  38. package/dist/{HModal-bSdg1ZT7.mjs → HModal-Dsx3vGwQ.mjs} +1 -1
  39. package/dist/{HNote-BmesZ9Ck.mjs → HNote-CRQqzs_u.mjs} +1 -1
  40. package/dist/{HNote-Da3cC4ai.js → HNote-D5rrvhzJ.js} +1 -1
  41. package/dist/{HPagination-updh8eau.js → HPagination-CVrBuswv.js} +1 -1
  42. package/dist/{HPagination-y7RJYSLp.mjs → HPagination-qWDN1YCK.mjs} +2 -2
  43. package/dist/{HParagraph-B5RcWI99.mjs → HParagraph-B1LMahEG.mjs} +1 -1
  44. package/dist/{HParagraph-BvVvWc_u.js → HParagraph-qW919L3G.js} +1 -1
  45. package/dist/{HPopup-BLcY7Y6L.mjs → HPopup-5Eo5ywZ0.mjs} +1 -1
  46. package/dist/{HPopup-Bi4aRzJy.js → HPopup-Dr9lLgvw.js} +1 -1
  47. package/dist/{HSpinner-7L5221AE.mjs → HSpinner-Br78DP-B.mjs} +1 -1
  48. package/dist/{HSpinner-B-PBVfju.js → HSpinner-DiYsVDQ1.js} +1 -1
  49. package/dist/{HTable-D3ATeV4m.mjs → HTable-B7BQBLCX.mjs} +1 -1
  50. package/dist/{HTable-C7CzkJ4v.js → HTable-BLzHQoXE.js} +1 -1
  51. package/dist/hisonvue.cjs.js +1 -1
  52. package/dist/hisonvue.d.ts +53 -0
  53. package/dist/hisonvue.es.js +2 -2
  54. package/dist/{index-Bg8WW8Oo.js → index-BMv0zuHq.js} +1 -1
  55. package/dist/{index-DFLqS2VX.mjs → index-CwT_wDHc.mjs} +1 -1
  56. package/dist/{setButtonCssEvent-GeMZtIKH.mjs → setButtonCssEvent-B3VPjEgJ.mjs} +1 -1
  57. package/dist/{setButtonCssEvent-QUBf_KD8.js → setButtonCssEvent-CH5pxVea.js} +1 -1
  58. package/package.json +1 -1
  59. package/dist/HInputGroup-BaA5OQHo.js +0 -1
  60. package/dist/HList-BA92wY3G.mjs +0 -419
  61. package/dist/HList-BpZwIQOr.js +0 -1
@@ -1,419 +0,0 @@
1
- import { defineComponent as ye, ref as o, computed as f, onMounted as ce, onBeforeUnmount as be, watch as r, Comment as ge, Text as pe, Fragment as U, nextTick as Y, createElementBlock as u, openBlock as i, normalizeClass as H, createBlock as J, resolveDynamicComponent as Q, withKeys as W, normalizeStyle as z, withModifiers as X, withCtx as he, renderList as Z, createElementVNode as D, createCommentVNode as x, toDisplayString as w, renderSlot as ke } from "vue";
2
- import { B as _, f as c, g as Ie, u as Ce, e as Te, t as Be, b as ee, h as E, r as Le, c as Se, d as we } from "./index-DFLqS2VX.mjs";
3
- import { r as te, a as Ee } from "./setButtonCssEvent-GeMZtIKH.mjs";
4
- import { _ as Me } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
5
- const Ae = {
6
- /**
7
- * Unique identifier for the list.
8
- * - Access methods via `hison.component.getList(id)`
9
- * - Duplicate `id` will throw at mount time
10
- */
11
- id: { type: String, required: !1 },
12
- /**
13
- * Custom class applied to the wrapper (string / array / object).
14
- * - Works with responsive classes like `hison-col-*`, `hison-size-*`, `hison-color-*`, etc.
15
- */
16
- class: {
17
- type: [String, Array, Object],
18
- required: !1
19
- },
20
- /**
21
- * Inline style for the root list container.
22
- */
23
- style: {
24
- type: [String, Object, Array],
25
- required: !1
26
- },
27
- /**
28
- * Inline style for the root list container.
29
- */
30
- listItemStyle: {
31
- type: [String, Object, Array],
32
- required: !1
33
- },
34
- /**
35
- * Inline style for the root list container.
36
- */
37
- listItemInnerStyle: {
38
- type: [String, Object, Array],
39
- required: !1
40
- },
41
- /**
42
- * Controls visibility of the list.
43
- */
44
- visible: { type: Boolean, default: !0 },
45
- /**
46
- * Overall border (box-shadow) for the list container.
47
- */
48
- border: { type: Boolean, default: !1 },
49
- /**
50
- * Whether each list item (`li`) shows border (box-shadow).
51
- */
52
- listBorder: { type: Boolean, default: !1 },
53
- /**
54
- * Background type of the list container.
55
- * - 'filled' | 'empty' | 'transparent'
56
- * - Default: 'empty'
57
- */
58
- backgroundType: {
59
- type: String,
60
- default: c.empty,
61
- validator: (t) => _.includes(t)
62
- },
63
- /**
64
- * Background type of each list item (`li`).
65
- * - 'filled' | 'empty' | 'transparent'
66
- * - Default: 'empty'
67
- */
68
- listBackgroundType: {
69
- type: String,
70
- default: c.empty,
71
- validator: (t) => _.includes(t)
72
- },
73
- /**
74
- * Choose underlying list tag: 'ul' or 'ol'.
75
- */
76
- listType: {
77
- type: String,
78
- default: "ul",
79
- validator: (t) => t === "ul" || t === "ol"
80
- },
81
- /**
82
- * When listType='ul', the bullet character shown inside each item (instead of native marker).
83
- * - Ignored if `showMarker=false`
84
- */
85
- bulletChar: { type: String, default: "•" },
86
- /**
87
- * Show marker on each item
88
- * - 'ol' → index+1
89
- * - 'ul' → bulletChar
90
- */
91
- showMarker: { type: Boolean, default: !0 },
92
- /**
93
- * Text list data. Used when:
94
- * - default slot is absent, OR
95
- * - default slot is present but composed of text-only nodes (no element vnode).
96
- *
97
- * If `#item` scoped slot is provided, it will be used to render each item with props `{ item, index }`.
98
- */
99
- textList: {
100
- type: Array,
101
- default: () => []
102
- },
103
- /**
104
- * NEW: Attach textbox-like CSS events (+ emit) to each item.
105
- * - true : bind addButtonCssEvent to `.hison-list-item-inner` and emit interaction events
106
- * - false: unbind and do not emit
107
- */
108
- addEvent: { type: Boolean, default: !1 },
109
- /**
110
- * Controls keyboard focus order of the element.
111
- * - `0` enables natural tab navigation, positive numbers set custom order.
112
- * - `null` or `''` removes tabindex (not focusable).
113
- * The same tabIndex is inserted into the list items.
114
- */
115
- tabIndex: {
116
- type: [Number, String],
117
- default: null,
118
- validator: (t) => t === null || t === "" || !isNaN(+t) && isFinite(+t)
119
- }
120
- }, Re = ye({
121
- name: "HList",
122
- props: Ae,
123
- inheritAttrs: !1,
124
- emits: ["mounted", "responsive-change", "click", "mousedown", "mouseup", "mouseover", "mouseout"],
125
- setup(t, { emit: n, slots: M }) {
126
- const V = o(null), d = o([]), A = o([]), a = t.id ? t.id : Ie(), v = `hlist:${a}`, l = Ce(), p = o(null), h = o(t.visible), se = f(() => h.value ? "" : "hison-display-none"), b = o(t.listType || "ul"), k = o(t.bulletChar || "•"), I = o(t.showMarker !== !1), C = o(t.border ?? !1), T = o(t.listBorder ?? !1), B = o(t.backgroundType || c.empty), L = o(t.listBackgroundType || c.empty), y = o(!!t.addEvent), ne = f(() => C.value ? "hison-border" : ""), le = f(() => T.value ? "hison-border" : ""), oe = f(() => {
127
- switch (B.value) {
128
- case c.empty:
129
- return "hison-bg-empty";
130
- case c.transparent:
131
- return "hison-bg-transparent";
132
- default:
133
- return "hison-bg-filled";
134
- }
135
- }), re = f(() => {
136
- switch (L.value) {
137
- case c.empty:
138
- return "hison-bg-empty";
139
- case c.transparent:
140
- return "hison-bg-transparent";
141
- default:
142
- return "hison-bg-filled";
143
- }
144
- }), ie = f(() => {
145
- var e;
146
- return ((e = M.default) == null ? void 0 : e.call(M)) ?? [];
147
- }), g = o(
148
- t.tabIndex !== null && t.tabIndex !== "" ? Number(t.tabIndex) : null
149
- ), j = (e, s = []) => {
150
- if (!e || e.length === 0) return s;
151
- for (const m of e)
152
- if (m.type !== ge && m.type !== pe)
153
- if (m.type === U) {
154
- const $ = m.children;
155
- j($, s);
156
- } else
157
- s.push(m);
158
- return s;
159
- }, q = f(() => j(ie.value)), ae = f(() => q.value.length > 0), R = o(
160
- Array.isArray(t.textList) ? t.textList : []
161
- ), K = f(() => R.value ?? []), ue = f(() => b.value), N = o([]), O = () => {
162
- N.value = Te(Be(t.class) || "", l.value), ee(N.value, "size", E.componentStyle.size), ee(N.value, "color", "primary");
163
- }, S = (e = !0) => {
164
- Y(() => {
165
- d.value.forEach((s) => {
166
- s && (te(s), e && y.value && Ee(s));
167
- });
168
- });
169
- }, de = (e) => {
170
- y.value && n("click", e, p.value);
171
- }, me = (e, s) => {
172
- y.value && n(e, s, p.value);
173
- }, F = () => {
174
- E.component.listList[a] && E.component.listList[a].isHisonvueComponent && console.warn(`[Hisonvue] The list ID is at risk of being duplicated. ${a}`), Le(v, () => {
175
- P(), Y(F);
176
- }), O(), S(!0), p.value = {
177
- isHisonvueComponent: !0,
178
- getId: () => a,
179
- getType: () => "list",
180
- isVisible: () => h.value,
181
- setVisible: (e) => {
182
- h.value = e;
183
- },
184
- getListType: () => b.value,
185
- setListType: (e) => {
186
- b.value = e;
187
- },
188
- isShowMarker: () => I.value,
189
- setShowMarker: (e) => {
190
- I.value = e;
191
- },
192
- getBulletChar: () => k.value,
193
- setBulletChar: (e) => {
194
- k.value = e;
195
- },
196
- isBorder: () => C.value,
197
- setBorder: (e) => {
198
- C.value = e;
199
- },
200
- isListBorder: () => T.value,
201
- setListBorder: (e) => {
202
- T.value = e;
203
- },
204
- getBackgroundType: () => B.value,
205
- setBackgroundType: (e) => {
206
- B.value = e;
207
- },
208
- getListBackgroundType: () => L.value,
209
- setListBackgroundType: (e) => {
210
- L.value = e;
211
- },
212
- getTextList: () => [...K.value],
213
- setTextList: (e) => {
214
- R.value = Array.isArray(e) ? e : [];
215
- },
216
- isAddEvent: () => y.value,
217
- setAddEvent: (e) => {
218
- y.value = !!e, S(!0);
219
- },
220
- getTabIndex: () => g.value,
221
- setTabIndex: (e) => {
222
- g.value = e != null ? Number(e) : null;
223
- },
224
- getListRowCount: () => d.value.length,
225
- getListItem: (e) => !Number.isInteger(e) || e < 0 || e >= d.value.length ? null : d.value[e] ?? null,
226
- focus: (e = 0) => {
227
- var $;
228
- if (!y.value) return;
229
- const s = g.value;
230
- if (s == null || s === -1 || !Number.isInteger(e) || e < 0 || e >= d.value.length) return;
231
- const m = d.value[e];
232
- ($ = m == null ? void 0 : m.focus) == null || $.call(m);
233
- },
234
- reload: () => Se(v)
235
- }, E.component.listList[a] = p.value, n("mounted", p.value);
236
- }, P = () => {
237
- we(v), d.value.forEach((e) => e && te(e)), delete E.component.listList[a];
238
- };
239
- ce(F), be(P);
240
- const G = (e) => {
241
- if (!e) return null;
242
- if (e instanceof Element) return e;
243
- const s = e.$el;
244
- return s instanceof Element ? s : null;
245
- }, ve = (e) => {
246
- const s = G(e);
247
- s && (d.value.includes(s) || d.value.push(s));
248
- }, fe = (e) => {
249
- const s = G(e);
250
- s && (A.value.includes(s) || A.value.push(s));
251
- };
252
- return r(l, (e) => {
253
- O(), n("responsive-change", e);
254
- }), r(() => t.visible, (e) => {
255
- const s = !!e;
256
- s !== h.value && (h.value = s);
257
- }), r(() => t.border, (e) => {
258
- const s = !!e;
259
- s !== C.value && (C.value = s);
260
- }), r(() => t.listBorder, (e) => {
261
- const s = !!e;
262
- s !== T.value && (T.value = s);
263
- }), r(() => t.backgroundType, (e) => {
264
- e && e !== B.value && (B.value = e);
265
- }), r(() => t.listBackgroundType, (e) => {
266
- e && e !== L.value && (L.value = e);
267
- }), r(() => t.listType, (e) => {
268
- const s = e === "ol" ? "ol" : "ul";
269
- s !== b.value && (b.value = s);
270
- }), r(() => t.bulletChar, (e) => {
271
- const s = e ?? "•";
272
- s !== k.value && (k.value = s);
273
- }), r(() => t.showMarker, (e) => {
274
- const s = e !== !1;
275
- s !== I.value && (I.value = s);
276
- }), r(() => t.textList, (e) => {
277
- R.value = Array.isArray(e) ? e : [];
278
- }), r(() => t.addEvent, (e) => {
279
- const s = !!e;
280
- s !== y.value && (y.value = s, S(!0));
281
- }), r(() => t.tabIndex, (e) => {
282
- const s = e === null || e === "" ? null : Number(e);
283
- s !== g.value && (g.value = s);
284
- }), r(() => t.class, () => {
285
- O();
286
- }), r(q, () => {
287
- S(!0);
288
- }), r(R, () => {
289
- S(!0);
290
- }, { deep: !0 }), {
291
- props: t,
292
- listRef: V,
293
- itemRefs: d,
294
- itemInnerRefs: A,
295
- renderTag: ue,
296
- listType: b,
297
- bulletChar: k,
298
- showMarker: I,
299
- visibleClass: se,
300
- borderClass: ne,
301
- listBorderClass: le,
302
- backgroundTypeClass: oe,
303
- listBackgroundTypeClass: re,
304
- responsiveClassList: N,
305
- hasElementSlot: ae,
306
- elementNodes: q,
307
- normalizedItems: K,
308
- tabIndex: g,
309
- setItemRef: ve,
310
- setItemInnerRef: fe,
311
- onItemClick: de,
312
- emitItem: me
313
- };
314
- }
315
- }), Ne = ["tabindex"], $e = {
316
- key: 0,
317
- class: "hison-list-marker"
318
- }, He = { key: 0 }, ze = { key: 1 }, De = { class: "hison-list-content" }, qe = ["tabindex"], Oe = {
319
- key: 0,
320
- class: "hison-list-marker"
321
- }, Ue = { key: 0 }, Ve = { key: 1 }, je = { class: "hison-list-content" }, Ke = {
322
- key: 1,
323
- class: "hison-list-item-text"
324
- };
325
- function Fe(t, n, M, V, d, A) {
326
- return i(), u("div", {
327
- class: H([
328
- "hison-wrapper",
329
- ...t.responsiveClassList,
330
- t.visibleClass
331
- ])
332
- }, [
333
- (i(), J(Q(t.renderTag), {
334
- ref: "listRef",
335
- class: H([
336
- "hison-list",
337
- t.borderClass,
338
- t.backgroundTypeClass
339
- ]),
340
- style: z(t.props.style),
341
- onKeydown: [
342
- W(X(t.onItemClick, ["prevent"]), ["enter"]),
343
- W(X(t.onItemClick, ["prevent"]), ["space"])
344
- ]
345
- }, {
346
- default: he(() => [
347
- t.hasElementSlot ? (i(!0), u(U, { key: 0 }, Z(t.elementNodes, (a, v) => (i(), u("li", {
348
- key: v,
349
- class: H([
350
- "hison-list-item",
351
- t.listBorderClass,
352
- t.listBackgroundTypeClass
353
- ]),
354
- style: z(t.props.listItemStyle),
355
- ref_for: !0,
356
- ref: t.setItemRef,
357
- tabindex: t.tabIndex ?? void 0,
358
- onClick: n[0] || (n[0] = (...l) => t.onItemClick && t.onItemClick(...l)),
359
- onMousedown: n[1] || (n[1] = (l) => t.emitItem("mousedown", l)),
360
- onMouseup: n[2] || (n[2] = (l) => t.emitItem("mouseup", l)),
361
- onMouseover: n[3] || (n[3] = (l) => t.emitItem("mouseover", l)),
362
- onMouseout: n[4] || (n[4] = (l) => t.emitItem("mouseout", l))
363
- }, [
364
- D("div", {
365
- class: "hison-list-item-inner",
366
- style: z(t.props.listItemInnerStyle),
367
- ref_for: !0,
368
- ref: t.setItemInnerRef
369
- }, [
370
- t.showMarker ? (i(), u("div", $e, [
371
- t.listType === "ol" ? (i(), u("span", He, w(v + 1) + ".", 1)) : (i(), u("span", ze, w(t.bulletChar), 1))
372
- ])) : x("", !0),
373
- D("div", De, [
374
- (i(), J(Q(a)))
375
- ])
376
- ], 4)
377
- ], 46, Ne))), 128)) : (i(!0), u(U, { key: 1 }, Z(t.normalizedItems, (a, v) => (i(), u("li", {
378
- key: v,
379
- class: H([
380
- "hison-list-item",
381
- t.listBorderClass,
382
- t.listBackgroundTypeClass
383
- ]),
384
- ref_for: !0,
385
- ref: t.setItemRef,
386
- tabindex: t.tabIndex ?? void 0,
387
- onClick: n[5] || (n[5] = (...l) => t.onItemClick && t.onItemClick(...l)),
388
- onMousedown: n[6] || (n[6] = (l) => t.emitItem("mousedown", l)),
389
- onMouseup: n[7] || (n[7] = (l) => t.emitItem("mouseup", l)),
390
- onMouseover: n[8] || (n[8] = (l) => t.emitItem("mouseover", l)),
391
- onMouseout: n[9] || (n[9] = (l) => t.emitItem("mouseout", l))
392
- }, [
393
- D("div", {
394
- class: "hison-list-item-inner",
395
- style: z(t.props.listItemInnerStyle),
396
- ref_for: !0,
397
- ref: t.setItemInnerRef
398
- }, [
399
- t.showMarker ? (i(), u("div", Oe, [
400
- t.listType === "ol" ? (i(), u("span", Ue, w(v + 1) + ".", 1)) : (i(), u("span", Ve, w(t.bulletChar), 1))
401
- ])) : x("", !0),
402
- D("div", je, [
403
- t.$slots.item ? ke(t.$slots, "item", {
404
- key: 0,
405
- item: a,
406
- index: v
407
- }) : (i(), u("span", Ke, w(String(a ?? "")), 1))
408
- ])
409
- ], 4)
410
- ], 42, qe))), 128))
411
- ]),
412
- _: 3
413
- }, 40, ["class", "style", "onKeydown"]))
414
- ], 2);
415
- }
416
- const Qe = /* @__PURE__ */ Me(Re, [["render", Fe]]);
417
- export {
418
- Qe as default
419
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-Bg8WW8Oo.js"),N=require("./setButtonCssEvent-QUBf_KD8.js"),W=require("./_plugin-vue_export-helper-BHFhmbuH.js"),X={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},listItemStyle:{type:[String,Object,Array],required:!1},listItemInnerStyle:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},border:{type:Boolean,default:!1},listBorder:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listBackgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},listType:{type:String,default:"ul",validator:n=>n==="ul"||n==="ol"},bulletChar:{type:String,default:"•"},showMarker:{type:Boolean,default:!0},textList:{type:Array,default:()=>[]},addEvent:{type:Boolean,default:!1},tabIndex:{type:[Number,String],default:null,validator:n=>n===null||n===""||!isNaN(+n)&&isFinite(+n)}},Z=e.defineComponent({name:"HList",props:X,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(n,{emit:l,slots:I}){const A=e.ref(null),i=e.ref([]),T=e.ref([]),a=n.id?n.id:o.getUUID(),d=`hlist:${a}`,r=o.useDevice(),v=e.ref(null),y=e.ref(n.visible),$=e.computed(()=>y.value?"":"hison-display-none"),m=e.ref(n.listType||"ul"),p=e.ref(n.bulletChar||"•"),k=e.ref(n.showMarker!==!1),g=e.ref(n.border??!1),h=e.ref(n.listBorder??!1),B=e.ref(n.backgroundType||o.BackgroundType.empty),b=e.ref(n.listBackgroundType||o.BackgroundType.empty),c=e.ref(!!n.addEvent),H=e.computed(()=>g.value?"hison-border":""),O=e.computed(()=>h.value?"hison-border":""),U=e.computed(()=>{switch(B.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),K=e.computed(()=>{switch(b.value){case o.BackgroundType.empty:return"hison-bg-empty";case o.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),j=e.computed(()=>{var t;return((t=I.default)==null?void 0:t.call(I))??[]}),f=e.ref(n.tabIndex!==null&&n.tabIndex!==""?Number(n.tabIndex):null),R=(t,s=[])=>{if(!t||t.length===0)return s;for(const u of t)if(u.type!==e.Comment&&u.type!==e.Text)if(u.type===e.Fragment){const S=u.children;R(S,s)}else s.push(u);return s},L=e.computed(()=>R(j.value)),F=e.computed(()=>L.value.length>0),w=e.ref(Array.isArray(n.textList)?n.textList:[]),z=e.computed(()=>w.value??[]),P=e.computed(()=>m.value),E=e.ref([]),M=()=>{E.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",r.value),o.addComponentNameToClass(E.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(E.value,"color","primary")},C=(t=!0)=>{e.nextTick(()=>{i.value.forEach(s=>{s&&(N.removeButtonCssEvent(s),t&&c.value&&N.addButtonCssEvent(s))})})},G=t=>{c.value&&l("click",t,v.value)},Y=(t,s)=>{c.value&&l(t,s,v.value)},D=()=>{o.hisonCloser.component.listList[a]&&o.hisonCloser.component.listList[a].isHisonvueComponent&&console.warn(`[Hisonvue] The list ID is at risk of being duplicated. ${a}`),o.registerReloadable(d,()=>{V(),e.nextTick(D)}),M(),C(!0),v.value={isHisonvueComponent:!0,getId:()=>a,getType:()=>"list",isVisible:()=>y.value,setVisible:t=>{y.value=t},getListType:()=>m.value,setListType:t=>{m.value=t},isShowMarker:()=>k.value,setShowMarker:t=>{k.value=t},getBulletChar:()=>p.value,setBulletChar:t=>{p.value=t},isBorder:()=>g.value,setBorder:t=>{g.value=t},isListBorder:()=>h.value,setListBorder:t=>{h.value=t},getBackgroundType:()=>B.value,setBackgroundType:t=>{B.value=t},getListBackgroundType:()=>b.value,setListBackgroundType:t=>{b.value=t},getTextList:()=>[...z.value],setTextList:t=>{w.value=Array.isArray(t)?t:[]},isAddEvent:()=>c.value,setAddEvent:t=>{c.value=!!t,C(!0)},getTabIndex:()=>f.value,setTabIndex:t=>{f.value=t!=null?Number(t):null},getListRowCount:()=>i.value.length,getListItem:t=>!Number.isInteger(t)||t<0||t>=i.value.length?null:i.value[t]??null,focus:(t=0)=>{var S;if(!c.value)return;const s=f.value;if(s==null||s===-1||!Number.isInteger(t)||t<0||t>=i.value.length)return;const u=i.value[t];(S=u==null?void 0:u.focus)==null||S.call(u)},reload:()=>o.reloadHisonComponent(d)},o.hisonCloser.component.listList[a]=v.value,l("mounted",v.value)},V=()=>{o.unregisterReloadable(d),i.value.forEach(t=>t&&N.removeButtonCssEvent(t)),delete o.hisonCloser.component.listList[a]};e.onMounted(D),e.onBeforeUnmount(V);const q=t=>{if(!t)return null;if(t instanceof Element)return t;const s=t.$el;return s instanceof Element?s:null},J=t=>{const s=q(t);s&&(i.value.includes(s)||i.value.push(s))},Q=t=>{const s=q(t);s&&(T.value.includes(s)||T.value.push(s))};return e.watch(r,t=>{M(),l("responsive-change",t)}),e.watch(()=>n.visible,t=>{const s=!!t;s!==y.value&&(y.value=s)}),e.watch(()=>n.border,t=>{const s=!!t;s!==g.value&&(g.value=s)}),e.watch(()=>n.listBorder,t=>{const s=!!t;s!==h.value&&(h.value=s)}),e.watch(()=>n.backgroundType,t=>{t&&t!==B.value&&(B.value=t)}),e.watch(()=>n.listBackgroundType,t=>{t&&t!==b.value&&(b.value=t)}),e.watch(()=>n.listType,t=>{const s=t==="ol"?"ol":"ul";s!==m.value&&(m.value=s)}),e.watch(()=>n.bulletChar,t=>{const s=t??"•";s!==p.value&&(p.value=s)}),e.watch(()=>n.showMarker,t=>{const s=t!==!1;s!==k.value&&(k.value=s)}),e.watch(()=>n.textList,t=>{w.value=Array.isArray(t)?t:[]}),e.watch(()=>n.addEvent,t=>{const s=!!t;s!==c.value&&(c.value=s,C(!0))}),e.watch(()=>n.tabIndex,t=>{const s=t===null||t===""?null:Number(t);s!==f.value&&(f.value=s)}),e.watch(()=>n.class,()=>{M()}),e.watch(L,()=>{C(!0)}),e.watch(w,()=>{C(!0)},{deep:!0}),{props:n,listRef:A,itemRefs:i,itemInnerRefs:T,renderTag:P,listType:m,bulletChar:p,showMarker:k,visibleClass:$,borderClass:H,listBorderClass:O,backgroundTypeClass:U,listBackgroundTypeClass:K,responsiveClassList:E,hasElementSlot:F,elementNodes:L,normalizedItems:z,tabIndex:f,setItemRef:J,setItemInnerRef:Q,onItemClick:G,emitItem:Y}}}),x=["tabindex"],_={key:0,class:"hison-list-marker"},ee={key:0},te={key:1},ne={class:"hison-list-content"},se=["tabindex"],le={key:0,class:"hison-list-marker"},oe={key:0},re={key:1},ae={class:"hison-list-content"},ie={key:1,class:"hison-list-item-text"};function ue(n,l,I,A,i,T){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["hison-wrapper",...n.responsiveClassList,n.visibleClass])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.renderTag),{ref:"listRef",class:e.normalizeClass(["hison-list",n.borderClass,n.backgroundTypeClass]),style:e.normalizeStyle(n.props.style),onKeydown:[e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["enter"]),e.withKeys(e.withModifiers(n.onItemClick,["prevent"]),["space"])]},{default:e.withCtx(()=>[n.hasElementSlot?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.elementNodes,(a,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),style:e.normalizeStyle(n.props.listItemStyle),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:l[0]||(l[0]=(...r)=>n.onItemClick&&n.onItemClick(...r)),onMousedown:l[1]||(l[1]=r=>n.emitItem("mousedown",r)),onMouseup:l[2]||(l[2]=r=>n.emitItem("mouseup",r)),onMouseover:l[3]||(l[3]=r=>n.emitItem("mouseover",r)),onMouseout:l[4]||(l[4]=r=>n.emitItem("mouseout",r))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",_,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",ne,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a)))])],4)],46,x))),128)):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.normalizedItems,(a,d)=>(e.openBlock(),e.createElementBlock("li",{key:d,class:e.normalizeClass(["hison-list-item",n.listBorderClass,n.listBackgroundTypeClass]),ref_for:!0,ref:n.setItemRef,tabindex:n.tabIndex??void 0,onClick:l[5]||(l[5]=(...r)=>n.onItemClick&&n.onItemClick(...r)),onMousedown:l[6]||(l[6]=r=>n.emitItem("mousedown",r)),onMouseup:l[7]||(l[7]=r=>n.emitItem("mouseup",r)),onMouseover:l[8]||(l[8]=r=>n.emitItem("mouseover",r)),onMouseout:l[9]||(l[9]=r=>n.emitItem("mouseout",r))},[e.createElementVNode("div",{class:"hison-list-item-inner",style:e.normalizeStyle(n.props.listItemInnerStyle),ref_for:!0,ref:n.setItemInnerRef},[n.showMarker?(e.openBlock(),e.createElementBlock("div",le,[n.listType==="ol"?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(d+1)+".",1)):(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(n.bulletChar),1))])):e.createCommentVNode("",!0),e.createElementVNode("div",ae,[n.$slots.item?e.renderSlot(n.$slots,"item",{key:0,item:a,index:d}):(e.openBlock(),e.createElementBlock("span",ie,e.toDisplayString(String(a??"")),1))])],4)],42,se))),128))]),_:3},40,["class","style","onKeydown"]))],2)}const de=W._export_sfc(Z,[["render",ue]]);exports.default=de;