@soft-stech/bootsman-ui-shadcn 1.1.30 → 1.1.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/dist/{BuiFormControl.vue_vue_type_script_setup_true_lang-DBf2R0rh.js → BuiFormControl.vue_vue_type_script_setup_true_lang-BkvrIzuO.js} +4 -4
  2. package/dist/{BuiFormDescription.vue_vue_type_script_setup_true_lang-DESVSeBk.js → BuiFormDescription.vue_vue_type_script_setup_true_lang-B6rDOqQf.js} +4 -4
  3. package/dist/{BuiFormLabel.vue_vue_type_script_setup_true_lang-CdTsKLdJ.js → BuiFormLabel.vue_vue_type_script_setup_true_lang-C6Rzvbdb.js} +8 -8
  4. package/dist/{BuiFormMessage.vue_vue_type_script_setup_true_lang-BtxFDcdt.js → BuiFormMessage.vue_vue_type_script_setup_true_lang-CHvvMerX.js} +2 -2
  5. package/dist/assets/main.css +1 -1
  6. package/dist/components/ui/calendar/index.js +1 -1
  7. package/dist/components/ui/form/BuiFormControl.js +1 -1
  8. package/dist/components/ui/form/BuiFormDescription.js +1 -1
  9. package/dist/components/ui/form/BuiFormLabel.js +1 -1
  10. package/dist/components/ui/form/BuiFormMessage.js +1 -1
  11. package/dist/components/ui/form/index.d.ts +1 -1
  12. package/dist/components/ui/form/index.js +16 -15
  13. package/dist/components/ui/form/useFormField.js +1 -1
  14. package/dist/components/ui/input/index.js +46 -42
  15. package/dist/components/ui/textarea/index.js +1 -1
  16. package/dist/index-DlKyQJKc.js +181 -0
  17. package/dist/index.js +170 -169
  18. package/dist/{useFormField-_ngdGlTO.js → useFormField-DauRmNq-.js} +2 -1
  19. package/package.json +1 -1
  20. package/src/components/stories/BuiCombobox.story.vue +93 -1
  21. package/src/components/stories/BuiInput.story.vue +2 -2
  22. package/src/components/ui/form/index.ts +2 -1
  23. package/src/components/ui/input/BuiBadgedInput.vue +10 -3
  24. package/dist/index-DO0xNIC7.js +0 -49
@@ -1,14 +1,14 @@
1
- import { d as f, c as n, a as b } from "../../../utils-C9G8Xvqo.js";
2
- import { defineComponent as u, withDirectives as h, openBlock as a, createElementBlock as c, isRef as _, normalizeClass as k, unref as e, vModelText as w, ref as x, createVNode as l, mergeProps as m, createElementVNode as V, createBlock as p, withCtx as B, createTextVNode as I, toDisplayString as $ } from "vue";
3
- import { u as j } from "../../../index-DO0xNIC7.js";
4
- import { BuiBadge as E } from "../badge/index.js";
1
+ import { d as f, c as m, a as h } from "../../../utils-C9G8Xvqo.js";
2
+ import { defineComponent as l, withDirectives as _, openBlock as o, createElementBlock as u, isRef as k, normalizeClass as x, unref as e, vModelText as w, ref as v, createVNode as i, mergeProps as g, createElementVNode as B, createBlock as p, withCtx as V, createTextVNode as E, toDisplayString as I } from "vue";
3
+ import { u as M, a as $ } from "../../../index-DlKyQJKc.js";
4
+ import { BuiBadge as j } from "../badge/index.js";
5
5
  /**
6
6
  * @license lucide-vue-next v0.377.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const M = f("EyeOffIcon", [
11
+ const A = f("EyeOffIcon", [
12
12
  ["path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24", key: "1jxqfv" }],
13
13
  [
14
14
  "path",
@@ -29,10 +29,10 @@ const M = f("EyeOffIcon", [
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
31
  */
32
- const A = f("EyeIcon", [
32
+ const C = f("EyeIcon", [
33
33
  ["path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z", key: "rwhkz3" }],
34
34
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
35
- ]), v = /* @__PURE__ */ u({
35
+ ]), y = /* @__PURE__ */ l({
36
36
  __name: "BuiInput",
37
37
  props: {
38
38
  defaultValue: {},
@@ -41,66 +41,70 @@ const A = f("EyeIcon", [
41
41
  class: {}
42
42
  },
43
43
  emits: ["update:modelValue"],
44
- setup(r, { emit: s }) {
45
- const t = r, i = j(t, "modelValue", s, {
44
+ setup(n, { emit: t }) {
45
+ const s = n, a = M(s, "modelValue", t, {
46
46
  passive: !0,
47
- defaultValue: t.defaultValue
47
+ defaultValue: s.defaultValue
48
48
  });
49
- return (g, d) => h((a(), c("input", {
50
- "onUpdate:modelValue": d[0] || (d[0] = (y) => _(i) ? i.value = y : null),
51
- class: k(e(n)(e(z)({ variant: g.variant }), t.class ?? ""))
49
+ return (d, c) => _((o(), u("input", {
50
+ "onUpdate:modelValue": c[0] || (c[0] = (b) => k(a) ? a.value = b : null),
51
+ class: x(e(m)(e(R)({ variant: d.variant }), s.class ?? ""))
52
52
  }, null, 2)), [
53
- [w, e(i)]
53
+ [w, e(a)]
54
54
  ]);
55
55
  }
56
- }), C = { class: "relative flex" }, T = /* @__PURE__ */ u({
56
+ }), N = { class: "relative flex" }, U = /* @__PURE__ */ l({
57
57
  inheritAttrs: !1,
58
58
  __name: "BuiPasswordInput",
59
- setup(r) {
60
- const s = x("password");
61
- function t() {
62
- s.value === "password" ? s.value = "text" : s.value = "password";
59
+ setup(n) {
60
+ const t = v("password");
61
+ function s() {
62
+ t.value === "password" ? t.value = "text" : t.value = "password";
63
63
  }
64
- return (o, i) => (a(), c("div", C, [
65
- l(e(v), m(o.$attrs, {
66
- type: s.value,
67
- class: e(n)(o.$attrs.class ?? "", "pr-8")
64
+ return (r, a) => (o(), u("div", N, [
65
+ i(e(y), g(r.$attrs, {
66
+ type: t.value,
67
+ class: e(m)(r.$attrs.class ?? "", "pr-8")
68
68
  }), null, 16, ["type", "class"]),
69
- V("span", {
70
- onClick: t,
69
+ B("span", {
70
+ onClick: s,
71
71
  class: "absolute right-3 top-0 flex h-full items-center justify-center"
72
72
  }, [
73
- s.value === "password" ? (a(), p(e(A), {
73
+ t.value === "password" ? (o(), p(e(C), {
74
74
  key: 0,
75
75
  class: "h-4 w-4 cursor-pointer"
76
- })) : (a(), p(e(M), {
76
+ })) : (o(), p(e(A), {
77
77
  key: 1,
78
78
  class: "h-4 w-4 cursor-pointer"
79
79
  }))
80
80
  ])
81
81
  ]));
82
82
  }
83
- }), P = { class: "relative flex" }, q = /* @__PURE__ */ u({
83
+ }), P = { class: "relative flex" }, z = 16, q = /* @__PURE__ */ l({
84
84
  inheritAttrs: !1,
85
85
  __name: "BuiBadgedInput",
86
86
  props: {
87
87
  badge: {}
88
88
  },
89
- setup(r) {
90
- const s = r;
91
- return (t, o) => (a(), c("div", P, [
92
- l(e(v), m(t.$attrs, {
93
- class: e(n)("pr-18", t.$attrs.class ?? "")
94
- }), null, 16, ["class"]),
95
- l(e(E), { class: "absolute right-3 top-1.5 flex items-center justify-center rounded-sm hover:bg-primary/[0.08] dark:hover:bg-primary/30" }, {
96
- default: B(() => [
97
- I($(s.badge), 1)
89
+ setup(n) {
90
+ const t = n, s = v(null), { width: r } = $(s);
91
+ return (a, d) => (o(), u("div", P, [
92
+ i(e(y), g(a.$attrs, {
93
+ style: { paddingRight: e(r) + z + "px" }
94
+ }), null, 16, ["style"]),
95
+ i(e(j), {
96
+ ref_key: "badgeEl",
97
+ ref: s,
98
+ class: "absolute right-3 top-1.5 flex items-center justify-center rounded-sm hover:bg-primary/[0.08] dark:hover:bg-primary/30"
99
+ }, {
100
+ default: V(() => [
101
+ E(I(t.badge), 1)
98
102
  ]),
99
103
  _: 1
100
- })
104
+ }, 512)
101
105
  ]));
102
106
  }
103
- }), z = b(
107
+ }), R = h(
104
108
  "flex h-10 w-full rounded bg-background border px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30 dark:disabled:opacity-55 aria-[invalid=true]:border-destructive-foreground",
105
109
  {
106
110
  variants: {
@@ -117,7 +121,7 @@ const A = f("EyeIcon", [
117
121
  );
118
122
  export {
119
123
  q as BuiBadgedInput,
120
- v as BuiInput,
121
- T as BuiPasswordInput,
122
- z as inputVariants
124
+ y as BuiInput,
125
+ U as BuiPasswordInput,
126
+ R as inputVariants
123
127
  };
@@ -1,6 +1,6 @@
1
1
  import { c as u, a as n } from "../../../utils-C9G8Xvqo.js";
2
2
  import { defineComponent as d, withDirectives as c, openBlock as f, createElementBlock as m, isRef as p, normalizeClass as v, unref as a, vModelText as b } from "vue";
3
- import { u as g } from "../../../index-DO0xNIC7.js";
3
+ import { u as g } from "../../../index-DlKyQJKc.js";
4
4
  const y = /* @__PURE__ */ d({
5
5
  __name: "BuiTextarea",
6
6
  props: {
@@ -0,0 +1,181 @@
1
+ import { onMounted as _, nextTick as N, getCurrentScope as L, onScopeDispose as $, unref as B, getCurrentInstance as E, ref as h, watch as w, computed as A } from "vue";
2
+ function x(e) {
3
+ return L() ? ($(e), !0) : !1;
4
+ }
5
+ function R(e) {
6
+ return typeof e == "function" ? e() : B(e);
7
+ }
8
+ const D = typeof window < "u" && typeof document < "u";
9
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
10
+ const F = (e) => typeof e < "u", J = (e) => e != null, T = Object.prototype.toString, G = (e) => T.call(e) === "[object Object]", I = () => {
11
+ };
12
+ function U(e) {
13
+ return e || E();
14
+ }
15
+ function q(e, t = !0, i) {
16
+ U() ? _(e, i) : t ? e() : N(e);
17
+ }
18
+ function g(e) {
19
+ var t;
20
+ const i = R(e);
21
+ return (t = i?.$el) != null ? t : i;
22
+ }
23
+ const z = D ? window : void 0;
24
+ function W(...e) {
25
+ let t, i, r, f;
26
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([i, r, f] = e, t = z) : [t, i, r, f] = e, !t)
27
+ return I;
28
+ Array.isArray(i) || (i = [i]), Array.isArray(r) || (r = [r]);
29
+ const n = [], l = () => {
30
+ n.forEach((u) => u()), n.length = 0;
31
+ }, a = (u, c, s, o) => (u.addEventListener(c, s, o), () => u.removeEventListener(c, s, o)), v = w(
32
+ () => [g(t), R(f)],
33
+ ([u, c]) => {
34
+ if (l(), !u)
35
+ return;
36
+ const s = G(c) ? { ...c } : c;
37
+ n.push(
38
+ ...i.flatMap((o) => r.map((p) => a(u, o, p, s)))
39
+ );
40
+ },
41
+ { immediate: !0, flush: "post" }
42
+ ), d = () => {
43
+ v(), l();
44
+ };
45
+ return x(d), d;
46
+ }
47
+ function H() {
48
+ const e = h(!1), t = E();
49
+ return t && _(() => {
50
+ e.value = !0;
51
+ }, t), e;
52
+ }
53
+ function j(e) {
54
+ const t = H();
55
+ return A(() => (t.value, !!e()));
56
+ }
57
+ function K(e) {
58
+ return JSON.parse(JSON.stringify(e));
59
+ }
60
+ function P(e, t, i = {}) {
61
+ const { window: r = z, ...f } = i;
62
+ let n;
63
+ const l = j(() => r && "MutationObserver" in r), a = () => {
64
+ n && (n.disconnect(), n = void 0);
65
+ }, v = A(() => {
66
+ const s = R(e), o = (Array.isArray(s) ? s : [s]).map(g).filter(J);
67
+ return new Set(o);
68
+ }), d = w(
69
+ () => v.value,
70
+ (s) => {
71
+ a(), l.value && r && s.size && (n = new MutationObserver(t), s.forEach((o) => n.observe(o, f)));
72
+ },
73
+ { immediate: !0, flush: "post" }
74
+ ), u = () => n?.takeRecords(), c = () => {
75
+ a(), d();
76
+ };
77
+ return x(c), {
78
+ isSupported: l,
79
+ stop: c,
80
+ takeRecords: u
81
+ };
82
+ }
83
+ function Q(e, t, i = {}) {
84
+ const { window: r = z, ...f } = i;
85
+ let n;
86
+ const l = j(() => r && "ResizeObserver" in r), a = () => {
87
+ n && (n.disconnect(), n = void 0);
88
+ }, v = A(() => Array.isArray(e) ? e.map((c) => g(c)) : [g(e)]), d = w(
89
+ v,
90
+ (c) => {
91
+ if (a(), l.value && r) {
92
+ n = new ResizeObserver(t);
93
+ for (const s of c)
94
+ s && n.observe(s, f);
95
+ }
96
+ },
97
+ { immediate: !0, flush: "post" }
98
+ ), u = () => {
99
+ a(), d();
100
+ };
101
+ return x(u), {
102
+ isSupported: l,
103
+ stop: u
104
+ };
105
+ }
106
+ function Y(e, t = {}) {
107
+ const {
108
+ reset: i = !0,
109
+ windowResize: r = !0,
110
+ windowScroll: f = !0,
111
+ immediate: n = !0
112
+ } = t, l = h(0), a = h(0), v = h(0), d = h(0), u = h(0), c = h(0), s = h(0), o = h(0);
113
+ function p() {
114
+ const y = g(e);
115
+ if (!y) {
116
+ i && (l.value = 0, a.value = 0, v.value = 0, d.value = 0, u.value = 0, c.value = 0, s.value = 0, o.value = 0);
117
+ return;
118
+ }
119
+ const m = y.getBoundingClientRect();
120
+ l.value = m.height, a.value = m.bottom, v.value = m.left, d.value = m.right, u.value = m.top, c.value = m.width, s.value = m.x, o.value = m.y;
121
+ }
122
+ return Q(e, p), w(() => g(e), (y) => !y && p()), P(e, p, {
123
+ attributeFilter: ["style", "class"]
124
+ }), f && W("scroll", p, { capture: !0, passive: !0 }), r && W("resize", p, { passive: !0 }), q(() => {
125
+ n && p();
126
+ }), {
127
+ height: l,
128
+ bottom: a,
129
+ left: v,
130
+ right: d,
131
+ top: u,
132
+ width: c,
133
+ x: s,
134
+ y: o,
135
+ update: p
136
+ };
137
+ }
138
+ function Z(e, t, i, r = {}) {
139
+ var f, n, l;
140
+ const {
141
+ clone: a = !1,
142
+ passive: v = !1,
143
+ eventName: d,
144
+ deep: u = !1,
145
+ defaultValue: c,
146
+ shouldEmit: s
147
+ } = r, o = E(), p = i || o?.emit || ((f = o?.$emit) == null ? void 0 : f.bind(o)) || ((l = (n = o?.proxy) == null ? void 0 : n.$emit) == null ? void 0 : l.bind(o?.proxy));
148
+ let y = d;
149
+ t || (t = "modelValue"), y = y || `update:${t.toString()}`;
150
+ const m = (b) => a ? typeof a == "function" ? a(b) : K(b) : b, C = () => F(e[t]) ? m(e[t]) : c, V = (b) => {
151
+ s ? s(b) && p(y, b) : p(y, b);
152
+ };
153
+ if (v) {
154
+ const b = C(), M = h(b);
155
+ let O = !1;
156
+ return w(
157
+ () => e[t],
158
+ (S) => {
159
+ O || (O = !0, M.value = m(S), N(() => O = !1));
160
+ }
161
+ ), w(
162
+ M,
163
+ (S) => {
164
+ !O && (S !== e[t] || u) && V(S);
165
+ },
166
+ { deep: u }
167
+ ), M;
168
+ } else
169
+ return A({
170
+ get() {
171
+ return C();
172
+ },
173
+ set(b) {
174
+ V(b);
175
+ }
176
+ });
177
+ }
178
+ export {
179
+ Y as a,
180
+ Z as u
181
+ };