raft-ui 0.0.8 → 0.0.9
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 +12 -7
- package/dist/button-jUlaK4eN.mjs +722 -0
- package/dist/index-lPUAF7fl.d.mts +267 -0
- package/dist/index.d.mts +1 -252
- package/dist/index.mjs +39 -621
- package/dist/styles.css +80 -4
- package/dist/wip.d.mts +70 -16
- package/dist/wip.mjs +150 -30
- package/package.json +3 -2
- package/dist/tv-UUMwNowu.d.mts +0 -16
- package/dist/use-theme-Y_h1DKll.mjs +0 -34
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { VariantProps } from "tailwind-variants/lite";
|
|
2
|
+
import { Button } from "@base-ui/react/button";
|
|
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 { StyledProps as a, VariantProps as i, ButtonProps as n, buttonVariants as r, Button$1 as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as StyledProps, i as VariantProps, n as ButtonProps, r as buttonVariants, t as Button } from "./index-lPUAF7fl.mjs";
|
|
2
2
|
import { cn } from "./cn.mjs";
|
|
3
3
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
4
4
|
import { ComponentPropsWithRef, ReactNode } from "react";
|
|
5
|
-
import { Button as Button$1 } from "@base-ui/react/button";
|
|
6
5
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
6
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
8
7
|
import { Avatar as Avatar$1, ContextMenu as ContextMenu$1 } from "@base-ui/react";
|
|
@@ -19,256 +18,6 @@ import { Switch as Switch$1 } from "@base-ui/react/switch";
|
|
|
19
18
|
import { Tabs as Tabs$1 } from "@base-ui/react/tabs";
|
|
20
19
|
import { Separator as Separator$1 } from "@base-ui/react/separator";
|
|
21
20
|
|
|
22
|
-
//#region src/components/button/button.d.ts
|
|
23
|
-
declare const buttonVariants: import("tailwind-variants/lite").TVReturnType<{
|
|
24
|
-
theme: {
|
|
25
|
-
brutal: {
|
|
26
|
-
root: string[];
|
|
27
|
-
};
|
|
28
|
-
elegant: {
|
|
29
|
-
root: string[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
variant: {
|
|
33
|
-
primary: {
|
|
34
|
-
root: string[];
|
|
35
|
-
};
|
|
36
|
-
default: {
|
|
37
|
-
root: string[];
|
|
38
|
-
};
|
|
39
|
-
information: {
|
|
40
|
-
root: string[];
|
|
41
|
-
};
|
|
42
|
-
muted: {
|
|
43
|
-
root: string[];
|
|
44
|
-
};
|
|
45
|
-
accent: {
|
|
46
|
-
root: string[];
|
|
47
|
-
};
|
|
48
|
-
warning: {
|
|
49
|
-
root: string[];
|
|
50
|
-
};
|
|
51
|
-
outline: {
|
|
52
|
-
root: string[];
|
|
53
|
-
};
|
|
54
|
-
ghost: {
|
|
55
|
-
root: string[];
|
|
56
|
-
};
|
|
57
|
-
link: {
|
|
58
|
-
root: string[];
|
|
59
|
-
};
|
|
60
|
-
"danger-secondary": {
|
|
61
|
-
root: string[];
|
|
62
|
-
};
|
|
63
|
-
danger: {
|
|
64
|
-
root: string[];
|
|
65
|
-
};
|
|
66
|
-
"danger-outline": {
|
|
67
|
-
root: string[];
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
size: {
|
|
71
|
-
xs: {
|
|
72
|
-
root: string[];
|
|
73
|
-
};
|
|
74
|
-
sm: {
|
|
75
|
-
root: string[];
|
|
76
|
-
};
|
|
77
|
-
md: {
|
|
78
|
-
root: string[];
|
|
79
|
-
};
|
|
80
|
-
lg: {
|
|
81
|
-
root: string[];
|
|
82
|
-
};
|
|
83
|
-
"icon-xs": {
|
|
84
|
-
root: string[];
|
|
85
|
-
};
|
|
86
|
-
"icon-sm": {
|
|
87
|
-
root: string[];
|
|
88
|
-
};
|
|
89
|
-
"icon-md": {
|
|
90
|
-
root: string[];
|
|
91
|
-
};
|
|
92
|
-
"icon-lg": {
|
|
93
|
-
root: string[];
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
}, {
|
|
97
|
-
root: string[];
|
|
98
|
-
content: string;
|
|
99
|
-
loadingIndicator: string;
|
|
100
|
-
}, undefined, {
|
|
101
|
-
theme: {
|
|
102
|
-
brutal: {
|
|
103
|
-
root: string[];
|
|
104
|
-
};
|
|
105
|
-
elegant: {
|
|
106
|
-
root: string[];
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
variant: {
|
|
110
|
-
primary: {
|
|
111
|
-
root: string[];
|
|
112
|
-
};
|
|
113
|
-
default: {
|
|
114
|
-
root: string[];
|
|
115
|
-
};
|
|
116
|
-
information: {
|
|
117
|
-
root: string[];
|
|
118
|
-
};
|
|
119
|
-
muted: {
|
|
120
|
-
root: string[];
|
|
121
|
-
};
|
|
122
|
-
accent: {
|
|
123
|
-
root: string[];
|
|
124
|
-
};
|
|
125
|
-
warning: {
|
|
126
|
-
root: string[];
|
|
127
|
-
};
|
|
128
|
-
outline: {
|
|
129
|
-
root: string[];
|
|
130
|
-
};
|
|
131
|
-
ghost: {
|
|
132
|
-
root: string[];
|
|
133
|
-
};
|
|
134
|
-
link: {
|
|
135
|
-
root: string[];
|
|
136
|
-
};
|
|
137
|
-
"danger-secondary": {
|
|
138
|
-
root: string[];
|
|
139
|
-
};
|
|
140
|
-
danger: {
|
|
141
|
-
root: string[];
|
|
142
|
-
};
|
|
143
|
-
"danger-outline": {
|
|
144
|
-
root: string[];
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
size: {
|
|
148
|
-
xs: {
|
|
149
|
-
root: string[];
|
|
150
|
-
};
|
|
151
|
-
sm: {
|
|
152
|
-
root: string[];
|
|
153
|
-
};
|
|
154
|
-
md: {
|
|
155
|
-
root: string[];
|
|
156
|
-
};
|
|
157
|
-
lg: {
|
|
158
|
-
root: string[];
|
|
159
|
-
};
|
|
160
|
-
"icon-xs": {
|
|
161
|
-
root: string[];
|
|
162
|
-
};
|
|
163
|
-
"icon-sm": {
|
|
164
|
-
root: string[];
|
|
165
|
-
};
|
|
166
|
-
"icon-md": {
|
|
167
|
-
root: string[];
|
|
168
|
-
};
|
|
169
|
-
"icon-lg": {
|
|
170
|
-
root: string[];
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
}, {
|
|
174
|
-
root: string[];
|
|
175
|
-
content: string;
|
|
176
|
-
loadingIndicator: string;
|
|
177
|
-
}, import("tailwind-variants/lite").TVReturnType<{
|
|
178
|
-
theme: {
|
|
179
|
-
brutal: {
|
|
180
|
-
root: string[];
|
|
181
|
-
};
|
|
182
|
-
elegant: {
|
|
183
|
-
root: string[];
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
variant: {
|
|
187
|
-
primary: {
|
|
188
|
-
root: string[];
|
|
189
|
-
};
|
|
190
|
-
default: {
|
|
191
|
-
root: string[];
|
|
192
|
-
};
|
|
193
|
-
information: {
|
|
194
|
-
root: string[];
|
|
195
|
-
};
|
|
196
|
-
muted: {
|
|
197
|
-
root: string[];
|
|
198
|
-
};
|
|
199
|
-
accent: {
|
|
200
|
-
root: string[];
|
|
201
|
-
};
|
|
202
|
-
warning: {
|
|
203
|
-
root: string[];
|
|
204
|
-
};
|
|
205
|
-
outline: {
|
|
206
|
-
root: string[];
|
|
207
|
-
};
|
|
208
|
-
ghost: {
|
|
209
|
-
root: string[];
|
|
210
|
-
};
|
|
211
|
-
link: {
|
|
212
|
-
root: string[];
|
|
213
|
-
};
|
|
214
|
-
"danger-secondary": {
|
|
215
|
-
root: string[];
|
|
216
|
-
};
|
|
217
|
-
danger: {
|
|
218
|
-
root: string[];
|
|
219
|
-
};
|
|
220
|
-
"danger-outline": {
|
|
221
|
-
root: string[];
|
|
222
|
-
};
|
|
223
|
-
};
|
|
224
|
-
size: {
|
|
225
|
-
xs: {
|
|
226
|
-
root: string[];
|
|
227
|
-
};
|
|
228
|
-
sm: {
|
|
229
|
-
root: string[];
|
|
230
|
-
};
|
|
231
|
-
md: {
|
|
232
|
-
root: string[];
|
|
233
|
-
};
|
|
234
|
-
lg: {
|
|
235
|
-
root: string[];
|
|
236
|
-
};
|
|
237
|
-
"icon-xs": {
|
|
238
|
-
root: string[];
|
|
239
|
-
};
|
|
240
|
-
"icon-sm": {
|
|
241
|
-
root: string[];
|
|
242
|
-
};
|
|
243
|
-
"icon-md": {
|
|
244
|
-
root: string[];
|
|
245
|
-
};
|
|
246
|
-
"icon-lg": {
|
|
247
|
-
root: string[];
|
|
248
|
-
};
|
|
249
|
-
};
|
|
250
|
-
}, {
|
|
251
|
-
root: string[];
|
|
252
|
-
content: string;
|
|
253
|
-
loadingIndicator: string;
|
|
254
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
255
|
-
type ButtonProps = StyledProps<Button$1.Props> & Omit<VariantProps<typeof buttonVariants>, "theme"> & {
|
|
256
|
-
loading?: boolean;
|
|
257
|
-
loadingLabel?: string;
|
|
258
|
-
};
|
|
259
|
-
declare function Button({
|
|
260
|
-
variant,
|
|
261
|
-
size,
|
|
262
|
-
loading,
|
|
263
|
-
loadingLabel,
|
|
264
|
-
disabled,
|
|
265
|
-
className,
|
|
266
|
-
children,
|
|
267
|
-
render,
|
|
268
|
-
nativeButton,
|
|
269
|
-
...props
|
|
270
|
-
}: ButtonProps): import("react").JSX.Element;
|
|
271
|
-
//#endregion
|
|
272
21
|
//#region src/components/alert-dialog/alert-dialog.d.ts
|
|
273
22
|
type AlertDialogProps = Dialog$1.Root.Props;
|
|
274
23
|
declare function AlertDialog(props: AlertDialogProps): import("react").JSX.Element;
|