@agrotools1/at-components 2.0.17 → 2.0.18
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/changelog/versions/components/v2.0.18.d.ts +4 -0
- package/dist/changelog/versions/components/v2.0.18.d.ts.map +1 -0
- package/dist/combobox/ComboboxInput.vue.d.ts.map +1 -1
- package/dist/combobox/ComboboxInput.vue.js +56 -52
- package/dist/multi-select/MultiSelectTrigger.vue.js +9 -9
- package/dist/select/SelectTrigger.vue.js +9 -9
- package/package.json +1 -1
- package/dist/changelog/versions/components/v2.0.16.d.ts +0 -4
- package/dist/changelog/versions/components/v2.0.16.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v2.0.18.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/v2.0.18.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,QAAA,MAAM,OAAO,EAAE,WAcd,CAAA;AAED,eAAe,OAAO,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxInput.vue.d.ts","sourceRoot":"","sources":["../../src/combobox/ComboboxInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComboboxInput.vue.d.ts","sourceRoot":"","sources":["../../src/combobox/ComboboxInput.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAuC,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AASzC,KAAK,WAAW,GAAG,kBAAkB,GAAG;IAClC,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAC;AAqCN,iBAAS,cAAc;WA0GT,OAAO,IAA6B;;yBAVpB,GAAG;;;;EAehC;AAmBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;qBAzKG,OAAO;6EAiL7B,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { reactiveOmit as
|
|
1
|
+
import { defineComponent as x, computed as y, createElementBlock as a, openBlock as n, normalizeClass as d, unref as t, createBlock as w, createCommentVNode as s, createVNode as l, mergeProps as C, withCtx as B, renderSlot as k } from "vue";
|
|
2
|
+
import { reactiveOmit as V } from "@vueuse/core";
|
|
3
3
|
import { injectComboboxRootContext as I, useForwardPropsEmits as z, ComboboxInput as P } from "reka-ui";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as p } from "../lib/utils.js";
|
|
5
5
|
import A from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/search.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
const _ = /* @__PURE__ */
|
|
6
|
+
import $ from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/x.js";
|
|
7
|
+
import D from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-down.js";
|
|
8
|
+
const _ = /* @__PURE__ */ x({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "ComboboxInput",
|
|
11
11
|
props: {
|
|
@@ -20,61 +20,65 @@ const _ = /* @__PURE__ */ v({
|
|
|
20
20
|
withClearButton: { type: Boolean, default: !0 }
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:modelValue"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
23
|
+
setup(c, { emit: m }) {
|
|
24
|
+
const i = c, f = m, o = I(), h = V(i, "class", "withIcon"), v = z(h, f), b = y(() => {
|
|
25
25
|
const e = o.modelValue.value;
|
|
26
26
|
return Array.isArray(e) ? e.length > 0 : e != null && e !== "";
|
|
27
27
|
});
|
|
28
|
-
function
|
|
28
|
+
function g(e) {
|
|
29
29
|
e.stopPropagation(), e.preventDefault();
|
|
30
30
|
const r = o.multiple.value ? [] : void 0;
|
|
31
31
|
o.modelValue.value = r;
|
|
32
32
|
}
|
|
33
|
-
return (e, r) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
33
|
+
return (e, r) => {
|
|
34
|
+
var u;
|
|
35
|
+
return n(), a("div", {
|
|
36
|
+
"data-slot": "command-input-wrapper",
|
|
37
|
+
class: d(
|
|
38
|
+
t(p)(
|
|
39
|
+
"selection:bg-primary selection:text-primary-foreground !border-input flex h-10 w-full items-center gap-3 rounded-xl border bg-transparent p-2.5 shadow-xs transition-[color,box-shadow]",
|
|
40
|
+
"hover:ring-ring/24 hover:ring-[2px] has-[:disabled]:pointer-events-none",
|
|
41
|
+
"focus-within:ring-ring/24 focus-within:border-none focus-within:ring-[2px]",
|
|
42
|
+
"aria-invalid:ring-destructive/24 aria-invalid:border-destructive"
|
|
43
|
+
)
|
|
41
44
|
)
|
|
42
|
-
)
|
|
43
|
-
}, [
|
|
44
|
-
e.withIcon ? (n(), w(t(A), {
|
|
45
|
-
key: 0,
|
|
46
|
-
class: "size-4 shrink-0 opacity-50"
|
|
47
|
-
})) : u("", !0),
|
|
48
|
-
a(t(P), C({
|
|
49
|
-
"data-slot": "command-input",
|
|
50
|
-
class: t(d)(
|
|
51
|
-
"placeholder:text-muted-foreground flex h-full w-full bg-transparent text-sm text-gray-800 outline-hidden disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
52
|
-
s.class
|
|
53
|
-
)
|
|
54
|
-
}, { ...e.$attrs, ...t(h) }), {
|
|
55
|
-
default: B(() => [
|
|
56
|
-
V(e.$slots, "default")
|
|
57
|
-
]),
|
|
58
|
-
_: 3
|
|
59
|
-
}, 16, ["class"]),
|
|
60
|
-
e.withClearButton && g.value ? (n(), l("button", {
|
|
61
|
-
key: 1,
|
|
62
|
-
type: "button",
|
|
63
|
-
class: "text-muted-foreground hover:text-foreground cursor-pointer transition-colors",
|
|
64
|
-
onClick: b
|
|
65
|
-
}, [
|
|
66
|
-
a(t(E), { class: "size-4" })
|
|
67
|
-
])) : u("", !0),
|
|
68
|
-
y("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
class: i(["text-muted-foreground hover:text-foreground cursor-pointer transition-transform", {
|
|
71
|
-
"rotate-180": t(o).open.value
|
|
72
|
-
}]),
|
|
73
|
-
onClick: r[0] || (r[0] = ($) => t(o).onOpenChange(!t(o).open.value))
|
|
74
45
|
}, [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
46
|
+
e.withIcon ? (n(), w(t(A), {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: "size-4 shrink-0 opacity-50"
|
|
49
|
+
})) : s("", !0),
|
|
50
|
+
l(t(P), C({
|
|
51
|
+
"data-slot": "command-input",
|
|
52
|
+
class: t(p)(
|
|
53
|
+
"placeholder:text-muted-foreground flex h-full w-full bg-transparent text-sm text-gray-800 outline-hidden disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
54
|
+
i.class
|
|
55
|
+
)
|
|
56
|
+
}, { ...e.$attrs, ...t(v) }), {
|
|
57
|
+
default: B(() => [
|
|
58
|
+
k(e.$slots, "default")
|
|
59
|
+
]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 16, ["class"]),
|
|
62
|
+
e.withClearButton && b.value ? (n(), a("button", {
|
|
63
|
+
key: 1,
|
|
64
|
+
type: "button",
|
|
65
|
+
class: "text-muted-foreground hover:text-foreground cursor-pointer transition-colors",
|
|
66
|
+
onClick: g
|
|
67
|
+
}, [
|
|
68
|
+
l(t($), { class: "size-4" })
|
|
69
|
+
])) : s("", !0),
|
|
70
|
+
(u = t(o).disabled) != null && u.value ? s("", !0) : (n(), a("button", {
|
|
71
|
+
key: 2,
|
|
72
|
+
type: "button",
|
|
73
|
+
class: d(["text-muted-foreground hover:text-foreground cursor-pointer transition-transform", {
|
|
74
|
+
"rotate-180": t(o).open.value
|
|
75
|
+
}]),
|
|
76
|
+
onClick: r[0] || (r[0] = (E) => t(o).onOpenChange(!t(o).open.value))
|
|
77
|
+
}, [
|
|
78
|
+
l(t(D), { class: "size-4" })
|
|
79
|
+
], 2))
|
|
80
|
+
], 2);
|
|
81
|
+
};
|
|
78
82
|
}
|
|
79
83
|
});
|
|
80
84
|
export {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, createBlock as u, openBlock as l, unref as a, mergeProps as b, withCtx as m, renderSlot as f, createElementVNode as r, createElementBlock as v, createCommentVNode as g, createVNode as i } from "vue";
|
|
2
2
|
import { cn as h } from "../lib/utils.js";
|
|
3
3
|
import x from "../popover/PopoverTrigger.vue.js";
|
|
4
4
|
import { injectMultiSelectContext as C } from "./contexts.js";
|
|
5
5
|
import y from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/x.js";
|
|
6
6
|
import w from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-down.js";
|
|
7
|
-
const k = { class: "inline-flex gap-1" }, _ = { "aria-hidden": "true" }, j = /* @__PURE__ */
|
|
7
|
+
const k = { class: "inline-flex gap-1" }, _ = { "aria-hidden": "true" }, j = /* @__PURE__ */ p({
|
|
8
8
|
__name: "MultiSelectTrigger",
|
|
9
9
|
props: {
|
|
10
10
|
class: {},
|
|
@@ -20,7 +20,7 @@ const k = { class: "inline-flex gap-1" }, _ = { "aria-hidden": "true" }, j = /*
|
|
|
20
20
|
}
|
|
21
21
|
return (e, B) => {
|
|
22
22
|
var o, s;
|
|
23
|
-
return
|
|
23
|
+
return l(), u(a(x), b({
|
|
24
24
|
"data-slot": "multi-select-trigger",
|
|
25
25
|
as: e.as,
|
|
26
26
|
"as-child": e.asChild,
|
|
@@ -28,11 +28,11 @@ const k = { class: "inline-flex gap-1" }, _ = { "aria-hidden": "true" }, j = /*
|
|
|
28
28
|
role: "combobox",
|
|
29
29
|
class: a(h)(
|
|
30
30
|
"!border-input data-[placeholder]:text-muted-foreground",
|
|
31
|
-
"hover:ring-ring/24 hover:ring-[2px]
|
|
31
|
+
"hover:ring-ring/24 hover:ring-[2px]",
|
|
32
32
|
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none",
|
|
33
33
|
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
34
34
|
"shadow-xs flex w-fit items-center justify-between gap-2 whitespace-nowrap rounded-xl border bg-transparent p-2.5 text-sm transition-[color,box-shadow]",
|
|
35
|
-
"disabled:cursor-not-allowed disabled:!border-neutral-200 disabled:bg-gray-100",
|
|
35
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:!border-neutral-200 disabled:bg-gray-100 data-[disabled]:pointer-events-none",
|
|
36
36
|
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=multi-select-value]:flex *:data-[slot=multi-select-value]:items-stretch *:data-[slot=multi-select-value]:gap-2 [&_svg]:shrink-0",
|
|
37
37
|
n.class
|
|
38
38
|
),
|
|
@@ -43,16 +43,16 @@ const k = { class: "inline-flex gap-1" }, _ = { "aria-hidden": "true" }, j = /*
|
|
|
43
43
|
"data-disabled": (s = a(t).disabled) != null && s.value || e.disabled ? "" : void 0
|
|
44
44
|
}, e.$attrs), {
|
|
45
45
|
default: m(() => [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
a(t).isEmptyModelValue.value ?
|
|
46
|
+
f(e.$slots, "default"),
|
|
47
|
+
r("div", k, [
|
|
48
|
+
a(t).isEmptyModelValue.value ? g("", !0) : (l(), v("button", {
|
|
49
49
|
key: 0,
|
|
50
50
|
class: "text-primary-500 cursor-pointer bg-none",
|
|
51
51
|
onClick: c
|
|
52
52
|
}, [
|
|
53
53
|
i(a(y), { class: "size-5" })
|
|
54
54
|
])),
|
|
55
|
-
|
|
55
|
+
r("span", _, [
|
|
56
56
|
i(a(w), { class: "size-5 text-gray-800" })
|
|
57
57
|
])
|
|
58
58
|
])
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as m, computed as v, createBlock as f, openBlock as l, unref as t, mergeProps as g, withCtx as n, renderSlot as h, createElementVNode as b, createElementBlock as x, createCommentVNode as w, createVNode as r, withModifiers as C } from "vue";
|
|
2
2
|
import { cn as _ } from "../lib/utils.js";
|
|
3
3
|
import { reactiveOmit as y } from "@vueuse/core";
|
|
4
4
|
import { useForwardProps as B, injectSelectRootContext as V, SelectTrigger as k, SelectIcon as P } from "reka-ui";
|
|
5
5
|
import z from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/x.js";
|
|
6
6
|
import S from "../node_modules/.pnpm/lucide-vue-next@0.542.0_vue@3.5.19_typescript@5.8.3_/node_modules/lucide-vue-next/dist/esm/icons/chevron-down.js";
|
|
7
|
-
const N = { class: "flex items-center gap-2" }, I = /* @__PURE__ */
|
|
7
|
+
const N = { class: "flex items-center gap-2" }, I = /* @__PURE__ */ m({
|
|
8
8
|
__name: "SelectTrigger",
|
|
9
9
|
props: {
|
|
10
10
|
disabled: { type: Boolean },
|
|
@@ -15,26 +15,26 @@ const N = { class: "flex items-center gap-2" }, I = /* @__PURE__ */ g({
|
|
|
15
15
|
withClearButton: { type: Boolean, default: !0 }
|
|
16
16
|
},
|
|
17
17
|
setup(i) {
|
|
18
|
-
const
|
|
18
|
+
const s = i, d = y(s, "class"), c = B(d), o = V();
|
|
19
19
|
function u(e) {
|
|
20
20
|
e.stopPropagation(), e.preventDefault(), o.multiple.value ? o.modelValue.value = [] : o.modelValue.value = void 0;
|
|
21
21
|
}
|
|
22
|
-
const p =
|
|
22
|
+
const p = v(() => {
|
|
23
23
|
const e = o.modelValue.value;
|
|
24
24
|
return Array.isArray(e) ? e.length > 0 : e != null && e !== "";
|
|
25
25
|
});
|
|
26
|
-
return (e,
|
|
26
|
+
return (e, a) => (l(), f(t(k), g({ "data-slot": "select-trigger" }, t(c), {
|
|
27
27
|
class: t(_)(
|
|
28
28
|
// eslint-disable-next-line prettier/prettier
|
|
29
29
|
"!border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
30
|
-
"hover:ring-ring/24 hover:ring-[2px]
|
|
30
|
+
"hover:ring-ring/24 hover:ring-[2px]",
|
|
31
31
|
"focus-visible:ring-ring/50 outline-none focus-visible:ring-[3px]",
|
|
32
32
|
"aria-invalid:ring-destructive/20 aria-invalid:border-destructive",
|
|
33
33
|
"flex w-fit items-center justify-between gap-2 rounded-xl border bg-transparent p-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow]",
|
|
34
|
-
"disabled:cursor-not-allowed disabled:!border-neutral-200 disabled:bg-gray-100",
|
|
34
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:!border-neutral-200 disabled:bg-gray-100 data-[disabled]:pointer-events-none",
|
|
35
35
|
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
36
36
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
37
|
-
|
|
37
|
+
s.class
|
|
38
38
|
)
|
|
39
39
|
}), {
|
|
40
40
|
default: n(() => [
|
|
@@ -44,7 +44,7 @@ const N = { class: "flex items-center gap-2" }, I = /* @__PURE__ */ g({
|
|
|
44
44
|
key: 0,
|
|
45
45
|
role: "button",
|
|
46
46
|
class: "text-muted-foreground hover:text-foreground z-10 cursor-pointer transition-colors",
|
|
47
|
-
onPointerdown:
|
|
47
|
+
onPointerdown: a[0] || (a[0] = C(() => {
|
|
48
48
|
}, ["stop"])),
|
|
49
49
|
onClick: u
|
|
50
50
|
}, [
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v2.0.16.d.ts","sourceRoot":"","sources":["../../../../src/changelog/versions/components/v2.0.16.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAE9C,QAAA,MAAM,OAAO,EAAE,WAcd,CAAA;AAED,eAAe,OAAO,CAAA"}
|