@shadow-js/ui 0.0.0-stage → 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.
- package/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +598 -2
- package/dist/cli.mjs +2293 -0
- package/dist/dev/cli/schema.d.ts +73 -0
- package/dist/dev/index.d.ts +6 -0
- package/dist/dev/index.js +5 -0
- package/dist/dev/locales/ar.d.ts +141 -0
- package/dist/dev/locales/ar.js +128 -0
- package/dist/dev/locales/ar.js.map +1 -0
- package/dist/dev/locales/en.d.ts +141 -0
- package/dist/dev/locales/en.js +128 -0
- package/dist/dev/locales/en.js.map +1 -0
- package/dist/dev/registry/utils/utils.d.ts +29 -0
- package/dist/dev/registry/utils/utils.js +27 -0
- package/dist/dev/registry/utils/utils.js.map +1 -0
- package/dist/dev/theme/theme-logic.d.ts +187 -0
- package/dist/dev/theme/theme-logic.js +184 -0
- package/dist/dev/theme/theme-logic.js.map +1 -0
- package/dist/dev/theme/theme-provider.d.ts +90 -0
- package/dist/dev/theme/theme-provider.js +150 -0
- package/dist/dev/theme/theme-provider.js.map +1 -0
- package/dist/prod/index.js +1 -0
- package/dist/prod/locales/ar.js +2 -0
- package/dist/prod/locales/ar.js.map +1 -0
- package/dist/prod/locales/en.js +2 -0
- package/dist/prod/locales/en.js.map +1 -0
- package/dist/prod/registry/utils/utils.js +2 -0
- package/dist/prod/registry/utils/utils.js.map +1 -0
- package/dist/prod/theme/theme-logic.js +2 -0
- package/dist/prod/theme/theme-logic.js.map +1 -0
- package/dist/prod/theme/theme-provider.js +2 -0
- package/dist/prod/theme/theme-provider.js.map +1 -0
- package/package.json +102 -4
- package/registry/accordion/accordion.tsx +210 -0
- package/registry/accordion/item.json +4 -0
- package/registry/alert/alert.tsx +200 -0
- package/registry/alert/item.json +4 -0
- package/registry/alert-dialog/alert-dialog.tsx +530 -0
- package/registry/alert-dialog/item.json +4 -0
- package/registry/aspect-ratio/aspect-ratio.tsx +71 -0
- package/registry/aspect-ratio/item.json +4 -0
- package/registry/attachment/attachment.tsx +459 -0
- package/registry/attachment/item.json +4 -0
- package/registry/avatar/avatar.tsx +385 -0
- package/registry/avatar/item.json +4 -0
- package/registry/badge/badge.tsx +108 -0
- package/registry/badge/item.json +4 -0
- package/registry/breadcrumb/breadcrumb.tsx +354 -0
- package/registry/breadcrumb/item.json +4 -0
- package/registry/bubble/bubble.tsx +260 -0
- package/registry/bubble/item.json +4 -0
- package/registry/button/button.tsx +125 -0
- package/registry/button/item.json +4 -0
- package/registry/button-group/button-group.tsx +189 -0
- package/registry/button-group/item.json +4 -0
- package/registry/calendar/calendar.tsx +348 -0
- package/registry/calendar/item.json +4 -0
- package/registry/card/card.tsx +311 -0
- package/registry/card/item.json +4 -0
- package/registry/carousel/carousel.tsx +851 -0
- package/registry/carousel/item.json +4 -0
- package/registry/chart/chart.tsx +1956 -0
- package/registry/chart/item.json +4 -0
- package/registry/chart-scale/chart-scale.ts +670 -0
- package/registry/chart-scale/item.json +5 -0
- package/registry/checkbox/checkbox.tsx +79 -0
- package/registry/checkbox/item.json +4 -0
- package/registry/code-block/code-block.tsx +470 -0
- package/registry/code-block/item.json +4 -0
- package/registry/collapsible/collapsible.tsx +117 -0
- package/registry/collapsible/item.json +4 -0
- package/registry/combobox/combobox.tsx +977 -0
- package/registry/combobox/item.json +4 -0
- package/registry/command/command.tsx +757 -0
- package/registry/command/item.json +4 -0
- package/registry/context-menu/context-menu.tsx +697 -0
- package/registry/context-menu/item.json +4 -0
- package/registry/data-table/data-table.tsx +437 -0
- package/registry/data-table/item.json +4 -0
- package/registry/date-picker/date-picker.tsx +349 -0
- package/registry/date-picker/item.json +4 -0
- package/registry/dialog/dialog.tsx +412 -0
- package/registry/dialog/item.json +4 -0
- package/registry/direction/direction.tsx +88 -0
- package/registry/direction/item.json +4 -0
- package/registry/drawer/drawer.tsx +787 -0
- package/registry/drawer/item.json +4 -0
- package/registry/dropdown-menu/dropdown-menu.tsx +692 -0
- package/registry/dropdown-menu/item.json +4 -0
- package/registry/empty/empty.tsx +240 -0
- package/registry/empty/item.json +4 -0
- package/registry/field/field.tsx +624 -0
- package/registry/field/item.json +4 -0
- package/registry/form/form.tsx +1112 -0
- package/registry/form/item.json +4 -0
- package/registry/hover-card/hover-card.tsx +144 -0
- package/registry/hover-card/item.json +4 -0
- package/registry/icons/icons.tsx +1691 -0
- package/registry/icons/item.json +4 -0
- package/registry/input/input.tsx +43 -0
- package/registry/input/item.json +4 -0
- package/registry/input-group/input-group.tsx +315 -0
- package/registry/input-group/item.json +4 -0
- package/registry/input-otp/input-otp.tsx +329 -0
- package/registry/input-otp/item.json +4 -0
- package/registry/item/item.json +4 -0
- package/registry/item/item.tsx +439 -0
- package/registry/kbd/item.json +4 -0
- package/registry/kbd/kbd.tsx +65 -0
- package/registry/label/item.json +4 -0
- package/registry/label/label.tsx +60 -0
- package/registry/marker/item.json +4 -0
- package/registry/marker/marker.tsx +175 -0
- package/registry/menubar/item.json +4 -0
- package/registry/menubar/menubar.tsx +694 -0
- package/registry/message/item.json +4 -0
- package/registry/message/message.tsx +280 -0
- package/registry/message-scroller/item.json +4 -0
- package/registry/message-scroller/message-scroller.tsx +262 -0
- package/registry/native-select/item.json +4 -0
- package/registry/native-select/native-select.tsx +113 -0
- package/registry/navigation-menu/item.json +4 -0
- package/registry/navigation-menu/navigation-menu.tsx +362 -0
- package/registry/pagination/item.json +4 -0
- package/registry/pagination/pagination.tsx +460 -0
- package/registry/password-input/item.json +5 -0
- package/registry/password-input/password-input.tsx +494 -0
- package/registry/popover/item.json +4 -0
- package/registry/popover/popover.tsx +284 -0
- package/registry/progress/item.json +4 -0
- package/registry/progress/progress.tsx +190 -0
- package/registry/questionnaire/item.json +4 -0
- package/registry/questionnaire/questionnaire.tsx +569 -0
- package/registry/radio-group/item.json +4 -0
- package/registry/radio-group/radio-group.tsx +101 -0
- package/registry/resizable/item.json +4 -0
- package/registry/resizable/resizable.tsx +455 -0
- package/registry/scroll-area/item.json +4 -0
- package/registry/scroll-area/scroll-area.tsx +149 -0
- package/registry/select/item.json +4 -0
- package/registry/select/select.tsx +571 -0
- package/registry/separator/item.json +4 -0
- package/registry/separator/separator.tsx +52 -0
- package/registry/sheet/item.json +4 -0
- package/registry/sheet/sheet.tsx +476 -0
- package/registry/sidebar/item.json +4 -0
- package/registry/sidebar/sidebar.tsx +1870 -0
- package/registry/skeleton/item.json +4 -0
- package/registry/skeleton/skeleton.tsx +47 -0
- package/registry/slider/item.json +4 -0
- package/registry/slider/slider.tsx +149 -0
- package/registry/spinner/item.json +4 -0
- package/registry/spinner/spinner.tsx +51 -0
- package/registry/switch/item.json +4 -0
- package/registry/switch/switch.tsx +93 -0
- package/registry/table/item.json +4 -0
- package/registry/table/table.tsx +373 -0
- package/registry/tabs/item.json +4 -0
- package/registry/tabs/tabs.tsx +209 -0
- package/registry/textarea/item.json +4 -0
- package/registry/textarea/textarea.tsx +51 -0
- package/registry/toast/item.json +4 -0
- package/registry/toast/toast.tsx +949 -0
- package/registry/toggle/item.json +4 -0
- package/registry/toggle/toggle.tsx +110 -0
- package/registry/toggle-group/item.json +4 -0
- package/registry/toggle-group/toggle-group.tsx +189 -0
- package/registry/tooltip/item.json +4 -0
- package/registry/tooltip/tooltip.tsx +169 -0
- package/registry/trace/item.json +4 -0
- package/registry/trace/trace.tsx +356 -0
- package/registry/ui-strings/item.json +5 -0
- package/registry/ui-strings/ui-strings.tsx +454 -0
- package/registry/use-highlighted-code/item.json +5 -0
- package/registry/use-highlighted-code/use-highlighted-code.tsx +145 -0
- package/registry/use-mobile/item.json +5 -0
- package/registry/use-mobile/use-mobile.ts +46 -0
- package/registry/utils/item.json +5 -0
- package/registry/utils/utils.ts +38 -0
- package/registry.json +3274 -0
- package/styles/animations.css +321 -0
- package/styles/theme-core.css +55 -0
- package/styles/theme.css +12 -0
- package/styles/themes/gray.css +69 -0
- package/styles/themes/neutral.css +69 -0
- package/styles/themes/slate.css +69 -0
- package/styles/themes/stone.css +69 -0
- package/styles/themes/zinc.css +69 -0
- package/styles/typeset.css +251 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { splitProps } from "@shadow-js/core";
|
|
2
|
+
import type { ComponentProps, JSX } from "@shadow-js/web";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Props of {@link Card}: the `div` attributes, and `size` (`"default"` or `"sm"`).
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @see {@link Card}
|
|
9
|
+
*/
|
|
10
|
+
export type CardProps = ComponentProps<"div"> & {
|
|
11
|
+
/** `"sm"` tightens the gap, the vertical padding and the side padding of the parts. */
|
|
12
|
+
readonly size?: "default" | "sm" | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A surface that groups related content, with a border, rounded corners and a shadow. Compose it
|
|
17
|
+
* from {@link CardHeader} (with {@link CardTitle}, {@link CardDescription} and an optional
|
|
18
|
+
* {@link CardAction}), {@link CardContent} and {@link CardFooter}.
|
|
19
|
+
*
|
|
20
|
+
* Keyboard and ARIA: the card is a plain `div` with no role and no keys. When it is a region of its
|
|
21
|
+
* own, give it `role="region"` and an `aria-labelledby` that points at the {@link CardTitle}.
|
|
22
|
+
*
|
|
23
|
+
* Compared with shadcn/ui: `class` replaces `className`, and every part carries a `data-slot`.
|
|
24
|
+
*
|
|
25
|
+
* @param props - The card props: `size` (`"default"` or `"sm"`, which tightens the gap and padding),
|
|
26
|
+
* `children`, `class`, and the `div` attributes.
|
|
27
|
+
* @returns The card element.
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import {
|
|
31
|
+
* Card,
|
|
32
|
+
* CardContent,
|
|
33
|
+
* CardDescription,
|
|
34
|
+
* CardHeader,
|
|
35
|
+
* CardTitle,
|
|
36
|
+
* } from "@/components/ui/card";
|
|
37
|
+
*
|
|
38
|
+
* export function Notifications() {
|
|
39
|
+
* return (
|
|
40
|
+
* <Card>
|
|
41
|
+
* <CardHeader>
|
|
42
|
+
* <CardTitle>Notifications</CardTitle>
|
|
43
|
+
* <CardDescription>You have 3 unread messages.</CardDescription>
|
|
44
|
+
* </CardHeader>
|
|
45
|
+
* <CardContent>Your latest messages appear here.</CardContent>
|
|
46
|
+
* </Card>
|
|
47
|
+
* );
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
* @since 1.0.0
|
|
51
|
+
* @see {@link CardHeader}
|
|
52
|
+
* @see {@link CardContent}
|
|
53
|
+
* @see {@link CardFooter}
|
|
54
|
+
*/
|
|
55
|
+
function Card(props: CardProps): JSX.Element {
|
|
56
|
+
const [local, rest] = splitProps(props, ["class", "children", "size"]);
|
|
57
|
+
return (
|
|
58
|
+
<div
|
|
59
|
+
data-slot="card"
|
|
60
|
+
data-size={local.size ?? "default"}
|
|
61
|
+
class={cn(
|
|
62
|
+
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm [--card-padding-x:1.5rem] data-[size=sm]:gap-4 data-[size=sm]:py-4 data-[size=sm]:[--card-padding-x:1rem]",
|
|
63
|
+
local.class,
|
|
64
|
+
)}
|
|
65
|
+
{...rest}
|
|
66
|
+
>
|
|
67
|
+
{local.children}
|
|
68
|
+
</div>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The top of a card: the title and description, with an optional {@link CardAction} in the
|
|
74
|
+
* corner. When a card action is inside, the title takes the first column and the action the second.
|
|
75
|
+
*
|
|
76
|
+
* @param props - The header props: `children`, `class`, and the `div` attributes.
|
|
77
|
+
* @returns The header element.
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* import { Card, CardAction, CardHeader, CardTitle } from "@/components/ui/card";
|
|
81
|
+
* import { Button } from "@/components/ui/button";
|
|
82
|
+
*
|
|
83
|
+
* export function ProjectHeader() {
|
|
84
|
+
* return (
|
|
85
|
+
* <Card>
|
|
86
|
+
* <CardHeader>
|
|
87
|
+
* <CardTitle>Create project</CardTitle>
|
|
88
|
+
* <CardAction>
|
|
89
|
+
* <Button size="sm">Edit</Button>
|
|
90
|
+
* </CardAction>
|
|
91
|
+
* </CardHeader>
|
|
92
|
+
* </Card>
|
|
93
|
+
* );
|
|
94
|
+
* }
|
|
95
|
+
* ```
|
|
96
|
+
* @since 1.0.0
|
|
97
|
+
* @see {@link Card}
|
|
98
|
+
* @see {@link CardTitle}
|
|
99
|
+
*/
|
|
100
|
+
function CardHeader(props: ComponentProps<"div">): JSX.Element {
|
|
101
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
102
|
+
return (
|
|
103
|
+
<div
|
|
104
|
+
data-slot="card-header"
|
|
105
|
+
class={cn(
|
|
106
|
+
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-[var(--card-padding-x,1.5rem)] has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
107
|
+
local.class,
|
|
108
|
+
)}
|
|
109
|
+
{...rest}
|
|
110
|
+
>
|
|
111
|
+
{local.children}
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The title of a card: a semibold line. It renders a `div`, so it has no heading role. Pass
|
|
118
|
+
* `role="heading"` and `aria-level` when the title should be a heading in the page outline.
|
|
119
|
+
*
|
|
120
|
+
* @param props - The title props: `children`, `class`, and the `div` attributes.
|
|
121
|
+
* @returns The title element.
|
|
122
|
+
* @example
|
|
123
|
+
* ```tsx
|
|
124
|
+
* import { Card, CardHeader, CardTitle } from "@/components/ui/card";
|
|
125
|
+
*
|
|
126
|
+
* export function Titled() {
|
|
127
|
+
* return (
|
|
128
|
+
* <Card>
|
|
129
|
+
* <CardHeader>
|
|
130
|
+
* <CardTitle role="heading" aria-level={2}>
|
|
131
|
+
* Create project
|
|
132
|
+
* </CardTitle>
|
|
133
|
+
* </CardHeader>
|
|
134
|
+
* </Card>
|
|
135
|
+
* );
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
* @since 1.0.0
|
|
139
|
+
* @see {@link CardHeader}
|
|
140
|
+
* @see {@link CardDescription}
|
|
141
|
+
*/
|
|
142
|
+
function CardTitle(props: ComponentProps<"div">): JSX.Element {
|
|
143
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
144
|
+
return (
|
|
145
|
+
<div data-slot="card-title" class={cn("leading-none font-semibold", local.class)} {...rest}>
|
|
146
|
+
{local.children}
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The muted description under the title. It renders a `div` with the muted text color.
|
|
153
|
+
*
|
|
154
|
+
* @param props - The description props: `children`, `class`, and the `div` attributes.
|
|
155
|
+
* @returns The description element.
|
|
156
|
+
* @example
|
|
157
|
+
* ```tsx
|
|
158
|
+
* import {
|
|
159
|
+
* Card,
|
|
160
|
+
* CardDescription,
|
|
161
|
+
* CardHeader,
|
|
162
|
+
* CardTitle,
|
|
163
|
+
* } from "@/components/ui/card";
|
|
164
|
+
*
|
|
165
|
+
* export function DeployCard() {
|
|
166
|
+
* return (
|
|
167
|
+
* <Card>
|
|
168
|
+
* <CardHeader>
|
|
169
|
+
* <CardTitle>Deploy</CardTitle>
|
|
170
|
+
* <CardDescription>Deploy your new project in one click.</CardDescription>
|
|
171
|
+
* </CardHeader>
|
|
172
|
+
* </Card>
|
|
173
|
+
* );
|
|
174
|
+
* }
|
|
175
|
+
* ```
|
|
176
|
+
* @since 1.0.0
|
|
177
|
+
* @see {@link CardHeader}
|
|
178
|
+
* @see {@link CardTitle}
|
|
179
|
+
*/
|
|
180
|
+
function CardDescription(props: ComponentProps<"div">): JSX.Element {
|
|
181
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
182
|
+
return (
|
|
183
|
+
<div
|
|
184
|
+
data-slot="card-description"
|
|
185
|
+
class={cn("text-sm text-muted-foreground", local.class)}
|
|
186
|
+
{...rest}
|
|
187
|
+
>
|
|
188
|
+
{local.children}
|
|
189
|
+
</div>
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* An action, such as a button or a menu, placed at the end of the header beside the title. The
|
|
195
|
+
* {@link CardHeader} makes room for it when it is present.
|
|
196
|
+
*
|
|
197
|
+
* @param props - The action props: `children`, `class`, and the `div` attributes.
|
|
198
|
+
* @returns The action element.
|
|
199
|
+
* @example
|
|
200
|
+
* ```tsx
|
|
201
|
+
* import { Card, CardAction, CardHeader, CardTitle } from "@/components/ui/card";
|
|
202
|
+
* import { Button } from "@/components/ui/button";
|
|
203
|
+
*
|
|
204
|
+
* export function EditableCard() {
|
|
205
|
+
* return (
|
|
206
|
+
* <Card>
|
|
207
|
+
* <CardHeader>
|
|
208
|
+
* <CardTitle>Profile</CardTitle>
|
|
209
|
+
* <CardAction>
|
|
210
|
+
* <Button size="sm" variant="outline">Edit</Button>
|
|
211
|
+
* </CardAction>
|
|
212
|
+
* </CardHeader>
|
|
213
|
+
* </Card>
|
|
214
|
+
* );
|
|
215
|
+
* }
|
|
216
|
+
* ```
|
|
217
|
+
* @since 1.0.0
|
|
218
|
+
* @see {@link CardHeader}
|
|
219
|
+
*/
|
|
220
|
+
function CardAction(props: ComponentProps<"div">): JSX.Element {
|
|
221
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
222
|
+
return (
|
|
223
|
+
<div
|
|
224
|
+
data-slot="card-action"
|
|
225
|
+
class={cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", local.class)}
|
|
226
|
+
{...rest}
|
|
227
|
+
>
|
|
228
|
+
{local.children}
|
|
229
|
+
</div>
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* The main content of a card, with horizontal padding.
|
|
235
|
+
*
|
|
236
|
+
* @param props - The content props: `children`, `class`, and the `div` attributes.
|
|
237
|
+
* @returns The content element.
|
|
238
|
+
* @example
|
|
239
|
+
* ```tsx
|
|
240
|
+
* import { Card, CardContent } from "@/components/ui/card";
|
|
241
|
+
*
|
|
242
|
+
* export function Body() {
|
|
243
|
+
* return (
|
|
244
|
+
* <Card>
|
|
245
|
+
* <CardContent>
|
|
246
|
+
* <p>Your latest messages appear here.</p>
|
|
247
|
+
* </CardContent>
|
|
248
|
+
* </Card>
|
|
249
|
+
* );
|
|
250
|
+
* }
|
|
251
|
+
* ```
|
|
252
|
+
* @since 1.0.0
|
|
253
|
+
* @see {@link Card}
|
|
254
|
+
* @see {@link CardFooter}
|
|
255
|
+
*/
|
|
256
|
+
function CardContent(props: ComponentProps<"div">): JSX.Element {
|
|
257
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
258
|
+
return (
|
|
259
|
+
<div
|
|
260
|
+
data-slot="card-content"
|
|
261
|
+
class={cn("px-[var(--card-padding-x,1.5rem)]", local.class)}
|
|
262
|
+
{...rest}
|
|
263
|
+
>
|
|
264
|
+
{local.children}
|
|
265
|
+
</div>
|
|
266
|
+
);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The bottom of a card, usually one or more buttons in a row. It is a flex row, centered
|
|
271
|
+
* vertically.
|
|
272
|
+
*
|
|
273
|
+
* @param props - The footer props: `children`, `class`, and the `div` attributes.
|
|
274
|
+
* @returns The footer element.
|
|
275
|
+
* @example
|
|
276
|
+
* ```tsx
|
|
277
|
+
* import { Button } from "@/components/ui/button";
|
|
278
|
+
* import { Card, CardContent, CardFooter } from "@/components/ui/card";
|
|
279
|
+
*
|
|
280
|
+
* export function SaveCard() {
|
|
281
|
+
* return (
|
|
282
|
+
* <Card>
|
|
283
|
+
* <CardContent>Unsaved changes.</CardContent>
|
|
284
|
+
* <CardFooter>
|
|
285
|
+
* <Button>Save</Button>
|
|
286
|
+
* </CardFooter>
|
|
287
|
+
* </Card>
|
|
288
|
+
* );
|
|
289
|
+
* }
|
|
290
|
+
* ```
|
|
291
|
+
* @since 1.0.0
|
|
292
|
+
* @see {@link Card}
|
|
293
|
+
* @see {@link CardContent}
|
|
294
|
+
*/
|
|
295
|
+
function CardFooter(props: ComponentProps<"div">): JSX.Element {
|
|
296
|
+
const [local, rest] = splitProps(props, ["class", "children"]);
|
|
297
|
+
return (
|
|
298
|
+
<div
|
|
299
|
+
data-slot="card-footer"
|
|
300
|
+
class={cn(
|
|
301
|
+
"flex items-center px-[var(--card-padding-x,1.5rem)] [.border-t]:pt-6",
|
|
302
|
+
local.class,
|
|
303
|
+
)}
|
|
304
|
+
{...rest}
|
|
305
|
+
>
|
|
306
|
+
{local.children}
|
|
307
|
+
</div>
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|