@enya-learning/nova 0.5.0 → 0.6.0
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/README.md +8 -10
- package/dist/chunks/dist-fahbq1psobj0ox6s.js.map +1 -1
- package/dist/components/accordion.js +23 -20
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.js +2 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/avatar.js +24 -24
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/badge.js +12 -12
- package/dist/components/badge.js.map +1 -1
- package/dist/components/box.js +16 -0
- package/dist/components/box.js.map +1 -0
- package/dist/components/breadcrumb.js +28 -24
- package/dist/components/breadcrumb.js.map +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button.js +10 -10
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.js +491 -487
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/carousel.js +105 -98
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/chart.js +2 -2
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox.js +7 -6
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.js +64 -51
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/command.js +167 -160
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.js +40 -36
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +25 -24
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +2 -2
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +39 -35
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/empty.js.map +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/field.js.map +1 -1
- package/dist/components/heading.js +39 -0
- package/dist/components/heading.js.map +1 -0
- package/dist/components/input-group.js +14 -14
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.js +28 -27
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/input.js.map +1 -1
- package/dist/components/item.js +34 -34
- package/dist/components/item.js.map +1 -1
- package/dist/components/kbd.js +7 -7
- package/dist/components/kbd.js.map +1 -1
- package/dist/components/menubar.js +52 -51
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/native-select.js +21 -19
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/navigation-menu.js +21 -19
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/pagination.js +33 -30
- package/dist/components/pagination.js.map +1 -1
- package/dist/components/progress.js +4 -4
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-group.js +14 -14
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/select.js +64 -57
- package/dist/components/select.js.map +1 -1
- package/dist/components/sheet.js +22 -21
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/sidebar.js +83 -79
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js +7 -7
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sonner.js +137 -121
- package/dist/components/sonner.js.map +1 -1
- package/dist/components/spinner.js +10 -8
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/switch.js +5 -5
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +14 -14
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +15 -15
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text.js +47 -0
- package/dist/components/text.js.map +1 -0
- package/dist/components/textarea.js +5 -5
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle.js +7 -7
- package/dist/components/toggle.js.map +1 -1
- package/dist/components/tooltip.js +5 -5
- package/dist/components/tooltip.js.map +1 -1
- package/dist/index.js +22 -14
- package/dist/src/components/box/box.d.ts +7 -0
- package/dist/src/components/box/index.d.ts +1 -0
- package/dist/src/components/heading/heading.d.ts +15 -0
- package/dist/src/components/heading/index.d.ts +1 -0
- package/dist/src/components/spinner/spinner.d.ts +2 -1
- package/dist/src/components/text/index.d.ts +1 -0
- package/dist/src/components/text/text.d.ts +13 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/styles/nova-binding.css +264 -266
- package/dist/styles/nova.css +158 -49
- package/dist/styles/typography.css +3 -123
- package/package.json +15 -2
- package/src/eslint/no-primitive-colors.js +2 -2
- package/dist/styles/theme-nova.css +0 -197
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t } from "../chunks/utils-kyb5nny4y41y7hd8.js";
|
|
2
|
+
import { t as o } from "../chunks/utils-kyb5nny4y41y7hd8.js";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
import {
|
|
4
|
+
import { HugeiconsIcon as t } from "@hugeicons/react";
|
|
5
|
+
import { CheckIcon as d } from "@hugeicons/core-free-icons";
|
|
5
6
|
import { Checkbox as e } from "@base-ui/react/checkbox";
|
|
6
|
-
function
|
|
7
|
+
function p({ className: i, ...a }) {
|
|
7
8
|
return /* @__PURE__ */ r(e.Root, {
|
|
8
9
|
"data-slot": "checkbox",
|
|
9
|
-
className:
|
|
10
|
+
className: o("peer relative flex size-4 shrink-0 items-center justify-center rounded-[6px] border border-border transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-border/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", i),
|
|
10
11
|
...a,
|
|
11
12
|
children: /* @__PURE__ */ r(e.Indicator, {
|
|
12
13
|
"data-slot": "checkbox-indicator",
|
|
13
14
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
14
|
-
children: /* @__PURE__ */ r(
|
|
15
|
+
children: /* @__PURE__ */ r(t, { icon: d })
|
|
15
16
|
})
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
p as Checkbox
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","names":[],"sources":["../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\n\nimport { cn } from \"../../lib/utils\"\nimport { CheckIcon } from \"
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":[],"sources":["../../src/components/checkbox/checkbox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\"\n\nimport { cn } from \"../../lib/utils\"\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport { CheckIcon } from \"@hugeicons/core-free-icons\"\n\nfunction Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"peer relative flex size-4 shrink-0 items-center justify-center rounded-[6px] border border-border transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-border/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <HugeiconsIcon icon={CheckIcon} />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n\nexport { Checkbox }\n"],"mappings":";;;;;;AAQA,SAAS,EAAS,EAAE,WAAA,GAAW,GAAG,EAAA,GAAuC;AACvE,SACE,gBAAA,EAAC,EAAkB,MAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EACT,+qBACA,CACF;AAAA,IACA,GAAI;AAAA,cAEJ,gBAAA,EAAC,EAAkB,WAAnB;AAAA,MACE,aAAU;AAAA,MACV,WAAU;AAAA,gBAEV,gBAAA,EAAC,GAAD,EAAe,MAAM,EAAY,CAAA;AAAA,IACN,CAAA;AAAA,EACP,CAAA;AAE5B"}
|
|
@@ -1,62 +1,69 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as n } from "../chunks/utils-kyb5nny4y41y7hd8.js";
|
|
3
|
-
import { Button as
|
|
4
|
-
import { InputGroup as
|
|
3
|
+
import { Button as b } from "./button.js";
|
|
4
|
+
import { InputGroup as x, InputGroupAddon as h, InputGroupButton as m, InputGroupInput as g } from "./input-group.js";
|
|
5
5
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { HugeiconsIcon as c } from "@hugeicons/react";
|
|
7
|
+
import { Cancel01Icon as u, CheckIcon as f, ChevronDownIcon as v } from "@hugeicons/core-free-icons";
|
|
8
|
+
import * as C from "react";
|
|
8
9
|
import { Combobox as a } from "@base-ui/react";
|
|
9
|
-
var
|
|
10
|
-
function
|
|
10
|
+
var R = a.Root;
|
|
11
|
+
function _({ ...o }) {
|
|
11
12
|
return /* @__PURE__ */ t(a.Value, {
|
|
12
13
|
"data-slot": "combobox-value",
|
|
13
14
|
...o
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function w({ className: o, children: e, ...r }) {
|
|
17
18
|
return /* @__PURE__ */ s(a.Trigger, {
|
|
18
19
|
"data-slot": "combobox-trigger",
|
|
19
20
|
className: n("[&_svg:not([class*='size-'])]:size-4", o),
|
|
20
21
|
...r,
|
|
21
|
-
children: [e, /* @__PURE__ */ t(
|
|
22
|
+
children: [e, /* @__PURE__ */ t(c, {
|
|
23
|
+
icon: v,
|
|
24
|
+
className: "pointer-events-none size-4 text-muted-foreground"
|
|
25
|
+
})]
|
|
22
26
|
});
|
|
23
27
|
}
|
|
24
|
-
function
|
|
28
|
+
function N({ className: o, ...e }) {
|
|
25
29
|
return /* @__PURE__ */ t(a.Clear, {
|
|
26
30
|
"data-slot": "combobox-clear",
|
|
27
|
-
render: /* @__PURE__ */ t(
|
|
31
|
+
render: /* @__PURE__ */ t(m, {
|
|
28
32
|
variant: "ghost",
|
|
29
33
|
size: "icon-xs"
|
|
30
34
|
}),
|
|
31
35
|
className: n(o),
|
|
32
36
|
...e,
|
|
33
|
-
children: /* @__PURE__ */ t(
|
|
37
|
+
children: /* @__PURE__ */ t(c, {
|
|
38
|
+
icon: u,
|
|
39
|
+
className: "pointer-events-none"
|
|
40
|
+
})
|
|
34
41
|
});
|
|
35
42
|
}
|
|
36
|
-
function
|
|
37
|
-
return /* @__PURE__ */ s(
|
|
43
|
+
function P({ className: o, children: e, disabled: r = !1, showTrigger: i = !0, showClear: l = !1, ...d }) {
|
|
44
|
+
return /* @__PURE__ */ s(x, {
|
|
38
45
|
className: n("w-auto", o),
|
|
39
46
|
children: [
|
|
40
47
|
/* @__PURE__ */ t(a.Input, {
|
|
41
|
-
render: /* @__PURE__ */ t(
|
|
48
|
+
render: /* @__PURE__ */ t(g, { disabled: r }),
|
|
42
49
|
...d
|
|
43
50
|
}),
|
|
44
|
-
/* @__PURE__ */ s(
|
|
51
|
+
/* @__PURE__ */ s(h, {
|
|
45
52
|
align: "inline-end",
|
|
46
|
-
children: [i && /* @__PURE__ */ t(
|
|
53
|
+
children: [i && /* @__PURE__ */ t(m, {
|
|
47
54
|
size: "icon-xs",
|
|
48
55
|
variant: "ghost",
|
|
49
|
-
render: /* @__PURE__ */ t(
|
|
56
|
+
render: /* @__PURE__ */ t(w, {}),
|
|
50
57
|
"data-slot": "input-group-button",
|
|
51
58
|
className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
|
|
52
59
|
disabled: r
|
|
53
|
-
}), l && /* @__PURE__ */ t(
|
|
60
|
+
}), l && /* @__PURE__ */ t(N, { disabled: r })]
|
|
54
61
|
}),
|
|
55
62
|
e
|
|
56
63
|
]
|
|
57
64
|
});
|
|
58
65
|
}
|
|
59
|
-
function
|
|
66
|
+
function A({ className: o, side: e = "bottom", sideOffset: r = 6, align: i = "start", alignOffset: l = 0, anchor: d, ...p }) {
|
|
60
67
|
return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ t(a.Positioner, {
|
|
61
68
|
side: e,
|
|
62
69
|
sideOffset: r,
|
|
@@ -67,57 +74,60 @@ function _({ className: o, side: e = "bottom", sideOffset: r = 6, align: i = "st
|
|
|
67
74
|
children: /* @__PURE__ */ t(a.Popup, {
|
|
68
75
|
"data-slot": "combobox-content",
|
|
69
76
|
"data-chips": !!d,
|
|
70
|
-
className: n("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-
|
|
71
|
-
...
|
|
77
|
+
className: n("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-border/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
|
|
78
|
+
...p
|
|
72
79
|
})
|
|
73
80
|
}) });
|
|
74
81
|
}
|
|
75
|
-
function
|
|
82
|
+
function B({ className: o, ...e }) {
|
|
76
83
|
return /* @__PURE__ */ t(a.List, {
|
|
77
84
|
"data-slot": "combobox-list",
|
|
78
85
|
className: n("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", o),
|
|
79
86
|
...e
|
|
80
87
|
});
|
|
81
88
|
}
|
|
82
|
-
function
|
|
89
|
+
function E({ className: o, children: e, ...r }) {
|
|
83
90
|
return /* @__PURE__ */ s(a.Item, {
|
|
84
91
|
"data-slot": "combobox-item",
|
|
85
92
|
className: n("relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 ps-3 pe-8 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", o),
|
|
86
93
|
...r,
|
|
87
94
|
children: [e, /* @__PURE__ */ t(a.ItemIndicator, {
|
|
88
95
|
render: /* @__PURE__ */ t("span", { className: "pointer-events-none absolute end-2 flex size-4 items-center justify-center" }),
|
|
89
|
-
children: /* @__PURE__ */ t(
|
|
96
|
+
children: /* @__PURE__ */ t(c, {
|
|
97
|
+
icon: f,
|
|
98
|
+
className: "pointer-events-none"
|
|
99
|
+
})
|
|
90
100
|
})]
|
|
91
101
|
});
|
|
92
102
|
}
|
|
93
|
-
function
|
|
103
|
+
function S({ className: o, ...e }) {
|
|
94
104
|
return /* @__PURE__ */ t(a.Group, {
|
|
95
105
|
"data-slot": "combobox-group",
|
|
96
106
|
className: n(o),
|
|
97
107
|
...e
|
|
98
108
|
});
|
|
99
109
|
}
|
|
100
|
-
function
|
|
110
|
+
function T({ className: o, ...e }) {
|
|
101
111
|
return /* @__PURE__ */ t(a.GroupLabel, {
|
|
102
112
|
"data-slot": "combobox-label",
|
|
103
113
|
className: n("px-3.5 py-2.5 text-xs text-muted-foreground", o),
|
|
104
114
|
...e
|
|
105
115
|
});
|
|
106
116
|
}
|
|
107
|
-
function
|
|
117
|
+
function V({ ...o }) {
|
|
108
118
|
return /* @__PURE__ */ t(a.Collection, {
|
|
109
119
|
"data-slot": "combobox-collection",
|
|
110
120
|
...o
|
|
111
121
|
});
|
|
112
122
|
}
|
|
113
|
-
function
|
|
123
|
+
function D({ className: o, ...e }) {
|
|
114
124
|
return /* @__PURE__ */ t(a.Empty, {
|
|
115
125
|
"data-slot": "combobox-empty",
|
|
116
126
|
className: n("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", o),
|
|
117
127
|
...e
|
|
118
128
|
});
|
|
119
129
|
}
|
|
120
|
-
function
|
|
130
|
+
function H({ className: o, ...e }) {
|
|
121
131
|
return /* @__PURE__ */ t(a.Separator, {
|
|
122
132
|
"data-slot": "combobox-separator",
|
|
123
133
|
className: n("-mx-1 my-1 h-px bg-border/50", o),
|
|
@@ -127,53 +137,56 @@ function V({ className: o, ...e }) {
|
|
|
127
137
|
function $({ className: o, ...e }) {
|
|
128
138
|
return /* @__PURE__ */ t(a.Chips, {
|
|
129
139
|
"data-slot": "combobox-chips",
|
|
130
|
-
className: n("flex min-h-9 flex-wrap items-center gap-1.5 rounded-4xl border border-
|
|
140
|
+
className: n("flex min-h-9 flex-wrap items-center gap-1.5 rounded-4xl border border-border bg-border/30 bg-clip-padding px-2.5 py-1.5 text-sm transition-colors focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", o),
|
|
131
141
|
...e
|
|
132
142
|
});
|
|
133
143
|
}
|
|
134
|
-
function
|
|
144
|
+
function q({ className: o, children: e, showRemove: r = !0, ...i }) {
|
|
135
145
|
return /* @__PURE__ */ s(a.Chip, {
|
|
136
146
|
"data-slot": "combobox-chip",
|
|
137
147
|
className: n("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-4xl bg-muted-foreground/10 px-2 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0", o),
|
|
138
148
|
...i,
|
|
139
149
|
children: [e, r && /* @__PURE__ */ t(a.ChipRemove, {
|
|
140
|
-
render: /* @__PURE__ */ t(
|
|
150
|
+
render: /* @__PURE__ */ t(b, {
|
|
141
151
|
variant: "ghost",
|
|
142
152
|
size: "icon-xs"
|
|
143
153
|
}),
|
|
144
154
|
className: "-ms-1 opacity-50 hover:opacity-100",
|
|
145
155
|
"data-slot": "combobox-chip-remove",
|
|
146
|
-
children: /* @__PURE__ */ t(
|
|
156
|
+
children: /* @__PURE__ */ t(c, {
|
|
157
|
+
icon: u,
|
|
158
|
+
className: "pointer-events-none"
|
|
159
|
+
})
|
|
147
160
|
})]
|
|
148
161
|
});
|
|
149
162
|
}
|
|
150
|
-
function
|
|
163
|
+
function F({ className: o, ...e }) {
|
|
151
164
|
return /* @__PURE__ */ t(a.Input, {
|
|
152
165
|
"data-slot": "combobox-chip-input",
|
|
153
166
|
className: n("min-w-16 flex-1 outline-none", o),
|
|
154
167
|
...e
|
|
155
168
|
});
|
|
156
169
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
170
|
+
function J() {
|
|
171
|
+
return C.useRef(null);
|
|
159
172
|
}
|
|
160
173
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
174
|
+
R as Combobox,
|
|
175
|
+
q as ComboboxChip,
|
|
163
176
|
$ as ComboboxChips,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
+
F as ComboboxChipsInput,
|
|
178
|
+
V as ComboboxCollection,
|
|
179
|
+
A as ComboboxContent,
|
|
180
|
+
D as ComboboxEmpty,
|
|
181
|
+
S as ComboboxGroup,
|
|
182
|
+
P as ComboboxInput,
|
|
183
|
+
E as ComboboxItem,
|
|
184
|
+
T as ComboboxLabel,
|
|
185
|
+
B as ComboboxList,
|
|
186
|
+
H as ComboboxSeparator,
|
|
187
|
+
w as ComboboxTrigger,
|
|
188
|
+
_ as ComboboxValue,
|
|
189
|
+
J as useComboboxAnchor
|
|
177
190
|
};
|
|
178
191
|
|
|
179
192
|
//# sourceMappingURL=combobox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":[],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"../input-group\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n render={<ComboboxTrigger />}\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n \"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 ps-3 pe-8 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-3.5 py-2.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border/50\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"flex min-h-9 flex-wrap items-center gap-1.5 rounded-4xl border border-input bg-input/30 bg-clip-padding px-2.5 py-1.5 text-sm transition-colors focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-4xl bg-muted-foreground/10 px-2 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAW,EAAkB;AAEnC,SAAS,EAAc,EAAE,GAAG,EAAA,GAAwC;AAClE,SAAO,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IAAyB,aAAU;AAAA,IAAiB,GAAI;AAAA,EAAQ,CAAA;AACzE;AAEA,SAAS,EAAgB,EACvB,WAAA,GACA,UAAA,GACA,GAAG,EAAA,GAC+B;AAClC,SACE,gBAAA,EAAC,EAAkB,SAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EAAG,wCAAwC,CAAS;AAAA,IAC/D,GAAI;AAAA,cAHN,CAKG,GACD,gBAAA,EAAC,GAAD,EAAiB,WAAU,mDAAoD,CAAA,CACtD;AAAA;AAE/B;AAEA,SAAS,EAAc,EAAE,WAAA,GAAW,GAAG,EAAA,GAAwC;AAC7E,SACE,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IACE,aAAU;AAAA,IACV,QAAQ,gBAAA,EAAC,GAAD;AAAA,MAAkB,SAAQ;AAAA,MAAQ,MAAK;AAAA,IAAW,CAAA;AAAA,IAC1D,WAAW,EAAG,CAAS;AAAA,IACvB,GAAI;AAAA,cAEJ,gBAAA,EAAC,GAAD,EAAO,WAAU,sBAAuB,CAAA;AAAA,EACjB,CAAA;AAE7B;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,UAAA,GACA,UAAA,IAAW,IACX,aAAA,IAAc,IACd,WAAA,IAAY,IACZ,GAAG,EAAA,GAIF;AACD,SACE,gBAA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IACvD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,GAAG,EAAA,GAE4B;AAC/B,SACE,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EACT,8bACA,CACF;AAAA,IACA,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,EAAa,EACpB,WAAA,GACA,UAAA,GACA,YAAA,IAAa,IACb,GAAG,EAAA,GAGF;AACD,SACE,gBAAA,EAAC,EAAkB,MAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EACT,0SACA,CACF;AAAA,IACA,GAAI;AAAA,cANN,CAQG,GACA,KACC,gBAAA,EAAC,EAAkB,YAAnB;AAAA,MACE,QAAQ,gBAAA,EAAC,GAAD;AAAA,QAAQ,SAAQ;AAAA,QAAQ,MAAK;AAAA,MAAW,CAAA;AAAA,MAChD,WAAU;AAAA,MACV,aAAU;AAAA,gBAEV,gBAAA,EAAC,GAAD,EAAO,WAAU,sBAAuB,CAAA;AAAA,IACZ,CAAA,CAEV;AAAA;AAE5B;AAEA,SAAS,EAAmB,EAC1B,WAAA,GACA,GAAG,EAAA,GAC6B;AAChC,SACE,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EAAG,gCAAgC,CAAS;AAAA,IACvD,GAAI;AAAA,EACL,CAAA;AAEL;AAEA,SAAS,IAAoB;AAC3B,SAAO,EAAM,OAA8B,IAAI;AACjD"}
|
|
1
|
+
{"version":3,"file":"combobox.js","names":[],"sources":["../../src/components/combobox/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Button } from \"../button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"../input-group\"\nimport { HugeiconsIcon } from \"@hugeicons/react\"\nimport {\n ChevronDownIcon,\n Cancel01Icon,\n CheckIcon,\n} from \"@hugeicons/core-free-icons\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <HugeiconsIcon\n icon={ChevronDownIcon}\n className=\"pointer-events-none size-4 text-muted-foreground\"\n />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <HugeiconsIcon icon={Cancel01Icon} className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n render={<ComboboxTrigger />}\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n \"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-9 *:data-[slot=input-group]:border-none *:data-[slot=input-group]:bg-border/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 ps-3 pe-8 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute end-2 flex size-4 items-center justify-center\" />\n }\n >\n <HugeiconsIcon icon={CheckIcon} className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-3.5 py-2.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border/50\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"flex min-h-9 flex-wrap items-center gap-1.5 rounded-4xl border border-border bg-border/30 bg-clip-padding px-2.5 py-1.5 text-sm transition-colors focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-[3px] has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-4xl bg-muted-foreground/10 px-2 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pe-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ms-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <HugeiconsIcon icon={Cancel01Icon} className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"mappings":";;;;;;;;;AAkBA,IAAM,IAAW,EAAkB;AAEnC,SAAS,EAAc,EAAE,GAAG,EAAA,GAAwC;AAClE,SAAO,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IAAyB,aAAU;AAAA,IAAiB,GAAI;AAAA,EAAQ,CAAA;AACzE;AAEA,SAAS,EAAgB,EACvB,WAAA,GACA,UAAA,GACA,GAAG,EAAA,GAC+B;AAClC,SACE,gBAAA,EAAC,EAAkB,SAAnB;AAAA,IACE,aAAU;AAAA,IACV,WAAW,EAAG,wCAAwC,CAAS;AAAA,IAC/D,GAAI;AAAA,cAHN,CAKG,GACD,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM;AAAA,MACN,WAAU;AAAA,IACX,CAAA,CACwB;AAAA;AAE/B;AAEA,SAAS,EAAc,EAAE,WAAA,GAAW,GAAG,EAAA,GAAwC;AAC7E,SACE,gBAAA,EAAC,EAAkB,OAAnB;AAAA,IACE,aAAU;AAAA,IACV,QAAQ,gBAAA,EAAC,GAAD;AAAA,MAAkB,SAAQ;AAAA,MAAQ,MAAK;AAAA,IAAW,CAAA;AAAA,IAC1D,WAAW,EAAG,CAAS;AAAA,IACvB,GAAI;AAAA,cAEJ,gBAAA,EAAC,GAAD;AAAA,MAAe,MAAM;AAAA,MAAc,WAAU;AAAA,IAAuB,CAAA;AAAA,EAC7C,CAAA;AAE7B;AAEA,SAAS,EAAc,EACrB,WAAA,GACA,UAAA,GACA,UAAA,IAAW,IACX,aAAA,IAAc,IACd,WAAA,IAAY,IACZ,GAAG,EAAA,GAIF;AACD,SACE,gBAAA,EAAC,GAAD;AAAA,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