@robuust-digital/vue-components 2.0.0-rc.8 → 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 +11 -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 -275
- 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 +4 -4
- 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
|
|
|
@@ -8,12 +14,16 @@
|
|
|
8
14
|
* `Radio`: background color is now customizable with `--rvc-radio-bg-color` CSS variable
|
|
9
15
|
* `Checkbox`: background color is now customizable with `--rvc-checkbox-input-bg-color` CSS variable
|
|
10
16
|
* `Drawer`: Added `drawer:opened` event that triggers after drawer open transition is finished
|
|
17
|
+
* `Accordion`: Added `index` to `summary` slot
|
|
11
18
|
|
|
12
19
|
### Changed
|
|
13
20
|
|
|
14
21
|
* `Toast`: `open` prop is now `show`
|
|
15
22
|
* `DataTable`: `items` slot is renamed to `item` and added a parent `items` slot to customize the whole row
|
|
16
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
|
|
17
27
|
|
|
18
28
|
### Updated
|
|
19
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,29 +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
|
-
|
|
67
|
+
c("summary", null, [
|
|
68
|
+
g(u.$slots, "summary", {
|
|
69
|
+
item: d,
|
|
70
|
+
index: i
|
|
71
71
|
}, () => [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
P(m(d.title) + " ", 1),
|
|
73
|
+
g(u.$slots, "icon", { classList: "rvc-accordion-icon" }, () => [
|
|
74
|
+
x($(J), { class: "rvc-accordion-icon" })
|
|
75
75
|
])
|
|
76
76
|
])
|
|
77
77
|
]),
|
|
78
|
-
|
|
79
|
-
class:
|
|
78
|
+
c("div", {
|
|
79
|
+
class: y(["rvc-accordion-content", e.contentClass])
|
|
80
80
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
innerHTML:
|
|
81
|
+
g(u.$slots, "content", { item: d }, () => [
|
|
82
|
+
c("div", {
|
|
83
|
+
innerHTML: d.content
|
|
84
84
|
}, null, 8, X)
|
|
85
85
|
])
|
|
86
86
|
], 2)
|
|
@@ -114,37 +114,37 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
114
114
|
},
|
|
115
115
|
emits: ["alert:close"],
|
|
116
116
|
setup(e) {
|
|
117
|
-
return (
|
|
118
|
-
class:
|
|
117
|
+
return (u, r) => (a(), w(C(e.as), {
|
|
118
|
+
class: y(["rvc-alert", `rvc-alert-${e.type}`])
|
|
119
119
|
}, {
|
|
120
120
|
default: O(() => [
|
|
121
|
-
|
|
122
|
-
e.icon ? (
|
|
121
|
+
g(u.$slots, "icon", {}, () => [
|
|
122
|
+
e.icon ? (a(), w(C(e.icon), {
|
|
123
123
|
key: 0,
|
|
124
124
|
class: "rvc-alert-icon"
|
|
125
125
|
})) : h("", !0)
|
|
126
126
|
]),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
c("div", null, [
|
|
128
|
+
g(u.$slots, "title", {}, () => [
|
|
129
|
+
c("span", Y, m(e.title), 1)
|
|
130
130
|
]),
|
|
131
|
-
|
|
131
|
+
g(u.$slots, "default")
|
|
132
132
|
]),
|
|
133
|
-
|
|
134
|
-
e.close ? (
|
|
133
|
+
g(u.$slots, "close", {}, () => [
|
|
134
|
+
e.close ? (a(), l("button", {
|
|
135
135
|
key: 0,
|
|
136
136
|
type: "button",
|
|
137
137
|
class: "rvc-alert-close",
|
|
138
|
-
onClick:
|
|
138
|
+
onClick: r[0] || (r[0] = (d) => u.$emit("alert:close"))
|
|
139
139
|
}, [
|
|
140
|
-
|
|
140
|
+
x($(U))
|
|
141
141
|
])) : h("", !0)
|
|
142
142
|
])
|
|
143
143
|
]),
|
|
144
144
|
_: 3
|
|
145
145
|
}, 8, ["class"]));
|
|
146
146
|
}
|
|
147
|
-
}, _ = { class: "rvc-checkbox-input" }, ee = ["for"],
|
|
147
|
+
}, _ = { class: "rvc-checkbox-input" }, ee = ["for"], je = /* @__PURE__ */ Object.assign({
|
|
148
148
|
inheritAttrs: !1
|
|
149
149
|
}, {
|
|
150
150
|
__name: "Checkbox",
|
|
@@ -167,73 +167,78 @@ const Q = { class: "rvc-accordion" }, W = ["open", "name"], X = ["innerHTML"], O
|
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
emits: ["update:modelValue"],
|
|
170
|
-
setup(e, { emit:
|
|
171
|
-
const
|
|
172
|
-
get: () =>
|
|
173
|
-
set: (t) =>
|
|
174
|
-
}), { hasModelBinding:
|
|
175
|
-
...
|
|
176
|
-
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,
|
|
177
177
|
type: "checkbox"
|
|
178
|
-
}));
|
|
179
|
-
return (t,
|
|
180
|
-
class:
|
|
178
|
+
})), n = A(null);
|
|
179
|
+
return (t, o) => (a(), l("div", {
|
|
180
|
+
class: y(["rvc-checkbox", e.rootClass])
|
|
181
181
|
}, [
|
|
182
|
-
$(
|
|
183
|
-
|
|
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)
|
|
184
186
|
}), null, 16)), [
|
|
185
|
-
[q,
|
|
186
|
-
]) : (
|
|
187
|
-
|
|
188
|
-
|
|
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))
|
|
189
194
|
]),
|
|
190
|
-
|
|
191
|
-
t.$slots.default || e.label ?
|
|
192
|
-
|
|
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)
|
|
193
198
|
]) : h("", !0)
|
|
194
199
|
])
|
|
195
200
|
], 2));
|
|
196
201
|
}
|
|
197
202
|
});
|
|
198
|
-
function te(e,
|
|
199
|
-
return
|
|
203
|
+
function te(e, u) {
|
|
204
|
+
return a(), l("svg", {
|
|
200
205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
201
206
|
viewBox: "0 0 16 16",
|
|
202
207
|
fill: "currentColor",
|
|
203
208
|
"aria-hidden": "true",
|
|
204
209
|
"data-slot": "icon"
|
|
205
210
|
}, [
|
|
206
|
-
|
|
211
|
+
c("path", {
|
|
207
212
|
"fill-rule": "evenodd",
|
|
208
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",
|
|
209
214
|
"clip-rule": "evenodd"
|
|
210
215
|
})
|
|
211
216
|
]);
|
|
212
217
|
}
|
|
213
|
-
function ae(e,
|
|
214
|
-
return
|
|
218
|
+
function ae(e, u) {
|
|
219
|
+
return a(), l("svg", {
|
|
215
220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
216
221
|
viewBox: "0 0 20 20",
|
|
217
222
|
fill: "currentColor",
|
|
218
223
|
"aria-hidden": "true",
|
|
219
224
|
"data-slot": "icon"
|
|
220
225
|
}, [
|
|
221
|
-
|
|
226
|
+
c("path", {
|
|
222
227
|
"fill-rule": "evenodd",
|
|
223
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",
|
|
224
229
|
"clip-rule": "evenodd"
|
|
225
230
|
})
|
|
226
231
|
]);
|
|
227
232
|
}
|
|
228
|
-
function ne(e,
|
|
229
|
-
return
|
|
233
|
+
function ne(e, u) {
|
|
234
|
+
return a(), l("svg", {
|
|
230
235
|
xmlns: "http://www.w3.org/2000/svg",
|
|
231
236
|
viewBox: "0 0 20 20",
|
|
232
237
|
fill: "currentColor",
|
|
233
238
|
"aria-hidden": "true",
|
|
234
239
|
"data-slot": "icon"
|
|
235
240
|
}, [
|
|
236
|
-
|
|
241
|
+
c("path", {
|
|
237
242
|
"fill-rule": "evenodd",
|
|
238
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",
|
|
239
244
|
"clip-rule": "evenodd"
|
|
@@ -268,44 +273,49 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
268
273
|
}
|
|
269
274
|
},
|
|
270
275
|
emits: ["update:modelValue"],
|
|
271
|
-
setup(e, { emit:
|
|
272
|
-
const
|
|
273
|
-
get: () =>
|
|
274
|
-
set: (
|
|
275
|
-
}), { hasModelBinding:
|
|
276
|
-
return (
|
|
277
|
-
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([
|
|
278
283
|
"rvc-select",
|
|
279
284
|
`rvc-select-${e.size}`,
|
|
280
285
|
e.rootClass
|
|
281
286
|
])
|
|
282
287
|
}, [
|
|
283
|
-
e.prefixIcon ?
|
|
288
|
+
e.prefixIcon ? g(s.$slots, "prefixIcon", {
|
|
284
289
|
key: 0,
|
|
285
290
|
icon: e.prefixIcon
|
|
286
291
|
}, () => [
|
|
287
|
-
(
|
|
292
|
+
(a(), w(C(e.prefixIcon), { "aria-hidden": "true" }))
|
|
288
293
|
]) : h("", !0),
|
|
289
|
-
|
|
290
|
-
$(
|
|
291
|
-
|
|
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)
|
|
292
299
|
}), [
|
|
293
|
-
|
|
300
|
+
g(s.$slots, "default")
|
|
294
301
|
], 16)), [
|
|
295
|
-
[E,
|
|
296
|
-
]) : (
|
|
297
|
-
|
|
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")
|
|
298
308
|
], 16))
|
|
299
309
|
]),
|
|
300
|
-
|
|
301
|
-
(
|
|
310
|
+
g(s.$slots, "icon", { icon: e.icon }, () => [
|
|
311
|
+
(a(), w(C(e.icon ?? $(Z)), { "aria-hidden": "true" }))
|
|
302
312
|
])
|
|
303
313
|
], 2));
|
|
304
314
|
}
|
|
305
315
|
}), le = {
|
|
306
316
|
key: 0,
|
|
307
317
|
class: "rvc-pagination"
|
|
308
|
-
}, 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 = {
|
|
309
319
|
__name: "Pagination",
|
|
310
320
|
props: {
|
|
311
321
|
pagination: {
|
|
@@ -330,79 +340,79 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
330
340
|
}
|
|
331
341
|
},
|
|
332
342
|
emits: ["pagination:change", "pagination:perPage"],
|
|
333
|
-
setup(e, { emit:
|
|
334
|
-
const
|
|
335
|
-
return (
|
|
336
|
-
var
|
|
337
|
-
return (
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
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,
|
|
341
351
|
"onUpdate:modelValue": [
|
|
342
|
-
|
|
343
|
-
|
|
352
|
+
f[0] || (f[0] = (n) => i.value = n),
|
|
353
|
+
f[1] || (f[1] = (n) => d("pagination:perPage", n))
|
|
344
354
|
],
|
|
345
355
|
size: "sm",
|
|
346
356
|
"root-class": "rvc-pagination-per-page"
|
|
347
357
|
}, {
|
|
348
358
|
default: O(() => [
|
|
349
|
-
(
|
|
350
|
-
key: `pagination-items-per-page-option-${
|
|
351
|
-
value:
|
|
352
|
-
},
|
|
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))
|
|
353
363
|
]),
|
|
354
364
|
_: 1
|
|
355
365
|
}, 8, ["modelValue"])
|
|
356
366
|
]),
|
|
357
|
-
|
|
358
|
-
|
|
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)
|
|
359
369
|
]),
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
(
|
|
363
|
-
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}`,
|
|
364
374
|
class: "rvc-pagination-nav-list-item"
|
|
365
375
|
}, [
|
|
366
|
-
|
|
376
|
+
c("button", {
|
|
367
377
|
type: "button",
|
|
368
|
-
disabled:
|
|
369
|
-
class:
|
|
378
|
+
disabled: n.label === "..." || !n.url,
|
|
379
|
+
class: y([
|
|
370
380
|
"rvc-pagination-button",
|
|
371
|
-
{ "rvc-pagination-button-active":
|
|
381
|
+
{ "rvc-pagination-button-active": n.active }
|
|
372
382
|
]),
|
|
373
|
-
onClick: (
|
|
383
|
+
onClick: (o) => n.url && d("pagination:change", n.url)
|
|
374
384
|
}, [
|
|
375
|
-
|
|
385
|
+
n.url !== "..." && t === 0 ? (a(), w($(ae), {
|
|
376
386
|
key: 0,
|
|
377
387
|
"aria-hidden": "true",
|
|
378
|
-
class:
|
|
388
|
+
class: y([
|
|
379
389
|
"rvc-pagination-button-icon",
|
|
380
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
390
|
+
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
381
391
|
])
|
|
382
|
-
}, null, 8, ["class"])) :
|
|
392
|
+
}, null, 8, ["class"])) : n.label !== "..." && t === e.pagination.links.length - 1 ? (a(), w($(ne), {
|
|
383
393
|
key: 1,
|
|
384
394
|
"aria-hidden": "true",
|
|
385
|
-
class:
|
|
395
|
+
class: y([
|
|
386
396
|
"rvc-pagination-button-icon",
|
|
387
|
-
{ "rvc-pagination-button-icon-disabled": !
|
|
397
|
+
{ "rvc-pagination-button-icon-disabled": !n.url }
|
|
388
398
|
])
|
|
389
|
-
}, null, 8, ["class"])) :
|
|
390
|
-
], 10,
|
|
399
|
+
}, null, 8, ["class"])) : n.label === "..." ? (a(), l("span", ue, " ... ")) : (a(), l("span", ce, m(n.label), 1))
|
|
400
|
+
], 10, oe)
|
|
391
401
|
]))), 128))
|
|
392
402
|
])
|
|
393
403
|
])
|
|
394
404
|
])) : h("", !0);
|
|
395
405
|
};
|
|
396
406
|
}
|
|
397
|
-
}, 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 = {
|
|
398
408
|
__name: "DataTable",
|
|
399
409
|
props: {
|
|
400
410
|
headers: {
|
|
401
411
|
type: Array,
|
|
402
412
|
default: () => [],
|
|
403
|
-
validator: (e) => e.every((
|
|
404
|
-
const
|
|
405
|
-
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;
|
|
406
416
|
})
|
|
407
417
|
},
|
|
408
418
|
items: {
|
|
@@ -433,75 +443,75 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
433
443
|
}
|
|
434
444
|
},
|
|
435
445
|
emits: ["table:sortBy", "pagination:change", "pagination:perPage"],
|
|
436
|
-
setup(e, { emit:
|
|
437
|
-
const
|
|
438
|
-
!
|
|
439
|
-
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,
|
|
440
450
|
direction: "asc"
|
|
441
|
-
} :
|
|
442
|
-
key:
|
|
451
|
+
} : i.value.direction === "asc" ? i.value = {
|
|
452
|
+
key: s.key,
|
|
443
453
|
direction: "desc"
|
|
444
|
-
} :
|
|
454
|
+
} : i.value = null, d("table:sortBy", i.value);
|
|
445
455
|
};
|
|
446
|
-
return (
|
|
447
|
-
|
|
448
|
-
class:
|
|
456
|
+
return (s, n) => (a(), l("div", null, [
|
|
457
|
+
c("div", {
|
|
458
|
+
class: y(["rvc-table-wrapper", e.wrapperClass])
|
|
449
459
|
}, [
|
|
450
|
-
|
|
451
|
-
class:
|
|
460
|
+
c("table", {
|
|
461
|
+
class: y([{ "rvc-table-striped": e.striped }, "rvc-table"])
|
|
452
462
|
}, [
|
|
453
|
-
e.headers.length ? (
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
(
|
|
457
|
-
header:
|
|
458
|
-
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
|
|
459
469
|
}, () => {
|
|
460
|
-
var
|
|
470
|
+
var p, k;
|
|
461
471
|
return [
|
|
462
|
-
(
|
|
463
|
-
key: `rvc-table-header-${
|
|
472
|
+
(a(), l("th", b({ ref_for: !0 }, t, {
|
|
473
|
+
key: `rvc-table-header-${t.id}`,
|
|
464
474
|
class: {
|
|
465
|
-
"rvc-table-text-left":
|
|
466
|
-
"rvc-table-text-center":
|
|
467
|
-
"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"
|
|
468
478
|
}
|
|
469
479
|
}), [
|
|
470
|
-
|
|
480
|
+
t.sortable && t.key ? (a(), l("button", {
|
|
471
481
|
key: 0,
|
|
472
482
|
type: "button",
|
|
473
|
-
"aria-label": `Sort on ${
|
|
474
|
-
class:
|
|
483
|
+
"aria-label": `Sort on ${t.label}`,
|
|
484
|
+
class: y([
|
|
475
485
|
"rvc-table-sort-button",
|
|
476
486
|
{
|
|
477
|
-
"rvc-table-sort-button-center":
|
|
478
|
-
"rvc-table-sort-button-right":
|
|
487
|
+
"rvc-table-sort-button-center": t.align === "center",
|
|
488
|
+
"rvc-table-sort-button-right": t.align === "right"
|
|
479
489
|
}
|
|
480
490
|
]),
|
|
481
|
-
onClick: (T) =>
|
|
491
|
+
onClick: (T) => f(t)
|
|
482
492
|
}, [
|
|
483
|
-
|
|
484
|
-
sortBy:
|
|
485
|
-
header:
|
|
493
|
+
g(s.$slots, "header-label", {
|
|
494
|
+
sortBy: i.value,
|
|
495
|
+
header: t
|
|
486
496
|
}, () => [
|
|
487
|
-
|
|
497
|
+
P(m(t.label), 1)
|
|
488
498
|
]),
|
|
489
|
-
|
|
490
|
-
class:
|
|
499
|
+
x($(te), {
|
|
500
|
+
class: y([
|
|
491
501
|
"rvc-table-sort-icon",
|
|
492
502
|
{
|
|
493
|
-
"rvc-table-sort-icon-visible": ((
|
|
494
|
-
"rvc-table-sort-icon-invisible": !
|
|
495
|
-
"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"
|
|
496
506
|
}
|
|
497
507
|
])
|
|
498
508
|
}, null, 8, ["class"])
|
|
499
|
-
], 10, ge)) :
|
|
509
|
+
], 10, ge)) : g(s.$slots, "header-label", {
|
|
500
510
|
key: 1,
|
|
501
|
-
sortBy:
|
|
502
|
-
header:
|
|
511
|
+
sortBy: i.value,
|
|
512
|
+
header: t
|
|
503
513
|
}, () => [
|
|
504
|
-
|
|
514
|
+
P(m(t.label), 1)
|
|
505
515
|
])
|
|
506
516
|
], 16))
|
|
507
517
|
];
|
|
@@ -509,69 +519,68 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
509
519
|
])
|
|
510
520
|
])
|
|
511
521
|
])) : h("", !0),
|
|
512
|
-
|
|
513
|
-
e.items.length && !e.spinning ? (
|
|
514
|
-
item:
|
|
515
|
-
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
|
|
516
526
|
}, () => [
|
|
517
|
-
(
|
|
518
|
-
key: `rvc-table-row-${
|
|
527
|
+
(a(), l("tr", {
|
|
528
|
+
key: `rvc-table-row-${o}-${t.id}`
|
|
519
529
|
}, [
|
|
520
|
-
|
|
521
|
-
item:
|
|
522
|
-
index:
|
|
530
|
+
g(s.$slots, "item", {
|
|
531
|
+
item: t,
|
|
532
|
+
index: o
|
|
523
533
|
}, () => [
|
|
524
|
-
(
|
|
525
|
-
var T, L,
|
|
526
|
-
return
|
|
527
|
-
key: `rvc-table-row-${
|
|
528
|
-
|
|
529
|
-
}, 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, {
|
|
530
539
|
class: {
|
|
531
|
-
"rvc-table-text-left": ((T =
|
|
532
|
-
"rvc-table-text-center": ((
|
|
533
|
-
"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"
|
|
534
543
|
},
|
|
535
|
-
innerHTML:
|
|
536
|
-
}), null, 16,
|
|
544
|
+
innerHTML: p
|
|
545
|
+
}), null, 16, fe);
|
|
537
546
|
}), 128))
|
|
538
547
|
])
|
|
539
548
|
]))
|
|
540
|
-
])), 256)) : !e.items.length && !e.spinning ? (
|
|
541
|
-
|
|
549
|
+
])), 256)) : !e.items.length && !e.spinning ? (a(), l("tr", me, [
|
|
550
|
+
c("td", {
|
|
542
551
|
colspan: e.headers.length,
|
|
543
552
|
class: "rvc-table-state"
|
|
544
553
|
}, [
|
|
545
|
-
|
|
546
|
-
], 8,
|
|
547
|
-
])) : (
|
|
548
|
-
|
|
554
|
+
c("p", null, m(e.noResultsText), 1)
|
|
555
|
+
], 8, pe)
|
|
556
|
+
])) : (a(), l("tr", ye, [
|
|
557
|
+
c("td", {
|
|
549
558
|
colspan: e.headers.length,
|
|
550
559
|
class: "rvc-table-state"
|
|
551
560
|
}, [
|
|
552
|
-
|
|
561
|
+
g(s.$slots, "spinner", {
|
|
553
562
|
spinning: e.spinning,
|
|
554
563
|
label: e.loadingText
|
|
555
564
|
}, () => [
|
|
556
|
-
|
|
557
|
-
e.spinning ? (
|
|
565
|
+
c("div", $e, [
|
|
566
|
+
e.spinning ? (a(), w($(K), {
|
|
558
567
|
key: 0,
|
|
559
568
|
"aria-hidden": "true",
|
|
560
569
|
class: "rvc-table-spinner"
|
|
561
570
|
})) : h("", !0),
|
|
562
|
-
|
|
571
|
+
P(" " + m(e.loadingText), 1)
|
|
563
572
|
])
|
|
564
573
|
])
|
|
565
|
-
], 8,
|
|
574
|
+
], 8, be)
|
|
566
575
|
]))
|
|
567
576
|
])
|
|
568
577
|
], 2)
|
|
569
578
|
], 2),
|
|
570
|
-
e.pagination ?
|
|
571
|
-
|
|
579
|
+
e.pagination ? g(s.$slots, "pagination", D(b({ key: 0 }, e.pagination)), () => [
|
|
580
|
+
x(de, {
|
|
572
581
|
pagination: e.pagination,
|
|
573
|
-
"onPagination:change":
|
|
574
|
-
"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))
|
|
575
584
|
}, null, 8, ["pagination"])
|
|
576
585
|
]) : h("", !0)
|
|
577
586
|
]));
|
|
@@ -597,15 +606,15 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
597
606
|
}
|
|
598
607
|
},
|
|
599
608
|
setup(e) {
|
|
600
|
-
return (
|
|
601
|
-
class:
|
|
609
|
+
return (u, r) => (a(), l("div", {
|
|
610
|
+
class: y(["rvc-empty-state", { "rvc-empty-state-bg": e.background }])
|
|
602
611
|
}, [
|
|
603
|
-
e.icon ? (
|
|
612
|
+
e.icon ? (a(), w(C(e.icon), {
|
|
604
613
|
key: 0,
|
|
605
614
|
class: "rvc-empty-state-icon"
|
|
606
615
|
})) : h("", !0),
|
|
607
|
-
e.title ? (
|
|
608
|
-
|
|
616
|
+
e.title ? (a(), l("p", he, m(e.title), 1)) : h("", !0),
|
|
617
|
+
g(u.$slots, "default")
|
|
609
618
|
], 2));
|
|
610
619
|
}
|
|
611
620
|
}, Ne = {
|
|
@@ -622,23 +631,27 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
622
631
|
}
|
|
623
632
|
},
|
|
624
633
|
emits: ["update:modelValue"],
|
|
625
|
-
setup(e, { emit:
|
|
626
|
-
const
|
|
627
|
-
get: () =>
|
|
628
|
-
set: (
|
|
629
|
-
}),
|
|
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(() => [
|
|
630
639
|
"rvc-textarea",
|
|
631
|
-
`rvc-textarea-${
|
|
640
|
+
`rvc-textarea-${r.size}`
|
|
632
641
|
]);
|
|
633
|
-
return (
|
|
642
|
+
return (n, t) => $(i) ? M((a(), l("textarea", {
|
|
634
643
|
key: 0,
|
|
635
|
-
|
|
636
|
-
|
|
644
|
+
ref_key: "textarea",
|
|
645
|
+
ref: v,
|
|
646
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => f.value = o),
|
|
647
|
+
class: y(s.value)
|
|
637
648
|
}, null, 2)), [
|
|
638
|
-
[R,
|
|
639
|
-
]) : (
|
|
649
|
+
[R, f.value]
|
|
650
|
+
]) : (a(), l("textarea", {
|
|
640
651
|
key: 1,
|
|
641
|
-
|
|
652
|
+
ref_key: "textarea",
|
|
653
|
+
ref: v,
|
|
654
|
+
class: y(s.value)
|
|
642
655
|
}, null, 2));
|
|
643
656
|
}
|
|
644
657
|
}, ke = { class: "rvc-radio" }, Se = ["id"], we = { key: 2 }, Ve = ["for"], qe = /* @__PURE__ */ Object.assign({
|
|
@@ -660,31 +673,36 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
660
673
|
}
|
|
661
674
|
},
|
|
662
675
|
emits: ["update:modelValue"],
|
|
663
|
-
setup(e, { emit:
|
|
664
|
-
const
|
|
665
|
-
get: () =>
|
|
666
|
-
set: (t) =>
|
|
667
|
-
}), { hasModelBinding:
|
|
668
|
-
...
|
|
669
|
-
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,
|
|
670
683
|
type: "radio"
|
|
671
|
-
}));
|
|
672
|
-
return (t,
|
|
673
|
-
$(
|
|
684
|
+
})), n = A(null);
|
|
685
|
+
return (t, o) => (a(), l("div", ke, [
|
|
686
|
+
$(v) ? M((a(), l("input", b({ key: 0 }, s.value, {
|
|
674
687
|
id: e.id,
|
|
675
|
-
|
|
688
|
+
ref_key: "input",
|
|
689
|
+
ref: n,
|
|
690
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => i.value = p)
|
|
676
691
|
}), null, 16, Se)), [
|
|
677
|
-
[q,
|
|
678
|
-
]) : (
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
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)
|
|
683
701
|
])
|
|
684
702
|
])) : h("", !0)
|
|
685
703
|
]));
|
|
686
704
|
}
|
|
687
|
-
}), Be = { class: "rvc-tabs-nav" },
|
|
705
|
+
}), Be = { class: "rvc-tabs-nav" }, xe = ["value", "selected"], De = /* @__PURE__ */ Object.assign({
|
|
688
706
|
inheritAttrs: !1
|
|
689
707
|
}, {
|
|
690
708
|
__name: "Tabs",
|
|
@@ -705,61 +723,61 @@ const H = /* @__PURE__ */ Object.assign({
|
|
|
705
723
|
}
|
|
706
724
|
},
|
|
707
725
|
emits: ["update:modelValue", "tabs:change"],
|
|
708
|
-
setup(e, { emit:
|
|
709
|
-
const
|
|
710
|
-
const
|
|
711
|
-
return
|
|
712
|
-
},
|
|
713
|
-
get: () =>
|
|
714
|
-
set: (
|
|
715
|
-
const
|
|
716
|
-
|
|
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);
|
|
717
735
|
}
|
|
718
|
-
}),
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
},
|
|
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) => {
|
|
724
742
|
const {
|
|
725
|
-
active:
|
|
726
|
-
as:
|
|
727
|
-
bindAs:
|
|
743
|
+
active: t,
|
|
744
|
+
as: o,
|
|
745
|
+
bindAs: p,
|
|
728
746
|
selectEvent: k,
|
|
729
747
|
name: T,
|
|
730
748
|
...L
|
|
731
|
-
} =
|
|
749
|
+
} = n;
|
|
732
750
|
return L;
|
|
733
751
|
};
|
|
734
|
-
return (
|
|
735
|
-
|
|
752
|
+
return (n, t) => (a(), l(S, null, [
|
|
753
|
+
c("div", b(n.$attrs, {
|
|
736
754
|
class: ["rvc-tabs", { "rvc-tabs-buttons": e.tabStyle === "buttons" }]
|
|
737
755
|
}), [
|
|
738
|
-
|
|
739
|
-
(
|
|
740
|
-
key: `${
|
|
741
|
-
as:
|
|
742
|
-
class: ["rvc-tab", { "rvc-tab-active":
|
|
743
|
-
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
|
|
744
762
|
}), {
|
|
745
763
|
default: O(() => [
|
|
746
|
-
|
|
764
|
+
P(m(o.name), 1)
|
|
747
765
|
]),
|
|
748
766
|
_: 2
|
|
749
767
|
}, 1040, ["as", "class", "onClick"]))), 128))
|
|
750
768
|
])
|
|
751
769
|
], 16),
|
|
752
|
-
|
|
770
|
+
x(H, b(n.$attrs, {
|
|
753
771
|
"root-class": "rvc-tabs-select",
|
|
754
|
-
value:
|
|
755
|
-
onChange:
|
|
772
|
+
value: v.value,
|
|
773
|
+
onChange: f
|
|
756
774
|
}), {
|
|
757
775
|
default: O(() => [
|
|
758
|
-
(
|
|
759
|
-
key: `${
|
|
760
|
-
value:
|
|
761
|
-
selected:
|
|
762
|
-
},
|
|
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))
|
|
763
781
|
]),
|
|
764
782
|
_: 1
|
|
765
783
|
}, 16, ["value"])
|
|
@@ -771,8 +789,8 @@ export {
|
|
|
771
789
|
Me as Alert,
|
|
772
790
|
Ee as Badge,
|
|
773
791
|
Ue as ButtonBase,
|
|
774
|
-
|
|
775
|
-
|
|
792
|
+
je as Checkbox,
|
|
793
|
+
Ie as DataTable,
|
|
776
794
|
Fe as EmptyState,
|
|
777
795
|
Ke as FormInput,
|
|
778
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robuust-digital/vue-components",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"postcss-scss": "^4.0.9",
|
|
81
81
|
"stylelint": "^16.14.1",
|
|
82
82
|
"stylelint-config-property-sort-order-smacss": "^10.0.0",
|
|
83
|
-
"stylelint-config-standard": "^
|
|
83
|
+
"stylelint-config-standard": "^38.0.0",
|
|
84
84
|
"tailwindcss": "^4.0.6",
|
|
85
85
|
"vite": "^6.1.0",
|
|
86
86
|
"vite-plugin-eslint": "^1.8.1",
|
|
87
|
-
"vite-plugin-static-copy": "^
|
|
87
|
+
"vite-plugin-static-copy": "^3.0.0",
|
|
88
88
|
"vite-plugin-stylelint": "^6.0.0",
|
|
89
89
|
"vite-plugin-vue-devtools": "^7.7.2",
|
|
90
90
|
"vite-svg-loader": "^5.1.0",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"resolutions": {
|
|
95
95
|
"@vueuse/core": "^13.0.0"
|
|
96
96
|
},
|
|
97
|
-
"packageManager": "yarn@4.
|
|
97
|
+
"packageManager": "yarn@4.9.1"
|
|
98
98
|
}
|
|
@@ -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
|
-
};
|