@biotechusa/pdo-ui 1.0.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.
Files changed (89) hide show
  1. package/README.md +23 -0
  2. package/dist/alert-dialog.js +80 -0
  3. package/dist/alert.js +49 -0
  4. package/dist/autocomplete.js +137 -0
  5. package/dist/avatar.js +25 -0
  6. package/dist/badge.js +43 -0
  7. package/dist/button.js +52 -0
  8. package/dist/card.js +52 -0
  9. package/dist/checkbox-group.js +10 -0
  10. package/dist/checkbox.js +47 -0
  11. package/dist/combobox.js +214 -0
  12. package/dist/dialog.js +89 -0
  13. package/dist/empty.js +85 -0
  14. package/dist/field.js +34 -0
  15. package/dist/fieldset.js +18 -0
  16. package/dist/form.js +11 -0
  17. package/dist/frame.js +45 -0
  18. package/dist/group.js +48 -0
  19. package/dist/index.css +5026 -0
  20. package/dist/index.js +43 -0
  21. package/dist/input-group.js +66 -0
  22. package/dist/input.js +17 -0
  23. package/dist/label.js +10 -0
  24. package/dist/lib/utils.d.ts +2 -0
  25. package/dist/menu.js +141 -0
  26. package/dist/number-field.js +88 -0
  27. package/dist/pagination.js +95 -0
  28. package/dist/popover.js +52 -0
  29. package/dist/progress.js +42 -0
  30. package/dist/radio-group.js +23 -0
  31. package/dist/scroll-area.js +44 -0
  32. package/dist/select.js +118 -0
  33. package/dist/separator.js +12 -0
  34. package/dist/sheet.js +104 -0
  35. package/dist/skeleton.js +10 -0
  36. package/dist/slider.js +61 -0
  37. package/dist/spinner.js +12 -0
  38. package/dist/src/alert-dialog.d.ts +12 -0
  39. package/dist/src/alert.d.ts +10 -0
  40. package/dist/src/autocomplete.d.ts +23 -0
  41. package/dist/src/avatar.d.ts +5 -0
  42. package/dist/src/badge.d.ts +12 -0
  43. package/dist/src/button.d.ts +13 -0
  44. package/dist/src/card.d.ts +9 -0
  45. package/dist/src/checkbox-group.d.ts +3 -0
  46. package/dist/src/checkbox.d.ts +3 -0
  47. package/dist/src/combobox.d.ts +25 -0
  48. package/dist/src/dialog.d.ts +14 -0
  49. package/dist/src/empty.d.ts +11 -0
  50. package/dist/src/field.d.ts +8 -0
  51. package/dist/src/fieldset.d.ts +4 -0
  52. package/dist/src/form.d.ts +3 -0
  53. package/dist/src/frame.d.ts +8 -0
  54. package/dist/src/group.d.ts +17 -0
  55. package/dist/src/index.d.ts +44 -0
  56. package/dist/src/input-group.d.ts +13 -0
  57. package/dist/src/input.d.ts +8 -0
  58. package/dist/src/label.d.ts +3 -0
  59. package/dist/src/menu.d.ts +34 -0
  60. package/dist/src/number-field.d.ts +12 -0
  61. package/dist/src/pagination.d.ts +15 -0
  62. package/dist/src/popover.d.ts +14 -0
  63. package/dist/src/progress.d.ts +7 -0
  64. package/dist/src/radio-group.d.ts +5 -0
  65. package/dist/src/scroll-area.d.ts +6 -0
  66. package/dist/src/select.d.ts +15 -0
  67. package/dist/src/separator.d.ts +3 -0
  68. package/dist/src/sheet.d.ts +19 -0
  69. package/dist/src/skeleton.d.ts +2 -0
  70. package/dist/src/slider.d.ts +4 -0
  71. package/dist/src/spinner.d.ts +2 -0
  72. package/dist/src/switch.d.ts +3 -0
  73. package/dist/src/table.d.ts +10 -0
  74. package/dist/src/tabs.d.ts +9 -0
  75. package/dist/src/textarea.d.ts +7 -0
  76. package/dist/src/toggle-group.d.ts +12 -0
  77. package/dist/src/toggle.d.ts +8 -0
  78. package/dist/src/toolbar.d.ts +8 -0
  79. package/dist/src/tooltip.d.ts +10 -0
  80. package/dist/styles.css +144 -0
  81. package/dist/switch.js +15 -0
  82. package/dist/table.js +63 -0
  83. package/dist/tabs.js +39 -0
  84. package/dist/textarea.js +19 -0
  85. package/dist/toggle-group.js +49 -0
  86. package/dist/toggle.js +33 -0
  87. package/dist/toolbar.js +46 -0
  88. package/dist/tooltip.js +29 -0
  89. package/package.json +76 -0
@@ -0,0 +1,214 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Combobox } from "@base-ui-components/react/combobox";
3
+ import { ChevronsUpDownIcon, XIcon } from "lucide-react";
4
+ import { createContext, useContext, useRef } from "react";
5
+ import { cn } from "../lib/utils";
6
+ import { Input } from "./input.js";
7
+ import { ScrollArea } from "./scroll-area.js";
8
+ const ComboboxContext = /*#__PURE__*/ createContext({
9
+ chipsRef: null,
10
+ multiple: false
11
+ });
12
+ function combobox_Combobox(props) {
13
+ const chipsRef = useRef(null);
14
+ return /*#__PURE__*/ jsx(ComboboxContext.Provider, {
15
+ value: {
16
+ chipsRef,
17
+ multiple: !!props.multiple
18
+ },
19
+ children: /*#__PURE__*/ jsx(Combobox.Root, {
20
+ ...props
21
+ })
22
+ });
23
+ }
24
+ function ComboboxInput({ className, showTrigger = true, showClear = false, size, ...props }) {
25
+ const { multiple } = useContext(ComboboxContext);
26
+ const sizeValue = size ?? "default";
27
+ if (multiple) return /*#__PURE__*/ jsx(Combobox.Input, {
28
+ className: cn("min-w-12 flex-1 text-base/5 outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5", "sm" === sizeValue ? "ps-1.5" : "ps-2", className),
29
+ "data-size": "string" == typeof sizeValue ? sizeValue : void 0,
30
+ "data-slot": "combobox-input",
31
+ size: "number" == typeof sizeValue ? sizeValue : void 0,
32
+ ...props
33
+ });
34
+ return /*#__PURE__*/ jsxs("div", {
35
+ className: "relative w-full has-disabled:opacity-64",
36
+ children: [
37
+ /*#__PURE__*/ jsx(Combobox.Input, {
38
+ className: cn("sm" === sizeValue ? "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5" : "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7", className),
39
+ "data-slot": "combobox-input",
40
+ render: /*#__PURE__*/ jsx(Input, {
41
+ className: "has-disabled:opacity-100",
42
+ size: sizeValue
43
+ }),
44
+ ...props
45
+ }),
46
+ showTrigger && /*#__PURE__*/ jsx(ComboboxTrigger, {
47
+ className: cn("-translate-y-1/2 absolute top-1/2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", "sm" === sizeValue ? "end-0" : "end-0.5"),
48
+ children: /*#__PURE__*/ jsx(ChevronsUpDownIcon, {})
49
+ }),
50
+ showClear && /*#__PURE__*/ jsx(ComboboxClear, {
51
+ className: cn("-translate-y-1/2 absolute top-1/2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 outline-none transition-opacity pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", "sm" === sizeValue ? "end-0" : "end-0.5"),
52
+ children: /*#__PURE__*/ jsx(XIcon, {})
53
+ })
54
+ ]
55
+ });
56
+ }
57
+ function ComboboxTrigger({ className, ...props }) {
58
+ return /*#__PURE__*/ jsx(Combobox.Trigger, {
59
+ className: className,
60
+ "data-slot": "combobox-trigger",
61
+ ...props
62
+ });
63
+ }
64
+ function ComboboxPopup({ className, children, sideOffset = 4, ...props }) {
65
+ const { chipsRef } = useContext(ComboboxContext);
66
+ return /*#__PURE__*/ jsx(Combobox.Portal, {
67
+ children: /*#__PURE__*/ jsx(Combobox.Positioner, {
68
+ anchor: chipsRef,
69
+ className: "z-50 select-none",
70
+ "data-slot": "combobox-positioner",
71
+ sideOffset: sideOffset,
72
+ children: /*#__PURE__*/ jsx("span", {
73
+ className: "relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover bg-clip-padding transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-lg has-data-starting-style:scale-98 has-data-starting-style:opacity-0 dark:not-in-data-[slot=group]:bg-clip-border",
74
+ children: /*#__PURE__*/ jsx(Combobox.Popup, {
75
+ className: cn("flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col", className),
76
+ "data-slot": "combobox-popup",
77
+ ...props,
78
+ children: children
79
+ })
80
+ })
81
+ })
82
+ });
83
+ }
84
+ function ComboboxItem({ className, children, ...props }) {
85
+ return /*#__PURE__*/ jsxs(Combobox.Item, {
86
+ className: cn("grid in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:text-sm [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
87
+ "data-slot": "combobox-item",
88
+ ...props,
89
+ children: [
90
+ /*#__PURE__*/ jsx(Combobox.ItemIndicator, {
91
+ className: "col-start-1",
92
+ children: /*#__PURE__*/ jsx("svg", {
93
+ fill: "none",
94
+ height: "24",
95
+ stroke: "currentColor",
96
+ strokeLinecap: "round",
97
+ strokeLinejoin: "round",
98
+ strokeWidth: "2",
99
+ viewBox: "0 0 24 24",
100
+ width: "24",
101
+ xmlns: "http://www.w3.org/1500/svg",
102
+ children: /*#__PURE__*/ jsx("path", {
103
+ d: "M5.252 12.7 10.2 18.63 18.748 5.37"
104
+ })
105
+ })
106
+ }),
107
+ /*#__PURE__*/ jsx("div", {
108
+ className: "col-start-2",
109
+ children: children
110
+ })
111
+ ]
112
+ });
113
+ }
114
+ function ComboboxSeparator({ className, ...props }) {
115
+ return /*#__PURE__*/ jsx(Combobox.Separator, {
116
+ className: cn("mx-2 my-1 h-px bg-border last:hidden", className),
117
+ "data-slot": "combobox-separator",
118
+ ...props
119
+ });
120
+ }
121
+ function ComboboxGroup({ className, ...props }) {
122
+ return /*#__PURE__*/ jsx(Combobox.Group, {
123
+ className: className,
124
+ "data-slot": "combobox-group",
125
+ ...props
126
+ });
127
+ }
128
+ function ComboboxGroupLabel({ className, ...props }) {
129
+ return /*#__PURE__*/ jsx(Combobox.GroupLabel, {
130
+ className: cn("px-2 py-1.5 font-medium text-muted-foreground text-xs", className),
131
+ "data-slot": "combobox-group-label",
132
+ ...props
133
+ });
134
+ }
135
+ function ComboboxEmpty({ className, ...props }) {
136
+ return /*#__PURE__*/ jsx(Combobox.Empty, {
137
+ className: cn("not-empty:p-2 text-center text-muted-foreground text-sm", className),
138
+ "data-slot": "combobox-empty",
139
+ ...props
140
+ });
141
+ }
142
+ function ComboboxRow({ className, ...props }) {
143
+ return /*#__PURE__*/ jsx(Combobox.Row, {
144
+ className: className,
145
+ "data-slot": "combobox-row",
146
+ ...props
147
+ });
148
+ }
149
+ function ComboboxValue({ ...props }) {
150
+ return /*#__PURE__*/ jsx(Combobox.Value, {
151
+ "data-slot": "combobox-value",
152
+ ...props
153
+ });
154
+ }
155
+ function ComboboxList({ className, ...props }) {
156
+ return /*#__PURE__*/ jsx(ScrollArea, {
157
+ className: "flex-1",
158
+ children: /*#__PURE__*/ jsx(Combobox.List, {
159
+ className: cn("not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3", className),
160
+ "data-slot": "combobox-list",
161
+ ...props
162
+ })
163
+ });
164
+ }
165
+ function ComboboxClear({ className, ...props }) {
166
+ return /*#__PURE__*/ jsx(Combobox.Clear, {
167
+ className: className,
168
+ "data-slot": "combobox-clear",
169
+ ...props
170
+ });
171
+ }
172
+ function ComboboxStatus({ className, ...props }) {
173
+ return /*#__PURE__*/ jsx(Combobox.Status, {
174
+ className: cn("px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0", className),
175
+ "data-slot": "combobox-status",
176
+ ...props
177
+ });
178
+ }
179
+ function ComboboxCollection(props) {
180
+ return /*#__PURE__*/ jsx(Combobox.Collection, {
181
+ "data-slot": "combobox-collection",
182
+ ...props
183
+ });
184
+ }
185
+ function ComboboxChips({ className, ...props }) {
186
+ const { chipsRef } = useContext(ComboboxContext);
187
+ return /*#__PURE__*/ jsx(Combobox.Chips, {
188
+ className: cn("relative inline-flex min-h-8 w-full flex-wrap gap-1 rounded-lg border border-input bg-background bg-clip-padding p-[calc(--spacing(1)-1px)] text-base/5 shadow-xs outline-none ring-ring/24 transition-shadow *:min-h-6 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-9 has-data-[size=sm]:min-h-7 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-7 has-data-[size=sm]:*:min-h-5 sm:text-sm dark:not-has-disabled:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]", className),
189
+ "data-slot": "combobox-chips",
190
+ ref: chipsRef,
191
+ ...props
192
+ });
193
+ }
194
+ function ComboboxChip({ children, ...props }) {
195
+ return /*#__PURE__*/ jsxs(Combobox.Chip, {
196
+ className: "flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-xs outline-none",
197
+ "data-slot": "combobox-chip",
198
+ ...props,
199
+ children: [
200
+ children,
201
+ /*#__PURE__*/ jsx(ComboboxChipRemove, {})
202
+ ]
203
+ });
204
+ }
205
+ function ComboboxChipRemove(props) {
206
+ return /*#__PURE__*/ jsx(Combobox.ChipRemove, {
207
+ "aria-label": "Remove",
208
+ className: "h-full shrink-0 cursor-pointer px-1.5 opacity-72 hover:opacity-100 [&_svg:not([class*='size-'])]:size-3.5",
209
+ "data-slot": "combobox-chip-remove",
210
+ ...props,
211
+ children: /*#__PURE__*/ jsx(XIcon, {})
212
+ });
213
+ }
214
+ export { combobox_Combobox as Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue };
package/dist/dialog.js ADDED
@@ -0,0 +1,89 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Dialog } from "@base-ui-components/react/dialog";
3
+ import { XIcon } from "lucide-react";
4
+ import { cn } from "../lib/utils";
5
+ const dialog_Dialog = Dialog.Root;
6
+ function DialogTrigger(props) {
7
+ return /*#__PURE__*/ jsx(Dialog.Trigger, {
8
+ "data-slot": "dialog-trigger",
9
+ ...props
10
+ });
11
+ }
12
+ function DialogPortal(props) {
13
+ return /*#__PURE__*/ jsx(Dialog.Portal, {
14
+ ...props
15
+ });
16
+ }
17
+ function DialogClose(props) {
18
+ return /*#__PURE__*/ jsx(Dialog.Close, {
19
+ "data-slot": "dialog-close",
20
+ ...props
21
+ });
22
+ }
23
+ function DialogBackdrop({ className, ...props }) {
24
+ return /*#__PURE__*/ jsx(Dialog.Backdrop, {
25
+ className: cn("fixed inset-0 z-50 bg-black/32 backdrop-blur-sm transition-all duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0", className),
26
+ "data-slot": "dialog-backdrop",
27
+ ...props
28
+ });
29
+ }
30
+ function DialogPopup({ className, children, showCloseButton = true, ...props }) {
31
+ return /*#__PURE__*/ jsxs(DialogPortal, {
32
+ children: [
33
+ /*#__PURE__*/ jsx(DialogBackdrop, {}),
34
+ /*#__PURE__*/ jsx("div", {
35
+ className: "fixed inset-0 z-50",
36
+ children: /*#__PURE__*/ jsx("div", {
37
+ className: "flex h-dvh flex-col items-center overflow-hidden pt-6 max-sm:before:flex-1 sm:overflow-y-auto sm:p-4 sm:after:flex-1 sm:before:basis-[20vh]",
38
+ children: /*#__PURE__*/ jsxs(Dialog.Popup, {
39
+ className: cn("sm:-translate-y-[calc(1.25rem*var(--nested-dialogs))] relative row-start-2 grid w-full min-w-0 origin-top gap-4 border bg-popover bg-clip-padding p-6 text-popover-foreground shadow-lg transition-[scale,opacity,translate] duration-200 ease-in-out will-change-transform before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] data-ending-style:opacity-0 data-starting-style:opacity-0 max-sm:overflow-y-auto max-sm:border-none max-sm:opacity-[calc(1-min(var(--nested-dialogs),1))] max-sm:data-ending-style:translate-y-4 max-sm:data-starting-style:translate-y-4 max-sm:before:hidden sm:max-w-lg sm:data-nested:data-ending-style:translate-y-8 sm:data-nested:data-starting-style:translate-y-8 sm:scale-[calc(1-0.1*var(--nested-dialogs))] sm:rounded-2xl sm:data-ending-style:scale-98 sm:data-starting-style:scale-98 sm:before:rounded-[calc(var(--radius-2xl)-1px)] dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]", className),
40
+ "data-slot": "dialog-popup",
41
+ ...props,
42
+ children: [
43
+ children,
44
+ showCloseButton && /*#__PURE__*/ jsxs(Dialog.Close, {
45
+ className: "absolute end-2 top-2 inline-flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-72 outline-none transition-[color,background-color,box-shadow,opacity] pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
46
+ children: [
47
+ /*#__PURE__*/ jsx(XIcon, {}),
48
+ /*#__PURE__*/ jsx("span", {
49
+ className: "sr-only",
50
+ children: "Close"
51
+ })
52
+ ]
53
+ })
54
+ ]
55
+ })
56
+ })
57
+ })
58
+ ]
59
+ });
60
+ }
61
+ function DialogHeader({ className, ...props }) {
62
+ return /*#__PURE__*/ jsx("div", {
63
+ className: cn("flex flex-col gap-1 text-center sm:text-left", className),
64
+ "data-slot": "dialog-header",
65
+ ...props
66
+ });
67
+ }
68
+ function DialogFooter({ className, ...props }) {
69
+ return /*#__PURE__*/ jsx("div", {
70
+ className: cn("sm:-mx-6 sm:-mb-6 flex flex-col-reverse gap-2 sm:mt-2 sm:flex-row sm:justify-end sm:rounded-b-xl sm:border-t sm:bg-muted/50 sm:px-6 sm:py-4", className),
71
+ "data-slot": "dialog-footer",
72
+ ...props
73
+ });
74
+ }
75
+ function DialogTitle({ className, ...props }) {
76
+ return /*#__PURE__*/ jsx(Dialog.Title, {
77
+ className: cn("font-heading text-xl leading-none", className),
78
+ "data-slot": "dialog-title",
79
+ ...props
80
+ });
81
+ }
82
+ function DialogDescription({ className, ...props }) {
83
+ return /*#__PURE__*/ jsx(Dialog.Description, {
84
+ className: cn("text-muted-foreground text-sm", className),
85
+ "data-slot": "dialog-description",
86
+ ...props
87
+ });
88
+ }
89
+ export { dialog_Dialog as Dialog, DialogBackdrop, DialogClose, DialogPopup as DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogBackdrop as DialogOverlay, DialogPopup, DialogPortal, DialogTitle, DialogTrigger };
package/dist/empty.js ADDED
@@ -0,0 +1,85 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../lib/utils";
4
+ function Empty({ className, ...props }) {
5
+ return /*#__PURE__*/ jsx("div", {
6
+ className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 text-balance rounded-xl border-dashed p-6 text-center md:p-12", className),
7
+ "data-slot": "empty",
8
+ ...props
9
+ });
10
+ }
11
+ function EmptyHeader({ className, ...props }) {
12
+ return /*#__PURE__*/ jsx("div", {
13
+ className: cn("flex max-w-sm flex-col items-center text-center", className),
14
+ "data-slot": "empty-header",
15
+ ...props
16
+ });
17
+ }
18
+ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
19
+ defaultVariants: {
20
+ variant: "default"
21
+ },
22
+ variants: {
23
+ variant: {
24
+ default: "bg-transparent",
25
+ icon: "relative flex size-9 shrink-0 items-center justify-center rounded-md border bg-card text-foreground shadow-black/5 shadow-sm before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-md)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='size-'])]:size-4.5"
26
+ }
27
+ }
28
+ });
29
+ function EmptyMedia({ className, variant = "default", ...props }) {
30
+ return /*#__PURE__*/ jsxs("div", {
31
+ className: cn("relative mb-6", className),
32
+ "data-slot": "empty-media",
33
+ "data-variant": variant,
34
+ ...props,
35
+ children: [
36
+ "icon" === variant && /*#__PURE__*/ jsxs(Fragment, {
37
+ children: [
38
+ /*#__PURE__*/ jsx("div", {
39
+ "aria-hidden": "true",
40
+ className: cn(emptyMediaVariants({
41
+ className,
42
+ variant
43
+ }), "-translate-x-0.5 -rotate-10 pointer-events-none absolute bottom-px origin-bottom-left scale-84 shadow-none")
44
+ }),
45
+ /*#__PURE__*/ jsx("div", {
46
+ "aria-hidden": "true",
47
+ className: cn(emptyMediaVariants({
48
+ className,
49
+ variant
50
+ }), "pointer-events-none absolute bottom-px origin-bottom-right translate-x-0.5 rotate-10 scale-84 shadow-none")
51
+ })
52
+ ]
53
+ }),
54
+ /*#__PURE__*/ jsx("div", {
55
+ className: cn(emptyMediaVariants({
56
+ className,
57
+ variant
58
+ })),
59
+ ...props
60
+ })
61
+ ]
62
+ });
63
+ }
64
+ function EmptyTitle({ className, ...props }) {
65
+ return /*#__PURE__*/ jsx("div", {
66
+ className: cn("font-heading text-xl leading-none", className),
67
+ "data-slot": "empty-title",
68
+ ...props
69
+ });
70
+ }
71
+ function EmptyDescription({ className, ...props }) {
72
+ return /*#__PURE__*/ jsx("div", {
73
+ className: cn("text-muted-foreground text-sm/relaxed [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4 [[data-slot=empty-title]+&]:mt-1", className),
74
+ "data-slot": "empty-description",
75
+ ...props
76
+ });
77
+ }
78
+ function EmptyContent({ className, ...props }) {
79
+ return /*#__PURE__*/ jsx("div", {
80
+ className: cn("flex w-full min-w-0 max-w-sm flex-col items-center gap-4 text-balance text-sm", className),
81
+ "data-slot": "empty-content",
82
+ ...props
83
+ });
84
+ }
85
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
package/dist/field.js ADDED
@@ -0,0 +1,34 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Field } from "@base-ui-components/react/field";
3
+ import { cn } from "../lib/utils";
4
+ function field_Field({ className, ...props }) {
5
+ return /*#__PURE__*/ jsx(Field.Root, {
6
+ className: cn("flex flex-col items-start gap-2", className),
7
+ "data-slot": "field",
8
+ ...props
9
+ });
10
+ }
11
+ function FieldLabel({ className, ...props }) {
12
+ return /*#__PURE__*/ jsx(Field.Label, {
13
+ className: cn("inline-flex items-center gap-2 text-sm/4", className),
14
+ "data-slot": "field-label",
15
+ ...props
16
+ });
17
+ }
18
+ function FieldDescription({ className, ...props }) {
19
+ return /*#__PURE__*/ jsx(Field.Description, {
20
+ className: cn("text-muted-foreground text-xs", className),
21
+ "data-slot": "field-description",
22
+ ...props
23
+ });
24
+ }
25
+ function FieldError({ className, ...props }) {
26
+ return /*#__PURE__*/ jsx(Field.Error, {
27
+ className: cn("text-destructive-foreground text-xs", className),
28
+ "data-slot": "field-error",
29
+ ...props
30
+ });
31
+ }
32
+ const FieldControl = Field.Control;
33
+ const FieldValidity = Field.Validity;
34
+ export { field_Field as Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldValidity };
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Fieldset } from "@base-ui-components/react/fieldset";
3
+ import { cn } from "../lib/utils";
4
+ function fieldset_Fieldset({ className, ...props }) {
5
+ return /*#__PURE__*/ jsx(Fieldset.Root, {
6
+ className: cn("flex w-full max-w-64 flex-col gap-6", className),
7
+ "data-slot": "fieldset",
8
+ ...props
9
+ });
10
+ }
11
+ function FieldsetLegend({ className, ...props }) {
12
+ return /*#__PURE__*/ jsx(Fieldset.Legend, {
13
+ className: cn("font-semibold", className),
14
+ "data-slot": "fieldset-legend",
15
+ ...props
16
+ });
17
+ }
18
+ export { fieldset_Fieldset as Fieldset, FieldsetLegend };
package/dist/form.js ADDED
@@ -0,0 +1,11 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Form } from "@base-ui-components/react/form";
3
+ import { cn } from "../lib/utils";
4
+ function form_Form({ className, ...props }) {
5
+ return /*#__PURE__*/ jsx(Form, {
6
+ className: cn("flex w-full flex-col gap-4", className),
7
+ "data-slot": "form",
8
+ ...props
9
+ });
10
+ }
11
+ export { form_Form as Form };
package/dist/frame.js ADDED
@@ -0,0 +1,45 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../lib/utils";
3
+ function Frame({ className, ...props }) {
4
+ return /*#__PURE__*/ jsx("div", {
5
+ className: cn("relative flex flex-col rounded-2xl bg-muted p-1", className),
6
+ "data-slot": "frame",
7
+ ...props
8
+ });
9
+ }
10
+ function FramePanel({ className, ...props }) {
11
+ return /*#__PURE__*/ jsx("div", {
12
+ className: cn("relative not-has-[table]:rounded-xl not-has-[table]:border not-has-[table]:bg-card bg-clip-padding not-has-[table]:p-5 not-has-[table]:shadow-xs before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-[table]:before:hidden dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]", className),
13
+ "data-slot": "frame-panel",
14
+ ...props
15
+ });
16
+ }
17
+ function FrameHeader({ className, ...props }) {
18
+ return /*#__PURE__*/ jsx("header", {
19
+ className: cn("flex flex-col px-5 py-4", className),
20
+ "data-slot": "frame-panel-header",
21
+ ...props
22
+ });
23
+ }
24
+ function FrameTitle({ className, ...props }) {
25
+ return /*#__PURE__*/ jsx("div", {
26
+ className: cn("font-semibold text-sm", className),
27
+ "data-slot": "frame-panel-title",
28
+ ...props
29
+ });
30
+ }
31
+ function FrameDescription({ className, ...props }) {
32
+ return /*#__PURE__*/ jsx("div", {
33
+ className: cn("text-muted-foreground text-sm", className),
34
+ "data-slot": "frame-panel-description",
35
+ ...props
36
+ });
37
+ }
38
+ function FrameFooter({ className, ...props }) {
39
+ return /*#__PURE__*/ jsx("footer", {
40
+ className: cn("flex flex-col gap-1 px-5 py-4", className),
41
+ "data-slot": "frame-panel-footer",
42
+ ...props
43
+ });
44
+ }
45
+ export { Frame, FrameDescription, FrameFooter, FrameHeader, FramePanel, FrameTitle };
package/dist/group.js ADDED
@@ -0,0 +1,48 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { mergeProps } from "@base-ui-components/react/merge-props";
3
+ import { useRender } from "@base-ui-components/react/use-render";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils";
6
+ import { Separator } from "./separator.js";
7
+ const groupVariants = cva("flex w-fit *:focus-visible:z-10 has-[>[data-slot=group]]:gap-2 *:has-focus-visible:z-10", {
8
+ defaultVariants: {
9
+ orientation: "horizontal"
10
+ },
11
+ variants: {
12
+ orientation: {
13
+ horizontal: "*:not-first:before:-start-[0.5px] *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:before:-end-[0.5px] *:not-first:rounded-s-none *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:rounded-e-none *:not-first:border-s-0 *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:border-e-0 *:not-first:before:rounded-s-none *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:before:rounded-e-none *:pointer-coarse:after:min-w-auto",
14
+ vertical: "*:not-first:before:-top-[0.5px] *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:before:-bottom-[0.5px] flex-col *:not-first:rounded-t-none *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:rounded-b-none *:not-first:border-t-0 *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:border-b-0 *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:before:hidden *:not-first:before:rounded-t-none *:not-[&:nth-last-child(1_of_:not([aria-hidden],span[data-base-ui-inert]))]:before:rounded-b-none *:pointer-coarse:after:min-h-auto dark:*:last:before:hidden dark:*:first:before:block"
15
+ }
16
+ }
17
+ });
18
+ function Group({ className, orientation, children, ...props }) {
19
+ return /*#__PURE__*/ jsx("div", {
20
+ className: cn(groupVariants({
21
+ orientation
22
+ }), className),
23
+ "data-orientation": orientation,
24
+ "data-slot": "group",
25
+ role: "group",
26
+ ...props,
27
+ children: children
28
+ });
29
+ }
30
+ function GroupText({ className, render, ...props }) {
31
+ const defaultProps = {
32
+ className: cn("relative inline-flex items-center whitespace-nowrap rounded-lg border border-border bg-muted bg-clip-padding px-[calc(--spacing(3)-1px)] font-medium text-sm shadow-xs outline-none transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/64 dark:before:shadow-[0_-1px_--theme(--color-white/8%)] [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0", className),
33
+ "data-slot": "group-text"
34
+ };
35
+ return useRender({
36
+ defaultTagName: "div",
37
+ props: mergeProps(defaultProps, props),
38
+ render
39
+ });
40
+ }
41
+ function GroupSeparator({ className, orientation = "vertical", ...props }) {
42
+ return /*#__PURE__*/ jsx(Separator, {
43
+ className: cn("[[data-slot=input-control]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&]:-translate-x-px relative z-20 has-[+[data-slot=input-control]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:translate-x-px has-[+[data-slot=input-control]:focus-within,+[data-slot=select-trigger]:focus-visible+*,+[data-slot=number-field]:focus-within]:bg-ring [[data-slot=input-control]:focus-within+&,[data-slot=select-trigger]:focus-visible+*+&,[data-slot=number-field]:focus-within+&]:bg-ring", className),
44
+ orientation: orientation,
45
+ ...props
46
+ });
47
+ }
48
+ export { Group as ButtonGroup, GroupSeparator as ButtonGroupSeparator, GroupText as ButtonGroupText, Group, GroupSeparator, GroupText, groupVariants };