@jbpark/ui-kit 9.1.1 → 10.0.1
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.ko.md +18 -17
- package/README.md +18 -17
- package/dist/Button.d.mts +1 -1
- package/dist/Button.d.mts.map +1 -1
- package/dist/Button.mjs +4 -5
- package/dist/Button.mjs.map +1 -1
- package/dist/Tag.d.mts.map +1 -1
- package/dist/Tag.mjs.map +1 -1
- package/dist/components/atoms/checkbox/checkbox.mjs.map +1 -1
- package/dist/components/atoms/option-group.mjs.map +1 -1
- package/dist/components/atoms/popover.d.mts +3 -1
- package/dist/components/atoms/popover.d.mts.map +1 -1
- package/dist/components/atoms/popover.mjs +10 -111
- package/dist/components/atoms/popover.mjs.map +1 -1
- package/dist/components/atoms/progress.mjs +3 -4
- package/dist/components/atoms/progress.mjs.map +1 -1
- package/dist/components/atoms/radio/context.mjs +2 -2
- package/dist/components/atoms/radio/context.mjs.map +1 -1
- package/dist/components/atoms/radio/group.mjs +6 -6
- package/dist/components/atoms/radio/group.mjs.map +1 -1
- package/dist/components/atoms/radio/radio.d.mts +2 -5
- package/dist/components/atoms/radio/radio.d.mts.map +1 -1
- package/dist/components/atoms/radio/radio.mjs +0 -1
- package/dist/components/atoms/radio/radio.mjs.map +1 -1
- package/dist/components/atoms/rich-text-editor/content-classes.mjs +1 -1
- package/dist/components/atoms/rich-text-editor/content-classes.mjs.map +1 -1
- package/dist/components/atoms/rich-text-editor/rich-text-editor.mjs +1 -1
- package/dist/components/atoms/rich-text-editor/rich-text-editor.mjs.map +1 -1
- package/dist/components/atoms/rich-text-editor/toolbar-button.mjs.map +1 -1
- package/dist/components/atoms/rich-text-editor/toolbar-presets.mjs.map +1 -1
- package/dist/components/atoms/rich-text-editor/toolbar.mjs +1 -1
- package/dist/components/atoms/rich-text-editor/toolbar.mjs.map +1 -1
- package/dist/components/atoms/select.mjs +5 -1
- package/dist/components/atoms/select.mjs.map +1 -1
- package/dist/components/atoms/skeleton/node.mjs +1 -1
- package/dist/components/atoms/skeleton/node.mjs.map +1 -1
- package/dist/components/atoms/skeleton/skeleton.mjs +2 -2
- package/dist/components/atoms/skeleton/skeleton.mjs.map +1 -1
- package/dist/components/atoms/slider/slider.mjs.map +1 -1
- package/dist/components/atoms/switch.d.mts +1 -1
- package/dist/components/atoms/switch.d.mts.map +1 -1
- package/dist/components/atoms/switch.mjs +3 -3
- package/dist/components/atoms/switch.mjs.map +1 -1
- package/dist/components/molecules/collapse.mjs +3 -10
- package/dist/components/molecules/collapse.mjs.map +1 -1
- package/dist/components/molecules/reveals/reveals.mjs +1 -1
- package/dist/components/molecules/reveals/reveals.mjs.map +1 -1
- package/dist/components/organisms/drawer.d.mts +1 -2
- package/dist/components/organisms/drawer.d.mts.map +1 -1
- package/dist/components/organisms/drawer.mjs +5 -7
- package/dist/components/organisms/drawer.mjs.map +1 -1
- package/dist/components/organisms/modal.d.mts.map +1 -1
- package/dist/components/organisms/modal.mjs +1 -3
- package/dist/components/organisms/modal.mjs.map +1 -1
- package/dist/components/templates/container.d.mts +4 -3
- package/dist/components/templates/container.d.mts.map +1 -1
- package/dist/components/templates/container.mjs +10 -6
- package/dist/components/templates/container.mjs.map +1 -1
- package/dist/components/templates/index.d.mts +13 -0
- package/dist/components/templates/layout/content.d.mts +4 -3
- package/dist/components/templates/layout/content.d.mts.map +1 -1
- package/dist/components/templates/layout/content.mjs +14 -9
- package/dist/components/templates/layout/content.mjs.map +1 -1
- package/dist/core/accordion.d.mts +1 -1
- package/dist/core/accordion.mjs +12 -12
- package/dist/core/accordion.mjs.map +1 -1
- package/dist/core/badge.d.mts +5 -17
- package/dist/core/badge.d.mts.map +1 -1
- package/dist/core/badge.mjs +12 -21
- package/dist/core/badge.mjs.map +1 -1
- package/dist/core/button.d.mts +7 -6
- package/dist/core/button.d.mts.map +1 -1
- package/dist/core/button.mjs +4 -4
- package/dist/core/button.mjs.map +1 -1
- package/dist/core/calendar.mjs +2 -1
- package/dist/core/calendar.mjs.map +1 -1
- package/dist/core/checkbox.d.mts +1 -1
- package/dist/core/checkbox.mjs +14 -14
- package/dist/core/checkbox.mjs.map +1 -1
- package/dist/core/dialog.d.mts +1 -1
- package/dist/core/dialog.mjs +25 -33
- package/dist/core/dialog.mjs.map +1 -1
- package/dist/core/drawer.d.mts +1 -1
- package/dist/core/drawer.mjs +45 -46
- package/dist/core/drawer.mjs.map +1 -1
- package/dist/core/label.d.mts +1 -2
- package/dist/core/label.mjs +1 -3
- package/dist/core/label.mjs.map +1 -1
- package/dist/core/popover.d.mts +1 -1
- package/dist/core/popover.mjs +42 -37
- package/dist/core/popover.mjs.map +1 -1
- package/dist/core/progress.d.mts +1 -1
- package/dist/core/progress.mjs +7 -10
- package/dist/core/progress.mjs.map +1 -1
- package/dist/core/radio-group.d.mts +3 -7
- package/dist/core/radio-group.mjs +14 -13
- package/dist/core/radio-group.mjs.map +1 -1
- package/dist/core/select.d.mts +7 -3
- package/dist/core/select.d.mts.map +1 -1
- package/dist/core/select.mjs +60 -56
- package/dist/core/select.mjs.map +1 -1
- package/dist/core/separator.d.mts +1 -1
- package/dist/core/separator.mjs +6 -5
- package/dist/core/separator.mjs.map +1 -1
- package/dist/core/slider.d.mts +1 -1
- package/dist/core/slider.mjs +38 -27
- package/dist/core/slider.mjs.map +1 -1
- package/dist/core/switch.d.mts +1 -1
- package/dist/core/switch.mjs +15 -15
- package/dist/core/switch.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/lib/z-layers.mjs +4 -6
- package/dist/lib/z-layers.mjs.map +1 -1
- package/dist/providers/config/config.mjs +2 -2
- package/dist/providers/config/config.mjs.map +1 -1
- package/dist/style.css +327 -462
- package/package.json +7 -20
- package/dist/core/radio-group.d.mts.map +0 -1
package/dist/core/select.mjs
CHANGED
|
@@ -5,11 +5,12 @@ import { useConfig } from "../providers/config/context.mjs";
|
|
|
5
5
|
import { OVERLAY_LAYER } from "../lib/z-layers.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
8
|
+
import { DirectionProvider } from "@base-ui/react/direction-provider";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import
|
|
10
|
+
import { Select } from "@base-ui/react/select";
|
|
10
11
|
//#region src/core/select.tsx
|
|
11
12
|
var select_exports = /* @__PURE__ */ __exportAll({
|
|
12
|
-
Select: () => Select,
|
|
13
|
+
Select: () => Select$1,
|
|
13
14
|
SelectContent: () => SelectContent,
|
|
14
15
|
SelectGroup: () => SelectGroup,
|
|
15
16
|
SelectItem: () => SelectItem,
|
|
@@ -20,29 +21,33 @@ var select_exports = /* @__PURE__ */ __exportAll({
|
|
|
20
21
|
SelectTrigger: () => SelectTrigger,
|
|
21
22
|
SelectValue: () => SelectValue
|
|
22
23
|
});
|
|
23
|
-
function Select({ ...props }) {
|
|
24
|
-
|
|
24
|
+
function Select$1({ dir, ...props }) {
|
|
25
|
+
const root = /* @__PURE__ */ jsx(Select.Root, {
|
|
25
26
|
"data-slot": "select",
|
|
26
27
|
...props
|
|
27
28
|
});
|
|
29
|
+
return dir ? /* @__PURE__ */ jsx(DirectionProvider, {
|
|
30
|
+
direction: dir,
|
|
31
|
+
children: root
|
|
32
|
+
}) : root;
|
|
28
33
|
}
|
|
29
34
|
function SelectGroup({ ...props }) {
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
35
|
+
return /* @__PURE__ */ jsx(Select.Group, {
|
|
31
36
|
"data-slot": "select-group",
|
|
32
37
|
...props
|
|
33
38
|
});
|
|
34
39
|
}
|
|
35
40
|
function SelectValue({ ...props }) {
|
|
36
|
-
return /* @__PURE__ */ jsx(
|
|
41
|
+
return /* @__PURE__ */ jsx(Select.Value, {
|
|
37
42
|
"data-slot": "select-value",
|
|
38
43
|
...props
|
|
39
44
|
});
|
|
40
45
|
}
|
|
41
46
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
42
|
-
return /* @__PURE__ */ jsxs(
|
|
47
|
+
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
43
48
|
"data-slot": "select-trigger",
|
|
44
49
|
"data-size": size,
|
|
45
|
-
className: cn(`border-input data-
|
|
50
|
+
className: cn(`border-input data-placeholder:text-muted-foreground
|
|
46
51
|
[&_svg:not([class*='text-'])]:text-muted-foreground
|
|
47
52
|
focus-visible:border-ring focus-visible:ring-ring/50
|
|
48
53
|
aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
|
|
@@ -50,84 +55,83 @@ function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
|
50
55
|
flex w-fit items-center justify-between gap-2 rounded-md border
|
|
51
56
|
bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs
|
|
52
57
|
transition-[color,box-shadow] outline-none focus-visible:ring-[3px]
|
|
53
|
-
disabled:cursor-not-allowed disabled:opacity-50
|
|
54
|
-
data-[size=
|
|
55
|
-
*:data-[slot=select-value]:
|
|
56
|
-
*:data-[slot=select-value]:
|
|
57
|
-
[&_svg]:
|
|
58
|
+
data-disabled:cursor-not-allowed data-disabled:opacity-50
|
|
59
|
+
data-[size=default]:h-9 data-[size=sm]:h-8
|
|
60
|
+
*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex
|
|
61
|
+
*:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2
|
|
62
|
+
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
63
|
+
[&_svg:not([class*='size-'])]:size-4`, className),
|
|
58
64
|
...props,
|
|
59
|
-
children: [children, /* @__PURE__ */ jsx(
|
|
60
|
-
|
|
61
|
-
|
|
65
|
+
children: [children, /* @__PURE__ */ jsx(Select.Icon, {
|
|
66
|
+
render: /* @__PURE__ */ jsx(ChevronDownIcon, {}),
|
|
67
|
+
className: "opacity-50"
|
|
62
68
|
})]
|
|
63
69
|
});
|
|
64
70
|
}
|
|
65
|
-
function SelectContent({ className, children, position = "item-aligned", align = "center", container, ...props }) {
|
|
71
|
+
function SelectContent({ className, children, position = "item-aligned", align = "center", side = "bottom", sideOffset = 4, container, ...props }) {
|
|
66
72
|
const { getContainer } = useConfig();
|
|
67
|
-
|
|
73
|
+
const alignItemWithTrigger = position === "item-aligned";
|
|
74
|
+
return /* @__PURE__ */ jsx(Select.Portal, {
|
|
68
75
|
container: container ?? getContainer(),
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
|
|
72
|
-
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
73
|
-
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
74
|
-
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
75
|
-
data-[side=left]:slide-in-from-right-2
|
|
76
|
-
data-[side=right]:slide-in-from-left-2
|
|
77
|
-
data-[side=top]:slide-in-from-bottom-2 relative
|
|
78
|
-
max-h-(--radix-select-content-available-height) min-w-[8rem]
|
|
79
|
-
origin-(--radix-select-content-transform-origin) overflow-x-hidden
|
|
80
|
-
overflow-y-auto rounded-md border shadow-md`, OVERLAY_LAYER, position === "popper" && `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
81
|
-
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`, className),
|
|
82
|
-
position,
|
|
76
|
+
children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
77
|
+
side,
|
|
83
78
|
align,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
79
|
+
sideOffset,
|
|
80
|
+
alignItemWithTrigger,
|
|
81
|
+
className: cn(OVERLAY_LAYER, !alignItemWithTrigger && "min-w-(--anchor-width)"),
|
|
82
|
+
children: /* @__PURE__ */ jsxs(Select.Popup, {
|
|
83
|
+
"data-slot": "select-content",
|
|
84
|
+
className: cn(`bg-popover text-popover-foreground max-h-(--available-height)
|
|
85
|
+
min-w-[8rem] origin-(--transform-origin) overflow-hidden rounded-md
|
|
86
|
+
border shadow-md transition-[opacity,transform] duration-150
|
|
87
|
+
data-ending-style:scale-95 data-ending-style:opacity-0
|
|
88
|
+
data-starting-style:scale-95 data-starting-style:opacity-0`, className),
|
|
89
|
+
...props,
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
92
|
+
/* @__PURE__ */ jsx(Select.List, {
|
|
93
|
+
className: "overflow-y-auto p-1",
|
|
94
|
+
children
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
97
|
+
]
|
|
98
|
+
})
|
|
94
99
|
})
|
|
95
100
|
});
|
|
96
101
|
}
|
|
97
102
|
function SelectLabel({ className, ...props }) {
|
|
98
|
-
return /* @__PURE__ */ jsx(
|
|
103
|
+
return /* @__PURE__ */ jsx(Select.GroupLabel, {
|
|
99
104
|
"data-slot": "select-label",
|
|
100
105
|
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
101
106
|
...props
|
|
102
107
|
});
|
|
103
108
|
}
|
|
104
109
|
function SelectItem({ className, children, ...props }) {
|
|
105
|
-
return /* @__PURE__ */ jsxs(
|
|
110
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
106
111
|
"data-slot": "select-item",
|
|
107
|
-
className: cn(`
|
|
112
|
+
className: cn(`data-highlighted:bg-accent data-highlighted:text-accent-foreground
|
|
108
113
|
[&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full
|
|
109
114
|
cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm
|
|
110
|
-
outline-hidden select-none data-
|
|
111
|
-
data-
|
|
112
|
-
[&_svg:not([class*='size-'])]:size-4
|
|
113
|
-
*:[span]:last:items-center *:[span]:last:gap-2`, className),
|
|
115
|
+
outline-hidden select-none data-disabled:pointer-events-none
|
|
116
|
+
data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
117
|
+
[&_svg:not([class*='size-'])]:size-4`, className),
|
|
114
118
|
...props,
|
|
115
|
-
children: [/* @__PURE__ */ jsx(
|
|
119
|
+
children: [/* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
116
120
|
"data-slot": "select-item-indicator",
|
|
117
121
|
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
118
|
-
children: /* @__PURE__ */ jsx(
|
|
119
|
-
}), /* @__PURE__ */ jsx(
|
|
122
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" })
|
|
123
|
+
}), /* @__PURE__ */ jsx(Select.ItemText, { children })]
|
|
120
124
|
});
|
|
121
125
|
}
|
|
122
126
|
function SelectSeparator({ className, ...props }) {
|
|
123
|
-
return /* @__PURE__ */ jsx(
|
|
127
|
+
return /* @__PURE__ */ jsx(Select.Separator, {
|
|
124
128
|
"data-slot": "select-separator",
|
|
125
129
|
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
126
130
|
...props
|
|
127
131
|
});
|
|
128
132
|
}
|
|
129
133
|
function SelectScrollUpButton({ className, ...props }) {
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
134
|
+
return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
|
|
131
135
|
"data-slot": "select-scroll-up-button",
|
|
132
136
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
133
137
|
...props,
|
|
@@ -135,7 +139,7 @@ function SelectScrollUpButton({ className, ...props }) {
|
|
|
135
139
|
});
|
|
136
140
|
}
|
|
137
141
|
function SelectScrollDownButton({ className, ...props }) {
|
|
138
|
-
return /* @__PURE__ */ jsx(
|
|
142
|
+
return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
|
|
139
143
|
"data-slot": "select-scroll-down-button",
|
|
140
144
|
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
141
145
|
...props,
|
|
@@ -143,6 +147,6 @@ function SelectScrollDownButton({ className, ...props }) {
|
|
|
143
147
|
});
|
|
144
148
|
}
|
|
145
149
|
//#endregion
|
|
146
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, select_exports };
|
|
150
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, select_exports };
|
|
147
151
|
|
|
148
152
|
//# sourceMappingURL=select.mjs.map
|
package/dist/core/select.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.mjs","names":[],"sources":["../../src/core/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport { OVERLAY_LAYER } from '../lib/z-layers';\n\n/*\n * Vendored from shadcn's `new-york-v4` select registry entry.\n *\n * Local patches — re-apply these after any `shadcn add select`:\n * 1. Imports: `SelectPrimitive` from `@radix-ui/react-select` (upstream uses\n * the unified `radix-ui` package, which this repo doesn't install), `cn`\n * from `@repo/ui/utils`.\n * 2. `OVERLAY_LAYER` (src/lib/z-layers.ts) replaces upstream's `z-50` on\n * `SelectContent`. Why: this package is published and can't assume it owns\n * the app's z-index scale — see #359.\n * 3. `SelectContent` takes a `container` prop, defaulted to\n * `useConfig().getContainer()`, and passes it to `SelectPrimitive.Portal`\n * (upstream renders the portal with no `container`). Why: portalled content\n * must stay inside the themed wrapper, or dark mode and the CSS custom\n * properties don't reach it.\n *\n * The rest of what `shadcn add select --diff` reports is Tailwind class\n * ordering and prettier line-wrapping from this repo's formatter, not a patch.\n */\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n `border-input data-[placeholder]:text-muted-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground\n focus-visible:border-ring focus-visible:ring-ring/50\n aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\n aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50\n flex w-fit items-center justify-between gap-2 rounded-md border\n bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs\n transition-[color,box-shadow] outline-none focus-visible:ring-[3px]\n disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9\n data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1\n *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center\n *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n container,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content> & {\n container?: HTMLElement;\n}) {\n const { getContainer } = useConfig();\n\n return (\n <SelectPrimitive.Portal container={container ?? getContainer()}>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n `bg-popover text-popover-foreground data-[state=open]:animate-in\n data-[state=closed]:animate-out data-[state=closed]:fade-out-0\n data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95\n data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\n data-[side=left]:slide-in-from-right-2\n data-[side=right]:slide-in-from-left-2\n data-[side=top]:slide-in-from-bottom-2 relative\n max-h-(--radix-select-content-available-height) min-w-[8rem]\n origin-(--radix-select-content-transform-origin) overflow-x-hidden\n overflow-y-auto rounded-md border shadow-md`,\n OVERLAY_LAYER,\n position === 'popper' &&\n `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1\n data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,\n className,\n )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n `h-[var(--radix-select-trigger-height)] w-full\n min-w-[var(--radix-select-trigger-width)] scroll-my-1`,\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n `focus:bg-accent focus:text-accent-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full\n cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm\n outline-hidden select-none data-[disabled]:pointer-events-none\n data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex\n *:[span]:last:items-center *:[span]:last:gap-2`,\n className,\n )}\n {...props}\n >\n <span\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAS,OAAO,EACd,GAAG,SACiD;CACpD,OAAO,oBAAC,gBAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAAC,gBAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAAC,gBAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SAGF;CACD,OACE,qBAAC,gBAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT;;;;;;;;;;;;gEAaA,SACF;EACA,GAAI;EAnBN,UAAA,CAqBG,UACD,oBAAC,gBAAgB,MAAjB;GAAsB,SAAA;GACpB,UAAA,oBAAC,iBAAD,EAAiB,WAAU,oBAAqB,CAAA;EAC5B,CAAA,CACC;;AAE7B;AAEA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,gBACX,QAAQ,UACR,WACA,GAAG,SAGF;CACD,MAAM,EAAE,iBAAiB,UAAU;CAEnC,OACE,oBAAC,gBAAgB,QAAjB;EAAwB,WAAW,aAAa,aAAa;EAC3D,UAAA,qBAAC,gBAAgB,SAAjB;GACE,aAAU;GACV,WAAW,GACT;;;;;;;;;wDAUA,eACA,aAAa,YACX;6EAEF,SACF;GACU;GACH;GACP,GAAI;GArBN,UAAA;IAuBE,oBAAC,sBAAD,CAAuB,CAAA;IACvB,oBAAC,gBAAgB,UAAjB;KACE,WAAW,GACT,OACA,aAAa,YACX;oEAEJ;KAEC;IACuB,CAAA;IAC1B,oBAAC,wBAAD,CAAyB,CAAA;GACF;;CACH,CAAA;AAE5B;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACkD;CACrD,OACE,oBAAC,gBAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAAC,gBAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT;;;;;;yDAOA,SACF;EACA,GAAI;EAZN,UAAA,CAcE,oBAAC,QAAD;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,gBAAgB,eAAjB,EAAA,UACE,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA,EACF,CAAA;EAC3B,CAAA,GACN,oBAAC,gBAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAAC,gBAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC2D;CAC9D,OACE,oBAAC,gBAAgB,gBAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACL,CAAA;AAEpC;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC6D;CAChE,OACE,oBAAC,gBAAgB,kBAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACL,CAAA;AAEtC"}
|
|
1
|
+
{"version":3,"file":"select.mjs","names":["Select","SelectPrimitive"],"sources":["../../src/core/select.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { DirectionProvider } from '@base-ui/react/direction-provider';\nimport { Select as SelectPrimitive } from '@base-ui/react/select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { useConfig } from '@repo/ui/providers';\nimport { cn } from '@repo/ui/utils';\n\nimport { OVERLAY_LAYER } from '../lib/z-layers';\n\n// Base UI primitives with repo-owned styling; no longer vendored from shadcn.\ntype SelectRootProps = SelectPrimitive.Root.Props<string> & {\n /** Explicit reading direction, retained from the previous Radix API. */\n dir?: 'ltr' | 'rtl';\n};\n\nfunction Select({ dir, ...props }: SelectRootProps) {\n const root = <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n\n return dir ? (\n <DirectionProvider direction={dir}>{root}</DirectionProvider>\n ) : (\n root\n );\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n `border-input data-placeholder:text-muted-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground\n focus-visible:border-ring focus-visible:ring-ring/50\n aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\n aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50\n flex w-fit items-center justify-between gap-2 rounded-md border\n bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs\n transition-[color,box-shadow] outline-none focus-visible:ring-[3px]\n data-disabled:cursor-not-allowed data-disabled:opacity-50\n data-[size=default]:h-9 data-[size=sm]:h-8\n *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex\n *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2\n [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4`,\n className,\n //\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={<ChevronDownIcon />}\n className=\"opacity-50\"\n />\n </SelectPrimitive.Trigger>\n );\n}\n\ntype SelectContentProps = Omit<\n React.ComponentProps<typeof SelectPrimitive.Popup>,\n 'className'\n> & {\n className?: string;\n position?: 'item-aligned' | 'popper';\n align?: SelectPrimitive.Positioner.Props['align'];\n side?: SelectPrimitive.Positioner.Props['side'];\n sideOffset?: number;\n container?: HTMLElement;\n};\n\nfunction SelectContent({\n className,\n children,\n position = 'item-aligned',\n align = 'center',\n side = 'bottom',\n sideOffset = 4,\n container,\n ...props\n}: SelectContentProps) {\n const { getContainer } = useConfig();\n const alignItemWithTrigger = position === 'item-aligned';\n\n return (\n <SelectPrimitive.Portal container={container ?? getContainer()}>\n <SelectPrimitive.Positioner\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className={cn(\n OVERLAY_LAYER,\n !alignItemWithTrigger && 'min-w-(--anchor-width)',\n )}\n >\n <SelectPrimitive.Popup\n data-slot=\"select-content\"\n className={cn(\n `bg-popover text-popover-foreground max-h-(--available-height)\n min-w-[8rem] origin-(--transform-origin) overflow-hidden rounded-md\n border shadow-md transition-[opacity,transform] duration-150\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0`,\n className,\n //\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List className=\"overflow-y-auto p-1\">\n {children}\n </SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.GroupLabel>) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n `data-highlighted:bg-accent data-highlighted:text-accent-foreground\n [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full\n cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm\n outline-hidden select-none data-disabled:pointer-events-none\n data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\n [&_svg:not([class*='size-'])]:size-4`,\n className,\n //\n )}\n {...props}\n >\n <SelectPrimitive.ItemIndicator\n data-slot=\"select-item-indicator\"\n className=\"absolute right-2 flex size-3.5 items-center justify-center\"\n >\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpArrow>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownArrow>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAmBA,SAASA,SAAO,EAAE,KAAK,GAAG,SAA0B;CAClD,MAAM,OAAO,oBAACC,OAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;CAElE,OAAO,MACL,oBAAC,mBAAD;EAAmB,WAAW;EAAM,UAAA;CAAwB,CAAA,IAE5D;AAEJ;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAACA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,YAAY,EACnB,GAAG,SACkD;CACrD,OAAO,oBAACA,OAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAI;CAAQ,CAAA;AACrE;AAEA,SAAS,cAAc,EACrB,WACA,OAAO,WACP,UACA,GAAG,SAGF;CACD,OACE,qBAACA,OAAgB,SAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT;;;;;;;;;;;;;+CAcA,SAEF;EACA,GAAI;EArBN,UAAA,CAuBG,UACD,oBAACA,OAAgB,MAAjB;GACE,QAAQ,oBAAC,iBAAD,CAAkB,CAAA;GAC1B,WAAU;EACX,CAAA,CACsB;;AAE7B;AAcA,SAAS,cAAc,EACrB,WACA,UACA,WAAW,gBACX,QAAQ,UACR,OAAO,UACP,aAAa,GACb,WACA,GAAG,SACkB;CACrB,MAAM,EAAE,iBAAiB,UAAU;CACnC,MAAM,uBAAuB,aAAa;CAE1C,OACE,oBAACA,OAAgB,QAAjB;EAAwB,WAAW,aAAa,aAAa;EAC3D,UAAA,oBAACA,OAAgB,YAAjB;GACQ;GACC;GACK;GACU;GACtB,WAAW,GACT,eACA,CAAC,wBAAwB,wBAC3B;GAEA,UAAA,qBAACA,OAAgB,OAAjB;IACE,aAAU;IACV,WAAW,GACT;;;;yEAKA,SAEF;IACA,GAAI;IAXN,UAAA;KAaE,oBAAC,sBAAD,CAAuB,CAAA;KACvB,oBAACA,OAAgB,MAAjB;MAAsB,WAAU;MAC7B;KACmB,CAAA;KACtB,oBAAC,wBAAD,CAAyB,CAAA;IACJ;;EACG,CAAA;CACN,CAAA;AAE5B;AAEA,SAAS,YAAY,EACnB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,OAAgB,YAAjB;EACE,aAAU;EACV,WAAW,GAAG,6CAA6C,SAAS;EACpE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,WAAW,EAClB,WACA,UACA,GAAG,SACiD;CACpD,OACE,qBAACA,OAAgB,MAAjB;EACE,aAAU;EACV,WAAW,GACT;;;;;+CAMA,SAEF;EACA,GAAI;EAZN,UAAA,CAcE,oBAACA,OAAgB,eAAjB;GACE,aAAU;GACV,WAAU;GAEV,UAAA,oBAAC,WAAD,EAAW,WAAU,SAAU,CAAA;EACF,CAAA,GAC/B,oBAACA,OAAgB,UAAjB,EAA2B,SAAmC,CAAA,CAC1C;;AAE1B;AAEA,SAAS,gBAAgB,EACvB,WACA,GAAG,SACsD;CACzD,OACE,oBAACA,OAAgB,WAAjB;EACE,aAAU;EACV,WAAW,GAAG,iDAAiD,SAAS;EACxE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAC5B,WACA,GAAG,SAC0D;CAC7D,OACE,oBAACA,OAAgB,eAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,eAAD,EAAe,WAAU,SAAU,CAAA;CACN,CAAA;AAEnC;AAEA,SAAS,uBAAuB,EAC9B,WACA,GAAG,SAC4D;CAC/D,OACE,oBAACA,OAAgB,iBAAjB;EACE,aAAU;EACV,WAAW,GACT,wDACA,SACF;EACA,GAAI;EAEJ,UAAA,oBAAC,iBAAD,EAAiB,WAAU,SAAU,CAAA;CACN,CAAA;AAErC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "@
|
|
2
|
+
import { Separator } from "@base-ui/react/separator";
|
package/dist/core/separator.mjs
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import { cn } from "../utils.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
5
|
+
import { Separator } from "@base-ui/react/separator";
|
|
6
6
|
//#region src/core/separator.tsx
|
|
7
|
-
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
7
|
+
function Separator$1({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
9
9
|
"data-slot": "separator",
|
|
10
|
-
decorative,
|
|
11
10
|
orientation,
|
|
11
|
+
role: decorative ? "none" : "separator",
|
|
12
|
+
"aria-orientation": decorative ? void 0 : orientation,
|
|
12
13
|
className: cn(`bg-border shrink-0 data-[orientation=horizontal]:h-px
|
|
13
14
|
data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full
|
|
14
15
|
data-[orientation=vertical]:w-px`, className),
|
|
@@ -16,6 +17,6 @@ function Separator({ className, orientation = "horizontal", decorative = true, .
|
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
19
|
//#endregion
|
|
19
|
-
export { Separator };
|
|
20
|
+
export { Separator$1 as Separator };
|
|
20
21
|
|
|
21
22
|
//# sourceMappingURL=separator.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.mjs","names":[],"sources":["../../src/core/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport
|
|
1
|
+
{"version":3,"file":"separator.mjs","names":["Separator","SeparatorPrimitive"],"sources":["../../src/core/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Separator as SeparatorPrimitive } from '@base-ui/react/separator';\n\nimport { cn } from '@repo/ui/utils';\n\ninterface Props extends Omit<\n React.ComponentProps<typeof SeparatorPrimitive>,\n 'className'\n> {\n className?: string;\n decorative?: boolean;\n}\n\n// Base UI primitive with repo-owned styling; no longer vendored from shadcn.\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: Props) {\n return (\n <SeparatorPrimitive\n data-slot=\"separator\"\n orientation={orientation}\n role={decorative ? 'none' : 'separator'}\n aria-orientation={decorative ? undefined : orientation}\n className={cn(\n `bg-border shrink-0 data-[orientation=horizontal]:h-px\n data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full\n data-[orientation=vertical]:w-px`,\n className,\n //\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":";;;;;;AAiBA,SAASA,YAAU,EACjB,WACA,cAAc,cACd,aAAa,MACb,GAAG,SACK;CACR,OACE,oBAACC,WAAD;EACE,aAAU;EACG;EACb,MAAM,aAAa,SAAS;EAC5B,oBAAkB,aAAa,KAAA,IAAY;EAC3C,WAAW,GACT;;2CAGA,SAEF;EACA,GAAI;CACL,CAAA;AAEL"}
|
package/dist/core/slider.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "@
|
|
2
|
+
import { Slider } from "@base-ui/react/slider";
|
package/dist/core/slider.mjs
CHANGED
|
@@ -3,10 +3,10 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
6
|
+
import { Slider } from "@base-ui/react/slider";
|
|
7
7
|
//#region src/core/slider.tsx
|
|
8
|
-
var slider_exports = /* @__PURE__ */ __exportAll({ Slider: () => Slider });
|
|
9
|
-
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
8
|
+
var slider_exports = /* @__PURE__ */ __exportAll({ Slider: () => Slider$1 });
|
|
9
|
+
function Slider$1({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
10
10
|
const thumbs = React$1.useMemo(() => {
|
|
11
11
|
if (Array.isArray(value)) return value;
|
|
12
12
|
if (Array.isArray(defaultValue)) return defaultValue;
|
|
@@ -17,38 +17,49 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
17
17
|
min,
|
|
18
18
|
max
|
|
19
19
|
]);
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ jsx(Slider.Root, {
|
|
21
|
+
render: /* @__PURE__ */ jsx("span", {}),
|
|
21
22
|
"data-slot": "slider",
|
|
22
23
|
defaultValue,
|
|
23
24
|
value,
|
|
24
25
|
min,
|
|
25
26
|
max,
|
|
26
|
-
className: cn(`relative flex w-full
|
|
27
|
-
data-[disabled]:
|
|
28
|
-
data-[orientation=vertical]:h-
|
|
29
|
-
data-[orientation=vertical]:
|
|
27
|
+
className: cn(`relative flex w-full items-center data-[disabled]:cursor-not-allowed
|
|
28
|
+
data-[disabled]:opacity-50 data-[orientation=vertical]:h-full
|
|
29
|
+
data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto
|
|
30
|
+
data-[orientation=vertical]:flex-col`, className),
|
|
30
31
|
...props,
|
|
31
|
-
children:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
data-[orientation=
|
|
35
|
-
data-[orientation=
|
|
36
|
-
data-[orientation=vertical]:
|
|
37
|
-
children: /* @__PURE__ */ jsx(
|
|
38
|
-
"data-slot": "slider-
|
|
39
|
-
className: cn(`bg-
|
|
40
|
-
data-[orientation=
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
children: /* @__PURE__ */ jsxs(Slider.Control, {
|
|
33
|
+
className: cn(`relative flex w-full touch-none items-center select-none
|
|
34
|
+
data-[orientation=vertical]:h-full
|
|
35
|
+
data-[orientation=vertical]:min-h-44
|
|
36
|
+
data-[orientation=vertical]:w-auto
|
|
37
|
+
data-[orientation=vertical]:flex-col`),
|
|
38
|
+
children: [/* @__PURE__ */ jsx(Slider.Track, {
|
|
39
|
+
"data-slot": "slider-track",
|
|
40
|
+
className: cn(`bg-input relative grow overflow-hidden rounded-full
|
|
41
|
+
data-[orientation=horizontal]:h-1.5
|
|
42
|
+
data-[orientation=horizontal]:w-full
|
|
43
|
+
data-[orientation=vertical]:h-full
|
|
44
|
+
data-[orientation=vertical]:w-1.5`),
|
|
45
|
+
children: /* @__PURE__ */ jsx(Slider.Indicator, {
|
|
46
|
+
"data-slot": "slider-range",
|
|
47
|
+
className: cn(`bg-primary data-[orientation=horizontal]:h-full
|
|
48
|
+
data-[orientation=vertical]:w-full`)
|
|
49
|
+
})
|
|
50
|
+
}), Array.from({ length: thumbs.length }, (_, index) => /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
51
|
+
"data-slot": "slider-thumb",
|
|
52
|
+
index,
|
|
53
|
+
className: cn(`border-primary bg-background ring-ring/50 block size-4 shrink-0
|
|
54
|
+
rounded-full border shadow-sm transition-[color,box-shadow]
|
|
55
|
+
hover:ring-4 has-[:focus-visible]:ring-4
|
|
56
|
+
has-[:focus-visible]:outline-hidden
|
|
57
|
+
data-disabled:pointer-events-none data-disabled:opacity-50`)
|
|
58
|
+
}, index))]
|
|
59
|
+
})
|
|
49
60
|
});
|
|
50
61
|
}
|
|
51
62
|
//#endregion
|
|
52
|
-
export { Slider, slider_exports };
|
|
63
|
+
export { Slider$1 as Slider, slider_exports };
|
|
53
64
|
|
|
54
65
|
//# sourceMappingURL=slider.mjs.map
|
package/dist/core/slider.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.mjs","names":["React"],"sources":["../../src/core/slider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport
|
|
1
|
+
{"version":3,"file":"slider.mjs","names":["Slider","React","SliderPrimitive"],"sources":["../../src/core/slider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Slider as SliderPrimitive } from '@base-ui/react/slider';\n\nimport { cn } from '@repo/ui/utils';\n\ntype Props = Omit<\n SliderPrimitive.Root.Props<number[]>,\n 'className' | 'render'\n> & {\n className?: string;\n};\n\n// Base UI primitive with repo-owned styling; no longer vendored from shadcn.\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: Props) {\n const thumbs = React.useMemo(() => {\n if (Array.isArray(value)) {\n return value;\n }\n if (Array.isArray(defaultValue)) {\n return defaultValue;\n }\n return [min, max];\n }, [value, defaultValue, min, max]);\n\n return (\n <SliderPrimitive.Root\n render={<span />}\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n `relative flex w-full items-center data-[disabled]:cursor-not-allowed\n data-[disabled]:opacity-50 data-[orientation=vertical]:h-full\n data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto\n data-[orientation=vertical]:flex-col`,\n className,\n //\n )}\n {...props}\n >\n <SliderPrimitive.Control\n className={cn(\n `relative flex w-full touch-none items-center select-none\n data-[orientation=vertical]:h-full\n data-[orientation=vertical]:min-h-44\n data-[orientation=vertical]:w-auto\n data-[orientation=vertical]:flex-col`,\n )}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className={cn(\n `bg-input relative grow overflow-hidden rounded-full\n data-[orientation=horizontal]:h-1.5\n data-[orientation=horizontal]:w-full\n data-[orientation=vertical]:h-full\n data-[orientation=vertical]:w-1.5`,\n )}\n >\n <SliderPrimitive.Indicator\n data-slot=\"slider-range\"\n className={cn(\n `bg-primary data-[orientation=horizontal]:h-full\n data-[orientation=vertical]:w-full`,\n )}\n />\n </SliderPrimitive.Track>\n {Array.from({ length: thumbs.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n index={index}\n className={cn(\n `border-primary bg-background ring-ring/50 block size-4 shrink-0\n rounded-full border shadow-sm transition-[color,box-shadow]\n hover:ring-4 has-[:focus-visible]:ring-4\n has-[:focus-visible]:outline-hidden\n data-disabled:pointer-events-none data-disabled:opacity-50`,\n )}\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n );\n}\n\nexport { Slider };\n"],"mappings":";;;;;;;;AAgBA,SAASA,SAAO,EACd,WACA,cACA,OACA,MAAM,GACN,MAAM,KACN,GAAG,SACK;CACR,MAAM,SAASC,QAAM,cAAc;EACjC,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO;EAET,IAAI,MAAM,QAAQ,YAAY,GAC5B,OAAO;EAET,OAAO,CAAC,KAAK,GAAG;CAClB,GAAG;EAAC;EAAO;EAAc;EAAK;CAAG,CAAC;CAElC,OACE,oBAACC,OAAgB,MAAjB;EACE,QAAQ,oBAAC,QAAD,CAAO,CAAA;EACf,aAAU;EACI;EACP;EACF;EACA;EACL,WAAW,GACT;;;+CAIA,SAEF;EACA,GAAI;EAEJ,UAAA,qBAACA,OAAgB,SAAjB;GACE,WAAW,GACT;;;;+CAKF;GAPF,UAAA,CASE,oBAACA,OAAgB,OAAjB;IACE,aAAU;IACV,WAAW,GACT;;;;8CAKF;IAEA,UAAA,oBAACA,OAAgB,WAAjB;KACE,aAAU;KACV,WAAW,GACT;iDAEF;IACD,CAAA;GACoB,CAAA,GACtB,MAAM,KAAK,EAAE,QAAQ,OAAO,OAAO,IAAI,GAAG,UACzC,oBAACA,OAAgB,OAAjB;IACE,aAAU;IAEH;IACP,WAAW,GACT;;;;yEAKF;GACD,GATM,KASN,CACF,CACsB;;CACL,CAAA;AAE1B"}
|
package/dist/core/switch.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import "react";
|
|
2
|
-
import "@
|
|
2
|
+
import { Switch } from "@base-ui/react/switch";
|
package/dist/core/switch.mjs
CHANGED
|
@@ -3,35 +3,35 @@ import { __exportAll } from "../_virtual/_rolldown/runtime.mjs";
|
|
|
3
3
|
import { cn } from "../utils.mjs";
|
|
4
4
|
import "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import
|
|
6
|
+
import { Switch } from "@base-ui/react/switch";
|
|
7
7
|
//#region src/core/switch.tsx
|
|
8
|
-
var switch_exports = /* @__PURE__ */ __exportAll({ Switch: () => Switch });
|
|
9
|
-
function Switch({ className, size = "default", handleClassName, children, ...props }) {
|
|
10
|
-
return /* @__PURE__ */ jsxs(
|
|
8
|
+
var switch_exports = /* @__PURE__ */ __exportAll({ Switch: () => Switch$1 });
|
|
9
|
+
function Switch$1({ className, size = "default", handleClassName, children, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Switch.Root, {
|
|
11
11
|
"data-slot": "switch",
|
|
12
12
|
"data-size": size,
|
|
13
|
-
className: cn(`peer data-
|
|
13
|
+
className: cn(`peer data-checked:bg-primary data-unchecked:bg-input
|
|
14
14
|
focus-visible:border-ring focus-visible:ring-ring/50
|
|
15
|
-
dark:data-
|
|
16
|
-
|
|
15
|
+
dark:data-unchecked:bg-input/80 group/switch inline-flex shrink-0
|
|
16
|
+
items-center rounded-full border border-transparent shadow-xs
|
|
17
17
|
transition-all outline-none focus-visible:ring-[3px]
|
|
18
|
-
disabled:cursor-not-allowed disabled:opacity-50
|
|
18
|
+
data-disabled:cursor-not-allowed data-disabled:opacity-50
|
|
19
19
|
data-[size=default]:h-[1.15rem] data-[size=default]:w-8
|
|
20
20
|
data-[size=sm]:h-3.5 data-[size=sm]:w-6`, className),
|
|
21
21
|
...props,
|
|
22
|
-
children: [/* @__PURE__ */ jsx(
|
|
22
|
+
children: [/* @__PURE__ */ jsx(Switch.Thumb, {
|
|
23
23
|
"data-slot": "switch-thumb",
|
|
24
|
-
className: cn(`bg-background dark:data-
|
|
25
|
-
dark:data-
|
|
26
|
-
|
|
24
|
+
className: cn(`bg-background dark:data-unchecked:bg-foreground
|
|
25
|
+
dark:data-checked:bg-primary-foreground pointer-events-none block
|
|
26
|
+
rounded-full ring-0 transition-transform
|
|
27
27
|
group-data-[size=default]/switch:size-4
|
|
28
28
|
group-data-[size=sm]/switch:size-3
|
|
29
|
-
data-
|
|
30
|
-
data-
|
|
29
|
+
data-checked:translate-x-[calc(100%-2px)]
|
|
30
|
+
data-unchecked:translate-x-0`, handleClassName)
|
|
31
31
|
}), children]
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
|
-
export { Switch, switch_exports };
|
|
35
|
+
export { Switch$1 as Switch, switch_exports };
|
|
36
36
|
|
|
37
37
|
//# sourceMappingURL=switch.mjs.map
|
package/dist/core/switch.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.mjs","names":[],"sources":["../../src/core/switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport
|
|
1
|
+
{"version":3,"file":"switch.mjs","names":["Switch","SwitchPrimitive"],"sources":["../../src/core/switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { Switch as SwitchPrimitive } from '@base-ui/react/switch';\n\nimport { cn } from '@repo/ui/utils';\n\n/*\n * Base UI primitive with repo-owned styling; no longer vendored from shadcn.\n *\n * `CustomProps` keeps the two structural extensions the atom relies on:\n * `handleClassName` (merged onto `SwitchPrimitive.Thumb`) and `children`\n * (rendered inside the Root, after the Thumb) — both reach into the primitive's\n * sub-tree, so they can't be expressed through `className` composition alone.\n */\ninterface CustomProps {\n handleClassName?: string;\n children?: React.ReactNode;\n}\n\nfunction Switch({\n className,\n size = 'default',\n handleClassName,\n children,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: 'sm' | 'default';\n} & CustomProps) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n `peer data-checked:bg-primary data-unchecked:bg-input\n focus-visible:border-ring focus-visible:ring-ring/50\n dark:data-unchecked:bg-input/80 group/switch inline-flex shrink-0\n items-center rounded-full border border-transparent shadow-xs\n transition-all outline-none focus-visible:ring-[3px]\n data-disabled:cursor-not-allowed data-disabled:opacity-50\n data-[size=default]:h-[1.15rem] data-[size=default]:w-8\n data-[size=sm]:h-3.5 data-[size=sm]:w-6`,\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n `bg-background dark:data-unchecked:bg-foreground\n dark:data-checked:bg-primary-foreground pointer-events-none block\n rounded-full ring-0 transition-transform\n group-data-[size=default]/switch:size-4\n group-data-[size=sm]/switch:size-3\n data-checked:translate-x-[calc(100%-2px)]\n data-unchecked:translate-x-0`,\n handleClassName,\n )}\n />\n {children}\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n"],"mappings":";;;;;;;;AAqBA,SAASA,SAAO,EACd,WACA,OAAO,WACP,iBACA,UACA,GAAG,SAGY;CACf,OACE,qBAACC,OAAgB,MAAjB;EACE,aAAU;EACV,aAAW;EACX,WAAW,GACT;;;;;;;kDAQA,SACF;EACA,GAAI;EAdN,UAAA,CAgBE,oBAACA,OAAgB,OAAjB;GACE,aAAU;GACV,WAAW,GACT;;;;;;yCAOA,eACF;EACD,CAAA,GACA,QACmB;;AAE1B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -53,4 +53,5 @@ import Result, { Props as Props$17 } from "./components/templates/result.mjs";
|
|
|
53
53
|
import PageHeader, { Props as Props$16 } from "./components/templates/page-header.mjs";
|
|
54
54
|
import Row, { Props as Props$19 } from "./components/templates/grid/row.mjs";
|
|
55
55
|
import Col, { Props as Props$1 } from "./components/templates/grid/col.mjs";
|
|
56
|
+
import "./components/templates/index.mjs";
|
|
56
57
|
export { Button, Card, type Props as CardProps, Checkbox, Col, type Props$1 as ColProps, Collapse, type Props$2 as CollapseProps, ColorPicker, type ComponentSize, Config, type Props$3 as ConfigProps, ConfigSnapshotProvider, Container, type Props$4 as ContainerProps, type Props$5 as ContentProps, DEFAULT_LOCALE, DatePicker, type DefaultProps, Drawer, type Props$6 as DrawerProps, Dropdown, type Props$7 as DropdownProps, Empty, type Props$8 as EmptyProps, FloatButton, type Props$9 as FooterProps, type Props$10 as HeaderProps, Input, Layout, type Props$11 as LayoutProps, List, type Props$12 as ListProps, type Locale, Marquees, type Props$13 as MarqueesProps, Menu, type Props$14 as MenuProps, Modal, type Props$15 as ModalProps, PageHeader, type Props$16 as PageHeaderProps, Popover, Progress, Radio, Result, type Props$17 as ResultProps, Reveals, type Props$18 as RevealsProps, RichTextEditor, Row, type Props$19 as RowProps, Select, type Props$20 as SiderProps, Skeleton, Slider, Space, type Props$21 as SpaceProps, Spin, Splitter, type Props$22 as SplitterProps, Swiper, type Props$23 as SwiperProps, Switch, Tag, type ThemeConfig, type ThemeToken, Toast, type StaticProps as ToastOptions, Typography, Upload, type UploadFile, type Props$24 as UploadProps, getRootConfigValue, useConfig };
|
package/dist/lib/z-layers.mjs
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* **They are all deliberately equal.** Nothing here ranks against anything else
|
|
8
8
|
* here by z-index; relative order falls out of DOM order, which is what puts a
|
|
9
|
-
* Select popup above the Drawer it was opened from (
|
|
10
|
-
* `body` as it opens) and a Drawer above `Layout.Header`. Give one of them a
|
|
9
|
+
* Select popup above the Drawer it was opened from (Base UI appends each portal
|
|
10
|
+
* to `body` as it opens) and a Drawer above `Layout.Header`. Give one of them a
|
|
11
11
|
* different value and those pairs silently invert. `Modal.confirm` and the
|
|
12
12
|
* imperative `Toast`/`Modal` stack roots sit above this on purpose (`z-10000` /
|
|
13
13
|
* `zIndex = '10000'`), so an imperative confirm opened from inside a declarative
|
|
@@ -18,10 +18,8 @@
|
|
|
18
18
|
* that assumption: Infima (Docusaurus) puts its navbar at `--ifm-z-index-fixed: 200`
|
|
19
19
|
* and its own overlay at 400, so on this repo's own docs site a right-anchored
|
|
20
20
|
* Drawer had its top 60px — the entire header, title and close button — painted
|
|
21
|
-
* under the navbar.
|
|
22
|
-
*
|
|
23
|
-
* clickable but invisible. 1000 clears Infima's whole scale and sits in the band
|
|
24
|
-
* every major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).
|
|
21
|
+
* under the navbar. 1000 clears Infima's whole scale and sits in the band every
|
|
22
|
+
* major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).
|
|
25
23
|
*
|
|
26
24
|
* Retune per call site with `className` / `classNames.mask` — both land after
|
|
27
25
|
* this in `cn()`, so `tailwind-merge` lets them win.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"z-layers.mjs","names":[],"sources":["../../src/lib/z-layers.ts"],"sourcesContent":["/**\n * The single stacking layer every floating/overlay primitive in this library\n * shares — dialog and drawer (mask + content), popover, select, dropdown,\n * float button, and `Layout.Header`.\n *\n * **They are all deliberately equal.** Nothing here ranks against anything else\n * here by z-index; relative order falls out of DOM order, which is what puts a\n * Select popup above the Drawer it was opened from (
|
|
1
|
+
{"version":3,"file":"z-layers.mjs","names":[],"sources":["../../src/lib/z-layers.ts"],"sourcesContent":["/**\n * The single stacking layer every floating/overlay primitive in this library\n * shares — dialog and drawer (mask + content), popover, select, dropdown,\n * float button, and `Layout.Header`.\n *\n * **They are all deliberately equal.** Nothing here ranks against anything else\n * here by z-index; relative order falls out of DOM order, which is what puts a\n * Select popup above the Drawer it was opened from (Base UI appends each portal\n * to `body` as it opens) and a Drawer above `Layout.Header`. Give one of them a\n * different value and those pairs silently invert. `Modal.confirm` and the\n * imperative `Toast`/`Modal` stack roots sit above this on purpose (`z-10000` /\n * `zIndex = '10000'`), so an imperative confirm opened from inside a declarative\n * Modal still lands on top.\n *\n * **Why 1000 and not shadcn's default of 50.** 50 assumes you own the whole app\n * and keep its chrome below that. This package is published, so it doesn't get\n * that assumption: Infima (Docusaurus) puts its navbar at `--ifm-z-index-fixed: 200`\n * and its own overlay at 400, so on this repo's own docs site a right-anchored\n * Drawer had its top 60px — the entire header, title and close button — painted\n * under the navbar. 1000 clears Infima's whole scale and sits in the band every\n * major library reserves for modals (antd 1000, Bootstrap 1055, MUI 1300).\n *\n * Retune per call site with `className` / `classNames.mask` — both land after\n * this in `cn()`, so `tailwind-merge` lets them win.\n */\nexport const OVERLAY_LAYER = 'z-1000';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,gBAAgB"}
|
|
@@ -4,7 +4,7 @@ import { Context, DEFAULT_LOCALE, useConfig } from "./context.mjs";
|
|
|
4
4
|
import { resolveDark, useSystemPrefersDark } from "./dark-mode.mjs";
|
|
5
5
|
import { registerRootConfig } from "./registry.mjs";
|
|
6
6
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
7
|
-
import { DirectionProvider } from "@
|
|
7
|
+
import { DirectionProvider } from "@base-ui/react/direction-provider";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region src/providers/config/config.tsx
|
|
10
10
|
const tokenToCssVar = {
|
|
@@ -130,7 +130,7 @@ const Config = ({ theme = {}, locale = {}, getContainer, componentSize, directio
|
|
|
130
130
|
}) : children
|
|
131
131
|
});
|
|
132
132
|
return direction ? /* @__PURE__ */ jsx(DirectionProvider, {
|
|
133
|
-
|
|
133
|
+
direction,
|
|
134
134
|
children: content
|
|
135
135
|
}) : content;
|
|
136
136
|
};
|