@stachelock/ui 0.6.4 → 0.6.6

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.
Files changed (28) hide show
  1. package/dist/{CalendarHeader.vue_vue_type_script_setup_true_lang-hGa2MLyo.js → CalendarHeader.vue_vue_type_script_setup_true_lang-CA_C4dmn.js} +1 -1
  2. package/dist/{ComboboxInput.vue_vue_type_script_setup_true_lang-BigvbBAU.js → ComboboxInput.vue_vue_type_script_setup_true_lang-D52gzkAa.js} +142 -120
  3. package/dist/{InlineTabs.vue_vue_type_script_setup_true_lang-B5w4yzcZ.js → InlineTabs.vue_vue_type_script_setup_true_lang-slNq2sot.js} +1 -1
  4. package/dist/SelectInput.vue_vue_type_script_setup_true_lang-COZuuSFS.js +320 -0
  5. package/dist/{TabGroup.vue_vue_type_script_setup_true_lang-BsbiEA4E.js → TabGroup.vue_vue_type_script_setup_true_lang-pEKm-uUq.js} +1 -1
  6. package/dist/{TabGroupUnderline.vue_vue_type_script_setup_true_lang-CPcp1-Za.js → TabGroupUnderline.vue_vue_type_script_setup_true_lang--IKyRPkX.js} +1 -1
  7. package/dist/{TabsInPills.vue_vue_type_script_setup_true_lang-U5CdRL7s.js → TabsInPills.vue_vue_type_script_setup_true_lang-EG0nj4F6.js} +1 -1
  8. package/dist/calendars/CalendarDashboard.js +1 -1
  9. package/dist/calendars/CalendarHeader.js +1 -1
  10. package/dist/index.js +1533 -1300
  11. package/dist/inputs/AddressInput.js +262 -262
  12. package/dist/inputs/ComboboxInput.js +1 -1
  13. package/dist/inputs/SelectInput.js +1 -1
  14. package/dist/src/components/inputs/ComboboxInput.d.ts +2 -0
  15. package/dist/src/components/inputs/DatepickerInput.d.ts +3 -3
  16. package/dist/src/components/inputs/SelectInput.d.ts +2 -0
  17. package/dist/src/components/profiles/BentoProfileLayoutSkeleton.d.ts +11 -0
  18. package/dist/src/components/profiles/ProfileSocialCard.d.ts +11 -0
  19. package/dist/src/components/profiles/index.d.ts +2 -0
  20. package/dist/src/services/geocoding.service.d.ts +1 -0
  21. package/dist/style.css +1 -1
  22. package/dist/tabs/InlineTabs.js +1 -1
  23. package/dist/tabs/TabGroup.js +1 -1
  24. package/dist/tabs/TabGroupUnderline.js +1 -1
  25. package/dist/tabs/TabsInPills.js +1 -1
  26. package/dist/tabs/index.js +4 -4
  27. package/package.json +1 -1
  28. package/dist/SelectInput.vue_vue_type_script_setup_true_lang-D4GNv0MY.js +0 -301
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../TabsInPills.vue_vue_type_script_setup_true_lang-U5CdRL7s.js";
1
+ import { _ as f } from "../TabsInPills.vue_vue_type_script_setup_true_lang-EG0nj4F6.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
- import { _ as a } from "../InlineTabs.vue_vue_type_script_setup_true_lang-B5w4yzcZ.js";
2
- import { _ as s } from "../TabGroup.vue_vue_type_script_setup_true_lang-BsbiEA4E.js";
3
- import { _ as n } from "../TabGroupUnderline.vue_vue_type_script_setup_true_lang-CPcp1-Za.js";
4
- import { _ as f } from "../TabsInPills.vue_vue_type_script_setup_true_lang-U5CdRL7s.js";
1
+ import { _ as a } from "../InlineTabs.vue_vue_type_script_setup_true_lang-slNq2sot.js";
2
+ import { _ as s } from "../TabGroup.vue_vue_type_script_setup_true_lang-pEKm-uUq.js";
3
+ import { _ as n } from "../TabGroupUnderline.vue_vue_type_script_setup_true_lang--IKyRPkX.js";
4
+ import { _ as f } from "../TabsInPills.vue_vue_type_script_setup_true_lang-EG0nj4F6.js";
5
5
  export {
6
6
  a as InlineTabs,
7
7
  s as TabGroup,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stachelock/ui",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "A comprehensive Vue 3 UI component library built with Tailwind CSS",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,301 +0,0 @@
1
- import { defineComponent as H, watch as C, onBeforeUnmount as X, ref as S, computed as p, createElementBlock as d, openBlock as i, createVNode as u, unref as r, withCtx as c, createElementVNode as m, createBlock as y, normalizeClass as v, createCommentVNode as h, resolveDynamicComponent as N, toDisplayString as b, Teleport as _, Transition as J, normalizeStyle as Q, withModifiers as P, Fragment as Y, renderList as Z } from "vue";
2
- import { Listbox as ee, ListboxButton as le, ListboxOptions as se, ListboxOption as te } from "@headlessui/vue";
3
- import { ChevronUpDownIcon as ae, CheckIcon as oe } from "@heroicons/vue/20/solid";
4
- import { useField as re } from "vee-validate";
5
- import ne from "./forms/FormFieldWrapper.js";
6
- import { g as ie } from "./id-DafBB_QF.js";
7
- const ue = { class: "sl-w-full" }, de = { class: "sl-relative" }, ce = { class: "sl-flex sl-items-center sl-gap-2" }, me = {
8
- key: 1,
9
- class: "sl-block sl-truncate sl-text-left"
10
- }, fe = {
11
- key: 2,
12
- class: "sl-block sl-truncate sl-text-left sl-text-gray-500 dark:sl-text-slate-300"
13
- }, pe = { class: "sl-pointer-events-none sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-2" }, ve = { class: "sl-block sl-truncate sl-font-medium" }, he = { class: "sl-flex sl-items-center sl-gap-2" }, be = {
14
- key: 0,
15
- class: "sl-absolute sl-inset-y-0 sl-right-0 sl-flex sl-items-center sl-pr-4"
16
- }, ge = { key: 0 }, V = 224, x = 4, Ce = /* @__PURE__ */ H({
17
- __name: "SelectInput",
18
- props: {
19
- name: {},
20
- items: {},
21
- label: {},
22
- placeholder: {},
23
- disabled: { type: Boolean },
24
- rules: {},
25
- validateOnMount: { type: Boolean },
26
- successMessage: {},
27
- tertiaryLabel: {},
28
- buttonClass: {},
29
- multiple: { type: Boolean, default: !1 },
30
- showAll: { type: Boolean, default: !1 },
31
- itemKey: { default: "id" },
32
- itemText: { default: "name" },
33
- modelValue: { type: [String, Number, Boolean, null, Object, Array] },
34
- boxShadow: { type: Boolean, default: !1 }
35
- },
36
- emits: ["update:modelValue"],
37
- setup(a, { emit: R }) {
38
- const K = H({
39
- props: {
40
- open: { type: Boolean, required: !0 },
41
- updateFn: { type: Function, required: !0 }
42
- },
43
- setup(e) {
44
- const l = () => {
45
- e.open && e.updateFn();
46
- };
47
- return C(() => e.open, (o) => {
48
- o ? (e.updateFn(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l)) : (window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l));
49
- }, { immediate: !0 }), X(() => {
50
- window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l);
51
- }), () => null;
52
- }
53
- }), L = S(null), w = S({
54
- top: "0px",
55
- left: "0px",
56
- width: "200px"
57
- });
58
- function M() {
59
- const e = L.value?.$el;
60
- if (!e) return;
61
- const l = e.getBoundingClientRect(), o = window.innerHeight, n = o - l.bottom - x, f = l.top - x;
62
- n < V && f > n ? w.value = {
63
- bottom: `${o - l.top + x}px`,
64
- left: `${l.left}px`,
65
- width: `${l.width}px`,
66
- maxHeight: `${Math.min(f, V)}px`
67
- } : w.value = {
68
- top: `${l.bottom + x}px`,
69
- left: `${l.left}px`,
70
- width: `${l.width}px`,
71
- maxHeight: `${Math.min(n, V)}px`
72
- };
73
- }
74
- const t = a, U = R, F = ie(t.name), { value: O, errorMessage: $, handleChange: D, meta: g, setTouched: W } = re(
75
- () => t.name,
76
- t.rules,
77
- {
78
- validateOnMount: t.validateOnMount,
79
- initialValue: t.modelValue
80
- }
81
- ), s = S(
82
- t.multiple ? Array.isArray(t.modelValue) ? t.modelValue : [] : t.modelValue
83
- );
84
- C(
85
- () => t.modelValue,
86
- (e) => {
87
- if (t.multiple) {
88
- const l = Array.isArray(e) ? e : [];
89
- l !== s.value && (s.value = l, O.value = l);
90
- } else
91
- e !== s.value && (s.value = e, O.value = e);
92
- },
93
- { immediate: !0 }
94
- ), C(
95
- s,
96
- (e) => {
97
- U("update:modelValue", e);
98
- }
99
- );
100
- const j = p(() => {
101
- const e = [
102
- "sl-relative",
103
- "sl-w-full",
104
- "sl-cursor-default",
105
- "sl-rounded-md",
106
- "sl-bg-white",
107
- "dark:sl-bg-slate-900",
108
- "sl-text-gray-900",
109
- "dark:sl-text-slate-100",
110
- "sl-py-2",
111
- "sl-pl-3",
112
- "sl-pr-10",
113
- "sl-text-left",
114
- "sl-border",
115
- "sl-text-sm",
116
- "focus:sl-outline-none",
117
- "focus:sl-ring-2",
118
- "focus:sl-ring-stachelock-500",
119
- "focus:sl-border-stachelock-500",
120
- "sl-transition-all",
121
- "sl-duration-200"
122
- ];
123
- return t.disabled ? e.push(
124
- "sl-bg-gray-50",
125
- "dark:sl-bg-slate-800",
126
- "sl-text-gray-500",
127
- "dark:sl-text-slate-300",
128
- "sl-cursor-not-allowed",
129
- "sl-border-gray-200",
130
- "dark:sl-border-slate-700"
131
- ) : $.value ? e.push(
132
- "sl-border-red-300",
133
- "dark:sl-border-red-500",
134
- "focus:sl-ring-red-500",
135
- "focus:sl-border-red-500"
136
- ) : g.valid && g.touched ? e.push(
137
- "sl-border-green-300",
138
- "dark:sl-border-green-500",
139
- "focus:sl-ring-green-500",
140
- "focus:sl-border-green-500"
141
- ) : e.push(
142
- "sl-border-gray-300",
143
- "dark:sl-border-slate-600",
144
- "hover:sl-border-gray-400",
145
- "dark:hover:sl-border-slate-500"
146
- ), e.join(" ");
147
- }), k = (e) => e[t.itemKey], A = (e) => e[t.itemText] || e.toString(), E = p(() => s.value ? t.multiple && Array.isArray(s.value) ? s.value.length === 0 ? "" : s.value.length === 1 ? A(s.value[0]) : `${s.value.length} items selected` : A(s.value) : ""), I = p(() => s.value ? t.multiple && Array.isArray(s.value) ? s.value.length === 1 ? s.value[0].icon : null : s.value.icon : null), T = p(() => t.items.filter((e) => !e.disabled)), q = (e) => {
148
- s.value = e, W(!0), D(e);
149
- }, z = p(() => {
150
- if (!t.multiple || !Array.isArray(s.value)) return !1;
151
- const e = T.value;
152
- if (e.length === 0) return !1;
153
- const l = new Set(s.value.map((o) => k(o)));
154
- return e.every((o) => l.has(k(o)));
155
- }), G = () => {
156
- t.multiple && (z.value ? s.value = [] : s.value = [...T.value], D(s.value));
157
- };
158
- return (e, l) => (i(), d("div", ue, [
159
- u(ne, {
160
- id: r(F),
161
- name: a.name,
162
- label: a.label,
163
- disabled: a.disabled,
164
- optional: !a.rules,
165
- "tertiary-label": a.tertiaryLabel,
166
- "box-shadow": a.boxShadow,
167
- "error-message": r($),
168
- "success-message": a.successMessage,
169
- "is-valid": r(g).valid,
170
- "is-touched": r(g).touched
171
- }, {
172
- "success-message": c(() => [
173
- a.successMessage ? (i(), d("span", ge, b(a.successMessage), 1)) : h("", !0)
174
- ]),
175
- default: c(() => [
176
- u(r(ee), {
177
- modelValue: s.value,
178
- "onUpdate:modelValue": [
179
- l[1] || (l[1] = (o) => s.value = o),
180
- q
181
- ],
182
- disabled: a.disabled,
183
- multiple: a.multiple
184
- }, {
185
- default: c(({ open: o }) => [
186
- m("div", de, [
187
- u(r(K), {
188
- open: o,
189
- "update-fn": M
190
- }, null, 8, ["open"]),
191
- u(r(le), {
192
- ref_key: "listboxButtonRef",
193
- ref: L,
194
- id: r(F),
195
- class: v([
196
- j.value,
197
- a.buttonClass
198
- ]),
199
- onClick: M
200
- }, {
201
- default: c(() => [
202
- m("span", ce, [
203
- I.value ? (i(), y(N(I.value), {
204
- key: 0,
205
- class: "sl-h-4 sl-w-4 sl-flex-shrink-0",
206
- "aria-hidden": "true"
207
- })) : h("", !0),
208
- E.value ? (i(), d("span", me, b(E.value), 1)) : (i(), d("span", fe, b(a.placeholder || "Select an option"), 1))
209
- ]),
210
- m("span", pe, [
211
- u(r(ae), {
212
- class: "sl-h-5 sl-w-5 sl-text-gray-400 dark:sl-text-slate-300",
213
- "aria-hidden": "true"
214
- })
215
- ])
216
- ]),
217
- _: 1
218
- }, 8, ["id", "class"]),
219
- (i(), y(_, { to: "body" }, [
220
- u(J, {
221
- "leave-active-class": "sl-transition sl-duration-100 sl-ease-in",
222
- "leave-from-class": "sl-opacity-100",
223
- "leave-to-class": "sl-opacity-0"
224
- }, {
225
- default: c(() => [
226
- u(r(se), {
227
- 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",
228
- style: Q(w.value)
229
- }, {
230
- default: c(() => [
231
- a.multiple && a.showAll ? (i(), d("li", {
232
- key: 0,
233
- role: "button",
234
- tabindex: "0",
235
- onMousedown: l[0] || (l[0] = P(() => {
236
- }, ["prevent"])),
237
- onClick: P(G, ["prevent", "stop"]),
238
- class: v([
239
- "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",
240
- "hover:sl-bg-stachelock-600 hover:sl-text-white"
241
- ])
242
- }, [
243
- m("span", ve, b(z.value ? "Unselect All" : "Select All"), 1)
244
- ], 32)) : h("", !0),
245
- (i(!0), d(Y, null, Z(a.items, (n) => (i(), y(r(te), {
246
- key: k(n),
247
- value: n,
248
- as: "template",
249
- disabled: n.disabled
250
- }, {
251
- default: c(({ active: f, selected: B }) => [
252
- m("li", {
253
- class: v([
254
- "sl-relative sl-cursor-default sl-select-none sl-py-2 sl-pl-3 sl-pr-9",
255
- f ? "sl-bg-stachelock-600 sl-text-white" : "sl-text-gray-900 dark:sl-text-slate-200",
256
- n.disabled ? "sl-opacity-50 sl-cursor-not-allowed" : ""
257
- ])
258
- }, [
259
- m("div", he, [
260
- n.icon ? (i(), y(N(n.icon), {
261
- key: 0,
262
- class: v(["sl-h-4 sl-w-4 sl-flex-shrink-0", f ? "sl-text-white" : "sl-text-gray-400 dark:sl-text-slate-300"]),
263
- "aria-hidden": "true"
264
- }, null, 8, ["class"])) : h("", !0),
265
- m("span", {
266
- class: v([
267
- "sl-block sl-truncate",
268
- B ? "sl-font-medium" : "sl-font-normal"
269
- ])
270
- }, b(A(n)), 3)
271
- ]),
272
- B ? (i(), d("span", be, [
273
- u(r(oe), {
274
- class: "sl-h-5 sl-w-5",
275
- "aria-hidden": "true"
276
- })
277
- ])) : h("", !0)
278
- ], 2)
279
- ]),
280
- _: 2
281
- }, 1032, ["value", "disabled"]))), 128))
282
- ]),
283
- _: 1
284
- }, 8, ["style"])
285
- ]),
286
- _: 1
287
- })
288
- ]))
289
- ])
290
- ]),
291
- _: 1
292
- }, 8, ["modelValue", "disabled", "multiple"])
293
- ]),
294
- _: 1
295
- }, 8, ["id", "name", "label", "disabled", "optional", "tertiary-label", "box-shadow", "error-message", "success-message", "is-valid", "is-touched"])
296
- ]));
297
- }
298
- });
299
- export {
300
- Ce as _
301
- };