@robuust-digital/vue-components 2.3.3 → 2.3.4
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 +7 -0
- package/README.md +15 -0
- package/dist/_shared/{ButtonBase.vue_vue_type_script_setup_true_lang-BLm8QzEC.js → ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js} +2 -2
- package/dist/_shared/{ChevronDownIcon-CcE_K1lg.js → ChevronDownIcon-BYWciGnh.js} +1 -1
- package/dist/_shared/{Combobox.vue_vue_type_script_setup_true_lang-CxRv55TC.js → Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js} +3 -3
- package/dist/_shared/{Drawer.vue_vue_type_script_setup_true_lang-XMND_Yzl.js → Drawer.vue_vue_type_script_setup_true_lang-CZMVooMV.js} +4 -4
- package/dist/_shared/{Dropdown.vue_vue_type_script_setup_true_lang-BtkiBqxy.js → Dropdown.vue_vue_type_script_setup_true_lang-L_lQEUBC.js} +2 -2
- package/dist/_shared/{FormInput.vue_vue_type_script_setup_true_lang-C_1WSzbH.js → FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js} +9 -9
- package/dist/_shared/{Lightswitch.vue_vue_type_script_setup_true_lang-DX23lEFd.js → Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js} +7 -7
- package/dist/_shared/{Modal.vue_vue_type_script_setup_true_lang-2AljJgxw.js → Modal.vue_vue_type_script_setup_true_lang-CB0Gez7v.js} +5 -5
- package/dist/_shared/{RichTextEditor.vue_vue_type_script_setup_true_lang-BLs_S_-D.js → RichTextEditor.vue_vue_type_script_setup_true_lang-DaCv0Gii.js} +11 -11
- package/dist/_shared/{Tabs.vue_vue_type_script_setup_true_lang-DMUJ5Emt.js → Tabs.vue_vue_type_script_setup_true_lang-DdRAwz_B.js} +220 -212
- package/dist/_shared/{Toast.vue_vue_type_script_setup_true_lang-BfMkJm5T.js → Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js} +2 -2
- package/dist/_shared/{Tooltip.vue_vue_type_script_setup_true_lang-CKp1wzE2.js → Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js} +3 -3
- package/dist/_shared/{XMarkIcon-90mcPzBs.js → XMarkIcon-CPr_Rd8y.js} +2 -2
- package/dist/_shared/{icon-spinner-CP0VP_YM.js → icon-spinner-BYCMrTdL.js} +2 -2
- package/dist/combobox/index.js +1 -1
- package/dist/core/index.js +4 -4
- package/dist/core.d.ts +8 -0
- package/dist/dialogs/index.js +2 -2
- package/dist/dropdown/index.js +1 -1
- package/dist/index/index.js +12 -12
- package/dist/index.d.ts +8 -0
- package/dist/lightswitch/index.js +1 -1
- package/dist/rich-text-editor/index.js +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/package.json +8 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as R } from "./XMarkIcon-
|
|
3
|
-
import { u as
|
|
4
|
-
import { S as U } from "./icon-spinner-
|
|
5
|
-
import { r as Z } from "./ChevronDownIcon-
|
|
1
|
+
import { openBlock as a, createElementBlock as n, createElementVNode as u, defineComponent as w, Fragment as k, renderList as V, renderSlot as c, createTextVNode as x, toDisplayString as f, createVNode as L, unref as h, normalizeClass as p, createBlock as C, resolveDynamicComponent as S, withCtx as T, createCommentVNode as $, computed as B, useAttrs as I, ref as M, withDirectives as A, mergeProps as y, vModelDynamic as N, normalizeProps as F, guardReactiveProps as E, vModelSelect as H, vModelText as D } from "vue";
|
|
2
|
+
import { r as R } from "./XMarkIcon-CPr_Rd8y.js";
|
|
3
|
+
import { u as O } from "./FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
|
|
4
|
+
import { S as U } from "./icon-spinner-BYCMrTdL.js";
|
|
5
|
+
import { r as Z } from "./ChevronDownIcon-BYWciGnh.js";
|
|
6
6
|
function K(e, r) {
|
|
7
|
-
return
|
|
7
|
+
return a(), n("svg", {
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
10
|
fill: "currentColor",
|
|
@@ -19,7 +19,7 @@ function K(e, r) {
|
|
|
19
19
|
]);
|
|
20
20
|
}
|
|
21
21
|
function q(e, r) {
|
|
22
|
-
return
|
|
22
|
+
return a(), n("svg", {
|
|
23
23
|
xmlns: "http://www.w3.org/2000/svg",
|
|
24
24
|
viewBox: "0 0 24 24",
|
|
25
25
|
fill: "currentColor",
|
|
@@ -42,39 +42,39 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], A
|
|
|
42
42
|
contentClass: {}
|
|
43
43
|
},
|
|
44
44
|
setup(e) {
|
|
45
|
-
return (r,
|
|
46
|
-
(
|
|
47
|
-
key:
|
|
48
|
-
open: e.defaultOpenIndex ===
|
|
45
|
+
return (r, v) => (a(), n("div", G, [
|
|
46
|
+
(a(!0), n(k, null, V(e.items, (g, o) => (a(), n("details", {
|
|
47
|
+
key: o,
|
|
48
|
+
open: e.defaultOpenIndex === o,
|
|
49
49
|
name: e.name
|
|
50
50
|
}, [
|
|
51
51
|
u("summary", null, [
|
|
52
52
|
c(r.$slots, "summary", {
|
|
53
|
-
item:
|
|
54
|
-
index:
|
|
53
|
+
item: g,
|
|
54
|
+
index: o
|
|
55
55
|
}, () => [
|
|
56
|
-
|
|
56
|
+
x(f(g.title) + " ", 1),
|
|
57
57
|
c(r.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
|
|
58
58
|
L(h(q), { class: "rvc-accordion-icon" })
|
|
59
59
|
])
|
|
60
60
|
])
|
|
61
61
|
]),
|
|
62
62
|
u("div", {
|
|
63
|
-
class:
|
|
63
|
+
class: p(["rvc-accordion-content", e.contentClass])
|
|
64
64
|
}, [
|
|
65
65
|
c(r.$slots, "content", {
|
|
66
|
-
item:
|
|
67
|
-
index:
|
|
66
|
+
item: g,
|
|
67
|
+
index: o
|
|
68
68
|
}, () => [
|
|
69
69
|
u("div", {
|
|
70
|
-
innerHTML:
|
|
70
|
+
innerHTML: g.content
|
|
71
71
|
}, null, 8, Q)
|
|
72
72
|
])
|
|
73
73
|
], 2)
|
|
74
74
|
], 8, J))), 128))
|
|
75
75
|
]));
|
|
76
76
|
}
|
|
77
|
-
}), W = { class: "rvc-alert-title" },
|
|
77
|
+
}), W = { class: "rvc-alert-title" }, Oe = /* @__PURE__ */ w({
|
|
78
78
|
__name: "Alert",
|
|
79
79
|
props: {
|
|
80
80
|
as: { default: "div" },
|
|
@@ -85,28 +85,28 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], A
|
|
|
85
85
|
},
|
|
86
86
|
emits: ["alert:close"],
|
|
87
87
|
setup(e) {
|
|
88
|
-
return (r,
|
|
89
|
-
class:
|
|
88
|
+
return (r, v) => (a(), C(S(e.as), {
|
|
89
|
+
class: p(["rvc-alert", `rvc-alert-${e.type}`])
|
|
90
90
|
}, {
|
|
91
91
|
default: T(() => [
|
|
92
92
|
c(r.$slots, "icon", {}, () => [
|
|
93
|
-
e.icon ? (
|
|
93
|
+
e.icon ? (a(), C(S(e.icon), {
|
|
94
94
|
key: 0,
|
|
95
95
|
class: "rvc-alert-icon"
|
|
96
96
|
})) : $("", !0)
|
|
97
97
|
]),
|
|
98
98
|
u("div", null, [
|
|
99
99
|
c(r.$slots, "title", {}, () => [
|
|
100
|
-
u("span", W,
|
|
100
|
+
u("span", W, f(e.title), 1)
|
|
101
101
|
]),
|
|
102
102
|
c(r.$slots, "default")
|
|
103
103
|
]),
|
|
104
104
|
c(r.$slots, "close", {}, () => [
|
|
105
|
-
e.close ? (
|
|
105
|
+
e.close ? (a(), n("button", {
|
|
106
106
|
key: 0,
|
|
107
107
|
type: "button",
|
|
108
108
|
class: "rvc-alert-close",
|
|
109
|
-
onClick:
|
|
109
|
+
onClick: v[0] || (v[0] = (g) => r.$emit("alert:close"))
|
|
110
110
|
}, [
|
|
111
111
|
L(h(R))
|
|
112
112
|
])) : $("", !0)
|
|
@@ -118,7 +118,7 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], A
|
|
|
118
118
|
}), X = { class: "rvc-checkbox-input" }, Y = {
|
|
119
119
|
key: 0,
|
|
120
120
|
class: "rvc-checkbox-label"
|
|
121
|
-
},
|
|
121
|
+
}, Ie = /* @__PURE__ */ w({
|
|
122
122
|
inheritAttrs: !1,
|
|
123
123
|
__name: "Checkbox",
|
|
124
124
|
props: {
|
|
@@ -128,39 +128,39 @@ const G = { class: "rvc-accordion" }, J = ["open", "name"], Q = ["innerHTML"], A
|
|
|
128
128
|
},
|
|
129
129
|
emits: ["update:modelValue"],
|
|
130
130
|
setup(e, { emit: r }) {
|
|
131
|
-
const
|
|
132
|
-
get: () =>
|
|
133
|
-
set: (t) =>
|
|
134
|
-
}), { hasModelBinding:
|
|
135
|
-
...
|
|
131
|
+
const v = e, g = r, o = B({
|
|
132
|
+
get: () => v.modelValue,
|
|
133
|
+
set: (t) => g("update:modelValue", t)
|
|
134
|
+
}), { hasModelBinding: d } = O(), b = I(), l = B(() => ({
|
|
135
|
+
...b,
|
|
136
136
|
type: "checkbox"
|
|
137
|
-
})),
|
|
138
|
-
return (t, i) => (
|
|
139
|
-
class:
|
|
137
|
+
})), s = M(null);
|
|
138
|
+
return (t, i) => (a(), n("label", {
|
|
139
|
+
class: p(["rvc-checkbox", e.rootClass])
|
|
140
140
|
}, [
|
|
141
141
|
u("div", X, [
|
|
142
|
-
h(
|
|
142
|
+
h(d) ? A((a(), n("input", y({ key: 0 }, l.value, {
|
|
143
143
|
ref_key: "input",
|
|
144
|
-
ref:
|
|
145
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
144
|
+
ref: s,
|
|
145
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => o.value = m)
|
|
146
146
|
}), null, 16)), [
|
|
147
|
-
[N,
|
|
148
|
-
]) : (
|
|
147
|
+
[N, o.value]
|
|
148
|
+
]) : (a(), n("input", y({ key: 1 }, l.value, {
|
|
149
149
|
ref_key: "input",
|
|
150
|
-
ref:
|
|
150
|
+
ref: s
|
|
151
151
|
}), null, 16)),
|
|
152
152
|
c(t.$slots, "icon", {}, () => [
|
|
153
153
|
L(h(K))
|
|
154
154
|
])
|
|
155
155
|
]),
|
|
156
156
|
c(t.$slots, "default", { label: e.label }, () => [
|
|
157
|
-
e.label ? (
|
|
157
|
+
e.label ? (a(), n("span", Y, f(e.label), 1)) : $("", !0)
|
|
158
158
|
])
|
|
159
159
|
], 2));
|
|
160
160
|
}
|
|
161
161
|
});
|
|
162
162
|
function _(e, r) {
|
|
163
|
-
return
|
|
163
|
+
return a(), n("svg", {
|
|
164
164
|
xmlns: "http://www.w3.org/2000/svg",
|
|
165
165
|
viewBox: "0 0 16 16",
|
|
166
166
|
fill: "currentColor",
|
|
@@ -175,7 +175,7 @@ function _(e, r) {
|
|
|
175
175
|
]);
|
|
176
176
|
}
|
|
177
177
|
function ee(e, r) {
|
|
178
|
-
return
|
|
178
|
+
return a(), n("svg", {
|
|
179
179
|
xmlns: "http://www.w3.org/2000/svg",
|
|
180
180
|
viewBox: "0 0 20 20",
|
|
181
181
|
fill: "currentColor",
|
|
@@ -190,7 +190,7 @@ function ee(e, r) {
|
|
|
190
190
|
]);
|
|
191
191
|
}
|
|
192
192
|
function te(e, r) {
|
|
193
|
-
return
|
|
193
|
+
return a(), n("svg", {
|
|
194
194
|
xmlns: "http://www.w3.org/2000/svg",
|
|
195
195
|
viewBox: "0 0 20 20",
|
|
196
196
|
fill: "currentColor",
|
|
@@ -219,58 +219,58 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
219
219
|
},
|
|
220
220
|
emits: ["update:modelValue"],
|
|
221
221
|
setup(e, { emit: r }) {
|
|
222
|
-
const
|
|
223
|
-
get: () =>
|
|
224
|
-
set: (
|
|
225
|
-
}), { hasModelBinding:
|
|
226
|
-
return (
|
|
227
|
-
class:
|
|
222
|
+
const v = e, g = r, o = B({
|
|
223
|
+
get: () => v.modelValue,
|
|
224
|
+
set: (l) => g("update:modelValue", l)
|
|
225
|
+
}), { hasModelBinding: d } = O(), b = M(null);
|
|
226
|
+
return (l, s) => (a(), n("div", {
|
|
227
|
+
class: p([
|
|
228
228
|
"rvc-select",
|
|
229
229
|
`rvc-select-${e.size}`,
|
|
230
230
|
e.rootClass
|
|
231
231
|
])
|
|
232
232
|
}, [
|
|
233
|
-
e.prefixIcon ? c(
|
|
233
|
+
e.prefixIcon ? c(l.$slots, "prefixIcon", {
|
|
234
234
|
key: 0,
|
|
235
235
|
icon: e.prefixIcon
|
|
236
236
|
}, () => [
|
|
237
|
-
(
|
|
237
|
+
(a(), C(S(e.prefixIcon), { "aria-hidden": "true" }))
|
|
238
238
|
]) : $("", !0),
|
|
239
|
-
c(
|
|
240
|
-
h(
|
|
239
|
+
c(l.$slots, "select", F(E(l.$attrs)), () => [
|
|
240
|
+
h(d) ? A((a(), n("select", y({ key: 0 }, l.$attrs, {
|
|
241
241
|
ref_key: "select",
|
|
242
|
-
ref:
|
|
243
|
-
"onUpdate:modelValue":
|
|
242
|
+
ref: b,
|
|
243
|
+
"onUpdate:modelValue": s[0] || (s[0] = (t) => o.value = t)
|
|
244
244
|
}), [
|
|
245
|
-
c(
|
|
246
|
-
e.options.length > 0 ? (
|
|
245
|
+
c(l.$slots, "default", {}, () => [
|
|
246
|
+
e.options.length > 0 ? (a(!0), n(k, { key: 0 }, V(e.options, (t, i) => (a(), n("option", {
|
|
247
247
|
key: `option-${i}-${t[e.optionValue]}`,
|
|
248
248
|
value: t[e.optionValue]
|
|
249
|
-
},
|
|
249
|
+
}, f(t[e.optionLabel]), 9, ae))), 128)) : $("", !0)
|
|
250
250
|
])
|
|
251
251
|
], 16)), [
|
|
252
|
-
[H,
|
|
253
|
-
]) : (
|
|
252
|
+
[H, o.value]
|
|
253
|
+
]) : (a(), n("select", y({ key: 1 }, l.$attrs, {
|
|
254
254
|
ref_key: "select",
|
|
255
|
-
ref:
|
|
255
|
+
ref: b
|
|
256
256
|
}), [
|
|
257
|
-
c(
|
|
258
|
-
e.options.length > 0 ? (
|
|
257
|
+
c(l.$slots, "default", {}, () => [
|
|
258
|
+
e.options.length > 0 ? (a(!0), n(k, { key: 0 }, V(e.options, (t, i) => (a(), n("option", {
|
|
259
259
|
key: `option-${i}-${t[e.optionValue]}`,
|
|
260
260
|
value: t[e.optionValue]
|
|
261
|
-
},
|
|
261
|
+
}, f(t[e.optionLabel]), 9, le))), 128)) : $("", !0)
|
|
262
262
|
])
|
|
263
263
|
], 16))
|
|
264
264
|
]),
|
|
265
|
-
c(
|
|
266
|
-
(
|
|
265
|
+
c(l.$slots, "icon", { icon: e.icon }, () => [
|
|
266
|
+
(a(), C(S(e.icon ?? h(Z)), { "aria-hidden": "true" }))
|
|
267
267
|
])
|
|
268
268
|
], 2));
|
|
269
269
|
}
|
|
270
270
|
}), ne = {
|
|
271
271
|
key: 0,
|
|
272
272
|
class: "rvc-pagination"
|
|
273
|
-
},
|
|
273
|
+
}, oe = ["value"], se = { class: "rvc-pagination-info" }, ie = { class: "rvc-pagination-nav-list" }, re = ["disabled", "onClick"], ce = { key: 2 }, ue = { key: 3 }, de = /* @__PURE__ */ w({
|
|
274
274
|
__name: "Pagination",
|
|
275
275
|
props: {
|
|
276
276
|
pagination: {},
|
|
@@ -281,67 +281,67 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
281
281
|
},
|
|
282
282
|
emits: ["pagination:change", "pagination:perPage"],
|
|
283
283
|
setup(e, { emit: r }) {
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
const v = e, g = r, o = B({
|
|
285
|
+
get: () => v.perPage,
|
|
286
|
+
set: (d) => g("pagination:perPage", Number(d))
|
|
287
|
+
});
|
|
288
|
+
return (d, b) => e.pagination?.total ? (a(), n("div", ne, [
|
|
289
|
+
c(d.$slots, "perPage", y(e.pagination, { perPage: o.value }), () => [
|
|
287
290
|
L(j, {
|
|
288
|
-
modelValue:
|
|
289
|
-
"onUpdate:modelValue": [
|
|
290
|
-
m[0] || (m[0] = (a) => s.value = a),
|
|
291
|
-
m[1] || (m[1] = (a) => v("pagination:perPage", Number(a)))
|
|
292
|
-
],
|
|
291
|
+
modelValue: o.value,
|
|
292
|
+
"onUpdate:modelValue": b[0] || (b[0] = (l) => o.value = l),
|
|
293
293
|
size: "sm",
|
|
294
294
|
"root-class": "rvc-pagination-per-page"
|
|
295
295
|
}, {
|
|
296
296
|
default: T(() => [
|
|
297
|
-
(
|
|
298
|
-
key: `pagination-items-per-page-option-${
|
|
299
|
-
value:
|
|
300
|
-
},
|
|
297
|
+
(a(!0), n(k, null, V(e.perPageOptions, (l) => (a(), n("option", {
|
|
298
|
+
key: `pagination-items-per-page-option-${l}`,
|
|
299
|
+
value: l
|
|
300
|
+
}, f(l) + " " + f(e.perPageLabel), 9, oe))), 128))
|
|
301
301
|
]),
|
|
302
302
|
_: 1
|
|
303
303
|
}, 8, ["modelValue"])
|
|
304
304
|
]),
|
|
305
|
-
c(
|
|
306
|
-
u("div",
|
|
305
|
+
c(d.$slots, "info", y(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
306
|
+
u("div", se, f(e.pagination.from) + " - " + f(e.pagination.to) + " " + f(e.fromLabel) + " " + f(e.pagination.total), 1)
|
|
307
307
|
]),
|
|
308
308
|
u("nav", null, [
|
|
309
309
|
u("ol", ie, [
|
|
310
|
-
(
|
|
311
|
-
key: `pagination-link-${
|
|
310
|
+
(a(!0), n(k, null, V(e.pagination.links, (l, s) => (a(), n("li", {
|
|
311
|
+
key: `pagination-link-${l.label}-${s}`,
|
|
312
312
|
class: "rvc-pagination-nav-list-item"
|
|
313
313
|
}, [
|
|
314
314
|
u("button", {
|
|
315
315
|
type: "button",
|
|
316
|
-
disabled:
|
|
317
|
-
class:
|
|
316
|
+
disabled: l.label === "..." || !l.url,
|
|
317
|
+
class: p([
|
|
318
318
|
"rvc-pagination-button",
|
|
319
|
-
{ "rvc-pagination-button-active":
|
|
319
|
+
{ "rvc-pagination-button-active": l.active }
|
|
320
320
|
]),
|
|
321
|
-
onClick: (t) =>
|
|
321
|
+
onClick: (t) => l.url && g("pagination:change", l.url)
|
|
322
322
|
}, [
|
|
323
|
-
|
|
323
|
+
l.url !== "..." && s === 0 ? (a(), C(h(ee), {
|
|
324
324
|
key: 0,
|
|
325
325
|
"aria-hidden": "true",
|
|
326
|
-
class:
|
|
326
|
+
class: p([
|
|
327
327
|
"rvc-pagination-button-icon",
|
|
328
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
328
|
+
{ "rvc-pagination-button-icon-disabled": !l.url }
|
|
329
329
|
])
|
|
330
|
-
}, null, 8, ["class"])) :
|
|
330
|
+
}, null, 8, ["class"])) : l.label !== "..." && s === e.pagination.links.length - 1 ? (a(), C(h(te), {
|
|
331
331
|
key: 1,
|
|
332
332
|
"aria-hidden": "true",
|
|
333
|
-
class:
|
|
333
|
+
class: p([
|
|
334
334
|
"rvc-pagination-button-icon",
|
|
335
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
335
|
+
{ "rvc-pagination-button-icon-disabled": !l.url }
|
|
336
336
|
])
|
|
337
|
-
}, null, 8, ["class"])) :
|
|
337
|
+
}, null, 8, ["class"])) : l.label === "..." ? (a(), n("span", ce, " ... ")) : (a(), n("span", ue, f(l.label), 1))
|
|
338
338
|
], 10, re)
|
|
339
339
|
]))), 128))
|
|
340
340
|
])
|
|
341
341
|
])
|
|
342
342
|
])) : $("", !0);
|
|
343
343
|
}
|
|
344
|
-
}), ve = { key: 0 },
|
|
344
|
+
}), ve = { key: 0 }, ge = ["aria-label", "onClick"], fe = ["innerHTML"], me = { key: 1 }, be = ["colspan"], pe = { key: 2 }, ye = ["colspan"], $e = { class: "rvc-table-spinner-wrapper" }, he = { key: 1 }, Ne = /* @__PURE__ */ w({
|
|
345
345
|
__name: "DataTable",
|
|
346
346
|
props: {
|
|
347
347
|
headers: { default: () => [] },
|
|
@@ -351,35 +351,39 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
351
351
|
striped: { type: Boolean, default: !1 },
|
|
352
352
|
spinning: { type: Boolean, default: !1 },
|
|
353
353
|
pagination: { default: null },
|
|
354
|
+
perPage: { default: 10 },
|
|
355
|
+
perPageLabel: { default: "per page" },
|
|
356
|
+
perPageOptions: { default: () => [10, 20, 50] },
|
|
357
|
+
fromLabel: { default: "of" },
|
|
354
358
|
wrapperClass: { default: "" },
|
|
355
359
|
defaultSort: { default: null }
|
|
356
360
|
},
|
|
357
361
|
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
358
362
|
setup(e, { emit: r }) {
|
|
359
|
-
const
|
|
360
|
-
|
|
361
|
-
key:
|
|
363
|
+
const v = e, g = r, o = M(v.defaultSort), d = (l) => v.headers.find((s) => s.key === l), b = (l) => {
|
|
364
|
+
l.key && (!o.value || o.value.key !== l.key ? o.value = {
|
|
365
|
+
key: l.key,
|
|
362
366
|
direction: "asc"
|
|
363
|
-
} :
|
|
364
|
-
key:
|
|
367
|
+
} : o.value.direction === "asc" ? o.value = {
|
|
368
|
+
key: l.key,
|
|
365
369
|
direction: "desc"
|
|
366
|
-
} :
|
|
370
|
+
} : o.value = null, g("table:sortBy", o.value));
|
|
367
371
|
};
|
|
368
|
-
return (
|
|
372
|
+
return (l, s) => (a(), n("div", null, [
|
|
369
373
|
u("div", {
|
|
370
|
-
class:
|
|
374
|
+
class: p(["rvc-table-wrapper", e.wrapperClass])
|
|
371
375
|
}, [
|
|
372
376
|
u("table", {
|
|
373
|
-
class:
|
|
377
|
+
class: p([{ "rvc-table-striped": e.striped }, "rvc-table"])
|
|
374
378
|
}, [
|
|
375
|
-
e.headers.length ? (
|
|
376
|
-
c(
|
|
379
|
+
e.headers.length ? (a(), n("thead", ve, [
|
|
380
|
+
c(l.$slots, "headers", { headers: e.headers }, () => [
|
|
377
381
|
u("tr", null, [
|
|
378
|
-
(
|
|
382
|
+
(a(!0), n(k, null, V(e.headers, (t, i) => c(l.$slots, "header", {
|
|
379
383
|
header: t,
|
|
380
384
|
index: i
|
|
381
385
|
}, () => [
|
|
382
|
-
(
|
|
386
|
+
(a(), n("th", y({ ref_for: !0 }, { ...t, id: String(t.id) }, {
|
|
383
387
|
key: `rvc-table-header-${t.id}`,
|
|
384
388
|
class: {
|
|
385
389
|
"rvc-table-text-left": t.align === "left" || !t.align,
|
|
@@ -387,41 +391,41 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
387
391
|
"rvc-table-text-right": t.align === "right"
|
|
388
392
|
}
|
|
389
393
|
}), [
|
|
390
|
-
t.sortable && t.key ? (
|
|
394
|
+
t.sortable && t.key ? (a(), n("button", {
|
|
391
395
|
key: 0,
|
|
392
396
|
type: "button",
|
|
393
397
|
"aria-label": `Sort on ${t.label}`,
|
|
394
|
-
class:
|
|
398
|
+
class: p([
|
|
395
399
|
"rvc-table-sort-button",
|
|
396
400
|
{
|
|
397
401
|
"rvc-table-sort-button-center": t.align === "center",
|
|
398
402
|
"rvc-table-sort-button-right": t.align === "right"
|
|
399
403
|
}
|
|
400
404
|
]),
|
|
401
|
-
onClick: (
|
|
405
|
+
onClick: (m) => b(t)
|
|
402
406
|
}, [
|
|
403
|
-
c(
|
|
404
|
-
sortBy:
|
|
407
|
+
c(l.$slots, "header-label", {
|
|
408
|
+
sortBy: o.value,
|
|
405
409
|
header: t
|
|
406
410
|
}, () => [
|
|
407
|
-
|
|
411
|
+
x(f(t.label), 1)
|
|
408
412
|
]),
|
|
409
413
|
L(h(_), {
|
|
410
|
-
class:
|
|
414
|
+
class: p([
|
|
411
415
|
"rvc-table-sort-icon",
|
|
412
416
|
{
|
|
413
|
-
"rvc-table-sort-icon-visible":
|
|
414
|
-
"rvc-table-sort-icon-invisible": !
|
|
415
|
-
"rvc-table-sort-icon-rotated":
|
|
417
|
+
"rvc-table-sort-icon-visible": o.value?.key === t.key,
|
|
418
|
+
"rvc-table-sort-icon-invisible": !o.value || o.value.key !== t.key,
|
|
419
|
+
"rvc-table-sort-icon-rotated": o.value?.key === t.key && o.value.direction === "desc"
|
|
416
420
|
}
|
|
417
421
|
])
|
|
418
422
|
}, null, 8, ["class"])
|
|
419
|
-
], 10,
|
|
423
|
+
], 10, ge)) : c(l.$slots, "header-label", {
|
|
420
424
|
key: 1,
|
|
421
|
-
sortBy:
|
|
425
|
+
sortBy: o.value,
|
|
422
426
|
header: t
|
|
423
427
|
}, () => [
|
|
424
|
-
|
|
428
|
+
x(f(t.label), 1)
|
|
425
429
|
])
|
|
426
430
|
], 16))
|
|
427
431
|
])), 256))
|
|
@@ -429,71 +433,75 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
429
433
|
])
|
|
430
434
|
])) : $("", !0),
|
|
431
435
|
u("tbody", null, [
|
|
432
|
-
e.items.length && !e.spinning ? (
|
|
436
|
+
e.items.length && !e.spinning ? (a(!0), n(k, { key: 0 }, V(e.items, (t, i) => c(l.$slots, "items", {
|
|
433
437
|
item: t,
|
|
434
438
|
index: i
|
|
435
439
|
}, () => [
|
|
436
|
-
(
|
|
440
|
+
(a(), n("tr", {
|
|
437
441
|
key: `rvc-table-row-${i}-${t.id}`
|
|
438
442
|
}, [
|
|
439
|
-
c(
|
|
443
|
+
c(l.$slots, "item", {
|
|
440
444
|
item: t,
|
|
441
445
|
index: i
|
|
442
446
|
}, () => [
|
|
443
|
-
(
|
|
444
|
-
key: `rvc-table-row-${i}-column-${
|
|
447
|
+
(a(!0), n(k, null, V(t, (m, P) => (a(), n("td", y({
|
|
448
|
+
key: `rvc-table-row-${i}-column-${P}-${t.id}`
|
|
445
449
|
}, { ref_for: !0 }, t.attrs, {
|
|
446
450
|
class: {
|
|
447
|
-
"rvc-table-text-left":
|
|
448
|
-
"rvc-table-text-center":
|
|
449
|
-
"rvc-table-text-right":
|
|
451
|
+
"rvc-table-text-left": d(String(P))?.align === "left" || !d(String(P))?.align,
|
|
452
|
+
"rvc-table-text-center": d(String(P))?.align === "center",
|
|
453
|
+
"rvc-table-text-right": d(String(P))?.align === "right"
|
|
450
454
|
},
|
|
451
|
-
innerHTML:
|
|
452
|
-
}), null, 16,
|
|
455
|
+
innerHTML: m
|
|
456
|
+
}), null, 16, fe))), 128))
|
|
453
457
|
])
|
|
454
458
|
]))
|
|
455
|
-
])), 256)) : !e.items.length && !e.spinning ? (
|
|
459
|
+
])), 256)) : !e.items.length && !e.spinning ? (a(), n("tr", me, [
|
|
456
460
|
u("td", {
|
|
457
461
|
colspan: e.headers.length,
|
|
458
462
|
class: "rvc-table-state"
|
|
459
463
|
}, [
|
|
460
|
-
u("p", null,
|
|
464
|
+
u("p", null, f(e.noResultsText), 1)
|
|
461
465
|
], 8, be)
|
|
462
|
-
])) : (
|
|
466
|
+
])) : (a(), n("tr", pe, [
|
|
463
467
|
u("td", {
|
|
464
468
|
colspan: e.headers.length,
|
|
465
469
|
class: "rvc-table-state"
|
|
466
470
|
}, [
|
|
467
|
-
c(
|
|
471
|
+
c(l.$slots, "spinner", {
|
|
468
472
|
spinning: e.spinning,
|
|
469
473
|
label: e.loadingText
|
|
470
474
|
}, () => [
|
|
471
475
|
u("div", $e, [
|
|
472
|
-
e.spinning ? (
|
|
476
|
+
e.spinning ? (a(), C(h(U), {
|
|
473
477
|
key: 0,
|
|
474
478
|
"aria-hidden": "true",
|
|
475
479
|
class: "rvc-table-spinner"
|
|
476
480
|
})) : $("", !0),
|
|
477
|
-
|
|
481
|
+
x(" " + f(e.loadingText), 1)
|
|
478
482
|
])
|
|
479
483
|
])
|
|
480
|
-
], 8,
|
|
484
|
+
], 8, ye)
|
|
481
485
|
]))
|
|
482
486
|
]),
|
|
483
|
-
|
|
484
|
-
c(
|
|
487
|
+
l.$slots.footer ? (a(), n("tfoot", he, [
|
|
488
|
+
c(l.$slots, "footer", {
|
|
485
489
|
headers: e.headers,
|
|
486
490
|
items: e.items
|
|
487
491
|
})
|
|
488
492
|
])) : $("", !0)
|
|
489
493
|
], 2)
|
|
490
494
|
], 2),
|
|
491
|
-
e.pagination ? c(
|
|
495
|
+
e.pagination ? c(l.$slots, "pagination", F(y({ key: 0 }, e.pagination)), () => [
|
|
492
496
|
L(de, {
|
|
493
497
|
pagination: e.pagination,
|
|
494
|
-
"
|
|
495
|
-
"
|
|
496
|
-
|
|
498
|
+
"per-page": e.perPage,
|
|
499
|
+
"per-page-label": e.perPageLabel,
|
|
500
|
+
"per-page-options": e.perPageOptions,
|
|
501
|
+
"from-label": e.fromLabel,
|
|
502
|
+
"onPagination:change": s[0] || (s[0] = (t) => g("pagination:change", t)),
|
|
503
|
+
"onPagination:perPage": s[1] || (s[1] = (t) => g("pagination:perPage", t))
|
|
504
|
+
}, null, 8, ["pagination", "per-page", "per-page-label", "per-page-options", "from-label"])
|
|
497
505
|
]) : $("", !0)
|
|
498
506
|
]));
|
|
499
507
|
}
|
|
@@ -508,14 +516,14 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
508
516
|
icon: { type: [Function, Object, null] }
|
|
509
517
|
},
|
|
510
518
|
setup(e) {
|
|
511
|
-
return (r,
|
|
512
|
-
class:
|
|
519
|
+
return (r, v) => (a(), n("div", {
|
|
520
|
+
class: p(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
513
521
|
}, [
|
|
514
|
-
e.icon ? (
|
|
522
|
+
e.icon ? (a(), C(S(e.icon), {
|
|
515
523
|
key: 0,
|
|
516
524
|
class: "rvc-empty-state-icon"
|
|
517
525
|
})) : $("", !0),
|
|
518
|
-
e.title ? (
|
|
526
|
+
e.title ? (a(), n("p", ke, f(e.title), 1)) : $("", !0),
|
|
519
527
|
c(r.$slots, "default")
|
|
520
528
|
], 2));
|
|
521
529
|
}
|
|
@@ -527,26 +535,26 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
527
535
|
},
|
|
528
536
|
emits: ["update:modelValue"],
|
|
529
537
|
setup(e, { emit: r }) {
|
|
530
|
-
const
|
|
531
|
-
get: () =>
|
|
532
|
-
set: (
|
|
533
|
-
}),
|
|
538
|
+
const v = e, g = r, { hasModelBinding: o } = O(), d = M(null), b = B({
|
|
539
|
+
get: () => v.modelValue,
|
|
540
|
+
set: (s) => g("update:modelValue", s)
|
|
541
|
+
}), l = B(() => [
|
|
534
542
|
"rvc-textarea",
|
|
535
|
-
`rvc-textarea-${
|
|
543
|
+
`rvc-textarea-${v.size}`
|
|
536
544
|
]);
|
|
537
|
-
return (
|
|
545
|
+
return (s, t) => h(o) ? A((a(), n("textarea", {
|
|
538
546
|
key: 0,
|
|
539
547
|
ref_key: "textarea",
|
|
540
|
-
ref:
|
|
541
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) =>
|
|
542
|
-
class:
|
|
548
|
+
ref: d,
|
|
549
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => b.value = i),
|
|
550
|
+
class: p(l.value)
|
|
543
551
|
}, null, 2)), [
|
|
544
|
-
[D,
|
|
545
|
-
]) : (
|
|
552
|
+
[D, b.value]
|
|
553
|
+
]) : (a(), n("textarea", {
|
|
546
554
|
key: 1,
|
|
547
555
|
ref_key: "textarea",
|
|
548
|
-
ref:
|
|
549
|
-
class:
|
|
556
|
+
ref: d,
|
|
557
|
+
class: p(l.value)
|
|
550
558
|
}, null, 2));
|
|
551
559
|
}
|
|
552
560
|
}), Ve = { class: "rvc-radio-input" }, we = { class: "rvc-radio-label" }, ze = /* @__PURE__ */ w({
|
|
@@ -559,30 +567,30 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
559
567
|
},
|
|
560
568
|
emits: ["update:modelValue"],
|
|
561
569
|
setup(e, { emit: r }) {
|
|
562
|
-
const
|
|
563
|
-
get: () =>
|
|
564
|
-
set: (t) =>
|
|
565
|
-
}), { hasModelBinding:
|
|
566
|
-
...
|
|
570
|
+
const v = e, g = r, o = B({
|
|
571
|
+
get: () => v.modelValue,
|
|
572
|
+
set: (t) => g("update:modelValue", t)
|
|
573
|
+
}), { hasModelBinding: d } = O(), b = I(), l = B(() => ({
|
|
574
|
+
...b,
|
|
567
575
|
type: "radio"
|
|
568
|
-
})),
|
|
569
|
-
return (t, i) => (
|
|
570
|
-
class:
|
|
576
|
+
})), s = M(null);
|
|
577
|
+
return (t, i) => (a(), n("label", {
|
|
578
|
+
class: p(["rvc-radio", e.rootClass])
|
|
571
579
|
}, [
|
|
572
580
|
u("div", Ve, [
|
|
573
|
-
h(
|
|
581
|
+
h(d) ? A((a(), n("input", y({ key: 0 }, l.value, {
|
|
574
582
|
ref_key: "input",
|
|
575
|
-
ref:
|
|
576
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
583
|
+
ref: s,
|
|
584
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => o.value = m)
|
|
577
585
|
}), null, 16)), [
|
|
578
|
-
[N,
|
|
579
|
-
]) : (
|
|
586
|
+
[N, o.value]
|
|
587
|
+
]) : (a(), n("input", y({ key: 1 }, l.value, {
|
|
580
588
|
ref_key: "input",
|
|
581
|
-
ref:
|
|
589
|
+
ref: s
|
|
582
590
|
}), null, 16))
|
|
583
591
|
]),
|
|
584
592
|
c(t.$slots, "default", {}, () => [
|
|
585
|
-
u("span", we,
|
|
593
|
+
u("span", we, f(e.label), 1)
|
|
586
594
|
])
|
|
587
595
|
], 2));
|
|
588
596
|
}
|
|
@@ -596,60 +604,60 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
596
604
|
},
|
|
597
605
|
emits: ["update:modelValue", "tabs:change"],
|
|
598
606
|
setup(e, { emit: r }) {
|
|
599
|
-
const
|
|
600
|
-
const
|
|
601
|
-
return
|
|
602
|
-
},
|
|
603
|
-
get: () =>
|
|
604
|
-
set: (
|
|
605
|
-
const t =
|
|
606
|
-
|
|
607
|
+
const v = e, g = r, o = () => {
|
|
608
|
+
const s = v.tabs.findIndex((t) => t.active);
|
|
609
|
+
return s >= 0 ? s : 0;
|
|
610
|
+
}, d = B({
|
|
611
|
+
get: () => v.modelValue ?? o(),
|
|
612
|
+
set: (s) => {
|
|
613
|
+
const t = v.tabs[s];
|
|
614
|
+
g("update:modelValue", s), t && g("tabs:change", t);
|
|
607
615
|
}
|
|
608
|
-
}),
|
|
609
|
-
const i = +
|
|
610
|
-
|
|
611
|
-
const
|
|
612
|
-
|
|
613
|
-
},
|
|
616
|
+
}), b = (s) => {
|
|
617
|
+
const i = +s.target.value;
|
|
618
|
+
d.value = i;
|
|
619
|
+
const m = v.tabs[i];
|
|
620
|
+
m?.selectEvent && m.selectEvent();
|
|
621
|
+
}, l = (s) => {
|
|
614
622
|
const {
|
|
615
623
|
active: t,
|
|
616
624
|
as: i,
|
|
617
|
-
bindAs:
|
|
618
|
-
selectEvent:
|
|
619
|
-
name:
|
|
625
|
+
bindAs: m,
|
|
626
|
+
selectEvent: P,
|
|
627
|
+
name: Pe,
|
|
620
628
|
...z
|
|
621
|
-
} =
|
|
629
|
+
} = s;
|
|
622
630
|
return z;
|
|
623
631
|
};
|
|
624
|
-
return (
|
|
625
|
-
u("div",
|
|
632
|
+
return (s, t) => (a(), n(k, null, [
|
|
633
|
+
u("div", y(s.$attrs, {
|
|
626
634
|
class: ["rvc-tabs", { "rvc-tabs-buttons": e.tabStyle === "buttons" }]
|
|
627
635
|
}), [
|
|
628
636
|
u("nav", Ce, [
|
|
629
|
-
(
|
|
630
|
-
key: `${
|
|
637
|
+
(a(!0), n(k, null, V(e.tabs, (i, m) => (a(), C(S(i.as ? i.as : "button"), y({ ref_for: !0 }, l(i), {
|
|
638
|
+
key: `${m}-tab-item`,
|
|
631
639
|
as: i.bindAs ? i.bindAs : void 0,
|
|
632
|
-
class: ["rvc-tab", { "rvc-tab-active":
|
|
633
|
-
onClick: (
|
|
640
|
+
class: ["rvc-tab", { "rvc-tab-active": d.value === m }],
|
|
641
|
+
onClick: (P) => d.value = m
|
|
634
642
|
}), {
|
|
635
643
|
default: T(() => [
|
|
636
|
-
|
|
644
|
+
x(f(i.name), 1)
|
|
637
645
|
]),
|
|
638
646
|
_: 2
|
|
639
647
|
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
640
648
|
])
|
|
641
649
|
], 16),
|
|
642
|
-
L(j,
|
|
650
|
+
L(j, y(s.$attrs, {
|
|
643
651
|
"root-class": "rvc-tabs-select",
|
|
644
|
-
value:
|
|
645
|
-
onChange:
|
|
652
|
+
value: d.value,
|
|
653
|
+
onChange: b
|
|
646
654
|
}), {
|
|
647
655
|
default: T(() => [
|
|
648
|
-
(
|
|
649
|
-
key: `${
|
|
650
|
-
value:
|
|
651
|
-
selected:
|
|
652
|
-
},
|
|
656
|
+
(a(!0), n(k, null, V(e.tabs, (i, m) => (a(), n("option", {
|
|
657
|
+
key: `${m}-tab-item-select-option`,
|
|
658
|
+
value: m,
|
|
659
|
+
selected: d.value === m
|
|
660
|
+
}, f(i.name), 9, Be))), 128))
|
|
653
661
|
]),
|
|
654
662
|
_: 1
|
|
655
663
|
}, 16, ["value"])
|
|
@@ -658,8 +666,8 @@ const ae = ["value"], le = ["value"], j = /* @__PURE__ */ w({
|
|
|
658
666
|
});
|
|
659
667
|
export {
|
|
660
668
|
Ae as _,
|
|
661
|
-
|
|
662
|
-
|
|
669
|
+
Oe as a,
|
|
670
|
+
Ie as b,
|
|
663
671
|
Ne as c,
|
|
664
672
|
Fe as d,
|
|
665
673
|
j as e,
|