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.
- package/LICENSE +21 -0
- package/README.md +248 -0
- package/dist/HAccordion-CPtgQUK0.js +1 -0
- package/dist/HAccordion-ll-4cIAw.mjs +262 -0
- package/dist/HBaggie-D6omQoFh.js +1 -0
- package/dist/HBaggie-D_7mEiuV.mjs +283 -0
- package/dist/HBanner-DmcMOFqS.mjs +420 -0
- package/dist/HBanner-Io4SdGGs.js +1 -0
- package/dist/HButton-DAVuDmOQ.js +1 -0
- package/dist/HButton-DAriO81x.mjs +256 -0
- package/dist/HCalendar-DKwGatUk.js +2 -0
- package/dist/HCalendar-w18iIB90.mjs +3387 -0
- package/dist/HCaption-6CbSqRA7.js +1 -0
- package/dist/HCaption-DwsXHDNK.mjs +275 -0
- package/dist/HChart-C86JXUyW.js +1 -0
- package/dist/HChart-CcArHFr0.mjs +179 -0
- package/dist/HDrawer-DG1O42iF.mjs +439 -0
- package/dist/HDrawer-U5VC_okK.js +1 -0
- package/dist/HDropdown-Bs7AfefJ.mjs +393 -0
- package/dist/HDropdown-D4RAGmjE.js +1 -0
- package/dist/HFileset-BGuP9O4l.mjs +578 -0
- package/dist/HFileset-CuPR6Hwf.js +2 -0
- package/dist/HGap-BPAdnOQz.js +1 -0
- package/dist/HGap-DzGrfWVt.mjs +233 -0
- package/dist/HGrid-BiIhVCv_.mjs +345 -0
- package/dist/HGrid-C3EV_pgM.js +1 -0
- package/dist/HImagebox-D_DKeCrO.mjs +654 -0
- package/dist/HImagebox-t_UdFjQO.js +2 -0
- package/dist/HInput-BEyJqYkD.mjs +1103 -0
- package/dist/HInput-DMGLY473.js +1 -0
- package/dist/HInputGroup-D37WTYoI.mjs +281 -0
- package/dist/HInputGroup-Dcfr23sZ.js +1 -0
- package/dist/HLabel-B2FOqSiS.mjs +369 -0
- package/dist/HLabel-Dm48mSwn.js +1 -0
- package/dist/HLayout-BbCEm_aO.mjs +196 -0
- package/dist/HLayout-C1e4BZ_K.js +1 -0
- package/dist/HList-CAeYb-hz.mjs +419 -0
- package/dist/HList-eNXmMf27.js +1 -0
- package/dist/HModal-BDBEEpKm.mjs +778 -0
- package/dist/HModal-GODLq3wH.js +1 -0
- package/dist/HNote-CWnUjt3_.mjs +934 -0
- package/dist/HNote-D_Xwu9oL.js +1 -0
- package/dist/HPagination-Db_L9wv-.js +1 -0
- package/dist/HPagination-e5e2a5GS.mjs +496 -0
- package/dist/HParagraph-BRuSeOMU.js +1 -0
- package/dist/HParagraph-DYuB-qjY.mjs +463 -0
- package/dist/HPopup-Brp1FVpm.mjs +431 -0
- package/dist/HPopup-ChkoI3xm.js +1 -0
- package/dist/HSpinner-DDtU9PL_.js +1 -0
- package/dist/HSpinner-DOq2k5kT.mjs +281 -0
- package/dist/HTable-DGFnzD4u.js +1 -0
- package/dist/HTable-GCDP5O_J.mjs +620 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/ar.es-CKau4tBl.js +5 -0
- package/dist/ar.es-XxSuE68c.mjs +57 -0
- package/dist/bg.es-BJ7fu6yy.mjs +57 -0
- package/dist/bg.es-Melqx1M5.js +5 -0
- package/dist/bn.es-CYlBkxc5.mjs +57 -0
- package/dist/bn.es-ClbAZ4WP.js +5 -0
- package/dist/bs.es-KjOcbE96.js +5 -0
- package/dist/bs.es-yMnaKmdi.mjs +57 -0
- package/dist/ca.es-BaGTENcW.js +5 -0
- package/dist/ca.es-DIhlxmQc.mjs +67 -0
- package/dist/cs.es-BN8oxRXQ.mjs +57 -0
- package/dist/cs.es-ChOlHqBr.js +5 -0
- package/dist/da.es-DJB5lAli.mjs +57 -0
- package/dist/da.es-DOFXbf8-.js +5 -0
- package/dist/de.es-DwE82Kaw.js +5 -0
- package/dist/de.es-glb8GeJh.mjs +57 -0
- package/dist/drag-and-drop.es-4ttM1tRs.js +5 -0
- package/dist/drag-and-drop.es-Ckzp6XEn.mjs +183 -0
- package/dist/el.es-CNrCgzYI.js +5 -0
- package/dist/el.es-_bBZf22h.mjs +76 -0
- package/dist/en.es-CV9nmQGr.mjs +57 -0
- package/dist/en.es-CgL601qd.js +5 -0
- package/dist/es.es-CZjcWK54.mjs +57 -0
- package/dist/es.es-IdFGKY7Q.js +5 -0
- package/dist/et.es-BygWmV3P.js +5 -0
- package/dist/et.es-CjvQAzNF.mjs +57 -0
- package/dist/fa.es-DW_0SmsT.js +5 -0
- package/dist/fa.es-DykeFwDA.mjs +57 -0
- package/dist/fi.es-Bl7Pp7AO.mjs +57 -0
- package/dist/fi.es-pgfJlZ8i.js +5 -0
- package/dist/fr.es-CNKVhFfO.mjs +57 -0
- package/dist/fr.es-OENguFuM.js +5 -0
- package/dist/he.es-bixEnAeH.js +5 -0
- package/dist/he.es-nF4GFhjH.mjs +57 -0
- package/dist/hisonvue.cjs.js +1 -0
- package/dist/hisonvue.css +1 -0
- package/dist/hisonvue.d.ts +19934 -0
- package/dist/hisonvue.es.js +114 -0
- package/dist/hr.es-CkRAP94O.js +5 -0
- package/dist/hr.es-QFfz660j.mjs +57 -0
- package/dist/hu.es-Ck2rE01V.mjs +57 -0
- package/dist/hu.es-DG6HeiQJ.js +5 -0
- package/dist/id.es-D4tPi6wP.js +5 -0
- package/dist/id.es-Je7FEUJ5.mjs +57 -0
- package/dist/index-BmKMHsSZ.js +153 -0
- package/dist/index-DUh7pai4.mjs +19976 -0
- package/dist/is.es-CDFqLYCV.js +5 -0
- package/dist/is.es-bzprHvXI.mjs +57 -0
- package/dist/it.es-BHgrw_C6.js +5 -0
- package/dist/it.es-CJtfqmNS.mjs +57 -0
- package/dist/ja.es-BaiGjqZ6.mjs +57 -0
- package/dist/ja.es-D-lxWwyb.js +5 -0
- package/dist/ka.es-CnnB6q4A.js +5 -0
- package/dist/ka.es-x9QJo_dl.mjs +57 -0
- package/dist/ko.es-6c447eTS.mjs +57 -0
- package/dist/ko.es-b18aaB3V.js +5 -0
- package/dist/lt.es-2twYdvmJ.mjs +57 -0
- package/dist/lt.es-BY9UQ6wZ.js +5 -0
- package/dist/mn.es-BLQRG1uu.mjs +57 -0
- package/dist/mn.es-YFS7gSdf.js +5 -0
- package/dist/nl.es-BEx-4hnj.js +5 -0
- package/dist/nl.es-bB1qWR_S.mjs +57 -0
- package/dist/no.es-BQnRWlWR.js +5 -0
- package/dist/no.es-CWDVXpTf.mjs +57 -0
- package/dist/pl.es-CKCsZ_02.js +5 -0
- package/dist/pl.es-Dzct23w9.mjs +57 -0
- package/dist/pt-br.es-BeBuiitI.mjs +57 -0
- package/dist/pt-br.es-oH7qh6Fd.js +5 -0
- package/dist/pt-pt.es-BeBuiitI.mjs +57 -0
- package/dist/pt-pt.es-DLk5I0ej.js +5 -0
- package/dist/ro.es-DfMVJ30M.mjs +57 -0
- package/dist/ro.es-DgTen1Dh.js +5 -0
- package/dist/ru.es-Bv9UvrBe.mjs +67 -0
- package/dist/ru.es-jGIQfREl.js +5 -0
- package/dist/scrollManager-BGnq4wyt.mjs +14 -0
- package/dist/scrollManager-CEEWQwoK.js +1 -0
- package/dist/setButtonCssEvent-B9WTs2X7.js +1 -0
- package/dist/setButtonCssEvent-dBs1GcAh.mjs +70 -0
- package/dist/sk.es-CUOTpLuL.mjs +57 -0
- package/dist/sk.es-D2bhVb26.js +5 -0
- package/dist/sl.es-DeIGgZbR.mjs +57 -0
- package/dist/sl.es-TV8Uraa1.js +5 -0
- package/dist/sq.es-CQJJrZHv.mjs +67 -0
- package/dist/sq.es-Cc65zxbr.js +5 -0
- package/dist/sr.es-CKS0AkiW.mjs +57 -0
- package/dist/sr.es-D5VNA_GW.js +5 -0
- package/dist/sv.es-ChHQRrAe.mjs +57 -0
- package/dist/sv.es-dBeK_DZs.js +5 -0
- package/dist/tr.es-B3v90gVv.mjs +57 -0
- package/dist/tr.es-BUz4S13G.js +5 -0
- package/dist/uk.es-B8uaeLcK.js +5 -0
- package/dist/uk.es-CiR4NnbN.mjs +67 -0
- package/dist/vi.es-2OFMtbQI.js +5 -0
- package/dist/vi.es-DFDi5l7p.mjs +67 -0
- package/dist/zh-cn.es-9cbEAuAi.mjs +67 -0
- package/dist/zh-cn.es-fDHCbCIg.js +5 -0
- package/dist/zh-hk.es-COzeh5F8.js +5 -0
- package/dist/zh-hk.es-z0tio4jE.mjs +67 -0
- package/nuxt/module.mjs +39 -0
- package/nuxt/plugin.mjs +21 -0
- package/package.json +53 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { defineComponent as W, ref as o, computed as u, onMounted as X, onBeforeUnmount as _, watch as i, nextTick as C, unref as z, createElementBlock as V, openBlock as $, normalizeStyle as L, normalizeClass as q, createElementVNode as ee, createCommentVNode as se, renderSlot as K, withKeys as H, withModifiers as P, toDisplayString as te } from "vue";
|
|
2
|
+
import { B as ne, f as T, S as ae, i as oe, g as ie, u as le, e as ue, t as re, b as U, h as S, r as de, c as ge, d as be } from "./index-DUh7pai4.mjs";
|
|
3
|
+
import { r as D, a as ve } from "./setButtonCssEvent-dBs1GcAh.mjs";
|
|
4
|
+
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const fe = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the baggie instance.
|
|
8
|
+
* - You can later retrieve its methods via `hison.component.getBaggie(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 **anchor scope** (the wrapper that contains target + badge).
|
|
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) applied to the **badge element** (not to the anchor).
|
|
24
|
+
* - Accepts string, object, or array of objects (Vue style binding formats)
|
|
25
|
+
* - Use this for badge-specific size/spacing overrides
|
|
26
|
+
*/
|
|
27
|
+
style: {
|
|
28
|
+
type: [String, Object, Array],
|
|
29
|
+
required: !1
|
|
30
|
+
},
|
|
31
|
+
/**
|
|
32
|
+
* Controls visibility of the **anchor block** (target + badge container).
|
|
33
|
+
* - When `false`, both target and badge area are hidden from layout via `hison-display-none`
|
|
34
|
+
* - Default: `true`
|
|
35
|
+
*/
|
|
36
|
+
visible: { type: Boolean, default: !0 },
|
|
37
|
+
/**
|
|
38
|
+
* Controls visibility of the **badge only** (target stays visible).
|
|
39
|
+
* - Useful to keep the target interactive while toggling the badge bubble
|
|
40
|
+
* - Default: `true`
|
|
41
|
+
*/
|
|
42
|
+
baggieVisible: { type: Boolean, default: !0 },
|
|
43
|
+
/**
|
|
44
|
+
* Stacking order base for the baggie.
|
|
45
|
+
* - Applied to the **anchor** as `z-index: zIndex`
|
|
46
|
+
* - The **badge** renders above the anchor using `zIndex + 1`
|
|
47
|
+
* - Default: `1000`
|
|
48
|
+
*/
|
|
49
|
+
zIndex: { type: Number, default: 1e3 },
|
|
50
|
+
/**
|
|
51
|
+
* On-target position where the badge is pinned (grid overlay).
|
|
52
|
+
* - Tokens: 'top-left' | 'top-center' | 'top-right' |
|
|
53
|
+
* 'middle-left' | 'middle-center' | 'middle-right' |
|
|
54
|
+
* 'bottom-left' | 'bottom-center' | 'bottom-right'
|
|
55
|
+
* - Default: `top-right`
|
|
56
|
+
*/
|
|
57
|
+
position: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: oe.topRight,
|
|
60
|
+
validator: (e) => ae.includes(e)
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* Text content rendered inside the badge when the `badge` slot is not provided.
|
|
64
|
+
* - If slot `#badge` exists, this prop is ignored
|
|
65
|
+
*/
|
|
66
|
+
text: { type: String, required: !1 },
|
|
67
|
+
/**
|
|
68
|
+
* Badge background mode.
|
|
69
|
+
* - One of: `'empty' | 'transparent' | 'filled'` (see `BackgroundType`)
|
|
70
|
+
* - Default: `filled`
|
|
71
|
+
*/
|
|
72
|
+
backgroundType: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: T.filled,
|
|
75
|
+
validator: (e) => ne.includes(e)
|
|
76
|
+
},
|
|
77
|
+
/**
|
|
78
|
+
* Whether the badge renders with border styling (component theme shadow).
|
|
79
|
+
* - Default: `true`
|
|
80
|
+
*/
|
|
81
|
+
border: { type: Boolean, default: !0 },
|
|
82
|
+
/**
|
|
83
|
+
* Badge shape.
|
|
84
|
+
* - Tokens: `'square' | 'rounded' | 'circle'`
|
|
85
|
+
* - Default: `'rounded'`
|
|
86
|
+
*/
|
|
87
|
+
shape: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: "rounded",
|
|
90
|
+
validator: (e) => ["square", "rounded", "circle"].includes(e)
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Controls keyboard focus order of the badge (if interactive).
|
|
94
|
+
* - `null` or `''` removes `tabindex` (not focusable)
|
|
95
|
+
* - `0` enables natural tab navigation; positive numbers set custom order
|
|
96
|
+
* - Default: `null`
|
|
97
|
+
*/
|
|
98
|
+
tabIndex: {
|
|
99
|
+
type: [Number, String],
|
|
100
|
+
default: null,
|
|
101
|
+
validator: (e) => e === null || e === "" || !isNaN(+e) && isFinite(+e)
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Enables button-like interaction styling/behavior on the badge.
|
|
105
|
+
* - Applies CSS state classes via `addButtonCssEvent` (focus/hover/active)
|
|
106
|
+
* - Default: `false`
|
|
107
|
+
*/
|
|
108
|
+
buttonEnabled: { type: Boolean, default: !1 }
|
|
109
|
+
}, me = W({
|
|
110
|
+
name: "HBaggie",
|
|
111
|
+
props: fe,
|
|
112
|
+
inheritAttrs: !1,
|
|
113
|
+
emits: ["mounted", "responsive-change", "click", "mousedown", "mouseup", "mouseover", "mouseout"],
|
|
114
|
+
setup(e, { emit: n }) {
|
|
115
|
+
const l = e.id || ie(), k = `hbaggie:${l}`, E = le(), M = o(null), a = o(null), b = o(e.visible), v = o(e.baggieVisible), d = o(e.zIndex ?? 1e3), c = o(e.position), f = o(e.text ?? ""), m = o(e.border ?? !0), y = o(e.backgroundType || T.filled), g = o(e.shape || "rounded"), p = o(
|
|
116
|
+
e.tabIndex !== null && e.tabIndex !== "" ? Number(e.tabIndex) : null
|
|
117
|
+
), r = o(e.buttonEnabled ?? !1), O = u(() => b.value ? "" : "hison-display-none"), j = u(() => v.value ? "" : "hison-display-none"), F = u(() => m.value ? "hison-border" : ""), Z = u(() => {
|
|
118
|
+
switch (y.value) {
|
|
119
|
+
case T.transparent:
|
|
120
|
+
return "hison-bg-transparent";
|
|
121
|
+
case T.empty:
|
|
122
|
+
return "hison-bg-empty";
|
|
123
|
+
default:
|
|
124
|
+
return "hison-bg-filled";
|
|
125
|
+
}
|
|
126
|
+
}), x = u(() => g.value === "circle" ? "hison-baggie-shape-circle" : g.value === "square" ? "hison-baggie-shape-square" : "hison-baggie-shape-rounded"), B = o([]), N = () => {
|
|
127
|
+
B.value = ue(re(e.class) || "", E.value), U(B.value, "size", S.componentStyle.size), U(B.value, "color", "primary");
|
|
128
|
+
}, G = u(() => `hison-baggie-pos-${c.value}`), Y = u(() => ({ zIndex: d.value })), J = u(() => ({ zIndex: d.value + 1 })), I = (s = !0) => {
|
|
129
|
+
const t = a.value;
|
|
130
|
+
t && (D(t), s && r.value && ve(t));
|
|
131
|
+
}, A = (s) => {
|
|
132
|
+
r.value && n("click", s, z(h));
|
|
133
|
+
}, Q = () => {
|
|
134
|
+
r.value && A(new MouseEvent("click"));
|
|
135
|
+
}, h = o(null), R = () => {
|
|
136
|
+
S.component.baggieList[l] && S.component.baggieList[l].isHisonvueComponent && console.warn(`[Hisonvue] The baggie ID is at risk of being duplicated. ${l}`), de(k, () => {
|
|
137
|
+
w(), C(R);
|
|
138
|
+
}), N(), C(() => I(!0)), h.value = {
|
|
139
|
+
isHisonvueComponent: !0,
|
|
140
|
+
getId: () => l,
|
|
141
|
+
getType: () => "baggie",
|
|
142
|
+
isVisible: () => b.value,
|
|
143
|
+
setVisible: (s) => {
|
|
144
|
+
b.value = s;
|
|
145
|
+
},
|
|
146
|
+
isBaggieVisible: () => v.value,
|
|
147
|
+
setBaggieVisible: (s) => {
|
|
148
|
+
v.value = s;
|
|
149
|
+
},
|
|
150
|
+
getZIndex: () => d.value,
|
|
151
|
+
setZIndex: (s) => {
|
|
152
|
+
d.value = s;
|
|
153
|
+
},
|
|
154
|
+
getPosition: () => c.value,
|
|
155
|
+
setPosition: (s) => {
|
|
156
|
+
c.value = s;
|
|
157
|
+
},
|
|
158
|
+
getText: () => f.value,
|
|
159
|
+
setText: (s) => {
|
|
160
|
+
f.value = s;
|
|
161
|
+
},
|
|
162
|
+
isBorder: () => m.value,
|
|
163
|
+
setBorder: (s) => {
|
|
164
|
+
m.value = s;
|
|
165
|
+
},
|
|
166
|
+
getBackgroundType: () => y.value,
|
|
167
|
+
setBackgroundType: (s) => {
|
|
168
|
+
y.value = s;
|
|
169
|
+
},
|
|
170
|
+
getShape: () => g.value,
|
|
171
|
+
setShape: (s) => {
|
|
172
|
+
g.value = s;
|
|
173
|
+
},
|
|
174
|
+
getTabIndex: () => p.value,
|
|
175
|
+
setTabIndex: (s) => {
|
|
176
|
+
p.value = s != null ? Number(s) : null;
|
|
177
|
+
},
|
|
178
|
+
isButtonEnabled: () => r.value,
|
|
179
|
+
setButtonEnabled: (s) => {
|
|
180
|
+
r.value = s, C(() => I(!0));
|
|
181
|
+
},
|
|
182
|
+
reload: () => ge(k)
|
|
183
|
+
}, S.component.baggieList[l] = h.value, n("mounted", h.value);
|
|
184
|
+
}, w = () => {
|
|
185
|
+
be(k);
|
|
186
|
+
const s = a.value;
|
|
187
|
+
s && D(s), delete S.component.baggieList[l];
|
|
188
|
+
};
|
|
189
|
+
return X(R), _(w), i(E, (s) => {
|
|
190
|
+
N(), n("responsive-change", s);
|
|
191
|
+
}), i(() => e.visible, (s) => {
|
|
192
|
+
s !== b.value && (b.value = !!s);
|
|
193
|
+
}), i(() => e.baggieVisible, (s) => {
|
|
194
|
+
s !== v.value && (v.value = !!s, C(() => I(!0)));
|
|
195
|
+
}), i(() => e.zIndex, (s) => {
|
|
196
|
+
const t = Number(s);
|
|
197
|
+
Number.isFinite(t) && t !== d.value && (d.value = t);
|
|
198
|
+
}), i(() => e.position, (s) => {
|
|
199
|
+
typeof s == "string" && s !== c.value && (c.value = s);
|
|
200
|
+
}), i(() => e.text, (s) => {
|
|
201
|
+
const t = s ?? "";
|
|
202
|
+
t !== f.value && (f.value = t);
|
|
203
|
+
}), i(() => e.border, (s) => {
|
|
204
|
+
const t = !!s;
|
|
205
|
+
t !== m.value && (m.value = t);
|
|
206
|
+
}), i(() => e.backgroundType, (s) => {
|
|
207
|
+
s && s !== y.value && (y.value = s);
|
|
208
|
+
}), i(() => e.shape, (s) => {
|
|
209
|
+
(s === "square" || s === "rounded" || s === "circle") && s !== g.value && (g.value = s);
|
|
210
|
+
}), i(() => e.tabIndex, (s) => {
|
|
211
|
+
const t = s === null || s === "" ? null : Number(s);
|
|
212
|
+
t !== p.value && (p.value = t);
|
|
213
|
+
}), i(() => e.buttonEnabled, (s) => {
|
|
214
|
+
const t = !!s;
|
|
215
|
+
t !== r.value && (r.value = t, C(() => I(!0)));
|
|
216
|
+
}), i(() => e.class, () => N()), {
|
|
217
|
+
id: l,
|
|
218
|
+
props: e,
|
|
219
|
+
anchorRef: M,
|
|
220
|
+
baggieRef: a,
|
|
221
|
+
text: f,
|
|
222
|
+
visibleClass: O,
|
|
223
|
+
baggieVisibleClass: j,
|
|
224
|
+
responsiveClassList: B,
|
|
225
|
+
backgroundTypeClass: Z,
|
|
226
|
+
borderClass: F,
|
|
227
|
+
shapeClass: x,
|
|
228
|
+
positionClass: G,
|
|
229
|
+
anchorStyle: Y,
|
|
230
|
+
badgeStyle: J,
|
|
231
|
+
baggieMethods: u(() => z(h)),
|
|
232
|
+
tabIndex: p,
|
|
233
|
+
buttonEnabled: r,
|
|
234
|
+
onClick: A,
|
|
235
|
+
onKeyActivate: Q
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
}), ye = { class: "hison-baggie-target" }, pe = ["tabindex"], he = {
|
|
239
|
+
key: 1,
|
|
240
|
+
class: "hison-baggie-text"
|
|
241
|
+
};
|
|
242
|
+
function Ce(e, n, l, k, E, M) {
|
|
243
|
+
return $(), V("span", {
|
|
244
|
+
ref: "anchorRef",
|
|
245
|
+
class: q(["hison-baggie-anchor", e.visibleClass, ...e.responsiveClassList]),
|
|
246
|
+
style: L(e.anchorStyle),
|
|
247
|
+
onMousedown: n[3] || (n[3] = (a) => e.$emit("mousedown", a, e.baggieMethods)),
|
|
248
|
+
onMouseup: n[4] || (n[4] = (a) => e.$emit("mouseup", a, e.baggieMethods)),
|
|
249
|
+
onMouseover: n[5] || (n[5] = (a) => e.$emit("mouseover", a, e.baggieMethods)),
|
|
250
|
+
onMouseout: n[6] || (n[6] = (a) => e.$emit("mouseout", a, e.baggieMethods))
|
|
251
|
+
}, [
|
|
252
|
+
ee("span", ye, [
|
|
253
|
+
K(e.$slots, "default")
|
|
254
|
+
]),
|
|
255
|
+
e.baggieVisible ? ($(), V("div", {
|
|
256
|
+
key: 0,
|
|
257
|
+
ref: "baggieRef",
|
|
258
|
+
class: q([
|
|
259
|
+
"hison-baggie",
|
|
260
|
+
e.positionClass,
|
|
261
|
+
e.backgroundTypeClass,
|
|
262
|
+
e.borderClass,
|
|
263
|
+
e.shapeClass,
|
|
264
|
+
e.baggieVisibleClass,
|
|
265
|
+
e.buttonEnabled ? "hison-baggie-button" : null
|
|
266
|
+
]),
|
|
267
|
+
style: L([e.badgeStyle, e.props.style]),
|
|
268
|
+
role: "status",
|
|
269
|
+
tabindex: e.tabIndex ?? void 0,
|
|
270
|
+
onClick: n[0] || (n[0] = (...a) => e.onClick && e.onClick(...a)),
|
|
271
|
+
onKeydown: [
|
|
272
|
+
n[1] || (n[1] = H(P((...a) => e.onKeyActivate && e.onKeyActivate(...a), ["prevent"]), ["enter"])),
|
|
273
|
+
n[2] || (n[2] = H(P((...a) => e.onKeyActivate && e.onKeyActivate(...a), ["prevent"]), ["space"]))
|
|
274
|
+
]
|
|
275
|
+
}, [
|
|
276
|
+
e.$slots.badge ? K(e.$slots, "badge", { key: 0 }) : ($(), V("span", he, te(e.text), 1))
|
|
277
|
+
], 46, pe)) : se("", !0)
|
|
278
|
+
], 38);
|
|
279
|
+
}
|
|
280
|
+
const Te = /* @__PURE__ */ ce(me, [["render", Ce]]);
|
|
281
|
+
export {
|
|
282
|
+
Te as default
|
|
283
|
+
};
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { defineComponent as pe, useSlots as Ce, ref as o, computed as v, onMounted as ke, onBeforeUnmount as Be, watch as s, unref as Ie, nextTick as Me, resolveComponent as Se, createElementBlock as c, openBlock as u, normalizeClass as g, createElementVNode as M, withModifiers as Ne, normalizeStyle as ee, createCommentVNode as X, Fragment as te, renderList as ne, createBlock as Te, resolveDynamicComponent as we, renderSlot as oe, createVNode as ae, withCtx as se } from "vue";
|
|
2
|
+
import { B as Pe, f as x, g as De, u as Le, j as le, t as Y, e as He, a as $e, b as ie, h as S, r as Ae, c as Ee } from "./index-DUh7pai4.mjs";
|
|
3
|
+
import Oe from "./HButton-DAriO81x.mjs";
|
|
4
|
+
import { _ as Fe } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
+
const Re = {
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for the banner.
|
|
8
|
+
* - Access runtime methods via `hison.component.getBanner(id)`
|
|
9
|
+
* - ⚠️ Duplicate `id` values will throw an error at mount time
|
|
10
|
+
*/
|
|
11
|
+
id: { type: String, required: !1 },
|
|
12
|
+
/**
|
|
13
|
+
* Custom class string applied to the banner container.
|
|
14
|
+
* - Supports `hison-col-*`, `hison-size-*`, `hison-color-*`, etc.
|
|
15
|
+
* - Processed by hison responsive extractor
|
|
16
|
+
*/
|
|
17
|
+
class: {
|
|
18
|
+
type: [String, Array, Object],
|
|
19
|
+
required: !1
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Inline style for the banner container.
|
|
23
|
+
*/
|
|
24
|
+
style: {
|
|
25
|
+
type: [String, Object, Array],
|
|
26
|
+
required: !1
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Controls visibility of the banner (entire frame).
|
|
30
|
+
*/
|
|
31
|
+
visible: { type: Boolean, default: !0 },
|
|
32
|
+
/**
|
|
33
|
+
* Background type of the banner frame.
|
|
34
|
+
* - 'filled' | 'empty' | 'transparent'
|
|
35
|
+
*/
|
|
36
|
+
backgroundType: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: x.transparent,
|
|
39
|
+
validator: (t) => Pe.includes(t)
|
|
40
|
+
},
|
|
41
|
+
/**
|
|
42
|
+
* Whether to show border (rendered as subtle box-shadow).
|
|
43
|
+
* - Default: false (no border)
|
|
44
|
+
*/
|
|
45
|
+
border: { type: Boolean, default: !1 },
|
|
46
|
+
/**
|
|
47
|
+
* Zero-based index of the slide to show first.
|
|
48
|
+
* - Applied on mount.
|
|
49
|
+
* - If this prop changes later, the banner will navigate to that index.
|
|
50
|
+
*
|
|
51
|
+
* @default 0
|
|
52
|
+
*/
|
|
53
|
+
initialIndex: { type: Number, default: 0 },
|
|
54
|
+
/**
|
|
55
|
+
* Transition duration in milliseconds for slide movement.
|
|
56
|
+
*/
|
|
57
|
+
transitionMs: { type: Number, default: 600 },
|
|
58
|
+
/**
|
|
59
|
+
* Navigation button style: 'chevron' | 'triangle'
|
|
60
|
+
*/
|
|
61
|
+
navButtonStyle: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "chevron",
|
|
64
|
+
validator: (t) => t === "chevron" || t === "triangle"
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Whether to show prev/next navigation buttons.
|
|
68
|
+
*/
|
|
69
|
+
showNavButtons: { type: Boolean, default: !0 },
|
|
70
|
+
/**
|
|
71
|
+
* Whether to show page indicators (● ● ●).
|
|
72
|
+
*/
|
|
73
|
+
showIndicators: { type: Boolean, default: !0 },
|
|
74
|
+
/**
|
|
75
|
+
* Position of the page indicators (dots).
|
|
76
|
+
* - 'bottom': below the banner (outside)
|
|
77
|
+
* - 'overlay': overlaid inside the banner near the bottom edge
|
|
78
|
+
*
|
|
79
|
+
* @default 'bottom'
|
|
80
|
+
*/
|
|
81
|
+
indicatorsPosition: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "bottom",
|
|
84
|
+
validator: (t) => t === "bottom" || t === "overlay"
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Whether indicators are clickable.
|
|
88
|
+
*/
|
|
89
|
+
indicatorClickable: { type: Boolean, default: !0 },
|
|
90
|
+
/**
|
|
91
|
+
* Autoplay interval in ms.
|
|
92
|
+
* - < 100 disables autoplay.
|
|
93
|
+
*/
|
|
94
|
+
autoIntervalMs: { type: Number, default: 0 },
|
|
95
|
+
/**
|
|
96
|
+
* Autoplay direction: 'next' or 'prev'.
|
|
97
|
+
*/
|
|
98
|
+
autoDirection: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: "next",
|
|
101
|
+
validator: (t) => t === "next" || t === "prev"
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Whether to loop at edges.
|
|
105
|
+
* - If true: goes from last → first, first → last
|
|
106
|
+
* - If false: disables navigation at edges
|
|
107
|
+
*/
|
|
108
|
+
loop: { type: Boolean, default: !0 },
|
|
109
|
+
/**
|
|
110
|
+
* Whether to pause autoplay when mouse hovering on banner.
|
|
111
|
+
*/
|
|
112
|
+
pauseOnHover: { type: Boolean, default: !0 }
|
|
113
|
+
}, Ve = pe({
|
|
114
|
+
name: "HBanner",
|
|
115
|
+
components: { HButton: Oe },
|
|
116
|
+
props: Re,
|
|
117
|
+
emits: [
|
|
118
|
+
"mounted",
|
|
119
|
+
"responsive-change",
|
|
120
|
+
"change",
|
|
121
|
+
"next",
|
|
122
|
+
"prev",
|
|
123
|
+
"autoplay-start",
|
|
124
|
+
"autoplay-stop"
|
|
125
|
+
],
|
|
126
|
+
setup(t, { emit: n }) {
|
|
127
|
+
const d = t.id ? t.id : De(), j = `hbanner:${d}`, q = Le(), N = Ce(), l = o(null), a = o(null), h = o(t.visible), ue = v(() => h.value ? "" : "hison-display-none"), T = o(t.border ?? !1), re = v(() => T.value ? "hison-border" : ""), w = o(t.backgroundType), ve = v(() => {
|
|
128
|
+
switch (w.value) {
|
|
129
|
+
case x.empty:
|
|
130
|
+
return "hison-bg-empty";
|
|
131
|
+
case x.transparent:
|
|
132
|
+
return "hison-bg-transparent";
|
|
133
|
+
default:
|
|
134
|
+
return "hison-bg-filled";
|
|
135
|
+
}
|
|
136
|
+
}), P = o(t.navButtonStyle), D = o(t.showNavButtons), L = o(t.showIndicators), H = o(t.indicatorsPosition), ce = v(
|
|
137
|
+
() => H.value === "overlay" ? "hison-banner-indicators-overlay" : "hison-banner-indicators-bottom"
|
|
138
|
+
), $ = o(t.indicatorClickable), A = o(t.autoIntervalMs), E = o(t.autoDirection), b = o(t.loop), p = o(t.pauseOnHover), O = o(t.transitionMs);
|
|
139
|
+
let f;
|
|
140
|
+
const i = o(0), C = o(t.initialIndex ?? 0), J = v(() => {
|
|
141
|
+
var r;
|
|
142
|
+
return ((r = N.default) == null ? void 0 : r.call(N)) ?? [];
|
|
143
|
+
}), y = v(() => J.value.length), m = o([]), G = () => {
|
|
144
|
+
m.value = He(Y(t.class) || "", q.value), $e(m.value, "col") === -1 && m.value.push("hison-col-12"), ie(m.value, "size", S.componentStyle.size), ie(m.value, "color", "primary");
|
|
145
|
+
}, de = v(() => {
|
|
146
|
+
const e = [];
|
|
147
|
+
return e.push(...le(Y(t.class) || "", "size")), e.push(...le(Y(t.class) || "", "color")), e;
|
|
148
|
+
}), Q = v(() => !b.value && i.value <= 0), W = v(() => !b.value && i.value >= Math.max(0, y.value - 1)), be = v(() => ({
|
|
149
|
+
display: "flex",
|
|
150
|
+
flexDirection: "row",
|
|
151
|
+
width: "100%",
|
|
152
|
+
transform: `translateX(${-i.value * 100}%)`,
|
|
153
|
+
transition: `transform ${Math.max(0, O.value)}ms ease`
|
|
154
|
+
})), F = (e) => {
|
|
155
|
+
if (y.value <= 0) return 0;
|
|
156
|
+
if (b.value) {
|
|
157
|
+
const r = y.value;
|
|
158
|
+
return (e % r + r) % r;
|
|
159
|
+
}
|
|
160
|
+
return Math.min(Math.max(0, e), y.value - 1);
|
|
161
|
+
}, k = (e) => {
|
|
162
|
+
const r = i.value, K = F(e);
|
|
163
|
+
r !== K && (i.value = K, n("change", K, l.value));
|
|
164
|
+
}, R = () => {
|
|
165
|
+
if (!b.value && Q.value) return;
|
|
166
|
+
const e = F(i.value - 1);
|
|
167
|
+
i.value = e, n("prev", e, l.value), n("change", e, l.value);
|
|
168
|
+
}, V = () => {
|
|
169
|
+
if (!b.value && W.value) return;
|
|
170
|
+
const e = F(i.value + 1);
|
|
171
|
+
i.value = e, n("next", e, l.value), n("change", e, l.value);
|
|
172
|
+
}, z = () => {
|
|
173
|
+
f && (window.clearInterval(f), f = void 0, n("autoplay-stop", l.value));
|
|
174
|
+
}, B = () => {
|
|
175
|
+
z();
|
|
176
|
+
const e = Number(A.value);
|
|
177
|
+
!Number.isFinite(e) || e < 100 || y.value <= 1 || (f = window.setInterval(() => {
|
|
178
|
+
E.value === "prev" ? R() : V();
|
|
179
|
+
}, e), n("autoplay-start", l.value));
|
|
180
|
+
}, he = () => {
|
|
181
|
+
p.value && z();
|
|
182
|
+
}, ye = () => {
|
|
183
|
+
p.value && B();
|
|
184
|
+
}, U = o(null), I = o(0), fe = (e) => {
|
|
185
|
+
!e.touches || e.touches.length !== 1 || (U.value = e.touches[0].clientX, I.value = 0);
|
|
186
|
+
}, me = (e) => {
|
|
187
|
+
U.value == null || !e.touches || e.touches.length !== 1 || (I.value = e.touches[0].clientX - U.value);
|
|
188
|
+
}, ge = () => {
|
|
189
|
+
Math.abs(I.value) > 40 && (I.value > 0 ? R() : V()), U.value = null, I.value = 0;
|
|
190
|
+
}, Z = () => {
|
|
191
|
+
S.component.bannerList[d] && S.component.bannerList[d].isHisonvueComponent && console.warn(`[Hisonvue] The banner ID is at risk of being duplicated. ${d}`), Ae(j, () => {
|
|
192
|
+
_(), Me(Z);
|
|
193
|
+
}), G(), l.value = {
|
|
194
|
+
isHisonvueComponent: !0,
|
|
195
|
+
getId: () => d,
|
|
196
|
+
getType: () => "banner",
|
|
197
|
+
isVisible: () => h.value,
|
|
198
|
+
setVisible: (e) => {
|
|
199
|
+
h.value = e;
|
|
200
|
+
},
|
|
201
|
+
isBorder: () => T.value,
|
|
202
|
+
setBorder: (e) => {
|
|
203
|
+
T.value = e;
|
|
204
|
+
},
|
|
205
|
+
getBackgroundType: () => w.value,
|
|
206
|
+
setBackgroundType: (e) => {
|
|
207
|
+
w.value = e;
|
|
208
|
+
},
|
|
209
|
+
getCurrentIndex: () => i.value,
|
|
210
|
+
setCurrentIndex: (e) => {
|
|
211
|
+
k(e);
|
|
212
|
+
},
|
|
213
|
+
getInitialIndex: () => C.value,
|
|
214
|
+
setInitialIndex: (e) => {
|
|
215
|
+
C.value = Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : 0, k(C.value);
|
|
216
|
+
},
|
|
217
|
+
getSlideCount: () => y.value,
|
|
218
|
+
next: () => {
|
|
219
|
+
V();
|
|
220
|
+
},
|
|
221
|
+
prev: () => {
|
|
222
|
+
R();
|
|
223
|
+
},
|
|
224
|
+
goTo: (e) => {
|
|
225
|
+
k(e);
|
|
226
|
+
},
|
|
227
|
+
getNavButtonStyle: () => P.value,
|
|
228
|
+
setNavButtonStyle: (e) => {
|
|
229
|
+
P.value = e;
|
|
230
|
+
},
|
|
231
|
+
isShowNavButtons: () => D.value,
|
|
232
|
+
setShowNavButtons: (e) => {
|
|
233
|
+
D.value = e;
|
|
234
|
+
},
|
|
235
|
+
isShowIndicators: () => L.value,
|
|
236
|
+
setShowIndicators: (e) => {
|
|
237
|
+
L.value = e;
|
|
238
|
+
},
|
|
239
|
+
getIndicatorsPosition: () => H.value,
|
|
240
|
+
setIndicatorsPosition: (e) => {
|
|
241
|
+
H.value = e;
|
|
242
|
+
},
|
|
243
|
+
isIndicatorClickable: () => $.value,
|
|
244
|
+
setIndicatorClickable: (e) => {
|
|
245
|
+
$.value = e;
|
|
246
|
+
},
|
|
247
|
+
getAutoInterval: () => A.value,
|
|
248
|
+
setAutoInterval: (e) => {
|
|
249
|
+
A.value = Number(e), f && B();
|
|
250
|
+
},
|
|
251
|
+
getAutoDirection: () => E.value,
|
|
252
|
+
setAutoDirection: (e) => {
|
|
253
|
+
E.value = e;
|
|
254
|
+
},
|
|
255
|
+
isLoop: () => b.value,
|
|
256
|
+
setLoop: (e) => {
|
|
257
|
+
b.value = e;
|
|
258
|
+
},
|
|
259
|
+
isPauseOnHover: () => p.value,
|
|
260
|
+
setPauseOnHover: (e) => {
|
|
261
|
+
p.value = e;
|
|
262
|
+
},
|
|
263
|
+
startAuto: () => {
|
|
264
|
+
B();
|
|
265
|
+
},
|
|
266
|
+
stopAuto: () => {
|
|
267
|
+
z();
|
|
268
|
+
},
|
|
269
|
+
getTransitionMs: () => O.value,
|
|
270
|
+
setTransitionMs: (e) => {
|
|
271
|
+
O.value = Math.max(0, Number(e) || 0);
|
|
272
|
+
},
|
|
273
|
+
reload: () => Ee(j)
|
|
274
|
+
}, S.component.bannerList[d] = l.value, n("mounted", l.value), i.value = F(C.value), B();
|
|
275
|
+
}, _ = () => {
|
|
276
|
+
z(), delete S.component.bannerList[d];
|
|
277
|
+
};
|
|
278
|
+
return ke(Z), Be(_), s(q, (e) => {
|
|
279
|
+
G(), n("responsive-change", e);
|
|
280
|
+
}), s(() => t.visible, (e) => h.value = e), s(() => t.border, (e) => T.value = !!e), s(() => t.backgroundType, (e) => w.value = e), s(() => t.navButtonStyle, (e) => P.value = e), s(() => t.showNavButtons, (e) => D.value = e), s(() => t.showIndicators, (e) => L.value = e), s(() => t.indicatorsPosition, (e) => {
|
|
281
|
+
H.value = e;
|
|
282
|
+
}), s(() => t.indicatorClickable, (e) => $.value = e), s(() => t.transitionMs, (e) => O.value = e), s(() => t.autoIntervalMs, (e) => {
|
|
283
|
+
A.value = e, f && B();
|
|
284
|
+
}), s(() => t.autoDirection, (e) => E.value = e), s(() => t.loop, (e) => b.value = e), s(() => t.pauseOnHover, (e) => p.value = e), s(() => t.initialIndex, (e) => {
|
|
285
|
+
const r = Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : 0;
|
|
286
|
+
C.value = r, k(r);
|
|
287
|
+
}), s(() => t.class, () => {
|
|
288
|
+
G();
|
|
289
|
+
}), {
|
|
290
|
+
id: d,
|
|
291
|
+
props: t,
|
|
292
|
+
bannerMethods: v(() => Ie(l)),
|
|
293
|
+
visibleClass: ue,
|
|
294
|
+
borderClass: re,
|
|
295
|
+
backgroundTypeClass: ve,
|
|
296
|
+
responsiveClassList: m,
|
|
297
|
+
buttonClassList: de,
|
|
298
|
+
slideNodes: J,
|
|
299
|
+
slideCount: y,
|
|
300
|
+
currentIndex: i,
|
|
301
|
+
navButtonStyle: P,
|
|
302
|
+
showNavButtons: D,
|
|
303
|
+
showIndicators: L,
|
|
304
|
+
indicatorsPositionClass: ce,
|
|
305
|
+
indicatorClickable: $,
|
|
306
|
+
isPrevDisabled: Q,
|
|
307
|
+
isNextDisabled: W,
|
|
308
|
+
trackStyle: be,
|
|
309
|
+
trackRef: a,
|
|
310
|
+
goPrev: R,
|
|
311
|
+
goNext: V,
|
|
312
|
+
goTo: k,
|
|
313
|
+
onMouseEnter: he,
|
|
314
|
+
onMouseLeave: ye,
|
|
315
|
+
onTouchStart: fe,
|
|
316
|
+
onTouchMove: me,
|
|
317
|
+
onTouchEnd: ge
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
}), ze = { class: "hison-banner-viewport" }, Ue = {
|
|
321
|
+
key: 0,
|
|
322
|
+
class: "hison-banner-nav"
|
|
323
|
+
}, Xe = { class: "hison-banner-nav-prev" }, je = { key: 0 }, qe = { key: 1 }, Ge = { class: "hison-banner-nav-next" }, Ke = { key: 0 }, Ye = { key: 1 }, xe = ["title", "onClick"];
|
|
324
|
+
function Je(t, n, d, j, q, N) {
|
|
325
|
+
const l = Se("HButton");
|
|
326
|
+
return u(), c("div", {
|
|
327
|
+
class: g([
|
|
328
|
+
"hison-wrapper",
|
|
329
|
+
...t.responsiveClassList,
|
|
330
|
+
t.visibleClass
|
|
331
|
+
])
|
|
332
|
+
}, [
|
|
333
|
+
M("div", {
|
|
334
|
+
class: g([
|
|
335
|
+
"hison-banner",
|
|
336
|
+
t.borderClass,
|
|
337
|
+
t.backgroundTypeClass
|
|
338
|
+
]),
|
|
339
|
+
style: ee(t.props.style),
|
|
340
|
+
onMouseenter: n[0] || (n[0] = (...a) => t.onMouseEnter && t.onMouseEnter(...a)),
|
|
341
|
+
onMouseleave: n[1] || (n[1] = (...a) => t.onMouseLeave && t.onMouseLeave(...a)),
|
|
342
|
+
onTouchstartPassive: n[2] || (n[2] = (...a) => t.onTouchStart && t.onTouchStart(...a)),
|
|
343
|
+
onTouchmove: n[3] || (n[3] = Ne((...a) => t.onTouchMove && t.onTouchMove(...a), ["prevent"])),
|
|
344
|
+
onTouchendPassive: n[4] || (n[4] = (...a) => t.onTouchEnd && t.onTouchEnd(...a))
|
|
345
|
+
}, [
|
|
346
|
+
M("div", ze, [
|
|
347
|
+
M("div", {
|
|
348
|
+
ref: "trackRef",
|
|
349
|
+
class: "hison-banner-track",
|
|
350
|
+
style: ee(t.trackStyle)
|
|
351
|
+
}, [
|
|
352
|
+
(u(!0), c(te, null, ne(t.slideNodes, (a, h) => (u(), c("div", {
|
|
353
|
+
key: h,
|
|
354
|
+
class: "hison-banner-slide"
|
|
355
|
+
}, [
|
|
356
|
+
(u(), Te(we(a)))
|
|
357
|
+
]))), 128))
|
|
358
|
+
], 4)
|
|
359
|
+
]),
|
|
360
|
+
t.showNavButtons && t.slideCount > 1 ? (u(), c("div", Ue, [
|
|
361
|
+
M("div", Xe, [
|
|
362
|
+
oe(t.$slots, "prev-button", {
|
|
363
|
+
prev: t.goPrev,
|
|
364
|
+
disabled: t.isPrevDisabled
|
|
365
|
+
}, () => [
|
|
366
|
+
ae(l, {
|
|
367
|
+
id: `hison_banner_prev_button_${t.id}`,
|
|
368
|
+
disable: t.isPrevDisabled,
|
|
369
|
+
class: g(["hison-col-12", ...t.buttonClassList]),
|
|
370
|
+
"background-type": "transparent",
|
|
371
|
+
border: !1,
|
|
372
|
+
onClick: t.goPrev
|
|
373
|
+
}, {
|
|
374
|
+
icon: se(() => [
|
|
375
|
+
t.navButtonStyle === "chevron" ? (u(), c("span", je, "〈")) : t.navButtonStyle === "triangle" ? (u(), c("span", qe, "◀")) : X("", !0)
|
|
376
|
+
]),
|
|
377
|
+
_: 1
|
|
378
|
+
}, 8, ["id", "disable", "class", "onClick"])
|
|
379
|
+
])
|
|
380
|
+
]),
|
|
381
|
+
M("div", Ge, [
|
|
382
|
+
oe(t.$slots, "next-button", {
|
|
383
|
+
next: t.goNext,
|
|
384
|
+
disabled: t.isNextDisabled
|
|
385
|
+
}, () => [
|
|
386
|
+
ae(l, {
|
|
387
|
+
id: `hison_banner_next_button_${t.id}`,
|
|
388
|
+
disable: t.isNextDisabled,
|
|
389
|
+
class: g(["hison-col-12", ...t.buttonClassList]),
|
|
390
|
+
"background-type": "transparent",
|
|
391
|
+
border: !1,
|
|
392
|
+
onClick: t.goNext
|
|
393
|
+
}, {
|
|
394
|
+
icon: se(() => [
|
|
395
|
+
t.navButtonStyle === "chevron" ? (u(), c("span", Ke, "〉")) : t.navButtonStyle === "triangle" ? (u(), c("span", Ye, "▶")) : X("", !0)
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
}, 8, ["id", "disable", "class", "onClick"])
|
|
399
|
+
])
|
|
400
|
+
])
|
|
401
|
+
])) : X("", !0),
|
|
402
|
+
t.showIndicators && t.slideCount > 0 ? (u(), c("div", {
|
|
403
|
+
key: 1,
|
|
404
|
+
class: g(["hison-banner-indicators", [t.indicatorsPositionClass]])
|
|
405
|
+
}, [
|
|
406
|
+
(u(!0), c(te, null, ne(t.slideCount, (a) => (u(), c("button", {
|
|
407
|
+
key: a,
|
|
408
|
+
class: g(["hison-banner-indicator", { active: t.currentIndex === a - 1, "no-pointer": !t.indicatorClickable }]),
|
|
409
|
+
title: `Go to ${a}`,
|
|
410
|
+
type: "button",
|
|
411
|
+
onClick: (h) => t.indicatorClickable ? t.goTo(a - 1) : null
|
|
412
|
+
}, " ● ", 10, xe))), 128))
|
|
413
|
+
], 2)) : X("", !0)
|
|
414
|
+
], 38)
|
|
415
|
+
], 2);
|
|
416
|
+
}
|
|
417
|
+
const et = /* @__PURE__ */ Fe(Ve, [["render", Je]]);
|
|
418
|
+
export {
|
|
419
|
+
et as default
|
|
420
|
+
};
|