@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,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as P, ref as v, computed as x, watch as D, onMounted as q, onUnmounted as J, createElementBlock as d, openBlock as c, createElementVNode as s, toDisplayString as u, createVNode as y, unref as C, createCommentVNode as S, renderSlot as M, Fragment as _, withCtx as $, createTextVNode as Q, Transition as X, withDirectives as Z, renderList as ee, normalizeClass as te, vShow as se } from "vue";
|
|
2
2
|
import { ChevronLeftIcon as le, ChevronRightIcon as ae, EllipsisHorizontalIcon as re } from "@heroicons/vue/20/solid";
|
|
3
3
|
import ne from "./components/Button.js";
|
|
4
|
-
import { _ as oe } from "./SelectInput.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as oe } from "./SelectInput.vue_vue_type_script_setup_true_lang-DFfKsmvj.js";
|
|
5
5
|
import { t as h, p as A, b as ie, g as de, a as O } from "./calendar-DLry-Vik.js";
|
|
6
6
|
const ce = { class: "sl-flex sl-items-center sl-justify-between sl-border-b sl-border-gray-200 dark:sl-border-slate-700 sl-pl-6 sl-py-4 lg:sl-flex-none sl-bg-white dark:sl-bg-slate-900" }, ue = { class: "sl-text-base sl-font-semibold sl-leading-6 sl-text-gray-800 dark:sl-text-slate-200" }, ye = ["datetime"], me = { class: "sl-flex sl-items-center" }, ge = { class: "sl-relative sl-flex sl-items-center sl-rounded-md sl-bg-white dark:sl-bg-slate-800 sl-shadow-sm md:sl-items-stretch" }, ve = { class: "sl-sr-only" }, he = { class: "sl-sr-only" }, fe = { class: "sl-hidden md:sl-ml-4 md:sl-flex md:sl-items-center" }, be = { class: "sl-w-36" }, ke = { class: "sl-absolute sl-right-0 sl-z-10 sl-mt-3 sl-w-36 sl-origin-top-right sl-divide-y sl-divide-gray-100 dark:sl-divide-slate-700 sl-overflow-hidden sl-rounded-md sl-bg-white dark:sl-bg-slate-800 sl-shadow-lg sl-ring-1 sl-ring-black dark:sl-ring-slate-600 sl-ring-opacity-5 focus:sl-outline-none" }, we = {
|
|
7
7
|
key: 0,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Combobox as re, ComboboxInput as
|
|
3
|
-
import { XMarkIcon as
|
|
4
|
-
import { useField as
|
|
5
|
-
import
|
|
6
|
-
import { _ as
|
|
7
|
-
import { g as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as te, ref as w, watch as F, computed as x, createElementBlock as m, openBlock as u, createVNode as d, unref as r, withCtx as v, createElementVNode as c, normalizeClass as y, createCommentVNode as f, withModifiers as B, createBlock as N, toDisplayString as M, Fragment as ae, renderList as oe } from "vue";
|
|
2
|
+
import { Combobox as re, ComboboxInput as ne, ComboboxButton as ue, TransitionRoot as ie, ComboboxOptions as de, ComboboxOption as U } from "@headlessui/vue";
|
|
3
|
+
import { XMarkIcon as ce, ChevronUpDownIcon as me, CheckIcon as z } from "@heroicons/vue/20/solid";
|
|
4
|
+
import { useField as ve } from "vee-validate";
|
|
5
|
+
import fe from "./forms/FormFieldWrapper.js";
|
|
6
|
+
import { _ as pe } from "./UiLoading.vue_vue_type_script_setup_true_lang-rNvtzKbq.js";
|
|
7
|
+
import { g as ye } from "./id-DafBB_QF.js";
|
|
8
|
+
const be = { class: "sl-w-full" }, ge = { class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2 sl-gap-1" }, he = { class: "sl-block sl-truncate sl-font-medium" }, ke = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3 sl-text-stachelock-600 dark:sl-text-stachelock-400"
|
|
11
11
|
}, xe = {
|
|
12
12
|
key: 1,
|
|
13
13
|
class: "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700 dark:sl-text-slate-200"
|
|
14
|
-
},
|
|
14
|
+
}, we = { class: "sl-flex sl-items-center sl-gap-2" }, Ce = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-px-4 sl-text-gray-700 dark:sl-text-slate-200"
|
|
17
|
-
},
|
|
17
|
+
}, Ae = { class: "sl-block sl-truncate" }, Ve = { key: 0 }, Ie = 50, Ne = /* @__PURE__ */ te({
|
|
18
18
|
__name: "ComboboxInput",
|
|
19
19
|
props: {
|
|
20
20
|
name: {},
|
|
@@ -33,38 +33,39 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
33
33
|
multiple: { type: Boolean, default: !1 },
|
|
34
34
|
showAll: { type: Boolean, default: !1 },
|
|
35
35
|
modelValue: { type: [String, Number, Boolean, null, Object, Array] },
|
|
36
|
+
value: { type: [String, Number, Boolean, null, Object, Array] },
|
|
36
37
|
boxShadow: { type: Boolean, default: !1 },
|
|
37
38
|
clearable: { type: Boolean, default: !1 }
|
|
38
39
|
},
|
|
39
|
-
emits: ["update:modelValue", "update:query", "blur", "focus"],
|
|
40
|
-
setup(a, { emit:
|
|
41
|
-
const s = a,
|
|
40
|
+
emits: ["update:modelValue", "update:value", "update:query", "blur", "focus"],
|
|
41
|
+
setup(a, { emit: D }) {
|
|
42
|
+
const s = a, i = D, P = ye(s.name), o = w(""), C = s.modelValue ?? s.value, { value: b, errorMessage: K, handleChange: p, meta: A, setTouched: V } = ve(
|
|
42
43
|
() => s.name,
|
|
43
44
|
s.rules,
|
|
44
45
|
{
|
|
45
46
|
validateOnMount: s.validateOnMount,
|
|
46
|
-
initialValue:
|
|
47
|
+
initialValue: C
|
|
47
48
|
}
|
|
48
|
-
), t =
|
|
49
|
-
s.multiple ? Array.isArray(
|
|
49
|
+
), t = w(
|
|
50
|
+
s.multiple ? Array.isArray(C) ? C : [] : C ?? null
|
|
50
51
|
);
|
|
51
52
|
F(
|
|
52
|
-
() => s.modelValue,
|
|
53
|
+
() => s.modelValue ?? s.value,
|
|
53
54
|
(e) => {
|
|
54
55
|
if (s.multiple) {
|
|
55
56
|
const l = Array.isArray(e) ? e : [];
|
|
56
|
-
l !== t.value && (t.value = l,
|
|
57
|
+
l !== t.value && (t.value = l, b.value = l);
|
|
57
58
|
} else
|
|
58
|
-
e !== t.value && (t.value = e,
|
|
59
|
+
e !== t.value && (t.value = e, b.value = e);
|
|
59
60
|
},
|
|
60
61
|
{ immediate: !0 }
|
|
61
62
|
), F(
|
|
62
63
|
t,
|
|
63
64
|
(e) => {
|
|
64
|
-
|
|
65
|
+
i("update:modelValue", e), i("update:value", e);
|
|
65
66
|
}
|
|
66
67
|
);
|
|
67
|
-
const
|
|
68
|
+
const $ = x(() => [
|
|
68
69
|
"sl-w-full",
|
|
69
70
|
"sl-border-none",
|
|
70
71
|
"sl-py-2",
|
|
@@ -76,10 +77,13 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
76
77
|
"dark:sl-text-slate-100",
|
|
77
78
|
"placeholder:sl-text-gray-400",
|
|
78
79
|
"dark:placeholder:sl-text-slate-500",
|
|
80
|
+
"sl-outline-none",
|
|
79
81
|
"focus:sl-outline-none",
|
|
82
|
+
"dark:sl-outline-none",
|
|
83
|
+
"dark:focus:sl-outline-none",
|
|
80
84
|
"focus:sl-ring-0",
|
|
81
85
|
"sl-bg-transparent"
|
|
82
|
-
].join(" ")),
|
|
86
|
+
].join(" ")), H = x(() => {
|
|
83
87
|
const e = [
|
|
84
88
|
"sl-relative",
|
|
85
89
|
"sl-w-full",
|
|
@@ -90,7 +94,11 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
90
94
|
"sl-text-left",
|
|
91
95
|
"sl-border",
|
|
92
96
|
"sl-outline-none",
|
|
97
|
+
"dark:sl-outline-none",
|
|
93
98
|
"focus-within:sl-outline-none",
|
|
99
|
+
"dark:focus-within:sl-outline-none",
|
|
100
|
+
"[&_*]:sl-outline-none",
|
|
101
|
+
"dark:[&_*]:sl-outline-none",
|
|
94
102
|
"focus-within:sl-ring-2",
|
|
95
103
|
"focus-within:sl-ring-stachelock-500",
|
|
96
104
|
"focus-within:sl-border-stachelock-500",
|
|
@@ -103,12 +111,12 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
103
111
|
"sl-cursor-not-allowed",
|
|
104
112
|
"sl-border-gray-200",
|
|
105
113
|
"dark:sl-border-slate-700"
|
|
106
|
-
) :
|
|
114
|
+
) : K.value ? e.push(
|
|
107
115
|
"sl-border-red-300",
|
|
108
116
|
"dark:sl-border-red-500",
|
|
109
117
|
"focus-within:sl-ring-red-500",
|
|
110
118
|
"focus-within:sl-border-red-500"
|
|
111
|
-
) :
|
|
119
|
+
) : A.valid && A.touched ? e.push(
|
|
112
120
|
"sl-border-green-300",
|
|
113
121
|
"dark:sl-border-green-500",
|
|
114
122
|
"focus-within:sl-ring-green-500",
|
|
@@ -119,121 +127,129 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
119
127
|
"hover:sl-border-gray-400",
|
|
120
128
|
"dark:hover:sl-border-slate-500"
|
|
121
129
|
), e.join(" ");
|
|
122
|
-
}),
|
|
130
|
+
}), S = (e) => {
|
|
123
131
|
const l = e[s.itemKey];
|
|
124
132
|
return l == null ? "" : typeof l == "string" || typeof l == "number" ? l : String(l);
|
|
125
|
-
},
|
|
133
|
+
}, I = (e) => {
|
|
126
134
|
if (!e) return "";
|
|
127
135
|
const l = e[s.itemText];
|
|
128
136
|
return l != null ? String(l) : String(e);
|
|
129
|
-
},
|
|
130
|
-
const e =
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
if (
|
|
137
|
+
}, g = w([]), T = w([]), L = w(1), Q = () => {
|
|
138
|
+
const e = L.value * Ie;
|
|
139
|
+
T.value = g.value.slice(0, e), L.value += 1;
|
|
140
|
+
}, R = () => {
|
|
141
|
+
L.value = 1, T.value = [], Q();
|
|
142
|
+
}, j = () => {
|
|
143
|
+
if (o.value && o.value !== "")
|
|
136
144
|
if (s.customQuery)
|
|
137
|
-
|
|
145
|
+
g.value = s.customQuery(o.value, s.items);
|
|
138
146
|
else {
|
|
139
|
-
const e =
|
|
140
|
-
|
|
147
|
+
const e = o.value.toLowerCase();
|
|
148
|
+
g.value = s.items.filter((l) => I(l).toLowerCase().includes(e));
|
|
141
149
|
}
|
|
142
150
|
else
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, q = x(() => s.items.filter((e) => !e.disabled)),
|
|
151
|
+
g.value = s.items;
|
|
152
|
+
R();
|
|
153
|
+
}, q = x(() => s.items.filter((e) => !e.disabled)), W = (e) => {
|
|
146
154
|
const l = e.target;
|
|
147
|
-
|
|
148
|
-
},
|
|
155
|
+
o.value = l.value, i("update:query", o.value), j();
|
|
156
|
+
}, X = (e) => {
|
|
149
157
|
if (s.multiple) {
|
|
150
158
|
const l = Array.isArray(e) ? e : [];
|
|
151
|
-
t.value = l,
|
|
159
|
+
t.value = l, b.value = l, V(!0), p(l);
|
|
152
160
|
} else
|
|
153
|
-
t.value = e,
|
|
154
|
-
},
|
|
161
|
+
t.value = e, b.value = e, V(!0), p(e);
|
|
162
|
+
}, O = x(() => {
|
|
155
163
|
if (!s.multiple || !Array.isArray(t.value)) return !1;
|
|
156
164
|
const e = q.value;
|
|
157
165
|
if (e.length === 0) return !1;
|
|
158
|
-
const l = Array.isArray(t.value) ? t.value : [],
|
|
159
|
-
return e.every((
|
|
160
|
-
}),
|
|
161
|
-
s.multiple && (
|
|
162
|
-
},
|
|
163
|
-
s.multiple ||
|
|
164
|
-
}, Y = (e) => {
|
|
165
|
-
const l = e.target;
|
|
166
|
-
l.scrollTop + l.clientHeight >= l.scrollHeight && P();
|
|
166
|
+
const l = Array.isArray(t.value) ? t.value : [], n = new Set(l.map((k) => S(k)));
|
|
167
|
+
return e.every((k) => n.has(S(k)));
|
|
168
|
+
}), G = () => {
|
|
169
|
+
s.multiple && (O.value ? t.value = [] : t.value = [...q.value], V(!0), p(t.value), i("update:modelValue", t.value));
|
|
170
|
+
}, J = (e) => s.multiple ? !Array.isArray(e) || e.length === 0 ? "" : e.length === 1 ? I(e[0]) : `${e.length} selected` : I(e), h = x(() => s.multiple || o.value === "" ? null : { [s.itemKey]: null, [s.itemText]: o.value }), Y = () => {
|
|
171
|
+
s.multiple || h.value && (s.customQuery ? (i("update:modelValue", o.value), p(o.value)) : (t.value = h.value, p(t.value)));
|
|
167
172
|
}, Z = (e) => {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
const l = e.target;
|
|
174
|
+
l.scrollTop + l.clientHeight >= l.scrollHeight && Q();
|
|
175
|
+
}, _ = (e) => {
|
|
176
|
+
i("focus", e);
|
|
177
|
+
}, ee = x(() => {
|
|
178
|
+
if (!s.clearable) return !1;
|
|
179
|
+
const e = t.value ?? s.value ?? s.modelValue ?? b.value;
|
|
180
|
+
return s.multiple && Array.isArray(e) ? e.length > 0 : e != null && e !== "";
|
|
181
|
+
}), le = (e) => {
|
|
182
|
+
e.stopPropagation(), e.preventDefault();
|
|
183
|
+
const l = s.multiple ? [] : null;
|
|
184
|
+
t.value = l, b.value = l, o.value = "", V(!0), p(l), i("update:modelValue", l), i("update:value", l);
|
|
185
|
+
}, se = (e) => {
|
|
186
|
+
!s.multiple && h.value && (t.value = h.value, p(t.value), i("update:modelValue", t.value)), i("blur", e);
|
|
173
187
|
};
|
|
174
188
|
return F(() => s.items, () => {
|
|
175
|
-
|
|
176
|
-
}, { immediate: !0, deep: !0 }), (e, l) => (
|
|
177
|
-
|
|
178
|
-
id:
|
|
189
|
+
j();
|
|
190
|
+
}, { immediate: !0, deep: !0 }), (e, l) => (u(), m("div", be, [
|
|
191
|
+
d(fe, {
|
|
192
|
+
id: r(P),
|
|
179
193
|
name: a.name,
|
|
180
194
|
label: a.label,
|
|
181
195
|
disabled: a.disabled,
|
|
182
196
|
optional: !a.rules,
|
|
183
197
|
"tertiary-label": a.tertiaryLabel,
|
|
184
198
|
"box-shadow": a.boxShadow,
|
|
185
|
-
"error-message":
|
|
199
|
+
"error-message": r(K),
|
|
186
200
|
"success-message": a.successMessage,
|
|
187
|
-
"is-valid":
|
|
188
|
-
"is-touched":
|
|
201
|
+
"is-valid": r(A).valid,
|
|
202
|
+
"is-touched": r(A).touched,
|
|
189
203
|
"show-valid-check": !1
|
|
190
204
|
}, {
|
|
191
205
|
"success-message": v(() => [
|
|
192
|
-
a.successMessage ? (
|
|
206
|
+
a.successMessage ? (u(), m("span", Ve, M(a.successMessage), 1)) : f("", !0)
|
|
193
207
|
]),
|
|
194
208
|
default: v(() => [
|
|
195
|
-
|
|
209
|
+
d(r(re), {
|
|
196
210
|
modelValue: t.value,
|
|
197
211
|
"onUpdate:modelValue": [
|
|
198
|
-
l[4] || (l[4] = (
|
|
199
|
-
|
|
212
|
+
l[4] || (l[4] = (n) => t.value = n),
|
|
213
|
+
X
|
|
200
214
|
],
|
|
201
215
|
disabled: a.disabled,
|
|
202
|
-
multiple: a.multiple
|
|
216
|
+
multiple: a.multiple,
|
|
217
|
+
as: "div",
|
|
218
|
+
class: "sl-outline-none dark:sl-outline-none focus:sl-outline-none dark:focus:sl-outline-none"
|
|
203
219
|
}, {
|
|
204
220
|
default: v(() => [
|
|
205
|
-
|
|
206
|
-
class: y(
|
|
221
|
+
c("div", {
|
|
222
|
+
class: y(H.value)
|
|
207
223
|
}, [
|
|
208
|
-
|
|
209
|
-
id:
|
|
210
|
-
class: y(
|
|
211
|
-
"display-value":
|
|
224
|
+
d(r(ne), {
|
|
225
|
+
id: r(P),
|
|
226
|
+
class: y($.value),
|
|
227
|
+
"display-value": J,
|
|
212
228
|
placeholder: a.placeholder || "Type to search...",
|
|
213
|
-
modelValue:
|
|
214
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
215
|
-
onInput:
|
|
216
|
-
onBlur:
|
|
217
|
-
onFocus:
|
|
229
|
+
modelValue: o.value,
|
|
230
|
+
"onUpdate:modelValue": l[0] || (l[0] = (n) => o.value = n),
|
|
231
|
+
onInput: W,
|
|
232
|
+
onBlur: se,
|
|
233
|
+
onFocus: _
|
|
218
234
|
}, null, 8, ["id", "class", "placeholder", "modelValue"]),
|
|
219
|
-
|
|
220
|
-
|
|
235
|
+
c("div", ge, [
|
|
236
|
+
ee.value ? (u(), m("button", {
|
|
221
237
|
key: 0,
|
|
222
238
|
type: "button",
|
|
223
239
|
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",
|
|
224
|
-
onClick:
|
|
225
|
-
onMousedown: l[1] || (l[1] =
|
|
240
|
+
onClick: le,
|
|
241
|
+
onMousedown: l[1] || (l[1] = B(() => {
|
|
226
242
|
}, ["prevent"]))
|
|
227
243
|
}, [
|
|
228
|
-
|
|
244
|
+
d(r(ce), {
|
|
229
245
|
class: "sl-h-4 sl-w-4",
|
|
230
246
|
"aria-hidden": "true"
|
|
231
247
|
}),
|
|
232
|
-
l[5] || (l[5] =
|
|
248
|
+
l[5] || (l[5] = c("span", { class: "sl-sr-only" }, "Clear selection", -1))
|
|
233
249
|
], 32)) : f("", !0),
|
|
234
|
-
|
|
250
|
+
d(r(ue), { class: "sl-flex sl-items-center sl-outline-none focus:sl-outline-none dark:sl-outline-none dark:focus:sl-outline-none" }, {
|
|
235
251
|
default: v(() => [
|
|
236
|
-
|
|
252
|
+
d(r(me), {
|
|
237
253
|
class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-300",
|
|
238
254
|
"aria-hidden": "true"
|
|
239
255
|
})
|
|
@@ -241,71 +257,71 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
241
257
|
_: 1
|
|
242
258
|
})
|
|
243
259
|
]),
|
|
244
|
-
|
|
260
|
+
d(r(ie), {
|
|
245
261
|
leave: "sl-transition sl-ease-in sl-duration-100",
|
|
246
262
|
"leave-from": "sl-opacity-100",
|
|
247
263
|
"leave-to": "sl-opacity-0",
|
|
248
|
-
onAfterLeave: l[3] || (l[3] = (
|
|
264
|
+
onAfterLeave: l[3] || (l[3] = (n) => o.value = "")
|
|
249
265
|
}, {
|
|
250
266
|
default: v(() => [
|
|
251
|
-
|
|
267
|
+
g.value.length > 0 || o.value !== "" || a.multiple && a.showAll ? (u(), N(r(de), {
|
|
252
268
|
key: 0,
|
|
253
269
|
class: "sl-absolute sl-z-[9999] sl-mt-1 sl-max-h-60 sl-w-full 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",
|
|
254
|
-
onScroll:
|
|
270
|
+
onScroll: Z
|
|
255
271
|
}, {
|
|
256
272
|
default: v(() => [
|
|
257
|
-
a.multiple && a.showAll ? (
|
|
273
|
+
a.multiple && a.showAll ? (u(), m("li", {
|
|
258
274
|
key: 0,
|
|
259
275
|
role: "button",
|
|
260
276
|
tabindex: "0",
|
|
261
|
-
onMousedown: l[2] || (l[2] =
|
|
277
|
+
onMousedown: l[2] || (l[2] = B(() => {
|
|
262
278
|
}, ["prevent"])),
|
|
263
|
-
onClick:
|
|
279
|
+
onClick: B(G, ["prevent", "stop"]),
|
|
264
280
|
class: y([
|
|
265
281
|
"sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4 sl-text-gray-900 dark:sl-text-slate-200",
|
|
266
282
|
"hover:sl-bg-stachelock-600 hover:sl-text-white"
|
|
267
283
|
]),
|
|
268
284
|
"data-testid": "select-all-option"
|
|
269
285
|
}, [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
286
|
+
c("span", he, M(O.value ? "Unselect All" : "Select All"), 1),
|
|
287
|
+
O.value ? (u(), m("span", ke, [
|
|
288
|
+
d(r(z), {
|
|
273
289
|
class: "sl-h-5 sl-w-5",
|
|
274
290
|
"aria-hidden": "true"
|
|
275
291
|
})
|
|
276
292
|
])) : f("", !0)
|
|
277
293
|
], 32)) : f("", !0),
|
|
278
|
-
a.loading ? (
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
l[6] || (l[6] =
|
|
294
|
+
a.loading ? (u(), m("div", xe, [
|
|
295
|
+
c("div", we, [
|
|
296
|
+
d(pe, { size: "sm" }),
|
|
297
|
+
l[6] || (l[6] = c("span", null, "Loading...", -1))
|
|
282
298
|
])
|
|
283
|
-
])) :
|
|
284
|
-
(
|
|
285
|
-
key:
|
|
286
|
-
value:
|
|
299
|
+
])) : o.value !== "" && g.value.length === 0 ? (u(), m("div", Ce, " Nothing found. ")) : f("", !0),
|
|
300
|
+
(u(!0), m(ae, null, oe(T.value, (n) => (u(), N(r(U), {
|
|
301
|
+
key: S(n),
|
|
302
|
+
value: n,
|
|
287
303
|
as: "template",
|
|
288
|
-
disabled:
|
|
304
|
+
disabled: n.disabled
|
|
289
305
|
}, {
|
|
290
|
-
default: v(({ active:
|
|
291
|
-
|
|
306
|
+
default: v(({ active: k, selected: E }) => [
|
|
307
|
+
c("li", {
|
|
292
308
|
class: y([
|
|
293
309
|
"sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-10 sl-pr-4",
|
|
294
|
-
|
|
295
|
-
|
|
310
|
+
k ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200",
|
|
311
|
+
n.disabled ? "sl-opacity-50 sl-cursor-not-allowed" : ""
|
|
296
312
|
])
|
|
297
313
|
}, [
|
|
298
|
-
|
|
314
|
+
c("span", {
|
|
299
315
|
class: y([
|
|
300
316
|
"sl-block sl-truncate",
|
|
301
317
|
E ? "sl-font-medium" : "sl-font-normal"
|
|
302
318
|
])
|
|
303
|
-
}, M(
|
|
304
|
-
E ? (
|
|
319
|
+
}, M(I(n)), 3),
|
|
320
|
+
E ? (u(), m("span", {
|
|
305
321
|
key: 0,
|
|
306
|
-
class: y(["sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3",
|
|
322
|
+
class: y(["sl-absolute sl-inset-y-0 sl-left-0 sl-flex sl-items-center sl-pl-3", k ? "sl-text-white" : "sl-text-stachelock-600 dark:sl-text-stachelock-400"])
|
|
307
323
|
}, [
|
|
308
|
-
|
|
324
|
+
d(r(z), {
|
|
309
325
|
class: "sl-h-5 sl-w-5",
|
|
310
326
|
"aria-hidden": "true"
|
|
311
327
|
})
|
|
@@ -314,20 +330,20 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
314
330
|
]),
|
|
315
331
|
_: 2
|
|
316
332
|
}, 1032, ["value", "disabled"]))), 128)),
|
|
317
|
-
!a.multiple &&
|
|
333
|
+
!a.multiple && h.value ? (u(), N(r(U), {
|
|
318
334
|
key: 3,
|
|
319
|
-
value:
|
|
335
|
+
value: h.value,
|
|
320
336
|
as: "template"
|
|
321
337
|
}, {
|
|
322
|
-
default: v(({ active:
|
|
323
|
-
|
|
324
|
-
onClick:
|
|
338
|
+
default: v(({ active: n }) => [
|
|
339
|
+
c("li", {
|
|
340
|
+
onClick: B(Y, ["prevent", "stop"]),
|
|
325
341
|
class: y([
|
|
326
342
|
"sl-relative sl-cursor-pointer sl-select-none sl-py-2 sl-pl-10 sl-pr-4",
|
|
327
|
-
|
|
343
|
+
n ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200"
|
|
328
344
|
])
|
|
329
345
|
}, [
|
|
330
|
-
|
|
346
|
+
c("span", Ae, ' Enter "' + M(o.value) + '" manually ', 1)
|
|
331
347
|
], 2)
|
|
332
348
|
]),
|
|
333
349
|
_: 1
|
|
@@ -349,5 +365,5 @@ const ye = { class: "sl-w-full" }, be = { class: "sl-absolute sl-inset-y-0 sl-ri
|
|
|
349
365
|
}
|
|
350
366
|
});
|
|
351
367
|
export {
|
|
352
|
-
|
|
368
|
+
Ne as _
|
|
353
369
|
};
|
|
@@ -2,7 +2,7 @@ import { defineComponent as Y, ref as Z, reactive as _, watch as w, computed as
|
|
|
2
2
|
import { useForm as te } from "vee-validate";
|
|
3
3
|
import { ExclamationCircleIcon as se } from "@heroicons/vue/24/outline";
|
|
4
4
|
import A from "./components/Button.js";
|
|
5
|
-
import { _ as ae } from "./DynamicFormField.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as ae } from "./DynamicFormField.vue_vue_type_script_setup_true_lang-CdNtWWlT.js";
|
|
6
6
|
const le = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "sl-mb-6"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as b, computed as s, defineAsyncComponent as y, createBlock as v, createElementBlock as g, openBlock as c, resolveDynamicComponent as w, mergeProps as k, toHandlers as V, createElementVNode as o, createVNode as _, unref as L, toDisplayString as P } from "vue";
|
|
2
|
-
import t from "./
|
|
2
|
+
import { T as t } from "./TextInput-C5IzX7m_.js";
|
|
3
3
|
import { ExclamationTriangleIcon as C } from "@heroicons/vue/24/outline";
|
|
4
4
|
const D = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "sl-p-4 sl-bg-yellow-50 sl-border sl-border-yellow-200 sl-rounded-md"
|
|
7
|
-
}, F = { class: "sl-flex" },
|
|
7
|
+
}, F = { class: "sl-flex" }, T = { class: "sl-ml-3" }, M = { class: "sl-mt-2 sl-text-sm sl-text-yellow-700" }, A = /* @__PURE__ */ b({
|
|
8
8
|
__name: "DynamicFormField",
|
|
9
9
|
props: {
|
|
10
10
|
field: {},
|
|
@@ -137,9 +137,9 @@ const D = {
|
|
|
137
137
|
}), null, 16, ["model-value"])) : (c(), g("div", D, [
|
|
138
138
|
o("div", F, [
|
|
139
139
|
_(L(C), { class: "sl-h-5 sl-w-5 sl-text-yellow-400" }),
|
|
140
|
-
o("div",
|
|
140
|
+
o("div", T, [
|
|
141
141
|
i[0] || (i[0] = o("h3", { class: "sl-text-sm sl-font-medium sl-text-yellow-800" }, " Unknown field type ", -1)),
|
|
142
|
-
o("div",
|
|
142
|
+
o("div", M, [
|
|
143
143
|
o("p", null, 'Field type "' + P(a.field.type) + '" is not supported.', 1)
|
|
144
144
|
])
|
|
145
145
|
])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as w, createElementBlock as s, openBlock as t, createCommentVNode as n, createElementVNode as r, createVNode as I, unref as l, toDisplayString as d, Fragment as c, renderList as u, normalizeClass as h, withModifiers as V, createTextVNode as N, renderSlot as b } 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" }, M = {
|
|
5
5
|
key: 0,
|