@deck9/ui 0.17.0-next.1 → 0.17.0-next.2
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/Button/Button.vue.d.ts +6 -2
- package/dist/Menu/MenuContainer.vue.d.ts +5 -0
- package/dist/Select/Select.vue.d.ts +18 -5
- package/dist/Spinner/Spinner.vue.d.ts +28 -1
- package/dist/src/ui.mjs +385 -464
- package/dist/src/ui.umd.js +2 -2
- package/package.json +5 -6
package/dist/src/ui.mjs
CHANGED
|
@@ -1,167 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
prefix: q,
|
|
19
|
-
iconName: W,
|
|
20
|
-
width: J,
|
|
21
|
-
height: K,
|
|
22
|
-
ligatures: A,
|
|
23
|
-
unicode: X,
|
|
24
|
-
svgPathData: Y,
|
|
25
|
-
aliases: A
|
|
26
|
-
};
|
|
27
|
-
F.add(
|
|
28
|
-
e.faAlignCenter,
|
|
29
|
-
e.faAlignLeft,
|
|
30
|
-
e.faAlignRight,
|
|
31
|
-
e.faArrowRight,
|
|
32
|
-
e.faArrowUp19,
|
|
33
|
-
e.faAsterisk,
|
|
34
|
-
e.faAt,
|
|
35
|
-
e.faBold,
|
|
36
|
-
e.faBolt,
|
|
37
|
-
e.faCalendar,
|
|
38
|
-
e.faChartPie,
|
|
39
|
-
e.faCheck,
|
|
40
|
-
e.faCheckCircle,
|
|
41
|
-
e.faChevronDown,
|
|
42
|
-
e.faChevronLeft,
|
|
43
|
-
e.faChevronRight,
|
|
44
|
-
e.faChevronUp,
|
|
45
|
-
e.faCircleCheck,
|
|
46
|
-
e.faCircleNodes,
|
|
47
|
-
e.faCircleNotch,
|
|
48
|
-
e.faClipboard,
|
|
49
|
-
e.faCloudDownload,
|
|
50
|
-
e.faCloudUpload,
|
|
51
|
-
e.faCode,
|
|
52
|
-
e.faCodeBranch,
|
|
53
|
-
e.faCodeFork,
|
|
54
|
-
e.faCog,
|
|
55
|
-
e.faCompass,
|
|
56
|
-
e.faCrown,
|
|
57
|
-
e.faDiagramProject,
|
|
58
|
-
e.faDoorOpen,
|
|
59
|
-
e.faDotCircle,
|
|
60
|
-
e.faEllipsis,
|
|
61
|
-
e.faEllipsisVertical,
|
|
62
|
-
e.faEnvelope,
|
|
63
|
-
e.faExclamationTriangle,
|
|
64
|
-
e.faExternalLink,
|
|
65
|
-
e.faEye,
|
|
66
|
-
e.faEyeDropper,
|
|
67
|
-
e.faEyeSlash,
|
|
68
|
-
e.faFileLines,
|
|
69
|
-
e.faFilePdf,
|
|
70
|
-
e.faFileUpload,
|
|
71
|
-
e.faFileVideo,
|
|
72
|
-
e.faFileWaveform,
|
|
73
|
-
e.faFilter,
|
|
74
|
-
e.faFilter,
|
|
75
|
-
e.faFingerprint,
|
|
76
|
-
e.faFont,
|
|
77
|
-
e.faGears,
|
|
78
|
-
e.faGlobe,
|
|
79
|
-
e.faGripHorizontal,
|
|
80
|
-
e.faGripVertical,
|
|
81
|
-
e.faHandPointRight,
|
|
82
|
-
e.faHandPointRight,
|
|
83
|
-
e.faHashtag,
|
|
84
|
-
e.faHeading,
|
|
85
|
-
e.faHeart,
|
|
86
|
-
e.faImage,
|
|
87
|
-
e.faInfoCircle,
|
|
88
|
-
e.faItalic,
|
|
89
|
-
e.faLayerGroup,
|
|
90
|
-
e.faLink,
|
|
91
|
-
e.faLinkSlash,
|
|
92
|
-
e.faList,
|
|
93
|
-
e.faListOl,
|
|
94
|
-
e.faListUl,
|
|
95
|
-
e.faLocationArrow,
|
|
96
|
-
e.faLocationCrosshairs,
|
|
97
|
-
e.faLock,
|
|
98
|
-
e.faLockOpen,
|
|
99
|
-
e.faMedal,
|
|
100
|
-
e.faMessage,
|
|
101
|
-
e.faMicrochip,
|
|
102
|
-
e.faPencilAlt,
|
|
103
|
-
e.faPenToSquare,
|
|
104
|
-
e.faPhone,
|
|
105
|
-
e.faPlayCircle,
|
|
106
|
-
e.faPlus,
|
|
107
|
-
e.faPlusCircle,
|
|
108
|
-
e.faPoo,
|
|
109
|
-
e.faPuzzlePiece,
|
|
110
|
-
e.faQuestion,
|
|
111
|
-
e.faQuoteLeft,
|
|
112
|
-
e.faQuoteRight,
|
|
113
|
-
e.faReply,
|
|
114
|
-
e.faReplyAll,
|
|
115
|
-
e.faRightLong,
|
|
116
|
-
e.faRobot,
|
|
117
|
-
e.faSave,
|
|
118
|
-
e.faShield,
|
|
119
|
-
e.faSignal,
|
|
120
|
-
e.faSignature,
|
|
121
|
-
e.faSignature,
|
|
122
|
-
e.faSquareCheck,
|
|
123
|
-
e.faStar,
|
|
124
|
-
e.faStrikethrough,
|
|
125
|
-
e.faTerminal,
|
|
126
|
-
e.faTextSlash,
|
|
127
|
-
e.faTimes,
|
|
128
|
-
e.faTrash,
|
|
129
|
-
e.faTree,
|
|
130
|
-
e.faTrophy,
|
|
131
|
-
e.faTurnDown,
|
|
132
|
-
e.faUnderline,
|
|
133
|
-
e.faUpload,
|
|
134
|
-
e.faUser,
|
|
135
|
-
e.faUserShield,
|
|
136
|
-
e.faWandMagicSparkles,
|
|
137
|
-
// Brands
|
|
138
|
-
B.faTwitter,
|
|
139
|
-
B.faInstagram,
|
|
140
|
-
B.faGithub,
|
|
141
|
-
B.faLinkedin,
|
|
142
|
-
B.faFacebook,
|
|
143
|
-
// Custom
|
|
144
|
-
$e.definition
|
|
145
|
-
);
|
|
146
|
-
const Le = [...Object.keys(F.definitions.fas)].sort(), N = [...Object.keys(F.definitions.fab)].sort(), x = /* @__PURE__ */ v({
|
|
1
|
+
import { defineComponent as x, computed as D, openBlock as a, createBlock as C, unref as d, mergeProps as P, createCommentVNode as m, createElementBlock as i, normalizeClass as b, createElementVNode as c, toDisplayString as g, createVNode as k, ref as z, watch as I, Fragment as E, withDirectives as J, vModelText as Q, normalizeStyle as F, withCtx as _, renderSlot as T, Teleport as W, Transition as O, Comment as X, normalizeProps as Y, guardReactiveProps as Z, resolveDynamicComponent as ee, onMounted as R, createTextVNode as j, renderList as G, onUnmounted as te } from "vue";
|
|
2
|
+
import { library as se, findIconDefinition as U } from "@fortawesome/fontawesome-svg-core";
|
|
3
|
+
import { FontAwesomeIcon as le } from "@fortawesome/vue-fontawesome";
|
|
4
|
+
import { faCheck as oe, faChevronDown as ae, faCircleNotch as ne, faEllipsis as re, faEyeDropper as ie } from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import { v4 as H } from "uuid";
|
|
6
|
+
import { useEyeDropper as de } from "@vueuse/core";
|
|
7
|
+
import { Menu as ue, MenuButton as ce, MenuItems as fe, MenuItem as me, Listbox as pe, ListboxButton as be, ListboxOptions as ge, ListboxOption as ye, Switch as he } from "@headlessui/vue";
|
|
8
|
+
import { useFloating as ke, autoUpdate as ve, offset as _e, flip as xe, shift as $e } from "@floating-ui/vue";
|
|
9
|
+
const K = [
|
|
10
|
+
oe,
|
|
11
|
+
ae,
|
|
12
|
+
ne,
|
|
13
|
+
re,
|
|
14
|
+
ie
|
|
15
|
+
];
|
|
16
|
+
se.add(...K);
|
|
17
|
+
const yt = K.map(({ iconName: s }) => s), ht = [], w = /* @__PURE__ */ x({
|
|
147
18
|
__name: "Icon",
|
|
148
19
|
props: {
|
|
149
20
|
name: { default: "user" }
|
|
150
21
|
},
|
|
151
22
|
setup(s) {
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
23
|
+
const n = s, e = D(() => {
|
|
24
|
+
const t = n.name, l = U({ prefix: "fab", iconName: t }) ?? U({ prefix: "fas", iconName: t });
|
|
25
|
+
return l || console.warn(
|
|
26
|
+
"could not load icon, because it is not available",
|
|
27
|
+
n.name
|
|
28
|
+
), l;
|
|
29
|
+
});
|
|
30
|
+
return (t, l) => e.value ? (a(), C(d(le), P({
|
|
157
31
|
key: 0,
|
|
158
|
-
icon:
|
|
32
|
+
icon: e.value
|
|
159
33
|
}, t.$attrs), null, 16, ["icon"])) : m("", !0);
|
|
160
34
|
}
|
|
161
|
-
}),
|
|
35
|
+
}), we = ["aria-label", "disabled", "aria-disabled", "aria-busy"], Ce = {
|
|
162
36
|
key: 0,
|
|
163
37
|
class: "absolute inset-0 flex items-center justify-center"
|
|
164
|
-
},
|
|
38
|
+
}, kt = /* @__PURE__ */ x({
|
|
165
39
|
__name: "Button",
|
|
166
40
|
props: {
|
|
167
41
|
label: {},
|
|
@@ -172,135 +46,146 @@ const Le = [...Object.keys(F.definitions.fas)].sort(), N = [...Object.keys(F.def
|
|
|
172
46
|
icon: {},
|
|
173
47
|
iconPosition: { default: "right" }
|
|
174
48
|
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"text-
|
|
180
|
-
"text-
|
|
181
|
-
"text-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
"
|
|
186
|
-
|
|
187
|
-
"px-
|
|
49
|
+
emits: ["click"],
|
|
50
|
+
setup(s, { emit: n }) {
|
|
51
|
+
const e = s, t = n, l = D(() => {
|
|
52
|
+
const o = {
|
|
53
|
+
"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": e.color === "primary",
|
|
54
|
+
"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": e.color === "light",
|
|
55
|
+
"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": e.color === "dark",
|
|
56
|
+
"text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": e.color === "danger"
|
|
57
|
+
}, p = {
|
|
58
|
+
"pointer-events-none opacity-75 cursor-not-allowed": e.isDisabled,
|
|
59
|
+
"cursor-default": e.isLoading
|
|
60
|
+
}, y = {
|
|
61
|
+
"px-4 py-1 text-xs leading-5 mono-100 rounded-lg": e.size === "small",
|
|
62
|
+
"px-5 py-2 text-sm leading-4 font-medium rounded-lg": e.size === "medium",
|
|
63
|
+
"px-8 py-3 text-base leading-6 font-medium rounded-lg": e.size === "large"
|
|
188
64
|
};
|
|
189
65
|
return {
|
|
190
|
-
...
|
|
191
|
-
...
|
|
192
|
-
...
|
|
66
|
+
...o,
|
|
67
|
+
...p,
|
|
68
|
+
...y
|
|
193
69
|
};
|
|
194
|
-
}),
|
|
195
|
-
const
|
|
196
|
-
"mr-2 -ml-1": ["small", "medium"].includes(
|
|
197
|
-
"mr-4 -ml-2": ["large"].includes(
|
|
198
|
-
},
|
|
199
|
-
"ml-3 -mr-1": ["small", "medium"].includes(
|
|
200
|
-
"ml-3 -mr-3": ["large"].includes(
|
|
201
|
-
},
|
|
202
|
-
"text-white":
|
|
203
|
-
"text-blue-600":
|
|
204
|
-
"text-grey-50":
|
|
70
|
+
}), u = D(() => {
|
|
71
|
+
const o = {
|
|
72
|
+
"mr-2 -ml-1": ["small", "medium"].includes(e.size) && e.iconPosition === "left",
|
|
73
|
+
"mr-4 -ml-2": ["large"].includes(e.size) && e.iconPosition === "left"
|
|
74
|
+
}, p = {
|
|
75
|
+
"ml-3 -mr-1": ["small", "medium"].includes(e.size) && e.iconPosition === "right",
|
|
76
|
+
"ml-3 -mr-3": ["large"].includes(e.size) && e.iconPosition === "right"
|
|
77
|
+
}, y = {
|
|
78
|
+
"text-white": e.color === "primary",
|
|
79
|
+
"text-blue-600": e.color === "light",
|
|
80
|
+
"text-grey-50": e.color === "dark"
|
|
205
81
|
};
|
|
206
82
|
return {
|
|
207
|
-
...
|
|
208
|
-
...
|
|
209
|
-
...
|
|
83
|
+
...o,
|
|
84
|
+
...p,
|
|
85
|
+
...y
|
|
210
86
|
};
|
|
211
87
|
});
|
|
212
|
-
|
|
213
|
-
|
|
88
|
+
function v(o) {
|
|
89
|
+
if (e.isLoading) {
|
|
90
|
+
o.preventDefault();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
t("click", o);
|
|
94
|
+
}
|
|
95
|
+
return (o, p) => (a(), i("button", {
|
|
96
|
+
class: b(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", l.value]),
|
|
214
97
|
type: "button",
|
|
215
|
-
"aria-label":
|
|
216
|
-
disabled:
|
|
217
|
-
"aria-
|
|
98
|
+
"aria-label": o.label,
|
|
99
|
+
disabled: o.isDisabled,
|
|
100
|
+
"aria-disabled": o.isLoading || void 0,
|
|
101
|
+
"aria-busy": o.isLoading,
|
|
102
|
+
onClick: v
|
|
218
103
|
}, [
|
|
219
104
|
c("div", {
|
|
220
|
-
class: b(!
|
|
105
|
+
class: b(!o.isLoading || "invisible")
|
|
221
106
|
}, [
|
|
222
|
-
|
|
107
|
+
o.icon && o.iconPosition === "left" ? (a(), C(w, {
|
|
223
108
|
key: 0,
|
|
224
|
-
name:
|
|
225
|
-
class: b(
|
|
109
|
+
name: o.icon,
|
|
110
|
+
class: b(u.value)
|
|
226
111
|
}, null, 8, ["name", "class"])) : m("", !0),
|
|
227
|
-
c("span", null,
|
|
228
|
-
|
|
112
|
+
c("span", null, g(o.label), 1),
|
|
113
|
+
o.icon && o.iconPosition === "right" ? (a(), C(w, {
|
|
229
114
|
key: 1,
|
|
230
|
-
name:
|
|
231
|
-
class: b(
|
|
115
|
+
name: o.icon,
|
|
116
|
+
class: b(u.value)
|
|
232
117
|
}, null, 8, ["name", "class"])) : m("", !0)
|
|
233
118
|
], 2),
|
|
234
|
-
|
|
235
|
-
|
|
119
|
+
o.isLoading ? (a(), i("span", Ce, [
|
|
120
|
+
k(w, {
|
|
236
121
|
class: "animate-spin",
|
|
237
122
|
name: "circle-notch"
|
|
238
123
|
})
|
|
239
124
|
])) : m("", !0)
|
|
240
|
-
], 10,
|
|
125
|
+
], 10, we));
|
|
241
126
|
}
|
|
242
|
-
}),
|
|
127
|
+
}), Ve = { class: "relative flex items-start" }, De = ["checked", "id"], ze = { class: "ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed" }, Be = ["for"], Le = {
|
|
243
128
|
key: 0,
|
|
244
129
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
245
|
-
},
|
|
130
|
+
}, Se = {
|
|
246
131
|
inheritAttrs: !1
|
|
247
|
-
},
|
|
248
|
-
...
|
|
132
|
+
}, vt = /* @__PURE__ */ x({
|
|
133
|
+
...Se,
|
|
249
134
|
__name: "Checkbox",
|
|
250
135
|
props: {
|
|
251
|
-
id: { default: () =>
|
|
136
|
+
id: { default: () => H() },
|
|
252
137
|
label: {},
|
|
253
138
|
modelValue: { type: Boolean },
|
|
254
139
|
description: {}
|
|
255
140
|
},
|
|
256
141
|
emits: ["update:modelValue"],
|
|
257
|
-
setup(s, { emit:
|
|
258
|
-
const
|
|
259
|
-
|
|
142
|
+
setup(s, { emit: n }) {
|
|
143
|
+
const e = n, t = (l) => {
|
|
144
|
+
e("update:modelValue", l.target.checked);
|
|
260
145
|
};
|
|
261
|
-
return (
|
|
262
|
-
c("input",
|
|
146
|
+
return (l, u) => (a(), i("div", Ve, [
|
|
147
|
+
c("input", P({
|
|
263
148
|
class: "peer mt-0.5 h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
264
149
|
type: "checkbox",
|
|
265
|
-
checked:
|
|
266
|
-
onChange:
|
|
267
|
-
id:
|
|
268
|
-
},
|
|
269
|
-
c("div",
|
|
150
|
+
checked: l.modelValue,
|
|
151
|
+
onChange: t,
|
|
152
|
+
id: l.id
|
|
153
|
+
}, l.$attrs), null, 16, De),
|
|
154
|
+
c("div", ze, [
|
|
270
155
|
c("label", {
|
|
271
|
-
for:
|
|
156
|
+
for: l.id,
|
|
272
157
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
273
|
-
},
|
|
274
|
-
|
|
158
|
+
}, g(l.label), 9, Be),
|
|
159
|
+
l.description ? (a(), i("p", Le, g(l.description), 1)) : m("", !0)
|
|
275
160
|
])
|
|
276
161
|
]));
|
|
277
162
|
}
|
|
278
163
|
});
|
|
279
|
-
function
|
|
280
|
-
const
|
|
164
|
+
function A(s) {
|
|
165
|
+
const n = D(() => ({
|
|
281
166
|
"pl-3 pr-10 py-2": !s.icon && s.type !== "color" && s.size === "small",
|
|
282
167
|
"pl-4 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "medium",
|
|
283
168
|
"pl-6 pr-10 py-3": !s.icon && s.type !== "color" && s.size === "large",
|
|
284
169
|
"pl-10 pr-10 py-1": (s.icon || s.type === "color") && s.size === "small",
|
|
285
170
|
"pl-12 pr-10 py-3": (s.icon || s.type === "color") && (s.size === "medium" || s.size === "large"),
|
|
286
171
|
"w-full block": s.block === !0
|
|
287
|
-
})),
|
|
172
|
+
})), e = D(() => ({
|
|
288
173
|
"pointer-events-none opacity-50 cursor-not-allowed": s.isDisabled
|
|
289
|
-
})),
|
|
174
|
+
})), t = D(() => ({
|
|
290
175
|
"text-xs leading-4": s.size === "small",
|
|
291
176
|
"text-sm leading-4": s.size === "medium",
|
|
292
177
|
"text-base leading-5": s.size === "large"
|
|
293
178
|
}));
|
|
294
179
|
return {
|
|
295
|
-
inputClasses:
|
|
296
|
-
disabledClasses:
|
|
297
|
-
textSizeClasses:
|
|
180
|
+
inputClasses: n,
|
|
181
|
+
disabledClasses: e,
|
|
182
|
+
textSizeClasses: t
|
|
298
183
|
};
|
|
299
184
|
}
|
|
300
|
-
const
|
|
185
|
+
const Pe = ["placeholder", "type", "min", "max", "disabled", "value"], Me = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Ie = ["disabled"], Te = ["disabled"], Ee = {
|
|
301
186
|
inheritAttrs: !1
|
|
302
|
-
},
|
|
303
|
-
...
|
|
187
|
+
}, _t = /* @__PURE__ */ x({
|
|
188
|
+
...Ee,
|
|
304
189
|
__name: "Input",
|
|
305
190
|
props: {
|
|
306
191
|
modelValue: {},
|
|
@@ -315,98 +200,98 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
315
200
|
showColorPicker: { type: Boolean }
|
|
316
201
|
},
|
|
317
202
|
emits: ["update:modelValue"],
|
|
318
|
-
setup(s, { expose:
|
|
319
|
-
const
|
|
203
|
+
setup(s, { expose: n, emit: e }) {
|
|
204
|
+
const t = s, l = z(null), u = z(t.modelValue ?? ""), v = (r) => t.type === "number" && r !== "" && r !== null ? Number(r) : r;
|
|
320
205
|
I(
|
|
321
|
-
() =>
|
|
322
|
-
(
|
|
323
|
-
typeof
|
|
206
|
+
() => t.modelValue,
|
|
207
|
+
(r) => {
|
|
208
|
+
typeof r < "u" && r !== v(u.value) && (u.value = r);
|
|
324
209
|
}
|
|
325
210
|
);
|
|
326
|
-
const
|
|
327
|
-
isSupported:
|
|
328
|
-
open:
|
|
329
|
-
sRGBHex:
|
|
330
|
-
} =
|
|
331
|
-
|
|
211
|
+
const o = e, { inputClasses: p, disabledClasses: y, textSizeClasses: V } = A(t), $ = D(() => t.type === "color" ? "text" : t.type), {
|
|
212
|
+
isSupported: M,
|
|
213
|
+
open: f,
|
|
214
|
+
sRGBHex: N
|
|
215
|
+
} = de(), h = () => {
|
|
216
|
+
f();
|
|
332
217
|
};
|
|
333
|
-
I(
|
|
334
|
-
|
|
218
|
+
I(N, (r) => {
|
|
219
|
+
u.value = r, o("update:modelValue", r);
|
|
335
220
|
});
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
},
|
|
339
|
-
const
|
|
340
|
-
if (typeof
|
|
221
|
+
const B = function(r) {
|
|
222
|
+
u.value = (r == null ? void 0 : r.target).value, o("update:modelValue", v(u.value));
|
|
223
|
+
}, S = function() {
|
|
224
|
+
const r = v(u.value);
|
|
225
|
+
if (typeof r != "number")
|
|
341
226
|
return;
|
|
342
|
-
const
|
|
343
|
-
Math.max(
|
|
344
|
-
|
|
227
|
+
const L = Math.min(
|
|
228
|
+
Math.max(r, t.min ?? -1 / 0),
|
|
229
|
+
t.max ?? 1 / 0
|
|
345
230
|
);
|
|
346
|
-
|
|
231
|
+
L !== r && (u.value = L, o("update:modelValue", L));
|
|
347
232
|
};
|
|
348
|
-
return
|
|
233
|
+
return n({
|
|
349
234
|
focus: () => {
|
|
350
|
-
var
|
|
351
|
-
|
|
235
|
+
var r;
|
|
236
|
+
t.isDisabled || (r = l.value) == null || r.focus();
|
|
352
237
|
}
|
|
353
|
-
}), (
|
|
354
|
-
class: b(["relative", [
|
|
238
|
+
}), (r, L) => (a(), i("div", {
|
|
239
|
+
class: b(["relative", [r.block ? "w-full block" : "inline-block"]])
|
|
355
240
|
}, [
|
|
356
|
-
c("input",
|
|
357
|
-
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(
|
|
358
|
-
placeholder:
|
|
359
|
-
type:
|
|
360
|
-
min:
|
|
361
|
-
max:
|
|
362
|
-
disabled:
|
|
363
|
-
value:
|
|
364
|
-
},
|
|
241
|
+
c("input", P({
|
|
242
|
+
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(p), d(V), d(y)]],
|
|
243
|
+
placeholder: r.placeholder,
|
|
244
|
+
type: $.value,
|
|
245
|
+
min: r.min,
|
|
246
|
+
max: r.max,
|
|
247
|
+
disabled: r.isDisabled,
|
|
248
|
+
value: u.value
|
|
249
|
+
}, r.$attrs, {
|
|
365
250
|
ref_key: "inputElement",
|
|
366
|
-
ref:
|
|
367
|
-
onInput:
|
|
368
|
-
onChange:
|
|
369
|
-
}), null, 16,
|
|
370
|
-
|
|
371
|
-
c("label",
|
|
372
|
-
|
|
251
|
+
ref: l,
|
|
252
|
+
onInput: B,
|
|
253
|
+
onChange: S
|
|
254
|
+
}), null, 16, Pe),
|
|
255
|
+
r.type === "color" ? (a(), i(E, { key: 0 }, [
|
|
256
|
+
c("label", Me, [
|
|
257
|
+
J(c("input", {
|
|
373
258
|
class: "invisible",
|
|
374
259
|
type: "color",
|
|
375
|
-
disabled:
|
|
376
|
-
"onUpdate:modelValue":
|
|
377
|
-
onInput:
|
|
378
|
-
}, null, 40,
|
|
379
|
-
[
|
|
260
|
+
disabled: r.isDisabled,
|
|
261
|
+
"onUpdate:modelValue": L[0] || (L[0] = (q) => u.value = q),
|
|
262
|
+
onInput: B
|
|
263
|
+
}, null, 40, Ie), [
|
|
264
|
+
[Q, u.value]
|
|
380
265
|
]),
|
|
381
266
|
c("span", {
|
|
382
267
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
383
|
-
style:
|
|
268
|
+
style: F(`background-color: ${u.value}`)
|
|
384
269
|
}, null, 4)
|
|
385
270
|
]),
|
|
386
|
-
d(
|
|
271
|
+
d(M) && r.showColorPicker ? (a(), i("button", {
|
|
387
272
|
key: 0,
|
|
388
273
|
type: "button",
|
|
389
274
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
390
|
-
disabled:
|
|
391
|
-
onClick:
|
|
275
|
+
disabled: r.isDisabled,
|
|
276
|
+
onClick: h
|
|
392
277
|
}, [
|
|
393
|
-
|
|
278
|
+
k(w, {
|
|
394
279
|
size: "xs",
|
|
395
280
|
name: "eyedropper"
|
|
396
281
|
})
|
|
397
|
-
], 8,
|
|
398
|
-
], 64)) :
|
|
282
|
+
], 8, Te)) : m("", !0)
|
|
283
|
+
], 64)) : r.icon ? (a(), i("span", {
|
|
399
284
|
key: 1,
|
|
400
|
-
class: b(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", d(
|
|
285
|
+
class: b(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", d(V)])
|
|
401
286
|
}, [
|
|
402
|
-
|
|
287
|
+
k(w, { name: r.icon }, null, 8, ["name"])
|
|
403
288
|
], 2)) : m("", !0)
|
|
404
289
|
], 2));
|
|
405
290
|
}
|
|
406
|
-
}),
|
|
291
|
+
}), Ae = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, Ne = ["id", "for"], je = {
|
|
407
292
|
key: 0,
|
|
408
293
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
409
|
-
},
|
|
294
|
+
}, xt = /* @__PURE__ */ x({
|
|
410
295
|
__name: "Label",
|
|
411
296
|
props: {
|
|
412
297
|
id: {},
|
|
@@ -414,57 +299,67 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
414
299
|
description: {}
|
|
415
300
|
},
|
|
416
301
|
setup(s) {
|
|
417
|
-
return (
|
|
302
|
+
return (n, e) => (a(), i("span", Ae, [
|
|
418
303
|
c("label", {
|
|
419
|
-
id:
|
|
420
|
-
for:
|
|
421
|
-
},
|
|
422
|
-
|
|
304
|
+
id: n.id ? `${n.id}-label` : void 0,
|
|
305
|
+
for: n.id
|
|
306
|
+
}, g(n.label), 9, Ne),
|
|
307
|
+
n.description ? (a(), i("span", je, g(n.description), 1)) : m("", !0)
|
|
423
308
|
]));
|
|
424
309
|
}
|
|
425
|
-
}),
|
|
310
|
+
}), Ue = {
|
|
311
|
+
key: 0,
|
|
312
|
+
class: "sr-only"
|
|
313
|
+
}, $t = /* @__PURE__ */ x({
|
|
426
314
|
__name: "MenuContainer",
|
|
427
315
|
props: {
|
|
428
316
|
position: { default: "left" },
|
|
429
|
-
usePortal: { type: [Boolean, String], default: !1 }
|
|
317
|
+
usePortal: { type: [Boolean, String], default: !1 },
|
|
318
|
+
label: { default: "Open menu" }
|
|
430
319
|
},
|
|
431
320
|
setup(s) {
|
|
432
|
-
const
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
321
|
+
const n = s, e = (o = []) => o.some(
|
|
322
|
+
(p) => typeof p.children == "string" ? p.type !== X && p.children.trim() !== "" : Array.isArray(p.children) && e(p.children)
|
|
323
|
+
), t = z(null), l = z(null), u = n.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: v } = ke(t, l, {
|
|
324
|
+
placement: u,
|
|
325
|
+
whileElementsMounted: ve,
|
|
326
|
+
middleware: [_e(6), xe(), $e({ padding: 6 })]
|
|
436
327
|
});
|
|
437
|
-
return (
|
|
328
|
+
return (o, p) => (a(), C(d(ue), {
|
|
438
329
|
as: "div",
|
|
439
330
|
class: "inline-block text-left"
|
|
440
331
|
}, {
|
|
441
|
-
default:
|
|
442
|
-
|
|
332
|
+
default: _(() => [
|
|
333
|
+
k(d(ce), {
|
|
443
334
|
class: "focus:outline-none",
|
|
444
335
|
ref_key: "reference",
|
|
445
|
-
ref:
|
|
336
|
+
ref: t
|
|
446
337
|
}, {
|
|
447
|
-
default:
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
338
|
+
default: _(() => {
|
|
339
|
+
var y, V;
|
|
340
|
+
return [
|
|
341
|
+
T(o.$slots, "button", {}, () => [
|
|
342
|
+
k(d(w), {
|
|
343
|
+
class: "fill-current",
|
|
344
|
+
name: "ellipsis-h"
|
|
345
|
+
})
|
|
346
|
+
]),
|
|
347
|
+
e((V = (y = o.$slots).button) == null ? void 0 : V.call(y)) ? m("", !0) : (a(), i("span", Ue, g(o.label), 1))
|
|
348
|
+
];
|
|
349
|
+
}),
|
|
455
350
|
_: 3
|
|
456
351
|
}, 512),
|
|
457
|
-
(
|
|
458
|
-
to: typeof
|
|
459
|
-
disabled: !
|
|
352
|
+
(a(), C(W, {
|
|
353
|
+
to: typeof o.usePortal == "string" ? o.usePortal : "body",
|
|
354
|
+
disabled: !o.usePortal
|
|
460
355
|
}, [
|
|
461
356
|
c("div", {
|
|
462
357
|
class: "w-56 z-20",
|
|
463
|
-
style:
|
|
358
|
+
style: F(d(v)),
|
|
464
359
|
ref_key: "floating",
|
|
465
360
|
ref: l
|
|
466
361
|
}, [
|
|
467
|
-
|
|
362
|
+
k(O, {
|
|
468
363
|
"enter-active-class": "transition duration-200 ease-in-out",
|
|
469
364
|
"enter-from-class": "transform -translate-y-4 opacity-0",
|
|
470
365
|
"enter-to-class": "transform opacity-100",
|
|
@@ -472,14 +367,14 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
472
367
|
"leave-from-class": "transform opacity-100",
|
|
473
368
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
474
369
|
}, {
|
|
475
|
-
default:
|
|
476
|
-
|
|
370
|
+
default: _(() => [
|
|
371
|
+
k(d(fe), {
|
|
477
372
|
class: b([
|
|
478
373
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
479
374
|
])
|
|
480
375
|
}, {
|
|
481
|
-
default:
|
|
482
|
-
|
|
376
|
+
default: _(() => [
|
|
377
|
+
T(o.$slots, "default")
|
|
483
378
|
]),
|
|
484
379
|
_: 3
|
|
485
380
|
})
|
|
@@ -492,10 +387,10 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
492
387
|
_: 3
|
|
493
388
|
}));
|
|
494
389
|
}
|
|
495
|
-
}),
|
|
390
|
+
}), Fe = {
|
|
496
391
|
key: 0,
|
|
497
392
|
class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
|
|
498
|
-
},
|
|
393
|
+
}, wt = /* @__PURE__ */ x({
|
|
499
394
|
__name: "MenuLink",
|
|
500
395
|
props: {
|
|
501
396
|
label: {},
|
|
@@ -504,17 +399,17 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
504
399
|
as: {}
|
|
505
400
|
},
|
|
506
401
|
setup(s) {
|
|
507
|
-
return (
|
|
508
|
-
default:
|
|
509
|
-
(
|
|
402
|
+
return (n, e) => (a(), C(d(me), Y(Z({ disabled: n.disabled })), {
|
|
403
|
+
default: _(({ active: t }) => [
|
|
404
|
+
(a(), C(ee(n.as || "span"), {
|
|
510
405
|
class: b(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
511
|
-
|
|
512
|
-
|
|
406
|
+
t ? "bg-grey-200" : "",
|
|
407
|
+
n.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
513
408
|
]])
|
|
514
409
|
}, {
|
|
515
|
-
default:
|
|
516
|
-
c("span", null,
|
|
517
|
-
|
|
410
|
+
default: _(() => [
|
|
411
|
+
c("span", null, g(n.label), 1),
|
|
412
|
+
n.meta ? (a(), i("span", Fe, g(n.meta), 1)) : m("", !0)
|
|
518
413
|
]),
|
|
519
414
|
_: 2
|
|
520
415
|
}, 1032, ["class"]))
|
|
@@ -522,19 +417,19 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
522
417
|
_: 1
|
|
523
418
|
}, 16));
|
|
524
419
|
}
|
|
525
|
-
}),
|
|
420
|
+
}), Oe = { class: "relative" }, Re = {
|
|
526
421
|
key: 0,
|
|
527
422
|
class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
|
|
528
|
-
},
|
|
423
|
+
}, Ge = {
|
|
529
424
|
key: 1,
|
|
530
425
|
class: "block truncate"
|
|
531
|
-
},
|
|
426
|
+
}, He = {
|
|
532
427
|
key: 2,
|
|
533
428
|
class: "text-grey-500 truncate"
|
|
534
|
-
},
|
|
429
|
+
}, Ke = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, qe = { class: "absolute right-2 inset-y-0 flex items-center" }, Je = {
|
|
535
430
|
key: 0,
|
|
536
431
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
537
|
-
},
|
|
432
|
+
}, Ct = /* @__PURE__ */ x({
|
|
538
433
|
__name: "Select",
|
|
539
434
|
props: {
|
|
540
435
|
id: {},
|
|
@@ -544,54 +439,60 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
544
439
|
placeholder: {},
|
|
545
440
|
isDisabled: { type: Boolean, default: !1 },
|
|
546
441
|
options: {},
|
|
547
|
-
disabledBadge: {}
|
|
442
|
+
disabledBadge: {},
|
|
443
|
+
by: {}
|
|
548
444
|
},
|
|
549
445
|
emits: ["update:modelValue"],
|
|
550
|
-
setup(s, { emit:
|
|
551
|
-
const
|
|
552
|
-
|
|
446
|
+
setup(s, { emit: n }) {
|
|
447
|
+
const e = s, t = z(e.modelValue ?? null), l = n, u = (f) => typeof e.by == "string" ? f[e.by] : f.id, { inputClasses: v, disabledClasses: o, textSizeClasses: p } = A(e), y = z(!1), V = () => {
|
|
448
|
+
y.value = !!e.id && !!document.getElementById(`${e.id}-label`);
|
|
553
449
|
};
|
|
554
|
-
|
|
555
|
-
const
|
|
556
|
-
() =>
|
|
450
|
+
R(V), I(() => e.id, V, { flush: "post" });
|
|
451
|
+
const $ = D(
|
|
452
|
+
() => y.value ? `${e.id}-label ${e.id}` : void 0
|
|
557
453
|
);
|
|
558
454
|
I(
|
|
559
|
-
() =>
|
|
560
|
-
(
|
|
561
|
-
|
|
455
|
+
() => e.modelValue,
|
|
456
|
+
(f) => {
|
|
457
|
+
t.value = f ?? null;
|
|
562
458
|
}
|
|
563
459
|
);
|
|
564
|
-
const
|
|
565
|
-
|
|
460
|
+
const M = (f) => {
|
|
461
|
+
t.value = f, l("update:modelValue", f);
|
|
566
462
|
};
|
|
567
|
-
return (
|
|
463
|
+
return (f, N) => (a(), C(d(pe), {
|
|
568
464
|
as: "div",
|
|
569
|
-
"model-value":
|
|
570
|
-
"onUpdate:modelValue":
|
|
571
|
-
|
|
465
|
+
"model-value": t.value,
|
|
466
|
+
"onUpdate:modelValue": M,
|
|
467
|
+
by: f.by,
|
|
468
|
+
disabled: f.isDisabled
|
|
572
469
|
}, {
|
|
573
|
-
default:
|
|
574
|
-
c("div",
|
|
575
|
-
|
|
576
|
-
id:
|
|
577
|
-
"aria-labelledby":
|
|
578
|
-
class: b(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [d(
|
|
470
|
+
default: _(() => [
|
|
471
|
+
c("div", Oe, [
|
|
472
|
+
k(d(be), {
|
|
473
|
+
id: f.id,
|
|
474
|
+
"aria-labelledby": $.value,
|
|
475
|
+
class: b(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [d(v), d(p), d(o)]])
|
|
579
476
|
}, {
|
|
580
|
-
default:
|
|
581
|
-
var
|
|
477
|
+
default: _(() => {
|
|
478
|
+
var h;
|
|
582
479
|
return [
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
name: ((
|
|
480
|
+
f.icon ? (a(), i("span", Re, [
|
|
481
|
+
k(w, {
|
|
482
|
+
name: ((h = t.value) == null ? void 0 : h.icon) ?? f.icon
|
|
586
483
|
}, null, 8, ["name"])
|
|
587
484
|
])) : m("", !0),
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
485
|
+
t.value ? (a(), i("span", Ge, [
|
|
486
|
+
T(f.$slots, "option", {
|
|
487
|
+
option: t.value,
|
|
488
|
+
active: !1,
|
|
489
|
+
selected: !0
|
|
490
|
+
}, () => [
|
|
491
|
+
j(g(t.value.label), 1)
|
|
492
|
+
])
|
|
493
|
+
])) : (a(), i("span", He, g(f.placeholder), 1)),
|
|
494
|
+
c("span", Ke, [
|
|
495
|
+
k(w, {
|
|
595
496
|
class: "text-grey-400",
|
|
596
497
|
name: "chevron-down",
|
|
597
498
|
"aria-hidden": "true"
|
|
@@ -599,56 +500,60 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
599
500
|
])
|
|
600
501
|
];
|
|
601
502
|
}),
|
|
602
|
-
_:
|
|
503
|
+
_: 3
|
|
603
504
|
}, 8, ["id", "aria-labelledby", "class"]),
|
|
604
|
-
|
|
505
|
+
k(O, {
|
|
605
506
|
"leave-active-class": "transition ease-in duration-100",
|
|
606
507
|
"leave-from-class": "opacity-100",
|
|
607
508
|
"leave-to-class": "opacity-0"
|
|
608
509
|
}, {
|
|
609
|
-
default:
|
|
610
|
-
|
|
611
|
-
default:
|
|
612
|
-
(
|
|
510
|
+
default: _(() => [
|
|
511
|
+
k(d(ge), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
|
|
512
|
+
default: _(() => [
|
|
513
|
+
(a(!0), i(E, null, G(f.options, (h) => (a(), C(d(ye), {
|
|
613
514
|
as: "template",
|
|
614
|
-
key:
|
|
615
|
-
value:
|
|
616
|
-
disabled:
|
|
515
|
+
key: u(h),
|
|
516
|
+
value: h,
|
|
517
|
+
disabled: h.disabled
|
|
617
518
|
}, {
|
|
618
|
-
default:
|
|
519
|
+
default: _(({ active: B, selected: S }) => [
|
|
619
520
|
c("li", {
|
|
620
521
|
class: b([
|
|
621
|
-
|
|
522
|
+
B ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
622
523
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
623
|
-
{ "opacity-50 bg-grey-100":
|
|
524
|
+
{ "opacity-50 bg-grey-100": h.disabled }
|
|
624
525
|
])
|
|
625
526
|
}, [
|
|
626
|
-
c("div",
|
|
627
|
-
|
|
527
|
+
c("div", qe, [
|
|
528
|
+
h.disabled && f.disabledBadge ? (a(), i("span", Je, g(f.disabledBadge), 1)) : m("", !0)
|
|
628
529
|
]),
|
|
629
530
|
c("span", {
|
|
630
531
|
class: b([
|
|
631
|
-
|
|
532
|
+
S ? "font-semibold" : "font-normal",
|
|
632
533
|
"block truncate"
|
|
633
534
|
])
|
|
634
535
|
}, [
|
|
635
|
-
|
|
536
|
+
h.icon ? (a(), C(w, {
|
|
636
537
|
key: 0,
|
|
637
538
|
class: "inline-block mr-1",
|
|
638
|
-
name:
|
|
539
|
+
name: h.icon
|
|
639
540
|
}, null, 8, ["name"])) : m("", !0),
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
541
|
+
T(f.$slots, "option", {
|
|
542
|
+
option: h,
|
|
543
|
+
active: B,
|
|
544
|
+
selected: S
|
|
545
|
+
}, () => [
|
|
546
|
+
j(g(h.label), 1)
|
|
547
|
+
])
|
|
643
548
|
], 2),
|
|
644
|
-
|
|
549
|
+
S ? (a(), i("span", {
|
|
645
550
|
key: 0,
|
|
646
551
|
class: b([
|
|
647
|
-
|
|
552
|
+
B ? "text-blue-100" : "text-blue-500",
|
|
648
553
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
649
554
|
])
|
|
650
555
|
}, [
|
|
651
|
-
|
|
556
|
+
k(w, {
|
|
652
557
|
name: "check",
|
|
653
558
|
class: "h-5 w-5",
|
|
654
559
|
"aria-hidden": "true"
|
|
@@ -659,29 +564,29 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
659
564
|
_: 2
|
|
660
565
|
}, 1032, ["value", "disabled"]))), 128))
|
|
661
566
|
]),
|
|
662
|
-
_:
|
|
567
|
+
_: 3
|
|
663
568
|
})
|
|
664
569
|
]),
|
|
665
|
-
_:
|
|
570
|
+
_: 3
|
|
666
571
|
})
|
|
667
572
|
])
|
|
668
573
|
]),
|
|
669
|
-
_:
|
|
670
|
-
}, 8, ["model-value", "disabled"]));
|
|
574
|
+
_: 3
|
|
575
|
+
}, 8, ["model-value", "by", "disabled"]));
|
|
671
576
|
}
|
|
672
|
-
}),
|
|
577
|
+
}), Qe = { class: "animate-pulse" }, We = { class: "flex items-center justify-between space-x-4" }, Xe = {
|
|
673
578
|
key: 0,
|
|
674
579
|
class: "w-12 h-12 bg-current rounded-full shrink-0"
|
|
675
|
-
},
|
|
580
|
+
}, Ye = {
|
|
676
581
|
key: 1,
|
|
677
582
|
class: "w-full h-8 bg-current rounded-lg"
|
|
678
|
-
},
|
|
583
|
+
}, Ze = {
|
|
679
584
|
key: 0,
|
|
680
585
|
class: "mt-6 space-y-2"
|
|
681
|
-
},
|
|
586
|
+
}, et = {
|
|
682
587
|
key: 1,
|
|
683
588
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
684
|
-
},
|
|
589
|
+
}, Vt = /* @__PURE__ */ x({
|
|
685
590
|
__name: "Skeleton",
|
|
686
591
|
props: {
|
|
687
592
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -690,70 +595,86 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
690
595
|
footer: { type: Boolean, default: !1 }
|
|
691
596
|
},
|
|
692
597
|
setup(s) {
|
|
693
|
-
const
|
|
694
|
-
const
|
|
598
|
+
const n = s, e = new Array(n.lines).fill(void 0).map(() => {
|
|
599
|
+
const t = [4, 5, 6, 8, 10, 16, 24, 32];
|
|
695
600
|
return {
|
|
696
|
-
margin: `mr-${
|
|
601
|
+
margin: `mr-${t[Math.floor(Math.random() * t.length)]}`
|
|
697
602
|
};
|
|
698
603
|
});
|
|
699
|
-
return (
|
|
700
|
-
c("div",
|
|
701
|
-
|
|
702
|
-
|
|
604
|
+
return (t, l) => (a(), i("div", Qe, [
|
|
605
|
+
c("div", We, [
|
|
606
|
+
t.avatar ? (a(), i("div", Xe)) : m("", !0),
|
|
607
|
+
t.title ? (a(), i("div", Ye)) : m("", !0)
|
|
703
608
|
]),
|
|
704
|
-
|
|
705
|
-
(
|
|
706
|
-
class: b(["h-4 bg-current rounded-lg",
|
|
707
|
-
key:
|
|
609
|
+
t.lines > 0 ? (a(), i("div", Ze, [
|
|
610
|
+
(a(!0), i(E, null, G(d(e), (u, v) => (a(), i("div", {
|
|
611
|
+
class: b(["h-4 bg-current rounded-lg", u.margin]),
|
|
612
|
+
key: v
|
|
708
613
|
}, null, 2))), 128))
|
|
709
614
|
])) : m("", !0),
|
|
710
|
-
|
|
615
|
+
t.footer ? (a(), i("div", et)) : m("", !0)
|
|
711
616
|
]));
|
|
712
617
|
}
|
|
713
|
-
}),
|
|
618
|
+
}), tt = {
|
|
619
|
+
role: "status",
|
|
620
|
+
class: "inline-flex align-[-0.125em]"
|
|
621
|
+
}, st = { class: "sr-only" }, lt = {
|
|
622
|
+
inheritAttrs: !1
|
|
623
|
+
}, Dt = /* @__PURE__ */ x({
|
|
624
|
+
...lt,
|
|
714
625
|
__name: "Spinner",
|
|
626
|
+
props: {
|
|
627
|
+
label: { default: "Loading" }
|
|
628
|
+
},
|
|
715
629
|
setup(s) {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
630
|
+
const n = z(!1);
|
|
631
|
+
let e;
|
|
632
|
+
return R(() => {
|
|
633
|
+
e = setTimeout(() => n.value = !0, 100);
|
|
634
|
+
}), te(() => clearTimeout(e)), (t, l) => (a(), i("span", tt, [
|
|
635
|
+
k(d(w), P({
|
|
636
|
+
class: "animate-spin",
|
|
637
|
+
name: "circle-notch"
|
|
638
|
+
}, t.$attrs), null, 16),
|
|
639
|
+
c("span", st, g(n.value ? t.label : ""), 1)
|
|
640
|
+
]));
|
|
720
641
|
}
|
|
721
|
-
}),
|
|
642
|
+
}), ot = { class: "sr-only" }, zt = /* @__PURE__ */ x({
|
|
722
643
|
__name: "Switch",
|
|
723
644
|
props: {
|
|
724
|
-
id: { default: () =>
|
|
645
|
+
id: { default: () => H() },
|
|
725
646
|
label: {},
|
|
726
647
|
modelValue: { type: Boolean },
|
|
727
648
|
onLabel: { default: "on" },
|
|
728
649
|
offLabel: { default: "off" }
|
|
729
650
|
},
|
|
730
651
|
emits: ["update:modelValue", "change"],
|
|
731
|
-
setup(s, { emit:
|
|
732
|
-
const
|
|
733
|
-
|
|
652
|
+
setup(s, { emit: n }) {
|
|
653
|
+
const e = n, t = (l) => {
|
|
654
|
+
e("update:modelValue", l), e("change", l);
|
|
734
655
|
};
|
|
735
|
-
return (
|
|
736
|
-
id:
|
|
737
|
-
modelValue:
|
|
738
|
-
class: b([
|
|
739
|
-
"onUpdate:modelValue":
|
|
656
|
+
return (l, u) => (a(), C(d(he), {
|
|
657
|
+
id: l.id,
|
|
658
|
+
modelValue: l.modelValue,
|
|
659
|
+
class: b([l.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
|
|
660
|
+
"onUpdate:modelValue": t
|
|
740
661
|
}, {
|
|
741
|
-
default:
|
|
662
|
+
default: _(() => [
|
|
742
663
|
c("span", {
|
|
743
|
-
class: b(["absolute text-xs text-center text-white inset-x-2",
|
|
744
|
-
},
|
|
745
|
-
c("span",
|
|
664
|
+
class: b(["absolute text-xs text-center text-white inset-x-2", l.modelValue ? "pr-3" : "pl-3"])
|
|
665
|
+
}, g(l.modelValue === !0 ? l.onLabel : l.offLabel), 3),
|
|
666
|
+
c("span", ot, g(l.label), 1),
|
|
746
667
|
c("span", {
|
|
747
|
-
class: b([
|
|
668
|
+
class: b([l.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
748
669
|
}, null, 2)
|
|
749
670
|
]),
|
|
750
671
|
_: 1
|
|
751
672
|
}, 8, ["id", "modelValue", "class"]));
|
|
752
673
|
}
|
|
753
|
-
}),
|
|
674
|
+
}), at = { class: "relative" }, nt = ["disabled", "value"], rt = {
|
|
754
675
|
inheritAttrs: !1
|
|
755
|
-
},
|
|
756
|
-
...
|
|
676
|
+
}, Bt = /* @__PURE__ */ x({
|
|
677
|
+
...rt,
|
|
757
678
|
__name: "Textarea",
|
|
758
679
|
props: {
|
|
759
680
|
modelValue: {},
|
|
@@ -762,43 +683,43 @@ const Te = ["placeholder", "type", "min", "max", "disabled", "value"], Ae = { cl
|
|
|
762
683
|
block: { type: Boolean }
|
|
763
684
|
},
|
|
764
685
|
emits: ["update:modelValue"],
|
|
765
|
-
setup(s, { expose:
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
},
|
|
769
|
-
return
|
|
686
|
+
setup(s, { expose: n, emit: e }) {
|
|
687
|
+
const t = s, l = e, { inputClasses: u, disabledClasses: v, textSizeClasses: o } = A(t), p = function($) {
|
|
688
|
+
l("update:modelValue", ($ == null ? void 0 : $.target).value);
|
|
689
|
+
}, y = z(null);
|
|
690
|
+
return n({
|
|
770
691
|
focus: () => {
|
|
771
|
-
|
|
692
|
+
t.isDisabled || y.value.focus();
|
|
772
693
|
}
|
|
773
|
-
}), (
|
|
774
|
-
c("textarea",
|
|
775
|
-
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(
|
|
776
|
-
disabled:
|
|
777
|
-
value:
|
|
778
|
-
},
|
|
694
|
+
}), ($, M) => (a(), i("div", at, [
|
|
695
|
+
c("textarea", P({
|
|
696
|
+
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [d(u), d(o), d(v)]],
|
|
697
|
+
disabled: $.isDisabled,
|
|
698
|
+
value: $.modelValue ?? ""
|
|
699
|
+
}, $.$attrs, {
|
|
779
700
|
ref_key: "input",
|
|
780
|
-
ref:
|
|
701
|
+
ref: y,
|
|
781
702
|
cols: "56",
|
|
782
703
|
rows: "8",
|
|
783
|
-
onInput:
|
|
704
|
+
onInput: p
|
|
784
705
|
}), `
|
|
785
|
-
`, 16,
|
|
706
|
+
`, 16, nt)
|
|
786
707
|
]));
|
|
787
708
|
}
|
|
788
709
|
});
|
|
789
710
|
export {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
711
|
+
kt as D9Button,
|
|
712
|
+
vt as D9Checkbox,
|
|
713
|
+
w as D9Icon,
|
|
714
|
+
_t as D9Input,
|
|
715
|
+
xt as D9Label,
|
|
716
|
+
$t as D9Menu,
|
|
717
|
+
wt as D9MenuLink,
|
|
718
|
+
Ct as D9Select,
|
|
719
|
+
Vt as D9Skeleton,
|
|
720
|
+
Dt as D9Spinner,
|
|
721
|
+
zt as D9Switch,
|
|
722
|
+
Bt as D9Textarea,
|
|
723
|
+
ht as brands,
|
|
724
|
+
yt as icons
|
|
804
725
|
};
|