@robuust-digital/vue-components 2.0.0-rc.9 → 2.0.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 +10 -1
- package/dist/_shared/FormInput-C5LjZViC.js +85 -0
- package/dist/_shared/{Modal-DdpJnce6.js → Modal-dqDGKVw5.js} +2 -1
- package/dist/core/index.js +293 -276
- package/dist/dialogs/index.js +4 -3
- package/dist/dropdown/index.js +1 -4
- package/dist/lightswitch/index.js +5 -4
- package/dist/rich-text-editor/index.js +2 -2
- package/package.json +1 -1
- package/dist/_shared/FormInput-abFMz_J4.js +0 -82
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
## 2.0.0
|
|
1
|
+
## 2.0.0 (13-06-2025)
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
|
|
5
|
+
* Added native input refs
|
|
6
|
+
|
|
7
|
+
## 2.0.0-rc.11 (26-05-2025)
|
|
2
8
|
|
|
3
9
|
### Added
|
|
4
10
|
|
|
@@ -15,6 +21,9 @@
|
|
|
15
21
|
* `Toast`: `open` prop is now `show`
|
|
16
22
|
* `DataTable`: `items` slot is renamed to `item` and added a parent `items` slot to customize the whole row
|
|
17
23
|
* `DataTable`: `headers` slot is renamed to `header` and added a parent `headers` slot to customize the whole row
|
|
24
|
+
* `Accordion`: `defaultOpenIndex` param can now accept `Number` and `String` as type
|
|
25
|
+
* `Accordion`: `active` prop is removed from the `summary` slot, as it's not needed
|
|
26
|
+
* `Accordion`: `items` prop can now also accept an `Object` as type
|
|
18
27
|
|
|
19
28
|
### Updated
|
|
20
29
|
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { computed as v, getCurrentInstance as $, useSlots as I, ref as b, createElementBlock as i, openBlock as o, normalizeClass as V, createCommentVNode as l, renderSlot as s, unref as a, createBlock as m, resolveDynamicComponent as f, normalizeProps as B, guardReactiveProps as C, withDirectives as x, mergeProps as y, vModelDynamic as O } from "vue";
|
|
2
|
+
const S = () => ({ hasModelBinding: v(() => {
|
|
3
|
+
var r;
|
|
4
|
+
const n = $();
|
|
5
|
+
return ((r = n == null ? void 0 : n.vnode) == null ? void 0 : r.props) && Object.prototype.hasOwnProperty.call(n.vnode.props, "onUpdate:modelValue");
|
|
6
|
+
}) }), j = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "rvc-input-prefix"
|
|
9
|
+
}, z = ["type"], F = ["type"], P = /* @__PURE__ */ Object.assign({
|
|
10
|
+
inheritAttrs: !1
|
|
11
|
+
}, {
|
|
12
|
+
__name: "FormInput",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: [String, Number],
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
rootClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: ""
|
|
21
|
+
},
|
|
22
|
+
prefixIcon: {
|
|
23
|
+
type: [Object, Function],
|
|
24
|
+
default: null
|
|
25
|
+
},
|
|
26
|
+
icon: {
|
|
27
|
+
type: [Object, Function],
|
|
28
|
+
default: null
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "base",
|
|
33
|
+
validator: (e) => ["sm", "base"].includes(e)
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:modelValue"],
|
|
37
|
+
setup(e, { emit: n }) {
|
|
38
|
+
const r = e, g = n, { hasModelBinding: h } = S(), u = I(), c = b(null), d = v({
|
|
39
|
+
get: () => r.modelValue,
|
|
40
|
+
set: (t) => g("update:modelValue", t)
|
|
41
|
+
});
|
|
42
|
+
return (t, p) => (o(), i("div", {
|
|
43
|
+
class: V([
|
|
44
|
+
"rvc-input",
|
|
45
|
+
`rvc-input-${e.size}`,
|
|
46
|
+
e.rootClass
|
|
47
|
+
])
|
|
48
|
+
}, [
|
|
49
|
+
a(u).prefix || a(u).prefixIcon || e.prefixIcon ? (o(), i("span", j, [
|
|
50
|
+
s(t.$slots, "prefix", {}, () => [
|
|
51
|
+
s(t.$slots, "prefixIcon", { icon: e.prefixIcon }, () => [
|
|
52
|
+
e.prefixIcon ? (o(), m(f(e.prefixIcon), {
|
|
53
|
+
key: 0,
|
|
54
|
+
"aria-hidden": "true"
|
|
55
|
+
})) : l("", !0)
|
|
56
|
+
])
|
|
57
|
+
])
|
|
58
|
+
])) : l("", !0),
|
|
59
|
+
s(t.$slots, "input", B(C(t.$attrs)), () => [
|
|
60
|
+
a(h) ? x((o(), i("input", y({ key: 0 }, t.$attrs, {
|
|
61
|
+
ref_key: "input",
|
|
62
|
+
ref: c,
|
|
63
|
+
"onUpdate:modelValue": p[0] || (p[0] = (k) => d.value = k),
|
|
64
|
+
type: t.$attrs.type || "text"
|
|
65
|
+
}), null, 16, z)), [
|
|
66
|
+
[O, d.value]
|
|
67
|
+
]) : (o(), i("input", y({ key: 1 }, t.$attrs, {
|
|
68
|
+
ref_key: "input",
|
|
69
|
+
ref: c,
|
|
70
|
+
type: t.$attrs.type || "text"
|
|
71
|
+
}), null, 16, F))
|
|
72
|
+
]),
|
|
73
|
+
s(t.$slots, "icon", { icon: e.icon }, () => [
|
|
74
|
+
e.icon ? (o(), m(f(e.icon), {
|
|
75
|
+
key: 0,
|
|
76
|
+
"aria-hidden": "true"
|
|
77
|
+
})) : l("", !0)
|
|
78
|
+
])
|
|
79
|
+
], 2));
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
export {
|
|
83
|
+
P as _,
|
|
84
|
+
S as u
|
|
85
|
+
};
|
package/dist/core/index.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { createElementBlock as l, openBlock as
|
|
1
|
+
import { createElementBlock as l, openBlock as a, createElementVNode as c, Fragment as S, renderList as V, renderSlot as g, createTextVNode as P, toDisplayString as m, createVNode as x, unref as $, normalizeClass as y, createBlock as w, resolveDynamicComponent as C, withCtx as O, createCommentVNode as h, computed as B, useAttrs as N, ref as A, withDirectives as M, mergeProps as b, vModelDynamic as q, normalizeProps as D, guardReactiveProps as z, vModelSelect as E, vModelText as R } from "vue";
|
|
2
2
|
import { r as U } from "../_shared/XMarkIcon-90mcPzBs.js";
|
|
3
3
|
import { r as Z } from "../_shared/ChevronDownIcon-z-5U4fIb.js";
|
|
4
4
|
import { _ as Ee } from "../_shared/ChevronDownIcon-z-5U4fIb.js";
|
|
5
5
|
import { _ as Ue } from "../_shared/ButtonBase-DfkwHIhN.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { _ as Ke } from "../_shared/FormInput-
|
|
6
|
+
import { u as j } from "../_shared/FormInput-C5LjZViC.js";
|
|
7
|
+
import { _ as Ke } from "../_shared/FormInput-C5LjZViC.js";
|
|
8
8
|
import { S as K } from "../_shared/icon-spinner-CmxIOqaK.js";
|
|
9
|
-
function G(e,
|
|
10
|
-
return
|
|
9
|
+
function G(e, u) {
|
|
10
|
+
return a(), l("svg", {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
viewBox: "0 0 24 24",
|
|
13
13
|
fill: "currentColor",
|
|
14
14
|
"aria-hidden": "true",
|
|
15
15
|
"data-slot": "icon"
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
c("path", {
|
|
18
18
|
"fill-rule": "evenodd",
|
|
19
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
20
|
"clip-rule": "evenodd"
|
|
21
21
|
})
|
|
22
22
|
]);
|
|
23
23
|
}
|
|
24
|
-
function J(e,
|
|
25
|
-
return
|
|
24
|
+
function J(e, u) {
|
|
25
|
+
return a(), l("svg", {
|
|
26
26
|
xmlns: "http://www.w3.org/2000/svg",
|
|
27
27
|
viewBox: "0 0 24 24",
|
|
28
28
|
fill: "currentColor",
|
|
29
29
|
"aria-hidden": "true",
|
|
30
30
|
"data-slot": "icon"
|
|
31
31
|
}, [
|
|
32
|
-
|
|
32
|
+
c("path", {
|
|
33
33
|
"fill-rule": "evenodd",
|
|
34
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
35
|
"clip-rule": "evenodd"
|
|
@@ -40,7 +40,7 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
40
40
|
__name: "Accordion",
|
|
41
41
|
props: {
|
|
42
42
|
items: {
|
|
43
|
-
type: Array,
|
|
43
|
+
type: [Array, Object],
|
|
44
44
|
required: !0,
|
|
45
45
|
default: () => []
|
|
46
46
|
},
|
|
@@ -49,7 +49,7 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
49
49
|
default: void 0
|
|
50
50
|
},
|
|
51
51
|
defaultOpenIndex: {
|
|
52
|
-
type: Number,
|
|
52
|
+
type: [Number, String],
|
|
53
53
|
default: 0
|
|
54
54
|
},
|
|
55
55
|
contentClass: {
|
|
@@ -58,30 +58,29 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
setup(e) {
|
|
61
|
-
return (
|
|
62
|
-
(
|
|
63
|
-
key:
|
|
64
|
-
open: e.defaultOpenIndex ===
|
|
61
|
+
return (u, r) => (a(), l("div", Q, [
|
|
62
|
+
(a(!0), l(S, null, V(e.items, (d, i) => (a(), l("details", {
|
|
63
|
+
key: i,
|
|
64
|
+
open: e.defaultOpenIndex === i,
|
|
65
65
|
name: e.name
|
|
66
66
|
}, [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
item:
|
|
70
|
-
index:
|
|
71
|
-
active: e.defaultOpenIndex === s
|
|
67
|
+
c("summary", null, [
|
|
68
|
+
g(u.$slots, "summary", {
|
|
69
|
+
item: d,
|
|
70
|
+
index: i
|
|
72
71
|
}, () => [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
P(m(d.title) + " ", 1),
|
|
73
|
+
g(u.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
|
|
74
|
+
x($(J), { class: "rvc-accordion-icon" })
|
|
76
75
|
])
|
|
77
76
|
])
|
|
78
77
|
]),
|
|
79
|
-
|
|
80
|
-
class:
|
|
78
|
+
c("div", {
|
|
79
|
+
class: y(["rvc-accordion-content", e.contentClass])
|
|
81
80
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
innerHTML:
|
|
81
|
+
g(u.$slots, "content", { item: d }, () => [
|
|
82
|
+
c("div", {
|
|
83
|
+
innerHTML: d.content
|
|
85
84
|
}, null, 8, X)
|
|
86
85
|
])
|
|
87
86
|
], 2)
|
|
@@ -115,37 +114,37 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
115
114
|
},
|
|
116
115
|
emits: ["alert:close"],
|
|
117
116
|
setup(e) {
|
|
118
|
-
return (
|
|
119
|
-
class:
|
|
117
|
+
return (u, r) => (a(), w(C(e.as), {
|
|
118
|
+
class: y(["rvc-alert", `rvc-alert-${e.type}`])
|
|
120
119
|
}, {
|
|
121
120
|
default: O(() => [
|
|
122
|
-
|
|
123
|
-
e.icon ? (
|
|
121
|
+
g(u.$slots, "icon", {}, () => [
|
|
122
|
+
e.icon ? (a(), w(C(e.icon), {
|
|
124
123
|
key: 0,
|
|
125
124
|
class: "rvc-alert-icon"
|
|
126
125
|
})) : h("", !0)
|
|
127
126
|
]),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
c("div", null, [
|
|
128
|
+
g(u.$slots, "title", {}, () => [
|
|
129
|
+
c("span", Y, m(e.title), 1)
|
|
131
130
|
]),
|
|
132
|
-
|
|
131
|
+
g(u.$slots, "default")
|
|
133
132
|
]),
|
|
134
|
-
|
|
135
|
-
e.close ? (
|
|
133
|
+
g(u.$slots, "close", {}, () => [
|
|
134
|
+
e.close ? (a(), l("button", {
|
|
136
135
|
key: 0,
|
|
137
136
|
type: "button",
|
|
138
137
|
class: "rvc-alert-close",
|
|
139
|
-
onClick:
|
|
138
|
+
onClick: r[0] || (r[0] = (d) => u.$emit("alert:close"))
|
|
140
139
|
}, [
|
|
141
|
-
|
|
140
|
+
x($(U))
|
|
142
141
|
])) : h("", !0)
|
|
143
142
|
])
|
|
144
143
|
]),
|
|
145
144
|
_: 3
|
|
146
145
|
}, 8, ["class"]));
|
|
147
146
|
}
|
|
148
|
-
}, _ = { class: "rvc-checkbox-input" }, ee = ["for"],
|
|
147
|
+
}, _ = { class: "rvc-checkbox-input" }, ee = ["for"], je = /* @__PURE__ */ Object.assign({
|
|
149
148
|
inheritAttrs: !1
|
|
150
149
|
}, {
|
|
151
150
|
__name: "Checkbox",
|
|
@@ -168,73 +167,78 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
168
167
|
}
|
|
169
168
|
},
|
|
170
169
|
emits: ["update:modelValue"],
|
|
171
|
-
setup(e, { emit:
|
|
172
|
-
const
|
|
173
|
-
get: () =>
|
|
174
|
-
set: (t) =>
|
|
175
|
-
}), { hasModelBinding:
|
|
176
|
-
...
|
|
177
|
-
id:
|
|
170
|
+
setup(e, { emit: u }) {
|
|
171
|
+
const r = e, d = u, i = B({
|
|
172
|
+
get: () => r.modelValue,
|
|
173
|
+
set: (t) => d("update:modelValue", t)
|
|
174
|
+
}), { hasModelBinding: v } = j(), f = N(), s = B(() => ({
|
|
175
|
+
...f,
|
|
176
|
+
id: r.id,
|
|
178
177
|
type: "checkbox"
|
|
179
|
-
}));
|
|
180
|
-
return (t,
|
|
181
|
-
class:
|
|
178
|
+
})), n = A(null);
|
|
179
|
+
return (t, o) => (a(), l("div", {
|
|
180
|
+
class: y(["rvc-checkbox", e.rootClass])
|
|
182
181
|
}, [
|
|
183
|
-
$(
|
|
184
|
-
|
|
182
|
+
$(v) ? M((a(), l("input", b({ key: 0 }, s.value, {
|
|
183
|
+
ref_key: "input",
|
|
184
|
+
ref: n,
|
|
185
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => i.value = p)
|
|
185
186
|
}), null, 16)), [
|
|
186
|
-
[q,
|
|
187
|
-
]) : (
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
[q, i.value]
|
|
188
|
+
]) : (a(), l("input", b({ key: 1 }, s.value, {
|
|
189
|
+
ref_key: "input",
|
|
190
|
+
ref: n
|
|
191
|
+
}), null, 16)),
|
|
192
|
+
c("span", _, [
|
|
193
|
+
x($(G))
|
|
190
194
|
]),
|
|
191
|
-
|
|
192
|
-
t.$slots.default || e.label ?
|
|
193
|
-
|
|
195
|
+
c("div", null, [
|
|
196
|
+
t.$slots.default || e.label ? g(t.$slots, "default", { key: 0 }, () => [
|
|
197
|
+
c("label", { for: e.id }, m(e.label), 9, ee)
|
|
194
198
|
]) : h("", !0)
|
|
195
199
|
])
|
|
196
200
|
], 2));
|
|
197
201
|
}
|
|
198
202
|
});
|
|
199
|
-
function te(e,
|
|
200
|
-
return
|
|
203
|
+
function te(e, u) {
|
|
204
|
+
return a(), l("svg", {
|
|
201
205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
202
206
|
viewBox: "0 0 16 16",
|
|
203
207
|
fill: "currentColor",
|
|
204
208
|
"aria-hidden": "true",
|
|
205
209
|
"data-slot": "icon"
|
|
206
210
|
}, [
|
|
207
|
-
|
|
211
|
+
c("path", {
|
|
208
212
|
"fill-rule": "evenodd",
|
|
209
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",
|
|
210
214
|
"clip-rule": "evenodd"
|
|
211
215
|
})
|
|
212
216
|
]);
|
|
213
217
|
}
|
|
214
|
-
function ae(e,
|
|
215
|
-
return
|
|
218
|
+
function ae(e, u) {
|
|
219
|
+
return a(), l("svg", {
|
|
216
220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
217
221
|
viewBox: "0 0 20 20",
|
|
218
222
|
fill: "currentColor",
|
|
219
223
|
"aria-hidden": "true",
|
|
220
224
|
"data-slot": "icon"
|
|
221
225
|
}, [
|
|
222
|
-
|
|
226
|
+
c("path", {
|
|
223
227
|
"fill-rule": "evenodd",
|
|
224
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",
|
|
225
229
|
"clip-rule": "evenodd"
|
|
226
230
|
})
|
|
227
231
|
]);
|
|
228
232
|
}
|
|
229
|
-
function ne(e,
|
|
230
|
-
return
|
|
233
|
+
function ne(e, u) {
|
|
234
|
+
return a(), l("svg", {
|
|
231
235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
232
236
|
viewBox: "0 0 20 20",
|
|
233
237
|
fill: "currentColor",
|
|
234
238
|
"aria-hidden": "true",
|
|
235
239
|
"data-slot": "icon"
|
|
236
240
|
}, [
|
|
237
|
-
|
|
241
|
+
c("path", {
|
|
238
242
|
"fill-rule": "evenodd",
|
|
239
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",
|
|
240
244
|
"clip-rule": "evenodd"
|
|
@@ -269,44 +273,49 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
269
273
|
}
|
|
270
274
|
},
|
|
271
275
|
emits: ["update:modelValue"],
|
|
272
|
-
setup(e, { emit:
|
|
273
|
-
const
|
|
274
|
-
get: () =>
|
|
275
|
-
set: (
|
|
276
|
-
}), { hasModelBinding:
|
|
277
|
-
return (
|
|
278
|
-
class:
|
|
276
|
+
setup(e, { emit: u }) {
|
|
277
|
+
const r = e, d = u, i = B({
|
|
278
|
+
get: () => r.modelValue,
|
|
279
|
+
set: (s) => d("update:modelValue", s)
|
|
280
|
+
}), { hasModelBinding: v } = j(), f = A(null);
|
|
281
|
+
return (s, n) => (a(), l("div", {
|
|
282
|
+
class: y([
|
|
279
283
|
"rvc-select",
|
|
280
284
|
`rvc-select-${e.size}`,
|
|
281
285
|
e.rootClass
|
|
282
286
|
])
|
|
283
287
|
}, [
|
|
284
|
-
e.prefixIcon ?
|
|
288
|
+
e.prefixIcon ? g(s.$slots, "prefixIcon", {
|
|
285
289
|
key: 0,
|
|
286
290
|
icon: e.prefixIcon
|
|
287
291
|
}, () => [
|
|
288
|
-
(
|
|
292
|
+
(a(), w(C(e.prefixIcon), { "aria-hidden": "true" }))
|
|
289
293
|
]) : h("", !0),
|
|
290
|
-
|
|
291
|
-
$(
|
|
292
|
-
|
|
294
|
+
g(s.$slots, "select", D(z(s.$attrs)), () => [
|
|
295
|
+
$(v) ? M((a(), l("select", b({ key: 0 }, s.$attrs, {
|
|
296
|
+
ref_key: "select",
|
|
297
|
+
ref: f,
|
|
298
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => i.value = t)
|
|
293
299
|
}), [
|
|
294
|
-
|
|
300
|
+
g(s.$slots, "default")
|
|
295
301
|
], 16)), [
|
|
296
|
-
[E,
|
|
297
|
-
]) : (
|
|
298
|
-
|
|
302
|
+
[E, i.value]
|
|
303
|
+
]) : (a(), l("select", b({ key: 1 }, s.$attrs, {
|
|
304
|
+
ref_key: "select",
|
|
305
|
+
ref: f
|
|
306
|
+
}), [
|
|
307
|
+
g(s.$slots, "default")
|
|
299
308
|
], 16))
|
|
300
309
|
]),
|
|
301
|
-
|
|
302
|
-
(
|
|
310
|
+
g(s.$slots, "icon", { icon: e.icon }, () => [
|
|
311
|
+
(a(), w(C(e.icon ?? $(Z)), { "aria-hidden": "true" }))
|
|
303
312
|
])
|
|
304
313
|
], 2));
|
|
305
314
|
}
|
|
306
315
|
}), le = {
|
|
307
316
|
key: 0,
|
|
308
317
|
class: "rvc-pagination"
|
|
309
|
-
}, se = ["value"], ie = { class: "rvc-pagination-info" },
|
|
318
|
+
}, se = ["value"], ie = { class: "rvc-pagination-info" }, re = { class: "rvc-pagination-nav-list" }, oe = ["disabled", "onClick"], ue = { key: 2 }, ce = { key: 3 }, de = {
|
|
310
319
|
__name: "Pagination",
|
|
311
320
|
props: {
|
|
312
321
|
pagination: {
|
|
@@ -331,79 +340,79 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
331
340
|
}
|
|
332
341
|
},
|
|
333
342
|
emits: ["pagination:change", "pagination:perPage"],
|
|
334
|
-
setup(e, { emit:
|
|
335
|
-
const
|
|
336
|
-
return (
|
|
337
|
-
var
|
|
338
|
-
return (
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
modelValue:
|
|
343
|
+
setup(e, { emit: u }) {
|
|
344
|
+
const r = e, d = u, i = A(r.perPage);
|
|
345
|
+
return (v, f) => {
|
|
346
|
+
var s;
|
|
347
|
+
return (s = e.pagination) != null && s.total ? (a(), l("div", le, [
|
|
348
|
+
g(v.$slots, "perPage", b(e.pagination, { perPage: i.value }), () => [
|
|
349
|
+
x(H, {
|
|
350
|
+
modelValue: i.value,
|
|
342
351
|
"onUpdate:modelValue": [
|
|
343
|
-
|
|
344
|
-
|
|
352
|
+
f[0] || (f[0] = (n) => i.value = n),
|
|
353
|
+
f[1] || (f[1] = (n) => d("pagination:perPage", n))
|
|
345
354
|
],
|
|
346
355
|
size: "sm",
|
|
347
356
|
"root-class": "rvc-pagination-per-page"
|
|
348
357
|
}, {
|
|
349
358
|
default: O(() => [
|
|
350
|
-
(
|
|
351
|
-
key: `pagination-items-per-page-option-${
|
|
352
|
-
value:
|
|
353
|
-
},
|
|
359
|
+
(a(!0), l(S, null, V(e.perPageOptions, (n) => (a(), l("option", {
|
|
360
|
+
key: `pagination-items-per-page-option-${n}`,
|
|
361
|
+
value: n
|
|
362
|
+
}, m(n) + " " + m(e.perPageLabel), 9, se))), 128))
|
|
354
363
|
]),
|
|
355
364
|
_: 1
|
|
356
365
|
}, 8, ["modelValue"])
|
|
357
366
|
]),
|
|
358
|
-
|
|
359
|
-
|
|
367
|
+
g(v.$slots, "info", b(e.pagination, { fromLabel: e.fromLabel }), () => [
|
|
368
|
+
c("div", ie, m(e.pagination.from) + " - " + m(e.pagination.to) + " " + m(e.fromLabel) + " " + m(e.pagination.total), 1)
|
|
360
369
|
]),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
(
|
|
364
|
-
key: `pagination-link-${
|
|
370
|
+
c("nav", null, [
|
|
371
|
+
c("ol", re, [
|
|
372
|
+
(a(!0), l(S, null, V(e.pagination.links, (n, t) => (a(), l("li", {
|
|
373
|
+
key: `pagination-link-${n.label}-${t}`,
|
|
365
374
|
class: "rvc-pagination-nav-list-item"
|
|
366
375
|
}, [
|
|
367
|
-
|
|
376
|
+
c("button", {
|
|
368
377
|
type: "button",
|
|
369
|
-
disabled:
|
|
370
|
-
class:
|
|
378
|
+
disabled: n.label === "..." || !n.url,
|
|
379
|
+
class: y([
|
|
371
380
|
"rvc-pagination-button",
|
|
372
|
-
{ "rvc-pagination-button-active":
|
|
381
|
+
{ "rvc-pagination-button-active": n.active }
|
|
373
382
|
]),
|
|
374
|
-
onClick: (
|
|
383
|
+
onClick: (o) => n.url && d("pagination:change", n.url)
|
|
375
384
|
}, [
|
|
376
|
-
|
|
385
|
+
n.url !== "..." && t === 0 ? (a(), w($(ae), {
|
|
377
386
|
key: 0,
|
|
378
387
|
"aria-hidden": "true",
|
|
379
|
-
class:
|
|
388
|
+
class: y([
|
|
380
389
|
"rvc-pagination-button-icon",
|
|
381
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
390
|
+
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
382
391
|
])
|
|
383
|
-
}, null, 8, ["class"])) :
|
|
392
|
+
}, null, 8, ["class"])) : n.label !== "..." && t === e.pagination.links.length - 1 ? (a(), w($(ne), {
|
|
384
393
|
key: 1,
|
|
385
394
|
"aria-hidden": "true",
|
|
386
|
-
class:
|
|
395
|
+
class: y([
|
|
387
396
|
"rvc-pagination-button-icon",
|
|
388
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
397
|
+
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
389
398
|
])
|
|
390
|
-
}, null, 8, ["class"])) :
|
|
391
|
-
], 10,
|
|
399
|
+
}, null, 8, ["class"])) : n.label === "..." ? (a(), l("span", ue, " ... ")) : (a(), l("span", ce, m(n.label), 1))
|
|
400
|
+
], 10, oe)
|
|
392
401
|
]))), 128))
|
|
393
402
|
])
|
|
394
403
|
])
|
|
395
404
|
])) : h("", !0);
|
|
396
405
|
};
|
|
397
406
|
}
|
|
398
|
-
}, ve = { key: 0 }, ge = ["aria-label", "onClick"],
|
|
407
|
+
}, ve = { key: 0 }, ge = ["aria-label", "onClick"], fe = ["innerHTML"], me = { key: 1 }, pe = ["colspan"], ye = { key: 2 }, be = ["colspan"], $e = { class: "rvc-table-spinner-wrapper" }, Ie = {
|
|
399
408
|
__name: "DataTable",
|
|
400
409
|
props: {
|
|
401
410
|
headers: {
|
|
402
411
|
type: Array,
|
|
403
412
|
default: () => [],
|
|
404
|
-
validator: (e) => e.every((
|
|
405
|
-
const
|
|
406
|
-
return
|
|
413
|
+
validator: (e) => e.every((r) => {
|
|
414
|
+
const d = !r.align || ["left", "center", "right"].includes(r.align), v = !(r.sortable === !0) || typeof r.key == "string" && r.key.length > 0;
|
|
415
|
+
return v || console.warn("[DataTable] Header item with sortable=true is missing required 'key' property:", r), !d && r.align && console.warn("[DataTable] Header item has invalid 'align' value. Must be 'left', 'center' or 'right':", r), d && v;
|
|
407
416
|
})
|
|
408
417
|
},
|
|
409
418
|
items: {
|
|
@@ -434,75 +443,75 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
434
443
|
}
|
|
435
444
|
},
|
|
436
445
|
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
437
|
-
setup(e, { emit:
|
|
438
|
-
const
|
|
439
|
-
!
|
|
440
|
-
key:
|
|
446
|
+
setup(e, { emit: u }) {
|
|
447
|
+
const r = e, d = u, i = A(null), v = (s) => r.headers.find((n) => n.key === s), f = (s) => {
|
|
448
|
+
!i.value || i.value.key !== s.key ? i.value = {
|
|
449
|
+
key: s.key,
|
|
441
450
|
direction: "asc"
|
|
442
|
-
} :
|
|
443
|
-
key:
|
|
451
|
+
} : i.value.direction === "asc" ? i.value = {
|
|
452
|
+
key: s.key,
|
|
444
453
|
direction: "desc"
|
|
445
|
-
} :
|
|
454
|
+
} : i.value = null, d("table:sortBy", i.value);
|
|
446
455
|
};
|
|
447
|
-
return (
|
|
448
|
-
|
|
449
|
-
class:
|
|
456
|
+
return (s, n) => (a(), l("div", null, [
|
|
457
|
+
c("div", {
|
|
458
|
+
class: y(["rvc-table-wrapper", e.wrapperClass])
|
|
450
459
|
}, [
|
|
451
|
-
|
|
452
|
-
class:
|
|
460
|
+
c("table", {
|
|
461
|
+
class: y([{ "rvc-table-striped": e.striped }, "rvc-table"])
|
|
453
462
|
}, [
|
|
454
|
-
e.headers.length ? (
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
(
|
|
458
|
-
header:
|
|
459
|
-
index:
|
|
463
|
+
e.headers.length ? (a(), l("thead", ve, [
|
|
464
|
+
g(s.$slots, "headers", { headers: e.headers }, () => [
|
|
465
|
+
c("tr", null, [
|
|
466
|
+
(a(!0), l(S, null, V(e.headers, (t, o) => g(s.$slots, "header", {
|
|
467
|
+
header: t,
|
|
468
|
+
index: o
|
|
460
469
|
}, () => {
|
|
461
|
-
var
|
|
470
|
+
var p, k;
|
|
462
471
|
return [
|
|
463
|
-
(
|
|
464
|
-
key: `rvc-table-header-${
|
|
472
|
+
(a(), l("th", b({ ref_for: !0 }, t, {
|
|
473
|
+
key: `rvc-table-header-${t.id}`,
|
|
465
474
|
class: {
|
|
466
|
-
"rvc-table-text-left":
|
|
467
|
-
"rvc-table-text-center":
|
|
468
|
-
"rvc-table-text-right":
|
|
475
|
+
"rvc-table-text-left": t.align === "left" || !t.align,
|
|
476
|
+
"rvc-table-text-center": t.align === "center",
|
|
477
|
+
"rvc-table-text-right": t.align === "right"
|
|
469
478
|
}
|
|
470
479
|
}), [
|
|
471
|
-
|
|
480
|
+
t.sortable && t.key ? (a(), l("button", {
|
|
472
481
|
key: 0,
|
|
473
482
|
type: "button",
|
|
474
|
-
"aria-label": `Sort on ${
|
|
475
|
-
class:
|
|
483
|
+
"aria-label": `Sort on ${t.label}`,
|
|
484
|
+
class: y([
|
|
476
485
|
"rvc-table-sort-button",
|
|
477
486
|
{
|
|
478
|
-
"rvc-table-sort-button-center":
|
|
479
|
-
"rvc-table-sort-button-right":
|
|
487
|
+
"rvc-table-sort-button-center": t.align === "center",
|
|
488
|
+
"rvc-table-sort-button-right": t.align === "right"
|
|
480
489
|
}
|
|
481
490
|
]),
|
|
482
|
-
onClick: (T) =>
|
|
491
|
+
onClick: (T) => f(t)
|
|
483
492
|
}, [
|
|
484
|
-
|
|
485
|
-
sortBy:
|
|
486
|
-
header:
|
|
493
|
+
g(s.$slots, "header-label", {
|
|
494
|
+
sortBy: i.value,
|
|
495
|
+
header: t
|
|
487
496
|
}, () => [
|
|
488
|
-
|
|
497
|
+
P(m(t.label), 1)
|
|
489
498
|
]),
|
|
490
|
-
|
|
491
|
-
class:
|
|
499
|
+
x($(te), {
|
|
500
|
+
class: y([
|
|
492
501
|
"rvc-table-sort-icon",
|
|
493
502
|
{
|
|
494
|
-
"rvc-table-sort-icon-visible": ((
|
|
495
|
-
"rvc-table-sort-icon-invisible": !
|
|
496
|
-
"rvc-table-sort-icon-rotated": ((k =
|
|
503
|
+
"rvc-table-sort-icon-visible": ((p = i.value) == null ? void 0 : p.key) === t.key,
|
|
504
|
+
"rvc-table-sort-icon-invisible": !i.value || i.value.key !== t.key,
|
|
505
|
+
"rvc-table-sort-icon-rotated": ((k = i.value) == null ? void 0 : k.key) === t.key && i.value.direction === "desc"
|
|
497
506
|
}
|
|
498
507
|
])
|
|
499
508
|
}, null, 8, ["class"])
|
|
500
|
-
], 10, ge)) :
|
|
509
|
+
], 10, ge)) : g(s.$slots, "header-label", {
|
|
501
510
|
key: 1,
|
|
502
|
-
sortBy:
|
|
503
|
-
header:
|
|
511
|
+
sortBy: i.value,
|
|
512
|
+
header: t
|
|
504
513
|
}, () => [
|
|
505
|
-
|
|
514
|
+
P(m(t.label), 1)
|
|
506
515
|
])
|
|
507
516
|
], 16))
|
|
508
517
|
];
|
|
@@ -510,69 +519,68 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
510
519
|
])
|
|
511
520
|
])
|
|
512
521
|
])) : h("", !0),
|
|
513
|
-
|
|
514
|
-
e.items.length && !e.spinning ? (
|
|
515
|
-
item:
|
|
516
|
-
index:
|
|
522
|
+
c("tbody", null, [
|
|
523
|
+
e.items.length && !e.spinning ? (a(!0), l(S, { key: 0 }, V(e.items, (t, o) => g(s.$slots, "items", {
|
|
524
|
+
item: t,
|
|
525
|
+
index: o
|
|
517
526
|
}, () => [
|
|
518
|
-
(
|
|
519
|
-
key: `rvc-table-row-${
|
|
527
|
+
(a(), l("tr", {
|
|
528
|
+
key: `rvc-table-row-${o}-${t.id}`
|
|
520
529
|
}, [
|
|
521
|
-
|
|
522
|
-
item:
|
|
523
|
-
index:
|
|
530
|
+
g(s.$slots, "item", {
|
|
531
|
+
item: t,
|
|
532
|
+
index: o
|
|
524
533
|
}, () => [
|
|
525
|
-
(
|
|
526
|
-
var T, L,
|
|
527
|
-
return
|
|
528
|
-
key: `rvc-table-row-${
|
|
529
|
-
|
|
530
|
-
}, a.attrs, {
|
|
534
|
+
(a(!0), l(S, null, V(t, (p, k) => {
|
|
535
|
+
var T, L, I, F;
|
|
536
|
+
return a(), l("td", b({
|
|
537
|
+
key: `rvc-table-row-${o}-column-${k}-${t.id}`
|
|
538
|
+
}, { ref_for: !0 }, t.attrs, {
|
|
531
539
|
class: {
|
|
532
|
-
"rvc-table-text-left": ((T =
|
|
533
|
-
"rvc-table-text-center": ((
|
|
534
|
-
"rvc-table-text-right": ((F =
|
|
540
|
+
"rvc-table-text-left": ((T = v(k)) == null ? void 0 : T.align) === "left" || !((L = v(k)) != null && L.align),
|
|
541
|
+
"rvc-table-text-center": ((I = v(k)) == null ? void 0 : I.align) === "center",
|
|
542
|
+
"rvc-table-text-right": ((F = v(k)) == null ? void 0 : F.align) === "right"
|
|
535
543
|
},
|
|
536
|
-
innerHTML:
|
|
537
|
-
}), null, 16,
|
|
544
|
+
innerHTML: p
|
|
545
|
+
}), null, 16, fe);
|
|
538
546
|
}), 128))
|
|
539
547
|
])
|
|
540
548
|
]))
|
|
541
|
-
])), 256)) : !e.items.length && !e.spinning ? (
|
|
542
|
-
|
|
549
|
+
])), 256)) : !e.items.length && !e.spinning ? (a(), l("tr", me, [
|
|
550
|
+
c("td", {
|
|
543
551
|
colspan: e.headers.length,
|
|
544
552
|
class: "rvc-table-state"
|
|
545
553
|
}, [
|
|
546
|
-
|
|
547
|
-
], 8,
|
|
548
|
-
])) : (
|
|
549
|
-
|
|
554
|
+
c("p", null, m(e.noResultsText), 1)
|
|
555
|
+
], 8, pe)
|
|
556
|
+
])) : (a(), l("tr", ye, [
|
|
557
|
+
c("td", {
|
|
550
558
|
colspan: e.headers.length,
|
|
551
559
|
class: "rvc-table-state"
|
|
552
560
|
}, [
|
|
553
|
-
|
|
561
|
+
g(s.$slots, "spinner", {
|
|
554
562
|
spinning: e.spinning,
|
|
555
563
|
label: e.loadingText
|
|
556
564
|
}, () => [
|
|
557
|
-
|
|
558
|
-
e.spinning ? (
|
|
565
|
+
c("div", $e, [
|
|
566
|
+
e.spinning ? (a(), w($(K), {
|
|
559
567
|
key: 0,
|
|
560
568
|
"aria-hidden": "true",
|
|
561
569
|
class: "rvc-table-spinner"
|
|
562
570
|
})) : h("", !0),
|
|
563
|
-
|
|
571
|
+
P(" " + m(e.loadingText), 1)
|
|
564
572
|
])
|
|
565
573
|
])
|
|
566
|
-
], 8,
|
|
574
|
+
], 8, be)
|
|
567
575
|
]))
|
|
568
576
|
])
|
|
569
577
|
], 2)
|
|
570
578
|
], 2),
|
|
571
|
-
e.pagination ?
|
|
572
|
-
|
|
579
|
+
e.pagination ? g(s.$slots, "pagination", D(b({ key: 0 }, e.pagination)), () => [
|
|
580
|
+
x(de, {
|
|
573
581
|
pagination: e.pagination,
|
|
574
|
-
"onPagination:change":
|
|
575
|
-
"onPagination:perPage":
|
|
582
|
+
"onPagination:change": n[0] || (n[0] = (t) => d("pagination:change", t)),
|
|
583
|
+
"onPagination:perPage": n[1] || (n[1] = (t) => d("pagination:perPage", t))
|
|
576
584
|
}, null, 8, ["pagination"])
|
|
577
585
|
]) : h("", !0)
|
|
578
586
|
]));
|
|
@@ -598,15 +606,15 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
598
606
|
}
|
|
599
607
|
},
|
|
600
608
|
setup(e) {
|
|
601
|
-
return (
|
|
602
|
-
class:
|
|
609
|
+
return (u, r) => (a(), l("div", {
|
|
610
|
+
class: y(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
603
611
|
}, [
|
|
604
|
-
e.icon ? (
|
|
612
|
+
e.icon ? (a(), w(C(e.icon), {
|
|
605
613
|
key: 0,
|
|
606
614
|
class: "rvc-empty-state-icon"
|
|
607
615
|
})) : h("", !0),
|
|
608
|
-
e.title ? (
|
|
609
|
-
|
|
616
|
+
e.title ? (a(), l("p", he, m(e.title), 1)) : h("", !0),
|
|
617
|
+
g(u.$slots, "default")
|
|
610
618
|
], 2));
|
|
611
619
|
}
|
|
612
620
|
}, Ne = {
|
|
@@ -623,23 +631,27 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
623
631
|
}
|
|
624
632
|
},
|
|
625
633
|
emits: ["update:modelValue"],
|
|
626
|
-
setup(e, { emit:
|
|
627
|
-
const
|
|
628
|
-
get: () =>
|
|
629
|
-
set: (
|
|
630
|
-
}),
|
|
634
|
+
setup(e, { emit: u }) {
|
|
635
|
+
const r = e, d = u, { hasModelBinding: i } = j(), v = A(null), f = B({
|
|
636
|
+
get: () => r.modelValue,
|
|
637
|
+
set: (n) => d("update:modelValue", n)
|
|
638
|
+
}), s = B(() => [
|
|
631
639
|
"rvc-textarea",
|
|
632
|
-
`rvc-textarea-${
|
|
640
|
+
`rvc-textarea-${r.size}`
|
|
633
641
|
]);
|
|
634
|
-
return (
|
|
642
|
+
return (n, t) => $(i) ? M((a(), l("textarea", {
|
|
635
643
|
key: 0,
|
|
636
|
-
|
|
637
|
-
|
|
644
|
+
ref_key: "textarea",
|
|
645
|
+
ref: v,
|
|
646
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => f.value = o),
|
|
647
|
+
class: y(s.value)
|
|
638
648
|
}, null, 2)), [
|
|
639
|
-
[R,
|
|
640
|
-
]) : (
|
|
649
|
+
[R, f.value]
|
|
650
|
+
]) : (a(), l("textarea", {
|
|
641
651
|
key: 1,
|
|
642
|
-
|
|
652
|
+
ref_key: "textarea",
|
|
653
|
+
ref: v,
|
|
654
|
+
class: y(s.value)
|
|
643
655
|
}, null, 2));
|
|
644
656
|
}
|
|
645
657
|
}, ke = { class: "rvc-radio" }, Se = ["id"], we = { key: 2 }, Ve = ["for"], qe = /* @__PURE__ */ Object.assign({
|
|
@@ -661,31 +673,36 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
661
673
|
}
|
|
662
674
|
},
|
|
663
675
|
emits: ["update:modelValue"],
|
|
664
|
-
setup(e, { emit:
|
|
665
|
-
const
|
|
666
|
-
get: () =>
|
|
667
|
-
set: (t) =>
|
|
668
|
-
}), { hasModelBinding:
|
|
669
|
-
...
|
|
670
|
-
id:
|
|
676
|
+
setup(e, { emit: u }) {
|
|
677
|
+
const r = e, d = u, i = B({
|
|
678
|
+
get: () => r.modelValue,
|
|
679
|
+
set: (t) => d("update:modelValue", t)
|
|
680
|
+
}), { hasModelBinding: v } = j(), f = N(), s = B(() => ({
|
|
681
|
+
...f,
|
|
682
|
+
id: r.id,
|
|
671
683
|
type: "radio"
|
|
672
|
-
}));
|
|
673
|
-
return (t,
|
|
674
|
-
$(
|
|
684
|
+
})), n = A(null);
|
|
685
|
+
return (t, o) => (a(), l("div", ke, [
|
|
686
|
+
$(v) ? M((a(), l("input", b({ key: 0 }, s.value, {
|
|
675
687
|
id: e.id,
|
|
676
|
-
|
|
688
|
+
ref_key: "input",
|
|
689
|
+
ref: n,
|
|
690
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => i.value = p)
|
|
677
691
|
}), null, 16, Se)), [
|
|
678
|
-
[q,
|
|
679
|
-
]) : (
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
692
|
+
[q, i.value]
|
|
693
|
+
]) : (a(), l("input", b({ key: 1 }, s.value, {
|
|
694
|
+
ref_key: "input",
|
|
695
|
+
ref: n
|
|
696
|
+
}), null, 16)),
|
|
697
|
+
o[1] || (o[1] = c("span", { class: "rvc-radio-input" }, null, -1)),
|
|
698
|
+
t.$slots.default || e.label ? (a(), l("span", we, [
|
|
699
|
+
g(t.$slots, "default", {}, () => [
|
|
700
|
+
c("label", { for: e.id }, m(e.label), 9, Ve)
|
|
684
701
|
])
|
|
685
702
|
])) : h("", !0)
|
|
686
703
|
]));
|
|
687
704
|
}
|
|
688
|
-
}), Be = { class: "rvc-tabs-nav" },
|
|
705
|
+
}), Be = { class: "rvc-tabs-nav" }, xe = ["value", "selected"], De = /* @__PURE__ */ Object.assign({
|
|
689
706
|
inheritAttrs: !1
|
|
690
707
|
}, {
|
|
691
708
|
__name: "Tabs",
|
|
@@ -706,61 +723,61 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
706
723
|
}
|
|
707
724
|
},
|
|
708
725
|
emits: ["update:modelValue", "tabs:change"],
|
|
709
|
-
setup(e, { emit:
|
|
710
|
-
const
|
|
711
|
-
const
|
|
712
|
-
return
|
|
713
|
-
},
|
|
714
|
-
get: () =>
|
|
715
|
-
set: (
|
|
716
|
-
const
|
|
717
|
-
|
|
726
|
+
setup(e, { emit: u }) {
|
|
727
|
+
const r = e, d = u, i = () => {
|
|
728
|
+
const n = r.tabs.findIndex((t) => t.active);
|
|
729
|
+
return n >= 0 ? n : 0;
|
|
730
|
+
}, v = B({
|
|
731
|
+
get: () => r.modelValue ?? i(),
|
|
732
|
+
set: (n) => {
|
|
733
|
+
const t = r.tabs[n];
|
|
734
|
+
d("update:modelValue", n), d("tabs:change", t);
|
|
718
735
|
}
|
|
719
|
-
}),
|
|
720
|
-
const
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
|
|
724
|
-
},
|
|
736
|
+
}), f = (n) => {
|
|
737
|
+
const t = +n.target.value;
|
|
738
|
+
v.value = t;
|
|
739
|
+
const o = r.tabs[t];
|
|
740
|
+
o != null && o.selectEvent && o.selectEvent();
|
|
741
|
+
}, s = (n) => {
|
|
725
742
|
const {
|
|
726
|
-
active:
|
|
727
|
-
as:
|
|
728
|
-
bindAs:
|
|
743
|
+
active: t,
|
|
744
|
+
as: o,
|
|
745
|
+
bindAs: p,
|
|
729
746
|
selectEvent: k,
|
|
730
747
|
name: T,
|
|
731
748
|
...L
|
|
732
|
-
} =
|
|
749
|
+
} = n;
|
|
733
750
|
return L;
|
|
734
751
|
};
|
|
735
|
-
return (
|
|
736
|
-
|
|
752
|
+
return (n, t) => (a(), l(S, null, [
|
|
753
|
+
c("div", b(n.$attrs, {
|
|
737
754
|
class: ["rvc-tabs", { "rvc-tabs-buttons": e.tabStyle === "buttons" }]
|
|
738
755
|
}), [
|
|
739
|
-
|
|
740
|
-
(
|
|
741
|
-
key: `${
|
|
742
|
-
as:
|
|
743
|
-
class: ["rvc-tab", { "rvc-tab-active":
|
|
744
|
-
onClick: (k) =>
|
|
756
|
+
c("nav", Be, [
|
|
757
|
+
(a(!0), l(S, null, V(e.tabs, (o, p) => (a(), w(C(o.as ? o.as : "button"), b({ ref_for: !0 }, s(o), {
|
|
758
|
+
key: `${p}-tab-item`,
|
|
759
|
+
as: o.bindAs ? o.bindAs : void 0,
|
|
760
|
+
class: ["rvc-tab", { "rvc-tab-active": v.value === p }],
|
|
761
|
+
onClick: (k) => v.value = p
|
|
745
762
|
}), {
|
|
746
763
|
default: O(() => [
|
|
747
|
-
|
|
764
|
+
P(m(o.name), 1)
|
|
748
765
|
]),
|
|
749
766
|
_: 2
|
|
750
767
|
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
751
768
|
])
|
|
752
769
|
], 16),
|
|
753
|
-
|
|
770
|
+
x(H, b(n.$attrs, {
|
|
754
771
|
"root-class": "rvc-tabs-select",
|
|
755
|
-
value:
|
|
756
|
-
onChange:
|
|
772
|
+
value: v.value,
|
|
773
|
+
onChange: f
|
|
757
774
|
}), {
|
|
758
775
|
default: O(() => [
|
|
759
|
-
(
|
|
760
|
-
key: `${
|
|
761
|
-
value:
|
|
762
|
-
selected:
|
|
763
|
-
},
|
|
776
|
+
(a(!0), l(S, null, V(e.tabs, (o, p) => (a(), l("option", {
|
|
777
|
+
key: `${p}-tab-item-select-option`,
|
|
778
|
+
value: p,
|
|
779
|
+
selected: v.value === p
|
|
780
|
+
}, m(o.name), 9, xe))), 128))
|
|
764
781
|
]),
|
|
765
782
|
_: 1
|
|
766
783
|
}, 16, ["value"])
|
|
@@ -772,8 +789,8 @@ export {
|
|
|
772
789
|
Me as Alert,
|
|
773
790
|
Ee as Badge,
|
|
774
791
|
Ue as ButtonBase,
|
|
775
|
-
|
|
776
|
-
|
|
792
|
+
je as Checkbox,
|
|
793
|
+
Ie as DataTable,
|
|
777
794
|
Fe as EmptyState,
|
|
778
795
|
Ke as FormInput,
|
|
779
796
|
H as FormSelect,
|
package/dist/dialogs/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createBlock as u, openBlock as m, unref as r, withCtx as s, createVNode as i, withModifiers as B, createElementVNode as a, normalizeClass as w, renderSlot as d, createCommentVNode as b, createTextVNode as E, toDisplayString as L } from "vue";
|
|
2
2
|
import { TransitionRoot as T, Dialog as N, TransitionChild as p, DialogPanel as V, DialogTitle as y } from "@headlessui/vue";
|
|
3
3
|
import { _ as g } from "../_shared/ButtonBase-DfkwHIhN.js";
|
|
4
|
-
import { u as R } from "../_shared/Modal-
|
|
5
|
-
import { _ as W } from "../_shared/Modal-
|
|
4
|
+
import { u as R } from "../_shared/Modal-dqDGKVw5.js";
|
|
5
|
+
import { _ as W } from "../_shared/Modal-dqDGKVw5.js";
|
|
6
6
|
import { r as k } from "../_shared/XMarkIcon-90mcPzBs.js";
|
|
7
7
|
const q = {
|
|
8
8
|
class: "rvc-drawer-presentation",
|
|
@@ -88,7 +88,8 @@ const q = {
|
|
|
88
88
|
"aria-hidden": "true"
|
|
89
89
|
}, null, -1)
|
|
90
90
|
])),
|
|
91
|
-
_: 1
|
|
91
|
+
_: 1,
|
|
92
|
+
__: [8]
|
|
92
93
|
}),
|
|
93
94
|
a("div", q, [
|
|
94
95
|
a("div", A, [
|
package/dist/dropdown/index.js
CHANGED
|
@@ -98,10 +98,7 @@ const T = /* @__PURE__ */ Object.assign({
|
|
|
98
98
|
}, {
|
|
99
99
|
default: a(() => [
|
|
100
100
|
s(o.$slots, "item", { item: e }, () => [
|
|
101
|
-
(r(), l(m(e.as ? e.as : "button"), f({
|
|
102
|
-
class: "rvc-dropdown-item",
|
|
103
|
-
ref_for: !0
|
|
104
|
-
}, g(e), {
|
|
101
|
+
(r(), l(m(e.as ? e.as : "button"), f({ class: "rvc-dropdown-item" }, { ref_for: !0 }, g(e), {
|
|
105
102
|
as: e.bindAs ? e.bindAs : void 0,
|
|
106
103
|
onClick: (y) => (b("dropdown:click", e), e.event ? e.event() : null)
|
|
107
104
|
}), {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as n, createBlock as o, openBlock as r, unref as a, withCtx as s, createVNode as p, createCommentVNode as h, mergeProps as f, createElementVNode as g, renderSlot as w } from "vue";
|
|
2
2
|
import { SwitchGroup as V, Switch as v, SwitchLabel as b } from "@headlessui/vue";
|
|
3
|
-
const
|
|
3
|
+
const k = /* @__PURE__ */ Object.assign({
|
|
4
4
|
inheritAttrs: !1
|
|
5
5
|
}, {
|
|
6
6
|
__name: "Lightswitch",
|
|
@@ -29,7 +29,8 @@ const B = /* @__PURE__ */ Object.assign({
|
|
|
29
29
|
default: s(() => t[1] || (t[1] = [
|
|
30
30
|
g("span", { class: "rvc-lightswitch-toggle" }, null, -1)
|
|
31
31
|
])),
|
|
32
|
-
_: 1
|
|
32
|
+
_: 1,
|
|
33
|
+
__: [1]
|
|
33
34
|
}, 16, ["modelValue", "class"]),
|
|
34
35
|
e.$slots.default ? (r(), o(a(b), { key: 0 }, {
|
|
35
36
|
default: s(() => [
|
|
@@ -43,6 +44,6 @@ const B = /* @__PURE__ */ Object.assign({
|
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
k as Lightswitch,
|
|
48
|
+
k as default
|
|
48
49
|
};
|
|
@@ -3,8 +3,8 @@ import { useEditor as O, EditorContent as T } from "@tiptap/vue-3";
|
|
|
3
3
|
import N from "@tiptap/extension-link";
|
|
4
4
|
import U from "@tiptap/starter-kit";
|
|
5
5
|
import { _ as q } from "../_shared/Tooltip-B93ZF7IF.js";
|
|
6
|
-
import { _ as z } from "../_shared/FormInput-
|
|
7
|
-
import { _ as D } from "../_shared/Modal-
|
|
6
|
+
import { _ as z } from "../_shared/FormInput-C5LjZViC.js";
|
|
7
|
+
import { _ as D } from "../_shared/Modal-dqDGKVw5.js";
|
|
8
8
|
function I(i, d) {
|
|
9
9
|
return s(), r("svg", {
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
package/package.json
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { computed as y, getCurrentInstance as $, useSlots as I, createElementBlock as i, openBlock as o, normalizeClass as k, createCommentVNode as l, renderSlot as r, unref as a, createBlock as p, resolveDynamicComponent as m, normalizeProps as b, guardReactiveProps as V, withDirectives as B, mergeProps as f, vModelDynamic as C } from "vue";
|
|
2
|
-
const x = () => ({ hasModelBinding: y(() => {
|
|
3
|
-
var s;
|
|
4
|
-
const n = $();
|
|
5
|
-
return ((s = n == null ? void 0 : n.vnode) == null ? void 0 : s.props) && Object.prototype.hasOwnProperty.call(n.vnode.props, "onUpdate:modelValue");
|
|
6
|
-
}) }), O = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "rvc-input-prefix"
|
|
9
|
-
}, S = ["type"], j = ["type"], F = /* @__PURE__ */ Object.assign({
|
|
10
|
-
inheritAttrs: !1
|
|
11
|
-
}, {
|
|
12
|
-
__name: "FormInput",
|
|
13
|
-
props: {
|
|
14
|
-
modelValue: {
|
|
15
|
-
type: [String, Number],
|
|
16
|
-
default: void 0
|
|
17
|
-
},
|
|
18
|
-
rootClass: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: ""
|
|
21
|
-
},
|
|
22
|
-
prefixIcon: {
|
|
23
|
-
type: [Object, Function],
|
|
24
|
-
default: null
|
|
25
|
-
},
|
|
26
|
-
icon: {
|
|
27
|
-
type: [Object, Function],
|
|
28
|
-
default: null
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: "base",
|
|
33
|
-
validator: (e) => ["sm", "base"].includes(e)
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ["update:modelValue"],
|
|
37
|
-
setup(e, { emit: n }) {
|
|
38
|
-
const s = e, v = n, { hasModelBinding: g } = x(), u = I(), c = y({
|
|
39
|
-
get: () => s.modelValue,
|
|
40
|
-
set: (t) => v("update:modelValue", t)
|
|
41
|
-
});
|
|
42
|
-
return (t, d) => (o(), i("div", {
|
|
43
|
-
class: k([
|
|
44
|
-
"rvc-input",
|
|
45
|
-
`rvc-input-${e.size}`,
|
|
46
|
-
e.rootClass
|
|
47
|
-
])
|
|
48
|
-
}, [
|
|
49
|
-
a(u).prefix || a(u).prefixIcon || e.prefixIcon ? (o(), i("span", O, [
|
|
50
|
-
r(t.$slots, "prefix", {}, () => [
|
|
51
|
-
r(t.$slots, "prefixIcon", { icon: e.prefixIcon }, () => [
|
|
52
|
-
e.prefixIcon ? (o(), p(m(e.prefixIcon), {
|
|
53
|
-
key: 0,
|
|
54
|
-
"aria-hidden": "true"
|
|
55
|
-
})) : l("", !0)
|
|
56
|
-
])
|
|
57
|
-
])
|
|
58
|
-
])) : l("", !0),
|
|
59
|
-
r(t.$slots, "input", b(V(t.$attrs)), () => [
|
|
60
|
-
a(g) ? B((o(), i("input", f({ key: 0 }, t.$attrs, {
|
|
61
|
-
"onUpdate:modelValue": d[0] || (d[0] = (h) => c.value = h),
|
|
62
|
-
type: t.$attrs.type || "text"
|
|
63
|
-
}), null, 16, S)), [
|
|
64
|
-
[C, c.value]
|
|
65
|
-
]) : (o(), i("input", f({
|
|
66
|
-
key: 1,
|
|
67
|
-
type: t.$attrs.type || "text"
|
|
68
|
-
}, t.$attrs), null, 16, j))
|
|
69
|
-
]),
|
|
70
|
-
r(t.$slots, "icon", { icon: e.icon }, () => [
|
|
71
|
-
e.icon ? (o(), p(m(e.icon), {
|
|
72
|
-
key: 0,
|
|
73
|
-
"aria-hidden": "true"
|
|
74
|
-
})) : l("", !0)
|
|
75
|
-
])
|
|
76
|
-
], 2));
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
export {
|
|
80
|
-
F as _,
|
|
81
|
-
x as u
|
|
82
|
-
};
|