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,245 +0,0 @@
1
- import { Dialog } from "@base-ui/react/dialog";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { useHotkey } from "@tanstack/react-hotkeys";
5
- import { useCallback, useRef, useState, type ReactNode, type RefObject } from "react";
6
- import { tv } from "../../lib/tv";
7
- import type { StyledProps } from "../../lib/styled-props";
8
- import { useThemeFamily } from "../../lib/theme/use-theme";
9
-
10
- const lightbox = tv({
11
- slots: {
12
- backdrop: ["fixed inset-0 z-[70] bg-layer-backdrop data-[closed]:hidden"],
13
- content: ["pointer-events-none fixed inset-0 z-[71] data-[closed]:hidden"],
14
- header: ["safe-top safe-left safe-right pointer-events-auto shrink-0"],
15
- title: ["min-w-0 flex-1 truncate font-heading text-sm font-bold"],
16
- actions: ["flex shrink-0 items-center gap-1.5"],
17
- stage: [
18
- "pointer-events-none relative flex min-h-0 flex-1 items-center justify-center overflow-hidden",
19
- ],
20
- media: ["pointer-events-auto max-h-[80vh] max-w-[86vw] border-2"],
21
- close: [],
22
- },
23
- variants: {
24
- theme: {
25
- brutal: {
26
- header: ["border-b-2 border-line-strong bg-layer-panel"],
27
- title: ["text-foreground-strong"],
28
- media: ["border-line-strong bg-layer-panel shadow-xl"],
29
- },
30
- elegant: {},
31
- },
32
- },
33
- });
34
-
35
- export type LightboxProps<Payload = unknown> = Omit<
36
- Dialog.Root.Props<Payload>,
37
- "actionsRef" | "children" | "handle"
38
- > & {
39
- children?: ReactNode;
40
- closeOnModW?: boolean;
41
- };
42
-
43
- export function Lightbox<Payload = unknown>({
44
- closeOnModW = true,
45
- defaultOpen = false,
46
- modal = true,
47
- onOpenChange,
48
- open,
49
- children,
50
- ...props
51
- }: LightboxProps<Payload>) {
52
- const dialogRef = useRef<Dialog.Root.Actions>(null);
53
- const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
54
- const effectiveOpen = open ?? uncontrolledOpen;
55
-
56
- const handleOpenChange = useCallback<NonNullable<Dialog.Root.Props<Payload>["onOpenChange"]>>(
57
- (nextOpen, eventDetails) => {
58
- if (open === undefined) {
59
- setUncontrolledOpen(nextOpen);
60
- }
61
- onOpenChange?.(nextOpen, eventDetails);
62
- },
63
- [onOpenChange, open],
64
- );
65
-
66
- const modWClose =
67
- closeOnModW && effectiveOpen ? <LightboxModWClose dialogRef={dialogRef} /> : null;
68
-
69
- return (
70
- <Dialog.Root
71
- actionsRef={dialogRef}
72
- defaultOpen={defaultOpen}
73
- modal={modal}
74
- onOpenChange={handleOpenChange}
75
- open={open}
76
- {...props}
77
- >
78
- {modWClose}
79
- {children}
80
- </Dialog.Root>
81
- );
82
- }
83
-
84
- type LightboxModWCloseProps = {
85
- dialogRef: RefObject<Dialog.Root.Actions | null>;
86
- };
87
-
88
- function LightboxModWClose({ dialogRef }: LightboxModWCloseProps) {
89
- useHotkey(
90
- "Mod+W",
91
- (event) => {
92
- event.preventDefault();
93
- event.stopPropagation();
94
- dialogRef.current?.close();
95
- },
96
- {
97
- meta: {
98
- name: "Close lightbox",
99
- description: "Close the active lightbox before the browser closes the tab.",
100
- },
101
- },
102
- );
103
-
104
- return null;
105
- }
106
-
107
- export type LightboxTriggerProps = Dialog.Trigger.Props;
108
-
109
- export function LightboxTrigger(props: LightboxTriggerProps) {
110
- return <Dialog.Trigger data-slot="lightbox-trigger" {...props} />;
111
- }
112
-
113
- export type LightboxPortalProps = Dialog.Portal.Props;
114
-
115
- export function LightboxPortal(props: LightboxPortalProps) {
116
- return <Dialog.Portal data-slot="lightbox-portal" {...props} />;
117
- }
118
-
119
- export type LightboxContentProps = StyledProps<Dialog.Popup.Props>;
120
-
121
- export function LightboxContent({
122
- className,
123
- initialFocus = false,
124
- finalFocus = false,
125
- ...props
126
- }: LightboxContentProps) {
127
- const theme = useThemeFamily();
128
- const { backdrop, content } = lightbox({ theme });
129
- return (
130
- <LightboxPortal>
131
- <Dialog.Backdrop data-slot="lightbox-backdrop" className={backdrop()} />
132
- <Dialog.Popup
133
- data-slot="lightbox-content"
134
- initialFocus={initialFocus}
135
- finalFocus={finalFocus}
136
- className={content({ className })}
137
- {...props}
138
- />
139
- </LightboxPortal>
140
- );
141
- }
142
-
143
- export type LightboxHeaderProps = useRender.ComponentProps<"div">;
144
-
145
- export function LightboxHeader({ render, className, ...props }: LightboxHeaderProps) {
146
- const theme = useThemeFamily();
147
- const { header } = lightbox({ theme });
148
- const defaultProps: useRender.ElementProps<"div"> = {
149
- className: header({ className }),
150
- };
151
-
152
- return useRender({
153
- defaultTagName: "div",
154
- render,
155
- props: mergeProps<"div">(defaultProps, props),
156
- state: {
157
- slot: "lightbox-header",
158
- },
159
- });
160
- }
161
-
162
- export type LightboxTitleProps = useRender.ComponentProps<"div">;
163
-
164
- export function LightboxTitle({ render, className, ...props }: LightboxTitleProps) {
165
- const theme = useThemeFamily();
166
- const { title } = lightbox({ theme });
167
- const defaultProps: useRender.ElementProps<"div"> = {
168
- className: title({ className }),
169
- };
170
-
171
- return useRender({
172
- defaultTagName: "div",
173
- render,
174
- props: mergeProps<"div">(defaultProps, props),
175
- state: {
176
- slot: "lightbox-title",
177
- },
178
- });
179
- }
180
-
181
- export type LightboxActionsProps = useRender.ComponentProps<"div">;
182
-
183
- export function LightboxActions({ render, className, ...props }: LightboxActionsProps) {
184
- const theme = useThemeFamily();
185
- const { actions } = lightbox({ theme });
186
- const defaultProps: useRender.ElementProps<"div"> = {
187
- className: actions({ className }),
188
- };
189
-
190
- return useRender({
191
- defaultTagName: "div",
192
- render,
193
- props: mergeProps<"div">(defaultProps, props),
194
- state: {
195
- slot: "lightbox-actions",
196
- },
197
- });
198
- }
199
-
200
- export type LightboxStageProps = useRender.ComponentProps<"div">;
201
-
202
- export function LightboxStage({ render, className, ...props }: LightboxStageProps) {
203
- const theme = useThemeFamily();
204
- const { stage } = lightbox({ theme });
205
- const defaultProps: useRender.ElementProps<"div"> = {
206
- className: stage({ className }),
207
- };
208
-
209
- return useRender({
210
- defaultTagName: "div",
211
- render,
212
- props: mergeProps<"div">(defaultProps, props),
213
- state: {
214
- slot: "lightbox-stage",
215
- },
216
- });
217
- }
218
-
219
- export type LightboxMediaProps = useRender.ComponentProps<"div">;
220
-
221
- export function LightboxMedia({ render, className, ...props }: LightboxMediaProps) {
222
- const theme = useThemeFamily();
223
- const { media } = lightbox({ theme });
224
- const defaultProps: useRender.ElementProps<"div"> = {
225
- className: media({ className }),
226
- };
227
-
228
- return useRender({
229
- defaultTagName: "div",
230
- render,
231
- props: mergeProps<"div">(defaultProps, props),
232
- state: {
233
- slot: "lightbox-media",
234
- },
235
- });
236
- }
237
-
238
- export type LightboxCloseProps = StyledProps<Dialog.Close.Props>;
239
-
240
- export function LightboxClose({ className, ...props }: LightboxCloseProps) {
241
- const theme = useThemeFamily();
242
- const { close } = lightbox({ theme });
243
-
244
- return <Dialog.Close data-slot="lightbox-close" className={close({ className })} {...props} />;
245
- }
@@ -1,20 +0,0 @@
1
- export {
2
- ListItem,
3
- ListItemActionGroup,
4
- ListItemBody,
5
- ListItemDescription,
6
- ListItemIcon,
7
- ListItemRow,
8
- ListItemMeta,
9
- ListItemTitle,
10
- } from "./list-item";
11
- export type {
12
- ListItemActionGroupProps,
13
- ListItemBodyProps,
14
- ListItemDescriptionProps,
15
- ListItemIconProps,
16
- ListItemRowProps,
17
- ListItemMetaProps,
18
- ListItemProps,
19
- ListItemTitleProps,
20
- } from "./list-item";
@@ -1,263 +0,0 @@
1
- import { mergeProps } from "@base-ui/react/merge-props";
2
- import { useRender } from "@base-ui/react/use-render";
3
- import { tv, type VariantProps } from "../../lib/tv";
4
- import { useThemeFamily } from "../../lib/theme/use-theme";
5
-
6
- const listItem = tv({
7
- slots: {
8
- root: ["px-4 py-3 transition-colors"],
9
- body: [
10
- "min-w-0",
11
- "grid grid-cols-[minmax(0,1fr)]",
12
- "has-[>[data-slot=list-item-icon]]:grid-cols-[auto_minmax(0,1fr)]",
13
- "has-[>[data-slot=list-item-icon]]:items-start",
14
- "has-[>[data-slot=list-item-icon]]:gap-x-2",
15
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-icon]]:col-start-1",
16
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-icon]]:row-start-1",
17
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-row]]:col-start-2",
18
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-description]]:col-span-2",
19
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-description]]:col-start-1",
20
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-description]]:row-start-2",
21
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-meta]]:col-start-2",
22
- "has-[>[data-slot=list-item-icon]]:[&>[data-slot=list-item-action-group]]:col-start-2",
23
- ],
24
- icon: ["shrink-0 self-start", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
25
- row: ["flex min-w-0 flex-wrap items-center gap-2", "[&_svg]:size-3.5 [&_svg]:shrink-0"],
26
- title: ["break-words text-sm font-bold"],
27
- description: ["mt-1 text-xs"],
28
- meta: [
29
- "mt-1 flex min-w-0 flex-wrap items-center gap-2 text-xs",
30
- "[&_svg]:size-3 [&_svg]:shrink-0",
31
- ],
32
- actionGroup: ["mt-2 flex flex-wrap items-center gap-2", "[&_svg]:size-3 [&_svg]:shrink-0"],
33
- },
34
- variants: {
35
- theme: {
36
- brutal: {
37
- root: ["border-2"],
38
- icon: ["mt-0.5 text-foreground/50"],
39
- title: "text-foreground-strong",
40
- description: "text-foreground/60",
41
- meta: "text-foreground/50",
42
- },
43
- elegant: {
44
- root: [
45
- "rounded-sm border",
46
- "border-line-muted bg-layer-panel",
47
- "outline-none",
48
- "transition-[background-color,border-color] duration-150",
49
- "focus-visible:ring-2 focus-visible:ring-line-focus",
50
- ],
51
- icon: ["mt-0.5 text-foreground-muted"],
52
- row: ["items-center gap-2"],
53
- title: ["text-sm font-medium leading-snug tracking-[-0.005em]", "text-foreground-strong"],
54
- description: ["mt-1 text-[0.8125rem] font-normal leading-normal", "text-foreground-muted"],
55
- meta: ["text-foreground-muted"],
56
- actionGroup: ["mt-2 gap-2"],
57
- },
58
- },
59
- selected: {
60
- true: {
61
- root: "",
62
- },
63
- false: {
64
- root: "",
65
- },
66
- },
67
- interactive: {
68
- true: {
69
- root: "",
70
- },
71
- false: {
72
- root: "",
73
- },
74
- },
75
- },
76
- compoundVariants: [
77
- {
78
- theme: "brutal",
79
- selected: true,
80
- class: {
81
- root: "border-line-strong bg-info-base/15 shadow-sm",
82
- },
83
- },
84
- { theme: "brutal", selected: false, class: { root: "border-line-subtle bg-layer-panel" } },
85
- {
86
- theme: "brutal",
87
- selected: false,
88
- interactive: true,
89
- class: { root: "hover:border-line-strong hover:shadow-sm" },
90
- },
91
- {
92
- theme: "elegant",
93
- selected: true,
94
- class: {
95
- root: ["border-info-light", "bg-info-lighter"],
96
- },
97
- },
98
- {
99
- theme: "elegant",
100
- selected: false,
101
- interactive: true,
102
- class: {
103
- root: "hover:bg-layer-muted",
104
- },
105
- },
106
- ],
107
- defaultVariants: {
108
- selected: false,
109
- interactive: true,
110
- },
111
- });
112
-
113
- export type ListItemProps = useRender.ComponentProps<"div"> &
114
- Omit<VariantProps<typeof listItem>, "theme">;
115
-
116
- export function ListItem({ selected, interactive, className, render, ...props }: ListItemProps) {
117
- const theme = useThemeFamily();
118
- const { root } = listItem({ theme, selected, interactive });
119
- const defaultProps: useRender.ElementProps<"div"> = {
120
- className: root({ className }),
121
- };
122
-
123
- return useRender({
124
- defaultTagName: "div",
125
- render,
126
- props: mergeProps<"div">(defaultProps, props),
127
- state: {
128
- slot: "list-item",
129
- },
130
- });
131
- }
132
-
133
- export type ListItemBodyProps = useRender.ComponentProps<"div">;
134
-
135
- export function ListItemBody({ className, render, ...props }: ListItemBodyProps) {
136
- const { body } = listItem();
137
- const defaultProps: useRender.ElementProps<"div"> = {
138
- className: body({ className }),
139
- };
140
-
141
- return useRender({
142
- defaultTagName: "div",
143
- render,
144
- props: mergeProps<"div">(defaultProps, props),
145
- state: {
146
- slot: "list-item-body",
147
- },
148
- });
149
- }
150
-
151
- export type ListItemIconProps = useRender.ComponentProps<"div">;
152
-
153
- export function ListItemIcon({ className, render, ...props }: ListItemIconProps) {
154
- const theme = useThemeFamily();
155
- const { icon } = listItem({ theme });
156
- const defaultProps: useRender.ElementProps<"div"> = {
157
- className: icon({ className }),
158
- };
159
-
160
- return useRender({
161
- defaultTagName: "div",
162
- render,
163
- props: mergeProps<"div">(defaultProps, props),
164
- state: {
165
- slot: "list-item-icon",
166
- },
167
- });
168
- }
169
-
170
- export type ListItemRowProps = useRender.ComponentProps<"div">;
171
-
172
- export function ListItemRow({ className, render, ...props }: ListItemRowProps) {
173
- const theme = useThemeFamily();
174
- const { row } = listItem({ theme });
175
- const defaultProps: useRender.ElementProps<"div"> = {
176
- className: row({ className }),
177
- };
178
-
179
- return useRender({
180
- defaultTagName: "div",
181
- render,
182
- props: mergeProps<"div">(defaultProps, props),
183
- state: {
184
- slot: "list-item-row",
185
- },
186
- });
187
- }
188
-
189
- export type ListItemTitleProps = useRender.ComponentProps<"div">;
190
-
191
- export function ListItemTitle({ className, render, ...props }: ListItemTitleProps) {
192
- const theme = useThemeFamily();
193
- const { title } = listItem({ theme });
194
- const defaultProps: useRender.ElementProps<"div"> = {
195
- className: title({ className }),
196
- };
197
-
198
- return useRender({
199
- defaultTagName: "div",
200
- render,
201
- props: mergeProps<"div">(defaultProps, props),
202
- state: {
203
- slot: "list-item-title",
204
- },
205
- });
206
- }
207
-
208
- export type ListItemDescriptionProps = useRender.ComponentProps<"p">;
209
-
210
- export function ListItemDescription({ className, render, ...props }: ListItemDescriptionProps) {
211
- const theme = useThemeFamily();
212
- const { description } = listItem({ theme });
213
- const defaultProps: useRender.ElementProps<"p"> = {
214
- className: description({ className }),
215
- };
216
-
217
- return useRender({
218
- defaultTagName: "p",
219
- render,
220
- props: mergeProps<"p">(defaultProps, props),
221
- state: {
222
- slot: "list-item-description",
223
- },
224
- });
225
- }
226
-
227
- export type ListItemMetaProps = useRender.ComponentProps<"div">;
228
-
229
- export function ListItemMeta({ className, render, ...props }: ListItemMetaProps) {
230
- const theme = useThemeFamily();
231
- const { meta } = listItem({ theme });
232
- const defaultProps: useRender.ElementProps<"div"> = {
233
- className: meta({ className }),
234
- };
235
-
236
- return useRender({
237
- defaultTagName: "div",
238
- render,
239
- props: mergeProps<"div">(defaultProps, props),
240
- state: {
241
- slot: "list-item-meta",
242
- },
243
- });
244
- }
245
-
246
- export type ListItemActionGroupProps = useRender.ComponentProps<"div">;
247
-
248
- export function ListItemActionGroup({ className, render, ...props }: ListItemActionGroupProps) {
249
- const theme = useThemeFamily();
250
- const { actionGroup } = listItem({ theme });
251
- const defaultProps: useRender.ElementProps<"div"> = {
252
- className: actionGroup({ className }),
253
- };
254
-
255
- return useRender({
256
- defaultTagName: "div",
257
- render,
258
- props: mergeProps<"div">(defaultProps, props),
259
- state: {
260
- slot: "list-item-action-group",
261
- },
262
- });
263
- }
@@ -1,20 +0,0 @@
1
- export {
2
- MediaListItem,
3
- MediaListItemActionGroup,
4
- MediaListItemBody,
5
- MediaListItemText,
6
- MediaListItemTitle,
7
- MediaListItemSubtitle,
8
- MediaListItemAside,
9
- MediaListItemVisual,
10
- } from "./media-list-item";
11
- export type {
12
- MediaListItemProps,
13
- MediaListItemActionGroupProps,
14
- MediaListItemBodyProps,
15
- MediaListItemTextProps,
16
- MediaListItemTitleProps,
17
- MediaListItemSubtitleProps,
18
- MediaListItemAsideProps,
19
- MediaListItemVisualProps,
20
- } from "./media-list-item";