@stachelock/ui 0.6.6 → 0.6.8
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/dist/{CalendarHeader.vue_vue_type_script_setup_true_lang-CA_C4dmn.js → CalendarHeader.vue_vue_type_script_setup_true_lang-CMBsY5Y0.js} +1 -1
- package/dist/{ComboboxInput.vue_vue_type_script_setup_true_lang-D52gzkAa.js → ComboboxInput.vue_vue_type_script_setup_true_lang-DacJtKYo.js} +141 -125
- package/dist/{DynamicForm.vue_vue_type_script_setup_true_lang-BR8Pq7Kw.js → DynamicForm.vue_vue_type_script_setup_true_lang-Bq8Gvhsc.js} +1 -1
- package/dist/{DynamicFormField.vue_vue_type_script_setup_true_lang-BCVmqg_n.js → DynamicFormField.vue_vue_type_script_setup_true_lang-CdNtWWlT.js} +4 -4
- package/dist/{InlineTabs.vue_vue_type_script_setup_true_lang-slNq2sot.js → InlineTabs.vue_vue_type_script_setup_true_lang-B6A0zsE6.js} +1 -1
- package/dist/{SelectInput.vue_vue_type_script_setup_true_lang-COZuuSFS.js → SelectInput.vue_vue_type_script_setup_true_lang-DFfKsmvj.js} +96 -86
- package/dist/{SelectTextInput.vue_vue_type_script_setup_true_lang-BVaViHPl.js → SelectTextInput.vue_vue_type_script_setup_true_lang-C3BGLjY1.js} +1 -1
- package/dist/{TabGroup.vue_vue_type_script_setup_true_lang-pEKm-uUq.js → TabGroup.vue_vue_type_script_setup_true_lang-BzqtAqbr.js} +1 -1
- package/dist/{TabGroupUnderline.vue_vue_type_script_setup_true_lang--IKyRPkX.js → TabGroupUnderline.vue_vue_type_script_setup_true_lang-C6OYRDCq.js} +1 -1
- package/dist/{TabsInPills.vue_vue_type_script_setup_true_lang-EG0nj4F6.js → TabsInPills.vue_vue_type_script_setup_true_lang-C7T3PUnB.js} +1 -1
- package/dist/TextInput-C5IzX7m_.js +131 -0
- package/dist/calendars/CalendarDashboard.js +1 -1
- package/dist/calendars/CalendarHeader.js +1 -1
- package/dist/forms/DynamicForm.js +1 -1
- package/dist/forms/DynamicFormField.js +1 -1
- package/dist/index.js +132 -132
- package/dist/inputs/AddressInput.js +148 -146
- package/dist/inputs/ComboboxInput.js +1 -1
- package/dist/inputs/SelectInput.js +1 -1
- package/dist/inputs/SelectTextInput.js +1 -1
- package/dist/inputs/TextInput.js +3 -108
- package/dist/src/components/inputs/AddressInput.d.ts +6 -0
- package/dist/src/components/inputs/ComboboxInput.d.ts +3 -0
- package/dist/src/components/inputs/TextInput.d.ts +1 -0
- package/dist/src/types/ui.d.ts +5 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/validation.d.ts +11 -0
- package/dist/style.css +1 -1
- package/dist/tabs/InlineTabs.js +1 -1
- package/dist/tabs/TabGroup.js +1 -1
- package/dist/tabs/TabGroupUnderline.js +1 -1
- package/dist/tabs/TabsInPills.js +1 -1
- package/dist/tabs/index.js +4 -4
- package/dist/ui.css +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as P, watch as M, onBeforeUnmount as Q, ref as S, computed as
|
|
2
|
-
import { Listbox as se, ListboxButton as te, ListboxOptions as ae, ListboxOption as
|
|
3
|
-
import { XMarkIcon as
|
|
1
|
+
import { defineComponent as P, watch as M, onBeforeUnmount as Q, ref as S, computed as f, createElementBlock as d, openBlock as n, createVNode as u, unref as o, withCtx as m, createElementVNode as c, createBlock as x, normalizeClass as h, createCommentVNode as p, resolveDynamicComponent as R, toDisplayString as b, withModifiers as L, Teleport as Y, Transition as Z, normalizeStyle as _, Fragment as ee, renderList as le } from "vue";
|
|
2
|
+
import { Listbox as se, ListboxButton as te, ListboxOptions as ae, ListboxOption as oe } from "@headlessui/vue";
|
|
3
|
+
import { XMarkIcon as re, ChevronUpDownIcon as ne, CheckIcon as ie } from "@heroicons/vue/20/solid";
|
|
4
4
|
import { useField as ue } from "vee-validate";
|
|
5
5
|
import de from "./forms/FormFieldWrapper.js";
|
|
6
6
|
import { g as ce } from "./id-DafBB_QF.js";
|
|
7
|
-
const me = { class: "sl-w-full" },
|
|
7
|
+
const me = { class: "sl-w-full" }, fe = { class: "sl-relative" }, pe = { class: "sl-flex sl-items-center sl-gap-2" }, ve = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "sl-block sl-truncate sl-text-left"
|
|
10
10
|
}, he = {
|
|
@@ -13,7 +13,7 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
13
13
|
}, be = { class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2 sl-gap-1" }, ge = { class: "sl-block sl-truncate sl-font-medium" }, ye = { class: "sl-flex sl-items-center sl-gap-2" }, xe = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-4"
|
|
16
|
-
}, ke = { key: 0 },
|
|
16
|
+
}, ke = { key: 0 }, D = 224, k = 4, Se = /* @__PURE__ */ P({
|
|
17
17
|
__name: "SelectInput",
|
|
18
18
|
props: {
|
|
19
19
|
name: {},
|
|
@@ -42,63 +42,63 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
42
42
|
updateFn: { type: Function, required: !0 }
|
|
43
43
|
},
|
|
44
44
|
setup(e) {
|
|
45
|
-
const
|
|
45
|
+
const l = () => {
|
|
46
46
|
e.open && e.updateFn();
|
|
47
47
|
};
|
|
48
|
-
return M(() => e.open, (
|
|
49
|
-
|
|
48
|
+
return M(() => e.open, (r) => {
|
|
49
|
+
r ? (e.updateFn(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l)) : (window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l));
|
|
50
50
|
}, { immediate: !0 }), Q(() => {
|
|
51
|
-
window.removeEventListener("scroll",
|
|
51
|
+
window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
|
|
52
52
|
}), () => null;
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), F = S(null), w = S({
|
|
55
55
|
top: "0px",
|
|
56
56
|
left: "0px",
|
|
57
57
|
width: "200px"
|
|
58
58
|
});
|
|
59
|
-
function
|
|
60
|
-
const e =
|
|
59
|
+
function I() {
|
|
60
|
+
const e = F.value?.$el;
|
|
61
61
|
if (!e) return;
|
|
62
|
-
const
|
|
63
|
-
i <
|
|
64
|
-
bottom: `${
|
|
65
|
-
left: `${
|
|
66
|
-
width: `${
|
|
67
|
-
maxHeight: `${Math.min(
|
|
68
|
-
} :
|
|
69
|
-
top: `${
|
|
70
|
-
left: `${
|
|
71
|
-
width: `${
|
|
72
|
-
maxHeight: `${Math.min(i,
|
|
62
|
+
const l = e.getBoundingClientRect(), r = window.innerHeight, i = r - l.bottom - k, v = l.top - k;
|
|
63
|
+
i < D && v > i ? w.value = {
|
|
64
|
+
bottom: `${r - l.top + k}px`,
|
|
65
|
+
left: `${l.left}px`,
|
|
66
|
+
width: `${l.width}px`,
|
|
67
|
+
maxHeight: `${Math.min(v, D)}px`
|
|
68
|
+
} : w.value = {
|
|
69
|
+
top: `${l.bottom + k}px`,
|
|
70
|
+
left: `${l.left}px`,
|
|
71
|
+
width: `${l.width}px`,
|
|
72
|
+
maxHeight: `${Math.min(i, D)}px`
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
const t = a, W = K,
|
|
75
|
+
const t = a, W = K, O = ce(t.name), { value: g, errorMessage: $, handleChange: A, meta: y, setTouched: E } = ue(
|
|
76
76
|
() => t.name,
|
|
77
77
|
t.rules,
|
|
78
78
|
{
|
|
79
79
|
validateOnMount: t.validateOnMount,
|
|
80
80
|
initialValue: t.modelValue
|
|
81
81
|
}
|
|
82
|
-
),
|
|
82
|
+
), s = S(
|
|
83
83
|
t.multiple ? Array.isArray(t.modelValue) ? t.modelValue : [] : t.modelValue
|
|
84
84
|
);
|
|
85
85
|
M(
|
|
86
86
|
() => t.modelValue,
|
|
87
87
|
(e) => {
|
|
88
88
|
if (t.multiple) {
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const l = Array.isArray(e) ? e : [];
|
|
90
|
+
l !== s.value && (s.value = l, g.value = l);
|
|
91
91
|
} else
|
|
92
|
-
e !==
|
|
92
|
+
e !== s.value && (s.value = e, g.value = e);
|
|
93
93
|
},
|
|
94
94
|
{ immediate: !0 }
|
|
95
95
|
), M(
|
|
96
|
-
|
|
96
|
+
s,
|
|
97
97
|
(e) => {
|
|
98
98
|
W("update:modelValue", e);
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
|
-
const j =
|
|
101
|
+
const j = f(() => {
|
|
102
102
|
const e = [
|
|
103
103
|
"sl-relative",
|
|
104
104
|
"sl-w-full",
|
|
@@ -115,7 +115,11 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
115
115
|
"sl-border",
|
|
116
116
|
"sl-text-sm",
|
|
117
117
|
"sl-outline-none",
|
|
118
|
+
"dark:sl-outline-none",
|
|
118
119
|
"focus:sl-outline-none",
|
|
120
|
+
"dark:focus:sl-outline-none",
|
|
121
|
+
"[&_*]:sl-outline-none",
|
|
122
|
+
"dark:[&_*]:sl-outline-none",
|
|
119
123
|
"focus:sl-ring-2",
|
|
120
124
|
"focus:sl-ring-stachelock-500",
|
|
121
125
|
"focus:sl-border-stachelock-500",
|
|
@@ -135,7 +139,7 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
135
139
|
"dark:sl-border-red-500",
|
|
136
140
|
"focus:sl-ring-red-500",
|
|
137
141
|
"focus:sl-border-red-500"
|
|
138
|
-
) :
|
|
142
|
+
) : y.valid && y.touched ? e.push(
|
|
139
143
|
"sl-border-green-300",
|
|
140
144
|
"dark:sl-border-green-500",
|
|
141
145
|
"focus:sl-ring-green-500",
|
|
@@ -146,71 +150,77 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
146
150
|
"hover:sl-border-gray-400",
|
|
147
151
|
"dark:hover:sl-border-slate-500"
|
|
148
152
|
), e.join(" ");
|
|
149
|
-
}),
|
|
150
|
-
|
|
151
|
-
}, N =
|
|
152
|
-
if (!t.multiple || !Array.isArray(
|
|
153
|
+
}), C = (e) => e[t.itemKey], B = (e) => e[t.itemText] || e.toString(), T = f(() => s.value ? t.multiple && Array.isArray(s.value) ? s.value.length === 0 ? "" : s.value.length === 1 ? B(s.value[0]) : `${s.value.length} items selected` : B(s.value) : ""), z = f(() => s.value ? t.multiple && Array.isArray(s.value) ? s.value.length === 1 ? s.value[0].icon : null : s.value.icon : null), H = f(() => t.items.filter((e) => !e.disabled)), q = (e) => {
|
|
154
|
+
s.value = e, E(!0), A(e);
|
|
155
|
+
}, N = f(() => {
|
|
156
|
+
if (!t.multiple || !Array.isArray(s.value)) return !1;
|
|
153
157
|
const e = H.value;
|
|
154
158
|
if (e.length === 0) return !1;
|
|
155
|
-
const
|
|
156
|
-
return e.every((
|
|
159
|
+
const l = new Set(s.value.map((r) => C(r)));
|
|
160
|
+
return e.every((r) => l.has(C(r)));
|
|
157
161
|
}), G = () => {
|
|
158
|
-
t.multiple && (N.value ?
|
|
159
|
-
}, X =
|
|
160
|
-
|
|
162
|
+
t.multiple && (N.value ? s.value = [] : s.value = [...H.value], A(s.value));
|
|
163
|
+
}, X = f(() => {
|
|
164
|
+
if (!t.clearable) return !1;
|
|
165
|
+
const e = s.value ?? g.value;
|
|
166
|
+
return t.multiple && Array.isArray(e) ? e.length > 0 : e != null && e !== "";
|
|
167
|
+
}), J = (e) => {
|
|
168
|
+
e.stopPropagation(), e.preventDefault();
|
|
169
|
+
const l = t.multiple ? [] : null;
|
|
170
|
+
s.value = l, g.value = l, E(!0), A(l);
|
|
161
171
|
};
|
|
162
|
-
return (e,
|
|
172
|
+
return (e, l) => (n(), d("div", me, [
|
|
163
173
|
u(de, {
|
|
164
|
-
id:
|
|
174
|
+
id: o(O),
|
|
165
175
|
name: a.name,
|
|
166
176
|
label: a.label,
|
|
167
177
|
disabled: a.disabled,
|
|
168
178
|
optional: !a.rules,
|
|
169
179
|
"tertiary-label": a.tertiaryLabel,
|
|
170
180
|
"box-shadow": a.boxShadow,
|
|
171
|
-
"error-message":
|
|
181
|
+
"error-message": o($),
|
|
172
182
|
"success-message": a.successMessage,
|
|
173
|
-
"is-valid":
|
|
174
|
-
"is-touched":
|
|
183
|
+
"is-valid": o(y).valid,
|
|
184
|
+
"is-touched": o(y).touched,
|
|
175
185
|
"show-valid-check": !1
|
|
176
186
|
}, {
|
|
177
187
|
"success-message": m(() => [
|
|
178
|
-
a.successMessage ? (n(), d("span", ke, b(a.successMessage), 1)) :
|
|
188
|
+
a.successMessage ? (n(), d("span", ke, b(a.successMessage), 1)) : p("", !0)
|
|
179
189
|
]),
|
|
180
190
|
default: m(() => [
|
|
181
|
-
u(
|
|
182
|
-
modelValue:
|
|
191
|
+
u(o(se), {
|
|
192
|
+
modelValue: s.value,
|
|
183
193
|
"onUpdate:modelValue": [
|
|
184
|
-
|
|
194
|
+
l[2] || (l[2] = (r) => s.value = r),
|
|
185
195
|
q
|
|
186
196
|
],
|
|
187
197
|
disabled: a.disabled,
|
|
188
198
|
multiple: a.multiple
|
|
189
199
|
}, {
|
|
190
|
-
default: m(({ open:
|
|
191
|
-
c("div",
|
|
192
|
-
u(
|
|
193
|
-
open:
|
|
194
|
-
"update-fn":
|
|
200
|
+
default: m(({ open: r }) => [
|
|
201
|
+
c("div", fe, [
|
|
202
|
+
u(o(U), {
|
|
203
|
+
open: r,
|
|
204
|
+
"update-fn": I
|
|
195
205
|
}, null, 8, ["open"]),
|
|
196
|
-
u(
|
|
206
|
+
u(o(te), {
|
|
197
207
|
ref_key: "listboxButtonRef",
|
|
198
|
-
ref:
|
|
199
|
-
id:
|
|
208
|
+
ref: F,
|
|
209
|
+
id: o(O),
|
|
200
210
|
class: h([
|
|
201
211
|
j.value,
|
|
202
212
|
a.buttonClass
|
|
203
213
|
]),
|
|
204
|
-
onClick:
|
|
214
|
+
onClick: I
|
|
205
215
|
}, {
|
|
206
216
|
default: m(() => [
|
|
207
|
-
c("span",
|
|
208
|
-
z.value ? (n(),
|
|
217
|
+
c("span", pe, [
|
|
218
|
+
z.value ? (n(), x(R(z.value), {
|
|
209
219
|
key: 0,
|
|
210
220
|
class: "sl-h-4 sl-w-4 sl-flex-shrink-0",
|
|
211
221
|
"aria-hidden": "true"
|
|
212
|
-
})) :
|
|
213
|
-
T.value ? (n(), d("span",
|
|
222
|
+
})) : p("", !0),
|
|
223
|
+
T.value ? (n(), d("span", ve, b(T.value), 1)) : (n(), d("span", he, b(a.placeholder || "Select an option"), 1))
|
|
214
224
|
]),
|
|
215
225
|
c("span", be, [
|
|
216
226
|
X.value ? (n(), d("button", {
|
|
@@ -218,16 +228,16 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
218
228
|
type: "button",
|
|
219
229
|
class: "sl-p-0.5 sl-rounded-full sl-text-gray-400 dark:sl-text-slate-400 hover:sl-text-gray-600 dark:hover:sl-text-slate-200 hover:sl-bg-gray-100 dark:hover:sl-bg-slate-700 focus:sl-outline-none",
|
|
220
230
|
onClick: J,
|
|
221
|
-
onMousedown:
|
|
231
|
+
onMousedown: l[0] || (l[0] = L(() => {
|
|
222
232
|
}, ["prevent"]))
|
|
223
233
|
}, [
|
|
224
|
-
u(
|
|
234
|
+
u(o(re), {
|
|
225
235
|
class: "sl-h-4 sl-w-4",
|
|
226
236
|
"aria-hidden": "true"
|
|
227
237
|
}),
|
|
228
|
-
|
|
229
|
-
], 32)) :
|
|
230
|
-
u(
|
|
238
|
+
l[3] || (l[3] = c("span", { class: "sl-sr-only" }, "Clear selection", -1))
|
|
239
|
+
], 32)) : p("", !0),
|
|
240
|
+
u(o(ne), {
|
|
231
241
|
class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-300 sl-pointer-events-none",
|
|
232
242
|
"aria-hidden": "true"
|
|
233
243
|
})
|
|
@@ -235,65 +245,65 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
235
245
|
]),
|
|
236
246
|
_: 1
|
|
237
247
|
}, 8, ["id", "class"]),
|
|
238
|
-
(n(),
|
|
248
|
+
(n(), x(Y, { to: "body" }, [
|
|
239
249
|
u(Z, {
|
|
240
250
|
"leave-active-class": "sl-transition sl-duration-100 sl-ease-in",
|
|
241
251
|
"leave-from-class": "sl-opacity-100",
|
|
242
252
|
"leave-to-class": "sl-opacity-0"
|
|
243
253
|
}, {
|
|
244
254
|
default: m(() => [
|
|
245
|
-
u(
|
|
255
|
+
u(o(ae), {
|
|
246
256
|
class: "sl-fixed sl-z-[9999] sl-overflow-auto sl-rounded-md sl-bg-white dark:sl-bg-slate-800 sl-py-1 sl-text-base sl-shadow-lg dark:sl-shadow-slate-900/50 sl-ring-1 sl-ring-black sl-ring-opacity-5 dark:sl-ring-slate-700 focus:sl-outline-none sm:sl-text-sm",
|
|
247
|
-
style: _(
|
|
257
|
+
style: _(w.value)
|
|
248
258
|
}, {
|
|
249
259
|
default: m(() => [
|
|
250
260
|
a.multiple && a.showAll ? (n(), d("li", {
|
|
251
261
|
key: 0,
|
|
252
262
|
role: "button",
|
|
253
263
|
tabindex: "0",
|
|
254
|
-
onMousedown:
|
|
264
|
+
onMousedown: l[1] || (l[1] = L(() => {
|
|
255
265
|
}, ["prevent"])),
|
|
256
|
-
onClick:
|
|
266
|
+
onClick: L(G, ["prevent", "stop"]),
|
|
257
267
|
class: h([
|
|
258
268
|
"sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-3 sl-pr-9 sl-text-gray-900 dark:sl-text-slate-200",
|
|
259
269
|
"hover:sl-bg-stachelock-600 hover:sl-text-white"
|
|
260
270
|
])
|
|
261
271
|
}, [
|
|
262
272
|
c("span", ge, b(N.value ? "Unselect All" : "Select All"), 1)
|
|
263
|
-
], 32)) :
|
|
264
|
-
(n(!0), d(ee, null, le(a.items, (i) => (n(),
|
|
265
|
-
key:
|
|
273
|
+
], 32)) : p("", !0),
|
|
274
|
+
(n(!0), d(ee, null, le(a.items, (i) => (n(), x(o(oe), {
|
|
275
|
+
key: C(i),
|
|
266
276
|
value: i,
|
|
267
277
|
as: "template",
|
|
268
278
|
disabled: i.disabled
|
|
269
279
|
}, {
|
|
270
|
-
default: m(({ active:
|
|
280
|
+
default: m(({ active: v, selected: V }) => [
|
|
271
281
|
c("li", {
|
|
272
282
|
class: h([
|
|
273
283
|
"sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-3 sl-pr-9",
|
|
274
|
-
|
|
284
|
+
v ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200",
|
|
275
285
|
i.disabled ? "sl-opacity-50 sl-cursor-not-allowed" : ""
|
|
276
286
|
])
|
|
277
287
|
}, [
|
|
278
288
|
c("div", ye, [
|
|
279
|
-
i.icon ? (n(),
|
|
289
|
+
i.icon ? (n(), x(R(i.icon), {
|
|
280
290
|
key: 0,
|
|
281
|
-
class: h(["sl-h-4 sl-w-4 sl-flex-shrink-0",
|
|
291
|
+
class: h(["sl-h-4 sl-w-4 sl-flex-shrink-0", v ? "sl-text-white" : "sl-text-gray-400 dark:sl-text-slate-300"]),
|
|
282
292
|
"aria-hidden": "true"
|
|
283
|
-
}, null, 8, ["class"])) :
|
|
293
|
+
}, null, 8, ["class"])) : p("", !0),
|
|
284
294
|
c("span", {
|
|
285
295
|
class: h([
|
|
286
296
|
"sl-block sl-truncate",
|
|
287
|
-
|
|
297
|
+
V ? "sl-font-medium" : "sl-font-normal"
|
|
288
298
|
])
|
|
289
|
-
}, b(
|
|
299
|
+
}, b(B(i)), 3)
|
|
290
300
|
]),
|
|
291
|
-
|
|
292
|
-
u(
|
|
301
|
+
V ? (n(), d("span", xe, [
|
|
302
|
+
u(o(ie), {
|
|
293
303
|
class: "sl-h-5 sl-w-5",
|
|
294
304
|
"aria-hidden": "true"
|
|
295
305
|
})
|
|
296
|
-
])) :
|
|
306
|
+
])) : p("", !0)
|
|
297
307
|
], 2)
|
|
298
308
|
]),
|
|
299
309
|
_: 2
|
|
@@ -316,5 +326,5 @@ const me = { class: "sl-w-full" }, ve = { class: "sl-relative" }, fe = { class:
|
|
|
316
326
|
}
|
|
317
327
|
});
|
|
318
328
|
export {
|
|
319
|
-
|
|
329
|
+
Se as _
|
|
320
330
|
};
|
|
@@ -21,7 +21,7 @@ const ye = {
|
|
|
21
21
|
style: { color: "var(--sl-text-secondary)" }
|
|
22
22
|
}, we = {
|
|
23
23
|
key: 2,
|
|
24
|
-
class: "sl-text-
|
|
24
|
+
class: "sl-text-2xs sl-uppercase sl-truncate sl-font-semibold sl-block",
|
|
25
25
|
style: { color: "var(--sl-text-secondary)" }
|
|
26
26
|
}, Se = { class: "sl-relative sl-mt-1" }, Le = {
|
|
27
27
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as P, computed as v, createElementBlock as a, openBlock as o, createCommentVNode as d, createVNode as u, unref as s, withCtx as c, createElementVNode as m, Fragment as j, renderList as z, createBlock as p, normalizeClass as _, createTextVNode as A, toDisplayString as k, renderSlot as y, KeepAlive as F, resolveDynamicComponent as K, mergeProps as U, toHandlers as q } from "vue";
|
|
2
2
|
import { TabGroup as J, TabList as Q, Tab as R } from "@headlessui/vue";
|
|
3
3
|
import { useTabs as W } from "./composables/useTabs.js";
|
|
4
|
-
import { _ as X } from "./SelectInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as X } from "./SelectInput.vue_vue_type_script_setup_true_lang-DFfKsmvj.js";
|
|
5
5
|
const Y = { class: "sl-w-full" }, Z = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "sl-block sm:sl-hidden sl-mb-4"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as P, computed as x, createElementBlock as n, openBlock as t, createCommentVNode as r, createVNode as v, toDisplayString as m, unref as l, withCtx as F, createElementVNode as c, Fragment as L, renderList as U, normalizeClass as f, createTextVNode as z, renderSlot as g, createBlock as y, KeepAlive as A, resolveDynamicComponent as K, mergeProps as j, toHandlers as q } from "vue";
|
|
2
2
|
import { TabGroup as J } from "@headlessui/vue";
|
|
3
3
|
import { useTabs as Q } from "./composables/useTabs.js";
|
|
4
|
-
import { _ as R } from "./SelectInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as R } from "./SelectInput.vue_vue_type_script_setup_true_lang-DFfKsmvj.js";
|
|
5
5
|
const W = { class: "sl-w-full" }, X = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "sl-text-lg sl-font-semibold sl-text-gray-900 dark:sl-text-white sl-mb-4"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as I, createElementBlock as l, openBlock as t, createElementVNode as o, renderSlot as m, createVNode as V, unref as s, Fragment as r, renderList as i, normalizeClass as u, withModifiers as w, createTextVNode as N, createCommentVNode as h, toDisplayString as p } from "vue";
|
|
2
|
-
import { _ as S } from "./SelectInput.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as S } from "./SelectInput.vue_vue_type_script_setup_true_lang-DFfKsmvj.js";
|
|
3
3
|
import { u as $ } from "./useSimpleTabs-CSgkChEU.js";
|
|
4
4
|
const B = { class: "sl-w-full" }, E = { class: "sm:sl-hidden" }, U = { class: "sl-hidden sm:sl-block sl-overflow-x-auto" }, z = {
|
|
5
5
|
class: "sl-flex sl-flex-nowrap sl-space-x-4",
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent as C, computed as F, ref as h, toRef as m, watch as p, nextTick as j, createElementBlock as I, openBlock as R, createVNode as T, unref as o, withCtx as u, renderSlot as y, createElementVNode as z, mergeProps as S } from "vue";
|
|
2
|
+
import { useField as E } from "vee-validate";
|
|
3
|
+
import { debounce as N } from "lodash-es";
|
|
4
|
+
import A from "./forms/FormFieldWrapper.js";
|
|
5
|
+
import { g as $ } from "./id-DafBB_QF.js";
|
|
6
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
function P(e) {
|
|
8
|
+
if (!e || typeof e == "object" && Object.keys(e).length === 0) return !0;
|
|
9
|
+
if (typeof e == "object" && "tests" in e && Array.isArray(e.tests))
|
|
10
|
+
return !e.tests.some(
|
|
11
|
+
(l) => l.OPTIONS?.name === "required" || l.name === "required"
|
|
12
|
+
);
|
|
13
|
+
if (typeof e == "object" && typeof e.describe == "function")
|
|
14
|
+
try {
|
|
15
|
+
const s = e.describe();
|
|
16
|
+
if (s.tests)
|
|
17
|
+
return !s.tests.some(
|
|
18
|
+
(l) => l.name === "required"
|
|
19
|
+
);
|
|
20
|
+
} catch {
|
|
21
|
+
return !1;
|
|
22
|
+
}
|
|
23
|
+
return !(typeof e == "object" && e.spec?.presence === "required" || typeof e == "function" || typeof e == "object" && Object.keys(e).length > 0);
|
|
24
|
+
}
|
|
25
|
+
const U = { class: "sl-form" }, W = ["name", "id", "type", "value", "placeholder", "spellcheck", "disabled"], D = /* @__PURE__ */ C({
|
|
26
|
+
inheritAttrs: !1,
|
|
27
|
+
__name: "TextInput",
|
|
28
|
+
props: {
|
|
29
|
+
boxShadow: { type: Boolean, default: !1 },
|
|
30
|
+
type: { default: "text" },
|
|
31
|
+
value: { default: "" },
|
|
32
|
+
rules: { default: () => ({}) },
|
|
33
|
+
validateOnMount: { type: Boolean, default: !0 },
|
|
34
|
+
inputClass: { default: "" },
|
|
35
|
+
inputStyle: { default: "" },
|
|
36
|
+
spellcheck: { type: Boolean, default: !0 },
|
|
37
|
+
capitalize: { type: Boolean, default: !1 },
|
|
38
|
+
lazy: { type: Boolean, default: !1 },
|
|
39
|
+
transformFunction: { type: Function, default: (e) => e },
|
|
40
|
+
showErrors: { type: Boolean, default: !1 },
|
|
41
|
+
optional: { type: Boolean, default: void 0 },
|
|
42
|
+
name: {},
|
|
43
|
+
label: { default: "" },
|
|
44
|
+
placeholder: { default: "" },
|
|
45
|
+
disabled: { type: Boolean, default: !1 },
|
|
46
|
+
required: { type: Boolean },
|
|
47
|
+
className: {},
|
|
48
|
+
errorMessage: {},
|
|
49
|
+
successMessage: { default: "" },
|
|
50
|
+
isValid: { type: Boolean },
|
|
51
|
+
isTouched: { type: Boolean },
|
|
52
|
+
colorfulValidation: { type: Boolean, default: !0 },
|
|
53
|
+
showValidCheck: { type: Boolean, default: !0 },
|
|
54
|
+
tertiaryLabel: { default: "" },
|
|
55
|
+
disabledMessage: { default: "" }
|
|
56
|
+
},
|
|
57
|
+
emits: ["update:value", "focus", "blur", "error", "update:validity"],
|
|
58
|
+
setup(e, { emit: s }) {
|
|
59
|
+
const a = e, l = s, b = F(() => a.optional !== void 0 ? a.optional : P(a.rules)), c = h(!1), f = $(a.name || "text-input"), v = h(a.validateOnMount), { value: i, errorMessage: g, handleChange: w, meta: d, validate: x, setTouched: k } = E(m(a, "name"), m(a, "rules"), {
|
|
60
|
+
initialValue: a.value,
|
|
61
|
+
validateOnValueUpdate: !a.lazy,
|
|
62
|
+
validateOnMount: v.value
|
|
63
|
+
}), r = (t) => l("update:value", t), B = N(r, 300);
|
|
64
|
+
function V(t) {
|
|
65
|
+
const n = t.target.value;
|
|
66
|
+
a.lazy ? B(n) : r(n), w(a.transformFunction(n));
|
|
67
|
+
}
|
|
68
|
+
async function O(t) {
|
|
69
|
+
c.value || (c.value = !0, k(!0)), a.lazy && r(i.value), await x(), l("blur", t);
|
|
70
|
+
}
|
|
71
|
+
function M(t) {
|
|
72
|
+
l("focus", t);
|
|
73
|
+
}
|
|
74
|
+
return p(() => d.valid, (t) => j(() => l("update:validity", t)), { immediate: !0 }), p(() => a.value, (t) => {
|
|
75
|
+
t !== i.value && (i.value = t);
|
|
76
|
+
}), (t, n) => (R(), I("div", U, [
|
|
77
|
+
T(A, {
|
|
78
|
+
id: o(f),
|
|
79
|
+
name: e.name,
|
|
80
|
+
label: e.label,
|
|
81
|
+
"tertiary-label": e.tertiaryLabel,
|
|
82
|
+
"error-message": o(g),
|
|
83
|
+
"success-message": e.successMessage,
|
|
84
|
+
"is-valid": o(d).valid,
|
|
85
|
+
"is-touched": o(d).touched,
|
|
86
|
+
"show-errors": e.showErrors,
|
|
87
|
+
"show-valid-check": e.showValidCheck,
|
|
88
|
+
"colorful-validation": e.colorfulValidation,
|
|
89
|
+
disabled: e.disabled,
|
|
90
|
+
"disabled-message": e.disabledMessage,
|
|
91
|
+
"box-shadow": e.boxShadow,
|
|
92
|
+
optional: b.value
|
|
93
|
+
}, {
|
|
94
|
+
prefix: u(() => [
|
|
95
|
+
y(t.$slots, "prefix", {}, void 0, !0)
|
|
96
|
+
]),
|
|
97
|
+
default: u(({ inputClasses: q }) => [
|
|
98
|
+
z("input", S(t.$attrs, {
|
|
99
|
+
name: e.name,
|
|
100
|
+
id: o(f),
|
|
101
|
+
type: e.type,
|
|
102
|
+
value: o(i),
|
|
103
|
+
placeholder: e.placeholder,
|
|
104
|
+
spellcheck: e.spellcheck,
|
|
105
|
+
disabled: e.disabled,
|
|
106
|
+
class: ["sl-block sl-w-full sl-bg-transparent placeholder:sl-text-gray-400 dark:placeholder:sl-text-gray-400 focus:sl-ring-0 focus:sl-outline-none sm:sl-text-sm sm:sl-leading-6", [
|
|
107
|
+
q,
|
|
108
|
+
"sl-py-1.5 sl-pl-2 sl-pr-2",
|
|
109
|
+
{ "sl-uppercase": e.capitalize },
|
|
110
|
+
e.disabled ? "sl-text-gray-500 dark:sl-text-slate-400 sl-cursor-not-allowed" : "sl-text-gray-900 dark:sl-text-white",
|
|
111
|
+
{ "sl-pr-10": e.showValidCheck },
|
|
112
|
+
e.inputClass
|
|
113
|
+
]],
|
|
114
|
+
style: e.inputStyle,
|
|
115
|
+
onInput: V,
|
|
116
|
+
onFocus: M,
|
|
117
|
+
onBlur: O
|
|
118
|
+
}), null, 16, W)
|
|
119
|
+
]),
|
|
120
|
+
"input-right": u(() => [
|
|
121
|
+
y(t.$slots, "input-right", {}, void 0, !0)
|
|
122
|
+
]),
|
|
123
|
+
_: 3
|
|
124
|
+
}, 8, ["id", "name", "label", "tertiary-label", "error-message", "success-message", "is-valid", "is-touched", "show-errors", "show-valid-check", "colorful-validation", "disabled", "disabled-message", "box-shadow", "optional"])
|
|
125
|
+
]));
|
|
126
|
+
}
|
|
127
|
+
}), Y = /* @__PURE__ */ L(D, [["__scopeId", "data-v-653ccf8c"]]);
|
|
128
|
+
export {
|
|
129
|
+
Y as T,
|
|
130
|
+
P as i
|
|
131
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, ref as w, computed as d, createElementBlock as y, openBlock as D, createElementVNode as r, createVNode as s, withCtx as b, createTextVNode as x } from "vue";
|
|
2
|
-
import { _ as C } from "../CalendarHeader.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as C } from "../CalendarHeader.vue_vue_type_script_setup_true_lang-CMBsY5Y0.js";
|
|
3
3
|
import { _ as S } from "../MonthCalendar.vue_vue_type_style_index_0_lang-lnKkvJ9u.js";
|
|
4
4
|
import { _ as E } from "../EventsList.vue_vue_type_script_setup_true_lang-BTIoGr_e.js";
|
|
5
5
|
import V from "../components/Button.js";
|