raft-ui 0.0.6 → 0.0.8

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 (138) hide show
  1. package/CHANGELOG.md +7 -5
  2. package/dist/index.d.mts +618 -2
  3. package/dist/index.mjs +1205 -12
  4. package/{src → dist}/styles.css +0 -2
  5. package/{src/lib/styled-props.ts → dist/tv-UUMwNowu.d.mts} +6 -1
  6. package/dist/use-theme-Y_h1DKll.mjs +34 -0
  7. package/dist/wip.d.mts +15 -133
  8. package/dist/wip.mjs +23 -296
  9. package/package.json +4 -4
  10. package/dist/button-CJqMhTPQ.mjs +0 -621
  11. package/dist/index-CpGciYPW.d.mts +0 -267
  12. package/src/components/alert-dialog/alert-dialog.tsx +0 -215
  13. package/src/components/alert-dialog/index.ts +0 -30
  14. package/src/components/avatar/avatar.tsx +0 -375
  15. package/src/components/avatar/index.ts +0 -17
  16. package/src/components/badge/badge.tsx +0 -393
  17. package/src/components/badge/index.ts +0 -2
  18. package/src/components/banner/banner.tsx +0 -269
  19. package/src/components/banner/index.ts +0 -8
  20. package/src/components/bottom-sheet/bottom-sheet.tsx +0 -152
  21. package/src/components/bottom-sheet/index.ts +0 -22
  22. package/src/components/button/button.tsx +0 -499
  23. package/src/components/button/index.ts +0 -2
  24. package/src/components/checkbox/checkbox-indicator.tsx +0 -128
  25. package/src/components/checkbox/checkbox.tsx +0 -350
  26. package/src/components/checkbox/index.ts +0 -2
  27. package/src/components/combobox/combobox.tsx +0 -603
  28. package/src/components/combobox/index.ts +0 -52
  29. package/src/components/context-menu/context-menu.tsx +0 -380
  30. package/src/components/context-menu/index.ts +0 -34
  31. package/src/components/conversation-preview-card/conversation-preview-card.tsx +0 -336
  32. package/src/components/conversation-preview-card/index.ts +0 -32
  33. package/src/components/description-list/description-list.tsx +0 -116
  34. package/src/components/description-list/index.ts +0 -14
  35. package/src/components/dialog/dialog.tsx +0 -152
  36. package/src/components/dialog/index.ts +0 -26
  37. package/src/components/dropdown-menu/dropdown-menu.tsx +0 -405
  38. package/src/components/dropdown-menu/index.ts +0 -38
  39. package/src/components/empty-state/empty-state.tsx +0 -177
  40. package/src/components/empty-state/index.ts +0 -16
  41. package/src/components/field/field.tsx +0 -125
  42. package/src/components/field/index.ts +0 -18
  43. package/src/components/inline-code/index.ts +0 -2
  44. package/src/components/inline-code/inline-code.tsx +0 -35
  45. package/src/components/input/index.ts +0 -2
  46. package/src/components/input/input.tsx +0 -76
  47. package/src/components/input-group/index.ts +0 -7
  48. package/src/components/input-group/input-group.tsx +0 -215
  49. package/src/components/kbd/index.ts +0 -2
  50. package/src/components/kbd/kbd.tsx +0 -43
  51. package/src/components/label/index.ts +0 -2
  52. package/src/components/label/label.tsx +0 -99
  53. package/src/components/lightbox/index.ts +0 -24
  54. package/src/components/lightbox/lightbox.tsx +0 -245
  55. package/src/components/list-item/index.ts +0 -20
  56. package/src/components/list-item/list-item.tsx +0 -263
  57. package/src/components/media-list-item/index.ts +0 -20
  58. package/src/components/media-list-item/media-list-item.tsx +0 -169
  59. package/src/components/notification-center/index.ts +0 -39
  60. package/src/components/notification-center/notification-center.tsx +0 -558
  61. package/src/components/panel-header/index.ts +0 -22
  62. package/src/components/panel-header/panel-header.tsx +0 -199
  63. package/src/components/popover/index.ts +0 -30
  64. package/src/components/popover/popover.tsx +0 -248
  65. package/src/components/preview-shell/index.ts +0 -2
  66. package/src/components/preview-shell/preview-shell.tsx +0 -51
  67. package/src/components/quoted-message-card/index.ts +0 -36
  68. package/src/components/quoted-message-card/quoted-message-card.tsx +0 -391
  69. package/src/components/radio-group/index.ts +0 -2
  70. package/src/components/radio-group/radio-group.tsx +0 -119
  71. package/src/components/section-header/index.ts +0 -16
  72. package/src/components/section-header/section-header.tsx +0 -117
  73. package/src/components/section-label/index.ts +0 -2
  74. package/src/components/section-label/section-label.tsx +0 -38
  75. package/src/components/segmented-control/index.ts +0 -12
  76. package/src/components/segmented-control/segmented-control.tsx +0 -129
  77. package/src/components/select/index.ts +0 -40
  78. package/src/components/select/select.tsx +0 -382
  79. package/src/components/separator/index.ts +0 -2
  80. package/src/components/separator/separator.tsx +0 -40
  81. package/src/components/spinner/index.ts +0 -2
  82. package/src/components/spinner/spinner.tsx +0 -228
  83. package/src/components/status/index.ts +0 -2
  84. package/src/components/status/status.tsx +0 -152
  85. package/src/components/tabs/index.ts +0 -24
  86. package/src/components/tabs/tabs.tsx +0 -451
  87. package/src/components/text/index.ts +0 -2
  88. package/src/components/text/text.tsx +0 -131
  89. package/src/components/textarea/index.ts +0 -2
  90. package/src/components/textarea/textarea.tsx +0 -136
  91. package/src/components/toggle-group/index.ts +0 -7
  92. package/src/components/toggle-group/toggle-group.tsx +0 -111
  93. package/src/components/tooltip/index.ts +0 -8
  94. package/src/components/tooltip/tooltip.tsx +0 -212
  95. package/src/index.ts +0 -429
  96. package/src/legacy/AttentionDot.tsx +0 -28
  97. package/src/legacy/AvatarListRow.tsx +0 -87
  98. package/src/legacy/AvatarSlot.tsx +0 -157
  99. package/src/legacy/Badge.tsx +0 -95
  100. package/src/legacy/Banner.tsx +0 -74
  101. package/src/legacy/BottomSheet.tsx +0 -76
  102. package/src/legacy/CheckMarker.tsx +0 -72
  103. package/src/legacy/Checkbox.tsx +0 -81
  104. package/src/legacy/ConversationPreviewCard.tsx +0 -169
  105. package/src/legacy/DismissBackdrop.tsx +0 -68
  106. package/src/legacy/EmptyState.tsx +0 -63
  107. package/src/legacy/ExperimentalBadge.tsx +0 -19
  108. package/src/legacy/FormField.tsx +0 -106
  109. package/src/legacy/KeyValueRow.tsx +0 -67
  110. package/src/legacy/Lightbox.tsx +0 -119
  111. package/src/legacy/NotificationCenter.tsx +0 -217
  112. package/src/legacy/PanelHeader.tsx +0 -94
  113. package/src/legacy/PreviewShell.tsx +0 -40
  114. package/src/legacy/QuotedMessageCard.tsx +0 -181
  115. package/src/legacy/ReorderablePanelTabs.tsx +0 -156
  116. package/src/legacy/SandboxedPreviewFrame.tsx +0 -59
  117. package/src/legacy/SearchInput.tsx +0 -23
  118. package/src/legacy/SectionEyebrow.tsx +0 -60
  119. package/src/legacy/SectionHeader.tsx +0 -68
  120. package/src/legacy/SegmentedControl.tsx +0 -74
  121. package/src/legacy/SlugInput.tsx +0 -29
  122. package/src/legacy/Spinner.tsx +0 -89
  123. package/src/legacy/StatusDot.tsx +0 -51
  124. package/src/legacy/SurfaceListItem.tsx +0 -32
  125. package/src/legacy/Textarea.tsx +0 -137
  126. package/src/legacy/button.tsx +0 -100
  127. package/src/legacy/context-menu-divider.tsx +0 -12
  128. package/src/legacy/menu-item.tsx +0 -66
  129. package/src/legacy/selection-popover.tsx +0 -212
  130. package/src/legacy/server-switcher-menu.tsx +0 -203
  131. package/src/legacy/source.css +0 -240
  132. package/src/lib/cn.ts +0 -1
  133. package/src/lib/theme/theme-context.ts +0 -28
  134. package/src/lib/theme/theme-provider.tsx +0 -181
  135. package/src/lib/theme/use-theme.ts +0 -12
  136. package/src/lib/tv.ts +0 -29
  137. package/src/lib/without-children.ts +0 -6
  138. package/src/wip.ts +0 -291
@@ -1,558 +0,0 @@
1
- import { Popover as BasePopover } from "@base-ui/react/popover";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { AlertTriangle, CheckCircle2, Info } from "lucide-react";
5
- import { tv, type VariantProps } from "../../lib/tv";
6
- import { EmptyState, type EmptyStateProps } from "../empty-state/empty-state";
7
- import { Button, type ButtonProps } from "../button/button";
8
- import type { StyledProps } from "../../lib/styled-props";
9
- import { useThemeFamily } from "../../lib/theme/use-theme";
10
-
11
- const notificationCenter = tv({
12
- slots: {
13
- popup: ["flex flex-col overflow-hidden bg-layer-panel"],
14
- header: ["flex items-center gap-2 px-4 py-2"],
15
- title: ["text-xs"],
16
- count: ["ml-auto text-xs"],
17
- scroller: [
18
- "min-h-0 flex-1 overflow-y-auto overscroll-contain",
19
- "[[data-theme=elegant]_&]:bg-white",
20
- ],
21
- list: ["divide-y"],
22
- item: ["px-4 py-4"],
23
- itemRow: ["flex items-start"],
24
- itemIcon: ["mt-0.5 flex size-6 shrink-0 items-center justify-center", "[&_svg]:size-4"],
25
- itemContent: ["min-w-0 flex-1"],
26
- itemTitle: ["break-words text-sm text-foreground-strong"],
27
- itemBody: ["mt-0.5 break-words text-sm"],
28
- itemActions: ["mt-3 ml-auto flex items-center justify-end gap-2"],
29
- actionButton: [],
30
- },
31
- variants: {
32
- theme: {
33
- brutal: {
34
- popup: ["border-2 border-black bg-white shadow-lg"],
35
- header: ["border-b-2 border-line-strong bg-brutal-cream"],
36
- title: ["font-bold uppercase tracking-widest text-foreground/60"],
37
- count: ["font-mono text-foreground/40"],
38
- list: ["divide-y-2 divide-line-strong"],
39
- itemRow: ["gap-2"],
40
- itemIcon: ["border-2 border-line-strong [&_svg]:text-foreground-strong"],
41
- itemTitle: ["font-bold"],
42
- actionButton: [],
43
- },
44
- elegant: {
45
- popup: ["rounded-md bg-layer-popover", "shadow-lg"],
46
- header: ["border-b border-line-muted bg-white pt-2.5"],
47
- title: ["text-sm font-medium normal-case tracking-normal text-foreground-strong"],
48
- count: ["font-sans text-[11px] font-medium text-foreground-placeholder"],
49
- list: ["divide-line-muted"],
50
- itemRow: ["gap-2.5"],
51
- itemIcon: ["rounded-sm border border-transparent"],
52
- itemTitle: ["font-medium"],
53
- itemBody: ["text-foreground-muted"],
54
- actionButton: ["py-0.5"],
55
- },
56
- },
57
- viewport: {
58
- desktop: {
59
- popup: "w-[380px]",
60
- },
61
- mobile: {
62
- popup: "w-[min(92vw,360px)]",
63
- },
64
- },
65
- size: {
66
- sm: {
67
- popup: "h-56",
68
- },
69
- md: {
70
- popup: "h-72",
71
- },
72
- lg: {
73
- popup: "h-96",
74
- },
75
- },
76
- read: {
77
- true: {
78
- item: "opacity-70",
79
- },
80
- false: {
81
- item: "",
82
- },
83
- },
84
- status: {
85
- error: {},
86
- warning: {},
87
- info: {},
88
- success: {},
89
- },
90
- actionVariant: {
91
- primary: {},
92
- secondary: {},
93
- },
94
- },
95
- compoundVariants: [
96
- {
97
- theme: "brutal",
98
- actionVariant: "primary",
99
- class: { actionButton: "bg-brutal-pink hover:bg-brutal-pink" },
100
- },
101
- { theme: "brutal", status: "error", class: { itemIcon: "bg-brutal-orange" } },
102
- { theme: "brutal", status: "warning", class: { itemIcon: "bg-brutal-orange" } },
103
- { theme: "brutal", status: "info", class: { itemIcon: "bg-brutal-yellow" } },
104
- { theme: "brutal", status: "success", class: { itemIcon: "bg-brutal-lime" } },
105
- {
106
- theme: "elegant",
107
- status: "error",
108
- class: { itemIcon: "bg-danger-base/80 text-danger-dark" },
109
- },
110
- {
111
- theme: "elegant",
112
- status: "warning",
113
- class: { itemIcon: "bg-warning-base/80 text-warning-dark" },
114
- },
115
- {
116
- theme: "elegant",
117
- status: "info",
118
- class: { itemIcon: "bg-info-base/80 text-info-dark" },
119
- },
120
- {
121
- theme: "elegant",
122
- status: "success",
123
- class: { itemIcon: "bg-success-base/80 text-success-dark" },
124
- },
125
- ],
126
- defaultVariants: {
127
- viewport: "desktop",
128
- size: "md",
129
- read: false,
130
- status: "info",
131
- actionVariant: "secondary",
132
- },
133
- });
134
-
135
- export type NotificationCenterProps = BasePopover.Root.Props;
136
-
137
- export function NotificationCenter({ modal = false, ...props }: NotificationCenterProps) {
138
- return <BasePopover.Root modal={modal} {...props} />;
139
- }
140
-
141
- export type NotificationCenterTriggerProps = BasePopover.Trigger.Props;
142
-
143
- export function NotificationCenterTrigger(props: NotificationCenterTriggerProps) {
144
- return <BasePopover.Trigger data-slot="notification-center-trigger" {...props} />;
145
- }
146
-
147
- export type NotificationCenterPortalProps = BasePopover.Portal.Props;
148
-
149
- export type NotificationCenterPopupProps = StyledProps<BasePopover.Popup.Props> &
150
- Pick<VariantProps<typeof notificationCenter>, "size" | "viewport"> &
151
- Pick<
152
- BasePopover.Positioner.Props,
153
- | "align"
154
- | "alignOffset"
155
- | "anchor"
156
- | "arrowPadding"
157
- | "collisionAvoidance"
158
- | "collisionBoundary"
159
- | "collisionPadding"
160
- | "disableAnchorTracking"
161
- | "positionMethod"
162
- | "side"
163
- | "sideOffset"
164
- | "sticky"
165
- > & {
166
- portalProps?: NotificationCenterPortalProps;
167
- };
168
-
169
- export function NotificationCenterPopup({
170
- viewport = "desktop",
171
- size = "md",
172
- className,
173
- initialFocus = false,
174
- "aria-label": ariaLabel = "Notification center",
175
- align = "center",
176
- alignOffset = 0,
177
- anchor,
178
- arrowPadding,
179
- collisionAvoidance,
180
- collisionBoundary,
181
- collisionPadding,
182
- disableAnchorTracking = true,
183
- positionMethod = "fixed",
184
- side = "bottom",
185
- sideOffset = 4,
186
- sticky,
187
- portalProps,
188
- ...props
189
- }: NotificationCenterPopupProps) {
190
- const theme = useThemeFamily();
191
- const { popup } = notificationCenter({ theme, viewport, size });
192
-
193
- return (
194
- <BasePopover.Portal {...portalProps}>
195
- <BasePopover.Positioner
196
- align={align}
197
- alignOffset={alignOffset}
198
- anchor={anchor}
199
- arrowPadding={arrowPadding}
200
- collisionAvoidance={collisionAvoidance}
201
- collisionBoundary={collisionBoundary}
202
- collisionPadding={collisionPadding}
203
- disableAnchorTracking={disableAnchorTracking}
204
- positionMethod={positionMethod}
205
- side={side}
206
- sideOffset={sideOffset}
207
- sticky={sticky}
208
- className="isolate z-50 outline-none"
209
- >
210
- <BasePopover.Popup
211
- aria-label={ariaLabel}
212
- data-slot="notification-center-popup"
213
- data-size={size}
214
- data-viewport={viewport}
215
- initialFocus={initialFocus}
216
- className={popup({ className })}
217
- {...props}
218
- />
219
- </BasePopover.Positioner>
220
- </BasePopover.Portal>
221
- );
222
- }
223
-
224
- export type NotificationCenterHeaderProps = useRender.ComponentProps<"div">;
225
-
226
- export function NotificationCenterHeader({
227
- render,
228
- className,
229
- ...props
230
- }: NotificationCenterHeaderProps) {
231
- const theme = useThemeFamily();
232
- const { header } = notificationCenter({ theme });
233
- const defaultProps: useRender.ElementProps<"div"> = {
234
- className: header({ className }),
235
- };
236
-
237
- return useRender({
238
- defaultTagName: "div",
239
- render,
240
- props: mergeProps<"div">(defaultProps, props),
241
- state: {
242
- slot: "notification-center-header",
243
- },
244
- });
245
- }
246
-
247
- export type NotificationCenterTitleProps = useRender.ComponentProps<"span">;
248
-
249
- export function NotificationCenterTitle({
250
- render,
251
- className,
252
- ...props
253
- }: NotificationCenterTitleProps) {
254
- const theme = useThemeFamily();
255
- const { title } = notificationCenter({ theme });
256
- const defaultProps: useRender.ElementProps<"span"> = {
257
- className: title({ className }),
258
- };
259
-
260
- return useRender({
261
- defaultTagName: "span",
262
- render,
263
- props: mergeProps<"span">(defaultProps, props),
264
- state: {
265
- slot: "notification-center-title",
266
- },
267
- });
268
- }
269
-
270
- export type NotificationCenterCountProps = useRender.ComponentProps<"span">;
271
-
272
- export function NotificationCenterCount({
273
- render,
274
- className,
275
- ...props
276
- }: NotificationCenterCountProps) {
277
- const theme = useThemeFamily();
278
- const { count } = notificationCenter({ theme });
279
- const defaultProps: useRender.ElementProps<"span"> = {
280
- className: count({ className }),
281
- };
282
-
283
- return useRender({
284
- defaultTagName: "span",
285
- render,
286
- props: mergeProps<"span">(defaultProps, props),
287
- state: {
288
- slot: "notification-center-count",
289
- },
290
- });
291
- }
292
-
293
- export type NotificationCenterScrollerProps = useRender.ComponentProps<"div">;
294
-
295
- export function NotificationCenterScroller({
296
- render,
297
- className,
298
- ...props
299
- }: NotificationCenterScrollerProps) {
300
- const { scroller } = notificationCenter();
301
- const defaultProps: useRender.ElementProps<"div"> = {
302
- className: scroller({ className }),
303
- };
304
-
305
- return useRender({
306
- defaultTagName: "div",
307
- render,
308
- props: mergeProps<"div">(defaultProps, props),
309
- state: {
310
- slot: "notification-center-scroller",
311
- },
312
- });
313
- }
314
-
315
- export type NotificationCenterListProps = useRender.ComponentProps<"ul">;
316
-
317
- export function NotificationCenterList({
318
- render,
319
- className,
320
- "aria-label": ariaLabel = "Notifications",
321
- ...props
322
- }: NotificationCenterListProps) {
323
- const theme = useThemeFamily();
324
- const { list } = notificationCenter({ theme });
325
- const defaultProps: useRender.ElementProps<"ul"> = {
326
- "aria-label": ariaLabel,
327
- className: list({ className }),
328
- };
329
-
330
- return useRender({
331
- defaultTagName: "ul",
332
- render,
333
- props: mergeProps<"ul">(defaultProps, props),
334
- state: {
335
- slot: "notification-center-list",
336
- },
337
- });
338
- }
339
-
340
- export type NotificationCenterItemProps = useRender.ComponentProps<"li"> &
341
- Pick<VariantProps<typeof notificationCenter>, "read">;
342
-
343
- export function NotificationCenterItem({
344
- read = false,
345
- render,
346
- className,
347
- ...props
348
- }: NotificationCenterItemProps) {
349
- const theme = useThemeFamily();
350
- const { item } = notificationCenter({ theme, read });
351
- const defaultProps: useRender.ElementProps<"li"> = {
352
- className: item({ className }),
353
- };
354
-
355
- return useRender({
356
- defaultTagName: "li",
357
- render,
358
- props: mergeProps<"li">(defaultProps, props),
359
- state: {
360
- slot: "notification-center-item",
361
- read,
362
- },
363
- });
364
- }
365
-
366
- export type NotificationCenterItemRowProps = useRender.ComponentProps<"div">;
367
-
368
- export function NotificationCenterItemRow({
369
- render,
370
- className,
371
- ...props
372
- }: NotificationCenterItemRowProps) {
373
- const theme = useThemeFamily();
374
- const { itemRow } = notificationCenter({ theme });
375
- const defaultProps: useRender.ElementProps<"div"> = {
376
- className: itemRow({ className }),
377
- };
378
-
379
- return useRender({
380
- defaultTagName: "div",
381
- render,
382
- props: mergeProps<"div">(defaultProps, props),
383
- state: {
384
- slot: "notification-center-item-row",
385
- },
386
- });
387
- }
388
-
389
- export type NotificationCenterItemIconProps = useRender.ComponentProps<"div"> &
390
- Pick<VariantProps<typeof notificationCenter>, "status">;
391
-
392
- const STATUS_LABEL = {
393
- error: "Error",
394
- warning: "Warning",
395
- info: "Info",
396
- success: "Success",
397
- } as const satisfies Record<NonNullable<NotificationCenterItemIconProps["status"]>, string>;
398
-
399
- const DEFAULT_STATUS_ICON = {
400
- error: <AlertTriangle />,
401
- warning: <AlertTriangle />,
402
- info: <Info />,
403
- success: <CheckCircle2 />,
404
- } as const satisfies Record<
405
- NonNullable<NotificationCenterItemIconProps["status"]>,
406
- useRender.ComponentProps<"div">["children"]
407
- >;
408
-
409
- export function NotificationCenterItemIcon({
410
- status = "info",
411
- render,
412
- className,
413
- children,
414
- "aria-label": ariaLabel = STATUS_LABEL[status],
415
- ...props
416
- }: NotificationCenterItemIconProps) {
417
- const theme = useThemeFamily();
418
- const { itemIcon } = notificationCenter({ theme, status });
419
- const defaultProps: useRender.ElementProps<"div"> = {
420
- "aria-label": ariaLabel,
421
- className: itemIcon({ className }),
422
- children: children ?? DEFAULT_STATUS_ICON[status],
423
- };
424
-
425
- return useRender({
426
- defaultTagName: "div",
427
- render,
428
- props: mergeProps<"div">(defaultProps, props),
429
- state: {
430
- slot: "notification-center-item-icon",
431
- status,
432
- },
433
- });
434
- }
435
-
436
- export type NotificationCenterItemContentProps = useRender.ComponentProps<"div">;
437
-
438
- export function NotificationCenterItemContent({
439
- render,
440
- className,
441
- ...props
442
- }: NotificationCenterItemContentProps) {
443
- const { itemContent } = notificationCenter();
444
- const defaultProps: useRender.ElementProps<"div"> = {
445
- className: itemContent({ className }),
446
- };
447
-
448
- return useRender({
449
- defaultTagName: "div",
450
- render,
451
- props: mergeProps<"div">(defaultProps, props),
452
- state: {
453
- slot: "notification-center-item-content",
454
- },
455
- });
456
- }
457
-
458
- export type NotificationCenterItemTitleProps = useRender.ComponentProps<"div">;
459
-
460
- export function NotificationCenterItemTitle({
461
- render,
462
- className,
463
- ...props
464
- }: NotificationCenterItemTitleProps) {
465
- const theme = useThemeFamily();
466
- const { itemTitle } = notificationCenter({ theme });
467
- const defaultProps: useRender.ElementProps<"div"> = {
468
- className: itemTitle({ className }),
469
- };
470
-
471
- return useRender({
472
- defaultTagName: "div",
473
- render,
474
- props: mergeProps<"div">(defaultProps, props),
475
- state: {
476
- slot: "notification-center-item-title",
477
- },
478
- });
479
- }
480
-
481
- export type NotificationCenterItemBodyProps = useRender.ComponentProps<"div">;
482
-
483
- export function NotificationCenterItemBody({
484
- render,
485
- className,
486
- ...props
487
- }: NotificationCenterItemBodyProps) {
488
- const theme = useThemeFamily();
489
- const { itemBody } = notificationCenter({ theme });
490
- const defaultProps: useRender.ElementProps<"div"> = {
491
- className: itemBody({ className }),
492
- };
493
-
494
- return useRender({
495
- defaultTagName: "div",
496
- render,
497
- props: mergeProps<"div">(defaultProps, props),
498
- state: {
499
- slot: "notification-center-item-body",
500
- },
501
- });
502
- }
503
-
504
- export type NotificationCenterItemActionsProps = useRender.ComponentProps<"div">;
505
-
506
- export function NotificationCenterItemActions({
507
- render,
508
- className,
509
- ...props
510
- }: NotificationCenterItemActionsProps) {
511
- const { itemActions } = notificationCenter();
512
- const defaultProps: useRender.ElementProps<"div"> = {
513
- className: itemActions({ className }),
514
- };
515
-
516
- return useRender({
517
- defaultTagName: "div",
518
- render,
519
- props: mergeProps<"div">(defaultProps, props),
520
- state: {
521
- slot: "notification-center-item-actions",
522
- },
523
- });
524
- }
525
-
526
- export type NotificationCenterActionButtonProps = Omit<
527
- ButtonProps,
528
- "className" | "size" | "variant"
529
- > & {
530
- className?: string;
531
- variant?: VariantProps<typeof notificationCenter>["actionVariant"];
532
- };
533
-
534
- export function NotificationCenterActionButton({
535
- variant = "secondary",
536
- className,
537
- ...props
538
- }: NotificationCenterActionButtonProps) {
539
- const theme = useThemeFamily();
540
- const { actionButton } = notificationCenter({ theme, actionVariant: variant });
541
- const buttonVariant = variant === "primary" ? "primary" : "outline";
542
-
543
- return (
544
- <Button
545
- type="button"
546
- size="xs"
547
- variant={buttonVariant}
548
- className={actionButton({ className })}
549
- {...props}
550
- />
551
- );
552
- }
553
-
554
- export type NotificationCenterEmptyStateProps = EmptyStateProps;
555
-
556
- export function NotificationCenterEmptyState(props: NotificationCenterEmptyStateProps) {
557
- return <EmptyState data-slot="notification-center-empty-state" {...props} />;
558
- }
@@ -1,22 +0,0 @@
1
- export {
2
- PanelHeader,
3
- PanelHeaderActions,
4
- PanelHeaderContent,
5
- PanelHeaderIcon,
6
- PanelHeaderSubtitle,
7
- PanelHeaderSuffix,
8
- PanelHeaderTitle,
9
- PanelHeaderTitleRow,
10
- PanelHeaderVisual,
11
- } from "./panel-header";
12
- export type {
13
- PanelHeaderActionsProps,
14
- PanelHeaderContentProps,
15
- PanelHeaderIconProps,
16
- PanelHeaderProps,
17
- PanelHeaderSubtitleProps,
18
- PanelHeaderSuffixProps,
19
- PanelHeaderTitleProps,
20
- PanelHeaderTitleRowProps,
21
- PanelHeaderVisualProps,
22
- } from "./panel-header";