strata-ui-react 0.1.5 → 0.1.7
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/dist/index.d.ts +48 -43
- package/dist/strata-ui-react.cjs.js +1 -1
- package/dist/strata-ui-react.es.js +487 -487
- package/dist/strata-ui-react.umd.js +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Avatar as Avatar_2 } from '@base-ui/react/avatar';
|
|
|
4
4
|
import { Checkbox as Checkbox_2 } from '@base-ui/react/checkbox';
|
|
5
5
|
import { ClassProp } from 'class-variance-authority/types';
|
|
6
6
|
import { ClassValue } from 'clsx';
|
|
7
|
+
import { ComponentProps } from 'react';
|
|
7
8
|
import { DeepKeysOfType } from '@tanstack/react-form';
|
|
8
9
|
import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
|
|
9
10
|
import { FieldsMap } from '@tanstack/react-form';
|
|
@@ -14,15 +15,19 @@ import { FunctionComponent } from 'react';
|
|
|
14
15
|
import { Icon } from '@phosphor-icons/react';
|
|
15
16
|
import { Input as Input_2 } from '@base-ui/react/input';
|
|
16
17
|
import { JSX } from 'react/jsx-runtime';
|
|
18
|
+
import { KeyboardEventHandler } from 'react';
|
|
19
|
+
import { MouseEventHandler } from 'react';
|
|
17
20
|
import { PropsWithChildren } from 'react';
|
|
18
21
|
import { Ranger } from '@tanstack/react-ranger';
|
|
19
|
-
import
|
|
22
|
+
import { ReactNode } from 'react';
|
|
23
|
+
import { RefObject } from 'react';
|
|
20
24
|
import { ScrollArea as ScrollArea_2 } from '@base-ui/react/scroll-area';
|
|
21
25
|
import { Separator as Separator_2 } from '@base-ui/react/separator';
|
|
22
26
|
import { Switch as Switch_2 } from '@base-ui/react/switch';
|
|
23
27
|
import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
|
|
24
28
|
import { Toast as Toast_2 } from '@base-ui/react/toast';
|
|
25
29
|
import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
30
|
+
import { TouchEventHandler } from 'react';
|
|
26
31
|
import { VariantProps } from 'class-variance-authority';
|
|
27
32
|
import { WithFieldGroupProps } from '@tanstack/react-form';
|
|
28
33
|
import { WithFormProps } from '@tanstack/react-form';
|
|
@@ -31,13 +36,13 @@ export declare const Avatar: ({ className, children, ref, ...props }: AvatarProp
|
|
|
31
36
|
|
|
32
37
|
export declare const AvatarFallback: ({ className, ref, ...props }: AvatarFallbackProps) => JSX.Element;
|
|
33
38
|
|
|
34
|
-
export declare type AvatarFallbackProps =
|
|
39
|
+
export declare type AvatarFallbackProps = ComponentProps<typeof Avatar_2.Fallback>;
|
|
35
40
|
|
|
36
41
|
export declare const AvatarImage: ({ className, ref, ...props }: AvatarImageProps) => JSX.Element;
|
|
37
42
|
|
|
38
|
-
export declare type AvatarImageProps =
|
|
43
|
+
export declare type AvatarImageProps = ComponentProps<typeof Avatar_2.Image>;
|
|
39
44
|
|
|
40
|
-
export declare type AvatarProps =
|
|
45
|
+
export declare type AvatarProps = ComponentProps<typeof Avatar_2.Root>;
|
|
41
46
|
|
|
42
47
|
export declare const Badge: ({ className, tone, style, radius, children, ref, ...props }: BadgeExtendedProps) => JSX.Element;
|
|
43
48
|
|
|
@@ -46,7 +51,7 @@ export declare interface BadgeExtendedProps extends Omit<BadgeProps, "style">, V
|
|
|
46
51
|
radius?: "rounded" | "circle";
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
declare type BadgeProps =
|
|
54
|
+
declare type BadgeProps = ComponentProps<"div">;
|
|
50
55
|
|
|
51
56
|
declare const badgeVariants: (props?: ({
|
|
52
57
|
tone?: "primary" | "secondary" | "tertiary" | "neutral" | "error" | "success" | "warning" | null | undefined;
|
|
@@ -56,7 +61,7 @@ declare const badgeVariants: (props?: ({
|
|
|
56
61
|
|
|
57
62
|
export declare function Button({ className, children, tone, style, size, ...props }: ButtonExtendedProps): JSX.Element;
|
|
58
63
|
|
|
59
|
-
export declare interface ButtonExtendedProps extends Omit<
|
|
64
|
+
export declare interface ButtonExtendedProps extends Omit<ComponentProps<"button">, "style">, VariantProps<typeof buttonVariants> {
|
|
60
65
|
style?: "solid" | "outline" | "ghost";
|
|
61
66
|
}
|
|
62
67
|
|
|
@@ -70,10 +75,10 @@ export declare const Checkbox: ({ className, ref, label, id, disabled, ...props
|
|
|
70
75
|
|
|
71
76
|
export declare const CheckboxIndicator: ({ className, ...props }: CheckboxIndicatorProps) => JSX.Element;
|
|
72
77
|
|
|
73
|
-
export declare type CheckboxIndicatorProps =
|
|
78
|
+
export declare type CheckboxIndicatorProps = ComponentProps<typeof Checkbox_2.Indicator>;
|
|
74
79
|
|
|
75
|
-
export declare type CheckboxRootProps =
|
|
76
|
-
label?:
|
|
80
|
+
export declare type CheckboxRootProps = ComponentProps<typeof Checkbox_2.Root> & {
|
|
81
|
+
label?: ReactNode;
|
|
77
82
|
};
|
|
78
83
|
|
|
79
84
|
export declare function cn(...inputs: Array<ClassValue>): string;
|
|
@@ -82,31 +87,31 @@ export declare const Dialog: ({ ...props }: DialogProps) => JSX.Element;
|
|
|
82
87
|
|
|
83
88
|
export declare const DialogClose: ({ className, children, ref, ...props }: DialogCloseProps) => JSX.Element;
|
|
84
89
|
|
|
85
|
-
export declare type DialogCloseProps =
|
|
90
|
+
export declare type DialogCloseProps = ComponentProps<typeof Dialog_2.Close>;
|
|
86
91
|
|
|
87
92
|
export declare const DialogDescription: ({ className, children, ref, ...props }: DialogDescriptionProps) => JSX.Element;
|
|
88
93
|
|
|
89
|
-
export declare type DialogDescriptionProps =
|
|
94
|
+
export declare type DialogDescriptionProps = ComponentProps<typeof Dialog_2.Description>;
|
|
90
95
|
|
|
91
96
|
export declare const DialogPopup: ({ className, children, showCloseButton, ref, ...props }: DialogPopupProps) => JSX.Element;
|
|
92
97
|
|
|
93
|
-
export declare type DialogPopupProps =
|
|
98
|
+
export declare type DialogPopupProps = ComponentProps<typeof Dialog_2.Popup> & {
|
|
94
99
|
showCloseButton?: boolean;
|
|
95
100
|
};
|
|
96
101
|
|
|
97
|
-
export declare type DialogProps =
|
|
102
|
+
export declare type DialogProps = ComponentProps<typeof Dialog_2.Root>;
|
|
98
103
|
|
|
99
104
|
export declare const DialogTitle: ({ className, children, ref, ...props }: DialogTitleProps) => JSX.Element;
|
|
100
105
|
|
|
101
|
-
export declare type DialogTitleProps =
|
|
106
|
+
export declare type DialogTitleProps = ComponentProps<typeof Dialog_2.Title>;
|
|
102
107
|
|
|
103
108
|
export declare const DialogTrigger: ({ className, children, ref, ...props }: DialogTriggerProps) => JSX.Element;
|
|
104
109
|
|
|
105
|
-
export declare type DialogTriggerProps =
|
|
110
|
+
export declare type DialogTriggerProps = ComponentProps<typeof Dialog_2.Trigger>;
|
|
106
111
|
|
|
107
112
|
export declare const FieldErrors: ({ className, children, ref, ...props }: FieldErrorsProps) => JSX.Element;
|
|
108
113
|
|
|
109
|
-
export declare type FieldErrorsProps =
|
|
114
|
+
export declare type FieldErrorsProps = ComponentProps<"div">;
|
|
110
115
|
|
|
111
116
|
export declare const FieldInput: ({ className, children, ref, ...props }: FieldInputProps) => JSX.Element;
|
|
112
117
|
|
|
@@ -165,24 +170,24 @@ export declare const Form: {
|
|
|
165
170
|
|
|
166
171
|
export declare const FormErrors: ({ className, children, ref, ...props }: FormErrorsProps) => JSX.Element;
|
|
167
172
|
|
|
168
|
-
export declare type FormErrorsProps =
|
|
173
|
+
export declare type FormErrorsProps = ComponentProps<"div">;
|
|
169
174
|
|
|
170
175
|
export declare const FormSubmit: ({ submittingText, className, children, ref, ...props }: FieldSubmitButtonProps) => JSX.Element;
|
|
171
176
|
|
|
172
177
|
export declare const Input: ({ leadingIcon, showSeparator, className, ref, ...props }: InputProps) => JSX.Element;
|
|
173
178
|
|
|
174
|
-
export declare type InputProps =
|
|
179
|
+
export declare type InputProps = ComponentProps<typeof Input_2> & {
|
|
175
180
|
leadingIcon?: Icon;
|
|
176
181
|
showSeparator?: boolean;
|
|
177
182
|
};
|
|
178
183
|
|
|
179
184
|
export declare const Label: ({ className, children, ref, ...props }: LabelProps) => JSX.Element;
|
|
180
185
|
|
|
181
|
-
export declare type LabelProps =
|
|
186
|
+
export declare type LabelProps = ComponentProps<"label">;
|
|
182
187
|
|
|
183
188
|
export declare const Profile: ({ className, imageUrl, fallbackText, profileName, profileEmail, compact, children, ref, ...props }: ProfileProps) => JSX.Element;
|
|
184
189
|
|
|
185
|
-
export declare type ProfileProps =
|
|
190
|
+
export declare type ProfileProps = ComponentProps<"button"> & {
|
|
186
191
|
imageUrl: string;
|
|
187
192
|
fallbackText: string;
|
|
188
193
|
profileName?: string;
|
|
@@ -192,13 +197,13 @@ export declare type ProfileProps = React.ComponentProps<"button"> & {
|
|
|
192
197
|
|
|
193
198
|
export declare const ScrollArea: ({ orientation, className, children, ref, ...props }: ScrollAreaProps) => JSX.Element;
|
|
194
199
|
|
|
195
|
-
export declare type ScrollAreaProps =
|
|
200
|
+
export declare type ScrollAreaProps = ComponentProps<typeof ScrollArea_2.Root> & {
|
|
196
201
|
orientation?: "horizontal" | "vertical";
|
|
197
202
|
};
|
|
198
203
|
|
|
199
204
|
export declare const Separator: ({ className, children, ref, ...props }: SeparatorProps) => JSX.Element;
|
|
200
205
|
|
|
201
|
-
export declare type SeparatorProps = Omit<
|
|
206
|
+
export declare type SeparatorProps = Omit<ComponentProps<typeof Separator_2>, "style"> & VariantProps<typeof separatorVariants>;
|
|
202
207
|
|
|
203
208
|
declare const separatorVariants: (props?: ({
|
|
204
209
|
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
@@ -209,16 +214,16 @@ export declare const Slider: ({ leadingIcon: LeadingIcon, trailingIcon: Trailing
|
|
|
209
214
|
|
|
210
215
|
export declare const SliderHandle: ({ sliderInstance, isActive, onKeyDownHandler, onMouseDownHandler, onTouchStart, value, className, children, ref, ...props }: SliderHandleProps) => JSX.Element;
|
|
211
216
|
|
|
212
|
-
export declare type SliderHandleProps =
|
|
217
|
+
export declare type SliderHandleProps = ComponentProps<"button"> & {
|
|
213
218
|
sliderInstance: Ranger<HTMLDivElement>;
|
|
214
219
|
isActive: boolean;
|
|
215
|
-
onKeyDownHandler:
|
|
216
|
-
onMouseDownHandler:
|
|
217
|
-
onTouchStart:
|
|
220
|
+
onKeyDownHandler: KeyboardEventHandler<HTMLButtonElement>;
|
|
221
|
+
onMouseDownHandler: MouseEventHandler<HTMLButtonElement>;
|
|
222
|
+
onTouchStart: TouchEventHandler<HTMLButtonElement>;
|
|
218
223
|
value: number;
|
|
219
224
|
};
|
|
220
225
|
|
|
221
|
-
export declare type SliderProps =
|
|
226
|
+
export declare type SliderProps = ComponentProps<"div"> & {
|
|
222
227
|
leadingIcon?: Icon;
|
|
223
228
|
trailingIcon?: Icon;
|
|
224
229
|
min?: number;
|
|
@@ -231,7 +236,7 @@ export declare type SliderProps = React.ComponentProps<"div"> & {
|
|
|
231
236
|
|
|
232
237
|
export declare const SliderSegment: ({ index, steps, left, width, className, children, ref, ...props }: SliderSegmentProps) => JSX.Element;
|
|
233
238
|
|
|
234
|
-
export declare type SliderSegmentProps =
|
|
239
|
+
export declare type SliderSegmentProps = ComponentProps<"div"> & {
|
|
235
240
|
index: number;
|
|
236
241
|
steps: number;
|
|
237
242
|
left: number;
|
|
@@ -242,21 +247,21 @@ export declare const SliderTick: ({ percentage, className, children, ref, ...pro
|
|
|
242
247
|
|
|
243
248
|
export declare const SliderTickLabel: ({ className, children, ref, ...props }: SliderTickLabelProps) => JSX.Element;
|
|
244
249
|
|
|
245
|
-
export declare type SliderTickLabelProps =
|
|
250
|
+
export declare type SliderTickLabelProps = ComponentProps<"p">;
|
|
246
251
|
|
|
247
|
-
export declare type SliderTickProps =
|
|
252
|
+
export declare type SliderTickProps = ComponentProps<"div"> & {
|
|
248
253
|
percentage: number;
|
|
249
254
|
};
|
|
250
255
|
|
|
251
256
|
export declare const SliderTrack: ({ className, children, sliderRef, ...props }: SliderTrackProps) => JSX.Element;
|
|
252
257
|
|
|
253
|
-
export declare type SliderTrackProps =
|
|
254
|
-
sliderRef:
|
|
258
|
+
export declare type SliderTrackProps = ComponentProps<"div"> & {
|
|
259
|
+
sliderRef: RefObject<HTMLDivElement | null>;
|
|
255
260
|
};
|
|
256
261
|
|
|
257
262
|
export declare const Switch: ({ label, className, ref, ...props }: SwitchProps) => JSX.Element;
|
|
258
263
|
|
|
259
|
-
export declare type SwitchProps =
|
|
264
|
+
export declare type SwitchProps = ComponentProps<typeof Switch_2.Root> & {
|
|
260
265
|
label?: string;
|
|
261
266
|
};
|
|
262
267
|
|
|
@@ -264,31 +269,31 @@ export declare const Tabs: ({ className, ref, ...props }: TabsProps) => JSX.Elem
|
|
|
264
269
|
|
|
265
270
|
export declare const TabsIndicator: ({ className, ...props }: TabsIndicatorProps) => JSX.Element;
|
|
266
271
|
|
|
267
|
-
export declare type TabsIndicatorProps =
|
|
272
|
+
export declare type TabsIndicatorProps = ComponentProps<typeof Tabs_2.Indicator>;
|
|
268
273
|
|
|
269
274
|
export declare const TabsList: ({ className, ...props }: TabsListProps) => JSX.Element;
|
|
270
275
|
|
|
271
|
-
export declare type TabsListProps =
|
|
276
|
+
export declare type TabsListProps = ComponentProps<typeof Tabs_2.List>;
|
|
272
277
|
|
|
273
278
|
export declare const TabsPanel: ({ className, ...props }: TabsPanelProps) => JSX.Element;
|
|
274
279
|
|
|
275
|
-
export declare type TabsPanelProps =
|
|
280
|
+
export declare type TabsPanelProps = ComponentProps<typeof Tabs_2.Panel>;
|
|
276
281
|
|
|
277
|
-
export declare type TabsProps =
|
|
282
|
+
export declare type TabsProps = ComponentProps<typeof Tabs_2.Root>;
|
|
278
283
|
|
|
279
284
|
export declare const TabsTab: ({ className, ...props }: TabsTabProps) => JSX.Element;
|
|
280
285
|
|
|
281
|
-
export declare type TabsTabProps =
|
|
286
|
+
export declare type TabsTabProps = ComponentProps<typeof Tabs_2.Tab>;
|
|
282
287
|
|
|
283
288
|
export declare const Toast: ({ className, children, position, ref, ...props }: ToastProps) => JSX.Element[];
|
|
284
289
|
|
|
285
|
-
export declare type ToastProps =
|
|
290
|
+
export declare type ToastProps = ComponentProps<"div"> & {
|
|
286
291
|
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
287
292
|
};
|
|
288
293
|
|
|
289
294
|
export declare const ToastProvider: ({ position, className, children, ref, ...props }: ToastProviderProps) => JSX.Element;
|
|
290
295
|
|
|
291
|
-
export declare type ToastProviderProps =
|
|
296
|
+
export declare type ToastProviderProps = ComponentProps<typeof Toast_2.Viewport> & {
|
|
292
297
|
position?: "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
293
298
|
};
|
|
294
299
|
|
|
@@ -296,12 +301,12 @@ export declare const Tooltip: ({ children, ...props }: TooltipProps) => JSX.Elem
|
|
|
296
301
|
|
|
297
302
|
export declare const TooltipContent: ({ className, children, ...props }: TooltipContentProps) => JSX.Element;
|
|
298
303
|
|
|
299
|
-
export declare type TooltipContentProps =
|
|
304
|
+
export declare type TooltipContentProps = ComponentProps<typeof Tooltip_2.Popup>;
|
|
300
305
|
|
|
301
|
-
export declare type TooltipProps =
|
|
306
|
+
export declare type TooltipProps = ComponentProps<typeof Tooltip_2.Root>;
|
|
302
307
|
|
|
303
308
|
export declare const TooltipTrigger: ({ children, ...props }: TooltipTriggerProps) => JSX.Element;
|
|
304
309
|
|
|
305
|
-
export declare type TooltipTriggerProps =
|
|
310
|
+
export declare type TooltipTriggerProps = ComponentProps<typeof Tooltip_2.Trigger>;
|
|
306
311
|
|
|
307
312
|
export { }
|