@histoire/controls 0.10.6 → 0.11.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/dist/components/HstCopyIcon.vue.d.ts +1 -1
- package/dist/components/HstWrapper.vue.d.ts +1 -1
- package/dist/components/checkbox/HstCheckbox.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstColorShades.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstColorShades.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenGrid.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenGrid.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenList.story.vue.d.ts +1 -1
- package/dist/components/design-tokens/HstTokenList.vue.d.ts +1 -1
- package/dist/components/number/HstNumber.story.vue.d.ts +1 -1
- package/dist/components/radio/HstRadio.story.vue.d.ts +1 -1
- package/dist/components/select/HstSelect.story.vue.d.ts +1 -1
- package/dist/components/slider/HstSlider.story.vue.d.ts +1 -1
- package/dist/components/text/HstText.story.vue.d.ts +1 -1
- package/dist/components/textarea/HstTextarea.story.vue.d.ts +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.es.js +564 -739
- package/dist/style-standalone.css +0 -47
- package/package.json +5 -4
- package/src/index.ts +2 -0
- package/vite.config.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,262 +1,215 @@
|
|
|
1
|
-
import { defineComponent, openBlock, createElementBlock, withDirectives, createTextVNode, toDisplayString, unref, createElementVNode, renderSlot, ref, computed, watch, createBlock, withKeys, withModifiers, withCtx, normalizeClass, normalizeStyle, mergeProps, onUnmounted, isRef, vModelText, createCommentVNode, Fragment, renderList, createVNode } from "@histoire/vendors/vue";
|
|
2
|
-
import { VTooltip, Dropdown } from "@histoire/vendors/floating-vue";
|
|
3
|
-
import { Icon } from "@histoire/vendors/iconify";
|
|
4
|
-
import { useClipboard } from "@histoire/vendors/vue-use";
|
|
5
|
-
const
|
|
6
|
-
const _hoisted_2$7 = { class: "htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0" };
|
|
7
|
-
const _hoisted_3$6 = { class: "htw-grow htw-flex htw-items-center htw-gap-1" };
|
|
8
|
-
const _hoisted_4$4 = { class: "htw-block htw-grow" };
|
|
9
|
-
const __default__$c = {
|
|
1
|
+
import { defineComponent as _, openBlock as i, createElementBlock as m, withDirectives as V, createTextVNode as M, toDisplayString as k, unref as w, createElementVNode as c, renderSlot as g, ref as b, computed as y, watch as K, createBlock as f, withKeys as A, withModifiers as j, withCtx as v, normalizeClass as x, normalizeStyle as S, mergeProps as O, onUnmounted as R, isRef as D, vModelText as B, createCommentVNode as H, Fragment as E, renderList as L, createVNode as I } from "@histoire/vendors/vue";
|
|
2
|
+
import { VTooltip as N, Dropdown as G } from "@histoire/vendors/floating-vue";
|
|
3
|
+
import { Icon as U } from "@histoire/vendors/iconify";
|
|
4
|
+
import { useClipboard as P } from "@histoire/vendors/vue-use";
|
|
5
|
+
const W = { class: "htw-p-2 hover:htw-bg-primary-100 dark:hover:htw-bg-primary-800 htw-flex htw-gap-2 htw-flex-wrap" }, X = { class: "htw-w-28 htw-whitespace-nowrap htw-text-ellipsis htw-overflow-hidden htw-shrink-0" }, J = { class: "htw-grow htw-flex htw-items-center htw-gap-1" }, q = { class: "htw-block htw-grow" }, Q = {
|
|
10
6
|
name: "HstWrapper"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
...__default__$c,
|
|
7
|
+
}, z = /* @__PURE__ */ _({
|
|
8
|
+
...Q,
|
|
14
9
|
props: {
|
|
15
10
|
title: null
|
|
16
11
|
},
|
|
17
|
-
setup(
|
|
18
|
-
return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
setup(s) {
|
|
13
|
+
return (h, a) => (i(), m("label", W, [
|
|
14
|
+
V((i(), m("span", X, [
|
|
15
|
+
M(k(s.title), 1)
|
|
16
|
+
])), [
|
|
17
|
+
[w(N), {
|
|
18
|
+
content: s.title,
|
|
19
|
+
placement: "left",
|
|
20
|
+
distance: 12
|
|
21
|
+
}]
|
|
22
|
+
]),
|
|
23
|
+
c("span", J, [
|
|
24
|
+
c("span", q, [
|
|
25
|
+
g(h.$slots, "default")
|
|
28
26
|
]),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
]),
|
|
33
|
-
renderSlot(_ctx.$slots, "actions")
|
|
34
|
-
])
|
|
35
|
-
]);
|
|
36
|
-
};
|
|
27
|
+
g(h.$slots, "actions")
|
|
28
|
+
])
|
|
29
|
+
]));
|
|
37
30
|
}
|
|
38
|
-
})
|
|
39
|
-
const _hoisted_1$8 = { class: "htw-text-white htw-w-[16px] htw-h-[16px] htw-relative" };
|
|
40
|
-
const _hoisted_2$6 = {
|
|
31
|
+
}), Y = { class: "htw-text-white htw-w-[16px] htw-h-[16px] htw-relative" }, Z = {
|
|
41
32
|
width: "16",
|
|
42
33
|
height: "16",
|
|
43
34
|
viewBox: "0 0 24 24",
|
|
44
35
|
class: "htw-relative htw-z-10"
|
|
45
|
-
}
|
|
46
|
-
const _hoisted_3$5 = ["stroke-dasharray", "stroke-dashoffset"];
|
|
47
|
-
const __default__$b = {
|
|
36
|
+
}, tt = ["stroke-dasharray", "stroke-dashoffset"], et = {
|
|
48
37
|
name: "HstCheckbox"
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
...__default__$b,
|
|
38
|
+
}, st = /* @__PURE__ */ _({
|
|
39
|
+
...et,
|
|
52
40
|
props: {
|
|
53
41
|
modelValue: { type: Boolean },
|
|
54
42
|
title: null
|
|
55
43
|
},
|
|
56
44
|
emits: {
|
|
57
|
-
"update:modelValue": (
|
|
45
|
+
"update:modelValue": (s) => !0
|
|
58
46
|
},
|
|
59
|
-
setup(
|
|
60
|
-
const
|
|
61
|
-
function
|
|
62
|
-
|
|
63
|
-
animationEnabled.value = true;
|
|
47
|
+
setup(s, { emit: h }) {
|
|
48
|
+
const a = s;
|
|
49
|
+
function o() {
|
|
50
|
+
h("update:modelValue", !a.modelValue), l.value = !0;
|
|
64
51
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}, null, 10, _hoisted_3$5)
|
|
111
|
-
]))
|
|
112
|
-
])
|
|
113
|
-
]),
|
|
114
|
-
_: 3
|
|
115
|
-
}, 8, ["title"]);
|
|
116
|
-
};
|
|
52
|
+
const n = b(), u = b(0), t = y(() => a.modelValue ? 1 : 0), e = y(() => (1 - t.value) * u.value), l = b(!1);
|
|
53
|
+
return K(n, () => {
|
|
54
|
+
var r, d, p;
|
|
55
|
+
u.value = (p = (d = (r = n.value).getTotalLength) == null ? void 0 : d.call(r)) != null ? p : 21.21;
|
|
56
|
+
}), (r, d) => (i(), f(z, {
|
|
57
|
+
role: "checkbox",
|
|
58
|
+
tabindex: "0",
|
|
59
|
+
class: "htw-cursor-pointer htw-items-center",
|
|
60
|
+
title: s.title,
|
|
61
|
+
onClick: d[0] || (d[0] = (p) => o()),
|
|
62
|
+
onKeydown: [
|
|
63
|
+
d[1] || (d[1] = A(j((p) => o(), ["prevent"]), ["enter"])),
|
|
64
|
+
d[2] || (d[2] = A(j((p) => o(), ["prevent"]), ["space"]))
|
|
65
|
+
]
|
|
66
|
+
}, {
|
|
67
|
+
actions: v(() => [
|
|
68
|
+
g(r.$slots, "actions")
|
|
69
|
+
]),
|
|
70
|
+
default: v(() => [
|
|
71
|
+
c("div", Y, [
|
|
72
|
+
c("div", {
|
|
73
|
+
class: x(["htw-border htw-border-solid group-active:htw-bg-gray-500/20 htw-rounded-sm htw-box-border htw-absolute htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out", [
|
|
74
|
+
s.modelValue ? "htw-border-primary-500 htw-border-8" : "htw-border-black/25 dark:htw-border-white/25 htw-delay-150"
|
|
75
|
+
]])
|
|
76
|
+
}, null, 2),
|
|
77
|
+
(i(), m("svg", Z, [
|
|
78
|
+
c("path", {
|
|
79
|
+
ref_key: "path",
|
|
80
|
+
ref: n,
|
|
81
|
+
d: "m 4 12 l 5 5 l 10 -10",
|
|
82
|
+
fill: "none",
|
|
83
|
+
class: x(["htw-stroke-white htw-stroke-2 htw-duration-200 htw-ease-in-out", [
|
|
84
|
+
l.value ? "htw-transition-all" : "htw-transition-none",
|
|
85
|
+
{
|
|
86
|
+
"htw-delay-150": s.modelValue
|
|
87
|
+
}
|
|
88
|
+
]]),
|
|
89
|
+
"stroke-dasharray": u.value,
|
|
90
|
+
"stroke-dashoffset": w(e)
|
|
91
|
+
}, null, 10, tt)
|
|
92
|
+
]))
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
_: 3
|
|
96
|
+
}, 8, ["title"]));
|
|
117
97
|
}
|
|
118
|
-
})
|
|
119
|
-
const _hoisted_1$7 = ["value"];
|
|
120
|
-
const __default__$a = {
|
|
98
|
+
}), lt = ["value"], nt = {
|
|
121
99
|
name: "HstText"
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
...__default__$a,
|
|
100
|
+
}, ot = /* @__PURE__ */ _({
|
|
101
|
+
...nt,
|
|
125
102
|
props: {
|
|
126
103
|
title: null,
|
|
127
104
|
modelValue: null
|
|
128
105
|
},
|
|
129
106
|
emits: {
|
|
130
|
-
"update:modelValue": (
|
|
107
|
+
"update:modelValue": (s) => !0
|
|
131
108
|
},
|
|
132
|
-
setup(
|
|
133
|
-
const
|
|
134
|
-
return (
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
actions
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}, 8, ["title", "class", "style"]);
|
|
157
|
-
};
|
|
109
|
+
setup(s, { emit: h }) {
|
|
110
|
+
const a = b();
|
|
111
|
+
return (o, n) => (i(), f(z, {
|
|
112
|
+
title: s.title,
|
|
113
|
+
class: x(["htw-cursor-text htw-items-center", o.$attrs.class]),
|
|
114
|
+
style: S(o.$attrs.style),
|
|
115
|
+
onClick: n[1] || (n[1] = (u) => a.value.focus())
|
|
116
|
+
}, {
|
|
117
|
+
actions: v(() => [
|
|
118
|
+
g(o.$slots, "actions")
|
|
119
|
+
]),
|
|
120
|
+
default: v(() => [
|
|
121
|
+
c("input", O({
|
|
122
|
+
ref_key: "input",
|
|
123
|
+
ref: a
|
|
124
|
+
}, { ...o.$attrs, class: null, style: null }, {
|
|
125
|
+
type: "text",
|
|
126
|
+
value: s.modelValue,
|
|
127
|
+
class: "htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm",
|
|
128
|
+
onInput: n[0] || (n[0] = (u) => h("update:modelValue", u.target.value))
|
|
129
|
+
}), null, 16, lt)
|
|
130
|
+
]),
|
|
131
|
+
_: 3
|
|
132
|
+
}, 8, ["title", "class", "style"]));
|
|
158
133
|
}
|
|
159
|
-
})
|
|
160
|
-
const __default__$9 = {
|
|
134
|
+
}), rt = {
|
|
161
135
|
name: "HstNumber",
|
|
162
|
-
inheritAttrs:
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
...__default__$9,
|
|
136
|
+
inheritAttrs: !1
|
|
137
|
+
}, at = /* @__PURE__ */ _({
|
|
138
|
+
...rt,
|
|
166
139
|
props: {
|
|
167
140
|
title: null,
|
|
168
141
|
modelValue: null
|
|
169
142
|
},
|
|
170
143
|
emits: {
|
|
171
|
-
"update:modelValue": (
|
|
144
|
+
"update:modelValue": (s) => !0
|
|
172
145
|
},
|
|
173
|
-
setup(
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
emit("update:modelValue", value);
|
|
146
|
+
setup(s, { emit: h }) {
|
|
147
|
+
const a = s, o = y({
|
|
148
|
+
get: () => a.modelValue,
|
|
149
|
+
set: ($) => {
|
|
150
|
+
h("update:modelValue", $);
|
|
179
151
|
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
input.value.focus();
|
|
184
|
-
input.value.select();
|
|
152
|
+
}), n = b();
|
|
153
|
+
function u() {
|
|
154
|
+
n.value.focus(), n.value.select();
|
|
185
155
|
}
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
isDragging.value = true;
|
|
191
|
-
startX = event.clientX;
|
|
192
|
-
startValue = numberModel.value;
|
|
193
|
-
window.addEventListener("mousemove", onMouseMove);
|
|
194
|
-
window.addEventListener("mouseup", stopDragging);
|
|
156
|
+
const t = b(!1);
|
|
157
|
+
let e, l;
|
|
158
|
+
function r($) {
|
|
159
|
+
t.value = !0, e = $.clientX, l = o.value, window.addEventListener("mousemove", d), window.addEventListener("mouseup", p);
|
|
195
160
|
}
|
|
196
|
-
function
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
step = 1;
|
|
200
|
-
}
|
|
201
|
-
numberModel.value = startValue + Math.round((event.clientX - startX) / 10 / step) * step;
|
|
161
|
+
function d($) {
|
|
162
|
+
let C = parseFloat(n.value.step);
|
|
163
|
+
isNaN(C) && (C = 1), o.value = l + Math.round(($.clientX - e) / 10 / C) * C;
|
|
202
164
|
}
|
|
203
|
-
function
|
|
204
|
-
|
|
205
|
-
window.removeEventListener("mousemove", onMouseMove);
|
|
206
|
-
window.removeEventListener("mouseup", stopDragging);
|
|
165
|
+
function p() {
|
|
166
|
+
t.value = !1, window.removeEventListener("mousemove", d), window.removeEventListener("mouseup", p);
|
|
207
167
|
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
_: 3
|
|
245
|
-
}, 8, ["title", "class", "style"]);
|
|
246
|
-
};
|
|
168
|
+
return R(() => {
|
|
169
|
+
p();
|
|
170
|
+
}), ($, C) => (i(), f(z, {
|
|
171
|
+
class: x(["htw-cursor-ew-resize htw-items-center", [
|
|
172
|
+
$.$attrs.class,
|
|
173
|
+
{ "htw-select-none": t.value }
|
|
174
|
+
]]),
|
|
175
|
+
title: s.title,
|
|
176
|
+
style: S($.$attrs.style),
|
|
177
|
+
onClick: u,
|
|
178
|
+
onMousedown: r
|
|
179
|
+
}, {
|
|
180
|
+
actions: v(() => [
|
|
181
|
+
g($.$slots, "actions")
|
|
182
|
+
]),
|
|
183
|
+
default: v(() => [
|
|
184
|
+
V(c("input", O({
|
|
185
|
+
ref_key: "input",
|
|
186
|
+
ref: n
|
|
187
|
+
}, { ...$.$attrs, class: null, style: null }, {
|
|
188
|
+
"onUpdate:modelValue": C[0] || (C[0] = (F) => D(o) ? o.value = F : null),
|
|
189
|
+
type: "number",
|
|
190
|
+
class: [{
|
|
191
|
+
"htw-select-none": t.value
|
|
192
|
+
}, "htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-pl-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm htw-cursor-ew-resize"]
|
|
193
|
+
}), null, 16), [
|
|
194
|
+
[
|
|
195
|
+
B,
|
|
196
|
+
w(o),
|
|
197
|
+
void 0,
|
|
198
|
+
{ number: !0 }
|
|
199
|
+
]
|
|
200
|
+
])
|
|
201
|
+
]),
|
|
202
|
+
_: 3
|
|
203
|
+
}, 8, ["title", "class", "style"]));
|
|
247
204
|
}
|
|
248
205
|
});
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
/* @__PURE__ */ createElementVNode("div", { class: "htw-border htw-border-black/25 dark:htw-border-white/25 htw-h-1 htw-w-full htw-rounded-full" })
|
|
253
|
-
], -1);
|
|
254
|
-
const __default__$8 = {
|
|
206
|
+
const ut = { class: "htw-relative htw-w-full htw-flex htw-items-center" }, it = /* @__PURE__ */ c("div", { class: "htw-absolute htw-inset-0 htw-flex htw-items-center" }, [
|
|
207
|
+
/* @__PURE__ */ c("div", { class: "htw-border htw-border-black/25 dark:htw-border-white/25 htw-h-1 htw-w-full htw-rounded-full" })
|
|
208
|
+
], -1), ht = {
|
|
255
209
|
name: "HstSlider",
|
|
256
|
-
inheritAttrs:
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
...__default__$8,
|
|
210
|
+
inheritAttrs: !1
|
|
211
|
+
}, ct = /* @__PURE__ */ _({
|
|
212
|
+
...ht,
|
|
260
213
|
props: {
|
|
261
214
|
title: null,
|
|
262
215
|
modelValue: null,
|
|
@@ -264,604 +217,476 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
264
217
|
max: null
|
|
265
218
|
},
|
|
266
219
|
emits: {
|
|
267
|
-
"update:modelValue": (
|
|
220
|
+
"update:modelValue": (s) => !0
|
|
268
221
|
},
|
|
269
|
-
setup(
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
get: () => props.modelValue,
|
|
275
|
-
set: (value) => {
|
|
276
|
-
emit("update:modelValue", value);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
const percentage = computed(() => {
|
|
280
|
-
return (props.modelValue - props.min) / (props.max - props.min);
|
|
281
|
-
});
|
|
282
|
-
const tooltipStyle = computed(() => {
|
|
283
|
-
const gap = 8;
|
|
284
|
-
if (input.value) {
|
|
285
|
-
const position = gap + (input.value.clientWidth - 2 * gap) * percentage.value;
|
|
286
|
-
return {
|
|
287
|
-
left: position + "px"
|
|
288
|
-
};
|
|
222
|
+
setup(s, { emit: h }) {
|
|
223
|
+
const a = s, o = b(!1), n = b(null), u = y({
|
|
224
|
+
get: () => a.modelValue,
|
|
225
|
+
set: (l) => {
|
|
226
|
+
h("update:modelValue", l);
|
|
289
227
|
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
};
|
|
228
|
+
}), t = y(() => (a.modelValue - a.min) / (a.max - a.min)), e = y(() => n.value ? {
|
|
229
|
+
left: 8 + (n.value.clientWidth - 16) * t.value + "px"
|
|
230
|
+
} : {});
|
|
231
|
+
return (l, r) => (i(), f(z, {
|
|
232
|
+
class: x(["htw-items-center", l.$attrs.class]),
|
|
233
|
+
title: s.title,
|
|
234
|
+
style: S(l.$attrs.style)
|
|
235
|
+
}, {
|
|
236
|
+
default: v(() => [
|
|
237
|
+
c("div", ut, [
|
|
238
|
+
it,
|
|
239
|
+
V(c("input", O({
|
|
240
|
+
ref_key: "input",
|
|
241
|
+
ref: n,
|
|
242
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => D(u) ? u.value = d : null),
|
|
243
|
+
class: "htw-range-input htw-appearance-none htw-border-0 htw-bg-transparent htw-cursor-pointer htw-relative htw-w-full htw-m-0 htw-text-gray-700",
|
|
244
|
+
type: "range"
|
|
245
|
+
}, { ...l.$attrs, class: null, style: null, min: s.min, max: s.max }, {
|
|
246
|
+
onMouseover: r[1] || (r[1] = (d) => o.value = !0),
|
|
247
|
+
onMouseleave: r[2] || (r[2] = (d) => o.value = !1)
|
|
248
|
+
}), null, 16), [
|
|
249
|
+
[
|
|
250
|
+
B,
|
|
251
|
+
w(u),
|
|
252
|
+
void 0,
|
|
253
|
+
{ number: !0 }
|
|
254
|
+
]
|
|
255
|
+
]),
|
|
256
|
+
o.value ? V((i(), m("div", {
|
|
257
|
+
key: 0,
|
|
258
|
+
class: "htw-absolute",
|
|
259
|
+
style: S(w(e))
|
|
260
|
+
}, null, 4)), [
|
|
261
|
+
[w(N), { content: s.modelValue.toString(), shown: !0, distance: 16, delay: 0 }]
|
|
262
|
+
]) : H("", !0)
|
|
263
|
+
])
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}, 8, ["title", "class", "style"]));
|
|
330
267
|
}
|
|
331
|
-
})
|
|
332
|
-
const _hoisted_1$5 = ["value"];
|
|
333
|
-
const __default__$7 = {
|
|
268
|
+
}), dt = ["value"], wt = {
|
|
334
269
|
name: "HstTextarea",
|
|
335
|
-
inheritAttrs:
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
...__default__$7,
|
|
270
|
+
inheritAttrs: !1
|
|
271
|
+
}, mt = /* @__PURE__ */ _({
|
|
272
|
+
...wt,
|
|
339
273
|
props: {
|
|
340
274
|
title: null,
|
|
341
275
|
modelValue: null
|
|
342
276
|
},
|
|
343
277
|
emits: {
|
|
344
|
-
"update:modelValue": (
|
|
278
|
+
"update:modelValue": (s) => !0
|
|
345
279
|
},
|
|
346
|
-
setup(
|
|
347
|
-
const
|
|
348
|
-
return (
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
actions
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}, 8, ["title", "class", "style"]);
|
|
370
|
-
};
|
|
280
|
+
setup(s, { emit: h }) {
|
|
281
|
+
const a = b();
|
|
282
|
+
return (o, n) => (i(), f(z, {
|
|
283
|
+
title: s.title,
|
|
284
|
+
class: x(["htw-cursor-text", o.$attrs.class]),
|
|
285
|
+
style: S(o.$attrs.style),
|
|
286
|
+
onClick: n[1] || (n[1] = (u) => a.value.focus())
|
|
287
|
+
}, {
|
|
288
|
+
actions: v(() => [
|
|
289
|
+
g(o.$slots, "actions")
|
|
290
|
+
]),
|
|
291
|
+
default: v(() => [
|
|
292
|
+
c("textarea", O({
|
|
293
|
+
ref_key: "input",
|
|
294
|
+
ref: a
|
|
295
|
+
}, { ...o.$attrs, class: null, style: null }, {
|
|
296
|
+
value: s.modelValue,
|
|
297
|
+
class: "htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm htw-box-border htw-resize-y htw-min-h-[26px]",
|
|
298
|
+
onInput: n[0] || (n[0] = (u) => h("update:modelValue", u.target.value))
|
|
299
|
+
}), null, 16, dt)
|
|
300
|
+
]),
|
|
301
|
+
_: 3
|
|
302
|
+
}, 8, ["title", "class", "style"]));
|
|
371
303
|
}
|
|
372
304
|
});
|
|
373
|
-
|
|
374
|
-
const _hoisted_1$4 = { class: "htw-cursor-pointer htw-w-full htw-outline-none htw-px-2 htw-h-[27px] -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 hover:htw-border-primary-500 dark:hover:htw-border-primary-500 htw-rounded-sm htw-flex htw-gap-2 htw-items-center htw-leading-normal" };
|
|
375
|
-
const _hoisted_2$4 = { class: "htw-flex-1 htw-truncate" };
|
|
376
|
-
const _hoisted_3$4 = { class: "htw-flex htw-flex-col htw-bg-gray-50 dark:htw-bg-gray-700" };
|
|
377
|
-
const _hoisted_4$3 = ["onClick"];
|
|
378
|
-
const __default__$6 = {
|
|
305
|
+
const pt = { class: "htw-cursor-pointer htw-w-full htw-outline-none htw-px-2 htw-h-[27px] -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 hover:htw-border-primary-500 dark:hover:htw-border-primary-500 htw-rounded-sm htw-flex htw-gap-2 htw-items-center htw-leading-normal" }, ft = { class: "htw-flex-1 htw-truncate" }, vt = { class: "htw-flex htw-flex-col htw-bg-gray-50 dark:htw-bg-gray-700" }, yt = ["onClick"], bt = {
|
|
379
306
|
name: "CustomSelect"
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
...__default__$6,
|
|
307
|
+
}, _t = /* @__PURE__ */ _({
|
|
308
|
+
...bt,
|
|
383
309
|
props: {
|
|
384
310
|
modelValue: null,
|
|
385
311
|
options: null
|
|
386
312
|
},
|
|
387
313
|
emits: ["update:modelValue"],
|
|
388
|
-
setup(
|
|
389
|
-
const
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
return props.options.map((option) => {
|
|
393
|
-
if (typeof option === "string") {
|
|
394
|
-
return [option, option];
|
|
395
|
-
} else {
|
|
396
|
-
return [option.value, option.label];
|
|
397
|
-
}
|
|
398
|
-
});
|
|
399
|
-
} else {
|
|
400
|
-
return Object.entries(props.options);
|
|
401
|
-
}
|
|
314
|
+
setup(s, { emit: h }) {
|
|
315
|
+
const a = s, o = y(() => Array.isArray(a.options) ? a.options.map((t) => typeof t == "string" ? [t, t] : [t.value, t.label]) : Object.entries(a.options)), n = y(() => {
|
|
316
|
+
var t;
|
|
317
|
+
return (t = o.value.find(([e]) => e === a.modelValue)) == null ? void 0 : t[1];
|
|
402
318
|
});
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
return (_a = formattedOptions.value.find(([value]) => value === props.modelValue)) == null ? void 0 : _a[1];
|
|
406
|
-
});
|
|
407
|
-
function selectValue(value, hide) {
|
|
408
|
-
emits("update:modelValue", value);
|
|
409
|
-
hide();
|
|
319
|
+
function u(t, e) {
|
|
320
|
+
h("update:modelValue", t), e();
|
|
410
321
|
}
|
|
411
|
-
return (
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
]),
|
|
439
|
-
_: 3
|
|
440
|
-
});
|
|
441
|
-
};
|
|
322
|
+
return (t, e) => (i(), f(w(G), { "auto-size": "" }, {
|
|
323
|
+
popper: v(({ hide: l }) => [
|
|
324
|
+
c("div", vt, [
|
|
325
|
+
(i(!0), m(E, null, L(w(o), ([r, d]) => (i(), m("div", O({ ...t.$attrs, class: null, style: null }, {
|
|
326
|
+
key: d,
|
|
327
|
+
class: ["htw-px-2 htw-py-1 htw-cursor-pointer hover:htw-bg-primary-100 dark:hover:htw-bg-primary-700", {
|
|
328
|
+
"htw-bg-primary-200 dark:htw-bg-primary-800": a.modelValue === r
|
|
329
|
+
}],
|
|
330
|
+
onClick: (p) => u(r, l)
|
|
331
|
+
}), k(d), 17, yt))), 128))
|
|
332
|
+
])
|
|
333
|
+
]),
|
|
334
|
+
default: v(() => [
|
|
335
|
+
c("div", pt, [
|
|
336
|
+
c("div", ft, [
|
|
337
|
+
g(t.$slots, "default", { label: w(n) }, () => [
|
|
338
|
+
M(k(w(n)), 1)
|
|
339
|
+
])
|
|
340
|
+
]),
|
|
341
|
+
I(w(U), {
|
|
342
|
+
icon: "carbon:chevron-sort",
|
|
343
|
+
class: "htw-w-4 htw-h-4 htw-flex-none htw-ml-auto"
|
|
344
|
+
})
|
|
345
|
+
])
|
|
346
|
+
]),
|
|
347
|
+
_: 3
|
|
348
|
+
}));
|
|
442
349
|
}
|
|
443
|
-
})
|
|
444
|
-
const __default__$5 = {
|
|
350
|
+
}), $t = {
|
|
445
351
|
name: "HstSelect"
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
...__default__$5,
|
|
352
|
+
}, gt = /* @__PURE__ */ _({
|
|
353
|
+
...$t,
|
|
449
354
|
props: {
|
|
450
355
|
title: null,
|
|
451
356
|
modelValue: null,
|
|
452
357
|
options: null
|
|
453
358
|
},
|
|
454
359
|
emits: ["update:modelValue"],
|
|
455
|
-
setup(
|
|
456
|
-
return (
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
actions
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}, 8, ["title", "class", "style"]);
|
|
474
|
-
};
|
|
360
|
+
setup(s, { emit: h }) {
|
|
361
|
+
return (a, o) => (i(), f(z, {
|
|
362
|
+
title: s.title,
|
|
363
|
+
class: x(["htw-cursor-text htw-items-center", a.$attrs.class]),
|
|
364
|
+
style: S(a.$attrs.style)
|
|
365
|
+
}, {
|
|
366
|
+
actions: v(() => [
|
|
367
|
+
g(a.$slots, "actions")
|
|
368
|
+
]),
|
|
369
|
+
default: v(() => [
|
|
370
|
+
I(_t, {
|
|
371
|
+
options: s.options,
|
|
372
|
+
"model-value": s.modelValue,
|
|
373
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => h("update:modelValue", n))
|
|
374
|
+
}, null, 8, ["options", "model-value"])
|
|
375
|
+
]),
|
|
376
|
+
_: 3
|
|
377
|
+
}, 8, ["title", "class", "style"]));
|
|
475
378
|
}
|
|
476
|
-
})
|
|
477
|
-
const __default__$4 = {
|
|
379
|
+
}), xt = {
|
|
478
380
|
name: "HstCopyIcon"
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
...__default__$4,
|
|
381
|
+
}, T = /* @__PURE__ */ _({
|
|
382
|
+
...xt,
|
|
482
383
|
props: {
|
|
483
384
|
content: null
|
|
484
385
|
},
|
|
485
|
-
setup(
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
delay: 0
|
|
501
|
-
}]
|
|
502
|
-
]);
|
|
503
|
-
};
|
|
386
|
+
setup(s) {
|
|
387
|
+
const h = s, { copy: a, copied: o } = P(), n = () => a(h.content);
|
|
388
|
+
return (u, t) => V((i(), f(w(U), {
|
|
389
|
+
icon: "carbon:copy-file",
|
|
390
|
+
class: "htw-w-4 htw-h-4 htw-opacity-50 hover:htw-opacity-100 hover:htw-text-primary-500 htw-cursor-pointer",
|
|
391
|
+
onClick: t[0] || (t[0] = (e) => n())
|
|
392
|
+
}, null, 512)), [
|
|
393
|
+
[w(N), {
|
|
394
|
+
content: "Copied!",
|
|
395
|
+
triggers: [],
|
|
396
|
+
shown: w(o),
|
|
397
|
+
distance: 12,
|
|
398
|
+
delay: 0
|
|
399
|
+
}]
|
|
400
|
+
]);
|
|
504
401
|
}
|
|
505
|
-
})
|
|
506
|
-
const _hoisted_1$3 = {
|
|
402
|
+
}), kt = {
|
|
507
403
|
key: 0,
|
|
508
404
|
class: "htw-grid htw-gap-4 htw-grid-cols-[repeat(auto-fill,minmax(200px,1fr))] htw-m-4"
|
|
509
|
-
}
|
|
510
|
-
const _hoisted_2$3 = ["onMouseenter"];
|
|
511
|
-
const _hoisted_3$3 = { class: "htw-flex htw-gap-1" };
|
|
512
|
-
const _hoisted_4$2 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
513
|
-
const _hoisted_5$2 = { class: "htw-flex htw-gap-1" };
|
|
514
|
-
const _hoisted_6$1 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
515
|
-
const __default__$3 = {
|
|
405
|
+
}, Vt = ["onMouseenter"], St = { class: "htw-flex htw-gap-1" }, Ht = { class: "htw-my-0 htw-truncate htw-shrink" }, Ct = { class: "htw-flex htw-gap-1" }, Mt = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" }, Nt = {
|
|
516
406
|
name: "HstColorShades"
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
...__default__$3,
|
|
407
|
+
}, Tt = /* @__PURE__ */ _({
|
|
408
|
+
...Nt,
|
|
520
409
|
props: {
|
|
521
410
|
shades: null,
|
|
522
411
|
getName: null,
|
|
523
412
|
search: null
|
|
524
413
|
},
|
|
525
|
-
setup(
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
return
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
};
|
|
534
|
-
const shadesWithName = computed(() => {
|
|
535
|
-
const shades = props.shades;
|
|
536
|
-
const getName = props.getName;
|
|
537
|
-
const flatShades = flattenShades(shades);
|
|
538
|
-
return Object.entries(flatShades).map(([key, color]) => {
|
|
539
|
-
const name = getName ? getName(key, color) : key;
|
|
414
|
+
setup(s) {
|
|
415
|
+
const h = s, a = (t, e = "") => Object.entries(t).reduce((l, [r, d]) => {
|
|
416
|
+
const p = e ? r === "DEFAULT" ? e : `${e}-${r}` : r, $ = typeof d == "object" ? a(d, p) : { [p]: d };
|
|
417
|
+
return { ...l, ...$ };
|
|
418
|
+
}, {}), o = y(() => {
|
|
419
|
+
const t = h.shades, e = h.getName, l = a(t);
|
|
420
|
+
return Object.entries(l).map(([r, d]) => {
|
|
421
|
+
const p = e ? e(r, d) : r;
|
|
540
422
|
return {
|
|
541
|
-
key,
|
|
542
|
-
color,
|
|
543
|
-
name
|
|
423
|
+
key: r,
|
|
424
|
+
color: d,
|
|
425
|
+
name: p
|
|
544
426
|
};
|
|
545
427
|
});
|
|
546
|
-
})
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
list = list.filter(({ name }) => reg.test(name));
|
|
428
|
+
}), n = y(() => {
|
|
429
|
+
let t = o.value;
|
|
430
|
+
if (h.search) {
|
|
431
|
+
const e = new RegExp(h.search, "i");
|
|
432
|
+
t = t.filter(({ name: l }) => e.test(l));
|
|
552
433
|
}
|
|
553
|
-
return
|
|
554
|
-
});
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
434
|
+
return t;
|
|
435
|
+
}), u = b(null);
|
|
436
|
+
return (t, e) => w(n).length ? (i(), m("div", kt, [
|
|
437
|
+
(i(!0), m(E, null, L(w(n), (l) => (i(), m("div", {
|
|
438
|
+
key: l.key,
|
|
439
|
+
class: "htw-flex htw-flex-col htw-gap-2",
|
|
440
|
+
onMouseenter: (r) => u.value = l.key,
|
|
441
|
+
onMouseleave: e[0] || (e[0] = (r) => u.value = null)
|
|
442
|
+
}, [
|
|
443
|
+
g(t.$slots, "default", {
|
|
444
|
+
color: l.color
|
|
445
|
+
}, () => [
|
|
446
|
+
c("div", {
|
|
447
|
+
class: "htw-rounded-full htw-w-16 htw-h-16",
|
|
448
|
+
style: S({
|
|
449
|
+
backgroundColor: l.color
|
|
450
|
+
})
|
|
451
|
+
}, null, 4)
|
|
452
|
+
]),
|
|
453
|
+
c("div", null, [
|
|
454
|
+
c("div", St, [
|
|
455
|
+
V((i(), m("pre", Ht, [
|
|
456
|
+
M(k(l.name), 1)
|
|
457
|
+
])), [
|
|
458
|
+
[w(N), l.name.length > 23 ? l.name : ""]
|
|
574
459
|
]),
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
content: shade.color,
|
|
597
|
-
class: "htw-flex-none"
|
|
598
|
-
}, null, 8, ["content"])) : createCommentVNode("", true)
|
|
599
|
-
])
|
|
600
|
-
])
|
|
601
|
-
], 40, _hoisted_2$3);
|
|
602
|
-
}), 128))
|
|
603
|
-
])) : createCommentVNode("", true);
|
|
604
|
-
};
|
|
460
|
+
u.value === l.key ? (i(), f(T, {
|
|
461
|
+
key: 0,
|
|
462
|
+
content: l.name,
|
|
463
|
+
class: "htw-flex-none"
|
|
464
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
465
|
+
]),
|
|
466
|
+
c("div", Ct, [
|
|
467
|
+
V((i(), m("pre", Mt, [
|
|
468
|
+
M(k(l.color), 1)
|
|
469
|
+
])), [
|
|
470
|
+
[w(N), l.color.length > 23 ? l.color : ""]
|
|
471
|
+
]),
|
|
472
|
+
u.value === l.key ? (i(), f(T, {
|
|
473
|
+
key: 0,
|
|
474
|
+
content: l.color,
|
|
475
|
+
class: "htw-flex-none"
|
|
476
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
477
|
+
])
|
|
478
|
+
])
|
|
479
|
+
], 40, Vt))), 128))
|
|
480
|
+
])) : H("", !0);
|
|
605
481
|
}
|
|
606
|
-
})
|
|
607
|
-
const _hoisted_1$2 = ["onMouseenter"];
|
|
608
|
-
const _hoisted_2$2 = { class: "htw-mx-4" };
|
|
609
|
-
const _hoisted_3$2 = { class: "htw-flex htw-gap-1" };
|
|
610
|
-
const _hoisted_4$1 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
611
|
-
const _hoisted_5$1 = { class: "htw-flex htw-gap-1" };
|
|
612
|
-
const _hoisted_6 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
613
|
-
const __default__$2 = {
|
|
482
|
+
}), zt = ["onMouseenter"], Et = { class: "htw-mx-4" }, Ot = { class: "htw-flex htw-gap-1" }, Lt = { class: "htw-my-0 htw-truncate htw-shrink" }, At = { class: "htw-flex htw-gap-1" }, jt = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" }, Dt = {
|
|
614
483
|
name: "HstTokenList"
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
...__default__$2,
|
|
484
|
+
}, Bt = /* @__PURE__ */ _({
|
|
485
|
+
...Dt,
|
|
618
486
|
props: {
|
|
619
487
|
tokens: null,
|
|
620
488
|
getName: null
|
|
621
489
|
},
|
|
622
|
-
setup(
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
return Object.entries(list).map(([key, value]) => {
|
|
628
|
-
const name = getName ? getName(key, value) : key;
|
|
490
|
+
setup(s) {
|
|
491
|
+
const h = s, a = y(() => {
|
|
492
|
+
const n = h.tokens, u = h.getName;
|
|
493
|
+
return Object.entries(n).map(([t, e]) => {
|
|
494
|
+
const l = u ? u(t, e) : t;
|
|
629
495
|
return {
|
|
630
|
-
key,
|
|
631
|
-
name,
|
|
632
|
-
value: typeof
|
|
496
|
+
key: t,
|
|
497
|
+
name: l,
|
|
498
|
+
value: typeof e == "number" ? e.toString() : e
|
|
633
499
|
};
|
|
634
500
|
});
|
|
635
|
-
});
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
])
|
|
663
|
-
])
|
|
664
|
-
], 40, _hoisted_1$2);
|
|
665
|
-
}), 128);
|
|
666
|
-
};
|
|
501
|
+
}), o = b(null);
|
|
502
|
+
return (n, u) => (i(!0), m(E, null, L(w(a), (t) => (i(), m("div", {
|
|
503
|
+
key: t.key,
|
|
504
|
+
class: "htw-flex htw-flex-col htw-gap-2 htw-my-8",
|
|
505
|
+
onMouseenter: (e) => o.value = t.key,
|
|
506
|
+
onMouseleave: u[0] || (u[0] = (e) => o.value = null)
|
|
507
|
+
}, [
|
|
508
|
+
g(n.$slots, "default", { token: t }),
|
|
509
|
+
c("div", Et, [
|
|
510
|
+
c("div", Ot, [
|
|
511
|
+
c("pre", Lt, k(t.name), 1),
|
|
512
|
+
o.value === t.key ? (i(), f(T, {
|
|
513
|
+
key: 0,
|
|
514
|
+
content: t.name,
|
|
515
|
+
class: "htw-flex-none"
|
|
516
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
517
|
+
]),
|
|
518
|
+
c("div", At, [
|
|
519
|
+
c("pre", jt, k(t.value), 1),
|
|
520
|
+
o.value === t.key ? (i(), f(T, {
|
|
521
|
+
key: 0,
|
|
522
|
+
content: typeof t.value == "string" ? t.value : JSON.stringify(t.value),
|
|
523
|
+
class: "htw-flex-none"
|
|
524
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
525
|
+
])
|
|
526
|
+
])
|
|
527
|
+
], 40, zt))), 128));
|
|
667
528
|
}
|
|
668
529
|
});
|
|
669
|
-
|
|
670
|
-
const _hoisted_1$1 = ["onMouseenter"];
|
|
671
|
-
const _hoisted_2$1 = { class: "htw-flex htw-gap-1" };
|
|
672
|
-
const _hoisted_3$1 = { class: "htw-my-0 htw-truncate htw-shrink" };
|
|
673
|
-
const _hoisted_4 = { class: "htw-flex htw-gap-1" };
|
|
674
|
-
const _hoisted_5 = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" };
|
|
675
|
-
const __default__$1 = {
|
|
530
|
+
const It = ["onMouseenter"], Ut = { class: "htw-flex htw-gap-1" }, Ft = { class: "htw-my-0 htw-truncate htw-shrink" }, Kt = { class: "htw-flex htw-gap-1" }, Rt = { class: "htw-my-0 htw-opacity-50 htw-truncate htw-shrink" }, Gt = {
|
|
676
531
|
name: "HstTokenGrid"
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
...__default__$1,
|
|
532
|
+
}, Pt = /* @__PURE__ */ _({
|
|
533
|
+
...Gt,
|
|
680
534
|
props: {
|
|
681
535
|
tokens: null,
|
|
682
536
|
colSize: { default: 180 },
|
|
683
537
|
getName: { type: Function, default: null }
|
|
684
538
|
},
|
|
685
|
-
setup(
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
return Object.entries(list).map(([key, value]) => {
|
|
691
|
-
const name = getName ? getName(key, value) : key;
|
|
539
|
+
setup(s) {
|
|
540
|
+
const h = s, a = y(() => {
|
|
541
|
+
const u = h.tokens, t = h.getName;
|
|
542
|
+
return Object.entries(u).map(([e, l]) => {
|
|
543
|
+
const r = t ? t(e, l) : e;
|
|
692
544
|
return {
|
|
693
|
-
key,
|
|
694
|
-
name,
|
|
695
|
-
value: typeof
|
|
545
|
+
key: e,
|
|
546
|
+
name: r,
|
|
547
|
+
value: typeof l == "number" ? l.toString() : l
|
|
696
548
|
};
|
|
697
549
|
});
|
|
698
|
-
});
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
550
|
+
}), o = y(() => `${h.colSize}px`), n = b(null);
|
|
551
|
+
return (u, t) => (i(), m("div", {
|
|
552
|
+
class: "htw-bind-col-size htw-grid htw-gap-4 htw-m-4",
|
|
553
|
+
style: S({
|
|
554
|
+
"--histoire-col-size": w(o)
|
|
555
|
+
})
|
|
556
|
+
}, [
|
|
557
|
+
(i(!0), m(E, null, L(w(a), (e) => (i(), m("div", {
|
|
558
|
+
key: e.key,
|
|
559
|
+
class: "htw-flex htw-flex-col htw-gap-2",
|
|
560
|
+
onMouseenter: (l) => n.value = e.key,
|
|
561
|
+
onMouseleave: t[0] || (t[0] = (l) => n.value = null)
|
|
707
562
|
}, [
|
|
708
|
-
(
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
content: typeof token.value === "string" ? token.value : JSON.stringify(token.value),
|
|
738
|
-
class: "htw-flex-none"
|
|
739
|
-
}, null, 8, ["content"])) : createCommentVNode("", true)
|
|
740
|
-
])
|
|
741
|
-
])
|
|
742
|
-
], 40, _hoisted_1$1);
|
|
743
|
-
}), 128))
|
|
744
|
-
], 4);
|
|
745
|
-
};
|
|
563
|
+
g(u.$slots, "default", { token: e }),
|
|
564
|
+
c("div", null, [
|
|
565
|
+
c("div", Ut, [
|
|
566
|
+
V((i(), m("pre", Ft, [
|
|
567
|
+
M(k(e.name), 1)
|
|
568
|
+
])), [
|
|
569
|
+
[w(N), e.name.length > s.colSize / 8 ? e.name : ""]
|
|
570
|
+
]),
|
|
571
|
+
n.value === e.key ? (i(), f(T, {
|
|
572
|
+
key: 0,
|
|
573
|
+
content: e.name,
|
|
574
|
+
class: "htw-flex-none"
|
|
575
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
576
|
+
]),
|
|
577
|
+
c("div", Kt, [
|
|
578
|
+
V((i(), m("pre", Rt, [
|
|
579
|
+
M(k(e.value), 1)
|
|
580
|
+
])), [
|
|
581
|
+
[w(N), e.value.length > s.colSize / 8 ? e.value : ""]
|
|
582
|
+
]),
|
|
583
|
+
n.value === e.key ? (i(), f(T, {
|
|
584
|
+
key: 0,
|
|
585
|
+
content: typeof e.value == "string" ? e.value : JSON.stringify(e.value),
|
|
586
|
+
class: "htw-flex-none"
|
|
587
|
+
}, null, 8, ["content"])) : H("", !0)
|
|
588
|
+
])
|
|
589
|
+
])
|
|
590
|
+
], 40, It))), 128))
|
|
591
|
+
], 4));
|
|
746
592
|
}
|
|
747
|
-
})
|
|
748
|
-
const _hoisted_1 = { class: "-htw-my-1" };
|
|
749
|
-
const _hoisted_2 = ["id", "name", "value", "checked", "onChange"];
|
|
750
|
-
const _hoisted_3 = ["for", "onKeydown"];
|
|
751
|
-
const __default__ = {
|
|
593
|
+
}), Wt = { class: "-htw-my-1" }, Xt = ["id", "name", "value", "checked", "onChange"], Jt = ["for", "onKeydown"], qt = {
|
|
752
594
|
name: "HstRadio"
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
...__default__,
|
|
595
|
+
}, Qt = /* @__PURE__ */ _({
|
|
596
|
+
...qt,
|
|
756
597
|
props: {
|
|
757
598
|
title: null,
|
|
758
599
|
modelValue: null,
|
|
759
600
|
options: null
|
|
760
601
|
},
|
|
761
602
|
emits: ["update:modelValue"],
|
|
762
|
-
setup(
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
return Object.fromEntries(props.options.map((value) => {
|
|
767
|
-
if (typeof value === "string") {
|
|
768
|
-
return [value, value];
|
|
769
|
-
} else {
|
|
770
|
-
return [value.value, value.label];
|
|
771
|
-
}
|
|
772
|
-
}));
|
|
773
|
-
}
|
|
774
|
-
return props.options;
|
|
775
|
-
});
|
|
776
|
-
function selectOption(value) {
|
|
777
|
-
emit("update:modelValue", value);
|
|
778
|
-
animationEnabled.value = true;
|
|
603
|
+
setup(s, { emit: h }) {
|
|
604
|
+
const a = s, o = y(() => Array.isArray(a.options) ? Object.fromEntries(a.options.map((t) => typeof t == "string" ? [t, t] : [t.value, t.label])) : a.options);
|
|
605
|
+
function n(t) {
|
|
606
|
+
h("update:modelValue", t), u.value = !0;
|
|
779
607
|
}
|
|
780
|
-
const
|
|
781
|
-
return (
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
actions
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
(
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
]),
|
|
838
|
-
_: 3
|
|
839
|
-
}, 8, ["title", "class", "style"]);
|
|
840
|
-
};
|
|
608
|
+
const u = b(!1);
|
|
609
|
+
return (t, e) => (i(), f(z, {
|
|
610
|
+
role: "group",
|
|
611
|
+
title: s.title,
|
|
612
|
+
class: x(["htw-cursor-text", t.$attrs.class]),
|
|
613
|
+
style: S(t.$attrs.style)
|
|
614
|
+
}, {
|
|
615
|
+
actions: v(() => [
|
|
616
|
+
g(t.$slots, "actions")
|
|
617
|
+
]),
|
|
618
|
+
default: v(() => [
|
|
619
|
+
c("div", Wt, [
|
|
620
|
+
(i(!0), m(E, null, L(w(o), (l, r) => (i(), m(E, { key: r }, [
|
|
621
|
+
c("input", {
|
|
622
|
+
id: `${r}-radio`,
|
|
623
|
+
type: "radio",
|
|
624
|
+
name: `${r}-radio`,
|
|
625
|
+
value: r,
|
|
626
|
+
checked: r === s.modelValue,
|
|
627
|
+
class: "htw-hidden",
|
|
628
|
+
onChange: (d) => n(r)
|
|
629
|
+
}, null, 40, Xt),
|
|
630
|
+
c("label", {
|
|
631
|
+
tabindex: "0",
|
|
632
|
+
for: `${r}-radio`,
|
|
633
|
+
class: "htw-cursor-pointer htw-flex htw-items-center htw-relative htw-py-1 htw-group",
|
|
634
|
+
onKeydown: [
|
|
635
|
+
A(j((d) => n(r), ["prevent"]), ["enter"]),
|
|
636
|
+
A(j((d) => n(r), ["prevent"]), ["space"])
|
|
637
|
+
]
|
|
638
|
+
}, [
|
|
639
|
+
(i(), m("svg", {
|
|
640
|
+
width: "16",
|
|
641
|
+
height: "16",
|
|
642
|
+
viewBox: "-12 -12 24 24",
|
|
643
|
+
class: x(["htw-relative htw-z-10 htw-border htw-border-solid htw-text-inherit htw-rounded-full htw-box-border htw-inset-0 htw-transition-border htw-duration-150 htw-ease-out htw-mr-2 group-hover:htw-border-primary-500", [
|
|
644
|
+
s.modelValue === r ? "htw-border-primary-500" : "htw-border-black/25 dark:htw-border-white/25"
|
|
645
|
+
]])
|
|
646
|
+
}, [
|
|
647
|
+
c("circle", {
|
|
648
|
+
r: "7",
|
|
649
|
+
class: x(["htw-will-change-transform", [
|
|
650
|
+
u.value ? "htw-transition-all" : "htw-transition-none",
|
|
651
|
+
{
|
|
652
|
+
"htw-delay-150": s.modelValue === r
|
|
653
|
+
},
|
|
654
|
+
s.modelValue === r ? "htw-fill-primary-500" : "htw-fill-transparent htw-scale-0"
|
|
655
|
+
]])
|
|
656
|
+
}, null, 2)
|
|
657
|
+
], 2)),
|
|
658
|
+
M(" " + k(l), 1)
|
|
659
|
+
], 40, Jt)
|
|
660
|
+
], 64))), 128))
|
|
661
|
+
])
|
|
662
|
+
]),
|
|
663
|
+
_: 3
|
|
664
|
+
}, 8, ["title", "class", "style"]));
|
|
841
665
|
}
|
|
842
|
-
})
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
666
|
+
}), Yt = st, Zt = ot, te = at, ee = ct, se = mt, le = gt, ne = Tt, oe = Bt, re = Pt, ae = T, ue = Qt, we = {
|
|
667
|
+
HstCheckbox: Yt,
|
|
668
|
+
HstText: Zt,
|
|
669
|
+
HstNumber: te,
|
|
670
|
+
HstSlider: ee,
|
|
671
|
+
HstTextarea: se,
|
|
672
|
+
HstSelect: le,
|
|
673
|
+
HstColorShades: ne,
|
|
674
|
+
HstTokenList: oe,
|
|
675
|
+
HstTokenGrid: re,
|
|
676
|
+
HstCopyIcon: ae,
|
|
677
|
+
HstRadio: ue
|
|
678
|
+
};
|
|
679
|
+
export {
|
|
680
|
+
Yt as HstCheckbox,
|
|
681
|
+
ne as HstColorShades,
|
|
682
|
+
ae as HstCopyIcon,
|
|
683
|
+
te as HstNumber,
|
|
684
|
+
ue as HstRadio,
|
|
685
|
+
le as HstSelect,
|
|
686
|
+
ee as HstSlider,
|
|
687
|
+
Zt as HstText,
|
|
688
|
+
se as HstTextarea,
|
|
689
|
+
re as HstTokenGrid,
|
|
690
|
+
oe as HstTokenList,
|
|
691
|
+
we as components
|
|
866
692
|
};
|
|
867
|
-
export { HstCheckbox, HstColorShades, HstCopyIcon, HstNumber, HstRadio, HstSelect, HstSlider, HstText, HstTextarea, HstTokenGrid, HstTokenList, components };
|