hisonvue 1.1.1 → 1.1.3
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/dist/{HAccordion-yaZ0sBWj.js → HAccordion-Bc8LHllz.js} +1 -1
- package/dist/{HAccordion-ClPgc3MA.mjs → HAccordion-CYdLZCoO.mjs} +2 -2
- package/dist/{HBaggie-DhMiL1-B.js → HBaggie-XgHTnkp2.js} +1 -1
- package/dist/{HBaggie-BOcwzfs2.mjs → HBaggie-Ywgz5nvV.mjs} +2 -2
- package/dist/{HBanner-CkIr-lzQ.js → HBanner-BcDU3AwV.js} +1 -1
- package/dist/{HBanner-dQdDEjcq.mjs → HBanner-CidWbYwG.mjs} +2 -2
- package/dist/{HButton-CT0Az7ea.js → HButton-B6af0nzb.js} +1 -1
- package/dist/{HButton-CQA9AHfR.mjs → HButton-Bf1WiQNr.mjs} +2 -2
- package/dist/{HCalendar-C7RbTZT9.js → HCalendar-BiiLjDq7.js} +1 -1
- package/dist/{HCalendar-LYKfuBRk.mjs → HCalendar-CQs3-lsy.mjs} +1 -1
- package/dist/{HCaption-hIaWtt1A.mjs → HCaption-CJD8YqTy.mjs} +1 -1
- package/dist/{HCaption-DslrgN-4.js → HCaption-DxXZw4pH.js} +1 -1
- package/dist/{HChart-C_Np6dyj.mjs → HChart-Br_mONmh.mjs} +1 -1
- package/dist/{HChart-Dw1BMCJS.js → HChart-CLxSeQfB.js} +1 -1
- package/dist/{HDrawer-Z7npMmnm.mjs → HDrawer-C_zCEAoj.mjs} +1 -1
- package/dist/{HDrawer-C8dvmJDK.js → HDrawer-QSVck31B.js} +1 -1
- package/dist/{HDropdown-50SbH5xE.mjs → HDropdown-CzKF2cyh.mjs} +128 -119
- package/dist/HDropdown-l_g96ufU.js +1 -0
- package/dist/{HFileset-C8m3Fs_v.mjs → HFileset-B6ezY9_O.mjs} +1 -1
- package/dist/{HFileset-Bu2-UdKj.js → HFileset-CnM1z10l.js} +1 -1
- package/dist/{HGap-D8Iaf-5T.mjs → HGap--qHusiKo.mjs} +1 -1
- package/dist/{HGap-DsJy_QnE.js → HGap-D9TgBL0P.js} +1 -1
- package/dist/{HGrid-GnXheGEH.mjs → HGrid-DWFs2PVH.mjs} +1 -1
- package/dist/{HGrid-1YUZ2y6u.js → HGrid-DZT6UYsc.js} +1 -1
- package/dist/{HImagebox-BxTUweOq.mjs → HImagebox-B6DkNa0s.mjs} +1 -1
- package/dist/{HImagebox-r9i5w5WN.js → HImagebox-C-kUyV2a.js} +1 -1
- package/dist/HInput-DF_oPvVG.js +1 -0
- package/dist/HInput-Dih14jAK.mjs +1217 -0
- package/dist/{HInputGroup-lVdHU36z.js → HInputGroup-CxiRFkpV.js} +1 -1
- package/dist/{HInputGroup-D47YfrUp.mjs → HInputGroup-Czqo_DBM.mjs} +1 -1
- package/dist/HLabel-BFuX1v46.js +1 -0
- package/dist/HLabel-x3QyAn-P.mjs +400 -0
- package/dist/{HLayout-VCGeEX_T.js → HLayout-DHwcSj6Y.js} +1 -1
- package/dist/{HLayout-62BFnvbF.mjs → HLayout-DbIW32b3.mjs} +1 -1
- package/dist/{HList-C7mRWu55.mjs → HList-B0_bqe2X.mjs} +2 -2
- package/dist/{HList-T55xOKTU.js → HList-CGt8QYPb.js} +1 -1
- package/dist/{HModal-C4C4J9GA.js → HModal-Bbq2SffE.js} +1 -1
- package/dist/{HModal-28_wsn_-.mjs → HModal-DaQTId_h.mjs} +1 -1
- package/dist/{HNote-BqW_J3tq.mjs → HNote-BxjGgGT6.mjs} +1 -1
- package/dist/{HNote-RUUsRTzx.js → HNote-CHa35R5J.js} +1 -1
- package/dist/{HPagination-2Qlqr_ZS.mjs → HPagination-BZpSWEEW.mjs} +2 -2
- package/dist/{HPagination-BxRAk9Pi.js → HPagination-OwLtKBDy.js} +1 -1
- package/dist/{HParagraph-DG0-Th1k.mjs → HParagraph-BiOV9AaX.mjs} +112 -104
- package/dist/HParagraph-DA30mUOK.js +1 -0
- package/dist/{HPopup-CMHfS31s.mjs → HPopup-CSWCs1bC.mjs} +1 -1
- package/dist/{HPopup-Cnt1__JS.js → HPopup-CXsLCjT7.js} +1 -1
- package/dist/{HSpinner-CMZ2W-GY.js → HSpinner-B6mWhGkj.js} +1 -1
- package/dist/{HSpinner-C4FmAya2.mjs → HSpinner-DEHdIFhp.mjs} +1 -1
- package/dist/{HTable-Dx5l45_-.js → HTable-BoUCH2Zf.js} +1 -1
- package/dist/{HTable-Bd3ErPRn.mjs → HTable-By0pF5zV.mjs} +1 -1
- package/dist/hisonvue.cjs.js +1 -1
- package/dist/hisonvue.css +1 -1
- package/dist/hisonvue.d.ts +363 -107
- package/dist/hisonvue.es.js +2 -2
- package/dist/{index-CrciHSGg.mjs → index-BC8m9ivd.mjs} +9 -9
- package/dist/{index-CPFyQIpi.js → index-CyZluKOE.js} +3 -3
- package/dist/{setButtonCssEvent-BOWM7Rfs.mjs → setButtonCssEvent-DzPansSE.mjs} +1 -1
- package/dist/{setButtonCssEvent-Dv_zDL0C.js → setButtonCssEvent-fXHkzhY1.js} +1 -1
- package/package.json +1 -1
- package/dist/HDropdown-mSEm-0ZC.js +0 -1
- package/dist/HInput-CcWTYayE.js +0 -1
- package/dist/HInput-DT2SixiY.mjs +0 -1103
- package/dist/HLabel-BlczHNCh.mjs +0 -369
- package/dist/HLabel-vkRYvApC.js +0 -1
- package/dist/HParagraph-B3VkXyh7.js +0 -1
package/dist/HLabel-BlczHNCh.mjs
DELETED
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as a, useSlots as ue, computed as o, Text as re, onMounted as j, onBeforeUnmount as de, watch as n, nextTick as E, unref as fe, createElementBlock as F, openBlock as L, normalizeClass as ve, createBlock as ce, resolveDynamicComponent as be, mergeProps as ge, withKeys as q, withModifiers as V, withCtx as me, renderSlot as he, Fragment as ye, createTextVNode as Te, toDisplayString as z } from "vue";
|
|
2
|
-
import { B as Ae, f as M, T as Ce, g as pe, u as Be, w as b, e as Se, t as ke, b as P, h as w, r as Ie, c as we, d as Ne } from "./index-CrciHSGg.mjs";
|
|
3
|
-
import { r as G, a as Ue } from "./setButtonCssEvent-BOWM7Rfs.mjs";
|
|
4
|
-
import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
5
|
-
const Me = {
|
|
6
|
-
/**
|
|
7
|
-
* Unique identifier for the label.
|
|
8
|
-
* - Access methods via `hison.component.getLabel(id)`
|
|
9
|
-
* - Duplicate `id` will throw at mount time
|
|
10
|
-
*/
|
|
11
|
-
id: { type: String, required: !1 },
|
|
12
|
-
/**
|
|
13
|
-
* Custom class applied to the label (string / array / object all supported).
|
|
14
|
-
* - Works with responsive classes like `hison-col-*`, `hison-size-*`, etc.
|
|
15
|
-
*/
|
|
16
|
-
class: {
|
|
17
|
-
type: [String, Array, Object],
|
|
18
|
-
required: !1
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* Inline style for the label (string, object, or an array of objects).
|
|
22
|
-
*/
|
|
23
|
-
style: {
|
|
24
|
-
type: [String, Object, Array],
|
|
25
|
-
required: !1
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* Controls visibility of the label.
|
|
29
|
-
* - Boolean only. Use `:visible="false"` (with a colon).
|
|
30
|
-
*/
|
|
31
|
-
visible: { type: Boolean, default: !0 },
|
|
32
|
-
/**
|
|
33
|
-
* Tooltip text shown on hover (maps to `title` attribute).
|
|
34
|
-
*/
|
|
35
|
-
title: { type: String, required: !1 },
|
|
36
|
-
/**
|
|
37
|
-
* Text content of the label (alternative to default slot).
|
|
38
|
-
*/
|
|
39
|
-
text: { type: String, required: !1 },
|
|
40
|
-
/**
|
|
41
|
-
* When provided (non-empty), label renders an <a> instead of <span>.
|
|
42
|
-
*/
|
|
43
|
-
href: { type: String, default: null },
|
|
44
|
-
/**
|
|
45
|
-
* Extra attributes forwarded to the underlying `<a>` element when `href` is set.
|
|
46
|
-
* - Maps directly to native anchor/ARIA attributes (e.g., `target`, `rel`, `download`, `aria-label`, ...).
|
|
47
|
-
* - Use this to control accessibility and advanced link behavior.
|
|
48
|
-
*
|
|
49
|
-
* Example:
|
|
50
|
-
* { target: '_blank', rel: 'noopener noreferrer', download: true, 'aria-label': 'External link' }
|
|
51
|
-
*/
|
|
52
|
-
anchorAttrs: {
|
|
53
|
-
type: Object,
|
|
54
|
-
default: () => ({})
|
|
55
|
-
},
|
|
56
|
-
/**
|
|
57
|
-
* Bold font style toggle.
|
|
58
|
-
* - Boolean only
|
|
59
|
-
* - Adds `hison-font-bold` class when enabled
|
|
60
|
-
*/
|
|
61
|
-
fontBold: { type: Boolean, default: !1 },
|
|
62
|
-
/**
|
|
63
|
-
* Italic font style toggle.
|
|
64
|
-
* - Boolean only
|
|
65
|
-
* - Adds `hison-font-italic` class when enabled
|
|
66
|
-
*/
|
|
67
|
-
fontItalic: { type: Boolean, default: !1 },
|
|
68
|
-
/**
|
|
69
|
-
* Strikethrough font style toggle.
|
|
70
|
-
* - Boolean only
|
|
71
|
-
* - Adds `hison-font-thruline` class when enabled
|
|
72
|
-
*/
|
|
73
|
-
fontThruline: { type: Boolean, default: !1 },
|
|
74
|
-
/**
|
|
75
|
-
* Underline font style toggle.
|
|
76
|
-
* - Boolean only
|
|
77
|
-
* - Adds `hison-font-underline` class when enabled
|
|
78
|
-
*/
|
|
79
|
-
fontUnderline: { type: Boolean, default: !1 },
|
|
80
|
-
/**
|
|
81
|
-
* Text alignment for the input’s display text.
|
|
82
|
-
* - 'left' | 'center' | 'right'
|
|
83
|
-
* - Accepts enum `TextAlign` or its literal strings
|
|
84
|
-
*/
|
|
85
|
-
textAlign: {
|
|
86
|
-
type: String,
|
|
87
|
-
default: null,
|
|
88
|
-
validator: (t) => t == null || Ce.includes(t)
|
|
89
|
-
},
|
|
90
|
-
/**
|
|
91
|
-
* Whether to show border (rendered as subtle box-shadow).
|
|
92
|
-
* - Default: false (no border)
|
|
93
|
-
*/
|
|
94
|
-
border: { type: Boolean, default: !1 },
|
|
95
|
-
/**
|
|
96
|
-
* Label background type.
|
|
97
|
-
* - 'filled' | 'empty' | 'transparent'
|
|
98
|
-
* - Default: 'empty'
|
|
99
|
-
*/
|
|
100
|
-
backgroundType: {
|
|
101
|
-
type: String,
|
|
102
|
-
default: M.empty,
|
|
103
|
-
validator: (t) => Ae.includes(t)
|
|
104
|
-
},
|
|
105
|
-
/**
|
|
106
|
-
* Controls keyboard focus order of the element.
|
|
107
|
-
* - `0` enables natural tab navigation, positive numbers set custom order.
|
|
108
|
-
* - `null` or `''` removes tabindex (not focusable).
|
|
109
|
-
*/
|
|
110
|
-
tabIndex: {
|
|
111
|
-
type: [Number, String],
|
|
112
|
-
default: null,
|
|
113
|
-
validator: (t) => t === null || t === "" || !isNaN(+t) && isFinite(+t)
|
|
114
|
-
}
|
|
115
|
-
}, He = ie({
|
|
116
|
-
name: "HLabel",
|
|
117
|
-
props: Me,
|
|
118
|
-
inheritAttrs: !1,
|
|
119
|
-
emits: ["mounted", "responsive-change", "click", "mousedown", "mouseup", "mouseover", "mouseout"],
|
|
120
|
-
setup(t, { emit: s, slots: J }) {
|
|
121
|
-
const g = a(null), m = a(null), r = t.id ? t.id : pe(), i = `hlabel:${r}`, K = Be(), H = ue(), h = a(t.visible), f = a(t.title || ""), y = a(t.textAlign ?? b.left), X = o(() => ({ textAlign: y.value })), v = a(t.href ?? null), u = a({ ...t.anchorAttrs || {} }), c = o(() => !!(v.value && String(v.value).trim())), Y = o(() => {
|
|
122
|
-
const e = { ...u.value };
|
|
123
|
-
return f.value && e.title == null && (e.title = f.value), e.href = v.value || void 0, e.download === !0 && (e.download = ""), String(e.target || "") === "_blank" && (e.rel == null || String(e.rel).trim() === "") && (e.rel = "noopener noreferrer"), e;
|
|
124
|
-
}), N = o(() => H.default ? H.default() : []), $ = o(
|
|
125
|
-
() => N.value.length > 0 && N.value.every((e) => e.type === re)
|
|
126
|
-
), T = o(
|
|
127
|
-
() => !!H.default && !$.value
|
|
128
|
-
), Q = o(() => T.value ? "div" : c.value ? "a" : "span"), A = a(t.fontBold), W = o(() => {
|
|
129
|
-
if (A.value) return "hison-font-bold";
|
|
130
|
-
}), C = a(t.fontItalic), Z = o(() => {
|
|
131
|
-
if (C.value) return "hison-font-italic";
|
|
132
|
-
}), p = a(t.fontThruline), _ = o(() => {
|
|
133
|
-
if (p.value) return "hison-font-thruline-important";
|
|
134
|
-
}), B = a(t.fontUnderline), ee = o(() => {
|
|
135
|
-
if (B.value) return "hison-font-underline-important";
|
|
136
|
-
}), S = a(t.border ?? !1), k = a(t.backgroundType || M.empty), te = o(() => h.value ? "" : "hison-display-none"), le = o(() => S.value ? "hison-border" : ""), ne = o(() => {
|
|
137
|
-
switch (k.value) {
|
|
138
|
-
case M.empty:
|
|
139
|
-
return "hison-bg-empty";
|
|
140
|
-
case M.transparent:
|
|
141
|
-
return "hison-bg-transparent";
|
|
142
|
-
default:
|
|
143
|
-
return "hison-bg-filled";
|
|
144
|
-
}
|
|
145
|
-
}), d = a(t.text || "");
|
|
146
|
-
j(() => {
|
|
147
|
-
if ($.value) {
|
|
148
|
-
const e = N.value.map((l) => String(l.children ?? "")).join("");
|
|
149
|
-
d.value = e;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
const I = a(
|
|
153
|
-
t.tabIndex !== null && t.tabIndex !== "" ? Number(t.tabIndex) : null
|
|
154
|
-
), U = a([]), x = () => {
|
|
155
|
-
U.value = Se(ke(t.class) || "", K.value), P(U.value, "size", w.componentStyle.size), P(U.value, "color", "primary");
|
|
156
|
-
}, ae = (e) => {
|
|
157
|
-
c.value && s("click", e, m.value);
|
|
158
|
-
}, oe = (e) => {
|
|
159
|
-
if (!c.value) return;
|
|
160
|
-
const l = g.value;
|
|
161
|
-
l && l.tagName === "A" && l.click();
|
|
162
|
-
}, O = (e = !0) => {
|
|
163
|
-
const l = g.value;
|
|
164
|
-
l && (G(l), e && c.value && l.tagName === "A" && Ue(l));
|
|
165
|
-
}, R = () => {
|
|
166
|
-
w.component.labelList[r] && w.component.labelList[r].isHisonvueComponent && console.warn(`[Hisonvue] The label ID is at risk of being duplicated. ${r}`), Ie(i, () => {
|
|
167
|
-
D(), E(R);
|
|
168
|
-
}), x(), E(() => O(!0)), m.value = {
|
|
169
|
-
isHisonvueComponent: !0,
|
|
170
|
-
getId: () => r,
|
|
171
|
-
getType: () => "label",
|
|
172
|
-
isVisible: () => h.value,
|
|
173
|
-
setVisible: (e) => {
|
|
174
|
-
h.value = e;
|
|
175
|
-
},
|
|
176
|
-
getTitle: () => f.value,
|
|
177
|
-
setTitle: (e) => {
|
|
178
|
-
f.value = e;
|
|
179
|
-
},
|
|
180
|
-
getText: () => T.value ? "" : d.value,
|
|
181
|
-
setText: (e) => {
|
|
182
|
-
T.value || (d.value = e);
|
|
183
|
-
},
|
|
184
|
-
getHref: () => v.value ?? "",
|
|
185
|
-
setHref: (e) => {
|
|
186
|
-
v.value = e ?? null;
|
|
187
|
-
},
|
|
188
|
-
getAnchorAttrs: () => ({ ...u.value }),
|
|
189
|
-
replaceAnchorAttrs: (e) => {
|
|
190
|
-
u.value = { ...e };
|
|
191
|
-
},
|
|
192
|
-
mergeAnchorAttrs: (e) => {
|
|
193
|
-
u.value = { ...u.value, ...e };
|
|
194
|
-
},
|
|
195
|
-
setAnchorAttr: (e, l) => {
|
|
196
|
-
u.value = { ...u.value, [e]: l };
|
|
197
|
-
},
|
|
198
|
-
removeAnchorAttr: (e) => {
|
|
199
|
-
const l = { ...u.value };
|
|
200
|
-
delete l[e], u.value = l;
|
|
201
|
-
},
|
|
202
|
-
isFontBold: () => A.value,
|
|
203
|
-
setFontBold: (e) => {
|
|
204
|
-
A.value = e;
|
|
205
|
-
},
|
|
206
|
-
isFontItalic: () => C.value,
|
|
207
|
-
setFontItalic: (e) => {
|
|
208
|
-
C.value = e;
|
|
209
|
-
},
|
|
210
|
-
isFontThruline: () => p.value,
|
|
211
|
-
setFontThruline: (e) => {
|
|
212
|
-
p.value = e;
|
|
213
|
-
},
|
|
214
|
-
isFontUnderline: () => B.value,
|
|
215
|
-
setFontUnderline: (e) => {
|
|
216
|
-
B.value = e;
|
|
217
|
-
},
|
|
218
|
-
getTextAlign: () => y.value,
|
|
219
|
-
setTextAlign: (e) => {
|
|
220
|
-
(e === b.left || e === b.center || e === b.right) && (y.value = e);
|
|
221
|
-
},
|
|
222
|
-
isBorder: () => S.value,
|
|
223
|
-
setBorder: (e) => {
|
|
224
|
-
S.value = e;
|
|
225
|
-
},
|
|
226
|
-
getBackgroundType: () => k.value,
|
|
227
|
-
setBackgroundType: (e) => {
|
|
228
|
-
k.value = e;
|
|
229
|
-
},
|
|
230
|
-
reload: () => we(i),
|
|
231
|
-
getTabIndex: () => I.value,
|
|
232
|
-
setTabIndex: (e) => {
|
|
233
|
-
I.value = e != null ? Number(e) : null;
|
|
234
|
-
},
|
|
235
|
-
focus: () => {
|
|
236
|
-
const e = g.value;
|
|
237
|
-
e && c.value && e.tagName === "A" && e.focus();
|
|
238
|
-
}
|
|
239
|
-
}, w.component.labelList[r] = m.value, s("mounted", m.value);
|
|
240
|
-
}, D = () => {
|
|
241
|
-
Ne(i);
|
|
242
|
-
const e = g.value;
|
|
243
|
-
e && G(e), delete w.component.labelList[r];
|
|
244
|
-
};
|
|
245
|
-
return j(R), de(D), n(K, (e) => {
|
|
246
|
-
x(), s("responsive-change", e);
|
|
247
|
-
}), n(c, (e) => {
|
|
248
|
-
E(() => O(e));
|
|
249
|
-
}, { flush: "post" }), n(() => t.visible, (e) => {
|
|
250
|
-
const l = !!e;
|
|
251
|
-
l !== h.value && (h.value = l);
|
|
252
|
-
}), n(() => t.title, (e) => {
|
|
253
|
-
const l = e ?? "";
|
|
254
|
-
l !== f.value && (f.value = l);
|
|
255
|
-
}), n(() => t.text, (e) => {
|
|
256
|
-
if (!T.value) {
|
|
257
|
-
const l = e ?? "";
|
|
258
|
-
l !== d.value && (d.value = l);
|
|
259
|
-
}
|
|
260
|
-
}), n(N, (e) => {
|
|
261
|
-
if ($.value) {
|
|
262
|
-
const l = e.map((se) => String(se.children ?? "")).join("");
|
|
263
|
-
l !== d.value && (d.value = l);
|
|
264
|
-
}
|
|
265
|
-
}), n(() => t.href, (e) => {
|
|
266
|
-
const l = e ?? null;
|
|
267
|
-
l !== v.value && (v.value = l);
|
|
268
|
-
}), n(() => t.anchorAttrs, (e) => {
|
|
269
|
-
const l = { ...e || {} };
|
|
270
|
-
JSON.stringify(l) !== JSON.stringify(u.value) && (u.value = l);
|
|
271
|
-
}), n(() => t.fontBold, (e) => {
|
|
272
|
-
const l = !!e;
|
|
273
|
-
l !== A.value && (A.value = l);
|
|
274
|
-
}), n(() => t.fontItalic, (e) => {
|
|
275
|
-
const l = !!e;
|
|
276
|
-
l !== C.value && (C.value = l);
|
|
277
|
-
}), n(() => t.fontThruline, (e) => {
|
|
278
|
-
const l = !!e;
|
|
279
|
-
l !== p.value && (p.value = l);
|
|
280
|
-
}), n(() => t.fontUnderline, (e) => {
|
|
281
|
-
const l = !!e;
|
|
282
|
-
l !== B.value && (B.value = l);
|
|
283
|
-
}), n(() => t.textAlign, (e) => {
|
|
284
|
-
e && e !== y.value && (e === b.left || e === b.center || e === b.right) && (y.value = e);
|
|
285
|
-
}), n(() => t.border, (e) => {
|
|
286
|
-
const l = !!e;
|
|
287
|
-
l !== S.value && (S.value = l);
|
|
288
|
-
}), n(() => t.backgroundType, (e) => {
|
|
289
|
-
e && e !== k.value && (k.value = e);
|
|
290
|
-
}), n(() => t.tabIndex, (e) => {
|
|
291
|
-
const l = e === null || e === "" ? null : Number(e);
|
|
292
|
-
l !== I.value && (I.value = l);
|
|
293
|
-
}), n(() => t.class, () => {
|
|
294
|
-
x();
|
|
295
|
-
}), {
|
|
296
|
-
labelRef: g,
|
|
297
|
-
labelMethods: o(() => fe(m)),
|
|
298
|
-
props: t,
|
|
299
|
-
title: f,
|
|
300
|
-
hasHref: c,
|
|
301
|
-
hasElementSlot: T,
|
|
302
|
-
renderTag: Q,
|
|
303
|
-
internalText: d,
|
|
304
|
-
computedAnchorAttrs: Y,
|
|
305
|
-
visibleClass: te,
|
|
306
|
-
fontBoldClass: W,
|
|
307
|
-
fontItalicClass: Z,
|
|
308
|
-
fontThrulineClass: _,
|
|
309
|
-
fontUnderlineClass: ee,
|
|
310
|
-
textAlignStyle: X,
|
|
311
|
-
borderClass: le,
|
|
312
|
-
backgroundTypeClass: ne,
|
|
313
|
-
responsiveClassList: U,
|
|
314
|
-
tabIndex: I,
|
|
315
|
-
onClick: ae,
|
|
316
|
-
onKeyActivate: oe
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
}), $e = {
|
|
320
|
-
key: 2,
|
|
321
|
-
class: "hison-label-text"
|
|
322
|
-
};
|
|
323
|
-
function xe(t, s, J, g, m, r) {
|
|
324
|
-
return L(), F("div", {
|
|
325
|
-
class: ve([
|
|
326
|
-
"hison-wrapper",
|
|
327
|
-
...t.responsiveClassList,
|
|
328
|
-
t.visibleClass
|
|
329
|
-
])
|
|
330
|
-
}, [
|
|
331
|
-
(L(), ce(be(t.renderTag), ge({
|
|
332
|
-
ref: "labelRef",
|
|
333
|
-
class: [
|
|
334
|
-
"hison-label",
|
|
335
|
-
t.hasHref ? "hison-label-link" : null,
|
|
336
|
-
t.fontBoldClass,
|
|
337
|
-
t.fontItalicClass,
|
|
338
|
-
t.fontThrulineClass,
|
|
339
|
-
t.fontUnderlineClass,
|
|
340
|
-
t.borderClass,
|
|
341
|
-
t.backgroundTypeClass
|
|
342
|
-
],
|
|
343
|
-
style: [t.textAlignStyle, t.props.style],
|
|
344
|
-
title: t.title || void 0,
|
|
345
|
-
tabindex: t.tabIndex ?? void 0
|
|
346
|
-
}, t.renderTag === "a" ? t.computedAnchorAttrs : void 0, {
|
|
347
|
-
onClick: t.onClick,
|
|
348
|
-
onMousedown: s[0] || (s[0] = (i) => t.$emit("mousedown", i, t.labelMethods)),
|
|
349
|
-
onMouseup: s[1] || (s[1] = (i) => t.$emit("mouseup", i, t.labelMethods)),
|
|
350
|
-
onMouseover: s[2] || (s[2] = (i) => t.$emit("mouseover", i, t.labelMethods)),
|
|
351
|
-
onMouseout: s[3] || (s[3] = (i) => t.$emit("mouseout", i, t.labelMethods)),
|
|
352
|
-
onKeydown: [
|
|
353
|
-
q(V(t.onKeyActivate, ["prevent"]), ["enter"]),
|
|
354
|
-
q(V(t.onKeyActivate, ["prevent"]), ["space"])
|
|
355
|
-
]
|
|
356
|
-
}), {
|
|
357
|
-
default: me(() => [
|
|
358
|
-
t.hasElementSlot ? he(t.$slots, "default", { key: 0 }) : t.hasHref ? (L(), F(ye, { key: 1 }, [
|
|
359
|
-
Te(z(t.internalText), 1)
|
|
360
|
-
], 64)) : (L(), F("span", $e, z(t.internalText), 1))
|
|
361
|
-
]),
|
|
362
|
-
_: 3
|
|
363
|
-
}, 16, ["class", "style", "title", "tabindex", "onClick", "onKeydown"]))
|
|
364
|
-
], 2);
|
|
365
|
-
}
|
|
366
|
-
const Re = /* @__PURE__ */ Le(He, [["render", xe]]);
|
|
367
|
-
export {
|
|
368
|
-
Re as default
|
|
369
|
-
};
|
package/dist/HLabel-vkRYvApC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./index-CPFyQIpi.js"),M=require("./setButtonCssEvent-Dv_zDL0C.js"),Y=require("./_plugin-vue_export-helper-BHFhmbuH.js"),Q={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},href:{type:String,default:null},anchorAttrs:{type:Object,default:()=>({})},fontBold:{type:Boolean,default:!1},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:n=>n==null||o.TEXT_ALIGN_VALUES.includes(n)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:o.BackgroundType.empty,validator:n=>o.BACKGROUND_TYPE_VALUES.includes(n)},tabIndex:{type:[Number,String],default:null,validator:n=>n===null||n===""||!isNaN(+n)&&isFinite(+n)}},W=t.defineComponent({name:"HLabel",props:Q,inheritAttrs:!1,emits:["mounted","responsive-change","click","mousedown","mouseup","mouseover","mouseout"],setup(n,{emit:a,slots:$}){const v=t.ref(null),h=t.ref(null),u=n.id?n.id:o.getUUID(),s=`hlabel:${u}`,E=o.useDevice(),I=t.useSlots(),g=t.ref(n.visible),c=t.ref(n.title||""),m=t.ref(n.textAlign??o.TextAlign.left),F=t.computed(()=>({textAlign:m.value})),d=t.ref(n.href??null),i=t.ref({...n.anchorAttrs||{}}),f=t.computed(()=>!!(d.value&&String(d.value).trim())),q=t.computed(()=>{const e={...i.value};return c.value&&e.title==null&&(e.title=c.value),e.href=d.value||void 0,e.download===!0&&(e.download=""),String(e.target||"")==="_blank"&&(e.rel==null||String(e.rel).trim()==="")&&(e.rel="noopener noreferrer"),e}),w=t.computed(()=>I.default?I.default():[]),x=t.computed(()=>w.value.length>0&&w.value.every(e=>e.type===t.Text)),b=t.computed(()=>!!I.default&&!x.value),K=t.computed(()=>b.value?"div":f.value?"a":"span"),y=t.ref(n.fontBold),O=t.computed(()=>{if(y.value)return"hison-font-bold"}),T=t.ref(n.fontItalic),D=t.computed(()=>{if(T.value)return"hison-font-italic"}),p=t.ref(n.fontThruline),R=t.computed(()=>{if(p.value)return"hison-font-thruline-important"}),A=t.ref(n.fontUnderline),j=t.computed(()=>{if(A.value)return"hison-font-underline-important"}),C=t.ref(n.border??!1),B=t.ref(n.backgroundType||o.BackgroundType.empty),V=t.computed(()=>g.value?"":"hison-display-none"),P=t.computed(()=>C.value?"hison-border":""),z=t.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"}}),r=t.ref(n.text||"");t.onMounted(()=>{if(x.value){const e=w.value.map(l=>String(l.children??"")).join("");r.value=e}});const k=t.ref(n.tabIndex!==null&&n.tabIndex!==""?Number(n.tabIndex):null),S=t.ref([]),N=()=>{S.value=o.extractResponsiveClasses(o.toClassString(n.class)||"",E.value),o.addComponentNameToClass(S.value,"size",o.hisonCloser.componentStyle.size),o.addComponentNameToClass(S.value,"color","primary")},G=e=>{f.value&&a("click",e,h.value)},J=e=>{if(!f.value)return;const l=v.value;l&&l.tagName==="A"&&l.click()},U=(e=!0)=>{const l=v.value;l&&(M.removeButtonCssEvent(l),e&&f.value&&l.tagName==="A"&&M.addButtonCssEvent(l))},H=()=>{o.hisonCloser.component.labelList[u]&&o.hisonCloser.component.labelList[u].isHisonvueComponent&&console.warn(`[Hisonvue] The label ID is at risk of being duplicated. ${u}`),o.registerReloadable(s,()=>{L(),t.nextTick(H)}),N(),t.nextTick(()=>U(!0)),h.value={isHisonvueComponent:!0,getId:()=>u,getType:()=>"label",isVisible:()=>g.value,setVisible:e=>{g.value=e},getTitle:()=>c.value,setTitle:e=>{c.value=e},getText:()=>b.value?"":r.value,setText:e=>{b.value||(r.value=e)},getHref:()=>d.value??"",setHref:e=>{d.value=e??null},getAnchorAttrs:()=>({...i.value}),replaceAnchorAttrs:e=>{i.value={...e}},mergeAnchorAttrs:e=>{i.value={...i.value,...e}},setAnchorAttr:(e,l)=>{i.value={...i.value,[e]:l}},removeAnchorAttr:e=>{const l={...i.value};delete l[e],i.value=l},isFontBold:()=>y.value,setFontBold:e=>{y.value=e},isFontItalic:()=>T.value,setFontItalic:e=>{T.value=e},isFontThruline:()=>p.value,setFontThruline:e=>{p.value=e},isFontUnderline:()=>A.value,setFontUnderline:e=>{A.value=e},getTextAlign:()=>m.value,setTextAlign:e=>{(e===o.TextAlign.left||e===o.TextAlign.center||e===o.TextAlign.right)&&(m.value=e)},isBorder:()=>C.value,setBorder:e=>{C.value=e},getBackgroundType:()=>B.value,setBackgroundType:e=>{B.value=e},reload:()=>o.reloadHisonComponent(s),getTabIndex:()=>k.value,setTabIndex:e=>{k.value=e!=null?Number(e):null},focus:()=>{const e=v.value;e&&f.value&&e.tagName==="A"&&e.focus()}},o.hisonCloser.component.labelList[u]=h.value,a("mounted",h.value)},L=()=>{o.unregisterReloadable(s);const e=v.value;e&&M.removeButtonCssEvent(e),delete o.hisonCloser.component.labelList[u]};return t.onMounted(H),t.onBeforeUnmount(L),t.watch(E,e=>{N(),a("responsive-change",e)}),t.watch(f,e=>{t.nextTick(()=>U(e))},{flush:"post"}),t.watch(()=>n.visible,e=>{const l=!!e;l!==g.value&&(g.value=l)}),t.watch(()=>n.title,e=>{const l=e??"";l!==c.value&&(c.value=l)}),t.watch(()=>n.text,e=>{if(!b.value){const l=e??"";l!==r.value&&(r.value=l)}}),t.watch(w,e=>{if(x.value){const l=e.map(X=>String(X.children??"")).join("");l!==r.value&&(r.value=l)}}),t.watch(()=>n.href,e=>{const l=e??null;l!==d.value&&(d.value=l)}),t.watch(()=>n.anchorAttrs,e=>{const l={...e||{}};JSON.stringify(l)!==JSON.stringify(i.value)&&(i.value=l)}),t.watch(()=>n.fontBold,e=>{const l=!!e;l!==y.value&&(y.value=l)}),t.watch(()=>n.fontItalic,e=>{const l=!!e;l!==T.value&&(T.value=l)}),t.watch(()=>n.fontThruline,e=>{const l=!!e;l!==p.value&&(p.value=l)}),t.watch(()=>n.fontUnderline,e=>{const l=!!e;l!==A.value&&(A.value=l)}),t.watch(()=>n.textAlign,e=>{e&&e!==m.value&&(e===o.TextAlign.left||e===o.TextAlign.center||e===o.TextAlign.right)&&(m.value=e)}),t.watch(()=>n.border,e=>{const l=!!e;l!==C.value&&(C.value=l)}),t.watch(()=>n.backgroundType,e=>{e&&e!==B.value&&(B.value=e)}),t.watch(()=>n.tabIndex,e=>{const l=e===null||e===""?null:Number(e);l!==k.value&&(k.value=l)}),t.watch(()=>n.class,()=>{N()}),{labelRef:v,labelMethods:t.computed(()=>t.unref(h)),props:n,title:c,hasHref:f,hasElementSlot:b,renderTag:K,internalText:r,computedAnchorAttrs:q,visibleClass:V,fontBoldClass:O,fontItalicClass:D,fontThrulineClass:R,fontUnderlineClass:j,textAlignStyle:F,borderClass:P,backgroundTypeClass:z,responsiveClassList:S,tabIndex:k,onClick:G,onKeyActivate:J}}}),Z={key:2,class:"hison-label-text"};function _(n,a,$,v,h,u){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper",...n.responsiveClassList,n.visibleClass])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.renderTag),t.mergeProps({ref:"labelRef",class:["hison-label",n.hasHref?"hison-label-link":null,n.fontBoldClass,n.fontItalicClass,n.fontThrulineClass,n.fontUnderlineClass,n.borderClass,n.backgroundTypeClass],style:[n.textAlignStyle,n.props.style],title:n.title||void 0,tabindex:n.tabIndex??void 0},n.renderTag==="a"?n.computedAnchorAttrs:void 0,{onClick:n.onClick,onMousedown:a[0]||(a[0]=s=>n.$emit("mousedown",s,n.labelMethods)),onMouseup:a[1]||(a[1]=s=>n.$emit("mouseup",s,n.labelMethods)),onMouseover:a[2]||(a[2]=s=>n.$emit("mouseover",s,n.labelMethods)),onMouseout:a[3]||(a[3]=s=>n.$emit("mouseout",s,n.labelMethods)),onKeydown:[t.withKeys(t.withModifiers(n.onKeyActivate,["prevent"]),["enter"]),t.withKeys(t.withModifiers(n.onKeyActivate,["prevent"]),["space"])]}),{default:t.withCtx(()=>[n.hasElementSlot?t.renderSlot(n.$slots,"default",{key:0}):n.hasHref?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.internalText),1)],64)):(t.openBlock(),t.createElementBlock("span",Z,t.toDisplayString(n.internalText),1))]),_:3},16,["class","style","title","tabindex","onClick","onKeydown"]))],2)}const ee=Y._export_sfc(W,[["render",_]]);exports.default=ee;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),a=require("./index-CPFyQIpi.js"),se=require("./_plugin-vue_export-helper-BHFhmbuH.js"),re={id:{type:String,required:!1},class:{type:[String,Array,Object],required:!1},style:{type:[String,Object,Array],required:!1},visible:{type:Boolean,default:!0},title:{type:String,required:!1},text:{type:String,required:!1},fontBold:{type:Boolean,default:!1},fontItalic:{type:Boolean,default:!1},fontThruline:{type:Boolean,default:!1},fontUnderline:{type:Boolean,default:!1},textAlign:{type:String,default:null,validator:n=>n==null||a.TEXT_ALIGN_VALUES.includes(n)},verticalAlign:{type:String,default:a.VerticalAlign.top,validator:n=>a.VERTICAL_ALIGN_VALUES.includes(n)},border:{type:Boolean,default:!1},backgroundType:{type:String,default:a.BackgroundType.empty,validator:n=>a.BACKGROUND_TYPE_VALUES.includes(n)},whiteSpace:{type:String,default:null,validator:n=>n==null||a.WHITE_SPACE_VALUES.includes(n)},copyEnabled:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!1},copyButtonText:{type:String,default:"copy"}},ie=t.defineComponent({name:"HParagraph",props:re,inheritAttrs:!1,emits:["mounted","responsive-change","copy-click","copied","copy-error"],setup(n,{emit:l}){const E=t.ref(null),d=t.ref(null),i=n.id?n.id:a.getUUID(),N=t.computed(()=>`hison_paragraph_copy_button_${i}`),v=`hparagraph:${i}`,u=a.useDevice(),I=t.useSlots(),y=t.ref(n.visible),h=t.ref(n.title||""),p=t.ref(n.text||""),g=t.ref(n.fontBold),C=t.ref(n.fontItalic),m=t.ref(n.fontThruline),b=t.ref(n.fontUnderline),w=t.ref(n.textAlign??a.TextAlign.left),T=t.ref(n.verticalAlign),B=t.ref(n.border),f=t.ref(n.backgroundType),S=t.ref(n.whiteSpace),s=t.ref(n.copyEnabled),k=t.ref(n.showCopyButton),A=t.ref(n.copyButtonText),L=t.computed(()=>I.default?I.default():[]),P=t.computed(()=>L.value.length>0&&L.value.every(e=>e.type===t.Text)),U=t.computed(()=>!!I.default&&!P.value),F=t.computed(()=>!!I.default&&L.value.length>0);t.onMounted(()=>{if(P.value){const e=L.value.map(o=>String(o.children??"")).join("");p.value=e}});const K=t.computed(()=>y.value?"":"hison-display-none"),q=t.computed(()=>B.value?"hison-border":""),z=t.computed(()=>{switch(f.value){case a.BackgroundType.empty:return"hison-bg-empty";case a.BackgroundType.transparent:return"hison-bg-transparent";default:return"hison-bg-filled"}}),M=t.computed(()=>g.value?"hison-font-bold":""),G=t.computed(()=>C.value?"hison-font-italic":""),O=t.computed(()=>m.value?"hison-font-thruline":""),j=t.computed(()=>b.value?"hison-font-underline":""),W=t.computed(()=>s.value?"":"hison-no-select"),V=t.ref([]),R=()=>{V.value=a.extractResponsiveClasses(a.toClassString(n.class)||"",u.value),a.addComponentNameToClass(V.value,"size",a.hisonCloser.componentStyle.size),a.addComponentNameToClass(V.value,"color","primary")},X=t.computed(()=>{const e=[];return e.push(...a.extractPrefixedClasses(a.toClassString(n.class)||"","color")),e}),Y=t.computed(()=>S.value??"pre-wrap"),J=t.computed(()=>{switch(Y.value){case"normal":return"hison-ws-normal";case"pre":return"hison-ws-pre";case"pre-wrap":return"hison-ws-pre-wrap";case"pre-line":return"hison-ws-pre-line";case"break-spaces":return"hison-ws-break-spaces";default:return""}}),Q=t.computed(()=>{switch(w.value){case"center":return"hison-ta-center";case"right":return"hison-ta-right";default:return"hison-ta-left"}}),Z=t.computed(()=>{switch(T.value){case"middle":return"hison-valign-middle";case"bottom":return"hison-valign-bottom";default:return""}}),_=()=>{const e=E.value;return e?e.innerText??"":""},D=async()=>{if(!s.value)return!1;const e=_();try{if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function")return await navigator.clipboard.writeText(e),!0}catch{}try{const o=document.createRange(),c=E.value;if(!c)throw new Error("no element");o.selectNodeContents(c);const r=window.getSelection();r==null||r.removeAllRanges(),r==null||r.addRange(o);const le=document.execCommand("copy");return r==null||r.removeAllRanges(),le}catch{return!1}},$=async(e,o)=>{l("copy-click",{src:e,event:o,api:d.value});try{const c=await D();l("copied",c,d.value)}catch(c){l("copy-error",c,d.value)}},ee=async e=>{await $("button",e)},te=async e=>{const o=/Mac|iPod|iPhone|iPad/.test(navigator.platform),c=(o?e.metaKey:e.ctrlKey)&&(e.key==="c"||e.key==="C"),r=(o?e.metaKey:e.ctrlKey)&&(e.key==="x"||e.key==="X");if(!s.value&&(c||r)){e.preventDefault(),e.stopPropagation();return}s.value&&c&&(e.preventDefault(),e.stopPropagation(),await $("keyboard",e))},ne=async e=>{if(!s.value){e.preventDefault();return}e.preventDefault(),await $("native",e)},oe=e=>{s.value||e.preventDefault()},ae=e=>{s.value||e.preventDefault()},x=()=>{a.hisonCloser.component.paragraphList[i]&&a.hisonCloser.component.paragraphList[i].isHisonvueComponent&&console.warn(`[Hisonvue] The paragraph ID is at risk of being duplicated. ${i}`),a.registerReloadable(v,()=>{H(),t.nextTick(x)}),R(),d.value={isHisonvueComponent:!0,getId:()=>i,getType:()=>"paragraph",isVisible:()=>y.value,setVisible:e=>{y.value=e},getTitle:()=>h.value,setTitle:e=>{h.value=e||""},getText:()=>U.value?"":p.value,setText:e=>{U.value||(p.value=e??"")},getTextAlign:()=>w.value,setTextAlign:e=>{(e==="left"||e==="center"||e==="right")&&(w.value=e)},getVerticalAlign:()=>T.value,setVerticalAlign:e=>{T.value=e},isFontBold:()=>g.value,setFontBold:e=>{g.value=e},isFontItalic:()=>C.value,setFontItalic:e=>{C.value=e},isFontThruline:()=>m.value,setFontThruline:e=>{m.value=e},isFontUnderline:()=>b.value,setFontUnderline:e=>{b.value=e},isBorder:()=>B.value,setBorder:e=>{B.value=e},getBackgroundType:()=>f.value,setBackgroundType:e=>{f.value=e},getWhiteSpace:()=>S.value,setWhiteSpace:e=>{S.value=e},getCopyButtonText:()=>A.value,setCopyButtonText:e=>{A.value=e},isCopyEnabled:()=>s.value,setCopyEnabled:e=>{s.value=e},isShowCopyButton:()=>k.value,setShowCopyButton:e=>{k.value=e},copy:async()=>await D(),reload:()=>a.reloadHisonComponent(v)},a.hisonCloser.component.paragraphList[i]=d.value,l("mounted",d.value)},H=()=>{a.unregisterReloadable(v),delete a.hisonCloser.component.paragraphList[i]};return t.onMounted(x),t.onBeforeUnmount(H),t.watch(u,e=>{R(),l("responsive-change",e)}),t.watch(()=>n.visible,e=>{const o=!!e;o!==y.value&&(y.value=o)}),t.watch(()=>n.title,e=>{const o=e??"";o!==h.value&&(h.value=o)}),t.watch(()=>n.text,e=>{const o=e??"";!U.value&&o!==p.value&&(p.value=o)}),t.watch(()=>n.fontBold,e=>{const o=!!e;o!==g.value&&(g.value=o)}),t.watch(()=>n.fontItalic,e=>{const o=!!e;o!==C.value&&(C.value=o)}),t.watch(()=>n.fontThruline,e=>{const o=!!e;o!==m.value&&(m.value=o)}),t.watch(()=>n.fontUnderline,e=>{const o=!!e;o!==b.value&&(b.value=o)}),t.watch(()=>n.textAlign,e=>{e&&e!==w.value&&(e==="left"||e==="center"||e==="right")&&(w.value=e)}),t.watch(()=>n.verticalAlign,e=>{e&&e!==T.value&&(e==="top"||e==="middle"||e==="bottom")&&(T.value=e)}),t.watch(()=>n.whiteSpace,e=>{const o=e??null;o!==S.value&&(S.value=o)}),t.watch(()=>n.border,e=>{const o=!!e;o!==B.value&&(B.value=o)}),t.watch(()=>n.backgroundType,e=>{e&&e!==f.value&&(f.value=e)}),t.watch(()=>n.copyEnabled,e=>{const o=!!e;o!==s.value&&(s.value=o)}),t.watch(()=>n.showCopyButton,e=>{const o=!!e;o!==k.value&&(k.value=o)}),t.watch(()=>n.copyButtonText,e=>{const o=e??"copy";o!==A.value&&(A.value=o)}),t.watch(()=>n.class,()=>{R()}),{paraRef:E,paragraphMethods:t.computed(()=>t.unref(d)),props:n,id:i,copyButtonId:N,title:h,visibleClass:K,borderClass:q,backgroundType:f,backgroundTypeClass:z,fontBoldClass:M,fontItalicClass:G,fontThrulineClass:O,fontUnderlineClass:j,responsiveClassList:V,buttonClassList:X,internalText:p,copyButtonText:A,copyEnabled:s,showCopyButton:k,hasElementSlot:U,hasAnySlot:F,whiteSpaceClass:J,textAlignClass:Q,verticalAlignClass:Z,copyGuardClass:W,onKeydown:te,onCopyEvent:ne,onCutEvent:oe,onSelectStart:ae,onCopyButtonClick:ee}}}),ue={key:0,class:"hison-paragraph-copybtn"},ce=["title"];function de(n,l,E,d,i,N){const v=t.resolveComponent("HButton");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["hison-wrapper","hison-paragraph-wrapper",...n.responsiveClassList,n.visibleClass])},[n.copyEnabled&&n.showCopyButton?(t.openBlock(),t.createElementBlock("div",ue,[t.renderSlot(n.$slots,"copy-button",{onClick:n.onCopyButtonClick,text:n.copyButtonText},()=>[t.createVNode(v,{id:n.copyButtonId,class:t.normalizeClass([...n.buttonClassList,"hison-size-s"]),border:!0,text:n.copyButtonText,"background-type":n.backgroundType,onClick:n.onCopyButtonClick,title:"Copy content"},t.createSlots({default:t.withCtx(()=>[n.$slots["copy-label"]?t.renderSlot(n.$slots,"copy-label",{key:0}):t.createCommentVNode("",!0)]),_:2},[n.$slots["copy-icon"]?{name:"icon",fn:t.withCtx(()=>[t.renderSlot(n.$slots,"copy-icon")]),key:"0"}:void 0]),1032,["id","class","text","background-type","onClick"])])])):t.createCommentVNode("",!0),t.createElementVNode("p",{ref:"paraRef",class:t.normalizeClass(["hison-paragraph",[n.borderClass,n.backgroundTypeClass,n.fontBoldClass,n.fontItalicClass,n.fontThrulineClass,n.fontUnderlineClass,n.whiteSpaceClass,n.textAlignClass,n.verticalAlignClass,n.copyGuardClass]]),style:t.normalizeStyle(n.props.style),title:n.title||void 0,tabindex:"0",onKeydown:l[0]||(l[0]=(...u)=>n.onKeydown&&n.onKeydown(...u)),onCopy:l[1]||(l[1]=(...u)=>n.onCopyEvent&&n.onCopyEvent(...u)),onCut:l[2]||(l[2]=(...u)=>n.onCutEvent&&n.onCutEvent(...u)),onSelectstart:l[3]||(l[3]=(...u)=>n.onSelectStart&&n.onSelectStart(...u))},[n.hasElementSlot?t.renderSlot(n.$slots,"default",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(n.internalText),1)],64))],46,ce)],2)}const pe=se._export_sfc(ie,[["render",de]]);exports.default=pe;
|