@robuust-digital/vue-components 1.3.2 → 2.0.0-rc.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/README.md +47 -52
- package/dist/_shared/ButtonBase-CQjlJ85F.js +87 -0
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +55 -0
- package/dist/_shared/FormInput-abFMz_J4.js +82 -0
- package/dist/_shared/Modal-COVlUEud.js +193 -0
- package/dist/_shared/Tooltip-BKXJoJ1x.js +126 -0
- package/dist/_shared/XMarkIcon-90mcPzBs.js +19 -0
- package/dist/_shared/icon-spinner-CmxIOqaK.js +26 -0
- package/dist/combobox/combobox.css +203 -0
- package/dist/combobox/index.js +349 -0
- package/dist/combobox/styles.css +1 -0
- package/dist/core/accordion.css +47 -0
- package/dist/core/alert.css +169 -0
- package/dist/core/badge.css +121 -0
- package/dist/core/button.css +393 -0
- package/dist/core/checkbox.css +60 -0
- package/dist/core/empty-state.css +56 -0
- package/dist/core/index.js +779 -0
- package/dist/core/input.css +92 -0
- package/dist/core/pagination.css +48 -0
- package/dist/core/radio.css +61 -0
- package/dist/core/select.css +81 -0
- package/dist/core/styles.css +92 -0
- package/dist/core/table.css +87 -0
- package/dist/core/tabs.css +74 -0
- package/dist/core/textarea.css +48 -0
- package/dist/core/theme.css +11 -0
- package/dist/dialogs/drawer.css +72 -0
- package/dist/dialogs/index.js +200 -0
- package/dist/dialogs/modal.css +98 -0
- package/dist/dialogs/styles.css +2 -0
- package/dist/dropdown/dropdown.css +89 -0
- package/dist/dropdown/index.js +136 -0
- package/dist/dropdown/styles.css +1 -0
- package/dist/lightswitch/index.js +48 -0
- package/dist/lightswitch/lightswitch.css +68 -0
- package/dist/lightswitch/styles.css +1 -0
- package/dist/rich-text-editor/index.js +262 -0
- package/dist/rich-text-editor/rich-text.css +83 -0
- package/dist/rich-text-editor/styles.css +1 -0
- package/dist/toast/index.js +100 -0
- package/dist/toast/styles.css +1 -0
- package/dist/toast/toast.css +187 -0
- package/dist/tooltip/index.js +5 -0
- package/dist/tooltip/styles.css +1 -0
- package/dist/tooltip/tooltip.css +69 -0
- package/package.json +55 -52
- package/dist/nuxt-module.js +0 -27
- package/dist/style.css +0 -1
- package/dist/tailwind/base/index.js +0 -72
- package/dist/tailwind/components/accordion.js +0 -59
- package/dist/tailwind/components/alert.js +0 -166
- package/dist/tailwind/components/badge.js +0 -119
- package/dist/tailwind/components/button.js +0 -292
- package/dist/tailwind/components/checkbox.js +0 -70
- package/dist/tailwind/components/combobox.js +0 -226
- package/dist/tailwind/components/drawer.js +0 -104
- package/dist/tailwind/components/dropdown.js +0 -97
- package/dist/tailwind/components/empty-state.js +0 -69
- package/dist/tailwind/components/input.js +0 -101
- package/dist/tailwind/components/lightswitch.js +0 -79
- package/dist/tailwind/components/modal.js +0 -132
- package/dist/tailwind/components/pagination.js +0 -62
- package/dist/tailwind/components/radio.js +0 -75
- package/dist/tailwind/components/rich-text.js +0 -100
- package/dist/tailwind/components/select.js +0 -88
- package/dist/tailwind/components/table.js +0 -109
- package/dist/tailwind/components/tabs.js +0 -95
- package/dist/tailwind/components/textarea.js +0 -53
- package/dist/tailwind/components/toast.js +0 -188
- package/dist/tailwind/components/tooltip.js +0 -74
- package/dist/tailwind/index.js +0 -94
- package/dist/vue-components.es.js +0 -2401
|
@@ -1,2401 +0,0 @@
|
|
|
1
|
-
import { openBlock as l, createElementBlock as s, createElementVNode as i, Fragment as I, renderList as P, renderSlot as b, createTextVNode as z, toDisplayString as C, createVNode as p, unref as v, normalizeClass as S, createBlock as w, resolveDynamicComponent as M, withCtx as $, createCommentVNode as x, watchEffect as ye, mergeProps as A, computed as T, getCurrentInstance as be, useAttrs as X, withDirectives as N, vModelDynamic as Y, normalizeProps as R, toValue as le, ref as j, withModifiers as W, guardReactiveProps as oe, vModelSelect as pe, Transition as ge, useSlots as he, vModelText as $e, shallowRef as Q, normalizeStyle as we, watch as re, onMounted as xe } from "vue";
|
|
2
|
-
import { Combobox as ke, ComboboxInput as Ce, ComboboxButton as Se, ComboboxOptions as Ve, ComboboxOption as Be, TransitionRoot as _, Dialog as se, TransitionChild as G, DialogPanel as ce, DialogTitle as ue, Menu as Le, MenuButton as ae, MenuItems as Ae, MenuItem as ne, SwitchGroup as Me, Switch as Te, SwitchLabel as Oe } from "@headlessui/vue";
|
|
3
|
-
import { useEditor as Ie, EditorContent as je } from "@tiptap/vue-3";
|
|
4
|
-
import Pe from "@tiptap/extension-link";
|
|
5
|
-
import ze from "@tiptap/starter-kit";
|
|
6
|
-
import { useFloating as qe, autoPlacement as Fe, offset as Ze, shift as He, arrow as Re, size as De, autoUpdate as Ee } from "@floating-ui/vue";
|
|
7
|
-
function Ne(e, a) {
|
|
8
|
-
return l(), s("svg", {
|
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
-
viewBox: "0 0 24 24",
|
|
11
|
-
fill: "currentColor",
|
|
12
|
-
"aria-hidden": "true",
|
|
13
|
-
"data-slot": "icon"
|
|
14
|
-
}, [
|
|
15
|
-
i("path", {
|
|
16
|
-
"fill-rule": "evenodd",
|
|
17
|
-
d: "M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",
|
|
18
|
-
"clip-rule": "evenodd"
|
|
19
|
-
})
|
|
20
|
-
]);
|
|
21
|
-
}
|
|
22
|
-
function Ke(e, a) {
|
|
23
|
-
return l(), s("svg", {
|
|
24
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
-
viewBox: "0 0 24 24",
|
|
26
|
-
fill: "currentColor",
|
|
27
|
-
"aria-hidden": "true",
|
|
28
|
-
"data-slot": "icon"
|
|
29
|
-
}, [
|
|
30
|
-
i("path", {
|
|
31
|
-
"fill-rule": "evenodd",
|
|
32
|
-
d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z",
|
|
33
|
-
"clip-rule": "evenodd"
|
|
34
|
-
})
|
|
35
|
-
]);
|
|
36
|
-
}
|
|
37
|
-
function J(e, a) {
|
|
38
|
-
return l(), s("svg", {
|
|
39
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
-
viewBox: "0 0 24 24",
|
|
41
|
-
fill: "currentColor",
|
|
42
|
-
"aria-hidden": "true",
|
|
43
|
-
"data-slot": "icon"
|
|
44
|
-
}, [
|
|
45
|
-
i("path", {
|
|
46
|
-
"fill-rule": "evenodd",
|
|
47
|
-
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
48
|
-
"clip-rule": "evenodd"
|
|
49
|
-
})
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
const Ue = { class: "rvc-accordion" }, We = ["open", "name"], Ge = ["innerHTML"], Al = {
|
|
53
|
-
__name: "Accordion",
|
|
54
|
-
props: {
|
|
55
|
-
items: {
|
|
56
|
-
type: Array,
|
|
57
|
-
required: !0,
|
|
58
|
-
default: () => []
|
|
59
|
-
},
|
|
60
|
-
name: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: void 0
|
|
63
|
-
},
|
|
64
|
-
defaultOpenIndex: {
|
|
65
|
-
type: Number,
|
|
66
|
-
default: 0
|
|
67
|
-
},
|
|
68
|
-
contentClass: {
|
|
69
|
-
type: String,
|
|
70
|
-
default: ""
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
setup(e) {
|
|
74
|
-
return (a, t) => (l(), s("div", Ue, [
|
|
75
|
-
(l(!0), s(I, null, P(e.items, (f, n) => (l(), s("details", {
|
|
76
|
-
key: n,
|
|
77
|
-
open: e.defaultOpenIndex === n,
|
|
78
|
-
name: e.name,
|
|
79
|
-
class: "rvc-group/accordion group/accordion"
|
|
80
|
-
}, [
|
|
81
|
-
i("summary", null, [
|
|
82
|
-
b(a.$slots, "summary", {
|
|
83
|
-
item: f,
|
|
84
|
-
active: e.defaultOpenIndex === n
|
|
85
|
-
}, () => [
|
|
86
|
-
z(C(f.title) + " ", 1),
|
|
87
|
-
b(a.$slots, "icon", { classList: "size-5 group-open/accordion:rotate-45 transition-transform" }, () => [
|
|
88
|
-
p(v(Ke), { class: "rvc-size-5 group-open/accordion:rvc-rotate-45 rvc-transition-transform" })
|
|
89
|
-
])
|
|
90
|
-
])
|
|
91
|
-
]),
|
|
92
|
-
i("div", {
|
|
93
|
-
class: S(["rvc-accordion-content", e.contentClass])
|
|
94
|
-
}, [
|
|
95
|
-
b(a.$slots, "content", { item: f }, () => [
|
|
96
|
-
i("div", {
|
|
97
|
-
innerHTML: f.content
|
|
98
|
-
}, null, 8, Ge)
|
|
99
|
-
])
|
|
100
|
-
], 2)
|
|
101
|
-
], 8, We))), 128))
|
|
102
|
-
]));
|
|
103
|
-
}
|
|
104
|
-
}, Je = { class: "rvc-alert-title" }, Ml = {
|
|
105
|
-
__name: "Alert",
|
|
106
|
-
props: {
|
|
107
|
-
as: {
|
|
108
|
-
type: String,
|
|
109
|
-
default: "div"
|
|
110
|
-
},
|
|
111
|
-
title: {
|
|
112
|
-
type: String,
|
|
113
|
-
default: ""
|
|
114
|
-
},
|
|
115
|
-
icon: {
|
|
116
|
-
type: [Object, Function],
|
|
117
|
-
default: null
|
|
118
|
-
},
|
|
119
|
-
type: {
|
|
120
|
-
type: String,
|
|
121
|
-
default: "info",
|
|
122
|
-
validator: (e) => ["success", "warning", "danger", "info"].includes(e)
|
|
123
|
-
},
|
|
124
|
-
close: {
|
|
125
|
-
type: Boolean,
|
|
126
|
-
default: !1
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
emits: ["alert:close"],
|
|
130
|
-
setup(e) {
|
|
131
|
-
return (a, t) => (l(), w(M(e.as), {
|
|
132
|
-
class: S(["rvc-alert", `rvc-alert-${e.type}`])
|
|
133
|
-
}, {
|
|
134
|
-
default: $(() => [
|
|
135
|
-
b(a.$slots, "icon", {}, () => [
|
|
136
|
-
e.icon ? (l(), w(M(e.icon), {
|
|
137
|
-
key: 0,
|
|
138
|
-
class: "rvc-alert-icon"
|
|
139
|
-
})) : x("", !0)
|
|
140
|
-
]),
|
|
141
|
-
i("div", null, [
|
|
142
|
-
b(a.$slots, "title", {}, () => [
|
|
143
|
-
i("span", Je, C(e.title), 1)
|
|
144
|
-
]),
|
|
145
|
-
b(a.$slots, "default")
|
|
146
|
-
]),
|
|
147
|
-
b(a.$slots, "close", {}, () => [
|
|
148
|
-
e.close ? (l(), s("button", {
|
|
149
|
-
key: 0,
|
|
150
|
-
type: "button",
|
|
151
|
-
class: "rvc-alert-close rvc-transition-colors",
|
|
152
|
-
onClick: t[0] || (t[0] = (f) => a.$emit("alert:close"))
|
|
153
|
-
}, [
|
|
154
|
-
p(v(J), { class: "rvc-size-5" })
|
|
155
|
-
])) : x("", !0)
|
|
156
|
-
])
|
|
157
|
-
]),
|
|
158
|
-
_: 3
|
|
159
|
-
}, 8, ["class"]));
|
|
160
|
-
}
|
|
161
|
-
}, Qe = {
|
|
162
|
-
__name: "Badge",
|
|
163
|
-
props: {
|
|
164
|
-
as: {
|
|
165
|
-
type: String,
|
|
166
|
-
default: "span"
|
|
167
|
-
},
|
|
168
|
-
label: {
|
|
169
|
-
type: String,
|
|
170
|
-
default: ""
|
|
171
|
-
},
|
|
172
|
-
size: {
|
|
173
|
-
type: String,
|
|
174
|
-
default: "base",
|
|
175
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
176
|
-
},
|
|
177
|
-
color: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: "default",
|
|
180
|
-
validator: (e) => typeof e != "string" ? !1 : /^(default|gray|red|yellow|green|blue|violet|purple|pink)?$/.test(e) || e.startsWith("custom-")
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
setup(e) {
|
|
184
|
-
return (a, t) => (l(), w(M(e.as), {
|
|
185
|
-
class: S(["rvc-badge", `rvc-badge-${e.color}`, `rvc-badge-${e.size}`])
|
|
186
|
-
}, {
|
|
187
|
-
default: $(() => [
|
|
188
|
-
b(a.$slots, "default", { label: e.label }, () => [
|
|
189
|
-
z(C(e.label), 1)
|
|
190
|
-
])
|
|
191
|
-
]),
|
|
192
|
-
_: 3
|
|
193
|
-
}, 8, ["class"]));
|
|
194
|
-
}
|
|
195
|
-
}, Xe = {
|
|
196
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
197
|
-
fill: "none",
|
|
198
|
-
viewBox: "0 0 24 24"
|
|
199
|
-
};
|
|
200
|
-
function Ye(e, a) {
|
|
201
|
-
return l(), s("svg", Xe, a[0] || (a[0] = [
|
|
202
|
-
i("circle", {
|
|
203
|
-
cx: "12",
|
|
204
|
-
cy: "12",
|
|
205
|
-
r: "10",
|
|
206
|
-
stroke: "currentColor",
|
|
207
|
-
"stroke-width": "4",
|
|
208
|
-
style: { opacity: ".25" }
|
|
209
|
-
}, null, -1),
|
|
210
|
-
i("path", {
|
|
211
|
-
fill: "currentColor",
|
|
212
|
-
d: "M4 12a8 8 0 0 1 8-8V0C5.373 0 0 5.373 0 12zm2 5.291A7.96 7.96 0 0 1 4 12H0c0 3.042 1.135 5.824 3 7.938z"
|
|
213
|
-
}, null, -1)
|
|
214
|
-
]));
|
|
215
|
-
}
|
|
216
|
-
const ee = { render: Ye }, _e = {
|
|
217
|
-
key: 0,
|
|
218
|
-
class: "rvc-sr-only"
|
|
219
|
-
}, E = {
|
|
220
|
-
__name: "ButtonBase",
|
|
221
|
-
props: {
|
|
222
|
-
as: {
|
|
223
|
-
type: [String, Object, Function],
|
|
224
|
-
default: "button"
|
|
225
|
-
},
|
|
226
|
-
bindAs: {
|
|
227
|
-
type: String,
|
|
228
|
-
default: void 0
|
|
229
|
-
},
|
|
230
|
-
label: {
|
|
231
|
-
type: String,
|
|
232
|
-
default: ""
|
|
233
|
-
},
|
|
234
|
-
icon: {
|
|
235
|
-
type: [Object, Function],
|
|
236
|
-
default: null
|
|
237
|
-
},
|
|
238
|
-
iconOnly: {
|
|
239
|
-
type: Boolean,
|
|
240
|
-
default: !1
|
|
241
|
-
},
|
|
242
|
-
iconLeft: {
|
|
243
|
-
type: Boolean
|
|
244
|
-
},
|
|
245
|
-
size: {
|
|
246
|
-
type: String,
|
|
247
|
-
default: "base",
|
|
248
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
249
|
-
},
|
|
250
|
-
spinning: {
|
|
251
|
-
type: Boolean
|
|
252
|
-
},
|
|
253
|
-
color: {
|
|
254
|
-
type: String,
|
|
255
|
-
default: "primary",
|
|
256
|
-
validator: (e) => typeof e != "string" ? !1 : /^(primary|secondary|tertiary|light|dark|green|red|yellow|blue|green-soft|red-soft|yellow-soft|blue-soft)?$/.test(e) || e.startsWith("custom-") || e === "clear"
|
|
257
|
-
}
|
|
258
|
-
},
|
|
259
|
-
setup(e) {
|
|
260
|
-
const a = e;
|
|
261
|
-
return ye(() => {
|
|
262
|
-
a.iconOnly && !a.icon && console.warn("[ButtonBase] Using iconOnly prop without providing an icon may result in an empty button.");
|
|
263
|
-
}), (t, f) => (l(), w(M(e.as), A(e.bindAs ? { as: e.bindAs } : {}, {
|
|
264
|
-
class: ["rvc-button", `rvc-button-${e.color}`, `rvc-button-${e.size}`, { "rvc-button-reverse": e.iconLeft }, { "rvc-button-icon-only": e.iconOnly }],
|
|
265
|
-
"aria-label": e.iconOnly ? e.label : null,
|
|
266
|
-
"aria-busy": e.spinning
|
|
267
|
-
}), {
|
|
268
|
-
default: $(() => [
|
|
269
|
-
e.iconOnly && e.label ? (l(), s("span", _e, [
|
|
270
|
-
b(t.$slots, "default", { label: e.label }, () => [
|
|
271
|
-
z(C(e.label), 1)
|
|
272
|
-
])
|
|
273
|
-
])) : e.label ? b(t.$slots, "default", {
|
|
274
|
-
key: 1,
|
|
275
|
-
label: e.label
|
|
276
|
-
}, () => [
|
|
277
|
-
z(C(e.label), 1)
|
|
278
|
-
]) : x("", !0),
|
|
279
|
-
b(t.$slots, "icon", { icon: e.icon }, () => [
|
|
280
|
-
e.icon && !e.spinning ? (l(), w(M(e.icon), {
|
|
281
|
-
key: 0,
|
|
282
|
-
class: "rvc-button-icon",
|
|
283
|
-
"aria-hidden": !e.iconOnly
|
|
284
|
-
}, null, 8, ["aria-hidden"])) : x("", !0)
|
|
285
|
-
]),
|
|
286
|
-
b(t.$slots, "spinner", { spinning: e.spinning }, () => [
|
|
287
|
-
e.spinning ? (l(), w(v(ee), {
|
|
288
|
-
key: 0,
|
|
289
|
-
class: "rvc-button-icon rvc-button-icon-loading",
|
|
290
|
-
"aria-hidden": "true"
|
|
291
|
-
})) : x("", !0)
|
|
292
|
-
])
|
|
293
|
-
]),
|
|
294
|
-
_: 3
|
|
295
|
-
}, 16, ["class", "aria-label", "aria-busy"]));
|
|
296
|
-
}
|
|
297
|
-
}, K = () => ({ hasModelBinding: T(() => {
|
|
298
|
-
var t;
|
|
299
|
-
const a = be();
|
|
300
|
-
return ((t = a == null ? void 0 : a.vnode) == null ? void 0 : t.props) && Object.prototype.hasOwnProperty.call(a.vnode.props, "onUpdate:modelValue");
|
|
301
|
-
}) }), et = { class: "rvc-checkbox-input peer-focus/checkbox:rvc-focus" }, tt = ["for"], Tl = /* @__PURE__ */ Object.assign({
|
|
302
|
-
inheritAttrs: !1
|
|
303
|
-
}, {
|
|
304
|
-
__name: "Checkbox",
|
|
305
|
-
props: {
|
|
306
|
-
modelValue: {
|
|
307
|
-
type: [Boolean, String, Array],
|
|
308
|
-
default: null
|
|
309
|
-
},
|
|
310
|
-
id: {
|
|
311
|
-
type: String,
|
|
312
|
-
default: null
|
|
313
|
-
},
|
|
314
|
-
label: {
|
|
315
|
-
type: String,
|
|
316
|
-
default: ""
|
|
317
|
-
},
|
|
318
|
-
rootClass: {
|
|
319
|
-
type: String,
|
|
320
|
-
default: ""
|
|
321
|
-
}
|
|
322
|
-
},
|
|
323
|
-
emits: ["update:modelValue"],
|
|
324
|
-
setup(e, { emit: a }) {
|
|
325
|
-
const t = e, f = a, n = T({
|
|
326
|
-
get: () => t.modelValue,
|
|
327
|
-
set: (u) => f("update:modelValue", u)
|
|
328
|
-
}), { hasModelBinding: c } = K(), d = {
|
|
329
|
-
...X(),
|
|
330
|
-
id: t.id,
|
|
331
|
-
type: "checkbox",
|
|
332
|
-
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer rvc-peer/checkbox"
|
|
333
|
-
};
|
|
334
|
-
return (u, r) => (l(), s("div", {
|
|
335
|
-
class: S(["rvc-checkbox", e.rootClass])
|
|
336
|
-
}, [
|
|
337
|
-
v(c) ? N((l(), s("input", A({ key: 0 }, d, {
|
|
338
|
-
"onUpdate:modelValue": r[0] || (r[0] = (o) => n.value = o)
|
|
339
|
-
}), null, 16)), [
|
|
340
|
-
[Y, n.value]
|
|
341
|
-
]) : (l(), s("input", R(A({ key: 1 }, d)), null, 16)),
|
|
342
|
-
i("span", et, [
|
|
343
|
-
p(v(Ne))
|
|
344
|
-
]),
|
|
345
|
-
i("div", null, [
|
|
346
|
-
u.$slots.default || e.label ? b(u.$slots, "default", { key: 0 }, () => [
|
|
347
|
-
i("label", { for: e.id }, C(e.label), 9, tt)
|
|
348
|
-
]) : x("", !0)
|
|
349
|
-
])
|
|
350
|
-
], 2));
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
354
|
-
const ie = () => {
|
|
355
|
-
};
|
|
356
|
-
function lt(e, a) {
|
|
357
|
-
function t(...f) {
|
|
358
|
-
return new Promise((n, c) => {
|
|
359
|
-
Promise.resolve(e(() => a.apply(this, f), { fn: a, thisArg: this, args: f })).then(n).catch(c);
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
return t;
|
|
363
|
-
}
|
|
364
|
-
function at(e, a = {}) {
|
|
365
|
-
let t, f, n = ie;
|
|
366
|
-
const c = (d) => {
|
|
367
|
-
clearTimeout(d), n(), n = ie;
|
|
368
|
-
};
|
|
369
|
-
return (d) => {
|
|
370
|
-
const u = le(e), r = le(a.maxWait);
|
|
371
|
-
return t && c(t), u <= 0 || r !== void 0 && r <= 0 ? (f && (c(f), f = null), Promise.resolve(d())) : new Promise((o, y) => {
|
|
372
|
-
n = a.rejectOnCancel ? y : o, r && !f && (f = setTimeout(() => {
|
|
373
|
-
t && c(t), f = null, o(d());
|
|
374
|
-
}, r)), t = setTimeout(() => {
|
|
375
|
-
f && c(f), f = null, o(d());
|
|
376
|
-
}, u);
|
|
377
|
-
});
|
|
378
|
-
};
|
|
379
|
-
}
|
|
380
|
-
function nt(e, a = 200, t = {}) {
|
|
381
|
-
return lt(
|
|
382
|
-
at(a, t),
|
|
383
|
-
e
|
|
384
|
-
);
|
|
385
|
-
}
|
|
386
|
-
function de(e, a) {
|
|
387
|
-
return l(), s("svg", {
|
|
388
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
389
|
-
viewBox: "0 0 20 20",
|
|
390
|
-
fill: "currentColor",
|
|
391
|
-
"aria-hidden": "true",
|
|
392
|
-
"data-slot": "icon"
|
|
393
|
-
}, [
|
|
394
|
-
i("path", {
|
|
395
|
-
"fill-rule": "evenodd",
|
|
396
|
-
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
397
|
-
"clip-rule": "evenodd"
|
|
398
|
-
})
|
|
399
|
-
]);
|
|
400
|
-
}
|
|
401
|
-
function it(e, a) {
|
|
402
|
-
return l(), s("svg", {
|
|
403
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
404
|
-
viewBox: "0 0 20 20",
|
|
405
|
-
fill: "currentColor",
|
|
406
|
-
"aria-hidden": "true",
|
|
407
|
-
"data-slot": "icon"
|
|
408
|
-
}, [
|
|
409
|
-
i("path", {
|
|
410
|
-
"fill-rule": "evenodd",
|
|
411
|
-
d: "M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",
|
|
412
|
-
"clip-rule": "evenodd"
|
|
413
|
-
})
|
|
414
|
-
]);
|
|
415
|
-
}
|
|
416
|
-
function ot(e, a) {
|
|
417
|
-
return l(), s("svg", {
|
|
418
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
419
|
-
viewBox: "0 0 20 20",
|
|
420
|
-
fill: "currentColor",
|
|
421
|
-
"aria-hidden": "true",
|
|
422
|
-
"data-slot": "icon"
|
|
423
|
-
}, [
|
|
424
|
-
i("path", {
|
|
425
|
-
"fill-rule": "evenodd",
|
|
426
|
-
d: "M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",
|
|
427
|
-
"clip-rule": "evenodd"
|
|
428
|
-
})
|
|
429
|
-
]);
|
|
430
|
-
}
|
|
431
|
-
function rt(e, a) {
|
|
432
|
-
return l(), s("svg", {
|
|
433
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
434
|
-
viewBox: "0 0 20 20",
|
|
435
|
-
fill: "currentColor",
|
|
436
|
-
"aria-hidden": "true",
|
|
437
|
-
"data-slot": "icon"
|
|
438
|
-
}, [
|
|
439
|
-
i("path", { d: "M10 3a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM10 8.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM11.5 15.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Z" })
|
|
440
|
-
]);
|
|
441
|
-
}
|
|
442
|
-
function st(e, a) {
|
|
443
|
-
return l(), s("svg", {
|
|
444
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
445
|
-
viewBox: "0 0 20 20",
|
|
446
|
-
fill: "currentColor",
|
|
447
|
-
"aria-hidden": "true",
|
|
448
|
-
"data-slot": "icon"
|
|
449
|
-
}, [
|
|
450
|
-
i("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
451
|
-
]);
|
|
452
|
-
}
|
|
453
|
-
function ct(e, a) {
|
|
454
|
-
return l(), s("svg", {
|
|
455
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
456
|
-
viewBox: "0 0 16 16",
|
|
457
|
-
fill: "currentColor",
|
|
458
|
-
"aria-hidden": "true",
|
|
459
|
-
"data-slot": "icon"
|
|
460
|
-
}, [
|
|
461
|
-
i("path", {
|
|
462
|
-
"fill-rule": "evenodd",
|
|
463
|
-
d: "M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",
|
|
464
|
-
"clip-rule": "evenodd"
|
|
465
|
-
})
|
|
466
|
-
]);
|
|
467
|
-
}
|
|
468
|
-
function ut(e, a) {
|
|
469
|
-
return l(), s("svg", {
|
|
470
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
471
|
-
viewBox: "0 0 16 16",
|
|
472
|
-
fill: "currentColor",
|
|
473
|
-
"aria-hidden": "true",
|
|
474
|
-
"data-slot": "icon"
|
|
475
|
-
}, [
|
|
476
|
-
i("path", {
|
|
477
|
-
"fill-rule": "evenodd",
|
|
478
|
-
d: "M3 3a1 1 0 0 1 1-1h5a3.5 3.5 0 0 1 2.843 5.541A3.75 3.75 0 0 1 9.25 14H4a1 1 0 0 1-1-1V3Zm2.5 3.5v-2H9a1 1 0 0 1 0 2H5.5Zm0 2.5v2.5h3.75a1.25 1.25 0 1 0 0-2.5H5.5Z",
|
|
479
|
-
"clip-rule": "evenodd"
|
|
480
|
-
})
|
|
481
|
-
]);
|
|
482
|
-
}
|
|
483
|
-
function dt(e, a) {
|
|
484
|
-
return l(), s("svg", {
|
|
485
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
486
|
-
viewBox: "0 0 16 16",
|
|
487
|
-
fill: "currentColor",
|
|
488
|
-
"aria-hidden": "true",
|
|
489
|
-
"data-slot": "icon"
|
|
490
|
-
}, [
|
|
491
|
-
i("path", {
|
|
492
|
-
"fill-rule": "evenodd",
|
|
493
|
-
d: "M6.25 2.75A.75.75 0 0 1 7 2h6a.75.75 0 0 1 0 1.5h-2.483l-3.429 9H9A.75.75 0 0 1 9 14H3a.75.75 0 0 1 0-1.5h2.483l3.429-9H7a.75.75 0 0 1-.75-.75Z",
|
|
494
|
-
"clip-rule": "evenodd"
|
|
495
|
-
})
|
|
496
|
-
]);
|
|
497
|
-
}
|
|
498
|
-
function vt(e, a) {
|
|
499
|
-
return l(), s("svg", {
|
|
500
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
501
|
-
viewBox: "0 0 16 16",
|
|
502
|
-
fill: "currentColor",
|
|
503
|
-
"aria-hidden": "true",
|
|
504
|
-
"data-slot": "icon"
|
|
505
|
-
}, [
|
|
506
|
-
i("path", {
|
|
507
|
-
"fill-rule": "evenodd",
|
|
508
|
-
d: "M8.914 6.025a.75.75 0 0 1 1.06 0 3.5 3.5 0 0 1 0 4.95l-2 2a3.5 3.5 0 0 1-5.396-4.402.75.75 0 0 1 1.251.827 2 2 0 0 0 3.085 2.514l2-2a2 2 0 0 0 0-2.828.75.75 0 0 1 0-1.06Z",
|
|
509
|
-
"clip-rule": "evenodd"
|
|
510
|
-
}),
|
|
511
|
-
i("path", {
|
|
512
|
-
"fill-rule": "evenodd",
|
|
513
|
-
d: "M7.086 9.975a.75.75 0 0 1-1.06 0 3.5 3.5 0 0 1 0-4.95l2-2a3.5 3.5 0 0 1 5.396 4.402.75.75 0 0 1-1.251-.827 2 2 0 0 0-3.085-2.514l-2 2a2 2 0 0 0 0 2.828.75.75 0 0 1 0 1.06Z",
|
|
514
|
-
"clip-rule": "evenodd"
|
|
515
|
-
})
|
|
516
|
-
]);
|
|
517
|
-
}
|
|
518
|
-
function ft(e, a) {
|
|
519
|
-
return l(), s("svg", {
|
|
520
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
521
|
-
viewBox: "0 0 16 16",
|
|
522
|
-
fill: "currentColor",
|
|
523
|
-
"aria-hidden": "true",
|
|
524
|
-
"data-slot": "icon"
|
|
525
|
-
}, [
|
|
526
|
-
i("path", { d: "M3 4.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM6.25 3a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 7.25a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM6.25 11.5a.75.75 0 0 0 0 1.5h7a.75.75 0 0 0 0-1.5h-7ZM4 12.25a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" })
|
|
527
|
-
]);
|
|
528
|
-
}
|
|
529
|
-
function mt(e, a) {
|
|
530
|
-
return l(), s("svg", {
|
|
531
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
532
|
-
viewBox: "0 0 16 16",
|
|
533
|
-
fill: "currentColor",
|
|
534
|
-
"aria-hidden": "true",
|
|
535
|
-
"data-slot": "icon"
|
|
536
|
-
}, [
|
|
537
|
-
i("path", { d: "M2.995 1a.625.625 0 1 0 0 1.25h.38v2.125a.625.625 0 1 0 1.25 0v-2.75A.625.625 0 0 0 4 1H2.995ZM3.208 7.385a2.37 2.37 0 0 1 1.027-.124L2.573 8.923a.625.625 0 0 0 .439 1.067l1.987.011a.625.625 0 0 0 .006-1.25l-.49-.003.777-.776c.215-.215.335-.506.335-.809 0-.465-.297-.957-.842-1.078a3.636 3.636 0 0 0-1.993.121.625.625 0 1 0 .416 1.179ZM2.625 11a.625.625 0 1 0 0 1.25H4.25a.125.125 0 0 1 0 .25H3.5a.625.625 0 1 0 0 1.25h.75a.125.125 0 0 1 0 .25H2.625a.625.625 0 1 0 0 1.25H4.25a1.375 1.375 0 0 0 1.153-2.125A1.375 1.375 0 0 0 4.25 11H2.625ZM7.25 2a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM7.25 7.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5h-6ZM6.5 13.25a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75Z" })
|
|
538
|
-
]);
|
|
539
|
-
}
|
|
540
|
-
function yt(e, a) {
|
|
541
|
-
return l(), s("svg", {
|
|
542
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
543
|
-
viewBox: "0 0 16 16",
|
|
544
|
-
fill: "currentColor",
|
|
545
|
-
"aria-hidden": "true",
|
|
546
|
-
"data-slot": "icon"
|
|
547
|
-
}, [
|
|
548
|
-
i("path", {
|
|
549
|
-
"fill-rule": "evenodd",
|
|
550
|
-
d: "M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm2.78-4.22a.75.75 0 0 1-1.06 0L8 9.06l-1.72 1.72a.75.75 0 1 1-1.06-1.06L6.94 8 5.22 6.28a.75.75 0 0 1 1.06-1.06L8 6.94l1.72-1.72a.75.75 0 1 1 1.06 1.06L9.06 8l1.72 1.72a.75.75 0 0 1 0 1.06Z",
|
|
551
|
-
"clip-rule": "evenodd"
|
|
552
|
-
})
|
|
553
|
-
]);
|
|
554
|
-
}
|
|
555
|
-
const bt = { class: "rvc-relative" }, pt = { class: "rvc-flex rvc-gap-x-1" }, gt = { class: "rvc-combobox-wrapper" }, ht = {
|
|
556
|
-
key: 0,
|
|
557
|
-
class: "rvc-combobox-chips"
|
|
558
|
-
}, $t = ["onClick"], wt = {
|
|
559
|
-
key: 0,
|
|
560
|
-
class: "rvc-relative rvc-cursor-default rvc-select-none rvc-py-2 rvc-pl-3 rvc-pr-9 rvc-text-slate-500"
|
|
561
|
-
}, xt = { class: "rvc-flex rvc-items-center" }, kt = {
|
|
562
|
-
key: 1,
|
|
563
|
-
class: "rvc-relative rvc-cursor-default rvc-select-none rvc-py-2 rvc-pl-3 rvc-pr-9 rvc-text-slate-500"
|
|
564
|
-
}, Ct = { class: "rvc-block rvc-truncate" }, Ol = /* @__PURE__ */ Object.assign({
|
|
565
|
-
inheritAttrs: !1
|
|
566
|
-
}, {
|
|
567
|
-
__name: "Combobox",
|
|
568
|
-
props: {
|
|
569
|
-
id: {
|
|
570
|
-
type: String,
|
|
571
|
-
required: !0
|
|
572
|
-
},
|
|
573
|
-
rootClass: {
|
|
574
|
-
type: String,
|
|
575
|
-
default: ""
|
|
576
|
-
},
|
|
577
|
-
modelValue: {
|
|
578
|
-
type: [Number, String, Object, Array, null],
|
|
579
|
-
required: !1,
|
|
580
|
-
default: null
|
|
581
|
-
},
|
|
582
|
-
endpoint: {
|
|
583
|
-
type: String,
|
|
584
|
-
default: void 0
|
|
585
|
-
},
|
|
586
|
-
requestParams: {
|
|
587
|
-
type: Object,
|
|
588
|
-
required: !1,
|
|
589
|
-
default: () => ({})
|
|
590
|
-
},
|
|
591
|
-
manualInput: {
|
|
592
|
-
type: Boolean,
|
|
593
|
-
required: !1,
|
|
594
|
-
default: !1
|
|
595
|
-
},
|
|
596
|
-
responseData: {
|
|
597
|
-
type: Function,
|
|
598
|
-
required: !1,
|
|
599
|
-
default: (e) => e
|
|
600
|
-
},
|
|
601
|
-
displayValue: {
|
|
602
|
-
type: Function,
|
|
603
|
-
required: !1,
|
|
604
|
-
default: (e) => (e == null ? void 0 : e.name) || null
|
|
605
|
-
},
|
|
606
|
-
optionText: {
|
|
607
|
-
type: Function,
|
|
608
|
-
required: !1,
|
|
609
|
-
default: (e) => (e == null ? void 0 : e.name) || null
|
|
610
|
-
},
|
|
611
|
-
disabled: {
|
|
612
|
-
type: Boolean,
|
|
613
|
-
required: !1,
|
|
614
|
-
default: !1
|
|
615
|
-
},
|
|
616
|
-
minLength: {
|
|
617
|
-
type: Number,
|
|
618
|
-
default: 2,
|
|
619
|
-
required: !1
|
|
620
|
-
},
|
|
621
|
-
itemKey: {
|
|
622
|
-
type: String,
|
|
623
|
-
required: !1,
|
|
624
|
-
default: "id"
|
|
625
|
-
},
|
|
626
|
-
clearable: {
|
|
627
|
-
type: Boolean,
|
|
628
|
-
required: !1
|
|
629
|
-
},
|
|
630
|
-
rootAttrs: {
|
|
631
|
-
type: Object,
|
|
632
|
-
default: () => {
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
multiple: {
|
|
636
|
-
type: Boolean
|
|
637
|
-
},
|
|
638
|
-
onSearch: {
|
|
639
|
-
type: Function,
|
|
640
|
-
default: () => null
|
|
641
|
-
},
|
|
642
|
-
searchOnly: {
|
|
643
|
-
type: Boolean
|
|
644
|
-
},
|
|
645
|
-
icon: {
|
|
646
|
-
type: [Object, Function],
|
|
647
|
-
default: null
|
|
648
|
-
},
|
|
649
|
-
prefixIcon: {
|
|
650
|
-
type: [Object, Function],
|
|
651
|
-
default: null
|
|
652
|
-
},
|
|
653
|
-
size: {
|
|
654
|
-
type: String,
|
|
655
|
-
default: "base",
|
|
656
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
657
|
-
},
|
|
658
|
-
debounce: {
|
|
659
|
-
type: Number,
|
|
660
|
-
default: 150
|
|
661
|
-
},
|
|
662
|
-
minLoadingTime: {
|
|
663
|
-
type: Number,
|
|
664
|
-
default: 0
|
|
665
|
-
},
|
|
666
|
-
onCancel: {
|
|
667
|
-
type: Function,
|
|
668
|
-
default: null
|
|
669
|
-
}
|
|
670
|
-
},
|
|
671
|
-
emits: ["update:modelValue", "update:requestParams", "combobox:noResults", "combobox:error"],
|
|
672
|
-
setup(e, { emit: a }) {
|
|
673
|
-
const t = e, f = a, n = j([]), c = j(!1), m = j(null), d = j(!0), u = j(null), r = T({
|
|
674
|
-
get: () => t.multiple ? t.modelValue || [] : t.modelValue,
|
|
675
|
-
set: (h) => f("update:modelValue", h)
|
|
676
|
-
}), o = T({
|
|
677
|
-
get: () => t.requestParams,
|
|
678
|
-
set: (h) => f("update:requestParams", h)
|
|
679
|
-
}), y = (h) => new Promise((V) => {
|
|
680
|
-
setTimeout(V, h);
|
|
681
|
-
}), g = (h, V) => {
|
|
682
|
-
n.value = [], f("combobox:error", h), f("combobox:noResults", V);
|
|
683
|
-
}, q = async (h) => {
|
|
684
|
-
if (!t.onSearch) return;
|
|
685
|
-
if (t.searchOnly && !h) {
|
|
686
|
-
n.value = [];
|
|
687
|
-
return;
|
|
688
|
-
}
|
|
689
|
-
if (h && h.length < t.minLength) {
|
|
690
|
-
n.value = [];
|
|
691
|
-
return;
|
|
692
|
-
}
|
|
693
|
-
u.value && t.onCancel && t.onCancel(u.value), c.value = !0;
|
|
694
|
-
const V = Date.now();
|
|
695
|
-
try {
|
|
696
|
-
const { data: F, error: D, cancel: U } = await t.onSearch(h, o.value, t.endpoint);
|
|
697
|
-
u.value = U;
|
|
698
|
-
const L = t.responseData(F), Z = Date.now() - V;
|
|
699
|
-
!L.length && D && g(D, h), Z < t.minLoadingTime && await y(t.minLoadingTime - Z), L != null && L.length ? n.value = L : (n.value = [], f("combobox:noResults", h));
|
|
700
|
-
} catch (F) {
|
|
701
|
-
F.cancelled || g(F, h);
|
|
702
|
-
} finally {
|
|
703
|
-
c.value = !1;
|
|
704
|
-
}
|
|
705
|
-
}, B = nt(q, t.debounce), O = (h) => {
|
|
706
|
-
d.value ? (d.value = !1, q(h)) : B(h);
|
|
707
|
-
}, k = (h) => {
|
|
708
|
-
var V;
|
|
709
|
-
((V = h.target.value) == null ? void 0 : V.length) === 0 && (n.value = [], f("update:modelValue", null)), t.manualInput && f("update:modelValue", o.value.query);
|
|
710
|
-
}, H = (h) => {
|
|
711
|
-
var V;
|
|
712
|
-
return t.multiple ? r.value.some((F) => F[t.itemKey] === h) : ((V = r.value) == null ? void 0 : V[t.itemKey]) === h;
|
|
713
|
-
}, te = (h) => {
|
|
714
|
-
r.value = r.value.filter((V) => V[t.itemKey] !== h[t.itemKey]);
|
|
715
|
-
};
|
|
716
|
-
return (h, V) => (l(), w(v(ke), A({
|
|
717
|
-
modelValue: r.value,
|
|
718
|
-
"onUpdate:modelValue": V[4] || (V[4] = (F) => r.value = F),
|
|
719
|
-
as: "div"
|
|
720
|
-
}, e.rootAttrs, {
|
|
721
|
-
multiple: e.multiple,
|
|
722
|
-
class: [
|
|
723
|
-
"rvc-combobox",
|
|
724
|
-
`rvc-combobox-${e.size}`,
|
|
725
|
-
e.rootClass
|
|
726
|
-
]
|
|
727
|
-
}), {
|
|
728
|
-
default: $(() => {
|
|
729
|
-
var F, D, U;
|
|
730
|
-
return [
|
|
731
|
-
i("div", bt, [
|
|
732
|
-
i("div", pt, [
|
|
733
|
-
i("div", gt, [
|
|
734
|
-
e.prefixIcon ? b(h.$slots, "prefixIcon", {
|
|
735
|
-
key: 0,
|
|
736
|
-
icon: e.prefixIcon
|
|
737
|
-
}, () => [
|
|
738
|
-
(l(), w(M(e.prefixIcon), { "aria-hidden": "true" }))
|
|
739
|
-
]) : x("", !0),
|
|
740
|
-
p(v(Ce), A(h.$attrs, {
|
|
741
|
-
id: e.id,
|
|
742
|
-
"display-value": e.displayValue,
|
|
743
|
-
disabled: e.disabled,
|
|
744
|
-
autocomplete: "off",
|
|
745
|
-
onChange: V[0] || (V[0] = (L) => O(L.target.value)),
|
|
746
|
-
onSearch: k,
|
|
747
|
-
onInput: V[1] || (V[1] = (L) => m.value = L.target.value)
|
|
748
|
-
}), null, 16, ["id", "display-value", "disabled"]),
|
|
749
|
-
p(v(Se), {
|
|
750
|
-
disabled: e.disabled,
|
|
751
|
-
class: "rvc-combobox-button",
|
|
752
|
-
onClick: V[2] || (V[2] = (L) => O(m.value || null))
|
|
753
|
-
}, {
|
|
754
|
-
default: $(() => {
|
|
755
|
-
var L;
|
|
756
|
-
return [
|
|
757
|
-
c.value ? b(h.$slots, "spinner", {
|
|
758
|
-
key: 0,
|
|
759
|
-
spinning: c.value
|
|
760
|
-
}, () => [
|
|
761
|
-
p(v(ee), { class: "rvc-combobox-spinner" })
|
|
762
|
-
]) : (!e.searchOnly || (L = n.value) != null && L.length) && !c.value ? b(h.$slots, "icon", {
|
|
763
|
-
key: 1,
|
|
764
|
-
icon: e.icon
|
|
765
|
-
}, () => [
|
|
766
|
-
(l(), w(M(e.icon ?? v(de)), { "aria-hidden": "true" }))
|
|
767
|
-
]) : x("", !0)
|
|
768
|
-
];
|
|
769
|
-
}),
|
|
770
|
-
_: 3
|
|
771
|
-
}, 8, ["disabled"])
|
|
772
|
-
]),
|
|
773
|
-
e.clearable && ((F = e.modelValue) != null && F.length || (D = e.modelValue) != null && D.id) ? (l(), s("button", {
|
|
774
|
-
key: 0,
|
|
775
|
-
type: "button",
|
|
776
|
-
"aria-label": "Clear selection",
|
|
777
|
-
class: "rvc-combobox-clear",
|
|
778
|
-
onClick: V[3] || (V[3] = W((L) => f("update:modelValue", null), ["prevent"]))
|
|
779
|
-
}, [
|
|
780
|
-
b(h.$slots, "clear", {}, () => [
|
|
781
|
-
p(v(st))
|
|
782
|
-
])
|
|
783
|
-
])) : x("", !0)
|
|
784
|
-
]),
|
|
785
|
-
e.multiple && r.value.length ? (l(), s("ul", ht, [
|
|
786
|
-
(l(!0), s(I, null, P(r.value, (L) => (l(), s("li", {
|
|
787
|
-
key: `${e.id}-selected-option-${L[e.itemKey]}`
|
|
788
|
-
}, [
|
|
789
|
-
b(h.$slots, "chip", {
|
|
790
|
-
optionText: e.optionText(L),
|
|
791
|
-
option: L,
|
|
792
|
-
removeOption: te
|
|
793
|
-
}, () => [
|
|
794
|
-
p(Qe, {
|
|
795
|
-
color: "gray",
|
|
796
|
-
class: "rvc-combobox-chip",
|
|
797
|
-
size: e.size
|
|
798
|
-
}, {
|
|
799
|
-
default: $(() => [
|
|
800
|
-
z(C(e.optionText(L)) + " ", 1),
|
|
801
|
-
i("button", {
|
|
802
|
-
type: "button",
|
|
803
|
-
"aria-label": "Remove option",
|
|
804
|
-
onClick: W((Z) => te(L), ["prevent"])
|
|
805
|
-
}, [
|
|
806
|
-
p(v(yt))
|
|
807
|
-
], 8, $t)
|
|
808
|
-
]),
|
|
809
|
-
_: 2
|
|
810
|
-
}, 1032, ["size"])
|
|
811
|
-
])
|
|
812
|
-
]))), 128))
|
|
813
|
-
])) : x("", !0),
|
|
814
|
-
(!e.searchOnly || (U = m.value) != null && U.length) && (!c.value || n.value.length) ? (l(), w(v(Ve), {
|
|
815
|
-
key: 1,
|
|
816
|
-
class: "rvc-combobox-options"
|
|
817
|
-
}, {
|
|
818
|
-
default: $(() => {
|
|
819
|
-
var L;
|
|
820
|
-
return [
|
|
821
|
-
((L = m.value) == null ? void 0 : L.length) < e.minLength ? (l(), s("div", wt, [
|
|
822
|
-
i("div", xt, [
|
|
823
|
-
i("em", null, "Minimal " + C(e.minLength) + " characters.", 1)
|
|
824
|
-
])
|
|
825
|
-
])) : !c.value && !n.value.length ? (l(), s("div", kt, V[5] || (V[5] = [
|
|
826
|
-
i("div", { class: "rvc-flex rvc-items-center" }, " No results found. ", -1)
|
|
827
|
-
]))) : (l(!0), s(I, { key: 2 }, P(n.value, (Z) => (l(), w(v(Be), {
|
|
828
|
-
key: Z[e.itemKey],
|
|
829
|
-
value: Z,
|
|
830
|
-
as: "template"
|
|
831
|
-
}, {
|
|
832
|
-
default: $(({ active: me }) => [
|
|
833
|
-
i("li", {
|
|
834
|
-
class: S([
|
|
835
|
-
"rvc-combobox-option",
|
|
836
|
-
{ "rvc-combobox-option-hover": me },
|
|
837
|
-
{ "rvc-combobox-option-active": H(Z[e.itemKey]) }
|
|
838
|
-
])
|
|
839
|
-
}, [
|
|
840
|
-
b(h.$slots, "option", {
|
|
841
|
-
option: Z,
|
|
842
|
-
isActive: H
|
|
843
|
-
}, () => [
|
|
844
|
-
b(h.$slots, "optionPrefix", {
|
|
845
|
-
option: Z[e.itemKey],
|
|
846
|
-
isActive: H
|
|
847
|
-
}),
|
|
848
|
-
i("span", Ct, C(e.optionText(Z)), 1),
|
|
849
|
-
b(h.$slots, "optionSuffix", {
|
|
850
|
-
option: Z[e.itemKey],
|
|
851
|
-
isActive: H
|
|
852
|
-
})
|
|
853
|
-
])
|
|
854
|
-
], 2)
|
|
855
|
-
]),
|
|
856
|
-
_: 2
|
|
857
|
-
}, 1032, ["value"]))), 128))
|
|
858
|
-
];
|
|
859
|
-
}),
|
|
860
|
-
_: 3
|
|
861
|
-
})) : x("", !0)
|
|
862
|
-
])
|
|
863
|
-
];
|
|
864
|
-
}),
|
|
865
|
-
_: 3
|
|
866
|
-
}, 16, ["modelValue", "multiple", "class"]));
|
|
867
|
-
}
|
|
868
|
-
}), ve = /* @__PURE__ */ Object.assign({
|
|
869
|
-
inheritAttrs: !1
|
|
870
|
-
}, {
|
|
871
|
-
__name: "FormSelect",
|
|
872
|
-
props: {
|
|
873
|
-
modelValue: {
|
|
874
|
-
type: [String, Number, Object],
|
|
875
|
-
default: null
|
|
876
|
-
},
|
|
877
|
-
rootClass: {
|
|
878
|
-
type: String,
|
|
879
|
-
default: ""
|
|
880
|
-
},
|
|
881
|
-
prefixIcon: {
|
|
882
|
-
type: [Object, Function],
|
|
883
|
-
default: null
|
|
884
|
-
},
|
|
885
|
-
icon: {
|
|
886
|
-
type: [Object, Function],
|
|
887
|
-
default: null
|
|
888
|
-
},
|
|
889
|
-
size: {
|
|
890
|
-
type: String,
|
|
891
|
-
default: "base",
|
|
892
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
893
|
-
}
|
|
894
|
-
},
|
|
895
|
-
emits: ["update:modelValue"],
|
|
896
|
-
setup(e, { emit: a }) {
|
|
897
|
-
const t = e, f = a, n = T({
|
|
898
|
-
get: () => t.modelValue,
|
|
899
|
-
set: (m) => f("update:modelValue", m)
|
|
900
|
-
}), { hasModelBinding: c } = K();
|
|
901
|
-
return (m, d) => (l(), s("div", {
|
|
902
|
-
class: S([
|
|
903
|
-
"rvc-select",
|
|
904
|
-
`rvc-select-${e.size}`,
|
|
905
|
-
e.rootClass
|
|
906
|
-
])
|
|
907
|
-
}, [
|
|
908
|
-
e.prefixIcon ? b(m.$slots, "prefixIcon", {
|
|
909
|
-
key: 0,
|
|
910
|
-
icon: e.prefixIcon
|
|
911
|
-
}, () => [
|
|
912
|
-
(l(), w(M(e.prefixIcon), { "aria-hidden": "true" }))
|
|
913
|
-
]) : x("", !0),
|
|
914
|
-
b(m.$slots, "select", R(oe(m.$attrs)), () => [
|
|
915
|
-
v(c) ? N((l(), s("select", A({ key: 0 }, m.$attrs, {
|
|
916
|
-
"onUpdate:modelValue": d[0] || (d[0] = (u) => n.value = u)
|
|
917
|
-
}), [
|
|
918
|
-
b(m.$slots, "default")
|
|
919
|
-
], 16)), [
|
|
920
|
-
[pe, n.value]
|
|
921
|
-
]) : (l(), s("select", R(A({ key: 1 }, m.$attrs)), [
|
|
922
|
-
b(m.$slots, "default")
|
|
923
|
-
], 16))
|
|
924
|
-
]),
|
|
925
|
-
b(m.$slots, "icon", { icon: e.icon }, () => [
|
|
926
|
-
(l(), w(M(e.icon ?? v(de)), { "aria-hidden": "true" }))
|
|
927
|
-
])
|
|
928
|
-
], 2));
|
|
929
|
-
}
|
|
930
|
-
}), St = {
|
|
931
|
-
key: 0,
|
|
932
|
-
class: "rvc-pagination rvc-grid rvc-grid-cols-2 md:rvc-grid-cols-3 rvc-items-center rvc-justify-between"
|
|
933
|
-
}, Vt = ["value"], Bt = { class: "md:rvc-flex rvc-justify-center rvc-hidden" }, Lt = { class: "rvc-pagination-info" }, At = { class: "rvc-flex rvc-justify-end" }, Mt = { class: "rvc-flex rvc-items-center md:gap-0.5 xl:rvc-gap-1" }, Tt = ["disabled", "onClick"], Ot = { key: 2 }, It = { key: 3 }, jt = {
|
|
934
|
-
__name: "Pagination",
|
|
935
|
-
props: {
|
|
936
|
-
pagination: {
|
|
937
|
-
type: Object,
|
|
938
|
-
required: !0
|
|
939
|
-
},
|
|
940
|
-
perPage: {
|
|
941
|
-
type: Number,
|
|
942
|
-
default: 10
|
|
943
|
-
},
|
|
944
|
-
perPageLabel: {
|
|
945
|
-
type: String,
|
|
946
|
-
default: "per page"
|
|
947
|
-
},
|
|
948
|
-
perPageOptions: {
|
|
949
|
-
type: Array,
|
|
950
|
-
default: () => [10, 20, 50]
|
|
951
|
-
},
|
|
952
|
-
fromLabel: {
|
|
953
|
-
type: String,
|
|
954
|
-
default: "of"
|
|
955
|
-
}
|
|
956
|
-
},
|
|
957
|
-
emits: ["pagination:change", "pagination:perPage"],
|
|
958
|
-
setup(e, { emit: a }) {
|
|
959
|
-
const t = e, f = a, n = j(t.perPage);
|
|
960
|
-
return (c, m) => {
|
|
961
|
-
var d;
|
|
962
|
-
return (d = e.pagination) != null && d.total ? (l(), s("div", St, [
|
|
963
|
-
b(c.$slots, "perPage", A(e.pagination, { perPage: n.value }), () => [
|
|
964
|
-
p(ve, {
|
|
965
|
-
modelValue: n.value,
|
|
966
|
-
"onUpdate:modelValue": [
|
|
967
|
-
m[0] || (m[0] = (u) => n.value = u),
|
|
968
|
-
m[1] || (m[1] = (u) => f("pagination:perPage", u))
|
|
969
|
-
],
|
|
970
|
-
size: "sm",
|
|
971
|
-
"root-class": "rvc-w-fit"
|
|
972
|
-
}, {
|
|
973
|
-
default: $(() => [
|
|
974
|
-
(l(!0), s(I, null, P(e.perPageOptions, (u) => (l(), s("option", {
|
|
975
|
-
key: `pagination-items-per-page-option-${u}`,
|
|
976
|
-
value: u
|
|
977
|
-
}, C(u) + " " + C(e.perPageLabel), 9, Vt))), 128))
|
|
978
|
-
]),
|
|
979
|
-
_: 1
|
|
980
|
-
}, 8, ["modelValue"])
|
|
981
|
-
]),
|
|
982
|
-
b(c.$slots, "info", A(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
983
|
-
i("div", Bt, [
|
|
984
|
-
i("div", Lt, C(e.pagination.from) + " - " + C(e.pagination.to) + " " + C(e.fromLabel) + " " + C(e.pagination.total), 1)
|
|
985
|
-
])
|
|
986
|
-
]),
|
|
987
|
-
i("div", At, [
|
|
988
|
-
i("nav", null, [
|
|
989
|
-
i("ol", Mt, [
|
|
990
|
-
(l(!0), s(I, null, P(e.pagination.links, (u, r) => (l(), s("li", {
|
|
991
|
-
key: `pagination-link-${u.label}-${r}`,
|
|
992
|
-
class: "rvc-hidden md:rvc-block first:rvc-block last:rvc-block"
|
|
993
|
-
}, [
|
|
994
|
-
i("button", {
|
|
995
|
-
type: "button",
|
|
996
|
-
disabled: u.label === "..." || !u.url,
|
|
997
|
-
class: S([
|
|
998
|
-
"rvc-pagination-button",
|
|
999
|
-
{ "rvc-pagination-button-active": u.active }
|
|
1000
|
-
]),
|
|
1001
|
-
onClick: (o) => u.url && f("pagination:change", u.url)
|
|
1002
|
-
}, [
|
|
1003
|
-
u.url !== "..." && r === 0 ? (l(), w(v(it), {
|
|
1004
|
-
key: 0,
|
|
1005
|
-
"aria-hidden": "true",
|
|
1006
|
-
class: S([
|
|
1007
|
-
"rvc-size-5 rvc-text-slate-80",
|
|
1008
|
-
{ "rvc-opacity-50": !u.url }
|
|
1009
|
-
])
|
|
1010
|
-
}, null, 8, ["class"])) : u.label !== "..." && r === e.pagination.links.length - 1 ? (l(), w(v(ot), {
|
|
1011
|
-
key: 1,
|
|
1012
|
-
"aria-hidden": "true",
|
|
1013
|
-
class: S([
|
|
1014
|
-
"rvc-size-5 rvc-text-slate-80",
|
|
1015
|
-
{ "rvc-opacity-50": !u.url }
|
|
1016
|
-
])
|
|
1017
|
-
}, null, 8, ["class"])) : u.label === "..." ? (l(), s("span", Ot, " ... ")) : (l(), s("span", It, C(u.label), 1))
|
|
1018
|
-
], 10, Tt)
|
|
1019
|
-
]))), 128))
|
|
1020
|
-
])
|
|
1021
|
-
])
|
|
1022
|
-
])
|
|
1023
|
-
])) : x("", !0);
|
|
1024
|
-
};
|
|
1025
|
-
}
|
|
1026
|
-
}, Pt = { class: "rvc-overflow-x-auto rvc-pb-4" }, zt = { key: 0 }, qt = ["aria-label", "onClick"], Ft = ["innerHTML"], Zt = { key: 1 }, Ht = ["colspan"], Rt = { key: 2 }, Dt = ["colspan"], Et = { class: "rvc-flex rvc-gap-x-2 rvc-items-center" }, Il = {
|
|
1027
|
-
__name: "DataTable",
|
|
1028
|
-
props: {
|
|
1029
|
-
headers: {
|
|
1030
|
-
type: Array,
|
|
1031
|
-
default: () => [],
|
|
1032
|
-
validator: (e) => e.every((t) => {
|
|
1033
|
-
const f = !t.align || ["left", "center", "right"].includes(t.align), c = !(t.sortable === !0) || typeof t.key == "string" && t.key.length > 0;
|
|
1034
|
-
return c || console.warn("[DataTable] Header item with sortable=true is missing required 'key' property:", t), !f && t.align && console.warn("[DataTable] Header item has invalid 'align' value. Must be 'left', 'center' or 'right':", t), f && c;
|
|
1035
|
-
})
|
|
1036
|
-
},
|
|
1037
|
-
items: {
|
|
1038
|
-
type: Array,
|
|
1039
|
-
required: !0
|
|
1040
|
-
},
|
|
1041
|
-
noResultsText: {
|
|
1042
|
-
type: String,
|
|
1043
|
-
default: "No results found."
|
|
1044
|
-
},
|
|
1045
|
-
loadingText: {
|
|
1046
|
-
type: String,
|
|
1047
|
-
default: "Loading content..."
|
|
1048
|
-
},
|
|
1049
|
-
striped: {
|
|
1050
|
-
type: Boolean
|
|
1051
|
-
},
|
|
1052
|
-
spinning: {
|
|
1053
|
-
type: Boolean
|
|
1054
|
-
},
|
|
1055
|
-
pagination: {
|
|
1056
|
-
type: Object,
|
|
1057
|
-
default: null
|
|
1058
|
-
}
|
|
1059
|
-
},
|
|
1060
|
-
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
1061
|
-
setup(e, { emit: a }) {
|
|
1062
|
-
const t = e, f = a, n = j(null), c = (d) => t.headers.find((u) => u.key === d), m = (d) => {
|
|
1063
|
-
!n.value || n.value.key !== d.key ? n.value = {
|
|
1064
|
-
key: d.key,
|
|
1065
|
-
direction: "asc"
|
|
1066
|
-
} : n.value.direction === "asc" ? n.value = {
|
|
1067
|
-
key: d.key,
|
|
1068
|
-
direction: "desc"
|
|
1069
|
-
} : n.value = null, f("table:sortBy", n.value);
|
|
1070
|
-
};
|
|
1071
|
-
return (d, u) => (l(), s("div", null, [
|
|
1072
|
-
i("div", Pt, [
|
|
1073
|
-
i("table", {
|
|
1074
|
-
class: S([{ "rvc-table-striped": e.striped }, "rvc-w-full rvc-table"])
|
|
1075
|
-
}, [
|
|
1076
|
-
e.headers.length ? (l(), s("thead", zt, [
|
|
1077
|
-
i("tr", null, [
|
|
1078
|
-
b(d.$slots, "headers", { headers: e.headers }, () => [
|
|
1079
|
-
(l(!0), s(I, null, P(e.headers, (r) => {
|
|
1080
|
-
var o, y;
|
|
1081
|
-
return l(), s("th", A({ ref_for: !0 }, r, {
|
|
1082
|
-
key: `rvc-table-header-${r.id}`,
|
|
1083
|
-
class: {
|
|
1084
|
-
"rvc-text-left": r.align === "left" || !r.align,
|
|
1085
|
-
"rvc-text-center": r.align === "center",
|
|
1086
|
-
"rvc-text-right": r.align === "right"
|
|
1087
|
-
}
|
|
1088
|
-
}), [
|
|
1089
|
-
r.sortable && r.key ? (l(), s("button", {
|
|
1090
|
-
key: 0,
|
|
1091
|
-
type: "button",
|
|
1092
|
-
"aria-label": `Sort on ${r.label}`,
|
|
1093
|
-
class: S([
|
|
1094
|
-
"rvc-flex rvc-w-full rvc-gap-x-1.5 hover:rvc-underline rvc-group/table",
|
|
1095
|
-
{
|
|
1096
|
-
"rvc-justify-center": r.align === "center",
|
|
1097
|
-
"rvc-justify-start rvc-flex-row-reverse": r.align === "right"
|
|
1098
|
-
}
|
|
1099
|
-
]),
|
|
1100
|
-
onClick: (g) => m(r)
|
|
1101
|
-
}, [
|
|
1102
|
-
b(d.$slots, "header-label", {
|
|
1103
|
-
sortBy: n.value,
|
|
1104
|
-
header: r
|
|
1105
|
-
}, () => [
|
|
1106
|
-
z(C(r.label), 1)
|
|
1107
|
-
]),
|
|
1108
|
-
p(v(ct), {
|
|
1109
|
-
class: S([
|
|
1110
|
-
"rvc-size-4 rvc-shrink-0 rvc-transition",
|
|
1111
|
-
{
|
|
1112
|
-
"rvc-opacity-100": ((o = n.value) == null ? void 0 : o.key) === r.key,
|
|
1113
|
-
"rvc-opacity-0 group-hover/table:rvc-opacity-30": !n.value || n.value.key !== r.key,
|
|
1114
|
-
"rvc-rotate-180": ((y = n.value) == null ? void 0 : y.key) === r.key && n.value.direction === "desc"
|
|
1115
|
-
}
|
|
1116
|
-
])
|
|
1117
|
-
}, null, 8, ["class"])
|
|
1118
|
-
], 10, qt)) : b(d.$slots, "header-label", {
|
|
1119
|
-
key: 1,
|
|
1120
|
-
sortBy: n.value,
|
|
1121
|
-
header: r
|
|
1122
|
-
}, () => [
|
|
1123
|
-
z(C(r.label), 1)
|
|
1124
|
-
])
|
|
1125
|
-
], 16);
|
|
1126
|
-
}), 128))
|
|
1127
|
-
])
|
|
1128
|
-
])
|
|
1129
|
-
])) : x("", !0),
|
|
1130
|
-
i("tbody", null, [
|
|
1131
|
-
e.items.length && !e.spinning ? (l(!0), s(I, { key: 0 }, P(e.items, (r, o) => (l(), s("tr", {
|
|
1132
|
-
key: `rvc-table-row-${o}-${r.id}`
|
|
1133
|
-
}, [
|
|
1134
|
-
b(d.$slots, "items", {
|
|
1135
|
-
item: r,
|
|
1136
|
-
index: o
|
|
1137
|
-
}, () => [
|
|
1138
|
-
(l(!0), s(I, null, P(r, (y, g) => {
|
|
1139
|
-
var q, B, O, k;
|
|
1140
|
-
return l(), s("td", A({
|
|
1141
|
-
key: `rvc-table-row-${o}-column-${g}-${r.id}`,
|
|
1142
|
-
ref_for: !0
|
|
1143
|
-
}, r.attrs, {
|
|
1144
|
-
class: {
|
|
1145
|
-
"rvc-text-left": ((q = c(g)) == null ? void 0 : q.align) === "left" || !((B = c(g)) != null && B.align),
|
|
1146
|
-
"rvc-text-center": ((O = c(g)) == null ? void 0 : O.align) === "center",
|
|
1147
|
-
"rvc-text-right": ((k = c(g)) == null ? void 0 : k.align) === "right"
|
|
1148
|
-
},
|
|
1149
|
-
innerHTML: y
|
|
1150
|
-
}), null, 16, Ft);
|
|
1151
|
-
}), 128))
|
|
1152
|
-
])
|
|
1153
|
-
]))), 128)) : !e.items.length && !e.spinning ? (l(), s("tr", Zt, [
|
|
1154
|
-
i("td", {
|
|
1155
|
-
colspan: e.headers.length,
|
|
1156
|
-
class: "rvc-table-state"
|
|
1157
|
-
}, [
|
|
1158
|
-
i("p", null, C(e.noResultsText), 1)
|
|
1159
|
-
], 8, Ht)
|
|
1160
|
-
])) : (l(), s("tr", Rt, [
|
|
1161
|
-
i("td", {
|
|
1162
|
-
colspan: e.headers.length,
|
|
1163
|
-
class: "rvc-table-state"
|
|
1164
|
-
}, [
|
|
1165
|
-
b(d.$slots, "spinner", {
|
|
1166
|
-
spinning: e.spinning,
|
|
1167
|
-
label: e.loadingText
|
|
1168
|
-
}, () => [
|
|
1169
|
-
i("div", Et, [
|
|
1170
|
-
e.spinning ? (l(), w(v(ee), {
|
|
1171
|
-
key: 0,
|
|
1172
|
-
"aria-hidden": "true",
|
|
1173
|
-
class: "rvc-table-spinner"
|
|
1174
|
-
})) : x("", !0),
|
|
1175
|
-
z(" " + C(e.loadingText), 1)
|
|
1176
|
-
])
|
|
1177
|
-
])
|
|
1178
|
-
], 8, Dt)
|
|
1179
|
-
]))
|
|
1180
|
-
])
|
|
1181
|
-
], 2)
|
|
1182
|
-
]),
|
|
1183
|
-
e.pagination ? b(d.$slots, "pagination", R(A({ key: 0 }, e.pagination)), () => [
|
|
1184
|
-
p(jt, {
|
|
1185
|
-
pagination: e.pagination,
|
|
1186
|
-
"onPagination:change": u[0] || (u[0] = (r) => f("pagination:change", r)),
|
|
1187
|
-
"onPagination:perPage": u[1] || (u[1] = (r) => f("pagination:perPage", r))
|
|
1188
|
-
}, null, 8, ["pagination"])
|
|
1189
|
-
]) : x("", !0)
|
|
1190
|
-
]));
|
|
1191
|
-
}
|
|
1192
|
-
};
|
|
1193
|
-
function fe(e) {
|
|
1194
|
-
const a = j(null), t = j(!1), f = T(() => e.as === "form"), n = T(() => `${e.id}-title`), c = T(() => `${e.id}-content`), m = T(() => {
|
|
1195
|
-
var d;
|
|
1196
|
-
return (d = a.value) == null ? void 0 : d.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
1197
|
-
});
|
|
1198
|
-
return {
|
|
1199
|
-
contentRef: a,
|
|
1200
|
-
ready: t,
|
|
1201
|
-
isForm: f,
|
|
1202
|
-
titleId: n,
|
|
1203
|
-
descriptionId: c,
|
|
1204
|
-
initialFocusElement: m
|
|
1205
|
-
};
|
|
1206
|
-
}
|
|
1207
|
-
const Nt = {
|
|
1208
|
-
class: "rvc-fixed rvc-inset-0 rvc-overflow-hidden",
|
|
1209
|
-
role: "presentation"
|
|
1210
|
-
}, Kt = { class: "rvc-absolute rvc-inset-0 rvc-overflow-hidden" }, Ut = { class: "rvc-pointer-events-none rvc-fixed rvc-inset-y-0 rvc-right-0 rvc-flex rvc-max-w-full rvc-pl-10" }, Wt = { class: "rvc-flex rvc-h-full rvc-flex-col rvc-shadow-xl" }, Gt = { class: "rvc-flex rvc-items-center rvc-justify-between" }, Jt = {
|
|
1211
|
-
key: 0,
|
|
1212
|
-
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
1213
|
-
}, Qt = ["id"], Xt = { class: "rvc-flex rvc-shrink-0 rvc-drawer-footer" }, jl = {
|
|
1214
|
-
__name: "Drawer",
|
|
1215
|
-
props: {
|
|
1216
|
-
as: {
|
|
1217
|
-
type: String,
|
|
1218
|
-
default: "form"
|
|
1219
|
-
},
|
|
1220
|
-
id: {
|
|
1221
|
-
type: String,
|
|
1222
|
-
required: !0
|
|
1223
|
-
},
|
|
1224
|
-
title: {
|
|
1225
|
-
type: String,
|
|
1226
|
-
required: !0
|
|
1227
|
-
},
|
|
1228
|
-
showClose: {
|
|
1229
|
-
type: Boolean
|
|
1230
|
-
},
|
|
1231
|
-
scrolledDown: {
|
|
1232
|
-
type: Boolean
|
|
1233
|
-
},
|
|
1234
|
-
headerSticky: {
|
|
1235
|
-
type: Boolean
|
|
1236
|
-
},
|
|
1237
|
-
spinning: {
|
|
1238
|
-
type: Boolean
|
|
1239
|
-
},
|
|
1240
|
-
submitLabel: {
|
|
1241
|
-
type: String,
|
|
1242
|
-
default: "Save"
|
|
1243
|
-
},
|
|
1244
|
-
cancelLabel: {
|
|
1245
|
-
type: String,
|
|
1246
|
-
default: "Cancel"
|
|
1247
|
-
},
|
|
1248
|
-
panelClass: {
|
|
1249
|
-
type: String,
|
|
1250
|
-
default: "rvc-max-w-xl"
|
|
1251
|
-
}
|
|
1252
|
-
},
|
|
1253
|
-
emits: ["drawer:open", "drawer:close", "drawer:save", "drawer:closed"],
|
|
1254
|
-
setup(e, { emit: a }) {
|
|
1255
|
-
const t = a, f = e, {
|
|
1256
|
-
contentRef: n,
|
|
1257
|
-
ready: c,
|
|
1258
|
-
isForm: m,
|
|
1259
|
-
titleId: d,
|
|
1260
|
-
descriptionId: u,
|
|
1261
|
-
initialFocusElement: r
|
|
1262
|
-
} = fe(f);
|
|
1263
|
-
return (o, y) => (l(), w(v(_), { as: "template" }, {
|
|
1264
|
-
default: $(() => [
|
|
1265
|
-
p(v(se), {
|
|
1266
|
-
as: e.as,
|
|
1267
|
-
class: "rvc-drawer",
|
|
1268
|
-
static: "",
|
|
1269
|
-
"aria-modal": "true",
|
|
1270
|
-
role: "dialog",
|
|
1271
|
-
"initial-focus": v(r),
|
|
1272
|
-
"aria-labelledby": v(d),
|
|
1273
|
-
onClose: y[5] || (y[5] = (g) => o.$emit("drawer:close")),
|
|
1274
|
-
onSubmit: y[6] || (y[6] = W((g) => t("drawer:save", g), ["prevent"]))
|
|
1275
|
-
}, {
|
|
1276
|
-
default: $(() => [
|
|
1277
|
-
p(v(G), {
|
|
1278
|
-
as: "template",
|
|
1279
|
-
enter: "rvc-ease-in-out rvc-duration-500",
|
|
1280
|
-
"enter-from": "rvc-opacity-0",
|
|
1281
|
-
"enter-to": "rvc-opacity-100",
|
|
1282
|
-
leave: "rvc-ease-in-out rvc-duration-500",
|
|
1283
|
-
"leave-from": "rvc-opacity-100",
|
|
1284
|
-
"leave-to": "rvc-opacity-0",
|
|
1285
|
-
onBeforeEnter: y[0] || (y[0] = (g) => t("drawer:open"))
|
|
1286
|
-
}, {
|
|
1287
|
-
default: $(() => y[7] || (y[7] = [
|
|
1288
|
-
i("div", {
|
|
1289
|
-
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-drawer-backdrop",
|
|
1290
|
-
"aria-hidden": "true"
|
|
1291
|
-
}, null, -1)
|
|
1292
|
-
])),
|
|
1293
|
-
_: 1
|
|
1294
|
-
}),
|
|
1295
|
-
i("div", Nt, [
|
|
1296
|
-
i("div", Kt, [
|
|
1297
|
-
i("div", Ut, [
|
|
1298
|
-
p(v(G), {
|
|
1299
|
-
as: "template",
|
|
1300
|
-
enter: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
1301
|
-
"enter-from": "rvc-translate-x-full",
|
|
1302
|
-
"enter-to": "rvc-translate-x-0",
|
|
1303
|
-
leave: "rvc-transform rvc-transition rvc-ease-in-out rvc-duration-500 sm:rvc-duration-700",
|
|
1304
|
-
"leave-from": "rvc-translate-x-0",
|
|
1305
|
-
"leave-to": "rvc-translate-x-full",
|
|
1306
|
-
onBeforeEnter: y[3] || (y[3] = (g) => c.value = !0),
|
|
1307
|
-
onAfterLeave: y[4] || (y[4] = (g) => (c.value = !1, t("drawer:closed")))
|
|
1308
|
-
}, {
|
|
1309
|
-
default: $(() => [
|
|
1310
|
-
p(v(ce), {
|
|
1311
|
-
class: S(["rvc-pointer-events-auto rvc-w-screen", e.panelClass]),
|
|
1312
|
-
"aria-busy": e.spinning,
|
|
1313
|
-
"aria-describedby": v(u)
|
|
1314
|
-
}, {
|
|
1315
|
-
default: $(() => [
|
|
1316
|
-
i("div", Wt, [
|
|
1317
|
-
i("header", {
|
|
1318
|
-
class: S([{ "rvc-sticky rvc-top-0 rvc-left-0 rvc-w-full rvc-z-10": e.headerSticky }, "rvc-drawer-header"])
|
|
1319
|
-
}, [
|
|
1320
|
-
b(o.$slots, "header", {
|
|
1321
|
-
title: e.title,
|
|
1322
|
-
showClose: e.showClose
|
|
1323
|
-
}, () => [
|
|
1324
|
-
i("div", Gt, [
|
|
1325
|
-
p(v(ue), {
|
|
1326
|
-
id: v(d),
|
|
1327
|
-
class: "rvc-drawer-title"
|
|
1328
|
-
}, {
|
|
1329
|
-
default: $(() => [
|
|
1330
|
-
z(C(e.title), 1)
|
|
1331
|
-
]),
|
|
1332
|
-
_: 1
|
|
1333
|
-
}, 8, ["id"]),
|
|
1334
|
-
e.showClose ? (l(), s("div", Jt, [
|
|
1335
|
-
i("button", {
|
|
1336
|
-
type: "button",
|
|
1337
|
-
class: "rvc-relative rvc-drawer-close",
|
|
1338
|
-
"aria-label": "Close panel",
|
|
1339
|
-
onClick: y[1] || (y[1] = (g) => t("drawer:close"))
|
|
1340
|
-
}, [
|
|
1341
|
-
p(v(J), {
|
|
1342
|
-
class: "rvc-size-full",
|
|
1343
|
-
"aria-hidden": "true"
|
|
1344
|
-
})
|
|
1345
|
-
])
|
|
1346
|
-
])) : x("", !0)
|
|
1347
|
-
])
|
|
1348
|
-
])
|
|
1349
|
-
], 2),
|
|
1350
|
-
i("div", {
|
|
1351
|
-
class: S([e.scrolledDown ? "rvc-flex-col-reverse" : "rvc-flex-col", "rvc-flex rvc-min-h-0 rvc-flex-1 rvc-overflow-y-scroll"])
|
|
1352
|
-
}, [
|
|
1353
|
-
i("div", {
|
|
1354
|
-
id: v(u),
|
|
1355
|
-
ref_key: "contentRef",
|
|
1356
|
-
ref: n,
|
|
1357
|
-
class: "rvc-relative rvc-flex-1 rvc-drawer-content"
|
|
1358
|
-
}, [
|
|
1359
|
-
b(o.$slots, "default", { ready: v(c) })
|
|
1360
|
-
], 8, Qt)
|
|
1361
|
-
], 2),
|
|
1362
|
-
i("footer", Xt, [
|
|
1363
|
-
b(o.$slots, "footer", { loading: e.spinning }, () => [
|
|
1364
|
-
p(E, {
|
|
1365
|
-
type: "button",
|
|
1366
|
-
label: e.cancelLabel,
|
|
1367
|
-
color: "light",
|
|
1368
|
-
onClick: y[2] || (y[2] = (g) => t("drawer:close"))
|
|
1369
|
-
}, null, 8, ["label"]),
|
|
1370
|
-
v(m) ? (l(), w(E, {
|
|
1371
|
-
key: 0,
|
|
1372
|
-
type: "submit",
|
|
1373
|
-
label: e.submitLabel,
|
|
1374
|
-
spinning: e.spinning,
|
|
1375
|
-
disabled: e.spinning
|
|
1376
|
-
}, null, 8, ["label", "spinning", "disabled"])) : x("", !0)
|
|
1377
|
-
])
|
|
1378
|
-
])
|
|
1379
|
-
])
|
|
1380
|
-
]),
|
|
1381
|
-
_: 3
|
|
1382
|
-
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
1383
|
-
]),
|
|
1384
|
-
_: 3
|
|
1385
|
-
})
|
|
1386
|
-
])
|
|
1387
|
-
])
|
|
1388
|
-
])
|
|
1389
|
-
]),
|
|
1390
|
-
_: 3
|
|
1391
|
-
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
1392
|
-
]),
|
|
1393
|
-
_: 3
|
|
1394
|
-
}));
|
|
1395
|
-
}
|
|
1396
|
-
}, Pl = /* @__PURE__ */ Object.assign({
|
|
1397
|
-
inheritAttrs: !1
|
|
1398
|
-
}, {
|
|
1399
|
-
__name: "Dropdown",
|
|
1400
|
-
props: {
|
|
1401
|
-
items: {
|
|
1402
|
-
type: Array,
|
|
1403
|
-
required: !0,
|
|
1404
|
-
default: () => []
|
|
1405
|
-
},
|
|
1406
|
-
alignLeft: {
|
|
1407
|
-
type: Boolean,
|
|
1408
|
-
default: !1
|
|
1409
|
-
},
|
|
1410
|
-
fullWidth: {
|
|
1411
|
-
type: Boolean,
|
|
1412
|
-
default: !1
|
|
1413
|
-
},
|
|
1414
|
-
label: {
|
|
1415
|
-
type: String,
|
|
1416
|
-
default: "Options"
|
|
1417
|
-
},
|
|
1418
|
-
rootClass: {
|
|
1419
|
-
type: String,
|
|
1420
|
-
default: ""
|
|
1421
|
-
}
|
|
1422
|
-
},
|
|
1423
|
-
emits: ["dropdown:click"],
|
|
1424
|
-
setup(e, { emit: a }) {
|
|
1425
|
-
const t = a, f = (n) => {
|
|
1426
|
-
const {
|
|
1427
|
-
as: c,
|
|
1428
|
-
bindAs: m,
|
|
1429
|
-
event: d,
|
|
1430
|
-
icon: u,
|
|
1431
|
-
name: r,
|
|
1432
|
-
...o
|
|
1433
|
-
} = n;
|
|
1434
|
-
return o;
|
|
1435
|
-
};
|
|
1436
|
-
return (n, c) => (l(), w(v(Le), {
|
|
1437
|
-
as: "div",
|
|
1438
|
-
class: S(["rvc-relative rvc-inline-block rvc-w-fit", e.rootClass])
|
|
1439
|
-
}, {
|
|
1440
|
-
default: $(() => [
|
|
1441
|
-
b(n.$slots, "button", {
|
|
1442
|
-
label: e.label,
|
|
1443
|
-
button: v(ae)
|
|
1444
|
-
}, () => [
|
|
1445
|
-
p(v(ae), A({
|
|
1446
|
-
as: E,
|
|
1447
|
-
label: e.label,
|
|
1448
|
-
color: "light",
|
|
1449
|
-
icon: v(rt),
|
|
1450
|
-
"icon-left": e.alignLeft
|
|
1451
|
-
}, n.$attrs), null, 16, ["label", "icon", "icon-left"])
|
|
1452
|
-
]),
|
|
1453
|
-
p(ge, {
|
|
1454
|
-
"enter-active-class": "rvc-transition rvc-duration-100 rvc-ease-out",
|
|
1455
|
-
"enter-from-class": "rvc-transform rvc-scale-95 rvc-opacity-0",
|
|
1456
|
-
"enter-to-class": "rvc-transform rvc-scale-100 rvc-opacity-100",
|
|
1457
|
-
"leave-active-class": "rvc-transition rvc-duration-75 rvc-ease-in",
|
|
1458
|
-
"leave-from-class": "rvc-transform rvc-scale-100 rvc-opacity-100",
|
|
1459
|
-
"leave-to-class": "rvc-transform rvc-scale-95 rvc-opacity-0"
|
|
1460
|
-
}, {
|
|
1461
|
-
default: $(() => [
|
|
1462
|
-
p(v(Ae), {
|
|
1463
|
-
class: S([
|
|
1464
|
-
"rvc-dropdown",
|
|
1465
|
-
{
|
|
1466
|
-
"rvc-dropdown-left": e.alignLeft,
|
|
1467
|
-
"rvc-dropdown-full": e.fullWidth
|
|
1468
|
-
}
|
|
1469
|
-
])
|
|
1470
|
-
}, {
|
|
1471
|
-
default: $(() => [
|
|
1472
|
-
b(n.$slots, "items", {
|
|
1473
|
-
items: e.items,
|
|
1474
|
-
menuItem: v(ne)
|
|
1475
|
-
}, () => [
|
|
1476
|
-
(l(!0), s(I, null, P(e.items, (m, d) => (l(), w(v(ne), {
|
|
1477
|
-
key: `${d}-dropdown-item`,
|
|
1478
|
-
as: "template"
|
|
1479
|
-
}, {
|
|
1480
|
-
default: $(() => [
|
|
1481
|
-
b(n.$slots, "item", { item: m }, () => [
|
|
1482
|
-
(l(), w(M(m.as ? m.as : "button"), A({
|
|
1483
|
-
class: "rvc-dropdown-item",
|
|
1484
|
-
ref_for: !0
|
|
1485
|
-
}, f(m), {
|
|
1486
|
-
as: m.bindAs ? m.bindAs : void 0,
|
|
1487
|
-
onClick: (u) => (t("dropdown:click", m), m.event ? m.event() : null)
|
|
1488
|
-
}), {
|
|
1489
|
-
default: $(() => [
|
|
1490
|
-
m.icon ? (l(), w(M(m.icon), {
|
|
1491
|
-
key: 0,
|
|
1492
|
-
class: "rvc-dropdown-item-icon"
|
|
1493
|
-
})) : x("", !0),
|
|
1494
|
-
z(" " + C(m.name), 1)
|
|
1495
|
-
]),
|
|
1496
|
-
_: 2
|
|
1497
|
-
}, 1040, ["as", "onClick"]))
|
|
1498
|
-
])
|
|
1499
|
-
]),
|
|
1500
|
-
_: 2
|
|
1501
|
-
}, 1024))), 128))
|
|
1502
|
-
])
|
|
1503
|
-
]),
|
|
1504
|
-
_: 3
|
|
1505
|
-
}, 8, ["class"])
|
|
1506
|
-
]),
|
|
1507
|
-
_: 3
|
|
1508
|
-
})
|
|
1509
|
-
]),
|
|
1510
|
-
_: 3
|
|
1511
|
-
}, 8, ["class"]));
|
|
1512
|
-
}
|
|
1513
|
-
}), Yt = {
|
|
1514
|
-
key: 1,
|
|
1515
|
-
class: "rvc-empty-state-title"
|
|
1516
|
-
}, zl = {
|
|
1517
|
-
__name: "EmptyState",
|
|
1518
|
-
props: {
|
|
1519
|
-
title: {
|
|
1520
|
-
type: String,
|
|
1521
|
-
required: !0,
|
|
1522
|
-
default: ""
|
|
1523
|
-
},
|
|
1524
|
-
background: {
|
|
1525
|
-
type: Boolean,
|
|
1526
|
-
default: !1
|
|
1527
|
-
},
|
|
1528
|
-
icon: {
|
|
1529
|
-
type: [Object, Function],
|
|
1530
|
-
default: null
|
|
1531
|
-
}
|
|
1532
|
-
},
|
|
1533
|
-
setup(e) {
|
|
1534
|
-
return (a, t) => (l(), s("div", {
|
|
1535
|
-
class: S(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
1536
|
-
}, [
|
|
1537
|
-
e.icon ? (l(), w(M(e.icon), {
|
|
1538
|
-
key: 0,
|
|
1539
|
-
class: "rvc-empty-state-icon"
|
|
1540
|
-
})) : x("", !0),
|
|
1541
|
-
e.title ? (l(), s("p", Yt, C(e.title), 1)) : x("", !0),
|
|
1542
|
-
b(a.$slots, "default")
|
|
1543
|
-
], 2));
|
|
1544
|
-
}
|
|
1545
|
-
}, _t = {
|
|
1546
|
-
key: 0,
|
|
1547
|
-
class: "rvc-input-prefix"
|
|
1548
|
-
}, el = ["type"], tl = ["type"], ll = /* @__PURE__ */ Object.assign({
|
|
1549
|
-
inheritAttrs: !1
|
|
1550
|
-
}, {
|
|
1551
|
-
__name: "FormInput",
|
|
1552
|
-
props: {
|
|
1553
|
-
modelValue: {
|
|
1554
|
-
type: [String, Number],
|
|
1555
|
-
default: void 0
|
|
1556
|
-
},
|
|
1557
|
-
rootClass: {
|
|
1558
|
-
type: String,
|
|
1559
|
-
default: ""
|
|
1560
|
-
},
|
|
1561
|
-
prefixIcon: {
|
|
1562
|
-
type: [Object, Function],
|
|
1563
|
-
default: null
|
|
1564
|
-
},
|
|
1565
|
-
icon: {
|
|
1566
|
-
type: [Object, Function],
|
|
1567
|
-
default: null
|
|
1568
|
-
},
|
|
1569
|
-
size: {
|
|
1570
|
-
type: String,
|
|
1571
|
-
default: "base",
|
|
1572
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
1573
|
-
}
|
|
1574
|
-
},
|
|
1575
|
-
emits: ["update:modelValue"],
|
|
1576
|
-
setup(e, { emit: a }) {
|
|
1577
|
-
const t = e, f = a, { hasModelBinding: n } = K(), c = he(), m = T({
|
|
1578
|
-
get: () => t.modelValue,
|
|
1579
|
-
set: (d) => f("update:modelValue", d)
|
|
1580
|
-
});
|
|
1581
|
-
return (d, u) => (l(), s("div", {
|
|
1582
|
-
class: S([
|
|
1583
|
-
"rvc-input",
|
|
1584
|
-
`rvc-input-${e.size}`,
|
|
1585
|
-
e.rootClass
|
|
1586
|
-
])
|
|
1587
|
-
}, [
|
|
1588
|
-
v(c).prefix || v(c).prefixIcon || e.prefixIcon ? (l(), s("span", _t, [
|
|
1589
|
-
b(d.$slots, "prefix", {}, () => [
|
|
1590
|
-
b(d.$slots, "prefixIcon", { icon: e.prefixIcon }, () => [
|
|
1591
|
-
e.prefixIcon ? (l(), w(M(e.prefixIcon), {
|
|
1592
|
-
key: 0,
|
|
1593
|
-
"aria-hidden": "true"
|
|
1594
|
-
})) : x("", !0)
|
|
1595
|
-
])
|
|
1596
|
-
])
|
|
1597
|
-
])) : x("", !0),
|
|
1598
|
-
b(d.$slots, "input", R(oe(d.$attrs)), () => [
|
|
1599
|
-
v(n) ? N((l(), s("input", A({ key: 0 }, d.$attrs, {
|
|
1600
|
-
"onUpdate:modelValue": u[0] || (u[0] = (r) => m.value = r),
|
|
1601
|
-
type: d.$attrs.type || "text"
|
|
1602
|
-
}), null, 16, el)), [
|
|
1603
|
-
[Y, m.value]
|
|
1604
|
-
]) : (l(), s("input", A({
|
|
1605
|
-
key: 1,
|
|
1606
|
-
type: d.$attrs.type || "text"
|
|
1607
|
-
}, d.$attrs), null, 16, tl))
|
|
1608
|
-
]),
|
|
1609
|
-
b(d.$slots, "icon", { icon: e.icon }, () => [
|
|
1610
|
-
e.icon ? (l(), w(M(e.icon), {
|
|
1611
|
-
key: 0,
|
|
1612
|
-
"aria-hidden": "true"
|
|
1613
|
-
})) : x("", !0)
|
|
1614
|
-
])
|
|
1615
|
-
], 2));
|
|
1616
|
-
}
|
|
1617
|
-
}), ql = {
|
|
1618
|
-
__name: "FormTextarea",
|
|
1619
|
-
props: {
|
|
1620
|
-
modelValue: {
|
|
1621
|
-
type: String,
|
|
1622
|
-
default: void 0
|
|
1623
|
-
},
|
|
1624
|
-
size: {
|
|
1625
|
-
type: String,
|
|
1626
|
-
default: "base",
|
|
1627
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
1628
|
-
}
|
|
1629
|
-
},
|
|
1630
|
-
emits: ["update:modelValue"],
|
|
1631
|
-
setup(e, { emit: a }) {
|
|
1632
|
-
const t = e, f = a, { hasModelBinding: n } = K(), c = T({
|
|
1633
|
-
get: () => t.modelValue,
|
|
1634
|
-
set: (d) => f("update:modelValue", d)
|
|
1635
|
-
}), m = T(() => [
|
|
1636
|
-
"rvc-textarea",
|
|
1637
|
-
`rvc-textarea-${t.size}`
|
|
1638
|
-
]);
|
|
1639
|
-
return (d, u) => v(n) ? N((l(), s("textarea", {
|
|
1640
|
-
key: 0,
|
|
1641
|
-
"onUpdate:modelValue": u[0] || (u[0] = (r) => c.value = r),
|
|
1642
|
-
class: S(m.value)
|
|
1643
|
-
}, null, 2)), [
|
|
1644
|
-
[$e, c.value]
|
|
1645
|
-
]) : (l(), s("textarea", {
|
|
1646
|
-
key: 1,
|
|
1647
|
-
class: S(m.value)
|
|
1648
|
-
}, null, 2));
|
|
1649
|
-
}
|
|
1650
|
-
}, Fl = /* @__PURE__ */ Object.assign({
|
|
1651
|
-
inheritAttrs: !1
|
|
1652
|
-
}, {
|
|
1653
|
-
__name: "Lightswitch",
|
|
1654
|
-
props: {
|
|
1655
|
-
modelValue: {
|
|
1656
|
-
type: Boolean,
|
|
1657
|
-
default: !1
|
|
1658
|
-
}
|
|
1659
|
-
},
|
|
1660
|
-
emits: ["update:modelValue"],
|
|
1661
|
-
setup(e, { emit: a }) {
|
|
1662
|
-
const t = e, f = a, n = T({
|
|
1663
|
-
get: () => t.modelValue,
|
|
1664
|
-
set: (c) => f("update:modelValue", c)
|
|
1665
|
-
});
|
|
1666
|
-
return (c, m) => (l(), w(v(Me), {
|
|
1667
|
-
as: "div",
|
|
1668
|
-
class: "rvc-lightswitch-group"
|
|
1669
|
-
}, {
|
|
1670
|
-
default: $(() => [
|
|
1671
|
-
p(v(Te), A({
|
|
1672
|
-
modelValue: n.value,
|
|
1673
|
-
"onUpdate:modelValue": m[0] || (m[0] = (d) => n.value = d),
|
|
1674
|
-
class: [{ "rvc-lightswitch-enabled": n.value }, "rvc-lightswitch"]
|
|
1675
|
-
}, c.$attrs), {
|
|
1676
|
-
default: $(() => [
|
|
1677
|
-
i("span", {
|
|
1678
|
-
class: S([{ "rvc-translate-x-6": n.value }, "rvc-lightswitch-toggle"])
|
|
1679
|
-
}, null, 2)
|
|
1680
|
-
]),
|
|
1681
|
-
_: 1
|
|
1682
|
-
}, 16, ["modelValue", "class"]),
|
|
1683
|
-
c.$slots.default ? (l(), w(v(Oe), { key: 0 }, {
|
|
1684
|
-
default: $(() => [
|
|
1685
|
-
b(c.$slots, "default")
|
|
1686
|
-
]),
|
|
1687
|
-
_: 3
|
|
1688
|
-
})) : x("", !0)
|
|
1689
|
-
]),
|
|
1690
|
-
_: 3
|
|
1691
|
-
}));
|
|
1692
|
-
}
|
|
1693
|
-
}), al = {
|
|
1694
|
-
role: "presentation",
|
|
1695
|
-
class: "rvc-fixed rvc-inset-0 rvc-z-10 rvc-w-screen rvc-overflow-y-auto"
|
|
1696
|
-
}, nl = { class: "rvc-flex rvc-min-h-full rvc-justify-center rvc-p-4 rvc-items-center sm:rvc-p-0" }, il = { class: "rvc-modal-header" }, ol = { class: "rvc-flex rvc-items-center rvc-justify-between" }, rl = {
|
|
1697
|
-
key: 0,
|
|
1698
|
-
class: "rvc-ml-3 rvc-flex rvc-h-7 rvc-items-center"
|
|
1699
|
-
}, sl = ["id"], cl = { class: "rvc-modal-footer" }, ul = {
|
|
1700
|
-
__name: "Modal",
|
|
1701
|
-
props: {
|
|
1702
|
-
as: {
|
|
1703
|
-
type: String,
|
|
1704
|
-
default: "div"
|
|
1705
|
-
},
|
|
1706
|
-
id: {
|
|
1707
|
-
type: String,
|
|
1708
|
-
required: !0
|
|
1709
|
-
},
|
|
1710
|
-
title: {
|
|
1711
|
-
type: String,
|
|
1712
|
-
required: !0
|
|
1713
|
-
},
|
|
1714
|
-
showClose: {
|
|
1715
|
-
type: Boolean
|
|
1716
|
-
},
|
|
1717
|
-
spinning: {
|
|
1718
|
-
type: Boolean
|
|
1719
|
-
},
|
|
1720
|
-
submitLabel: {
|
|
1721
|
-
type: String,
|
|
1722
|
-
default: "Confirm"
|
|
1723
|
-
},
|
|
1724
|
-
cancelLabel: {
|
|
1725
|
-
type: String,
|
|
1726
|
-
default: "Cancel"
|
|
1727
|
-
},
|
|
1728
|
-
panelClass: {
|
|
1729
|
-
type: String,
|
|
1730
|
-
default: "sm:rvc-max-w-lg"
|
|
1731
|
-
}
|
|
1732
|
-
},
|
|
1733
|
-
emits: ["modal:open", "modal:close", "modal:save", "modal:closed"],
|
|
1734
|
-
setup(e, { emit: a }) {
|
|
1735
|
-
const t = a, f = e, {
|
|
1736
|
-
contentRef: n,
|
|
1737
|
-
ready: c,
|
|
1738
|
-
isForm: m,
|
|
1739
|
-
titleId: d,
|
|
1740
|
-
descriptionId: u,
|
|
1741
|
-
initialFocusElement: r
|
|
1742
|
-
} = fe(f);
|
|
1743
|
-
return (o, y) => (l(), w(v(_), { as: "template" }, {
|
|
1744
|
-
default: $(() => [
|
|
1745
|
-
p(v(se), {
|
|
1746
|
-
as: e.as,
|
|
1747
|
-
class: "rvc-modal",
|
|
1748
|
-
static: "",
|
|
1749
|
-
"aria-modal": "true",
|
|
1750
|
-
role: "dialog",
|
|
1751
|
-
"initial-focus": v(r),
|
|
1752
|
-
"aria-labelledby": v(d),
|
|
1753
|
-
onClose: y[6] || (y[6] = (g) => o.$emit("modal:close")),
|
|
1754
|
-
onSubmit: y[7] || (y[7] = W((g) => t("modal:save", g), ["prevent"]))
|
|
1755
|
-
}, {
|
|
1756
|
-
default: $(() => [
|
|
1757
|
-
p(v(G), {
|
|
1758
|
-
as: "template",
|
|
1759
|
-
enter: "rvc-ease-out rvc-duration-300",
|
|
1760
|
-
"enter-from": "rvc-opacity-0",
|
|
1761
|
-
"enter-to": "rvc-opacity-100",
|
|
1762
|
-
leave: "rvc-ease-in rvc-duration-200",
|
|
1763
|
-
"leave-from": "rvc-opacity-100",
|
|
1764
|
-
"leave-to": "rvc-opacity-0",
|
|
1765
|
-
onBeforeEnter: y[0] || (y[0] = (g) => t("modal:open"))
|
|
1766
|
-
}, {
|
|
1767
|
-
default: $(() => y[8] || (y[8] = [
|
|
1768
|
-
i("div", {
|
|
1769
|
-
"aria-hidden": "true",
|
|
1770
|
-
class: "rvc-fixed rvc-inset-0 rvc-transition-opacity rvc-modal-backdrop"
|
|
1771
|
-
}, null, -1)
|
|
1772
|
-
])),
|
|
1773
|
-
_: 1
|
|
1774
|
-
}),
|
|
1775
|
-
i("div", al, [
|
|
1776
|
-
i("div", nl, [
|
|
1777
|
-
p(v(G), {
|
|
1778
|
-
as: "template",
|
|
1779
|
-
enter: "rvc-ease-out rvc-duration-300",
|
|
1780
|
-
"enter-from": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
1781
|
-
"enter-to": "rvc-opacity-100 rvc-translate-y-0 sm:rvc-scale-100",
|
|
1782
|
-
leave: "rvc-ease-in rvc-duration-200",
|
|
1783
|
-
"leave-from": "rvc-opacity-100 rvc-translate-y-0 sm:rvc-scale-100",
|
|
1784
|
-
"leave-to": "rvc-opacity-0 rvc-translate-y-4 sm:rvc-translate-y-0 sm:rvc-scale-95",
|
|
1785
|
-
onBeforeEnter: y[4] || (y[4] = (g) => c.value = !0),
|
|
1786
|
-
onAfterLeave: y[5] || (y[5] = (g) => (c.value = !1, t("modal:closed")))
|
|
1787
|
-
}, {
|
|
1788
|
-
default: $(() => [
|
|
1789
|
-
p(v(ce), {
|
|
1790
|
-
class: S(["rvc-modal-panel", e.panelClass]),
|
|
1791
|
-
"aria-busy": e.spinning,
|
|
1792
|
-
"aria-describedby": v(u)
|
|
1793
|
-
}, {
|
|
1794
|
-
default: $(() => [
|
|
1795
|
-
i("header", il, [
|
|
1796
|
-
b(o.$slots, "header", { title: e.title }, () => [
|
|
1797
|
-
i("div", ol, [
|
|
1798
|
-
p(v(ue), {
|
|
1799
|
-
id: v(d),
|
|
1800
|
-
class: "rvc-modal-title"
|
|
1801
|
-
}, {
|
|
1802
|
-
default: $(() => [
|
|
1803
|
-
z(C(e.title), 1)
|
|
1804
|
-
]),
|
|
1805
|
-
_: 1
|
|
1806
|
-
}, 8, ["id"]),
|
|
1807
|
-
e.showClose ? (l(), s("div", rl, [
|
|
1808
|
-
i("button", {
|
|
1809
|
-
type: "button",
|
|
1810
|
-
class: "rvc-relative rvc-modal-close",
|
|
1811
|
-
"aria-label": "Close panel",
|
|
1812
|
-
onClick: y[1] || (y[1] = (g) => t("modal:close"))
|
|
1813
|
-
}, [
|
|
1814
|
-
p(v(J), {
|
|
1815
|
-
class: "rvc-size-full",
|
|
1816
|
-
"aria-hidden": "true"
|
|
1817
|
-
})
|
|
1818
|
-
])
|
|
1819
|
-
])) : x("", !0)
|
|
1820
|
-
])
|
|
1821
|
-
])
|
|
1822
|
-
]),
|
|
1823
|
-
i("div", {
|
|
1824
|
-
id: v(u),
|
|
1825
|
-
ref_key: "contentRef",
|
|
1826
|
-
ref: n,
|
|
1827
|
-
class: "rvc-modal-content"
|
|
1828
|
-
}, [
|
|
1829
|
-
b(o.$slots, "default", { ready: v(c) })
|
|
1830
|
-
], 8, sl),
|
|
1831
|
-
i("footer", cl, [
|
|
1832
|
-
b(o.$slots, "footer", { loading: e.spinning }, () => [
|
|
1833
|
-
p(E, {
|
|
1834
|
-
type: v(m) ? "submit" : "button",
|
|
1835
|
-
label: e.submitLabel,
|
|
1836
|
-
spinning: e.spinning,
|
|
1837
|
-
disabled: e.spinning,
|
|
1838
|
-
onClick: y[2] || (y[2] = (g) => !v(m) && o.$emit("modal:save"))
|
|
1839
|
-
}, null, 8, ["type", "label", "spinning", "disabled"]),
|
|
1840
|
-
p(E, {
|
|
1841
|
-
type: "button",
|
|
1842
|
-
color: "light",
|
|
1843
|
-
label: e.cancelLabel,
|
|
1844
|
-
onClick: y[3] || (y[3] = (g) => o.$emit("modal:close"))
|
|
1845
|
-
}, null, 8, ["label"])
|
|
1846
|
-
])
|
|
1847
|
-
])
|
|
1848
|
-
]),
|
|
1849
|
-
_: 3
|
|
1850
|
-
}, 8, ["class", "aria-busy", "aria-describedby"])
|
|
1851
|
-
]),
|
|
1852
|
-
_: 3
|
|
1853
|
-
})
|
|
1854
|
-
])
|
|
1855
|
-
])
|
|
1856
|
-
]),
|
|
1857
|
-
_: 3
|
|
1858
|
-
}, 8, ["as", "initial-focus", "aria-labelledby"])
|
|
1859
|
-
]),
|
|
1860
|
-
_: 3
|
|
1861
|
-
}));
|
|
1862
|
-
}
|
|
1863
|
-
}, dl = { class: "rvc-radio" }, vl = ["id"], fl = { key: 2 }, ml = ["for"], Zl = /* @__PURE__ */ Object.assign({
|
|
1864
|
-
inheritAttrs: !1
|
|
1865
|
-
}, {
|
|
1866
|
-
__name: "Radio",
|
|
1867
|
-
props: {
|
|
1868
|
-
modelValue: {
|
|
1869
|
-
type: [Boolean, String, Array],
|
|
1870
|
-
default: null
|
|
1871
|
-
},
|
|
1872
|
-
id: {
|
|
1873
|
-
type: String,
|
|
1874
|
-
default: null
|
|
1875
|
-
},
|
|
1876
|
-
label: {
|
|
1877
|
-
type: String,
|
|
1878
|
-
default: ""
|
|
1879
|
-
}
|
|
1880
|
-
},
|
|
1881
|
-
emits: ["update:modelValue"],
|
|
1882
|
-
setup(e, { emit: a }) {
|
|
1883
|
-
const t = e, f = a, n = T({
|
|
1884
|
-
get: () => t.modelValue,
|
|
1885
|
-
set: (u) => f("update:modelValue", u)
|
|
1886
|
-
}), { hasModelBinding: c } = K(), d = {
|
|
1887
|
-
...X(),
|
|
1888
|
-
id: t.id,
|
|
1889
|
-
type: "radio",
|
|
1890
|
-
class: "rvc-absolute rvc-opacity-0 rvc-inset-0 rvc-cursor-pointer"
|
|
1891
|
-
};
|
|
1892
|
-
return (u, r) => (l(), s("div", dl, [
|
|
1893
|
-
v(c) ? N((l(), s("input", A({ key: 0 }, d, {
|
|
1894
|
-
id: e.id,
|
|
1895
|
-
"onUpdate:modelValue": r[0] || (r[0] = (o) => n.value = o)
|
|
1896
|
-
}), null, 16, vl)), [
|
|
1897
|
-
[Y, n.value]
|
|
1898
|
-
]) : (l(), s("input", R(A({ key: 1 }, d)), null, 16)),
|
|
1899
|
-
r[1] || (r[1] = i("span", { class: "rvc-radio-input" }, null, -1)),
|
|
1900
|
-
u.$slots.default || e.label ? (l(), s("span", fl, [
|
|
1901
|
-
b(u.$slots, "default", {}, () => [
|
|
1902
|
-
i("label", { for: e.id }, C(e.label), 9, ml)
|
|
1903
|
-
])
|
|
1904
|
-
])) : x("", !0)
|
|
1905
|
-
]));
|
|
1906
|
-
}
|
|
1907
|
-
}), yl = ["innerHTML"], bl = {
|
|
1908
|
-
__name: "Tooltip",
|
|
1909
|
-
props: {
|
|
1910
|
-
content: {
|
|
1911
|
-
type: String,
|
|
1912
|
-
required: !0
|
|
1913
|
-
},
|
|
1914
|
-
blur: {
|
|
1915
|
-
type: Boolean,
|
|
1916
|
-
default: !0
|
|
1917
|
-
},
|
|
1918
|
-
maxWidth: {
|
|
1919
|
-
type: Number,
|
|
1920
|
-
default: null
|
|
1921
|
-
},
|
|
1922
|
-
tooltipClass: {
|
|
1923
|
-
type: String,
|
|
1924
|
-
default: ""
|
|
1925
|
-
},
|
|
1926
|
-
placement: {
|
|
1927
|
-
type: String,
|
|
1928
|
-
default: void 0,
|
|
1929
|
-
validator: (e) => e === void 0 || [
|
|
1930
|
-
"top",
|
|
1931
|
-
"right",
|
|
1932
|
-
"bottom",
|
|
1933
|
-
"left",
|
|
1934
|
-
"top-start",
|
|
1935
|
-
"top-end",
|
|
1936
|
-
"right-start",
|
|
1937
|
-
"right-end",
|
|
1938
|
-
"bottom-start",
|
|
1939
|
-
"bottom-end",
|
|
1940
|
-
"left-start",
|
|
1941
|
-
"left-end"
|
|
1942
|
-
].includes(e)
|
|
1943
|
-
},
|
|
1944
|
-
size: {
|
|
1945
|
-
type: String,
|
|
1946
|
-
default: "base",
|
|
1947
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
1948
|
-
}
|
|
1949
|
-
},
|
|
1950
|
-
setup(e) {
|
|
1951
|
-
const a = e, t = Q(), f = Q(), n = Q(), {
|
|
1952
|
-
floatingStyles: c,
|
|
1953
|
-
middlewareData: m,
|
|
1954
|
-
placement: d
|
|
1955
|
-
} = qe(t, f, {
|
|
1956
|
-
middleware: [
|
|
1957
|
-
a.placement ? null : Fe(),
|
|
1958
|
-
Ze(a.size === "sm" ? 7 : 10),
|
|
1959
|
-
He({ crossAxis: !0, padding: 5 }),
|
|
1960
|
-
Re({ element: n }),
|
|
1961
|
-
De({
|
|
1962
|
-
apply({ availableWidth: o, availableHeight: y, elements: g }) {
|
|
1963
|
-
Object.assign(g.floating.style, {
|
|
1964
|
-
maxWidth: a.maxWidth ? `${Math.min(o, a.maxWidth) / 16}rem` : "",
|
|
1965
|
-
maxHeight: `${y / 16}rem `
|
|
1966
|
-
});
|
|
1967
|
-
}
|
|
1968
|
-
})
|
|
1969
|
-
],
|
|
1970
|
-
whileElementsMounted: Ee,
|
|
1971
|
-
placement: a.placement
|
|
1972
|
-
}), u = (o) => ({
|
|
1973
|
-
top: 0,
|
|
1974
|
-
bottom: 180,
|
|
1975
|
-
left: -90,
|
|
1976
|
-
right: 90
|
|
1977
|
-
})[o.split("-")[0]] || 0, r = (o) => {
|
|
1978
|
-
var q, B;
|
|
1979
|
-
const y = d.value.split("-")[0], g = {
|
|
1980
|
-
left: "right",
|
|
1981
|
-
right: "left",
|
|
1982
|
-
bottom: "top",
|
|
1983
|
-
top: "bottom"
|
|
1984
|
-
}[y];
|
|
1985
|
-
return {
|
|
1986
|
-
style: {
|
|
1987
|
-
left: (q = o.arrow) != null && q.x ? `${o.arrow.x}px` : "",
|
|
1988
|
-
top: (B = o.arrow) != null && B.y ? `${o.arrow.y}px` : "",
|
|
1989
|
-
bottom: "",
|
|
1990
|
-
right: "",
|
|
1991
|
-
[g]: n.value ? `${n.value.offsetWidth * -1}px` : "",
|
|
1992
|
-
transform: `rotate(${u(d.value)}deg)`
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
};
|
|
1996
|
-
return (o, y) => (l(), s("div", {
|
|
1997
|
-
ref_key: "wrapperRef",
|
|
1998
|
-
ref: t,
|
|
1999
|
-
class: "rvc-group/tooltip"
|
|
2000
|
-
}, [
|
|
2001
|
-
b(o.$slots, "default"),
|
|
2002
|
-
i("div", {
|
|
2003
|
-
ref_key: "tooltipRef",
|
|
2004
|
-
ref: f,
|
|
2005
|
-
class: S([
|
|
2006
|
-
"group-hover/tooltip:rvc-opacity-100 group-hover/tooltip:rvc-visible rvc-invisible rvc-opacity-0 rvc-tooltip",
|
|
2007
|
-
e.tooltipClass,
|
|
2008
|
-
`rvc-tooltip-${e.size}`,
|
|
2009
|
-
{ "rvc-tooltip-blur": e.blur }
|
|
2010
|
-
]),
|
|
2011
|
-
style: we(v(c))
|
|
2012
|
-
}, [
|
|
2013
|
-
b(o.$slots, "content", { content: e.content }, () => [
|
|
2014
|
-
e.content ? (l(), s("div", {
|
|
2015
|
-
key: 0,
|
|
2016
|
-
innerHTML: e.content
|
|
2017
|
-
}, null, 8, yl)) : x("", !0)
|
|
2018
|
-
]),
|
|
2019
|
-
i("div", A({
|
|
2020
|
-
ref_key: "arrowRef",
|
|
2021
|
-
ref: n,
|
|
2022
|
-
class: "rvc-absolute rvc-tooltip-arrow"
|
|
2023
|
-
}, r(v(m))), null, 16)
|
|
2024
|
-
], 6)
|
|
2025
|
-
], 512));
|
|
2026
|
-
}
|
|
2027
|
-
}, pl = { class: "rvc-rich-text-toolbar" }, gl = ["disabled", "aria-label", "onClick"], Hl = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
2028
|
-
__name: "RichTextEditor",
|
|
2029
|
-
props: {
|
|
2030
|
-
id: {
|
|
2031
|
-
type: String,
|
|
2032
|
-
required: !0
|
|
2033
|
-
},
|
|
2034
|
-
modelValue: {
|
|
2035
|
-
type: String,
|
|
2036
|
-
default: ""
|
|
2037
|
-
},
|
|
2038
|
-
rootClass: {
|
|
2039
|
-
type: String,
|
|
2040
|
-
default: void 0
|
|
2041
|
-
},
|
|
2042
|
-
config: {
|
|
2043
|
-
type: String,
|
|
2044
|
-
default: "default",
|
|
2045
|
-
validator: (e) => ["default", "simple"].includes(e)
|
|
2046
|
-
},
|
|
2047
|
-
customExtensions: {
|
|
2048
|
-
type: Array,
|
|
2049
|
-
default: () => []
|
|
2050
|
-
},
|
|
2051
|
-
customCommands: {
|
|
2052
|
-
type: Array,
|
|
2053
|
-
default: () => []
|
|
2054
|
-
}
|
|
2055
|
-
},
|
|
2056
|
-
emits: ["update:modelValue", "tiptap:onCreate"],
|
|
2057
|
-
setup(e, { emit: a }) {
|
|
2058
|
-
const t = e, f = a, n = j(!1), c = j(!1), m = j(""), d = X(), u = d.class ? `${d.class} ` : "", r = [
|
|
2059
|
-
ze,
|
|
2060
|
-
Pe.configure({
|
|
2061
|
-
openOnClick: !1
|
|
2062
|
-
})
|
|
2063
|
-
], o = Ie({
|
|
2064
|
-
extensions: [...r, ...t.customExtensions],
|
|
2065
|
-
content: t.modelValue,
|
|
2066
|
-
editorProps: {
|
|
2067
|
-
attributes: {
|
|
2068
|
-
...d,
|
|
2069
|
-
id: t.id,
|
|
2070
|
-
class: `${u}rvc-textarea rvc-rich-text-textarea`
|
|
2071
|
-
}
|
|
2072
|
-
},
|
|
2073
|
-
onCreate: ({ editor: B }) => {
|
|
2074
|
-
f("tiptap:onCreate", B);
|
|
2075
|
-
},
|
|
2076
|
-
onUpdate: ({ editor: B }) => {
|
|
2077
|
-
const O = B.isEmpty ? "" : B.getHTML();
|
|
2078
|
-
f("update:modelValue", O);
|
|
2079
|
-
},
|
|
2080
|
-
onSelectionUpdate({ editor: B }) {
|
|
2081
|
-
n.value = !B.view.state.selection.empty;
|
|
2082
|
-
}
|
|
2083
|
-
}), y = T(() => [
|
|
2084
|
-
{
|
|
2085
|
-
name: "bold",
|
|
2086
|
-
icon: ut,
|
|
2087
|
-
title: "Bold",
|
|
2088
|
-
isVisible: !0,
|
|
2089
|
-
isActive: () => o.value.isActive("bold"),
|
|
2090
|
-
action: () => o.value.commands.toggleBold()
|
|
2091
|
-
},
|
|
2092
|
-
{
|
|
2093
|
-
name: "italic",
|
|
2094
|
-
icon: dt,
|
|
2095
|
-
title: "Italic",
|
|
2096
|
-
isVisible: !0,
|
|
2097
|
-
isActive: () => o.value.isActive("italic"),
|
|
2098
|
-
action: () => o.value.commands.toggleItalic()
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
name: "bulletList",
|
|
2102
|
-
icon: ft,
|
|
2103
|
-
title: "Bullet List",
|
|
2104
|
-
isVisible: t.config === "default",
|
|
2105
|
-
isActive: () => o.value.isActive("bulletList"),
|
|
2106
|
-
action: () => o.value.commands.toggleBulletList()
|
|
2107
|
-
},
|
|
2108
|
-
{
|
|
2109
|
-
name: "orderedList",
|
|
2110
|
-
icon: mt,
|
|
2111
|
-
title: "Ordered List",
|
|
2112
|
-
isVisible: t.config === "default",
|
|
2113
|
-
isActive: () => o.value.isActive("orderedList"),
|
|
2114
|
-
action: () => o.value.commands.toggleOrderedList()
|
|
2115
|
-
},
|
|
2116
|
-
{
|
|
2117
|
-
name: "link",
|
|
2118
|
-
icon: vt,
|
|
2119
|
-
title: "Hyperlink",
|
|
2120
|
-
isVisible: t.config === "default",
|
|
2121
|
-
disabled: !n.value && !o.value.isActive("link"),
|
|
2122
|
-
isActive: () => o.value.isActive("link"),
|
|
2123
|
-
action: () => {
|
|
2124
|
-
m.value = o.value.getAttributes("link").href, c.value = !0;
|
|
2125
|
-
}
|
|
2126
|
-
}
|
|
2127
|
-
]), g = T(() => {
|
|
2128
|
-
const B = y.value.filter((k) => t.config === "default" || ["bold", "italic"].includes(k.name)), O = t.customCommands.map((k) => ({
|
|
2129
|
-
...k,
|
|
2130
|
-
isVisible: k.isVisible ?? !0,
|
|
2131
|
-
disabled: typeof k.disabled == "function" ? k.disabled(o.value) : k.disabled ?? !1,
|
|
2132
|
-
isActive: () => {
|
|
2133
|
-
var H;
|
|
2134
|
-
return ((H = k.isActive) == null ? void 0 : H.call(k, o.value)) ?? !1;
|
|
2135
|
-
},
|
|
2136
|
-
action: () => k.action(o.value)
|
|
2137
|
-
}));
|
|
2138
|
-
return [...B, ...O];
|
|
2139
|
-
});
|
|
2140
|
-
re(() => t.modelValue, (B) => {
|
|
2141
|
-
o.value.getHTML() === B || o.value.commands.setContent(B, !1);
|
|
2142
|
-
});
|
|
2143
|
-
const q = () => {
|
|
2144
|
-
o.value.commands.setLink({ href: m.value }), c.value = !1, m.value = null;
|
|
2145
|
-
};
|
|
2146
|
-
return (B, O) => (l(), s(I, null, [
|
|
2147
|
-
p(ul, {
|
|
2148
|
-
id: `${t.id}-modal-add-hyperlink`,
|
|
2149
|
-
title: "Add Hyperlink",
|
|
2150
|
-
as: "form",
|
|
2151
|
-
show: c.value,
|
|
2152
|
-
"onModal:close": O[1] || (O[1] = (k) => c.value = !1),
|
|
2153
|
-
"onModal:save": q
|
|
2154
|
-
}, {
|
|
2155
|
-
default: $(() => [
|
|
2156
|
-
p(ll, {
|
|
2157
|
-
modelValue: m.value,
|
|
2158
|
-
"onUpdate:modelValue": O[0] || (O[0] = (k) => m.value = k),
|
|
2159
|
-
placeholder: "https://www.example.com",
|
|
2160
|
-
type: "url",
|
|
2161
|
-
required: ""
|
|
2162
|
-
}, null, 8, ["modelValue"])
|
|
2163
|
-
]),
|
|
2164
|
-
_: 1
|
|
2165
|
-
}, 8, ["id", "show"]),
|
|
2166
|
-
b(B.$slots, "default"),
|
|
2167
|
-
i("div", {
|
|
2168
|
-
class: S(["rvc-rich-text", e.rootClass])
|
|
2169
|
-
}, [
|
|
2170
|
-
v(o) ? b(B.$slots, "toolbar", {
|
|
2171
|
-
key: 0,
|
|
2172
|
-
commands: g.value,
|
|
2173
|
-
tiptap: v(o)
|
|
2174
|
-
}, () => [
|
|
2175
|
-
i("ul", pl, [
|
|
2176
|
-
(l(!0), s(I, null, P(g.value.filter((k) => k.isVisible), (k) => (l(), s("li", {
|
|
2177
|
-
key: `toolbar-item-command-${k.name}`
|
|
2178
|
-
}, [
|
|
2179
|
-
p(bl, {
|
|
2180
|
-
content: k.title,
|
|
2181
|
-
placement: "bottom",
|
|
2182
|
-
size: "sm",
|
|
2183
|
-
class: "rvc-text-sm rvc-font-medium"
|
|
2184
|
-
}, {
|
|
2185
|
-
default: $(() => [
|
|
2186
|
-
i("button", {
|
|
2187
|
-
disabled: k.disabled,
|
|
2188
|
-
type: "button",
|
|
2189
|
-
"aria-label": k.title,
|
|
2190
|
-
class: S([{ "rvc-rich-text-button-active": k.isActive() }, "rvc-rich-text-button"]),
|
|
2191
|
-
onClick: k.action
|
|
2192
|
-
}, [
|
|
2193
|
-
(l(), w(M(k.icon)))
|
|
2194
|
-
], 10, gl)
|
|
2195
|
-
]),
|
|
2196
|
-
_: 2
|
|
2197
|
-
}, 1032, ["content"])
|
|
2198
|
-
]))), 128))
|
|
2199
|
-
])
|
|
2200
|
-
]) : x("", !0),
|
|
2201
|
-
p(v(je), { editor: v(o) }, null, 8, ["editor"])
|
|
2202
|
-
], 2)
|
|
2203
|
-
], 64));
|
|
2204
|
-
}
|
|
2205
|
-
}), hl = { class: "rvc-tabs-nav" }, $l = { class: "md:rvc-hidden" }, wl = ["value", "selected"], Rl = {
|
|
2206
|
-
__name: "Tabs",
|
|
2207
|
-
props: {
|
|
2208
|
-
modelValue: {
|
|
2209
|
-
type: Number,
|
|
2210
|
-
default: void 0
|
|
2211
|
-
},
|
|
2212
|
-
tabs: {
|
|
2213
|
-
type: Array,
|
|
2214
|
-
required: !0,
|
|
2215
|
-
default: () => []
|
|
2216
|
-
},
|
|
2217
|
-
tabStyle: {
|
|
2218
|
-
type: String,
|
|
2219
|
-
default: "default",
|
|
2220
|
-
validator: (e) => ["buttons", "default"].includes(e)
|
|
2221
|
-
}
|
|
2222
|
-
},
|
|
2223
|
-
emits: ["update:modelValue", "tabs:change"],
|
|
2224
|
-
setup(e, { emit: a }) {
|
|
2225
|
-
const t = e, f = a, n = () => {
|
|
2226
|
-
const u = t.tabs.findIndex((r) => r.active);
|
|
2227
|
-
return u >= 0 ? u : 0;
|
|
2228
|
-
}, c = T({
|
|
2229
|
-
get: () => t.modelValue ?? n(),
|
|
2230
|
-
set: (u) => {
|
|
2231
|
-
const r = t.tabs[u];
|
|
2232
|
-
f("update:modelValue", u), f("tabs:change", r);
|
|
2233
|
-
}
|
|
2234
|
-
}), m = (u) => {
|
|
2235
|
-
const r = +u.target.value;
|
|
2236
|
-
c.value = r;
|
|
2237
|
-
const o = t.tabs[r];
|
|
2238
|
-
o != null && o.selectEvent && o.selectEvent();
|
|
2239
|
-
}, d = (u) => {
|
|
2240
|
-
const {
|
|
2241
|
-
active: r,
|
|
2242
|
-
as: o,
|
|
2243
|
-
bindAs: y,
|
|
2244
|
-
selectEvent: g,
|
|
2245
|
-
name: q,
|
|
2246
|
-
...B
|
|
2247
|
-
} = u;
|
|
2248
|
-
return B;
|
|
2249
|
-
};
|
|
2250
|
-
return (u, r) => (l(), s(I, null, [
|
|
2251
|
-
i("div", {
|
|
2252
|
-
class: S(["rvc-tabs rvc-hidden md:rvc-flex", { "rvc-tabs-buttons": e.tabStyle === "buttons" }])
|
|
2253
|
-
}, [
|
|
2254
|
-
i("nav", hl, [
|
|
2255
|
-
(l(!0), s(I, null, P(e.tabs, (o, y) => (l(), w(M(o.as ? o.as : "button"), A({ ref_for: !0 }, d(o), {
|
|
2256
|
-
key: `${y}-tab-item`,
|
|
2257
|
-
as: o.bindAs ? o.bindAs : void 0,
|
|
2258
|
-
class: ["rvc-tab", { "rvc-tab-active": c.value === y }],
|
|
2259
|
-
onClick: (g) => c.value = y
|
|
2260
|
-
}), {
|
|
2261
|
-
default: $(() => [
|
|
2262
|
-
z(C(o.name), 1)
|
|
2263
|
-
]),
|
|
2264
|
-
_: 2
|
|
2265
|
-
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
2266
|
-
])
|
|
2267
|
-
], 2),
|
|
2268
|
-
i("div", $l, [
|
|
2269
|
-
p(ve, {
|
|
2270
|
-
value: c.value,
|
|
2271
|
-
onChange: m
|
|
2272
|
-
}, {
|
|
2273
|
-
default: $(() => [
|
|
2274
|
-
(l(!0), s(I, null, P(e.tabs, (o, y) => (l(), s("option", {
|
|
2275
|
-
key: `${y}-tab-item-select-option`,
|
|
2276
|
-
value: y,
|
|
2277
|
-
selected: c.value === y
|
|
2278
|
-
}, C(o.name), 9, wl))), 128))
|
|
2279
|
-
]),
|
|
2280
|
-
_: 1
|
|
2281
|
-
}, 8, ["value"])
|
|
2282
|
-
])
|
|
2283
|
-
], 64));
|
|
2284
|
-
}
|
|
2285
|
-
}, xl = { class: "rvc-toast-title" }, Dl = {
|
|
2286
|
-
__name: "Toast",
|
|
2287
|
-
props: {
|
|
2288
|
-
as: {
|
|
2289
|
-
type: String,
|
|
2290
|
-
default: "div"
|
|
2291
|
-
},
|
|
2292
|
-
title: {
|
|
2293
|
-
type: String,
|
|
2294
|
-
default: ""
|
|
2295
|
-
},
|
|
2296
|
-
open: {
|
|
2297
|
-
type: Boolean,
|
|
2298
|
-
default: !1
|
|
2299
|
-
},
|
|
2300
|
-
icon: {
|
|
2301
|
-
type: [Object, Function],
|
|
2302
|
-
default: null
|
|
2303
|
-
},
|
|
2304
|
-
timeout: {
|
|
2305
|
-
type: [Number, Boolean],
|
|
2306
|
-
default: 5e3
|
|
2307
|
-
},
|
|
2308
|
-
position: {
|
|
2309
|
-
type: String,
|
|
2310
|
-
default: "bottom",
|
|
2311
|
-
validator: (e) => ["top", "bottom"].includes(e)
|
|
2312
|
-
},
|
|
2313
|
-
type: {
|
|
2314
|
-
type: String,
|
|
2315
|
-
default: "info",
|
|
2316
|
-
validator: (e) => ["success", "warning", "danger", "info"].includes(e)
|
|
2317
|
-
},
|
|
2318
|
-
showClose: {
|
|
2319
|
-
type: Boolean,
|
|
2320
|
-
default: !1
|
|
2321
|
-
}
|
|
2322
|
-
},
|
|
2323
|
-
emits: ["toast:open", "toast:close"],
|
|
2324
|
-
setup(e, { emit: a }) {
|
|
2325
|
-
const t = e, f = a, n = () => {
|
|
2326
|
-
t.timeout && t.open && setTimeout(() => {
|
|
2327
|
-
f("toast:close");
|
|
2328
|
-
}, t.timeout);
|
|
2329
|
-
};
|
|
2330
|
-
return xe(() => {
|
|
2331
|
-
n();
|
|
2332
|
-
}), re(() => t.open, (c) => {
|
|
2333
|
-
c && n();
|
|
2334
|
-
}), (c, m) => (l(), w(v(_), {
|
|
2335
|
-
as: "template",
|
|
2336
|
-
show: e.open,
|
|
2337
|
-
enter: "rvc-transition-opacity rvc-duration-300",
|
|
2338
|
-
"enter-from": "rvc-opacity-0",
|
|
2339
|
-
"enter-to": "rvc-opacity-100",
|
|
2340
|
-
leave: "rvc-transition-opacity rvc-duration-300",
|
|
2341
|
-
"leave-from": "rvc-opacity-100",
|
|
2342
|
-
"leave-to": "rvc-opacity-0"
|
|
2343
|
-
}, {
|
|
2344
|
-
default: $(() => [
|
|
2345
|
-
(l(), w(M(e.as), {
|
|
2346
|
-
class: S(["rvc-toast rvc-transition-opacity", `rvc-toast-${e.position}`, `rvc-toast-${e.type}`, { "rvc-toast-open": e.open }])
|
|
2347
|
-
}, {
|
|
2348
|
-
default: $(() => [
|
|
2349
|
-
b(c.$slots, "icon", {}, () => [
|
|
2350
|
-
e.icon ? (l(), w(M(e.icon), {
|
|
2351
|
-
key: 0,
|
|
2352
|
-
class: "rvc-toast-icon"
|
|
2353
|
-
})) : x("", !0)
|
|
2354
|
-
]),
|
|
2355
|
-
i("div", null, [
|
|
2356
|
-
b(c.$slots, "title", {}, () => [
|
|
2357
|
-
i("span", xl, C(e.title), 1)
|
|
2358
|
-
]),
|
|
2359
|
-
b(c.$slots, "default")
|
|
2360
|
-
]),
|
|
2361
|
-
b(c.$slots, "close", {}, () => [
|
|
2362
|
-
e.showClose ? (l(), s("button", {
|
|
2363
|
-
key: 0,
|
|
2364
|
-
type: "button",
|
|
2365
|
-
class: "rvc-toast-close rvc-transition-colors",
|
|
2366
|
-
onClick: m[0] || (m[0] = (d) => c.$emit("toast:close"))
|
|
2367
|
-
}, [
|
|
2368
|
-
p(v(J), { class: "rvc-size-5" })
|
|
2369
|
-
])) : x("", !0)
|
|
2370
|
-
])
|
|
2371
|
-
]),
|
|
2372
|
-
_: 3
|
|
2373
|
-
}, 8, ["class"]))
|
|
2374
|
-
]),
|
|
2375
|
-
_: 3
|
|
2376
|
-
}, 8, ["show"]));
|
|
2377
|
-
}
|
|
2378
|
-
};
|
|
2379
|
-
export {
|
|
2380
|
-
Al as Accordion,
|
|
2381
|
-
Ml as Alert,
|
|
2382
|
-
Qe as Badge,
|
|
2383
|
-
E as ButtonBase,
|
|
2384
|
-
Tl as Checkbox,
|
|
2385
|
-
Ol as Combobox,
|
|
2386
|
-
Il as DataTable,
|
|
2387
|
-
jl as Drawer,
|
|
2388
|
-
Pl as Dropdown,
|
|
2389
|
-
zl as EmptyState,
|
|
2390
|
-
ll as FormInput,
|
|
2391
|
-
ve as FormSelect,
|
|
2392
|
-
ql as FormTextarea,
|
|
2393
|
-
Fl as Lightswitch,
|
|
2394
|
-
ul as Modal,
|
|
2395
|
-
jt as Pagination,
|
|
2396
|
-
Zl as Radio,
|
|
2397
|
-
Hl as RichTextEditor,
|
|
2398
|
-
Rl as Tabs,
|
|
2399
|
-
Dl as Toast,
|
|
2400
|
-
bl as Tooltip
|
|
2401
|
-
};
|