@robuust-digital/vue-components 2.1.0 → 2.2.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/CHANGELOG.md +6 -0
- package/dist/_shared/ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js +60 -0
- package/dist/_shared/ChevronDownIcon-DaaXfD3C.js +41 -0
- package/dist/_shared/Combobox.vue_vue_type_script_setup_true_lang-CP3x2DUA.js +266 -0
- package/dist/_shared/Drawer.vue_vue_type_script_setup_true_lang-CD5914Fk.js +185 -0
- package/dist/_shared/Dropdown.vue_vue_type_script_setup_true_lang-CmYj-7WQ.js +115 -0
- package/dist/_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js +75 -0
- package/dist/_shared/Lightswitch.vue_vue_type_script_setup_true_lang-DX23lEFd.js +43 -0
- package/dist/_shared/Modal.vue_vue_type_script_setup_true_lang-CoHkAJj3.js +186 -0
- package/dist/_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-CIVhqJtE.js +274 -0
- package/dist/_shared/Tabs.vue_vue_type_script_setup_true_lang-BgOTdYXd.js +676 -0
- package/dist/_shared/Toast.vue_vue_type_script_setup_true_lang-Be3i_0zE.js +78 -0
- package/dist/_shared/Tooltip.vue_vue_type_script_setup_true_lang-CoydN9sS.js +96 -0
- package/dist/_shared/{icon-spinner-CmxIOqaK.js → icon-spinner-CP0VP_YM.js} +2 -2
- package/dist/combobox/index.js +3 -347
- package/dist/combobox.d.ts +132 -0
- package/dist/core/index.js +17 -826
- package/dist/core.d.ts +669 -0
- package/dist/dialogs/index.js +4 -216
- package/dist/dialogs.d.ts +226 -0
- package/dist/dropdown/index.js +3 -131
- package/dist/dropdown.d.ts +145 -0
- package/dist/index/index.js +35 -0
- package/dist/index.d.ts +1343 -0
- package/dist/lightswitch/index.js +3 -47
- package/dist/lightswitch.d.ts +39 -0
- package/dist/rich-text-editor/index.js +3 -261
- package/dist/rich-text-editor.d.ts +89 -0
- package/dist/toast/index.js +3 -99
- package/dist/toast.d.ts +66 -0
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip.d.ts +61 -0
- package/package.json +69 -38
- package/dist/_shared/ButtonBase-DfkwHIhN.js +0 -87
- package/dist/_shared/ChevronDownIcon-z-5U4fIb.js +0 -55
- package/dist/_shared/FormInput-B-SQTZTA.js +0 -92
- package/dist/_shared/Modal-Bw2sID1x.js +0 -213
- package/dist/_shared/Tooltip-B93ZF7IF.js +0 -126
package/dist/core/index.js
CHANGED
|
@@ -1,828 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as Ze } from "../_shared/ButtonBase-DfkwHIhN.js";
|
|
6
|
-
import { u as j } from "../_shared/FormInput-B-SQTZTA.js";
|
|
7
|
-
import { _ as Ge } from "../_shared/FormInput-B-SQTZTA.js";
|
|
8
|
-
import { S as K } from "../_shared/icon-spinner-CmxIOqaK.js";
|
|
9
|
-
function G(e, u) {
|
|
10
|
-
return a(), l("svg", {
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
viewBox: "0 0 24 24",
|
|
13
|
-
fill: "currentColor",
|
|
14
|
-
"aria-hidden": "true",
|
|
15
|
-
"data-slot": "icon"
|
|
16
|
-
}, [
|
|
17
|
-
d("path", {
|
|
18
|
-
"fill-rule": "evenodd",
|
|
19
|
-
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",
|
|
20
|
-
"clip-rule": "evenodd"
|
|
21
|
-
})
|
|
22
|
-
]);
|
|
23
|
-
}
|
|
24
|
-
function J(e, u) {
|
|
25
|
-
return a(), l("svg", {
|
|
26
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
27
|
-
viewBox: "0 0 24 24",
|
|
28
|
-
fill: "currentColor",
|
|
29
|
-
"aria-hidden": "true",
|
|
30
|
-
"data-slot": "icon"
|
|
31
|
-
}, [
|
|
32
|
-
d("path", {
|
|
33
|
-
"fill-rule": "evenodd",
|
|
34
|
-
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",
|
|
35
|
-
"clip-rule": "evenodd"
|
|
36
|
-
})
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], Me = {
|
|
40
|
-
__name: "Accordion",
|
|
41
|
-
props: {
|
|
42
|
-
items: {
|
|
43
|
-
type: [Array, Object],
|
|
44
|
-
required: !0,
|
|
45
|
-
default: () => []
|
|
46
|
-
},
|
|
47
|
-
name: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: void 0
|
|
50
|
-
},
|
|
51
|
-
defaultOpenIndex: {
|
|
52
|
-
type: [Number, String],
|
|
53
|
-
default: 0
|
|
54
|
-
},
|
|
55
|
-
contentClass: {
|
|
56
|
-
type: String,
|
|
57
|
-
default: ""
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
setup(e) {
|
|
61
|
-
return (u, r) => (a(), l("div", Q, [
|
|
62
|
-
(a(!0), l(k, null, V(e.items, (v, o) => (a(), l("details", {
|
|
63
|
-
key: o,
|
|
64
|
-
open: e.defaultOpenIndex === o,
|
|
65
|
-
name: e.name
|
|
66
|
-
}, [
|
|
67
|
-
d("summary", null, [
|
|
68
|
-
c(u.$slots, "summary", {
|
|
69
|
-
item: v,
|
|
70
|
-
index: o
|
|
71
|
-
}, () => [
|
|
72
|
-
T(f(v.title) + " ", 1),
|
|
73
|
-
c(u.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
|
|
74
|
-
C(h(J), { class: "rvc-accordion-icon" })
|
|
75
|
-
])
|
|
76
|
-
])
|
|
77
|
-
]),
|
|
78
|
-
d("div", {
|
|
79
|
-
class: y(["rvc-accordion-content", e.contentClass])
|
|
80
|
-
}, [
|
|
81
|
-
c(u.$slots, "content", { item: v }, () => [
|
|
82
|
-
d("div", {
|
|
83
|
-
innerHTML: v.content
|
|
84
|
-
}, null, 8, X)
|
|
85
|
-
])
|
|
86
|
-
], 2)
|
|
87
|
-
], 8, W))), 128))
|
|
88
|
-
]));
|
|
89
|
-
}
|
|
90
|
-
}, Y = { class: "rvc-alert-title" }, je = {
|
|
91
|
-
__name: "Alert",
|
|
92
|
-
props: {
|
|
93
|
-
as: {
|
|
94
|
-
type: String,
|
|
95
|
-
default: "div"
|
|
96
|
-
},
|
|
97
|
-
title: {
|
|
98
|
-
type: String,
|
|
99
|
-
default: ""
|
|
100
|
-
},
|
|
101
|
-
icon: {
|
|
102
|
-
type: [Object, Function],
|
|
103
|
-
default: null
|
|
104
|
-
},
|
|
105
|
-
type: {
|
|
106
|
-
type: String,
|
|
107
|
-
default: "info",
|
|
108
|
-
validator: (e) => ["success", "warning", "danger", "info"].includes(e)
|
|
109
|
-
},
|
|
110
|
-
close: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: !1
|
|
113
|
-
}
|
|
114
|
-
},
|
|
115
|
-
emits: ["alert:close"],
|
|
116
|
-
setup(e) {
|
|
117
|
-
return (u, r) => (a(), w(x(e.as), {
|
|
118
|
-
class: y(["rvc-alert", `rvc-alert-${e.type}`])
|
|
119
|
-
}, {
|
|
120
|
-
default: O(() => [
|
|
121
|
-
c(u.$slots, "icon", {}, () => [
|
|
122
|
-
e.icon ? (a(), w(x(e.icon), {
|
|
123
|
-
key: 0,
|
|
124
|
-
class: "rvc-alert-icon"
|
|
125
|
-
})) : $("", !0)
|
|
126
|
-
]),
|
|
127
|
-
d("div", null, [
|
|
128
|
-
c(u.$slots, "title", {}, () => [
|
|
129
|
-
d("span", Y, f(e.title), 1)
|
|
130
|
-
]),
|
|
131
|
-
c(u.$slots, "default")
|
|
132
|
-
]),
|
|
133
|
-
c(u.$slots, "close", {}, () => [
|
|
134
|
-
e.close ? (a(), l("button", {
|
|
135
|
-
key: 0,
|
|
136
|
-
type: "button",
|
|
137
|
-
class: "rvc-alert-close",
|
|
138
|
-
onClick: r[0] || (r[0] = (v) => u.$emit("alert:close"))
|
|
139
|
-
}, [
|
|
140
|
-
C(h(U))
|
|
141
|
-
])) : $("", !0)
|
|
142
|
-
])
|
|
143
|
-
]),
|
|
144
|
-
_: 3
|
|
145
|
-
}, 8, ["class"]));
|
|
146
|
-
}
|
|
147
|
-
}, _ = { class: "rvc-checkbox-input" }, ee = {
|
|
148
|
-
key: 0,
|
|
149
|
-
class: "rvc-checkbox-label"
|
|
150
|
-
}, Ie = /* @__PURE__ */ Object.assign({
|
|
151
|
-
inheritAttrs: !1
|
|
152
|
-
}, {
|
|
153
|
-
__name: "Checkbox",
|
|
154
|
-
props: {
|
|
155
|
-
modelValue: {
|
|
156
|
-
type: [Boolean, String, Array, Object, Number],
|
|
157
|
-
default: null
|
|
158
|
-
},
|
|
159
|
-
label: {
|
|
160
|
-
type: String,
|
|
161
|
-
default: ""
|
|
162
|
-
},
|
|
163
|
-
rootClass: {
|
|
164
|
-
type: String,
|
|
165
|
-
default: ""
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
emits: ["update:modelValue"],
|
|
169
|
-
setup(e, { emit: u }) {
|
|
170
|
-
const r = e, v = u, o = B({
|
|
171
|
-
get: () => r.modelValue,
|
|
172
|
-
set: (t) => v("update:modelValue", t)
|
|
173
|
-
}), { hasModelBinding: g } = j(), m = N(), s = B(() => ({
|
|
174
|
-
...m,
|
|
175
|
-
type: "checkbox"
|
|
176
|
-
})), n = A(null);
|
|
177
|
-
return (t, i) => (a(), l("label", {
|
|
178
|
-
class: y(["rvc-checkbox", e.rootClass])
|
|
179
|
-
}, [
|
|
180
|
-
h(g) ? M((a(), l("input", p({ key: 0 }, s.value, {
|
|
181
|
-
ref_key: "input",
|
|
182
|
-
ref: n,
|
|
183
|
-
"onUpdate:modelValue": i[0] || (i[0] = (b) => o.value = b)
|
|
184
|
-
}), null, 16)), [
|
|
185
|
-
[q, o.value]
|
|
186
|
-
]) : (a(), l("input", p({ key: 1 }, s.value, {
|
|
187
|
-
ref_key: "input",
|
|
188
|
-
ref: n
|
|
189
|
-
}), null, 16)),
|
|
190
|
-
c(t.$slots, "input", {}, () => [
|
|
191
|
-
d("span", _, [
|
|
192
|
-
c(t.$slots, "icon", {}, () => [
|
|
193
|
-
C(h(G))
|
|
194
|
-
])
|
|
195
|
-
])
|
|
196
|
-
]),
|
|
197
|
-
c(t.$slots, "default", { label: e.label }, () => [
|
|
198
|
-
e.label ? (a(), l("span", ee, f(e.label), 1)) : $("", !0)
|
|
199
|
-
])
|
|
200
|
-
], 2));
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
function te(e, u) {
|
|
204
|
-
return a(), l("svg", {
|
|
205
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
206
|
-
viewBox: "0 0 16 16",
|
|
207
|
-
fill: "currentColor",
|
|
208
|
-
"aria-hidden": "true",
|
|
209
|
-
"data-slot": "icon"
|
|
210
|
-
}, [
|
|
211
|
-
d("path", {
|
|
212
|
-
"fill-rule": "evenodd",
|
|
213
|
-
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",
|
|
214
|
-
"clip-rule": "evenodd"
|
|
215
|
-
})
|
|
216
|
-
]);
|
|
217
|
-
}
|
|
218
|
-
function ae(e, u) {
|
|
219
|
-
return a(), l("svg", {
|
|
220
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
221
|
-
viewBox: "0 0 20 20",
|
|
222
|
-
fill: "currentColor",
|
|
223
|
-
"aria-hidden": "true",
|
|
224
|
-
"data-slot": "icon"
|
|
225
|
-
}, [
|
|
226
|
-
d("path", {
|
|
227
|
-
"fill-rule": "evenodd",
|
|
228
|
-
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",
|
|
229
|
-
"clip-rule": "evenodd"
|
|
230
|
-
})
|
|
231
|
-
]);
|
|
232
|
-
}
|
|
233
|
-
function ne(e, u) {
|
|
234
|
-
return a(), l("svg", {
|
|
235
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
236
|
-
viewBox: "0 0 20 20",
|
|
237
|
-
fill: "currentColor",
|
|
238
|
-
"aria-hidden": "true",
|
|
239
|
-
"data-slot": "icon"
|
|
240
|
-
}, [
|
|
241
|
-
d("path", {
|
|
242
|
-
"fill-rule": "evenodd",
|
|
243
|
-
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",
|
|
244
|
-
"clip-rule": "evenodd"
|
|
245
|
-
})
|
|
246
|
-
]);
|
|
247
|
-
}
|
|
248
|
-
const le = ["value"], se = ["value"], H = /* @__PURE__ */ Object.assign({
|
|
249
|
-
inheritAttrs: !1
|
|
250
|
-
}, {
|
|
251
|
-
__name: "FormSelect",
|
|
252
|
-
props: {
|
|
253
|
-
modelValue: {
|
|
254
|
-
type: [String, Number, Object, Boolean],
|
|
255
|
-
default: null
|
|
256
|
-
},
|
|
257
|
-
rootClass: {
|
|
258
|
-
type: String,
|
|
259
|
-
default: ""
|
|
260
|
-
},
|
|
261
|
-
prefixIcon: {
|
|
262
|
-
type: [Object, Function],
|
|
263
|
-
default: null
|
|
264
|
-
},
|
|
265
|
-
icon: {
|
|
266
|
-
type: [Object, Function],
|
|
267
|
-
default: null
|
|
268
|
-
},
|
|
269
|
-
size: {
|
|
270
|
-
type: String,
|
|
271
|
-
default: "base",
|
|
272
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
273
|
-
},
|
|
274
|
-
options: {
|
|
275
|
-
type: Array,
|
|
276
|
-
default: () => []
|
|
277
|
-
},
|
|
278
|
-
optionLabel: {
|
|
279
|
-
type: String,
|
|
280
|
-
default: "name"
|
|
281
|
-
},
|
|
282
|
-
optionValue: {
|
|
283
|
-
type: String,
|
|
284
|
-
default: "id"
|
|
285
|
-
}
|
|
286
|
-
},
|
|
287
|
-
emits: ["update:modelValue"],
|
|
288
|
-
setup(e, { emit: u }) {
|
|
289
|
-
const r = e, v = u, o = B({
|
|
290
|
-
get: () => r.modelValue,
|
|
291
|
-
set: (s) => v("update:modelValue", s)
|
|
292
|
-
}), { hasModelBinding: g } = j(), m = A(null);
|
|
293
|
-
return (s, n) => (a(), l("div", {
|
|
294
|
-
class: y([
|
|
295
|
-
"rvc-select",
|
|
296
|
-
`rvc-select-${e.size}`,
|
|
297
|
-
e.rootClass
|
|
298
|
-
])
|
|
299
|
-
}, [
|
|
300
|
-
e.prefixIcon ? c(s.$slots, "prefixIcon", {
|
|
301
|
-
key: 0,
|
|
302
|
-
icon: e.prefixIcon
|
|
303
|
-
}, () => [
|
|
304
|
-
(a(), w(x(e.prefixIcon), { "aria-hidden": "true" }))
|
|
305
|
-
]) : $("", !0),
|
|
306
|
-
c(s.$slots, "select", D(z(s.$attrs)), () => [
|
|
307
|
-
h(g) ? M((a(), l("select", p({ key: 0 }, s.$attrs, {
|
|
308
|
-
ref_key: "select",
|
|
309
|
-
ref: m,
|
|
310
|
-
"onUpdate:modelValue": n[0] || (n[0] = (t) => o.value = t)
|
|
311
|
-
}), [
|
|
312
|
-
c(s.$slots, "default", {}, () => [
|
|
313
|
-
e.options.length > 0 ? (a(!0), l(k, { key: 0 }, V(e.options, (t, i) => (a(), l("option", {
|
|
314
|
-
key: `option-${i}-${t[e.optionValue]}`,
|
|
315
|
-
value: t[e.optionValue]
|
|
316
|
-
}, f(t[e.optionLabel]), 9, le))), 128)) : $("", !0)
|
|
317
|
-
])
|
|
318
|
-
], 16)), [
|
|
319
|
-
[E, o.value]
|
|
320
|
-
]) : (a(), l("select", p({ key: 1 }, s.$attrs, {
|
|
321
|
-
ref_key: "select",
|
|
322
|
-
ref: m
|
|
323
|
-
}), [
|
|
324
|
-
c(s.$slots, "default", {}, () => [
|
|
325
|
-
e.options.length > 0 ? (a(!0), l(k, { key: 0 }, V(e.options, (t, i) => (a(), l("option", {
|
|
326
|
-
key: `option-${i}-${t[e.optionValue]}`,
|
|
327
|
-
value: t[e.optionValue]
|
|
328
|
-
}, f(t[e.optionLabel]), 9, se))), 128)) : $("", !0)
|
|
329
|
-
])
|
|
330
|
-
], 16))
|
|
331
|
-
]),
|
|
332
|
-
c(s.$slots, "icon", { icon: e.icon }, () => [
|
|
333
|
-
(a(), w(x(e.icon ?? h(Z)), { "aria-hidden": "true" }))
|
|
334
|
-
])
|
|
335
|
-
], 2));
|
|
336
|
-
}
|
|
337
|
-
}), oe = {
|
|
338
|
-
key: 0,
|
|
339
|
-
class: "rvc-pagination"
|
|
340
|
-
}, ie = ["value"], re = { class: "rvc-pagination-info" }, ue = { class: "rvc-pagination-nav-list" }, ce = ["disabled", "onClick"], de = { key: 2 }, ve = { key: 3 }, ge = {
|
|
341
|
-
__name: "Pagination",
|
|
342
|
-
props: {
|
|
343
|
-
pagination: {
|
|
344
|
-
type: Object,
|
|
345
|
-
required: !0
|
|
346
|
-
},
|
|
347
|
-
perPage: {
|
|
348
|
-
type: Number,
|
|
349
|
-
default: 10
|
|
350
|
-
},
|
|
351
|
-
perPageLabel: {
|
|
352
|
-
type: String,
|
|
353
|
-
default: "per page"
|
|
354
|
-
},
|
|
355
|
-
perPageOptions: {
|
|
356
|
-
type: Array,
|
|
357
|
-
default: () => [10, 20, 50]
|
|
358
|
-
},
|
|
359
|
-
fromLabel: {
|
|
360
|
-
type: String,
|
|
361
|
-
default: "of"
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
emits: ["pagination:change", "pagination:perPage"],
|
|
365
|
-
setup(e, { emit: u }) {
|
|
366
|
-
const r = e, v = u, o = A(r.perPage);
|
|
367
|
-
return (g, m) => {
|
|
368
|
-
var s;
|
|
369
|
-
return (s = e.pagination) != null && s.total ? (a(), l("div", oe, [
|
|
370
|
-
c(g.$slots, "perPage", p(e.pagination, { perPage: o.value }), () => [
|
|
371
|
-
C(H, {
|
|
372
|
-
modelValue: o.value,
|
|
373
|
-
"onUpdate:modelValue": [
|
|
374
|
-
m[0] || (m[0] = (n) => o.value = n),
|
|
375
|
-
m[1] || (m[1] = (n) => v("pagination:perPage", n))
|
|
376
|
-
],
|
|
377
|
-
size: "sm",
|
|
378
|
-
"root-class": "rvc-pagination-per-page"
|
|
379
|
-
}, {
|
|
380
|
-
default: O(() => [
|
|
381
|
-
(a(!0), l(k, null, V(e.perPageOptions, (n) => (a(), l("option", {
|
|
382
|
-
key: `pagination-items-per-page-option-${n}`,
|
|
383
|
-
value: n
|
|
384
|
-
}, f(n) + " " + f(e.perPageLabel), 9, ie))), 128))
|
|
385
|
-
]),
|
|
386
|
-
_: 1
|
|
387
|
-
}, 8, ["modelValue"])
|
|
388
|
-
]),
|
|
389
|
-
c(g.$slots, "info", p(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
390
|
-
d("div", re, f(e.pagination.from) + " - " + f(e.pagination.to) + " " + f(e.fromLabel) + " " + f(e.pagination.total), 1)
|
|
391
|
-
]),
|
|
392
|
-
d("nav", null, [
|
|
393
|
-
d("ol", ue, [
|
|
394
|
-
(a(!0), l(k, null, V(e.pagination.links, (n, t) => (a(), l("li", {
|
|
395
|
-
key: `pagination-link-${n.label}-${t}`,
|
|
396
|
-
class: "rvc-pagination-nav-list-item"
|
|
397
|
-
}, [
|
|
398
|
-
d("button", {
|
|
399
|
-
type: "button",
|
|
400
|
-
disabled: n.label === "..." || !n.url,
|
|
401
|
-
class: y([
|
|
402
|
-
"rvc-pagination-button",
|
|
403
|
-
{ "rvc-pagination-button-active": n.active }
|
|
404
|
-
]),
|
|
405
|
-
onClick: (i) => n.url && v("pagination:change", n.url)
|
|
406
|
-
}, [
|
|
407
|
-
n.url !== "..." && t === 0 ? (a(), w(h(ae), {
|
|
408
|
-
key: 0,
|
|
409
|
-
"aria-hidden": "true",
|
|
410
|
-
class: y([
|
|
411
|
-
"rvc-pagination-button-icon",
|
|
412
|
-
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
413
|
-
])
|
|
414
|
-
}, null, 8, ["class"])) : n.label !== "..." && t === e.pagination.links.length - 1 ? (a(), w(h(ne), {
|
|
415
|
-
key: 1,
|
|
416
|
-
"aria-hidden": "true",
|
|
417
|
-
class: y([
|
|
418
|
-
"rvc-pagination-button-icon",
|
|
419
|
-
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
420
|
-
])
|
|
421
|
-
}, null, 8, ["class"])) : n.label === "..." ? (a(), l("span", de, " ... ")) : (a(), l("span", ve, f(n.label), 1))
|
|
422
|
-
], 10, ce)
|
|
423
|
-
]))), 128))
|
|
424
|
-
])
|
|
425
|
-
])
|
|
426
|
-
])) : $("", !0);
|
|
427
|
-
};
|
|
428
|
-
}
|
|
429
|
-
}, fe = { key: 0 }, me = ["aria-label", "onClick"], be = ["innerHTML"], ye = { key: 1 }, pe = ["colspan"], $e = { key: 2 }, he = ["colspan"], ke = { class: "rvc-table-spinner-wrapper" }, Se = { key: 1 }, Fe = {
|
|
430
|
-
__name: "DataTable",
|
|
431
|
-
props: {
|
|
432
|
-
headers: {
|
|
433
|
-
type: Array,
|
|
434
|
-
default: () => [],
|
|
435
|
-
validator: (e) => e.every((r) => {
|
|
436
|
-
const v = !r.align || ["left", "center", "right"].includes(r.align), g = !(r.sortable === !0) || typeof r.key == "string" && r.key.length > 0;
|
|
437
|
-
return g || console.warn("[DataTable] Header item with sortable=true is missing required 'key' property:", r), !v && r.align && console.warn("[DataTable] Header item has invalid 'align' value. Must be 'left', 'center' or 'right':", r), v && g;
|
|
438
|
-
})
|
|
439
|
-
},
|
|
440
|
-
items: {
|
|
441
|
-
type: Array,
|
|
442
|
-
required: !0
|
|
443
|
-
},
|
|
444
|
-
noResultsText: {
|
|
445
|
-
type: String,
|
|
446
|
-
default: "No results found."
|
|
447
|
-
},
|
|
448
|
-
loadingText: {
|
|
449
|
-
type: String,
|
|
450
|
-
default: "Loading content..."
|
|
451
|
-
},
|
|
452
|
-
striped: {
|
|
453
|
-
type: Boolean
|
|
454
|
-
},
|
|
455
|
-
spinning: {
|
|
456
|
-
type: Boolean
|
|
457
|
-
},
|
|
458
|
-
pagination: {
|
|
459
|
-
type: Object,
|
|
460
|
-
default: null
|
|
461
|
-
},
|
|
462
|
-
wrapperClass: {
|
|
463
|
-
type: String,
|
|
464
|
-
default: ""
|
|
465
|
-
},
|
|
466
|
-
defaultSort: {
|
|
467
|
-
type: Object,
|
|
468
|
-
default: null,
|
|
469
|
-
validator: (e) => e === null ? !0 : typeof e != "object" || !e.key || !["asc", "desc"].includes(e.direction) ? (console.warn("[DataTable] Invalid defaultSort prop. Must be an object with key and direction properties."), !1) : !0
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
473
|
-
setup(e, { emit: u }) {
|
|
474
|
-
const r = e, v = u, o = A(r.defaultSort), g = (s) => r.headers.find((n) => n.key === s), m = (s) => {
|
|
475
|
-
!o.value || o.value.key !== s.key ? o.value = {
|
|
476
|
-
key: s.key,
|
|
477
|
-
direction: "asc"
|
|
478
|
-
} : o.value.direction === "asc" ? o.value = {
|
|
479
|
-
key: s.key,
|
|
480
|
-
direction: "desc"
|
|
481
|
-
} : o.value = null, v("table:sortBy", o.value);
|
|
482
|
-
};
|
|
483
|
-
return (s, n) => (a(), l("div", null, [
|
|
484
|
-
d("div", {
|
|
485
|
-
class: y(["rvc-table-wrapper", e.wrapperClass])
|
|
486
|
-
}, [
|
|
487
|
-
d("table", {
|
|
488
|
-
class: y([{ "rvc-table-striped": e.striped }, "rvc-table"])
|
|
489
|
-
}, [
|
|
490
|
-
e.headers.length ? (a(), l("thead", fe, [
|
|
491
|
-
c(s.$slots, "headers", { headers: e.headers }, () => [
|
|
492
|
-
d("tr", null, [
|
|
493
|
-
(a(!0), l(k, null, V(e.headers, (t, i) => c(s.$slots, "header", {
|
|
494
|
-
header: t,
|
|
495
|
-
index: i
|
|
496
|
-
}, () => {
|
|
497
|
-
var b, S;
|
|
498
|
-
return [
|
|
499
|
-
(a(), l("th", p({ ref_for: !0 }, t, {
|
|
500
|
-
key: `rvc-table-header-${t.id}`,
|
|
501
|
-
class: {
|
|
502
|
-
"rvc-table-text-left": t.align === "left" || !t.align,
|
|
503
|
-
"rvc-table-text-center": t.align === "center",
|
|
504
|
-
"rvc-table-text-right": t.align === "right"
|
|
505
|
-
}
|
|
506
|
-
}), [
|
|
507
|
-
t.sortable && t.key ? (a(), l("button", {
|
|
508
|
-
key: 0,
|
|
509
|
-
type: "button",
|
|
510
|
-
"aria-label": `Sort on ${t.label}`,
|
|
511
|
-
class: y([
|
|
512
|
-
"rvc-table-sort-button",
|
|
513
|
-
{
|
|
514
|
-
"rvc-table-sort-button-center": t.align === "center",
|
|
515
|
-
"rvc-table-sort-button-right": t.align === "right"
|
|
516
|
-
}
|
|
517
|
-
]),
|
|
518
|
-
onClick: (L) => m(t)
|
|
519
|
-
}, [
|
|
520
|
-
c(s.$slots, "header-label", {
|
|
521
|
-
sortBy: o.value,
|
|
522
|
-
header: t
|
|
523
|
-
}, () => [
|
|
524
|
-
T(f(t.label), 1)
|
|
525
|
-
]),
|
|
526
|
-
C(h(te), {
|
|
527
|
-
class: y([
|
|
528
|
-
"rvc-table-sort-icon",
|
|
529
|
-
{
|
|
530
|
-
"rvc-table-sort-icon-visible": ((b = o.value) == null ? void 0 : b.key) === t.key,
|
|
531
|
-
"rvc-table-sort-icon-invisible": !o.value || o.value.key !== t.key,
|
|
532
|
-
"rvc-table-sort-icon-rotated": ((S = o.value) == null ? void 0 : S.key) === t.key && o.value.direction === "desc"
|
|
533
|
-
}
|
|
534
|
-
])
|
|
535
|
-
}, null, 8, ["class"])
|
|
536
|
-
], 10, me)) : c(s.$slots, "header-label", {
|
|
537
|
-
key: 1,
|
|
538
|
-
sortBy: o.value,
|
|
539
|
-
header: t
|
|
540
|
-
}, () => [
|
|
541
|
-
T(f(t.label), 1)
|
|
542
|
-
])
|
|
543
|
-
], 16))
|
|
544
|
-
];
|
|
545
|
-
})), 256))
|
|
546
|
-
])
|
|
547
|
-
])
|
|
548
|
-
])) : $("", !0),
|
|
549
|
-
d("tbody", null, [
|
|
550
|
-
e.items.length && !e.spinning ? (a(!0), l(k, { key: 0 }, V(e.items, (t, i) => c(s.$slots, "items", {
|
|
551
|
-
item: t,
|
|
552
|
-
index: i
|
|
553
|
-
}, () => [
|
|
554
|
-
(a(), l("tr", {
|
|
555
|
-
key: `rvc-table-row-${i}-${t.id}`
|
|
556
|
-
}, [
|
|
557
|
-
c(s.$slots, "item", {
|
|
558
|
-
item: t,
|
|
559
|
-
index: i
|
|
560
|
-
}, () => [
|
|
561
|
-
(a(!0), l(k, null, V(t, (b, S) => {
|
|
562
|
-
var L, P, I, F;
|
|
563
|
-
return a(), l("td", p({
|
|
564
|
-
key: `rvc-table-row-${i}-column-${S}-${t.id}`
|
|
565
|
-
}, { ref_for: !0 }, t.attrs, {
|
|
566
|
-
class: {
|
|
567
|
-
"rvc-table-text-left": ((L = g(S)) == null ? void 0 : L.align) === "left" || !((P = g(S)) != null && P.align),
|
|
568
|
-
"rvc-table-text-center": ((I = g(S)) == null ? void 0 : I.align) === "center",
|
|
569
|
-
"rvc-table-text-right": ((F = g(S)) == null ? void 0 : F.align) === "right"
|
|
570
|
-
},
|
|
571
|
-
innerHTML: b
|
|
572
|
-
}), null, 16, be);
|
|
573
|
-
}), 128))
|
|
574
|
-
])
|
|
575
|
-
]))
|
|
576
|
-
])), 256)) : !e.items.length && !e.spinning ? (a(), l("tr", ye, [
|
|
577
|
-
d("td", {
|
|
578
|
-
colspan: e.headers.length,
|
|
579
|
-
class: "rvc-table-state"
|
|
580
|
-
}, [
|
|
581
|
-
d("p", null, f(e.noResultsText), 1)
|
|
582
|
-
], 8, pe)
|
|
583
|
-
])) : (a(), l("tr", $e, [
|
|
584
|
-
d("td", {
|
|
585
|
-
colspan: e.headers.length,
|
|
586
|
-
class: "rvc-table-state"
|
|
587
|
-
}, [
|
|
588
|
-
c(s.$slots, "spinner", {
|
|
589
|
-
spinning: e.spinning,
|
|
590
|
-
label: e.loadingText
|
|
591
|
-
}, () => [
|
|
592
|
-
d("div", ke, [
|
|
593
|
-
e.spinning ? (a(), w(h(K), {
|
|
594
|
-
key: 0,
|
|
595
|
-
"aria-hidden": "true",
|
|
596
|
-
class: "rvc-table-spinner"
|
|
597
|
-
})) : $("", !0),
|
|
598
|
-
T(" " + f(e.loadingText), 1)
|
|
599
|
-
])
|
|
600
|
-
])
|
|
601
|
-
], 8, he)
|
|
602
|
-
]))
|
|
603
|
-
]),
|
|
604
|
-
s.$slots.footer ? (a(), l("tfoot", Se, [
|
|
605
|
-
c(s.$slots, "footer", {
|
|
606
|
-
headers: e.headers,
|
|
607
|
-
items: e.items
|
|
608
|
-
})
|
|
609
|
-
])) : $("", !0)
|
|
610
|
-
], 2)
|
|
611
|
-
], 2),
|
|
612
|
-
e.pagination ? c(s.$slots, "pagination", D(p({ key: 0 }, e.pagination)), () => [
|
|
613
|
-
C(ge, {
|
|
614
|
-
pagination: e.pagination,
|
|
615
|
-
"onPagination:change": n[0] || (n[0] = (t) => v("pagination:change", t)),
|
|
616
|
-
"onPagination:perPage": n[1] || (n[1] = (t) => v("pagination:perPage", t))
|
|
617
|
-
}, null, 8, ["pagination"])
|
|
618
|
-
]) : $("", !0)
|
|
619
|
-
]));
|
|
620
|
-
}
|
|
621
|
-
}, Ve = {
|
|
622
|
-
key: 1,
|
|
623
|
-
class: "rvc-empty-state-title"
|
|
624
|
-
}, Ne = {
|
|
625
|
-
__name: "EmptyState",
|
|
626
|
-
props: {
|
|
627
|
-
title: {
|
|
628
|
-
type: String,
|
|
629
|
-
required: !0,
|
|
630
|
-
default: ""
|
|
631
|
-
},
|
|
632
|
-
background: {
|
|
633
|
-
type: Boolean,
|
|
634
|
-
default: !1
|
|
635
|
-
},
|
|
636
|
-
icon: {
|
|
637
|
-
type: [Object, Function],
|
|
638
|
-
default: null
|
|
639
|
-
}
|
|
640
|
-
},
|
|
641
|
-
setup(e) {
|
|
642
|
-
return (u, r) => (a(), l("div", {
|
|
643
|
-
class: y(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
644
|
-
}, [
|
|
645
|
-
e.icon ? (a(), w(x(e.icon), {
|
|
646
|
-
key: 0,
|
|
647
|
-
class: "rvc-empty-state-icon"
|
|
648
|
-
})) : $("", !0),
|
|
649
|
-
e.title ? (a(), l("p", Ve, f(e.title), 1)) : $("", !0),
|
|
650
|
-
c(u.$slots, "default")
|
|
651
|
-
], 2));
|
|
652
|
-
}
|
|
653
|
-
}, qe = {
|
|
654
|
-
__name: "FormTextarea",
|
|
655
|
-
props: {
|
|
656
|
-
modelValue: {
|
|
657
|
-
type: String,
|
|
658
|
-
default: void 0
|
|
659
|
-
},
|
|
660
|
-
size: {
|
|
661
|
-
type: String,
|
|
662
|
-
default: "base",
|
|
663
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
664
|
-
}
|
|
665
|
-
},
|
|
666
|
-
emits: ["update:modelValue"],
|
|
667
|
-
setup(e, { emit: u }) {
|
|
668
|
-
const r = e, v = u, { hasModelBinding: o } = j(), g = A(null), m = B({
|
|
669
|
-
get: () => r.modelValue,
|
|
670
|
-
set: (n) => v("update:modelValue", n)
|
|
671
|
-
}), s = B(() => [
|
|
672
|
-
"rvc-textarea",
|
|
673
|
-
`rvc-textarea-${r.size}`
|
|
674
|
-
]);
|
|
675
|
-
return (n, t) => h(o) ? M((a(), l("textarea", {
|
|
676
|
-
key: 0,
|
|
677
|
-
ref_key: "textarea",
|
|
678
|
-
ref: g,
|
|
679
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) => m.value = i),
|
|
680
|
-
class: y(s.value)
|
|
681
|
-
}, null, 2)), [
|
|
682
|
-
[R, m.value]
|
|
683
|
-
]) : (a(), l("textarea", {
|
|
684
|
-
key: 1,
|
|
685
|
-
ref_key: "textarea",
|
|
686
|
-
ref: g,
|
|
687
|
-
class: y(s.value)
|
|
688
|
-
}, null, 2));
|
|
689
|
-
}
|
|
690
|
-
}, we = { class: "rvc-radio" }, Be = { class: "rvc-radio-label" }, De = /* @__PURE__ */ Object.assign({
|
|
691
|
-
inheritAttrs: !1
|
|
692
|
-
}, {
|
|
693
|
-
__name: "Radio",
|
|
694
|
-
props: {
|
|
695
|
-
modelValue: {
|
|
696
|
-
type: [Boolean, String, Array, Object, Number],
|
|
697
|
-
default: null
|
|
698
|
-
},
|
|
699
|
-
label: {
|
|
700
|
-
type: String,
|
|
701
|
-
default: ""
|
|
702
|
-
}
|
|
703
|
-
},
|
|
704
|
-
emits: ["update:modelValue"],
|
|
705
|
-
setup(e, { emit: u }) {
|
|
706
|
-
const r = e, v = u, o = B({
|
|
707
|
-
get: () => r.modelValue,
|
|
708
|
-
set: (t) => v("update:modelValue", t)
|
|
709
|
-
}), { hasModelBinding: g } = j(), m = N(), s = B(() => ({
|
|
710
|
-
...m,
|
|
711
|
-
type: "radio"
|
|
712
|
-
})), n = A(null);
|
|
713
|
-
return (t, i) => (a(), l("label", we, [
|
|
714
|
-
h(g) ? M((a(), l("input", p({ key: 0 }, s.value, {
|
|
715
|
-
ref_key: "input",
|
|
716
|
-
ref: n,
|
|
717
|
-
"onUpdate:modelValue": i[0] || (i[0] = (b) => o.value = b)
|
|
718
|
-
}), null, 16)), [
|
|
719
|
-
[q, o.value]
|
|
720
|
-
]) : (a(), l("input", p({ key: 1 }, s.value, {
|
|
721
|
-
ref_key: "input",
|
|
722
|
-
ref: n
|
|
723
|
-
}), null, 16)),
|
|
724
|
-
c(t.$slots, "input", {}, () => [
|
|
725
|
-
i[1] || (i[1] = d("span", { class: "rvc-radio-input" }, null, -1))
|
|
726
|
-
]),
|
|
727
|
-
c(t.$slots, "default", {}, () => [
|
|
728
|
-
d("span", Be, f(e.label), 1)
|
|
729
|
-
])
|
|
730
|
-
]));
|
|
731
|
-
}
|
|
732
|
-
}), Ce = { class: "rvc-tabs-nav" }, xe = ["value", "selected"], He = /* @__PURE__ */ Object.assign({
|
|
733
|
-
inheritAttrs: !1
|
|
734
|
-
}, {
|
|
735
|
-
__name: "Tabs",
|
|
736
|
-
props: {
|
|
737
|
-
modelValue: {
|
|
738
|
-
type: Number,
|
|
739
|
-
default: void 0
|
|
740
|
-
},
|
|
741
|
-
tabs: {
|
|
742
|
-
type: Array,
|
|
743
|
-
required: !0,
|
|
744
|
-
default: () => []
|
|
745
|
-
},
|
|
746
|
-
tabStyle: {
|
|
747
|
-
type: String,
|
|
748
|
-
default: "default",
|
|
749
|
-
validator: (e) => ["buttons", "default"].includes(e)
|
|
750
|
-
}
|
|
751
|
-
},
|
|
752
|
-
emits: ["update:modelValue", "tabs:change"],
|
|
753
|
-
setup(e, { emit: u }) {
|
|
754
|
-
const r = e, v = u, o = () => {
|
|
755
|
-
const n = r.tabs.findIndex((t) => t.active);
|
|
756
|
-
return n >= 0 ? n : 0;
|
|
757
|
-
}, g = B({
|
|
758
|
-
get: () => r.modelValue ?? o(),
|
|
759
|
-
set: (n) => {
|
|
760
|
-
const t = r.tabs[n];
|
|
761
|
-
v("update:modelValue", n), v("tabs:change", t);
|
|
762
|
-
}
|
|
763
|
-
}), m = (n) => {
|
|
764
|
-
const t = +n.target.value;
|
|
765
|
-
g.value = t;
|
|
766
|
-
const i = r.tabs[t];
|
|
767
|
-
i != null && i.selectEvent && i.selectEvent();
|
|
768
|
-
}, s = (n) => {
|
|
769
|
-
const {
|
|
770
|
-
active: t,
|
|
771
|
-
as: i,
|
|
772
|
-
bindAs: b,
|
|
773
|
-
selectEvent: S,
|
|
774
|
-
name: L,
|
|
775
|
-
...P
|
|
776
|
-
} = n;
|
|
777
|
-
return P;
|
|
778
|
-
};
|
|
779
|
-
return (n, t) => (a(), l(k, null, [
|
|
780
|
-
d("div", p(n.$attrs, {
|
|
781
|
-
class: ["rvc-tabs", { "rvc-tabs-buttons": e.tabStyle === "buttons" }]
|
|
782
|
-
}), [
|
|
783
|
-
d("nav", Ce, [
|
|
784
|
-
(a(!0), l(k, null, V(e.tabs, (i, b) => (a(), w(x(i.as ? i.as : "button"), p({ ref_for: !0 }, s(i), {
|
|
785
|
-
key: `${b}-tab-item`,
|
|
786
|
-
as: i.bindAs ? i.bindAs : void 0,
|
|
787
|
-
class: ["rvc-tab", { "rvc-tab-active": g.value === b }],
|
|
788
|
-
onClick: (S) => g.value = b
|
|
789
|
-
}), {
|
|
790
|
-
default: O(() => [
|
|
791
|
-
T(f(i.name), 1)
|
|
792
|
-
]),
|
|
793
|
-
_: 2
|
|
794
|
-
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
795
|
-
])
|
|
796
|
-
], 16),
|
|
797
|
-
C(H, p(n.$attrs, {
|
|
798
|
-
"root-class": "rvc-tabs-select",
|
|
799
|
-
value: g.value,
|
|
800
|
-
onChange: m
|
|
801
|
-
}), {
|
|
802
|
-
default: O(() => [
|
|
803
|
-
(a(!0), l(k, null, V(e.tabs, (i, b) => (a(), l("option", {
|
|
804
|
-
key: `${b}-tab-item-select-option`,
|
|
805
|
-
value: b,
|
|
806
|
-
selected: g.value === b
|
|
807
|
-
}, f(i.name), 9, xe))), 128))
|
|
808
|
-
]),
|
|
809
|
-
_: 1
|
|
810
|
-
}, 16, ["value"])
|
|
811
|
-
], 64));
|
|
812
|
-
}
|
|
813
|
-
});
|
|
1
|
+
import { _ as e, a as s, b as t, c as r, d as m, e as p, f as x, g as c, h as f, i } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-BgOTdYXd.js";
|
|
2
|
+
import { _ as b } from "../_shared/ChevronDownIcon-DaaXfD3C.js";
|
|
3
|
+
import { _ } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-DeflHqux.js";
|
|
4
|
+
import { _ as l } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-BhJpG-Fw.js";
|
|
814
5
|
export {
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
6
|
+
e as Accordion,
|
|
7
|
+
s as Alert,
|
|
8
|
+
b as Badge,
|
|
9
|
+
_ as ButtonBase,
|
|
10
|
+
t as Checkbox,
|
|
11
|
+
r as DataTable,
|
|
12
|
+
m as EmptyState,
|
|
13
|
+
l as FormInput,
|
|
14
|
+
p as FormSelect,
|
|
15
|
+
x as FormTextarea,
|
|
16
|
+
c as Pagination,
|
|
17
|
+
f as Radio,
|
|
18
|
+
i as Tabs
|
|
828
19
|
};
|