@alexgorbatchev/shadcn 0.0.0-stage → 0.0.12
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/LICENSE +21 -0
- package/README.md +349 -2
- package/THIRD_PARTY_NOTICES.md +105 -0
- package/dist/chunk-1j2hz3w9.js +16 -0
- package/dist/chunk-5wvvqege.js +259 -0
- package/dist/chunk-8a7dn9ps.js +93 -0
- package/dist/chunk-cp2m7y7v.js +26 -0
- package/dist/chunk-jpvw9xqy.js +4 -0
- package/dist/chunk-rajgnfbr.js +24 -0
- package/dist/chunk-rjjwytbx.js +12 -0
- package/dist/chunk-tnktkgvp.js +63 -0
- package/dist/chunk-z1fy613d.js +64 -0
- package/dist/components/Accordion.d.ts +12 -0
- package/dist/components/Alert.d.ts +15 -0
- package/dist/components/AlertDialog.d.ts +28 -0
- package/dist/components/AspectRatio.d.ts +5 -0
- package/dist/components/Attachment.d.ts +36 -0
- package/dist/components/Avatar.d.ts +19 -0
- package/dist/components/Badge.d.ts +15 -0
- package/dist/components/Breadcrumb.d.ts +18 -0
- package/dist/components/Bubble.d.ts +25 -0
- package/dist/components/Button.d.ts +13 -0
- package/dist/components/ButtonGroup.d.ts +14 -0
- package/dist/components/Card.d.ts +19 -0
- package/dist/components/Checkbox.d.ts +6 -0
- package/dist/components/Collapsible.d.ts +6 -0
- package/dist/components/Combobox.d.ts +39 -0
- package/dist/components/ConfirmationDialog.d.ts +11 -0
- package/dist/components/ContextMenu.d.ts +24 -0
- package/dist/components/DensityProvider.d.ts +7 -0
- package/dist/components/Dialog.d.ts +25 -0
- package/dist/components/DirectionProvider.d.ts +1 -0
- package/dist/components/DragDropPreview.d.ts +7 -0
- package/dist/components/DragDropProvider.d.ts +6 -0
- package/dist/components/DragSource.d.ts +10 -0
- package/dist/components/Drawer.d.ts +25 -0
- package/dist/components/DropTarget.d.ts +11 -0
- package/dist/components/DropdownMenu.d.ts +26 -0
- package/dist/components/Empty.d.ts +19 -0
- package/dist/components/EmptyState.d.ts +8 -0
- package/dist/components/Field.d.ts +36 -0
- package/dist/components/HoverCard.d.ts +8 -0
- package/dist/components/ImagePicker.d.ts +11 -0
- package/dist/components/InlineEdit.d.ts +14 -0
- package/dist/components/Input.d.ts +6 -0
- package/dist/components/InputGroup.d.ts +26 -0
- package/dist/components/Item.d.ts +32 -0
- package/dist/components/JsonViewer.d.ts +8 -0
- package/dist/components/Kbd.d.ts +7 -0
- package/dist/components/Label.d.ts +5 -0
- package/dist/components/Marker.d.ts +19 -0
- package/dist/components/Menubar.d.ts +29 -0
- package/dist/components/Message.d.ts +17 -0
- package/dist/components/NativeSelect.d.ts +11 -0
- package/dist/components/NavigationMenu.d.ts +21 -0
- package/dist/components/Pagination.d.ts +21 -0
- package/dist/components/Popover.d.ts +14 -0
- package/dist/components/Progress.d.ts +14 -0
- package/dist/components/RadioGroup.d.ts +9 -0
- package/dist/components/ScrollArea.d.ts +10 -0
- package/dist/components/Select.d.ts +25 -0
- package/dist/components/Separator.d.ts +8 -0
- package/dist/components/Sheet.d.ts +20 -0
- package/dist/components/Sidebar.d.ts +60 -0
- package/dist/components/Skeleton.d.ts +5 -0
- package/dist/components/Slider.d.ts +6 -0
- package/dist/components/Spinner.d.ts +5 -0
- package/dist/components/StarRating.d.ts +10 -0
- package/dist/components/Switch.d.ts +8 -0
- package/dist/components/Table.d.ts +28 -0
- package/dist/components/Tabs.d.ts +16 -0
- package/dist/components/Textarea.d.ts +5 -0
- package/dist/components/ThemeProvider.d.ts +9 -0
- package/dist/components/Toast.d.ts +18 -0
- package/dist/components/Toggle.d.ts +11 -0
- package/dist/components/ToggleGroup.d.ts +12 -0
- package/dist/components/Tooltip.d.ts +9 -0
- package/dist/components/calendar/Calendar.d.ts +6 -0
- package/dist/components/calendar/getCalendarClassNames.d.ts +3 -0
- package/dist/components/calendar/index.d.ts +1 -0
- package/dist/components/calendar/index.js +10 -0
- package/dist/components/calendar/types.d.ts +9 -0
- package/dist/components/carousel/Carousel.d.ts +9 -0
- package/dist/components/carousel/CarouselContext.d.ts +2 -0
- package/dist/components/carousel/hooks/useCarousel.d.ts +2 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +207 -0
- package/dist/components/carousel/types.d.ts +23 -0
- package/dist/components/chart/Chart.d.ts +10 -0
- package/dist/components/chart/ChartContext.d.ts +2 -0
- package/dist/components/chart/ChartStyle.d.ts +3 -0
- package/dist/components/chart/getPayloadConfigFromPayload.d.ts +2 -0
- package/dist/components/chart/hooks/useChart.d.ts +2 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.js +284 -0
- package/dist/components/chart/types.d.ts +50 -0
- package/dist/components/command/Command.d.ts +21 -0
- package/dist/components/command/index.d.ts +1 -0
- package/dist/components/command/index.js +142 -0
- package/dist/components/input-otp/InputOTP.d.ts +12 -0
- package/dist/components/input-otp/index.d.ts +1 -0
- package/dist/components/input-otp/index.js +303 -0
- package/dist/components/message-scroller/MessageScroller.d.ts +16 -0
- package/dist/components/message-scroller/hooks/useMessageScroller.d.ts +1 -0
- package/dist/components/message-scroller/hooks/useMessageScrollerScrollable.d.ts +1 -0
- package/dist/components/message-scroller/hooks/useMessageScrollerVisibility.d.ts +1 -0
- package/dist/components/message-scroller/index.d.ts +5 -0
- package/dist/components/message-scroller/index.js +600 -0
- package/dist/components/persian-calendar/PersianCalendar.d.ts +6 -0
- package/dist/components/persian-calendar/index.d.ts +1 -0
- package/dist/components/persian-calendar/index.js +36 -0
- package/dist/components/questionnaire/Questionnaire.d.ts +20 -0
- package/dist/components/questionnaire/index.d.ts +2 -0
- package/dist/components/questionnaire/index.js +747 -0
- package/dist/components/resizable/Resizable.d.ts +10 -0
- package/dist/components/resizable/SplitView.d.ts +12 -0
- package/dist/components/resizable/index.d.ts +2 -0
- package/dist/components/resizable/index.js +147 -0
- package/dist/components/sonner/Sonner.d.ts +7 -0
- package/dist/components/sonner/hooks/useSonner.d.ts +1 -0
- package/dist/components/sonner/index.d.ts +2 -0
- package/dist/components/sonner/index.js +1273 -0
- package/dist/density/DensityContext.d.ts +2 -0
- package/dist/density/types.d.ts +4 -0
- package/dist/drag-drop/DragDropContext.d.ts +2 -0
- package/dist/drag-drop/types.d.ts +45 -0
- package/dist/drawer/DrawerContext.d.ts +2 -0
- package/dist/drawer/types.d.ts +7 -0
- package/dist/fonts.css +1 -0
- package/dist/hooks/useComboboxAnchor.d.ts +2 -0
- package/dist/hooks/useDensity.d.ts +2 -0
- package/dist/hooks/useDragDrop.d.ts +2 -0
- package/dist/hooks/useDragSource.d.ts +2 -0
- package/dist/hooks/useDrawer.d.ts +2 -0
- package/dist/hooks/useDropTarget.d.ts +2 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -0
- package/dist/hooks/useObjectURL.d.ts +1 -0
- package/dist/hooks/useSidebar.d.ts +2 -0
- package/dist/hooks/useTheme.d.ts +2 -0
- package/dist/hooks/useToastManager.d.ts +2 -0
- package/dist/index.d.ts +82 -0
- package/dist/index.js +4908 -0
- package/dist/menu/types.d.ts +14 -0
- package/dist/message/MessageContext.d.ts +2 -0
- package/dist/message/types.d.ts +7 -0
- package/dist/sidebar/SidebarContext.d.ts +2 -0
- package/dist/sidebar/types.d.ts +32 -0
- package/dist/theme/ThemeContext.d.ts +2 -0
- package/dist/theme/types.d.ts +8 -0
- package/dist/theme.css +454 -0
- package/dist/toggle-group/ToggleGroupContext.d.ts +2 -0
- package/dist/toggle-group/types.d.ts +5 -0
- package/dist/typeset.css +444 -0
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +193 -4
- package/patches/@shadcn%2Freact@0.3.1.patch +35 -0
- package/patches/input-otp@1.5.0.patch +20 -0
- package/patches/sonner@2.0.8.patch +87 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn2
|
|
3
|
+
} from "./chunk-cp2m7y7v.js";
|
|
4
|
+
import {
|
|
5
|
+
useDensity
|
|
6
|
+
} from "./chunk-rjjwytbx.js";
|
|
7
|
+
import {
|
|
8
|
+
Button2
|
|
9
|
+
} from "./chunk-tnktkgvp.js";
|
|
10
|
+
|
|
11
|
+
// src/components/Input.tsx
|
|
12
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
function Input2({ density, className, type, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(InputPrimitive, {
|
|
16
|
+
type,
|
|
17
|
+
"data-density": density,
|
|
18
|
+
"data-slot": "input",
|
|
19
|
+
className: (state) => cn2("h-control w-full min-w-0 rounded-sm border border-input bg-secondary px-control-x py-1 text-base transition-colors outline-none file:inline-flex file:h-control-xs file:border-0 file:bg-secondary file:text-sm file:font-medium file:text-foreground placeholder:text-faint-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive", typeof className === "function" ? className(state) : className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// src/components/Dialog.tsx
|
|
25
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
26
|
+
import { useDirection } from "@base-ui/react/direction-provider";
|
|
27
|
+
import { XIcon } from "lucide-react";
|
|
28
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
29
|
+
function Dialog2({ ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Root, {
|
|
31
|
+
"data-slot": "dialog",
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function DialogTrigger2({ ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Trigger, {
|
|
37
|
+
"data-slot": "dialog-trigger",
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function DialogPortal2({ ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Portal, {
|
|
43
|
+
"data-slot": "dialog-portal",
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function DialogClose2({ ...props }) {
|
|
48
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Close, {
|
|
49
|
+
"data-slot": "dialog-close",
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function DialogOverlay2({ density, className, ...props }) {
|
|
54
|
+
const resolvedDensity = useDensity(density);
|
|
55
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Backdrop, {
|
|
56
|
+
"data-density": resolvedDensity,
|
|
57
|
+
"data-slot": "dialog-overlay",
|
|
58
|
+
className: (state) => cn2("fixed inset-0 isolate bg-backdrop duration-120 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none", typeof className === "function" ? className(state) : className),
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function DialogContent2({
|
|
63
|
+
density,
|
|
64
|
+
className,
|
|
65
|
+
children,
|
|
66
|
+
showCloseButton = true,
|
|
67
|
+
size = "default",
|
|
68
|
+
...props
|
|
69
|
+
}) {
|
|
70
|
+
const resolvedDensity = useDensity(density);
|
|
71
|
+
const direction = useDirection();
|
|
72
|
+
return /* @__PURE__ */ jsxs(DialogPortal2, {
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsx2(DialogOverlay2, {}),
|
|
75
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Popup, {
|
|
76
|
+
dir: direction,
|
|
77
|
+
"data-density": resolvedDensity,
|
|
78
|
+
"data-slot": "dialog-content",
|
|
79
|
+
className: (state) => cn2("fixed top-1/2 left-1/2 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-panel rounded-md bg-popover p-panel text-sm text-popover-foreground border border-frame-edge shadow-frame duration-120 outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none", size === "wide" ? "sm:max-w-xl" : size === "narrow" ? "sm:max-w-48" : "sm:max-w-sm", typeof className === "function" ? className(state) : className),
|
|
80
|
+
...props,
|
|
81
|
+
children: [
|
|
82
|
+
children,
|
|
83
|
+
showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
|
|
84
|
+
"data-slot": "dialog-close",
|
|
85
|
+
render: /* @__PURE__ */ jsx2(Button2, {
|
|
86
|
+
variant: "ghost",
|
|
87
|
+
className: "absolute top-2 end-2",
|
|
88
|
+
size: "icon-sm"
|
|
89
|
+
}),
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx2(XIcon, {}),
|
|
92
|
+
/* @__PURE__ */ jsx2("span", {
|
|
93
|
+
className: "sr-only",
|
|
94
|
+
children: "Close"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function DialogHeader2({ density, className, ...props }) {
|
|
104
|
+
return /* @__PURE__ */ jsx2("div", {
|
|
105
|
+
"data-density": density,
|
|
106
|
+
"data-slot": "dialog-header",
|
|
107
|
+
className: cn2("flex flex-col gap-2", className),
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function DialogFooter2({
|
|
112
|
+
density,
|
|
113
|
+
className,
|
|
114
|
+
showCloseButton = false,
|
|
115
|
+
children,
|
|
116
|
+
...props
|
|
117
|
+
}) {
|
|
118
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
119
|
+
"data-density": density,
|
|
120
|
+
"data-slot": "dialog-footer",
|
|
121
|
+
className: cn2("-mx-panel -mb-panel flex flex-col-reverse gap-2 rounded-b-md border-t bg-muted/50 p-panel sm:flex-row sm:justify-end", className),
|
|
122
|
+
...props,
|
|
123
|
+
children: [
|
|
124
|
+
children,
|
|
125
|
+
showCloseButton && /* @__PURE__ */ jsx2(DialogPrimitive.Close, {
|
|
126
|
+
render: /* @__PURE__ */ jsx2(Button2, {
|
|
127
|
+
variant: "outline"
|
|
128
|
+
}),
|
|
129
|
+
children: "Close"
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function DialogTitle2({ density, className, ...props }) {
|
|
135
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Title, {
|
|
136
|
+
"data-density": density,
|
|
137
|
+
"data-slot": "dialog-title",
|
|
138
|
+
className: (state) => cn2("text-base leading-none font-medium", typeof className === "function" ? className(state) : className),
|
|
139
|
+
...props
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function DialogDescription2({ density, className, ...props }) {
|
|
143
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Description, {
|
|
144
|
+
"data-density": density,
|
|
145
|
+
"data-slot": "dialog-description",
|
|
146
|
+
className: (state) => cn2("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", typeof className === "function" ? className(state) : className),
|
|
147
|
+
...props
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// src/components/Textarea.tsx
|
|
152
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
153
|
+
function Textarea2({ density, className, ...props }) {
|
|
154
|
+
return /* @__PURE__ */ jsx3("textarea", {
|
|
155
|
+
"data-density": density,
|
|
156
|
+
"data-slot": "textarea",
|
|
157
|
+
className: cn2("flex field-sizing-content min-h-16 w-full rounded-sm border border-input bg-secondary px-control-x py-2 text-base transition-colors outline-none placeholder:text-faint-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive", className),
|
|
158
|
+
...props
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// src/components/InputGroup.tsx
|
|
163
|
+
import { cva } from "class-variance-authority";
|
|
164
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
165
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
166
|
+
function InputGroup2({ density, className, ...props }) {
|
|
167
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
168
|
+
"data-density": density,
|
|
169
|
+
"data-slot": "input-group",
|
|
170
|
+
role: "group",
|
|
171
|
+
className: cn2("group/input-group relative flex h-control w-full min-w-0 items-center rounded-sm border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-muted has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5", className),
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
var inputGroupAddonVariants = cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none [&>kbd]:rounded-sm [&>svg:not([class*='size-'])]:size-4", {
|
|
176
|
+
variants: {
|
|
177
|
+
align: {
|
|
178
|
+
"inline-start": "order-first ps-2 has-[>button]:ms-[-0.3rem] has-[>kbd]:ms-[-0.15rem]",
|
|
179
|
+
"inline-end": "order-last pe-2 has-[>button]:me-[-0.3rem] has-[>kbd]:me-[-0.15rem]",
|
|
180
|
+
"block-start": "order-first w-full justify-start px-control-x pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
181
|
+
"block-end": "order-last w-full justify-start px-control-x pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
defaultVariants: {
|
|
185
|
+
align: "inline-start"
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
function InputGroupAddon2({ density, className, align = "inline-start", ...props }) {
|
|
189
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
190
|
+
role: "group",
|
|
191
|
+
"data-density": density,
|
|
192
|
+
"data-slot": "input-group-addon",
|
|
193
|
+
"data-align": align,
|
|
194
|
+
className: cn2(inputGroupAddonVariants({ align }), className),
|
|
195
|
+
...mergeProps({
|
|
196
|
+
onClick(event) {
|
|
197
|
+
if (event.defaultPrevented || !(event.target instanceof Node) || !event.currentTarget.contains(event.target) || event.target instanceof Element && event.target.closest("button, a[href], input, textarea, select")) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
event.currentTarget.parentElement?.querySelector("input[data-slot=input-group-control], textarea[data-slot=input-group-control]")?.focus();
|
|
201
|
+
}
|
|
202
|
+
}, props)
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
206
|
+
variants: {
|
|
207
|
+
size: {
|
|
208
|
+
xs: "h-control-xs gap-1 rounded-sm px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
209
|
+
sm: "h-control-sm",
|
|
210
|
+
"icon-xs": "size-control-xs rounded-sm p-0 has-[>svg]:p-0",
|
|
211
|
+
"icon-sm": "size-control-sm p-0 has-[>svg]:p-0"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
defaultVariants: {
|
|
215
|
+
size: "xs"
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
function InputGroupButton2({
|
|
219
|
+
density,
|
|
220
|
+
className,
|
|
221
|
+
type = "button",
|
|
222
|
+
variant = "ghost",
|
|
223
|
+
size = "xs",
|
|
224
|
+
...props
|
|
225
|
+
}) {
|
|
226
|
+
return /* @__PURE__ */ jsx4(Button2, {
|
|
227
|
+
density,
|
|
228
|
+
type,
|
|
229
|
+
"data-size": size,
|
|
230
|
+
variant,
|
|
231
|
+
className: (state) => cn2(inputGroupButtonVariants({ size }), typeof className === "function" ? className(state) : className),
|
|
232
|
+
...props
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function InputGroupText2({ density, className, ...props }) {
|
|
236
|
+
return /* @__PURE__ */ jsx4("span", {
|
|
237
|
+
"data-density": density,
|
|
238
|
+
className: cn2("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
239
|
+
...props
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
function InputGroupInput2({ density, className, ...props }) {
|
|
243
|
+
return /* @__PURE__ */ jsx4(Input2, {
|
|
244
|
+
density,
|
|
245
|
+
"data-slot": "input-group-control",
|
|
246
|
+
className: (state) => cn2("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0", typeof className === "function" ? className(state) : className),
|
|
247
|
+
...props
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
function InputGroupTextarea2({ density, className, ...props }) {
|
|
251
|
+
return /* @__PURE__ */ jsx4(Textarea2, {
|
|
252
|
+
density,
|
|
253
|
+
"data-slot": "input-group-control",
|
|
254
|
+
className: cn2("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0", className),
|
|
255
|
+
...props
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export { Input2, Dialog2, DialogTrigger2, DialogPortal2, DialogClose2, DialogOverlay2, DialogContent2, DialogHeader2, DialogFooter2, DialogTitle2, DialogDescription2, Textarea2, InputGroup2, InputGroupAddon2, InputGroupButton2, InputGroupText2, InputGroupInput2, InputGroupTextarea2 };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn2
|
|
3
|
+
} from "./chunk-cp2m7y7v.js";
|
|
4
|
+
import {
|
|
5
|
+
buttonVariants2
|
|
6
|
+
} from "./chunk-tnktkgvp.js";
|
|
7
|
+
|
|
8
|
+
// src/components/calendar/getCalendarClassNames.ts
|
|
9
|
+
import { getDefaultClassNames } from "@daypicker/react";
|
|
10
|
+
function getCalendarClassNames({
|
|
11
|
+
buttonVariant = "ghost",
|
|
12
|
+
classNames
|
|
13
|
+
}) {
|
|
14
|
+
const defaultClassNames = getDefaultClassNames();
|
|
15
|
+
return {
|
|
16
|
+
root: cn2("w-fit", defaultClassNames.root),
|
|
17
|
+
months: cn2("relative flex flex-col gap-panel md:flex-row", defaultClassNames.months),
|
|
18
|
+
month: cn2("flex flex-col gap-control-gap", defaultClassNames.month),
|
|
19
|
+
nav: cn2("absolute inset-x-0 top-0 flex items-center justify-between", defaultClassNames.nav),
|
|
20
|
+
button_previous: cn2(buttonVariants2({ variant: buttonVariant, size: "icon" }), "size-(--cell-size) p-0 rtl:[&>svg]:rotate-180", defaultClassNames.button_previous),
|
|
21
|
+
button_next: cn2(buttonVariants2({ variant: buttonVariant, size: "icon" }), "size-(--cell-size) p-0 rtl:[&>svg]:rotate-180", defaultClassNames.button_next),
|
|
22
|
+
chevron: cn2("size-4 fill-current text-muted-foreground", defaultClassNames.chevron),
|
|
23
|
+
month_caption: cn2("flex h-(--cell-size) items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
24
|
+
dropdowns: cn2("flex h-(--cell-size) items-center justify-center gap-control-gap text-sm font-medium", defaultClassNames.dropdowns),
|
|
25
|
+
dropdown_root: cn2("relative focus-within:ring-1 focus-within:ring-ring", defaultClassNames.dropdown_root),
|
|
26
|
+
dropdown: cn2("absolute inset-0 w-full cursor-pointer bg-popover opacity-0", defaultClassNames.dropdown),
|
|
27
|
+
caption_label: cn2("flex items-center gap-1 text-sm font-medium select-none", defaultClassNames.caption_label),
|
|
28
|
+
month_grid: cn2("w-full border-collapse", defaultClassNames.month_grid),
|
|
29
|
+
weekdays: cn2("flex", defaultClassNames.weekdays),
|
|
30
|
+
weekday: cn2("w-(--cell-size) text-xs font-normal text-muted-foreground", defaultClassNames.weekday),
|
|
31
|
+
week: cn2("mt-1 flex w-full", defaultClassNames.week),
|
|
32
|
+
week_number_header: cn2("w-(--cell-size)", defaultClassNames.week_number_header),
|
|
33
|
+
week_number: cn2("flex w-(--cell-size) items-center justify-center text-xs text-muted-foreground", defaultClassNames.week_number),
|
|
34
|
+
day: cn2("group/day relative size-(--cell-size) p-0 text-center", defaultClassNames.day),
|
|
35
|
+
range_start: cn2("bg-muted", defaultClassNames.range_start),
|
|
36
|
+
range_middle: cn2("bg-muted", defaultClassNames.range_middle),
|
|
37
|
+
range_end: cn2("bg-muted", defaultClassNames.range_end),
|
|
38
|
+
today: cn2("bg-muted text-foreground", defaultClassNames.today),
|
|
39
|
+
outside: cn2("text-muted-foreground", defaultClassNames.outside),
|
|
40
|
+
disabled: cn2("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
41
|
+
hidden: cn2("invisible", defaultClassNames.hidden),
|
|
42
|
+
...classNames
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/components/calendar/Calendar.tsx
|
|
47
|
+
import { DayButton, DayPicker } from "@daypicker/react";
|
|
48
|
+
import { jsx } from "react/jsx-runtime";
|
|
49
|
+
function Calendar2({
|
|
50
|
+
density,
|
|
51
|
+
className,
|
|
52
|
+
classNames,
|
|
53
|
+
showOutsideDays = true,
|
|
54
|
+
captionLayout = "label",
|
|
55
|
+
buttonVariant = "ghost",
|
|
56
|
+
locale,
|
|
57
|
+
formatters,
|
|
58
|
+
components,
|
|
59
|
+
...props
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsx(DayPicker, {
|
|
62
|
+
"data-density": density,
|
|
63
|
+
"data-slot": "calendar",
|
|
64
|
+
showOutsideDays,
|
|
65
|
+
captionLayout,
|
|
66
|
+
locale,
|
|
67
|
+
className: cn2("group/calendar bg-background p-panel [--cell-size:var(--ag-control-h)]", className),
|
|
68
|
+
formatters: {
|
|
69
|
+
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
70
|
+
...formatters
|
|
71
|
+
},
|
|
72
|
+
classNames: getCalendarClassNames({ buttonVariant, classNames }),
|
|
73
|
+
components: {
|
|
74
|
+
DayButton: CalendarDayButton2,
|
|
75
|
+
...components
|
|
76
|
+
},
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function CalendarDayButton2({ className, day, modifiers, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx(DayButton, {
|
|
82
|
+
day,
|
|
83
|
+
modifiers,
|
|
84
|
+
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
85
|
+
"data-range-start": modifiers.range_start,
|
|
86
|
+
"data-range-end": modifiers.range_end,
|
|
87
|
+
"data-range-middle": modifiers.range_middle,
|
|
88
|
+
className: cn2(buttonVariants2({ variant: "ghost", size: "icon" }), "relative size-(--cell-size) border-0 p-0 font-normal data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { getCalendarClassNames, Calendar2, CalendarDayButton2 };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/utils/cn.ts
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
+
var mergeClasses = extendTailwindMerge({
|
|
5
|
+
extend: {
|
|
6
|
+
theme: {
|
|
7
|
+
spacing: [
|
|
8
|
+
"control",
|
|
9
|
+
"control-xs",
|
|
10
|
+
"control-sm",
|
|
11
|
+
"control-lg",
|
|
12
|
+
"control-x",
|
|
13
|
+
"control-gap",
|
|
14
|
+
"tag",
|
|
15
|
+
"tag-x",
|
|
16
|
+
"panel",
|
|
17
|
+
"field-gap"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
function cn2(...inputs) {
|
|
23
|
+
return mergeClasses(clsx(inputs));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { cn2 };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn2
|
|
3
|
+
} from "./chunk-cp2m7y7v.js";
|
|
4
|
+
|
|
5
|
+
// src/components/Separator.tsx
|
|
6
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function Separator2({
|
|
9
|
+
density,
|
|
10
|
+
className,
|
|
11
|
+
thickness = "default",
|
|
12
|
+
orientation = "horizontal",
|
|
13
|
+
...props
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsx(SeparatorPrimitive, {
|
|
16
|
+
"data-density": density,
|
|
17
|
+
"data-slot": "separator",
|
|
18
|
+
orientation,
|
|
19
|
+
className: (state) => cn2("shrink-0 bg-border data-[orientation=horizontal]:w-full data-[orientation=vertical]:self-stretch", thickness === "strong" ? "data-[orientation=horizontal]:h-0.5 data-[orientation=vertical]:w-0.5" : "data-[orientation=horizontal]:h-px data-[orientation=vertical]:w-px", typeof className === "function" ? className(state) : className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { Separator2 };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/density/DensityContext.ts
|
|
2
|
+
import { createContext } from "react";
|
|
3
|
+
var DensityContext = createContext("comfortable");
|
|
4
|
+
|
|
5
|
+
// src/hooks/useDensity.ts
|
|
6
|
+
import { useContext } from "react";
|
|
7
|
+
function useDensity(density) {
|
|
8
|
+
const inheritedDensity = useContext(DensityContext);
|
|
9
|
+
return density ?? inheritedDensity;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export { DensityContext, useDensity };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn2
|
|
3
|
+
} from "./chunk-cp2m7y7v.js";
|
|
4
|
+
|
|
5
|
+
// src/components/Button.tsx
|
|
6
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var buttonVariants2 = cva("group/button inline-flex shrink-0 items-center rounded-sm border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:border-dashed disabled:border-border disabled:bg-transparent disabled:text-faint-foreground disabled:font-normal aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
10
|
+
variants: {
|
|
11
|
+
truncate: { true: "max-w-full min-w-0" },
|
|
12
|
+
align: { start: "justify-start", center: "justify-center", end: "justify-end" },
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
15
|
+
outline: "border-input bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
16
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
17
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground ",
|
|
18
|
+
destructive: "border-destructive bg-transparent text-destructive hover:bg-destructive hover:text-destructive-foreground focus-visible:border-destructive/40 focus-visible:ring-destructive",
|
|
19
|
+
success: "bg-success text-success-foreground hover:bg-success/90",
|
|
20
|
+
warning: "bg-warning text-warning-foreground hover:bg-warning/90",
|
|
21
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
inline: "h-auto gap-1 border-0 p-0",
|
|
25
|
+
default: "h-control gap-control-gap px-control-x has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
26
|
+
xs: "h-control-xs gap-1 rounded-sm px-2 text-xs in-data-[slot=button-group]:rounded-sm has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
27
|
+
sm: "h-control-sm gap-1 rounded-sm px-control-x text-sm in-data-[slot=button-group]:rounded-sm has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
28
|
+
lg: "h-control-lg gap-control-gap px-control-x has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
29
|
+
icon: "size-control",
|
|
30
|
+
"icon-xs": "size-control-xs rounded-sm in-data-[slot=button-group]:rounded-sm [&_svg:not([class*='size-'])]:size-3",
|
|
31
|
+
"icon-sm": "size-control-sm rounded-sm in-data-[slot=button-group]:rounded-sm",
|
|
32
|
+
"icon-lg": "size-control-lg"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
align: "center",
|
|
37
|
+
variant: "default",
|
|
38
|
+
size: "default"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
function Button2({
|
|
42
|
+
density,
|
|
43
|
+
className,
|
|
44
|
+
variant = "default",
|
|
45
|
+
size = "default",
|
|
46
|
+
align = "center",
|
|
47
|
+
truncate = false,
|
|
48
|
+
children,
|
|
49
|
+
...props
|
|
50
|
+
}) {
|
|
51
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
52
|
+
"data-density": density,
|
|
53
|
+
"data-slot": "button",
|
|
54
|
+
className: (state) => cn2(buttonVariants2({ variant, size, align, truncate }), typeof className === "function" ? className(state) : className),
|
|
55
|
+
...props,
|
|
56
|
+
children: truncate ? /* @__PURE__ */ jsx("span", {
|
|
57
|
+
className: "min-w-0 truncate",
|
|
58
|
+
children
|
|
59
|
+
}) : children
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { buttonVariants2, Button2 };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// node_modules/@shadcn/react/dist/chunk-HBS6WEDP.js
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
function S({ defaultTagName: a, props: r, render: t, state: n = {}, stateAttributesMapping: e }) {
|
|
4
|
+
let o = d(R(n, e), r);
|
|
5
|
+
if (!t)
|
|
6
|
+
return i.createElement(a, o);
|
|
7
|
+
if (typeof t == "function")
|
|
8
|
+
return t(o, n);
|
|
9
|
+
if (!i.isValidElement(t))
|
|
10
|
+
return null;
|
|
11
|
+
let s = t.props, u = { ...d(o, s), ref: f(o.ref, s.ref) };
|
|
12
|
+
return i.cloneElement(t, u);
|
|
13
|
+
}
|
|
14
|
+
function d(...a) {
|
|
15
|
+
let r = {};
|
|
16
|
+
for (let t of a) {
|
|
17
|
+
if (!t)
|
|
18
|
+
continue;
|
|
19
|
+
let n = t;
|
|
20
|
+
for (let e of Object.keys(n)) {
|
|
21
|
+
let o = n[e];
|
|
22
|
+
if (o === undefined)
|
|
23
|
+
continue;
|
|
24
|
+
let s = r[e];
|
|
25
|
+
e === "className" ? r[e] = [s, o].filter(Boolean).join(" ") : e === "style" ? r[e] = { ...s, ...o } : e === "ref" ? r[e] = f(s, o) : l(e) && typeof s == "function" && typeof o == "function" ? r[e] = p(o, s) : r[e] = o;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
function R(a, r) {
|
|
31
|
+
let t = {};
|
|
32
|
+
for (let n of Object.keys(a)) {
|
|
33
|
+
let e = a[n], o = r?.[n]?.(e);
|
|
34
|
+
if (o) {
|
|
35
|
+
Object.assign(t, o);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (n === "slot") {
|
|
39
|
+
t["data-slot"] = e;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
let s = `data-${String(n).replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;
|
|
43
|
+
typeof e == "boolean" ? t[s] = e ? "" : undefined : e != null && (t[s] = String(e));
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
}
|
|
47
|
+
function p(a, r) {
|
|
48
|
+
return function(n) {
|
|
49
|
+
a(n), n.defaultPrevented || r(n);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function l(a) {
|
|
53
|
+
return /^on[A-Z]/.test(a);
|
|
54
|
+
}
|
|
55
|
+
function f(...a) {
|
|
56
|
+
let r = a.filter(Boolean);
|
|
57
|
+
if (r.length !== 0)
|
|
58
|
+
return (t) => {
|
|
59
|
+
for (let n of r)
|
|
60
|
+
typeof n == "function" ? n(t) : n && (n.current = t);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { S, d, f };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IDensityProps } from "../density/types.js";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
4
|
+
type AccordionProps = AccordionPrimitive.Root.Props & IDensityProps;
|
|
5
|
+
declare function Accordion({ density, className, ...props }: AccordionProps): ReactElement;
|
|
6
|
+
type AccordionItemProps = AccordionPrimitive.Item.Props & IDensityProps;
|
|
7
|
+
declare function AccordionItem({ density, className, ...props }: AccordionItemProps): ReactElement;
|
|
8
|
+
type AccordionTriggerProps = AccordionPrimitive.Trigger.Props & IDensityProps;
|
|
9
|
+
declare function AccordionTrigger({ density, className, children, ...props }: AccordionTriggerProps): ReactElement;
|
|
10
|
+
type AccordionContentProps = AccordionPrimitive.Panel.Props & IDensityProps;
|
|
11
|
+
declare function AccordionContent({ density, className, children, ...props }: AccordionContentProps): ReactElement;
|
|
12
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IDensityProps } from "../density/types.js";
|
|
2
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
3
|
+
import { type VariantProps } from "class-variance-authority";
|
|
4
|
+
declare const alertVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type AlertProps = ComponentProps<"div"> & VariantProps<typeof alertVariants> & IDensityProps;
|
|
8
|
+
declare function Alert({ density, className, variant, ...props }: AlertProps): ReactElement;
|
|
9
|
+
type AlertTitleProps = ComponentProps<"div"> & IDensityProps;
|
|
10
|
+
declare function AlertTitle({ density, className, ...props }: AlertTitleProps): ReactElement;
|
|
11
|
+
type AlertDescriptionProps = ComponentProps<"div"> & IDensityProps;
|
|
12
|
+
declare function AlertDescription({ density, className, ...props }: AlertDescriptionProps): ReactElement;
|
|
13
|
+
type AlertActionProps = ComponentProps<"div"> & IDensityProps;
|
|
14
|
+
declare function AlertAction({ density, className, ...props }: AlertActionProps): ReactElement;
|
|
15
|
+
export { Alert, AlertTitle, AlertDescription, AlertAction };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IDensityProps } from "../density/types.js";
|
|
2
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
3
|
+
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog";
|
|
4
|
+
import { Button } from "./Button.js";
|
|
5
|
+
declare function AlertDialog<Payload>({ ...props }: AlertDialogPrimitive.Root.Props<Payload>): ReactElement;
|
|
6
|
+
declare function AlertDialogTrigger<Payload>({ ...props }: AlertDialogPrimitive.Trigger.Props<Payload>): ReactElement;
|
|
7
|
+
declare function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props): ReactElement;
|
|
8
|
+
type AlertDialogOverlayProps = AlertDialogPrimitive.Backdrop.Props & IDensityProps;
|
|
9
|
+
declare function AlertDialogOverlay({ density, className, ...props }: AlertDialogOverlayProps): ReactElement;
|
|
10
|
+
type AlertDialogContentProps = AlertDialogPrimitive.Popup.Props & {
|
|
11
|
+
size?: "default" | "sm";
|
|
12
|
+
} & IDensityProps;
|
|
13
|
+
declare function AlertDialogContent({ density, className, size, ...props }: AlertDialogContentProps): ReactElement;
|
|
14
|
+
type AlertDialogHeaderProps = ComponentProps<"div"> & IDensityProps;
|
|
15
|
+
declare function AlertDialogHeader({ density, className, ...props }: AlertDialogHeaderProps): ReactElement;
|
|
16
|
+
type AlertDialogFooterProps = ComponentProps<"div"> & IDensityProps;
|
|
17
|
+
declare function AlertDialogFooter({ density, className, ...props }: AlertDialogFooterProps): ReactElement;
|
|
18
|
+
type AlertDialogMediaProps = ComponentProps<"div"> & IDensityProps;
|
|
19
|
+
declare function AlertDialogMedia({ density, className, ...props }: AlertDialogMediaProps): ReactElement;
|
|
20
|
+
type AlertDialogTitleProps = ComponentProps<typeof AlertDialogPrimitive.Title> & IDensityProps;
|
|
21
|
+
declare function AlertDialogTitle({ density, className, ...props }: AlertDialogTitleProps): ReactElement;
|
|
22
|
+
type AlertDialogDescriptionProps = ComponentProps<typeof AlertDialogPrimitive.Description> & IDensityProps;
|
|
23
|
+
declare function AlertDialogDescription({ density, className, ...props }: AlertDialogDescriptionProps): ReactElement;
|
|
24
|
+
type AlertDialogActionProps = ComponentProps<typeof Button> & IDensityProps;
|
|
25
|
+
declare function AlertDialogAction({ density, className, ...props }: AlertDialogActionProps): ReactElement;
|
|
26
|
+
type AlertDialogCancelProps = AlertDialogPrimitive.Close.Props & Pick<ComponentProps<typeof Button>, "variant" | "size"> & IDensityProps;
|
|
27
|
+
declare function AlertDialogCancel({ density, className, variant, size, ...props }: AlertDialogCancelProps): ReactElement;
|
|
28
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ComponentProps, ReactElement } from "react";
|
|
2
|
+
import type { Density, IDensityProps } from "../density/types.js";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
import { type VariantProps } from "class-variance-authority";
|
|
5
|
+
import { Button } from "./Button.js";
|
|
6
|
+
declare const attachmentVariants: (props?: ({
|
|
7
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
8
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
type AttachmentProps = ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & IDensityProps & {
|
|
11
|
+
state?: "idle" | "uploading" | "processing" | "error" | "done";
|
|
12
|
+
};
|
|
13
|
+
declare function Attachment({ density, className, state, size, orientation, ...props }: AttachmentProps): ReactElement;
|
|
14
|
+
declare const attachmentMediaVariants: (props?: ({
|
|
15
|
+
variant?: "icon" | "image" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
17
|
+
type AttachmentMediaProps = ComponentProps<"div"> & VariantProps<typeof attachmentMediaVariants> & IDensityProps;
|
|
18
|
+
declare function AttachmentMedia({ density, className, variant, ...props }: AttachmentMediaProps): ReactElement;
|
|
19
|
+
type AttachmentContentProps = ComponentProps<"div"> & IDensityProps;
|
|
20
|
+
declare function AttachmentContent({ density, className, ...props }: AttachmentContentProps): ReactElement;
|
|
21
|
+
type AttachmentTitleProps = ComponentProps<"span"> & IDensityProps;
|
|
22
|
+
declare function AttachmentTitle({ density, className, ...props }: AttachmentTitleProps): ReactElement;
|
|
23
|
+
type AttachmentDescriptionProps = ComponentProps<"span"> & IDensityProps;
|
|
24
|
+
declare function AttachmentDescription({ density, className, ...props }: AttachmentDescriptionProps): ReactElement;
|
|
25
|
+
type AttachmentActionsProps = ComponentProps<"div"> & IDensityProps;
|
|
26
|
+
declare function AttachmentActions({ density, className, ...props }: AttachmentActionsProps): ReactElement;
|
|
27
|
+
declare function AttachmentAction({ className, variant, size, ...props }: ComponentProps<typeof Button>): ReactElement;
|
|
28
|
+
type AttachmentTriggerState = {
|
|
29
|
+
slot: "attachment-trigger";
|
|
30
|
+
density?: Density;
|
|
31
|
+
};
|
|
32
|
+
type AttachmentTriggerProps = useRender.ComponentProps<"button", AttachmentTriggerState> & IDensityProps;
|
|
33
|
+
declare function AttachmentTrigger({ density, className, render, type, ...props }: AttachmentTriggerProps): ReactElement;
|
|
34
|
+
type AttachmentGroupProps = ComponentProps<"div"> & IDensityProps;
|
|
35
|
+
declare function AttachmentGroup({ density, className, ...props }: AttachmentGroupProps): ReactElement;
|
|
36
|
+
export { Attachment, AttachmentGroup, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentAction, AttachmentTrigger, };
|