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
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { Button } from "@base-ui/react/button";
|
|
2
|
+
import { VariantProps } from "tailwind-variants/lite";
|
|
3
|
+
|
|
4
|
+
//#region src/lib/styled-props.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Base UI components type `className` as `string | ((state) => string)`, but our
|
|
7
|
+
* tv() recipes only accept a plain string. `StyledProps` narrows a Base UI
|
|
8
|
+
* component's props to a string `className` so they can flow into a recipe.
|
|
9
|
+
*
|
|
10
|
+
* The state-callback form is intentionally dropped: our components express every
|
|
11
|
+
* state through `data-*` variants in the recipe, so a caller never needs it.
|
|
12
|
+
*/
|
|
13
|
+
type StyledProps<P> = Omit<P, "className"> & {
|
|
14
|
+
className?: string;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/button/button.d.ts
|
|
18
|
+
declare const buttonVariants: import("tailwind-variants/lite").TVReturnType<{
|
|
19
|
+
theme: {
|
|
20
|
+
brutal: {
|
|
21
|
+
root: string[];
|
|
22
|
+
};
|
|
23
|
+
elegant: {
|
|
24
|
+
root: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
variant: {
|
|
28
|
+
primary: {
|
|
29
|
+
root: string[];
|
|
30
|
+
};
|
|
31
|
+
default: {
|
|
32
|
+
root: string[];
|
|
33
|
+
};
|
|
34
|
+
information: {
|
|
35
|
+
root: string[];
|
|
36
|
+
};
|
|
37
|
+
muted: {
|
|
38
|
+
root: string[];
|
|
39
|
+
};
|
|
40
|
+
accent: {
|
|
41
|
+
root: string[];
|
|
42
|
+
};
|
|
43
|
+
warning: {
|
|
44
|
+
root: string[];
|
|
45
|
+
};
|
|
46
|
+
outline: {
|
|
47
|
+
root: string[];
|
|
48
|
+
};
|
|
49
|
+
ghost: {
|
|
50
|
+
root: string[];
|
|
51
|
+
};
|
|
52
|
+
link: {
|
|
53
|
+
root: string[];
|
|
54
|
+
};
|
|
55
|
+
"danger-secondary": {
|
|
56
|
+
root: string[];
|
|
57
|
+
};
|
|
58
|
+
danger: {
|
|
59
|
+
root: string[];
|
|
60
|
+
};
|
|
61
|
+
"danger-outline": {
|
|
62
|
+
root: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
xs: {
|
|
67
|
+
root: string[];
|
|
68
|
+
};
|
|
69
|
+
sm: {
|
|
70
|
+
root: string[];
|
|
71
|
+
};
|
|
72
|
+
md: {
|
|
73
|
+
root: string[];
|
|
74
|
+
};
|
|
75
|
+
lg: {
|
|
76
|
+
root: string[];
|
|
77
|
+
};
|
|
78
|
+
"icon-xs": {
|
|
79
|
+
root: string[];
|
|
80
|
+
};
|
|
81
|
+
"icon-sm": {
|
|
82
|
+
root: string[];
|
|
83
|
+
};
|
|
84
|
+
"icon-md": {
|
|
85
|
+
root: string[];
|
|
86
|
+
};
|
|
87
|
+
"icon-lg": {
|
|
88
|
+
root: string[];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
root: string[];
|
|
93
|
+
content: string;
|
|
94
|
+
loadingIndicator: string;
|
|
95
|
+
}, undefined, {
|
|
96
|
+
theme: {
|
|
97
|
+
brutal: {
|
|
98
|
+
root: string[];
|
|
99
|
+
};
|
|
100
|
+
elegant: {
|
|
101
|
+
root: string[];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
variant: {
|
|
105
|
+
primary: {
|
|
106
|
+
root: string[];
|
|
107
|
+
};
|
|
108
|
+
default: {
|
|
109
|
+
root: string[];
|
|
110
|
+
};
|
|
111
|
+
information: {
|
|
112
|
+
root: string[];
|
|
113
|
+
};
|
|
114
|
+
muted: {
|
|
115
|
+
root: string[];
|
|
116
|
+
};
|
|
117
|
+
accent: {
|
|
118
|
+
root: string[];
|
|
119
|
+
};
|
|
120
|
+
warning: {
|
|
121
|
+
root: string[];
|
|
122
|
+
};
|
|
123
|
+
outline: {
|
|
124
|
+
root: string[];
|
|
125
|
+
};
|
|
126
|
+
ghost: {
|
|
127
|
+
root: string[];
|
|
128
|
+
};
|
|
129
|
+
link: {
|
|
130
|
+
root: string[];
|
|
131
|
+
};
|
|
132
|
+
"danger-secondary": {
|
|
133
|
+
root: string[];
|
|
134
|
+
};
|
|
135
|
+
danger: {
|
|
136
|
+
root: string[];
|
|
137
|
+
};
|
|
138
|
+
"danger-outline": {
|
|
139
|
+
root: string[];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
size: {
|
|
143
|
+
xs: {
|
|
144
|
+
root: string[];
|
|
145
|
+
};
|
|
146
|
+
sm: {
|
|
147
|
+
root: string[];
|
|
148
|
+
};
|
|
149
|
+
md: {
|
|
150
|
+
root: string[];
|
|
151
|
+
};
|
|
152
|
+
lg: {
|
|
153
|
+
root: string[];
|
|
154
|
+
};
|
|
155
|
+
"icon-xs": {
|
|
156
|
+
root: string[];
|
|
157
|
+
};
|
|
158
|
+
"icon-sm": {
|
|
159
|
+
root: string[];
|
|
160
|
+
};
|
|
161
|
+
"icon-md": {
|
|
162
|
+
root: string[];
|
|
163
|
+
};
|
|
164
|
+
"icon-lg": {
|
|
165
|
+
root: string[];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}, {
|
|
169
|
+
root: string[];
|
|
170
|
+
content: string;
|
|
171
|
+
loadingIndicator: string;
|
|
172
|
+
}, import("tailwind-variants/lite").TVReturnType<{
|
|
173
|
+
theme: {
|
|
174
|
+
brutal: {
|
|
175
|
+
root: string[];
|
|
176
|
+
};
|
|
177
|
+
elegant: {
|
|
178
|
+
root: string[];
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
variant: {
|
|
182
|
+
primary: {
|
|
183
|
+
root: string[];
|
|
184
|
+
};
|
|
185
|
+
default: {
|
|
186
|
+
root: string[];
|
|
187
|
+
};
|
|
188
|
+
information: {
|
|
189
|
+
root: string[];
|
|
190
|
+
};
|
|
191
|
+
muted: {
|
|
192
|
+
root: string[];
|
|
193
|
+
};
|
|
194
|
+
accent: {
|
|
195
|
+
root: string[];
|
|
196
|
+
};
|
|
197
|
+
warning: {
|
|
198
|
+
root: string[];
|
|
199
|
+
};
|
|
200
|
+
outline: {
|
|
201
|
+
root: string[];
|
|
202
|
+
};
|
|
203
|
+
ghost: {
|
|
204
|
+
root: string[];
|
|
205
|
+
};
|
|
206
|
+
link: {
|
|
207
|
+
root: string[];
|
|
208
|
+
};
|
|
209
|
+
"danger-secondary": {
|
|
210
|
+
root: string[];
|
|
211
|
+
};
|
|
212
|
+
danger: {
|
|
213
|
+
root: string[];
|
|
214
|
+
};
|
|
215
|
+
"danger-outline": {
|
|
216
|
+
root: string[];
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
size: {
|
|
220
|
+
xs: {
|
|
221
|
+
root: string[];
|
|
222
|
+
};
|
|
223
|
+
sm: {
|
|
224
|
+
root: string[];
|
|
225
|
+
};
|
|
226
|
+
md: {
|
|
227
|
+
root: string[];
|
|
228
|
+
};
|
|
229
|
+
lg: {
|
|
230
|
+
root: string[];
|
|
231
|
+
};
|
|
232
|
+
"icon-xs": {
|
|
233
|
+
root: string[];
|
|
234
|
+
};
|
|
235
|
+
"icon-sm": {
|
|
236
|
+
root: string[];
|
|
237
|
+
};
|
|
238
|
+
"icon-md": {
|
|
239
|
+
root: string[];
|
|
240
|
+
};
|
|
241
|
+
"icon-lg": {
|
|
242
|
+
root: string[];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
}, {
|
|
246
|
+
root: string[];
|
|
247
|
+
content: string;
|
|
248
|
+
loadingIndicator: string;
|
|
249
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
250
|
+
type ButtonProps = StyledProps<Button.Props> & Omit<VariantProps<typeof buttonVariants>, "theme"> & {
|
|
251
|
+
loading?: boolean;
|
|
252
|
+
loadingLabel?: string;
|
|
253
|
+
};
|
|
254
|
+
declare function Button$1({
|
|
255
|
+
variant,
|
|
256
|
+
size,
|
|
257
|
+
loading,
|
|
258
|
+
loadingLabel,
|
|
259
|
+
disabled,
|
|
260
|
+
className,
|
|
261
|
+
children,
|
|
262
|
+
render,
|
|
263
|
+
nativeButton,
|
|
264
|
+
...props
|
|
265
|
+
}: ButtonProps): import("react").JSX.Element;
|
|
266
|
+
//#endregion
|
|
267
|
+
export { VariantProps as a, StyledProps as i, ButtonProps as n, buttonVariants as r, Button$1 as t };
|