@bergetai/ui 0.16.2 → 0.18.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/dist/components/alert/Alert.d.cts +1 -1
- package/dist/components/alert/Alert.d.mts +1 -1
- package/dist/components/badge/Badge.d.cts +1 -1
- package/dist/components/badge/Badge.d.mts +1 -1
- package/dist/components/box/Box.d.cts +2 -2
- package/dist/components/box/Box.d.mts +2 -2
- package/dist/components/button/Button.cjs +21 -4
- package/dist/components/button/Button.cjs.map +1 -1
- package/dist/components/button/Button.d.cts +2 -1
- package/dist/components/button/Button.d.cts.map +1 -1
- package/dist/components/button/Button.d.mts +2 -1
- package/dist/components/button/Button.d.mts.map +1 -1
- package/dist/components/button/Button.mjs +19 -5
- package/dist/components/button/Button.mjs.map +1 -1
- package/dist/components/button/anchorVariants.cjs +56 -0
- package/dist/components/button/anchorVariants.cjs.map +1 -0
- package/dist/components/button/anchorVariants.d.cts +45 -0
- package/dist/components/button/anchorVariants.d.cts.map +1 -0
- package/dist/components/button/anchorVariants.d.mts +45 -0
- package/dist/components/button/anchorVariants.d.mts.map +1 -0
- package/dist/components/button/anchorVariants.mjs +55 -0
- package/dist/components/button/anchorVariants.mjs.map +1 -0
- package/dist/components/button/index.d.cts +2 -1
- package/dist/components/button/index.d.mts +2 -1
- package/dist/components/code-block/CodeBlock.cjs +50 -48
- package/dist/components/code-block/CodeBlock.cjs.map +1 -1
- package/dist/components/code-block/CodeBlock.d.cts +27 -7
- package/dist/components/code-block/CodeBlock.d.cts.map +1 -1
- package/dist/components/code-block/CodeBlock.d.mts +27 -7
- package/dist/components/code-block/CodeBlock.d.mts.map +1 -1
- package/dist/components/code-block/CodeBlock.mjs +45 -50
- package/dist/components/code-block/CodeBlock.mjs.map +1 -1
- package/dist/components/code-block/index.d.cts +3 -0
- package/dist/components/code-block/index.d.mts +3 -0
- package/dist/components/combobox/index.d.cts +2 -0
- package/dist/components/combobox/index.d.mts +2 -0
- package/dist/components/country-select/CountrySelect.cjs +1 -1
- package/dist/components/country-select/CountrySelect.mjs +1 -1
- package/dist/components/grid/Grid.d.cts +2 -2
- package/dist/components/grid/Grid.d.mts +2 -2
- package/dist/components/popover/index.d.cts +2 -0
- package/dist/components/popover/index.d.mts +2 -0
- package/dist/components/radio-group/index.d.cts +2 -0
- package/dist/components/radio-group/index.d.mts +2 -0
- package/dist/components/tabs/Tabs.cjs +109 -0
- package/dist/components/tabs/Tabs.cjs.map +1 -0
- package/dist/components/tabs/Tabs.d.cts +29 -0
- package/dist/components/tabs/Tabs.d.cts.map +1 -0
- package/dist/components/tabs/Tabs.d.mts +29 -0
- package/dist/components/tabs/Tabs.d.mts.map +1 -0
- package/dist/components/tabs/Tabs.mjs +103 -0
- package/dist/components/tabs/Tabs.mjs.map +1 -0
- package/dist/components/tabs/index.d.cts +2 -0
- package/dist/components/tabs/index.d.mts +2 -0
- package/dist/hooks/use-highlighted-code.cjs +58 -0
- package/dist/hooks/use-highlighted-code.cjs.map +1 -0
- package/dist/hooks/use-highlighted-code.d.cts +5 -0
- package/dist/hooks/use-highlighted-code.d.cts.map +1 -0
- package/dist/hooks/use-highlighted-code.d.mts +5 -0
- package/dist/hooks/use-highlighted-code.d.mts.map +1 -0
- package/dist/hooks/use-highlighted-code.mjs +56 -0
- package/dist/hooks/use-highlighted-code.mjs.map +1 -0
- package/dist/index.cjs +44 -0
- package/dist/index.d.cts +14 -2
- package/dist/index.d.mts +14 -2
- package/dist/index.mjs +9 -2
- package/dist/lib/highlighter.cjs +81 -0
- package/dist/lib/highlighter.cjs.map +1 -0
- package/dist/lib/highlighter.mjs +79 -0
- package/dist/lib/highlighter.mjs.map +1 -0
- package/dist/primitives/button.d.cts +1 -1
- package/dist/primitives/button.d.mts +1 -1
- package/dist/primitives/code-block.cjs +133 -0
- package/dist/primitives/code-block.cjs.map +1 -0
- package/dist/primitives/code-block.d.cts +29 -0
- package/dist/primitives/code-block.d.cts.map +1 -0
- package/dist/primitives/code-block.d.mts +29 -0
- package/dist/primitives/code-block.d.mts.map +1 -0
- package/dist/primitives/code-block.mjs +124 -0
- package/dist/primitives/code-block.mjs.map +1 -0
- package/dist/primitives/combobox.cjs +123 -0
- package/dist/primitives/combobox.cjs.map +1 -0
- package/dist/primitives/combobox.d.cts +25 -0
- package/dist/primitives/combobox.d.cts.map +1 -0
- package/dist/primitives/combobox.d.mts +25 -0
- package/dist/primitives/combobox.d.mts.map +1 -0
- package/dist/primitives/combobox.mjs +111 -0
- package/dist/primitives/combobox.mjs.map +1 -0
- package/dist/primitives/message-scroller.cjs +1 -1
- package/dist/primitives/message-scroller.mjs +1 -1
- package/dist/primitives/popover.cjs +24 -0
- package/dist/primitives/popover.cjs.map +1 -1
- package/dist/primitives/popover.d.cts +12 -0
- package/dist/primitives/popover.d.cts.map +1 -0
- package/dist/primitives/popover.d.mts +12 -0
- package/dist/primitives/popover.d.mts.map +1 -0
- package/dist/primitives/popover.mjs +22 -1
- package/dist/primitives/popover.mjs.map +1 -1
- package/dist/primitives/radio-group.cjs +23 -0
- package/dist/primitives/radio-group.cjs.map +1 -0
- package/dist/primitives/radio-group.d.cts +8 -0
- package/dist/primitives/radio-group.d.cts.map +1 -0
- package/dist/primitives/radio-group.d.mts +8 -0
- package/dist/primitives/radio-group.d.mts.map +1 -0
- package/dist/primitives/radio-group.mjs +22 -0
- package/dist/primitives/radio-group.mjs.map +1 -0
- package/dist/primitives/sidebar.cjs +1 -1
- package/dist/primitives/sidebar.mjs +1 -1
- package/dist/primitives/tabs.cjs +51 -0
- package/dist/primitives/tabs.cjs.map +1 -0
- package/dist/primitives/tabs.d.cts +11 -0
- package/dist/primitives/tabs.d.cts.map +1 -0
- package/dist/primitives/tabs.d.mts +11 -0
- package/dist/primitives/tabs.d.mts.map +1 -0
- package/dist/primitives/tabs.mjs +47 -0
- package/dist/primitives/tabs.mjs.map +1 -0
- package/dist/styles/index.css +61 -0
- package/package.json +2 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let cn = require("cn");
|
|
4
|
+
let _base_ui_react_combobox = require("@base-ui/react/combobox");
|
|
5
|
+
let lucide_react = require("lucide-react");
|
|
6
|
+
//#region src/primitives/combobox.tsx
|
|
7
|
+
const Combobox = _base_ui_react_combobox.Combobox.Root;
|
|
8
|
+
function ComboboxTrigger({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Trigger, {
|
|
10
|
+
"data-slot": "combobox-trigger",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function ComboboxValue({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Value, {
|
|
16
|
+
"data-slot": "combobox-value",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function ComboboxInput({ className, showTrigger = false, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Input, {
|
|
22
|
+
"data-slot": "combobox-input",
|
|
23
|
+
className: (0, cn.cn)("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-muted-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function ComboboxContent({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Positioner, {
|
|
29
|
+
side,
|
|
30
|
+
sideOffset,
|
|
31
|
+
align,
|
|
32
|
+
alignOffset,
|
|
33
|
+
className: "isolate z-50",
|
|
34
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Popup, {
|
|
35
|
+
"data-slot": "combobox-content",
|
|
36
|
+
className: (0, cn.cn)("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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", className),
|
|
37
|
+
...props,
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
}) });
|
|
41
|
+
}
|
|
42
|
+
function ComboboxList({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.List, {
|
|
44
|
+
"data-slot": "combobox-list",
|
|
45
|
+
className: (0, cn.cn)("max-h-(--available-height) overflow-y-auto p-1", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_combobox.Combobox.Item, {
|
|
51
|
+
"data-slot": "combobox-item",
|
|
52
|
+
className: (0, cn.cn)("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus: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", className),
|
|
53
|
+
...props,
|
|
54
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.ItemIndicator, { render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
55
|
+
className: "absolute right-1.5 flex items-center",
|
|
56
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "pointer-events-none size-4" })
|
|
57
|
+
}) })]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function ComboboxGroup({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Group, {
|
|
62
|
+
"data-slot": "combobox-group",
|
|
63
|
+
className: (0, cn.cn)("scroll-my-1 p-1", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function ComboboxGroupLabel({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.GroupLabel, {
|
|
69
|
+
"data-slot": "combobox-group-label",
|
|
70
|
+
className: (0, cn.cn)("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** Rendered only when the item list is empty. Requires the `items` prop on
|
|
75
|
+
* the root when using this default empty treatment. */
|
|
76
|
+
function ComboboxEmpty({ className, children, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Empty, {
|
|
78
|
+
"data-slot": "combobox-empty",
|
|
79
|
+
className: (0, cn.cn)("px-2 py-1.5 text-sm text-muted-foreground", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: children ?? "No results found."
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Polite live region for async loading state. Keep this part mounted —
|
|
85
|
+
* conditionally render its children instead (per the upstream docs). */
|
|
86
|
+
function ComboboxStatus({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Status, {
|
|
88
|
+
"data-slot": "combobox-status",
|
|
89
|
+
className: (0, cn.cn)("sr-only", className),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function ComboboxClear({ className, children, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Clear, {
|
|
95
|
+
"data-slot": "combobox-clear",
|
|
96
|
+
className: (0, cn.cn)("cursor-pointer", className),
|
|
97
|
+
...props,
|
|
98
|
+
children
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
102
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_combobox.Combobox.Separator, {
|
|
103
|
+
"data-slot": "combobox-separator",
|
|
104
|
+
className: (0, cn.cn)("-mx-1 my-1 h-px bg-border", className),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
exports.Combobox = Combobox;
|
|
110
|
+
exports.ComboboxClear = ComboboxClear;
|
|
111
|
+
exports.ComboboxContent = ComboboxContent;
|
|
112
|
+
exports.ComboboxEmpty = ComboboxEmpty;
|
|
113
|
+
exports.ComboboxGroup = ComboboxGroup;
|
|
114
|
+
exports.ComboboxGroupLabel = ComboboxGroupLabel;
|
|
115
|
+
exports.ComboboxInput = ComboboxInput;
|
|
116
|
+
exports.ComboboxItem = ComboboxItem;
|
|
117
|
+
exports.ComboboxList = ComboboxList;
|
|
118
|
+
exports.ComboboxSeparator = ComboboxSeparator;
|
|
119
|
+
exports.ComboboxStatus = ComboboxStatus;
|
|
120
|
+
exports.ComboboxTrigger = ComboboxTrigger;
|
|
121
|
+
exports.ComboboxValue = ComboboxValue;
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=combobox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.cjs","names":["ComboboxPrimitive","CheckIcon"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-muted-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(\n \"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 {children}\n </ComboboxPrimitive.Popup>\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(\"max-h-(--available-height) overflow-y-auto p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: 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-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus: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=\"absolute right-1.5 flex items-center\">\n <CheckIcon className=\"pointer-events-none size-4\" />\n </span>\n }\n />\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(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxGroupLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-group-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\n/** Rendered only when the item list is empty. Requires the `items` prop on\n * the root when using this default empty treatment. */\nfunction ComboboxEmpty({ className, children, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\"px-2 py-1.5 text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children ?? \"No results found.\"}\n </ComboboxPrimitive.Empty>\n )\n}\n\n/** Polite live region for async loading state. Keep this part mounted —\n * conditionally render its children instead (per the upstream docs). */\nfunction ComboboxStatus({ className, ...props }: ComboboxPrimitive.Status.Props) {\n return (\n <ComboboxPrimitive.Status\n data-slot=\"combobox-status\"\n className={cn(\"sr-only\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxClear({ className, children, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n className={cn(\"cursor-pointer\", className)}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Combobox,\n ComboboxTrigger,\n ComboboxValue,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxEmpty,\n ComboboxStatus,\n ComboboxClear,\n ComboboxSeparator,\n}\n"],"mappings":";;;;;;AAMA,MAAM,WAAWA,wBAAAA,SAAkB;AAEnC,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA0C;CACjF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,SAAnB;EAA2B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC7E;AAEA,SAAS,cAAc,EAAE,GAAG,SAAwC;CAClE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,cAAc,EACrB,WACA,cAAc,OACd,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,mbACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EACvB,WACA,UACA,OAAO,UACP,aAAa,GACb,QAAQ,SACR,cAAc,GACd,GAAG,SAKA;CACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,QAAnB,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,YAAnB;EACQ;EACM;EACL;EACM;EACb,WAAU;EAEV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;GACE,aAAU;GACV,YAAA,GAAW,GAAA,GAAA,CACT,ymBACA,SACF;GACA,GAAI;GAEH;EACsB,CAAA;CACG,CAAA,EACN,CAAA;AAE9B;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAuC;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,MAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,kDAAkD,SAAS;EACzE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,UAAU,GAAG,SAAuC;CACrF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACA,wBAAAA,SAAkB,MAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,qTACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACD,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,eAAnB,EACE,QACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;GAAM,WAAU;GACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,aAAAA,WAAD,EAAW,WAAU,6BAA8B,CAAA;EAC/C,CAAA,EAET,CAAA,CACqB;;AAE5B;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAwC;CAC7E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,wBAAAA,SAAkB,OAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,mBAAmB,SAAS;EAC1C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA6C;CACvF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,YAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,cAAc,EAAE,WAAW,UAAU,GAAG,SAAwC;CACvF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,6CAA6C,SAAS;EACpE,GAAI;EAEH,UAAA,YAAY;CACU,CAAA;AAE7B;;;AAIA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAyC;CAC/E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,QAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,WAAW,SAAS;EAClC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,UAAU,GAAG,SAAwC;CACvF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,OAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,kBAAkB,SAAS;EACzC,GAAI;EAEH;CACsB,CAAA;AAE7B;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAA4C;CACrF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,wBAAAA,SAAkB,WAAnB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Combobox } from "@base-ui/react/combobox";
|
|
2
|
+
//#region src/primitives/combobox.d.ts
|
|
3
|
+
declare const Combobox$1: typeof Combobox.Root;
|
|
4
|
+
declare function ComboboxTrigger({ className, ...props }: Combobox.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ComboboxValue({ ...props }: Combobox.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ComboboxInput({ className, showTrigger, ...props }: Combobox.Input.Props & {
|
|
7
|
+
/** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */
|
|
8
|
+
showTrigger?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ComboboxContent({ className, children, side, sideOffset, align, alignOffset, ...props }: Combobox.Popup.Props & Pick<Combobox.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function ComboboxList({ className, ...props }: Combobox.List.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ComboboxItem({ className, children, ...props }: Combobox.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ComboboxGroup({ className, ...props }: Combobox.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ComboboxGroupLabel({ className, ...props }: Combobox.GroupLabel.Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** Rendered only when the item list is empty. Requires the `items` prop on
|
|
16
|
+
* the root when using this default empty treatment. */
|
|
17
|
+
declare function ComboboxEmpty({ className, children, ...props }: Combobox.Empty.Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** Polite live region for async loading state. Keep this part mounted —
|
|
19
|
+
* conditionally render its children instead (per the upstream docs). */
|
|
20
|
+
declare function ComboboxStatus({ className, ...props }: Combobox.Status.Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ComboboxClear({ className, children, ...props }: Combobox.Clear.Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ComboboxSeparator({ className, ...props }: Combobox.Separator.Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Combobox$1 as Combobox, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
25
|
+
//# sourceMappingURL=combobox.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.cts","names":["Combobox","ComboboxPrimitive"],"sources":["../../src/primitives/combobox.tsx"],"mappings":";;cAMMA,mBAAQC,SAAA;iBAEL,kBAAkB,cAAc,SAASA,SAAkB,QAAQ,oCAAK,IAAA;iBAIxE,mBAAmB,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAIzD,gBACP,WACA,gBACG,SACFA,SAAkB,MAAM;;EAEzB;gCACD,IAAA;iBAaQ,kBACP,WACA,UACA,MACA,YACA,OACA,gBACG,SACFA,SAAkB,MAAM,QACzB,KACEA,SAAkB,WAAW,sFAE9B,IAAA;iBAyBM,eAAe,cAAc,SAASA,SAAkB,KAAK,oCAAK,IAAA;iBAUlE,eAAe,WAAW,aAAa,SAASA,SAAkB,KAAK,oCAAK,IAAA;iBAsB5E,gBAAgB,cAAc,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAUpE,qBAAqB,cAAc,SAASA,SAAkB,WAAW,oCAAK,IAAA;;;iBAY9E,gBAAgB,WAAW,aAAa,SAASA,SAAkB,MAAM,oCAAK,IAAA;;;iBAc9E,iBAAiB,cAAc,SAASA,SAAkB,OAAO,oCAAK,IAAA;iBAUtE,gBAAgB,WAAW,aAAa,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAY9E,oBAAoB,cAAc,SAASA,SAAkB,UAAU,oCAAK,IAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Combobox } from "@base-ui/react/combobox";
|
|
2
|
+
//#region src/primitives/combobox.d.ts
|
|
3
|
+
declare const Combobox$1: typeof Combobox.Root;
|
|
4
|
+
declare function ComboboxTrigger({ className, ...props }: Combobox.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ComboboxValue({ ...props }: Combobox.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ComboboxInput({ className, showTrigger, ...props }: Combobox.Input.Props & {
|
|
7
|
+
/** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */
|
|
8
|
+
showTrigger?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ComboboxContent({ className, children, side, sideOffset, align, alignOffset, ...props }: Combobox.Popup.Props & Pick<Combobox.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function ComboboxList({ className, ...props }: Combobox.List.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ComboboxItem({ className, children, ...props }: Combobox.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ComboboxGroup({ className, ...props }: Combobox.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ComboboxGroupLabel({ className, ...props }: Combobox.GroupLabel.Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** Rendered only when the item list is empty. Requires the `items` prop on
|
|
16
|
+
* the root when using this default empty treatment. */
|
|
17
|
+
declare function ComboboxEmpty({ className, children, ...props }: Combobox.Empty.Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
/** Polite live region for async loading state. Keep this part mounted —
|
|
19
|
+
* conditionally render its children instead (per the upstream docs). */
|
|
20
|
+
declare function ComboboxStatus({ className, ...props }: Combobox.Status.Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ComboboxClear({ className, children, ...props }: Combobox.Clear.Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ComboboxSeparator({ className, ...props }: Combobox.Separator.Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Combobox$1 as Combobox, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
25
|
+
//# sourceMappingURL=combobox.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.mts","names":["Combobox","ComboboxPrimitive"],"sources":["../../src/primitives/combobox.tsx"],"mappings":";;cAMMA,mBAAQC,SAAA;iBAEL,kBAAkB,cAAc,SAASA,SAAkB,QAAQ,oCAAK,IAAA;iBAIxE,mBAAmB,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAIzD,gBACP,WACA,gBACG,SACFA,SAAkB,MAAM;;EAEzB;gCACD,IAAA;iBAaQ,kBACP,WACA,UACA,MACA,YACA,OACA,gBACG,SACFA,SAAkB,MAAM,QACzB,KACEA,SAAkB,WAAW,sFAE9B,IAAA;iBAyBM,eAAe,cAAc,SAASA,SAAkB,KAAK,oCAAK,IAAA;iBAUlE,eAAe,WAAW,aAAa,SAASA,SAAkB,KAAK,oCAAK,IAAA;iBAsB5E,gBAAgB,cAAc,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAUpE,qBAAqB,cAAc,SAASA,SAAkB,WAAW,oCAAK,IAAA;;;iBAY9E,gBAAgB,WAAW,aAAa,SAASA,SAAkB,MAAM,oCAAK,IAAA;;;iBAc9E,iBAAiB,cAAc,SAASA,SAAkB,OAAO,oCAAK,IAAA;iBAUtE,gBAAgB,WAAW,aAAa,SAASA,SAAkB,MAAM,oCAAK,IAAA;iBAY9E,oBAAoB,cAAc,SAASA,SAAkB,UAAU,oCAAK,IAAA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { Combobox } from "@base-ui/react/combobox";
|
|
5
|
+
import { CheckIcon } from "lucide-react";
|
|
6
|
+
//#region src/primitives/combobox.tsx
|
|
7
|
+
const Combobox$1 = Combobox.Root;
|
|
8
|
+
function ComboboxTrigger({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Combobox.Trigger, {
|
|
10
|
+
"data-slot": "combobox-trigger",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function ComboboxValue({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Combobox.Value, {
|
|
16
|
+
"data-slot": "combobox-value",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function ComboboxInput({ className, showTrigger = false, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(Combobox.Input, {
|
|
22
|
+
"data-slot": "combobox-input",
|
|
23
|
+
className: cn("w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-muted-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function ComboboxContent({ className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Combobox.Portal, { children: /* @__PURE__ */ jsx(Combobox.Positioner, {
|
|
29
|
+
side,
|
|
30
|
+
sideOffset,
|
|
31
|
+
align,
|
|
32
|
+
alignOffset,
|
|
33
|
+
className: "isolate z-50",
|
|
34
|
+
children: /* @__PURE__ */ jsx(Combobox.Popup, {
|
|
35
|
+
"data-slot": "combobox-content",
|
|
36
|
+
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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", className),
|
|
37
|
+
...props,
|
|
38
|
+
children
|
|
39
|
+
})
|
|
40
|
+
}) });
|
|
41
|
+
}
|
|
42
|
+
function ComboboxList({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Combobox.List, {
|
|
44
|
+
"data-slot": "combobox-list",
|
|
45
|
+
className: cn("max-h-(--available-height) overflow-y-auto p-1", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function ComboboxItem({ className, children, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsxs(Combobox.Item, {
|
|
51
|
+
"data-slot": "combobox-item",
|
|
52
|
+
className: cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus: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", className),
|
|
53
|
+
...props,
|
|
54
|
+
children: [children, /* @__PURE__ */ jsx(Combobox.ItemIndicator, { render: /* @__PURE__ */ jsx("span", {
|
|
55
|
+
className: "absolute right-1.5 flex items-center",
|
|
56
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none size-4" })
|
|
57
|
+
}) })]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function ComboboxGroup({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Combobox.Group, {
|
|
62
|
+
"data-slot": "combobox-group",
|
|
63
|
+
className: cn("scroll-my-1 p-1", className),
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function ComboboxGroupLabel({ className, ...props }) {
|
|
68
|
+
return /* @__PURE__ */ jsx(Combobox.GroupLabel, {
|
|
69
|
+
"data-slot": "combobox-group-label",
|
|
70
|
+
className: cn("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/** Rendered only when the item list is empty. Requires the `items` prop on
|
|
75
|
+
* the root when using this default empty treatment. */
|
|
76
|
+
function ComboboxEmpty({ className, children, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(Combobox.Empty, {
|
|
78
|
+
"data-slot": "combobox-empty",
|
|
79
|
+
className: cn("px-2 py-1.5 text-sm text-muted-foreground", className),
|
|
80
|
+
...props,
|
|
81
|
+
children: children ?? "No results found."
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Polite live region for async loading state. Keep this part mounted —
|
|
85
|
+
* conditionally render its children instead (per the upstream docs). */
|
|
86
|
+
function ComboboxStatus({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ jsx(Combobox.Status, {
|
|
88
|
+
"data-slot": "combobox-status",
|
|
89
|
+
className: cn("sr-only", className),
|
|
90
|
+
...props
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function ComboboxClear({ className, children, ...props }) {
|
|
94
|
+
return /* @__PURE__ */ jsx(Combobox.Clear, {
|
|
95
|
+
"data-slot": "combobox-clear",
|
|
96
|
+
className: cn("cursor-pointer", className),
|
|
97
|
+
...props,
|
|
98
|
+
children
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function ComboboxSeparator({ className, ...props }) {
|
|
102
|
+
return /* @__PURE__ */ jsx(Combobox.Separator, {
|
|
103
|
+
"data-slot": "combobox-separator",
|
|
104
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
105
|
+
...props
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { Combobox$1 as Combobox, ComboboxClear, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
|
|
110
|
+
|
|
111
|
+
//# sourceMappingURL=combobox.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.mjs","names":["Combobox","ComboboxPrimitive"],"sources":["../../src/primitives/combobox.tsx"],"sourcesContent":["\"use client\"\n\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\nimport { CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxTrigger({ className, ...props }: ComboboxPrimitive.Trigger.Props) {\n return <ComboboxPrimitive.Trigger data-slot=\"combobox-trigger\" {...props} />\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxInput({\n className,\n showTrigger = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n /** Render the input as an anchor trigger by composing a chevron via Input/Trigger. */\n showTrigger?: boolean\n}) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-input\"\n className={cn(\n \"w-full rounded-lg border border-input bg-input/30 px-2.5 py-2 text-sm placeholder:text-muted-foreground transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n className={cn(\n \"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 {children}\n </ComboboxPrimitive.Popup>\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(\"max-h-(--available-height) overflow-y-auto p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({ className, children, ...props }: 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-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus: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=\"absolute right-1.5 flex items-center\">\n <CheckIcon className=\"pointer-events-none size-4\" />\n </span>\n }\n />\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(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxGroupLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-group-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\n/** Rendered only when the item list is empty. Requires the `items` prop on\n * the root when using this default empty treatment. */\nfunction ComboboxEmpty({ className, children, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\"px-2 py-1.5 text-sm text-muted-foreground\", className)}\n {...props}\n >\n {children ?? \"No results found.\"}\n </ComboboxPrimitive.Empty>\n )\n}\n\n/** Polite live region for async loading state. Keep this part mounted —\n * conditionally render its children instead (per the upstream docs). */\nfunction ComboboxStatus({ className, ...props }: ComboboxPrimitive.Status.Props) {\n return (\n <ComboboxPrimitive.Status\n data-slot=\"combobox-status\"\n className={cn(\"sr-only\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxClear({ className, children, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n className={cn(\"cursor-pointer\", className)}\n {...props}\n >\n {children}\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Combobox,\n ComboboxTrigger,\n ComboboxValue,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxGroupLabel,\n ComboboxEmpty,\n ComboboxStatus,\n ComboboxClear,\n ComboboxSeparator,\n}\n"],"mappings":";;;;;;AAMA,MAAMA,aAAWC,SAAkB;AAEnC,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA0C;CACjF,OAAO,oBAACA,SAAkB,SAAnB;EAA2B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC7E;AAEA,SAAS,cAAc,EAAE,GAAG,SAAwC;CAClE,OAAO,oBAACA,SAAkB,OAAnB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,cAAc,EACrB,WACA,cAAc,OACd,GAAG,SAIF;CACD,OACE,oBAACA,SAAkB,OAAnB;EACE,aAAU;EACV,WAAW,GACT,mbACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,gBAAgB,EACvB,WACA,UACA,OAAO,UACP,aAAa,GACb,QAAQ,SACR,cAAc,GACd,GAAG,SAKA;CACH,OACE,oBAACA,SAAkB,QAAnB,EAAA,UACE,oBAACA,SAAkB,YAAnB;EACQ;EACM;EACL;EACM;EACb,WAAU;EAEV,UAAA,oBAACA,SAAkB,OAAnB;GACE,aAAU;GACV,WAAW,GACT,ymBACA,SACF;GACA,GAAI;GAEH;EACsB,CAAA;CACG,CAAA,EACN,CAAA;AAE9B;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAuC;CAC3E,OACE,oBAACA,SAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GAAG,kDAAkD,SAAS;EACzE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,UAAU,GAAG,SAAuC;CACrF,OACE,qBAACA,SAAkB,MAAnB;EACE,aAAU;EACV,WAAW,GACT,qTACA,SACF;EACA,GAAI;EANN,UAAA,CAQG,UACD,oBAACA,SAAkB,eAAnB,EACE,QACE,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,WAAD,EAAW,WAAU,6BAA8B,CAAA;EAC/C,CAAA,EAET,CAAA,CACqB;;AAE5B;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAwC;CAC7E,OACE,oBAACA,SAAkB,OAAnB;EACE,aAAU;EACV,WAAW,GAAG,mBAAmB,SAAS;EAC1C,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA6C;CACvF,OACE,oBAACA,SAAkB,YAAnB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,cAAc,EAAE,WAAW,UAAU,GAAG,SAAwC;CACvF,OACE,oBAACA,SAAkB,OAAnB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;EAEH,UAAA,YAAY;CACU,CAAA;AAE7B;;;AAIA,SAAS,eAAe,EAAE,WAAW,GAAG,SAAyC;CAC/E,OACE,oBAACA,SAAkB,QAAnB;EACE,aAAU;EACV,WAAW,GAAG,WAAW,SAAS;EAClC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,cAAc,EAAE,WAAW,UAAU,GAAG,SAAwC;CACvF,OACE,oBAACA,SAAkB,OAAnB;EACE,aAAU;EACV,WAAW,GAAG,kBAAkB,SAAS;EACzC,GAAI;EAEH;CACsB,CAAA;AAE7B;AAEA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAA4C;CACrF,OACE,oBAACA,SAAkB,WAAnB;EACE,aAAU;EACV,WAAW,GAAG,6BAA6B,SAAS;EACpD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -4,8 +4,8 @@ let react = require("react");
|
|
|
4
4
|
react = require_runtime.__toESM(react, 1);
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
let cn = require("cn");
|
|
7
|
-
let _shadcn_react_message_scroller = require("@shadcn/react/message-scroller");
|
|
8
7
|
let lucide_react = require("lucide-react");
|
|
8
|
+
let _shadcn_react_message_scroller = require("@shadcn/react/message-scroller");
|
|
9
9
|
//#region src/primitives/message-scroller.tsx
|
|
10
10
|
function MessageScrollerProvider(props) {
|
|
11
11
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_shadcn_react_message_scroller.MessageScroller.Provider, { ...props });
|
|
@@ -2,8 +2,8 @@ import { Button } from "./button.mjs";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { cn } from "cn";
|
|
5
|
-
import { MessageScroller, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
6
5
|
import { ArrowDownIcon } from "lucide-react";
|
|
6
|
+
import { MessageScroller, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
|
|
7
7
|
//#region src/primitives/message-scroller.tsx
|
|
8
8
|
function MessageScrollerProvider(props) {
|
|
9
9
|
return /* @__PURE__ */ jsx(MessageScroller.Provider, { ...props });
|
|
@@ -32,9 +32,33 @@ function PopoverContent({ className, align = "center", alignOffset = 0, side = "
|
|
|
32
32
|
})
|
|
33
33
|
}) });
|
|
34
34
|
}
|
|
35
|
+
function PopoverHeader({ className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
37
|
+
"data-slot": "popover-header",
|
|
38
|
+
className: (0, cn.cn)("flex flex-col gap-0.5 text-sm", className),
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function PopoverTitle({ className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Title, {
|
|
44
|
+
"data-slot": "popover-title",
|
|
45
|
+
className: (0, cn.cn)("font-medium", className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function PopoverDescription({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_popover.Popover.Description, {
|
|
51
|
+
"data-slot": "popover-description",
|
|
52
|
+
className: (0, cn.cn)("text-muted-foreground", className),
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
35
56
|
//#endregion
|
|
36
57
|
exports.Popover = Popover;
|
|
37
58
|
exports.PopoverContent = PopoverContent;
|
|
59
|
+
exports.PopoverDescription = PopoverDescription;
|
|
60
|
+
exports.PopoverHeader = PopoverHeader;
|
|
61
|
+
exports.PopoverTitle = PopoverTitle;
|
|
38
62
|
exports.PopoverTrigger = PopoverTrigger;
|
|
39
63
|
|
|
40
64
|
//# sourceMappingURL=popover.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.cjs","names":["PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;;;AAMA,SAAS,QAAQ,EAAE,GAAG,SAAsC;CAC1D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ,CAAA;AAChE;AAEA,SAAS,eAAe,EAAE,GAAG,SAAyC;CACpE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,cAAc,GACd,OAAO,UACP,aAAa,GACb,GAAG,SAKA;CACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,QAAlB,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,YAAlB;EACS;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,OAAlB;GACE,aAAU;GACV,YAAA,GAAW,GAAA,GAAA,CACT,ujBACA,SACF;GACA,GAAI;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B"}
|
|
1
|
+
{"version":3,"file":"popover.cjs","names":["PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;;;AAMA,SAAS,QAAQ,EAAE,GAAG,SAAsC;CAC1D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ,CAAA;AAChE;AAEA,SAAS,eAAe,EAAE,GAAG,SAAyC;CACpE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,cAAc,GACd,OAAO,UACP,aAAa,GACb,GAAG,SAKA;CACH,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,QAAlB,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,YAAlB;EACS;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,OAAlB;GACE,aAAU;GACV,YAAA,GAAW,GAAA,GAAA,CACT,ujBACA,SACF;GACA,GAAI;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAuC;CAC3E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,OAAlB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,eAAe,SAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACkC;CACrC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,uBAAAA,QAAiB,aAAlB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CAAG,yBAAyB,SAAS;EAChD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/primitives/popover.d.ts
|
|
4
|
+
declare function Popover$1({ ...props }: Popover.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverTrigger({ ...props }: Popover.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: Popover.Popup.Props & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: Popover.Title.Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: Popover.Description.Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
12
|
+
//# sourceMappingURL=popover.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.cts","names":["Popover","PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"mappings":";;;iBAMSA,eAAa,SAASC,QAAiB,KAAK,oCAAK,IAAA;iBAIjD,oBAAoB,SAASA,QAAiB,QAAQ,oCAAK,IAAA;iBAI3D,iBACP,WACA,OACA,aACA,MACA,eACG,SACFA,QAAiB,MAAM,QACxB,KACEA,QAAiB,WAAW,sFAE7B,IAAA;iBAuBM,gBAAgB,cAAc,SAAS,MAAM,oDAAqB,IAAA;iBAUlE,eAAe,cAAc,SAASA,QAAiB,MAAM,oCAAK,IAAA;iBAUlE,qBACP,cACG,SACFA,QAAiB,YAAY,oCAAK,IAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover } from "@base-ui/react/popover";
|
|
3
|
+
//#region src/primitives/popover.d.ts
|
|
4
|
+
declare function Popover$1({ ...props }: Popover.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverTrigger({ ...props }: Popover.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: Popover.Popup.Props & Pick<Popover.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function PopoverTitle({ className, ...props }: Popover.Title.Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function PopoverDescription({ className, ...props }: Popover.Description.Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
12
|
+
//# sourceMappingURL=popover.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.mts","names":["Popover","PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"mappings":";;;iBAMSA,eAAa,SAASC,QAAiB,KAAK,oCAAK,IAAA;iBAIjD,oBAAoB,SAASA,QAAiB,QAAQ,oCAAK,IAAA;iBAI3D,iBACP,WACA,OACA,aACA,MACA,eACG,SACFA,QAAiB,MAAM,QACxB,KACEA,QAAiB,WAAW,sFAE7B,IAAA;iBAuBM,gBAAgB,cAAc,SAAS,MAAM,oDAAqB,IAAA;iBAUlE,eAAe,cAAc,SAASA,QAAiB,MAAM,oCAAK,IAAA;iBAUlE,qBACP,cACG,SACFA,QAAiB,YAAY,oCAAK,IAAA"}
|
|
@@ -30,7 +30,28 @@ function PopoverContent({ className, align = "center", alignOffset = 0, side = "
|
|
|
30
30
|
})
|
|
31
31
|
}) });
|
|
32
32
|
}
|
|
33
|
+
function PopoverHeader({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx("div", {
|
|
35
|
+
"data-slot": "popover-header",
|
|
36
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function PopoverTitle({ className, ...props }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Popover.Title, {
|
|
42
|
+
"data-slot": "popover-title",
|
|
43
|
+
className: cn("font-medium", className),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function PopoverDescription({ className, ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Popover.Description, {
|
|
49
|
+
"data-slot": "popover-description",
|
|
50
|
+
className: cn("text-muted-foreground", className),
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
33
54
|
//#endregion
|
|
34
|
-
export { Popover$1 as Popover, PopoverContent, PopoverTrigger };
|
|
55
|
+
export { Popover$1 as Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
35
56
|
|
|
36
57
|
//# sourceMappingURL=popover.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.mjs","names":["Popover","PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;AAMA,SAASA,UAAQ,EAAE,GAAG,SAAsC;CAC1D,OAAO,oBAACC,QAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ,CAAA;AAChE;AAEA,SAAS,eAAe,EAAE,GAAG,SAAyC;CACpE,OAAO,oBAACA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,cAAc,GACd,OAAO,UACP,aAAa,GACb,GAAG,SAKA;CACH,OACE,oBAACA,QAAiB,QAAlB,EAAA,UACE,oBAACA,QAAiB,YAAlB;EACS;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,oBAACA,QAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,ujBACA,SACF;GACA,GAAI;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B"}
|
|
1
|
+
{"version":3,"file":"popover.mjs","names":["Popover","PopoverPrimitive"],"sources":["../../src/primitives/popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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-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 </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;;AAMA,SAASA,UAAQ,EAAE,GAAG,SAAsC;CAC1D,OAAO,oBAACC,QAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAI;CAAQ,CAAA;AAChE;AAEA,SAAS,eAAe,EAAE,GAAG,SAAyC;CACpE,OAAO,oBAACA,QAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAI;CAAQ,CAAA;AAC3E;AAEA,SAAS,eAAe,EACtB,WACA,QAAQ,UACR,cAAc,GACd,OAAO,UACP,aAAa,GACb,GAAG,SAKA;CACH,OACE,oBAACA,QAAiB,QAAlB,EAAA,UACE,oBAACA,QAAiB,YAAlB;EACS;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,oBAACA,QAAiB,OAAlB;GACE,aAAU;GACV,WAAW,GACT,ujBACA,SACF;GACA,GAAI;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B;AAEA,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;CAC3E,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,SAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,aAAa,EAAE,WAAW,GAAG,SAAuC;CAC3E,OACE,oBAACA,QAAiB,OAAlB;EACE,aAAU;EACV,WAAW,GAAG,eAAe,SAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,mBAAmB,EAC1B,WACA,GAAG,SACkC;CACrC,OACE,oBAACA,QAAiB,aAAlB;EACE,aAAU;EACV,WAAW,GAAG,yBAAyB,SAAS;EAChD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
3
|
+
let cn = require("cn");
|
|
4
|
+
let _base_ui_react_radio_group = require("@base-ui/react/radio-group");
|
|
5
|
+
let _base_ui_react_radio = require("@base-ui/react/radio");
|
|
6
|
+
//#region src/primitives/radio-group.tsx
|
|
7
|
+
const RadioGroup = _base_ui_react_radio_group.RadioGroup;
|
|
8
|
+
function RadioGroupItem({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_radio.Radio.Root, {
|
|
10
|
+
"data-slot": "radio-group-item",
|
|
11
|
+
className: (0, cn.cn)("group/radio-item peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input transition-colors outline-none select-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_radio.Radio.Indicator, {
|
|
14
|
+
"data-slot": "radio-group-indicator",
|
|
15
|
+
className: (0, cn.cn)("flex size-2 items-center justify-center rounded-full bg-primary group-not-data-checked/field-label:hidden")
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.RadioGroup = RadioGroup;
|
|
21
|
+
exports.RadioGroupItem = RadioGroupItem;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=radio-group.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.cjs","names":["RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/primitives/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\"\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\"\nimport { cn } from \"cn\"\n\nconst RadioGroup = RadioGroupPrimitive\n\nfunction RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-item peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input transition-colors outline-none select-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary\",\n className,\n )}\n {...props}\n >\n <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={cn(\n \"flex size-2 items-center justify-center rounded-full bg-primary group-not-data-checked/field-label:hidden\",\n )}\n />\n </RadioPrimitive.Root>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;;AAMA,MAAM,aAAaA,2BAAAA;AAEnB,SAAS,eAAe,EAAE,WAAW,GAAG,SAAoC;CAC1E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,MAAe,MAAhB;EACE,aAAU;EACV,YAAA,GAAW,GAAA,GAAA,CACT,yiBACA,SACF;EACA,GAAI;EAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,MAAe,WAAhB;GACE,aAAU;GACV,YAAA,GAAW,GAAA,GAAA,CACT,2GACF;EACD,CAAA;CACkB,CAAA;AAEzB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
2
|
+
import { Radio } from "@base-ui/react/radio";
|
|
3
|
+
//#region src/primitives/radio-group.d.ts
|
|
4
|
+
declare const RadioGroup$1: <Value>(props: RadioGroup.Props<Value>) => React.JSX.Element;
|
|
5
|
+
declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { RadioGroup$1 as RadioGroup, RadioGroupItem };
|
|
8
|
+
//# sourceMappingURL=radio-group.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.cts","names":["RadioGroup","RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/primitives/radio-group.tsx"],"mappings":";;;cAMMA,eAAU,OAAA,OAAAC,WAAA,MAAA,WAAA,MAAA,IAAA;iBAEP,iBAAiB,cAAc,SAASC,MAAe,KAAK,oCAAK,IAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
2
|
+
import { Radio } from "@base-ui/react/radio";
|
|
3
|
+
//#region src/primitives/radio-group.d.ts
|
|
4
|
+
declare const RadioGroup$1: <Value>(props: RadioGroup.Props<Value>) => React.JSX.Element;
|
|
5
|
+
declare function RadioGroupItem({ className, ...props }: Radio.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { RadioGroup$1 as RadioGroup, RadioGroupItem };
|
|
8
|
+
//# sourceMappingURL=radio-group.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.mts","names":["RadioGroup","RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/primitives/radio-group.tsx"],"mappings":";;;cAMMA,eAAU,OAAA,OAAAC,WAAA,MAAA,WAAA,MAAA,IAAA;iBAEP,iBAAiB,cAAc,SAASC,MAAe,KAAK,oCAAK,IAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { RadioGroup } from "@base-ui/react/radio-group";
|
|
5
|
+
import { Radio } from "@base-ui/react/radio";
|
|
6
|
+
//#region src/primitives/radio-group.tsx
|
|
7
|
+
const RadioGroup$1 = RadioGroup;
|
|
8
|
+
function RadioGroupItem({ className, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
10
|
+
"data-slot": "radio-group-item",
|
|
11
|
+
className: cn("group/radio-item peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input transition-colors outline-none select-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /* @__PURE__ */ jsx(Radio.Indicator, {
|
|
14
|
+
"data-slot": "radio-group-indicator",
|
|
15
|
+
className: cn("flex size-2 items-center justify-center rounded-full bg-primary group-not-data-checked/field-label:hidden")
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { RadioGroup$1 as RadioGroup, RadioGroupItem };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=radio-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.mjs","names":["RadioGroup","RadioGroupPrimitive","RadioPrimitive"],"sources":["../../src/primitives/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\"\nimport { Radio as RadioPrimitive } from \"@base-ui/react/radio\"\nimport { cn } from \"cn\"\n\nconst RadioGroup = RadioGroupPrimitive\n\nfunction RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-item peer relative flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border border-input transition-colors outline-none select-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary\",\n className,\n )}\n {...props}\n >\n <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className={cn(\n \"flex size-2 items-center justify-center rounded-full bg-primary group-not-data-checked/field-label:hidden\",\n )}\n />\n </RadioPrimitive.Root>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;;AAMA,MAAMA,eAAaC;AAEnB,SAAS,eAAe,EAAE,WAAW,GAAG,SAAoC;CAC1E,OACE,oBAACC,MAAe,MAAhB;EACE,aAAU;EACV,WAAW,GACT,yiBACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,MAAe,WAAhB;GACE,aAAU;GACV,WAAW,GACT,2GACF;EACD,CAAA;CACkB,CAAA;AAEzB"}
|
|
@@ -12,9 +12,9 @@ react = require_runtime.__toESM(react, 1);
|
|
|
12
12
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
13
13
|
let class_variance_authority = require("class-variance-authority");
|
|
14
14
|
let cn = require("cn");
|
|
15
|
+
let lucide_react = require("lucide-react");
|
|
15
16
|
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
16
17
|
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
17
|
-
let lucide_react = require("lucide-react");
|
|
18
18
|
//#region src/primitives/sidebar.tsx
|
|
19
19
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
20
20
|
const SIDEBAR_COOKIE_MAX_AGE = 604800;
|