@soft-stech/bootsman-ui-shadcn 1.1.32 → 1.1.33
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,14 @@
|
|
1
|
-
import { d as
|
2
|
-
import { defineComponent as l, withDirectives as _, openBlock as
|
3
|
-
import { u as
|
4
|
-
import { BuiBadge as
|
1
|
+
import { d as p, c as f, a as h } from "../../../utils-C9G8Xvqo.js";
|
2
|
+
import { defineComponent as l, withDirectives as _, openBlock as r, createElementBlock as u, isRef as k, normalizeClass as x, unref as t, vModelText as w, ref as m, createVNode as g, mergeProps as v, createElementVNode as B, createBlock as i, withCtx as V, createTextVNode as E, toDisplayString as I, createCommentVNode as M } from "vue";
|
3
|
+
import { u as $, a as j } from "../../../index-DlKyQJKc.js";
|
4
|
+
import { BuiBadge as C } 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 A =
|
11
|
+
const A = p("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,7 +29,7 @@ const A = 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
|
32
|
+
const N = p("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
35
|
]), y = /* @__PURE__ */ l({
|
@@ -41,70 +41,71 @@ const C = f("EyeIcon", [
|
|
41
41
|
class: {}
|
42
42
|
},
|
43
43
|
emits: ["update:modelValue"],
|
44
|
-
setup(n, { emit:
|
45
|
-
const s = n, a =
|
44
|
+
setup(n, { emit: e }) {
|
45
|
+
const s = n, a = $(s, "modelValue", e, {
|
46
46
|
passive: !0,
|
47
47
|
defaultValue: s.defaultValue
|
48
48
|
});
|
49
|
-
return (d, c) => _((
|
49
|
+
return (d, c) => _((r(), u("input", {
|
50
50
|
"onUpdate:modelValue": c[0] || (c[0] = (b) => k(a) ? a.value = b : null),
|
51
|
-
class: x(
|
51
|
+
class: x(t(f)(t(D)({ variant: d.variant }), s.class ?? ""))
|
52
52
|
}, null, 2)), [
|
53
|
-
[w,
|
53
|
+
[w, t(a)]
|
54
54
|
]);
|
55
55
|
}
|
56
|
-
}),
|
56
|
+
}), P = { class: "relative flex" }, q = /* @__PURE__ */ l({
|
57
57
|
inheritAttrs: !1,
|
58
58
|
__name: "BuiPasswordInput",
|
59
59
|
setup(n) {
|
60
|
-
const
|
60
|
+
const e = m("password");
|
61
61
|
function s() {
|
62
|
-
|
62
|
+
e.value === "password" ? e.value = "text" : e.value = "password";
|
63
63
|
}
|
64
|
-
return (
|
65
|
-
|
66
|
-
type:
|
67
|
-
class:
|
64
|
+
return (o, a) => (r(), u("div", P, [
|
65
|
+
g(t(y), v(o.$attrs, {
|
66
|
+
type: e.value,
|
67
|
+
class: t(f)(o.$attrs.class ?? "", "pr-8")
|
68
68
|
}), null, 16, ["type", "class"]),
|
69
69
|
B("span", {
|
70
70
|
onClick: s,
|
71
71
|
class: "absolute right-3 top-0 flex h-full items-center justify-center"
|
72
72
|
}, [
|
73
|
-
|
73
|
+
e.value === "password" ? (r(), i(t(N), {
|
74
74
|
key: 0,
|
75
75
|
class: "h-4 w-4 cursor-pointer"
|
76
|
-
})) : (
|
76
|
+
})) : (r(), i(t(A), {
|
77
77
|
key: 1,
|
78
78
|
class: "h-4 w-4 cursor-pointer"
|
79
79
|
}))
|
80
80
|
])
|
81
81
|
]));
|
82
82
|
}
|
83
|
-
}),
|
83
|
+
}), z = { class: "relative flex" }, R = 16, G = /* @__PURE__ */ l({
|
84
84
|
inheritAttrs: !1,
|
85
85
|
__name: "BuiBadgedInput",
|
86
86
|
props: {
|
87
87
|
badge: {}
|
88
88
|
},
|
89
89
|
setup(n) {
|
90
|
-
const
|
91
|
-
return (a, d) => (
|
92
|
-
|
93
|
-
style: { paddingRight:
|
90
|
+
const e = n, s = m(null), { width: o } = j(s);
|
91
|
+
return (a, d) => (r(), u("div", z, [
|
92
|
+
g(t(y), v(a.$attrs, {
|
93
|
+
style: { paddingRight: t(o) + R + "px" }
|
94
94
|
}), null, 16, ["style"]),
|
95
|
-
i(
|
95
|
+
e.badge ? (r(), i(t(C), {
|
96
|
+
key: 0,
|
96
97
|
ref_key: "badgeEl",
|
97
98
|
ref: s,
|
98
99
|
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
|
}, {
|
100
101
|
default: V(() => [
|
101
|
-
E(I(
|
102
|
+
E(I(e.badge), 1)
|
102
103
|
]),
|
103
104
|
_: 1
|
104
|
-
}, 512)
|
105
|
+
}, 512)) : M("", !0)
|
105
106
|
]));
|
106
107
|
}
|
107
|
-
}),
|
108
|
+
}), D = h(
|
108
109
|
"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",
|
109
110
|
{
|
110
111
|
variants: {
|
@@ -120,8 +121,8 @@ const C = f("EyeIcon", [
|
|
120
121
|
}
|
121
122
|
);
|
122
123
|
export {
|
123
|
-
|
124
|
+
G as BuiBadgedInput,
|
124
125
|
y as BuiInput,
|
125
|
-
|
126
|
-
|
126
|
+
q as BuiPasswordInput,
|
127
|
+
D as inputVariants
|
127
128
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@soft-stech/bootsman-ui-shadcn",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.33",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist",
|
@@ -11,23 +11,6 @@
|
|
11
11
|
"sideEffects": [
|
12
12
|
"**/*.css"
|
13
13
|
],
|
14
|
-
"scripts": {
|
15
|
-
"build": "run-p type-check \"build-only {@}\" --",
|
16
|
-
"preview": "vite preview",
|
17
|
-
"test:unit": "vitest",
|
18
|
-
"test:e2e": "playwright test",
|
19
|
-
"build-only": "vite build",
|
20
|
-
"type-check": "vue-tsc --build --force",
|
21
|
-
"type-build": "vue-tsc --declaration --emitDeclarationOnly",
|
22
|
-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
23
|
-
"format": "prettier --write src/",
|
24
|
-
"bumpp": "bumpp package.json",
|
25
|
-
"prepublishOnly": "npm run build",
|
26
|
-
"story:dev": "histoire dev",
|
27
|
-
"story:build": "DOCS=true histoire build",
|
28
|
-
"story:preview": "histoire preview",
|
29
|
-
"coverage": "vitest run --coverage"
|
30
|
-
},
|
31
14
|
"dependencies": {
|
32
15
|
"@tanstack/vue-table": "8.16.0",
|
33
16
|
"@vee-validate/zod": "4.13.1",
|
@@ -75,5 +58,21 @@
|
|
75
58
|
"vitest": "1.5.3",
|
76
59
|
"vue-tsc": "2.0.16",
|
77
60
|
"mlly": "1.4.2"
|
61
|
+
},
|
62
|
+
"scripts": {
|
63
|
+
"build": "run-p type-check \"build-only {@}\" --",
|
64
|
+
"preview": "vite preview",
|
65
|
+
"test:unit": "vitest",
|
66
|
+
"test:e2e": "playwright test",
|
67
|
+
"build-only": "vite build",
|
68
|
+
"type-check": "vue-tsc --build --force",
|
69
|
+
"type-build": "vue-tsc --declaration --emitDeclarationOnly",
|
70
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
71
|
+
"format": "prettier --write src/",
|
72
|
+
"bumpp": "bumpp package.json",
|
73
|
+
"story:dev": "histoire dev",
|
74
|
+
"story:build": "DOCS=true histoire build",
|
75
|
+
"story:preview": "histoire preview",
|
76
|
+
"coverage": "vitest run --coverage"
|
78
77
|
}
|
79
|
-
}
|
78
|
+
}
|
@@ -22,6 +22,7 @@ const MAGIC_NUMBER = 16 // 12 (right-3) + 4 (just some offset)
|
|
22
22
|
<BuiInput v-bind="$attrs" :style="{ paddingRight: width + MAGIC_NUMBER + 'px' }" />
|
23
23
|
<BuiBadge
|
24
24
|
ref="badgeEl"
|
25
|
+
v-if="props.badge"
|
25
26
|
class="absolute right-3 top-1.5 flex items-center justify-center rounded-sm hover:bg-primary/[0.08] dark:hover:bg-primary/30"
|
26
27
|
>
|
27
28
|
{{ props.badge }}
|