raft-ui 0.0.4 → 0.0.6
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 +11 -0
- package/README.md +5 -1
- package/dist/button-CJqMhTPQ.mjs +621 -0
- package/dist/index-CpGciYPW.d.mts +267 -0
- package/dist/index.d.mts +90 -254
- package/dist/index.mjs +121 -628
- package/dist/wip.d.mts +133 -15
- package/dist/wip.mjs +289 -16
- package/package.json +5 -9
- package/src/components/alert-dialog/alert-dialog.tsx +215 -0
- package/src/components/alert-dialog/index.ts +30 -0
- package/src/components/avatar/avatar.tsx +3 -3
- package/src/components/avatar/index.ts +2 -2
- package/src/components/badge/badge.tsx +2 -2
- package/src/components/badge/index.ts +2 -2
- package/src/components/banner/banner.tsx +2 -2
- package/src/components/banner/index.ts +2 -2
- package/src/components/bottom-sheet/bottom-sheet.tsx +3 -3
- package/src/components/bottom-sheet/index.ts +2 -2
- package/src/components/button/button.tsx +7 -5
- package/src/components/button/index.ts +2 -2
- package/src/components/checkbox/checkbox-indicator.tsx +2 -2
- package/src/components/checkbox/checkbox.tsx +4 -4
- package/src/components/checkbox/index.ts +2 -2
- package/src/components/combobox/combobox.tsx +4 -4
- package/src/components/combobox/index.ts +1 -1
- package/src/components/context-menu/context-menu.tsx +4 -4
- package/src/components/context-menu/index.ts +2 -2
- package/src/components/conversation-preview-card/conversation-preview-card.tsx +2 -2
- package/src/components/conversation-preview-card/index.ts +2 -2
- package/src/components/description-list/description-list.tsx +2 -2
- package/src/components/description-list/index.ts +2 -2
- package/src/components/dialog/dialog.tsx +152 -0
- package/src/components/dialog/index.ts +26 -0
- package/src/components/dropdown-menu/dropdown-menu.tsx +7 -7
- package/src/components/dropdown-menu/index.ts +2 -2
- package/src/components/empty-state/empty-state.tsx +2 -2
- package/src/components/empty-state/index.ts +2 -2
- package/src/components/field/field.tsx +4 -4
- package/src/components/field/index.ts +2 -2
- package/src/components/inline-code/index.ts +2 -2
- package/src/components/inline-code/inline-code.tsx +9 -7
- package/src/components/input/index.ts +2 -2
- package/src/components/input/input.tsx +4 -4
- package/src/components/input-group/index.ts +2 -2
- package/src/components/input-group/input-group.tsx +5 -5
- package/src/components/kbd/index.ts +2 -2
- package/src/components/kbd/kbd.tsx +2 -2
- package/src/components/label/index.ts +2 -7
- package/src/components/label/label.tsx +2 -2
- package/src/components/lightbox/index.ts +2 -2
- package/src/components/lightbox/lightbox.tsx +3 -3
- package/src/components/list-item/index.ts +2 -2
- package/src/components/list-item/list-item.tsx +2 -2
- package/src/components/media-list-item/index.ts +2 -2
- package/src/components/media-list-item/media-list-item.tsx +4 -4
- package/src/components/notification-center/index.ts +2 -2
- package/src/components/notification-center/notification-center.tsx +5 -5
- package/src/components/panel-header/index.ts +2 -2
- package/src/components/panel-header/panel-header.tsx +2 -2
- package/src/components/popover/index.ts +2 -2
- package/src/components/popover/popover.tsx +3 -3
- package/src/components/preview-shell/index.ts +2 -2
- package/src/components/preview-shell/preview-shell.tsx +2 -2
- package/src/components/quoted-message-card/index.ts +2 -2
- package/src/components/quoted-message-card/quoted-message-card.tsx +3 -3
- package/src/components/radio-group/index.ts +2 -6
- package/src/components/radio-group/radio-group.tsx +4 -4
- package/src/components/section-header/index.ts +2 -2
- package/src/components/section-header/section-header.tsx +2 -2
- package/src/components/section-label/index.ts +2 -2
- package/src/components/section-label/section-label.tsx +2 -2
- package/src/components/segmented-control/index.ts +2 -2
- package/src/components/segmented-control/segmented-control.tsx +3 -3
- package/src/components/select/index.ts +2 -2
- package/src/components/select/select.tsx +4 -4
- package/src/components/separator/index.ts +2 -0
- package/src/components/separator/separator.tsx +40 -0
- package/src/components/spinner/index.ts +2 -2
- package/src/components/spinner/spinner.tsx +3 -3
- package/src/components/status/index.ts +2 -2
- package/src/components/status/status.tsx +2 -2
- package/src/components/tabs/index.ts +2 -2
- package/src/components/tabs/tabs.tsx +43 -9
- package/src/components/text/index.ts +2 -2
- package/src/components/text/text.tsx +2 -1
- package/src/components/textarea/index.ts +2 -2
- package/src/components/textarea/textarea.tsx +3 -3
- package/src/components/toggle-group/index.ts +2 -7
- package/src/components/toggle-group/toggle-group.tsx +3 -3
- package/src/components/tooltip/index.ts +2 -8
- package/src/components/tooltip/tooltip.tsx +42 -16
- package/src/index.ts +60 -57
- package/src/legacy/AvatarListRow.tsx +1 -1
- package/src/legacy/Checkbox.tsx +1 -1
- package/src/legacy/ConversationPreviewCard.tsx +1 -1
- package/src/legacy/DismissBackdrop.tsx +1 -1
- package/src/legacy/ExperimentalBadge.tsx +1 -1
- package/src/legacy/NotificationCenter.tsx +2 -2
- package/src/legacy/PanelHeader.tsx +1 -1
- package/src/legacy/QuotedMessageCard.tsx +1 -1
- package/src/legacy/ReorderablePanelTabs.tsx +6 -1
- package/src/legacy/SectionHeader.tsx +1 -1
- package/src/legacy/Spinner.tsx +1 -1
- package/src/legacy/SurfaceListItem.tsx +1 -1
- package/src/legacy/selection-popover.tsx +2 -2
- package/src/legacy/server-switcher-menu.tsx +2 -2
- package/src/lib/theme/theme-provider.tsx +1 -1
- package/src/lib/theme/use-theme.ts +1 -1
- package/src/styles.css +5 -6
- package/src/wip.ts +82 -24
- package/dist/styled-props-B3SNekJg.d.mts +0 -16
- package/dist/use-theme-Y_h1DKll.mjs +0 -34
- package/src/fonts/brutal.css +0 -2
package/src/wip.ts
CHANGED
|
@@ -1,18 +1,76 @@
|
|
|
1
|
+
export {
|
|
2
|
+
Dialog,
|
|
3
|
+
DialogBody,
|
|
4
|
+
DialogClose,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogDescription,
|
|
7
|
+
DialogFooter,
|
|
8
|
+
DialogHeader,
|
|
9
|
+
DialogOverlay,
|
|
10
|
+
DialogPortal,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
DialogTrigger,
|
|
13
|
+
} from "./components/dialog/index";
|
|
14
|
+
export type {
|
|
15
|
+
DialogBodyProps,
|
|
16
|
+
DialogCloseProps,
|
|
17
|
+
DialogContentProps,
|
|
18
|
+
DialogDescriptionProps,
|
|
19
|
+
DialogFooterProps,
|
|
20
|
+
DialogHeaderProps,
|
|
21
|
+
DialogOverlayProps,
|
|
22
|
+
DialogPortalProps,
|
|
23
|
+
DialogProps,
|
|
24
|
+
DialogTitleProps,
|
|
25
|
+
DialogTriggerProps,
|
|
26
|
+
} from "./components/dialog/index";
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
AlertDialog,
|
|
30
|
+
AlertDialogAction,
|
|
31
|
+
AlertDialogBody,
|
|
32
|
+
AlertDialogCancel,
|
|
33
|
+
AlertDialogContent,
|
|
34
|
+
AlertDialogDescription,
|
|
35
|
+
AlertDialogFooter,
|
|
36
|
+
AlertDialogHeader,
|
|
37
|
+
AlertDialogMedia,
|
|
38
|
+
AlertDialogOverlay,
|
|
39
|
+
AlertDialogPortal,
|
|
40
|
+
AlertDialogTitle,
|
|
41
|
+
AlertDialogTrigger,
|
|
42
|
+
} from "./components/alert-dialog/index";
|
|
43
|
+
export type {
|
|
44
|
+
AlertDialogActionProps,
|
|
45
|
+
AlertDialogBodyProps,
|
|
46
|
+
AlertDialogCancelProps,
|
|
47
|
+
AlertDialogContentProps,
|
|
48
|
+
AlertDialogDescriptionProps,
|
|
49
|
+
AlertDialogFooterProps,
|
|
50
|
+
AlertDialogHeaderProps,
|
|
51
|
+
AlertDialogMediaProps,
|
|
52
|
+
AlertDialogOverlayProps,
|
|
53
|
+
AlertDialogPortalProps,
|
|
54
|
+
AlertDialogProps,
|
|
55
|
+
AlertDialogTitleProps,
|
|
56
|
+
AlertDialogTriggerProps,
|
|
57
|
+
} from "./components/alert-dialog/index";
|
|
58
|
+
|
|
1
59
|
export {
|
|
2
60
|
ToggleGroup,
|
|
3
61
|
ToggleGroupCount,
|
|
4
62
|
ToggleGroupItem,
|
|
5
63
|
ToggleGroupLabel,
|
|
6
|
-
} from "./components/toggle-group/index
|
|
64
|
+
} from "./components/toggle-group/index";
|
|
7
65
|
export type {
|
|
8
66
|
ToggleGroupCountProps,
|
|
9
67
|
ToggleGroupItemProps,
|
|
10
68
|
ToggleGroupLabelProps,
|
|
11
69
|
ToggleGroupProps,
|
|
12
|
-
} from "./components/toggle-group/index
|
|
70
|
+
} from "./components/toggle-group/index";
|
|
13
71
|
|
|
14
|
-
export { PreviewShell } from "./components/preview-shell/index
|
|
15
|
-
export type { PreviewShellProps } from "./components/preview-shell/index
|
|
72
|
+
export { PreviewShell } from "./components/preview-shell/index";
|
|
73
|
+
export type { PreviewShellProps } from "./components/preview-shell/index";
|
|
16
74
|
|
|
17
75
|
export {
|
|
18
76
|
MediaListItem,
|
|
@@ -23,7 +81,7 @@ export {
|
|
|
23
81
|
MediaListItemText,
|
|
24
82
|
MediaListItemTitle,
|
|
25
83
|
MediaListItemVisual,
|
|
26
|
-
} from "./components/media-list-item/index
|
|
84
|
+
} from "./components/media-list-item/index";
|
|
27
85
|
export type {
|
|
28
86
|
MediaListItemActionGroupProps,
|
|
29
87
|
MediaListItemAsideProps,
|
|
@@ -33,7 +91,7 @@ export type {
|
|
|
33
91
|
MediaListItemTextProps,
|
|
34
92
|
MediaListItemTitleProps,
|
|
35
93
|
MediaListItemVisualProps,
|
|
36
|
-
} from "./components/media-list-item/index
|
|
94
|
+
} from "./components/media-list-item/index";
|
|
37
95
|
|
|
38
96
|
export {
|
|
39
97
|
PanelHeader,
|
|
@@ -45,7 +103,7 @@ export {
|
|
|
45
103
|
PanelHeaderTitle,
|
|
46
104
|
PanelHeaderTitleRow,
|
|
47
105
|
PanelHeaderVisual,
|
|
48
|
-
} from "./components/panel-header/index
|
|
106
|
+
} from "./components/panel-header/index";
|
|
49
107
|
export type {
|
|
50
108
|
PanelHeaderActionsProps,
|
|
51
109
|
PanelHeaderContentProps,
|
|
@@ -56,7 +114,7 @@ export type {
|
|
|
56
114
|
PanelHeaderTitleProps,
|
|
57
115
|
PanelHeaderTitleRowProps,
|
|
58
116
|
PanelHeaderVisualProps,
|
|
59
|
-
} from "./components/panel-header/index
|
|
117
|
+
} from "./components/panel-header/index";
|
|
60
118
|
|
|
61
119
|
export {
|
|
62
120
|
QuotedMessageCard,
|
|
@@ -75,7 +133,7 @@ export {
|
|
|
75
133
|
QuotedMessageCardThread,
|
|
76
134
|
QuotedMessageCardTimestamp,
|
|
77
135
|
QuotedMessageCardUnavailable,
|
|
78
|
-
} from "./components/quoted-message-card/index
|
|
136
|
+
} from "./components/quoted-message-card/index";
|
|
79
137
|
export type {
|
|
80
138
|
QuotedMessageCardAttachmentsProps,
|
|
81
139
|
QuotedMessageCardAuthorNameProps,
|
|
@@ -93,7 +151,7 @@ export type {
|
|
|
93
151
|
QuotedMessageCardThreadProps,
|
|
94
152
|
QuotedMessageCardTimestampProps,
|
|
95
153
|
QuotedMessageCardUnavailableProps,
|
|
96
|
-
} from "./components/quoted-message-card/index
|
|
154
|
+
} from "./components/quoted-message-card/index";
|
|
97
155
|
|
|
98
156
|
export {
|
|
99
157
|
ConversationPreviewCard,
|
|
@@ -110,7 +168,7 @@ export {
|
|
|
110
168
|
ConversationPreviewCardPreviewLeading,
|
|
111
169
|
ConversationPreviewCardSecondaryPreview,
|
|
112
170
|
ConversationPreviewCardTimestamp,
|
|
113
|
-
} from "./components/conversation-preview-card/index
|
|
171
|
+
} from "./components/conversation-preview-card/index";
|
|
114
172
|
export type {
|
|
115
173
|
ConversationPreviewCardActionProps,
|
|
116
174
|
ConversationPreviewCardAuthorNameProps,
|
|
@@ -126,10 +184,10 @@ export type {
|
|
|
126
184
|
ConversationPreviewCardProps,
|
|
127
185
|
ConversationPreviewCardSecondaryPreviewProps,
|
|
128
186
|
ConversationPreviewCardTimestampProps,
|
|
129
|
-
} from "./components/conversation-preview-card/index
|
|
187
|
+
} from "./components/conversation-preview-card/index";
|
|
130
188
|
|
|
131
|
-
export { SectionLabel } from "./components/section-label/index
|
|
132
|
-
export type { SectionLabelProps } from "./components/section-label/index
|
|
189
|
+
export { SectionLabel } from "./components/section-label/index";
|
|
190
|
+
export type { SectionLabelProps } from "./components/section-label/index";
|
|
133
191
|
|
|
134
192
|
export {
|
|
135
193
|
SectionHeader,
|
|
@@ -138,7 +196,7 @@ export {
|
|
|
138
196
|
SectionHeaderCount,
|
|
139
197
|
SectionHeaderIcon,
|
|
140
198
|
SectionHeaderTitle,
|
|
141
|
-
} from "./components/section-header/index
|
|
199
|
+
} from "./components/section-header/index";
|
|
142
200
|
export type {
|
|
143
201
|
SectionHeaderActionsProps,
|
|
144
202
|
SectionHeaderContentProps,
|
|
@@ -146,7 +204,7 @@ export type {
|
|
|
146
204
|
SectionHeaderIconProps,
|
|
147
205
|
SectionHeaderProps,
|
|
148
206
|
SectionHeaderTitleProps,
|
|
149
|
-
} from "./components/section-header/index
|
|
207
|
+
} from "./components/section-header/index";
|
|
150
208
|
|
|
151
209
|
export {
|
|
152
210
|
DescriptionAction,
|
|
@@ -154,14 +212,14 @@ export {
|
|
|
154
212
|
DescriptionItem,
|
|
155
213
|
DescriptionList,
|
|
156
214
|
DescriptionTerm,
|
|
157
|
-
} from "./components/description-list/index
|
|
215
|
+
} from "./components/description-list/index";
|
|
158
216
|
export type {
|
|
159
217
|
DescriptionActionProps,
|
|
160
218
|
DescriptionDetailsProps,
|
|
161
219
|
DescriptionItemProps,
|
|
162
220
|
DescriptionListProps,
|
|
163
221
|
DescriptionTermProps,
|
|
164
|
-
} from "./components/description-list/index
|
|
222
|
+
} from "./components/description-list/index";
|
|
165
223
|
|
|
166
224
|
export {
|
|
167
225
|
ListItem,
|
|
@@ -172,7 +230,7 @@ export {
|
|
|
172
230
|
ListItemMeta,
|
|
173
231
|
ListItemRow,
|
|
174
232
|
ListItemTitle,
|
|
175
|
-
} from "./components/list-item/index
|
|
233
|
+
} from "./components/list-item/index";
|
|
176
234
|
export type {
|
|
177
235
|
ListItemActionGroupProps,
|
|
178
236
|
ListItemBodyProps,
|
|
@@ -182,7 +240,7 @@ export type {
|
|
|
182
240
|
ListItemProps,
|
|
183
241
|
ListItemRowProps,
|
|
184
242
|
ListItemTitleProps,
|
|
185
|
-
} from "./components/list-item/index
|
|
243
|
+
} from "./components/list-item/index";
|
|
186
244
|
|
|
187
245
|
export {
|
|
188
246
|
Lightbox,
|
|
@@ -195,7 +253,7 @@ export {
|
|
|
195
253
|
LightboxStage,
|
|
196
254
|
LightboxTitle,
|
|
197
255
|
LightboxTrigger,
|
|
198
|
-
} from "./components/lightbox/index
|
|
256
|
+
} from "./components/lightbox/index";
|
|
199
257
|
export type {
|
|
200
258
|
LightboxActionsProps,
|
|
201
259
|
LightboxCloseProps,
|
|
@@ -207,7 +265,7 @@ export type {
|
|
|
207
265
|
LightboxStageProps,
|
|
208
266
|
LightboxTitleProps,
|
|
209
267
|
LightboxTriggerProps,
|
|
210
|
-
} from "./components/lightbox/index
|
|
268
|
+
} from "./components/lightbox/index";
|
|
211
269
|
|
|
212
270
|
export {
|
|
213
271
|
BottomSheet,
|
|
@@ -219,7 +277,7 @@ export {
|
|
|
219
277
|
BottomSheetPortal,
|
|
220
278
|
BottomSheetTitle,
|
|
221
279
|
BottomSheetTrigger,
|
|
222
|
-
} from "./components/bottom-sheet/index
|
|
280
|
+
} from "./components/bottom-sheet/index";
|
|
223
281
|
export type {
|
|
224
282
|
BottomSheetCloseProps,
|
|
225
283
|
BottomSheetContentProps,
|
|
@@ -230,4 +288,4 @@ export type {
|
|
|
230
288
|
BottomSheetProps,
|
|
231
289
|
BottomSheetTitleProps,
|
|
232
290
|
BottomSheetTriggerProps,
|
|
233
|
-
} from "./components/bottom-sheet/index
|
|
291
|
+
} from "./components/bottom-sheet/index";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from "tailwind-variants/lite";
|
|
2
|
-
|
|
3
|
-
//#region src/lib/styled-props.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Base UI components type `className` as `string | ((state) => string)`, but our
|
|
6
|
-
* tv() recipes only accept a plain string. `StyledProps` narrows a Base UI
|
|
7
|
-
* component's props to a string `className` so they can flow into a recipe.
|
|
8
|
-
*
|
|
9
|
-
* The state-callback form is intentionally dropped: our components express every
|
|
10
|
-
* state through `data-*` variants in the recipe, so a caller never needs it.
|
|
11
|
-
*/
|
|
12
|
-
type StyledProps<P> = Omit<P, "className"> & {
|
|
13
|
-
className?: string;
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { VariantProps as n, StyledProps as t };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { cn } from "cnfast";
|
|
2
|
-
import { tv } from "tailwind-variants/lite";
|
|
3
|
-
import { createContext, use } from "react";
|
|
4
|
-
//#region src/lib/tv.ts
|
|
5
|
-
const tv$1 = ((options) => {
|
|
6
|
-
const recipe = tv(options);
|
|
7
|
-
const wrappedRecipe = ((props) => {
|
|
8
|
-
const result = recipe(props);
|
|
9
|
-
if (typeof result === "string") return cn(result);
|
|
10
|
-
return Object.fromEntries(Object.entries(result).map(([slotName, slot]) => [slotName, (slotProps) => cn(slot(slotProps))]));
|
|
11
|
-
});
|
|
12
|
-
return Object.assign(wrappedRecipe, recipe);
|
|
13
|
-
});
|
|
14
|
-
//#endregion
|
|
15
|
-
//#region src/lib/theme/theme-context.ts
|
|
16
|
-
const ThemeContext = createContext("brutal");
|
|
17
|
-
const ThemeStateContext = createContext({
|
|
18
|
-
theme: "brutal",
|
|
19
|
-
setTheme: () => void 0,
|
|
20
|
-
mode: "light",
|
|
21
|
-
resolvedMode: "light"
|
|
22
|
-
});
|
|
23
|
-
//#endregion
|
|
24
|
-
//#region src/lib/theme/use-theme.ts
|
|
25
|
-
/** Read the active style family for theme-aware component recipes. */
|
|
26
|
-
function useThemeFamily() {
|
|
27
|
-
return use(ThemeContext);
|
|
28
|
-
}
|
|
29
|
-
/** Read and update the application-level RUI theme selection. */
|
|
30
|
-
function useTheme() {
|
|
31
|
-
return use(ThemeStateContext);
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
export { tv$1 as a, ThemeStateContext as i, useThemeFamily as n, ThemeContext as r, useTheme as t };
|
package/src/fonts/brutal.css
DELETED