@soft-stech/bootsman-ui-shadcn 2.0.13 → 2.0.15

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.
@@ -1,20 +1,20 @@
1
- import { defineComponent as l, createBlock as n, openBlock as i, unref as o, withCtx as c, renderSlot as r, createElementVNode as s, createVNode as m, normalizeClass as f } from "vue";
1
+ import { defineComponent as a, createBlock as n, openBlock as i, unref as o, withCtx as c, renderSlot as r, createElementVNode as s, createVNode as m, normalizeClass as f } from "vue";
2
2
  import { _ as p } from "./BuiScrollArea.vue_vue_type_script_setup_true_lang-XkIzRs-G.js";
3
3
  import { _ } from "./BuiScrollBar.vue_vue_type_script_setup_true_lang-cV0od8j0.js";
4
4
  import { g as d } from "./utils-DhVytAXN.js";
5
- const u = { class: "min-h-[90px]" }, B = /* @__PURE__ */ l({
5
+ const u = { class: "flex min-h-[90px] grow flex-col" }, g = /* @__PURE__ */ a({
6
6
  __name: "BuiTable",
7
7
  props: {
8
8
  class: {}
9
9
  },
10
10
  setup(t) {
11
- const a = t;
11
+ const l = t;
12
12
  return (e, b) => (i(), n(o(p), { class: "border-border/16 w-full grow overflow-auto rounded-sm border" }, {
13
13
  default: c(() => [
14
14
  r(e.$slots, "columnVisibility"),
15
15
  s("div", u, [
16
16
  s("table", {
17
- class: f(o(d)("h-full w-full caption-top text-sm", a.class))
17
+ class: f(o(d)("h-full w-full caption-top text-sm", l.class))
18
18
  }, [
19
19
  r(e.$slots, "default")
20
20
  ], 2)
@@ -26,5 +26,5 @@ const u = { class: "min-h-[90px]" }, B = /* @__PURE__ */ l({
26
26
  }
27
27
  });
28
28
  export {
29
- B as _
29
+ g as _
30
30
  };
@@ -14,5 +14,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
14
14
  "update:modelValue": (payload: string | number) => any;
15
15
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
16
16
  "onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLInputElement>;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
18
+ searchInput: HTMLInputElement;
19
+ }, any>;
18
20
  export default _default;
@@ -1,5 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  defaultValue?: 'password' | 'text';
3
+ showPasswordTranslation?: string;
4
+ hidePasswordTranslation?: string;
3
5
  };
4
6
  declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5
7
  export default _default;
@@ -1,20 +1,21 @@
1
- import { h as _, F as I, g as k, j as N } from "../../utils-DhVytAXN.js";
2
- import { defineComponent as b, inject as P, toRef as R, ref as m, withDirectives as D, createElementBlock as V, openBlock as p, unref as a, normalizeClass as h, isRef as j, vModelDynamic as O, createVNode as c, createElementVNode as y, mergeProps as F, createBlock as g, createCommentVNode as U, withCtx as v, createTextVNode as A, toDisplayString as z, mergeModels as G, useModel as S, watch as B, normalizeStyle as C } from "vue";
3
- import { useVModel as X, useElementBounding as $ } from "@vueuse/core";
1
+ import { h as B, F as O, g as _, _ as R, j as S } from "../../utils-DhVytAXN.js";
2
+ import { defineComponent as x, inject as z, toRef as A, ref as v, useTemplateRef as X, createElementBlock as w, withDirectives as E, openBlock as i, createBlock as g, createCommentVNode as T, createElementVNode as h, unref as a, normalizeClass as k, isRef as F, vModelText as G, withCtx as y, createVNode as n, vModelDynamic as H, computed as $, mergeProps as D, createTextVNode as K, toDisplayString as L, mergeModels as Y, useModel as q, watch as I, normalizeStyle as M } from "vue";
3
+ import { useVModel as J, useElementBounding as U } from "@vueuse/core";
4
+ import { c as Q, d as P } from "../../colorUtils-BgA4kYw8.js";
5
+ import { BuiBadge as W } from "../badge/index.js";
4
6
  import "vee-validate";
5
- import { c as H, d as E } from "../../colorUtils-BgA4kYw8.js";
6
- import { BuiBadge as K } from "../badge/index.js";
7
- import { _ as L } from "../../BuiPopover.vue_vue_type_script_setup_true_lang-C21Z50mT.js";
8
- import { _ as T } from "../../BuiPopoverTrigger.vue_vue_type_script_setup_true_lang-DRd7CSVn.js";
9
- import { _ as Y } from "../../BuiPopoverContent.vue_vue_type_script_setup_true_lang-D3uzwVKl.js";
10
- import { BuiColorPicker as q } from "../color-picker/index.js";
7
+ import { _ as Z } from "../../BuiPopover.vue_vue_type_script_setup_true_lang-C21Z50mT.js";
8
+ import { _ as ee } from "../../BuiPopoverTrigger.vue_vue_type_script_setup_true_lang-DRd7CSVn.js";
9
+ import { _ as ae } from "../../BuiPopoverContent.vue_vue_type_script_setup_true_lang-D3uzwVKl.js";
10
+ import { BuiColorPicker as te } from "../color-picker/index.js";
11
+ import { X as le } from "../../x-BYvGkYUz.js";
11
12
  /**
12
13
  * @license lucide-vue-next v0.544.0 - ISC
13
14
  *
14
15
  * This source code is licensed under the ISC license.
15
16
  * See the LICENSE file in the root directory of this source tree.
16
17
  */
17
- const J = _("eye-off", [
18
+ const oe = B("eye-off", [
18
19
  [
19
20
  "path",
20
21
  {
@@ -38,7 +39,7 @@ const J = _("eye-off", [
38
39
  * This source code is licensed under the ISC license.
39
40
  * See the LICENSE file in the root directory of this source tree.
40
41
  */
41
- const Q = _("eye", [
42
+ const se = B("eye", [
42
43
  [
43
44
  "path",
44
45
  {
@@ -54,7 +55,7 @@ const Q = _("eye", [
54
55
  * This source code is licensed under the ISC license.
55
56
  * See the LICENSE file in the root directory of this source tree.
56
57
  */
57
- const W = _("palette", [
58
+ const re = B("palette", [
58
59
  [
59
60
  "path",
60
61
  {
@@ -66,7 +67,10 @@ const W = _("palette", [
66
67
  ["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
67
68
  ["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
68
69
  ["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
69
- ]), Z = ["readonly", "disabled", "placeholder", "type"], w = /* @__PURE__ */ b({
70
+ ]), ne = {
71
+ key: 0,
72
+ class: "group relative flex flex-row items-center"
73
+ }, ie = ["readonly", "disabled", "placeholder"], de = ["readonly", "disabled", "placeholder", "type"], C = /* @__PURE__ */ x({
70
74
  __name: "BuiInput",
71
75
  props: {
72
76
  defaultValue: {},
@@ -79,89 +83,138 @@ const W = _("palette", [
79
83
  type: {}
80
84
  },
81
85
  emits: ["update:modelValue"],
82
- setup(i, { emit: o }) {
83
- const e = i, l = X(e, "modelValue", o, {
86
+ setup(d, { emit: o }) {
87
+ const e = d, t = J(e, "modelValue", o, {
84
88
  passive: !0,
85
89
  defaultValue: e.defaultValue
86
- }), f = P(I, R(!1)), t = m(!1), s = () => {
87
- t.value = !0;
88
- }, u = () => {
89
- t.value = !1;
90
- }, d = (r) => {
91
- (r.key === "Home" || r.key === "End") && t.value && r.stopPropagation();
90
+ }), u = z(O, A(!1)), l = v(!1), s = X("searchInput"), c = () => {
91
+ l.value = !0;
92
+ }, r = () => {
93
+ l.value = !1;
94
+ }, f = (m) => {
95
+ (m.key === "Home" || m.key === "End") && l.value && m.stopPropagation();
96
+ }, j = () => {
97
+ s.value && (s.value.focus(), t.value = "");
92
98
  };
93
- return (r, x) => D((p(), V("input", {
94
- "onUpdate:modelValue": x[0] || (x[0] = (M) => j(l) ? l.value = M : null),
95
- class: h(a(k)(a(se)({ variant: r.variant }), e.class ?? "")),
96
- readonly: a(f) || e.readonly,
99
+ return (m, b) => e.type === "search" ? (i(), w("div", ne, [
100
+ E(h("input", {
101
+ ref_key: "searchInput",
102
+ ref: s,
103
+ "onUpdate:modelValue": b[0] || (b[0] = (V) => F(t) ? t.value = V : null),
104
+ class: k(
105
+ a(_)(
106
+ a(N)({ variant: m.variant }),
107
+ e.class ?? "",
108
+ "pr-6",
109
+ !e.variant || e.variant === "default" ? "group-hover:border-primary" : ""
110
+ )
111
+ ),
112
+ readonly: a(u) || e.readonly,
113
+ disabled: e.disabled,
114
+ placeholder: e.placeholder,
115
+ type: "text",
116
+ onFocus: c,
117
+ onBlur: r,
118
+ onKeydown: f
119
+ }, null, 42, ie), [
120
+ [G, a(t)]
121
+ ]),
122
+ a(t) && a(t).toString().length > 0 ? (i(), g(R, {
123
+ key: 0,
124
+ variant: "none",
125
+ class: "hover:text-primary text-foreground invisible absolute top-2 right-2 h-fit w-fit p-[1px] group-hover:visible",
126
+ onClick: j
127
+ }, {
128
+ default: y(() => [
129
+ n(a(le), {
130
+ size: 14,
131
+ class: "pointer-events-none shrink-0"
132
+ })
133
+ ]),
134
+ _: 1
135
+ })) : T("", !0)
136
+ ])) : E((i(), w("input", {
137
+ key: 1,
138
+ "onUpdate:modelValue": b[1] || (b[1] = (V) => F(t) ? t.value = V : null),
139
+ class: k(a(_)(a(N)({ variant: m.variant }), e.class ?? "")),
140
+ readonly: a(u) || e.readonly,
97
141
  disabled: e.disabled,
98
142
  placeholder: e.placeholder,
99
143
  type: e.type || "text",
100
- onFocus: s,
101
- onBlur: u,
102
- onKeydown: d
103
- }, null, 42, Z)), [
104
- [O, a(l)]
144
+ onFocus: c,
145
+ onBlur: r,
146
+ onKeydown: f
147
+ }, null, 42, de)), [
148
+ [H, a(t)]
105
149
  ]);
106
150
  }
107
- }), ee = { class: "relative flex" }, ve = /* @__PURE__ */ b({
151
+ }), ue = { class: "relative flex" }, Ce = /* @__PURE__ */ x({
108
152
  inheritAttrs: !1,
109
153
  __name: "BuiPasswordInput",
110
154
  props: {
111
- defaultValue: {}
155
+ defaultValue: {},
156
+ showPasswordTranslation: {},
157
+ hidePasswordTranslation: {}
112
158
  },
113
- setup(i) {
114
- const e = m(i.defaultValue ?? "password");
115
- function n() {
159
+ setup(d) {
160
+ const o = d, e = v(o.defaultValue ?? "password");
161
+ function p() {
116
162
  e.value === "password" ? e.value = "text" : e.value = "password";
117
163
  }
118
- return (l, f) => (p(), V("div", ee, [
119
- c(a(w), F(l.$attrs, {
164
+ const t = $(() => o.showPasswordTranslation ?? "Show password"), u = $(() => o.hidePasswordTranslation ?? "Hide password");
165
+ return (l, s) => (i(), w("div", ue, [
166
+ n(a(C), D(l.$attrs, {
120
167
  type: e.value,
121
- class: a(k)(l.$attrs.class ?? "", "pr-8")
168
+ class: a(_)(l.$attrs.class ?? "", "pr-8")
122
169
  }), null, 16, ["type", "class"]),
123
- y("span", {
124
- onClick: n,
125
- class: "absolute top-0 right-3 flex h-full items-center justify-center"
126
- }, [
127
- e.value === "password" ? (p(), g(a(Q), {
128
- key: 0,
129
- class: "h-4 w-4 cursor-pointer opacity-[0.56] hover:opacity-100"
130
- })) : (p(), g(a(J), {
131
- key: 1,
132
- class: "h-4 w-4 cursor-pointer opacity-[0.56] hover:opacity-100"
133
- }))
134
- ])
170
+ n(R, {
171
+ onClick: p,
172
+ variant: "none",
173
+ class: "text-muted-foreground hover:text-foreground absolute top-0 right-3 flex h-full w-fit items-center justify-center p-0",
174
+ "aria-label": e.value === "password" ? t.value : u.value,
175
+ "aria-pressed": e.value !== "password"
176
+ }, {
177
+ default: y(() => [
178
+ e.value === "password" ? (i(), g(a(se), {
179
+ key: 0,
180
+ class: "pointer-events-none h-4 w-4 shrink-0 cursor-pointer"
181
+ })) : (i(), g(a(oe), {
182
+ key: 1,
183
+ class: "pointer-events-none h-4 w-4 shrink-0 cursor-pointer"
184
+ }))
185
+ ]),
186
+ _: 1
187
+ }, 8, ["aria-label", "aria-pressed"])
135
188
  ]));
136
189
  }
137
- }), ae = { class: "relative flex" }, te = 12, ge = /* @__PURE__ */ b({
190
+ }), ce = { class: "relative flex" }, pe = 12, Ee = /* @__PURE__ */ x({
138
191
  inheritAttrs: !1,
139
192
  __name: "BuiBadgedInput",
140
193
  props: {
141
194
  badge: {}
142
195
  },
143
- setup(i) {
144
- const o = i, e = m(null), { width: n } = $(e);
145
- return (l, f) => (p(), V("div", ae, [
146
- c(a(w), F(l.$attrs, {
147
- style: { paddingRight: a(n) + te + "px" }
196
+ setup(d) {
197
+ const o = d, e = v(null), { width: p } = U(e);
198
+ return (t, u) => (i(), w("div", ce, [
199
+ n(a(C), D(t.$attrs, {
200
+ style: { paddingRight: a(p) + pe + "px" }
148
201
  }), null, 16, ["style"]),
149
- o.badge ? (p(), g(K, {
202
+ o.badge ? (i(), g(W, {
150
203
  key: 0,
151
204
  ref_key: "badgeEl",
152
205
  ref: e,
153
206
  class: "hover:bg-primary/8 dark:hover:bg-primary/30 absolute top-1 right-2 flex items-center justify-center rounded-sm"
154
207
  }, {
155
- default: v(() => [
156
- A(z(o.badge), 1)
208
+ default: y(() => [
209
+ K(L(o.badge), 1)
157
210
  ]),
158
211
  _: 1
159
- }, 512)) : U("", !0)
212
+ }, 512)) : T("", !0)
160
213
  ]));
161
214
  }
162
- }), le = { class: "nowrap text-foreground relative flex w-32 flex-row font-medium uppercase" }, oe = 12, be = /* @__PURE__ */ b({
215
+ }), fe = { class: "nowrap text-foreground relative flex w-32 flex-row font-medium uppercase" }, me = 12, Fe = /* @__PURE__ */ x({
163
216
  __name: "BuiColorInput",
164
- props: /* @__PURE__ */ G({
217
+ props: /* @__PURE__ */ Y({
165
218
  id: {},
166
219
  defaultValue: { default: "#FFFFFF" },
167
220
  disabled: { type: Boolean, default: !1 },
@@ -171,51 +224,51 @@ const W = _("palette", [
171
224
  modelModifiers: {}
172
225
  }),
173
226
  emits: ["update:modelValue"],
174
- setup(i) {
175
- const o = i, e = S(i, "modelValue", void 0), n = m(null), { width: l } = $(n), f = () => e.value && E.test(e.value) ? e.value : o.defaultValue && E.test(o.defaultValue) ? o.defaultValue : "#FFFFFF", t = m(f().substring(1)), s = m(f());
176
- return B(t, () => {
177
- H.test(t.value) && (e.value = `#${t.value}`, s.value = `#${t.value}`);
178
- }), B(s, () => {
179
- e.value = s.value, t.value = s.value.substring(1);
180
- }), (u, d) => (p(), g(a(L), null, {
181
- default: v(() => [
182
- c(a(T), null, {
183
- default: v(() => [
184
- y("div", le, [
185
- y("div", {
227
+ setup(d) {
228
+ const o = d, e = q(d, "modelValue", void 0), p = v(null), { width: t } = U(p), u = () => e.value && P.test(e.value) ? e.value : o.defaultValue && P.test(o.defaultValue) ? o.defaultValue : "#FFFFFF", l = v(u().substring(1)), s = v(u());
229
+ return I(l, () => {
230
+ Q.test(l.value) && (e.value = `#${l.value}`, s.value = `#${l.value}`);
231
+ }), I(s, () => {
232
+ e.value = s.value, l.value = s.value.substring(1);
233
+ }), (c, r) => (i(), g(a(Z), null, {
234
+ default: y(() => [
235
+ n(a(ee), null, {
236
+ default: y(() => [
237
+ h("div", fe, [
238
+ h("div", {
186
239
  ref_key: "paletteBadge",
187
- ref: n,
188
- class: h(a(k)("absolute top-1.5 left-2 flex flex-row items-center gap-1", u.ui?.badgeClass))
240
+ ref: p,
241
+ class: k(a(_)("absolute top-1.5 left-2 flex flex-row items-center gap-1", c.ui?.badgeClass))
189
242
  }, [
190
- c(a(W), { class: "h-4 w-4 shrink-0" }),
191
- y("div", {
243
+ n(a(re), { class: "h-4 w-4 shrink-0" }),
244
+ h("div", {
192
245
  class: "h-4 w-4 rounded-sm",
193
- style: C({ backgroundColor: s.value })
246
+ style: M({ backgroundColor: s.value })
194
247
  }, null, 4),
195
- d[2] || (d[2] = y("div", { class: "text-foreground/[.56] font-bold" }, "#", -1))
248
+ r[2] || (r[2] = h("div", { class: "text-foreground/[.56] font-bold" }, "#", -1))
196
249
  ], 2),
197
- c(w, {
198
- modelValue: t.value,
199
- "onUpdate:modelValue": d[0] || (d[0] = (r) => t.value = r),
200
- id: u.id,
201
- style: C({ paddingLeft: a(l) + oe + "px" }),
202
- disabled: u.disabled,
203
- class: h(u.ui?.inputClass)
250
+ n(C, {
251
+ modelValue: l.value,
252
+ "onUpdate:modelValue": r[0] || (r[0] = (f) => l.value = f),
253
+ id: c.id,
254
+ style: M({ paddingLeft: a(t) + me + "px" }),
255
+ disabled: c.disabled,
256
+ class: k(c.ui?.inputClass)
204
257
  }, null, 8, ["modelValue", "id", "style", "disabled", "class"])
205
258
  ])
206
259
  ]),
207
260
  _: 1
208
261
  }),
209
- c(a(Y), {
262
+ n(a(ae), {
210
263
  class: "w-fit",
211
264
  align: "start"
212
265
  }, {
213
- default: v(() => [
214
- c(q, {
266
+ default: y(() => [
267
+ n(te, {
215
268
  modelValue: s.value,
216
- "onUpdate:modelValue": d[1] || (d[1] = (r) => s.value = r),
269
+ "onUpdate:modelValue": r[1] || (r[1] = (f) => s.value = f),
217
270
  format: "hex",
218
- disabled: u.disabled,
271
+ disabled: c.disabled,
219
272
  ui: { selectorClass: "ring-popover", trackClass: "ring-popover" }
220
273
  }, null, 8, ["modelValue", "disabled"])
221
274
  ]),
@@ -225,7 +278,7 @@ const W = _("palette", [
225
278
  _: 1
226
279
  }));
227
280
  }
228
- }), se = N(
281
+ }), N = S(
229
282
  "flex h-8 w-full rounded-sm bg-background border px-2 py-1 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30 dark:disabled:opacity-55 read-only:opacity-30 dark:read-only:opacity-55 aria-invalid:border-destructive-foreground",
230
283
  {
231
284
  variants: {
@@ -241,9 +294,9 @@ const W = _("palette", [
241
294
  }
242
295
  );
243
296
  export {
244
- ge as BuiBadgedInput,
245
- be as BuiColorInput,
246
- w as BuiInput,
247
- ve as BuiPasswordInput,
248
- se as inputVariants
297
+ Ee as BuiBadgedInput,
298
+ Fe as BuiColorInput,
299
+ C as BuiInput,
300
+ Ce as BuiPasswordInput,
301
+ N as inputVariants
249
302
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../BuiTable.vue_vue_type_script_setup_true_lang-C3hr0DBS.js";
1
+ import { _ as f } from "../../BuiTable.vue_vue_type_script_setup_true_lang-Dd_dkcy4.js";
2
2
  export {
3
3
  f as default
4
4
  };