@vinyasa/form 1.0.22 → 1.0.23
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/cjs/autocomplete.cjs +709 -309
- package/dist/cjs/autocomplete.css +1 -1
- package/dist/cjs/checkbox.cjs +399 -244
- package/dist/cjs/checkbox.css +5 -1
- package/dist/cjs/color-picker.cjs +478 -325
- package/dist/cjs/color-picker.css +1 -1
- package/dist/cjs/combobox.cjs +574 -359
- package/dist/cjs/combobox.css +1 -1
- package/dist/cjs/date-picker.cjs +522 -322
- package/dist/cjs/date-picker.css +1 -1
- package/dist/cjs/dropzone.cjs +562 -391
- package/dist/cjs/dropzone.css +1 -1
- package/dist/cjs/field.cjs +353 -0
- package/dist/cjs/field.css +139 -0
- package/dist/cjs/file-upload.cjs +667 -380
- package/dist/cjs/file-upload.css +44 -1
- package/dist/cjs/index.cjs +3066 -2546
- package/dist/cjs/index.css +9 -1
- package/dist/cjs/input.cjs +220 -74
- package/dist/cjs/input.css +1 -1
- package/dist/cjs/multi-select.cjs +756 -400
- package/dist/cjs/multi-select.css +1 -1
- package/dist/cjs/number-input.cjs +267 -125
- package/dist/cjs/number-input.css +1 -1
- package/dist/cjs/otp-input.cjs +232 -85
- package/dist/cjs/otp-input.css +1 -1
- package/dist/cjs/password-input.cjs +239 -93
- package/dist/cjs/password-input.css +1 -1
- package/dist/cjs/radio-group.cjs +388 -246
- package/dist/cjs/radio-group.css +1 -1
- package/dist/cjs/range-slider.cjs +106 -62
- package/dist/cjs/rich-text-editor.cjs +549 -517
- package/dist/cjs/rich-text-editor.css +1 -1
- package/dist/cjs/search-input.cjs +244 -98
- package/dist/cjs/search-input.css +1 -1
- package/dist/cjs/select.cjs +485 -353
- package/dist/cjs/select.css +1 -1
- package/dist/cjs/slider.cjs +129 -155
- package/dist/cjs/switch.cjs +376 -239
- package/dist/cjs/switch.css +5 -1
- package/dist/cjs/tags-input.cjs +264 -113
- package/dist/cjs/tags-input.css +1 -1
- package/dist/cjs/textarea.cjs +225 -79
- package/dist/cjs/textarea.css +1 -1
- package/dist/cjs/time-picker.cjs +546 -371
- package/dist/cjs/time-picker.css +1 -1
- package/dist/cjs/toggle-button.cjs +18 -15
- package/dist/esm/{switch.css → 1485.css} +4 -0
- package/dist/esm/1485.js +28 -0
- package/dist/esm/{2995.css → 2315.css} +1 -1
- package/dist/esm/{2995.js → 2315.js} +96 -4
- package/dist/esm/2692.js +114 -0
- package/dist/esm/27.js +23 -27
- package/dist/esm/345.js +81 -0
- package/dist/esm/5074.js +66 -0
- package/dist/esm/5333.js +72 -0
- package/dist/esm/6982.js +35 -0
- package/dist/esm/7580.js +34 -0
- package/dist/esm/7678.js +101 -0
- package/dist/esm/7800.js +131 -0
- package/dist/esm/8479.js +115 -0
- package/dist/esm/{checkbox.css → 9167.css} +4 -0
- package/dist/esm/9167.js +30 -0
- package/dist/esm/9545.js +118 -0
- package/dist/esm/{2942.css → 9559.css} +43 -0
- package/dist/esm/9559.js +179 -0
- package/dist/esm/autocomplete.js +2 -95
- package/dist/esm/checkbox.js +1 -38
- package/dist/esm/color-picker.js +1 -130
- package/dist/esm/combobox.js +1 -126
- package/dist/esm/components/autocomplete/Autocomplete.d.ts +26 -16
- package/dist/esm/components/autocomplete/index.d.ts +1 -3
- package/dist/esm/components/checkbox/Checkbox.d.ts +12 -4
- package/dist/esm/components/checkbox/index.d.ts +1 -3
- package/dist/esm/components/color-picker/ColorPicker.d.ts +28 -21
- package/dist/esm/components/color-picker/index.d.ts +1 -3
- package/dist/esm/components/combobox/Combobox.d.ts +55 -29
- package/dist/esm/components/combobox/index.d.ts +1 -3
- package/dist/esm/components/date-picker/DatePicker.d.ts +28 -24
- package/dist/esm/components/date-picker/index.d.ts +1 -3
- package/dist/esm/components/dropzone/Dropzone.d.ts +52 -9
- package/dist/esm/components/dropzone/index.d.ts +1 -3
- package/dist/esm/components/field/Field.d.ts +106 -0
- package/dist/esm/components/field/index.d.ts +1 -0
- package/dist/esm/components/file-upload/FileUpload.d.ts +11 -18
- package/dist/esm/components/file-upload/index.d.ts +1 -3
- package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
- package/dist/esm/components/input/Input.d.ts +3 -5
- package/dist/esm/components/multi-select/MultiSelect.d.ts +37 -30
- package/dist/esm/components/multi-select/index.d.ts +1 -3
- package/dist/esm/components/number-input/NumberInput.d.ts +3 -5
- package/dist/esm/components/otp-input/OtpInput.d.ts +2 -4
- package/dist/esm/components/password-input/PasswordInput.d.ts +3 -5
- package/dist/esm/components/radio-group/RadioGroup.d.ts +18 -10
- package/dist/esm/components/radio-group/index.d.ts +1 -3
- package/dist/esm/components/range-slider/RangeSlider.d.ts +1 -1
- package/dist/esm/components/rich-text-editor/RichTextEditor.d.ts +44 -7
- package/dist/esm/components/rich-text-editor/index.d.ts +1 -3
- package/dist/esm/components/search-input/SearchInput.d.ts +3 -5
- package/dist/esm/components/select/Select.d.ts +36 -23
- package/dist/esm/components/select/index.d.ts +1 -3
- package/dist/esm/components/slider/Slider.d.ts +17 -10
- package/dist/esm/components/slider/index.d.ts +1 -3
- package/dist/esm/components/switch/Switch.d.ts +10 -5
- package/dist/esm/components/switch/index.d.ts +1 -3
- package/dist/esm/components/tags-input/TagsInput.d.ts +3 -5
- package/dist/esm/components/textarea/Textarea.d.ts +3 -5
- package/dist/esm/components/time-picker/TimePicker.d.ts +31 -23
- package/dist/esm/components/time-picker/index.d.ts +1 -3
- package/dist/esm/date-picker.js +1 -118
- package/dist/esm/dropzone.js +1 -137
- package/dist/esm/field.d.ts +2 -24
- package/dist/esm/field.js +1 -0
- package/dist/esm/file-upload.js +2 -123
- package/dist/esm/index.d.ts +15 -14
- package/dist/esm/index.js +15 -14
- package/dist/esm/input.js +16 -25
- package/dist/esm/multi-select.js +2 -164
- package/dist/esm/number-input.js +65 -78
- package/dist/esm/otp-input.js +31 -38
- package/dist/esm/password-input.js +32 -41
- package/dist/esm/radio-group.js +1 -44
- package/dist/esm/range-slider.js +15 -8
- package/dist/esm/rich-text-editor.js +1 -212
- package/dist/esm/search-input.js +35 -44
- package/dist/esm/select.js +1 -87
- package/dist/esm/slider.js +1 -4
- package/dist/esm/switch.js +1 -36
- package/dist/esm/tags-input.js +51 -59
- package/dist/esm/textarea.js +22 -31
- package/dist/esm/time-picker.js +1 -137
- package/package.json +18 -9
- package/dist/esm/2942.js +0 -13
- package/dist/esm/4557.js +0 -39
- package/dist/esm/dropzone.css +0 -43
- /package/dist/esm/{date-picker.css → 2692.css} +0 -0
- /package/dist/esm/{select.css → 5333.css} +0 -0
- /package/dist/esm/{radio-group.css → 7580.css} +0 -0
- /package/dist/esm/{color-picker.css → 7678.css} +0 -0
- /package/dist/esm/{rich-text-editor.css → 9545.css} +0 -0
|
@@ -1,28 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type CSSProperties } from 'react';
|
|
3
|
+
export declare const ColorPicker: import("react").FC<Popover.PopoverProps>;
|
|
4
|
+
export interface ColorPickerTriggerProps extends Omit<Popover.PopoverTriggerProps, 'id'> {
|
|
5
|
+
/** Marks the trigger invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const ColorPickerTrigger: {
|
|
11
|
+
({ invalid, size, id: idProp, className, ...rest }: ColorPickerTriggerProps): import("react").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export interface ColorPickerSwatchProps extends ComponentPropsWithoutRef<'span'> {
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare const ColorPickerSwatch: {
|
|
18
|
+
({ className, ...rest }: ColorPickerSwatchProps): import("react").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export type ColorPickerValueProps = ComponentPropsWithoutRef<'span'>;
|
|
22
|
+
export declare const ColorPickerValue: {
|
|
23
|
+
({ className, ...rest }: ColorPickerValueProps): import("react").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export interface ColorPickerContentProps {
|
|
3
27
|
value?: string;
|
|
4
|
-
defaultValue?: string;
|
|
5
28
|
onValueChange?: (color: string) => void;
|
|
6
|
-
label?: ReactNode;
|
|
7
|
-
description?: ReactNode;
|
|
8
|
-
error?: ReactNode;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
size?: 'sm' | 'md' | 'lg';
|
|
11
|
-
disabled?: boolean;
|
|
12
29
|
/** A row of preset swatches shown above the hex field — click applies the color without closing the popover. */
|
|
13
30
|
presets?: string[];
|
|
14
|
-
/**
|
|
15
|
-
* Replaces the built-in trigger button entirely — passed straight through
|
|
16
|
-
* to Popover.Trigger's `asChild`, so it keeps the same open/close click
|
|
17
|
-
* and keyboard wiring. The element is responsible for its own styling and
|
|
18
|
-
* accessibility attributes (id, aria-describedby, disabled) since those
|
|
19
|
-
* aren't applied automatically the way they are to the default button.
|
|
20
|
-
*/
|
|
21
|
-
trigger?: ReactNode;
|
|
22
|
-
id?: string;
|
|
23
31
|
}
|
|
24
|
-
declare const
|
|
25
|
-
({ value,
|
|
32
|
+
export declare const ColorPickerContent: {
|
|
33
|
+
({ value, onValueChange, presets, }: ColorPickerContentProps): import("react").JSX.Element;
|
|
26
34
|
displayName: string;
|
|
27
35
|
};
|
|
28
|
-
export default ColorPicker;
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default ColorPicker;
|
|
3
|
-
export type { ColorPickerProps } from './ColorPicker';
|
|
1
|
+
export { ColorPicker, ColorPickerContent, ColorPickerSwatch, ColorPickerTrigger, ColorPickerValue, type ColorPickerContentProps, type ColorPickerSwatchProps, type ColorPickerTriggerProps, type ColorPickerValueProps, } from './ColorPicker';
|
|
@@ -1,34 +1,60 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
label?: ReactNode;
|
|
14
|
-
description?: ReactNode;
|
|
15
|
-
error?: ReactNode;
|
|
16
|
-
required?: boolean;
|
|
1
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
+
import { Command } from 'cmdk';
|
|
3
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
4
|
+
export type ComboboxProps = Popover.PopoverProps;
|
|
5
|
+
export declare const Combobox: {
|
|
6
|
+
({ open, defaultOpen, onOpenChange, children, ...rest }: ComboboxProps): import("react").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export interface ComboboxTriggerProps extends Omit<Popover.PopoverTriggerProps, 'id'> {
|
|
10
|
+
/** Marks the trigger invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
11
|
+
invalid?: boolean;
|
|
17
12
|
size?: 'sm' | 'md' | 'lg';
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
emptyMessage?: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Replaces the built-in trigger button entirely — passed straight through
|
|
22
|
-
* to Popover.Trigger's `asChild`, so it keeps the same open/close click
|
|
23
|
-
* and keyboard wiring. The element is responsible for its own styling and
|
|
24
|
-
* accessibility attributes (id, aria-describedby, disabled) since those
|
|
25
|
-
* aren't applied automatically the way they are to the default button.
|
|
26
|
-
*/
|
|
27
|
-
trigger?: ReactNode;
|
|
28
13
|
id?: string;
|
|
29
14
|
}
|
|
30
|
-
declare const
|
|
31
|
-
({
|
|
15
|
+
export declare const ComboboxTrigger: {
|
|
16
|
+
({ invalid, size, id: idProp, className, ...rest }: ComboboxTriggerProps): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export type ComboboxValueProps = ComponentPropsWithoutRef<'span'>;
|
|
20
|
+
export declare const ComboboxValue: {
|
|
21
|
+
({ className, ...rest }: ComboboxValueProps): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export type ComboboxIconProps = ComponentPropsWithoutRef<'span'>;
|
|
25
|
+
export declare const ComboboxIcon: {
|
|
26
|
+
({ className, children, ...rest }: ComboboxIconProps): import("react").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
export type ComboboxContentProps = Omit<Popover.PopoverContentProps, 'children'> & {
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
};
|
|
32
|
+
export declare const ComboboxContent: {
|
|
33
|
+
({ className, children, ...rest }: ComboboxContentProps): import("react").JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
};
|
|
36
|
+
export type ComboboxInputProps = ComponentPropsWithoutRef<typeof Command.Input>;
|
|
37
|
+
export declare const ComboboxInput: {
|
|
38
|
+
({ className, ...rest }: ComboboxInputProps): import("react").JSX.Element;
|
|
39
|
+
displayName: string;
|
|
40
|
+
};
|
|
41
|
+
export type ComboboxListProps = ComponentPropsWithoutRef<typeof Command.List>;
|
|
42
|
+
export declare const ComboboxList: {
|
|
43
|
+
({ className, ...rest }: ComboboxListProps): import("react").JSX.Element;
|
|
44
|
+
displayName: string;
|
|
45
|
+
};
|
|
46
|
+
export type ComboboxItemProps = ComponentPropsWithoutRef<typeof Command.Item>;
|
|
47
|
+
export declare const ComboboxItem: {
|
|
48
|
+
({ className, onSelect, ...rest }: ComboboxItemProps): import("react").JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
export type ComboboxItemIndicatorProps = ComponentPropsWithoutRef<'span'>;
|
|
52
|
+
export declare const ComboboxItemIndicator: {
|
|
53
|
+
({ className, children, ...rest }: ComboboxItemIndicatorProps): import("react").JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
export type ComboboxEmptyProps = ComponentPropsWithoutRef<typeof Command.Empty>;
|
|
57
|
+
export declare const ComboboxEmpty: {
|
|
58
|
+
({ className, ...rest }: ComboboxEmptyProps): import("react").JSX.Element;
|
|
32
59
|
displayName: string;
|
|
33
60
|
};
|
|
34
|
-
export default Combobox;
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default Combobox;
|
|
3
|
-
export type { ComboboxOption, ComboboxProps } from './Combobox';
|
|
1
|
+
export { Combobox, ComboboxContent, ComboboxEmpty, ComboboxIcon, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList, ComboboxTrigger, ComboboxValue, type ComboboxContentProps, type ComboboxEmptyProps, type ComboboxIconProps, type ComboboxInputProps, type ComboboxItemProps, type ComboboxItemIndicatorProps, type ComboboxListProps, type ComboboxProps, type ComboboxTriggerProps, type ComboboxValueProps, } from './Combobox';
|
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
required?: boolean;
|
|
1
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { type PropsBase, type PropsSingle } from 'react-day-picker';
|
|
4
|
+
export type DatePickerProps = Popover.PopoverProps;
|
|
5
|
+
export declare const DatePicker: {
|
|
6
|
+
({ open, defaultOpen, onOpenChange, children, ...rest }: DatePickerProps): import("react").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
export interface DatePickerTriggerProps extends Omit<Popover.PopoverTriggerProps, 'id'> {
|
|
10
|
+
/** Marks the trigger invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
11
|
+
invalid?: boolean;
|
|
13
12
|
size?: 'sm' | 'md' | 'lg';
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Replaces the built-in trigger button entirely — passed straight through
|
|
17
|
-
* to Popover.Trigger's `asChild`, so it keeps the same open/close click
|
|
18
|
-
* and keyboard wiring. The element is responsible for its own styling and
|
|
19
|
-
* accessibility attributes (id, aria-describedby, disabled) since those
|
|
20
|
-
* aren't applied automatically the way they are to the default button.
|
|
21
|
-
*/
|
|
22
|
-
trigger?: ReactNode;
|
|
23
13
|
id?: string;
|
|
24
14
|
}
|
|
25
|
-
declare const
|
|
26
|
-
({
|
|
15
|
+
export declare const DatePickerTrigger: {
|
|
16
|
+
({ invalid, size, id: idProp, className, ...rest }: DatePickerTriggerProps): import("react").JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export type DatePickerValueProps = ComponentPropsWithoutRef<'span'>;
|
|
20
|
+
export declare const DatePickerValue: {
|
|
21
|
+
({ className, ...rest }: DatePickerValueProps): import("react").JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export type DatePickerIconProps = ComponentPropsWithoutRef<'span'>;
|
|
25
|
+
export declare const DatePickerIcon: {
|
|
26
|
+
({ className, children, ...rest }: DatePickerIconProps): import("react").JSX.Element;
|
|
27
|
+
displayName: string;
|
|
28
|
+
};
|
|
29
|
+
export type DatePickerContentProps = Omit<PropsBase & PropsSingle, 'mode' | 'classNames' | 'components'>;
|
|
30
|
+
export declare const DatePickerContent: {
|
|
31
|
+
({ onSelect, ...rest }: DatePickerContentProps): import("react").JSX.Element;
|
|
27
32
|
displayName: string;
|
|
28
33
|
};
|
|
29
|
-
export default DatePicker;
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default DatePicker;
|
|
3
|
-
export type { DatePickerProps } from './DatePicker';
|
|
1
|
+
export { DatePicker, DatePickerContent, DatePickerIcon, DatePickerTrigger, DatePickerValue, type DatePickerContentProps, type DatePickerIconProps, type DatePickerProps, type DatePickerTriggerProps, type DatePickerValueProps, } from './DatePicker';
|
|
@@ -1,20 +1,63 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
import { type Accept } from 'react-dropzone';
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type Accept, type DropzoneInputProps, type DropzoneRootProps } from 'react-dropzone';
|
|
3
|
+
export declare const formatFileSize: (bytes: number) => string;
|
|
4
|
+
interface DropzoneContextValue {
|
|
5
|
+
getRootProps: (props?: DropzoneRootProps) => DropzoneRootProps;
|
|
6
|
+
getInputProps: (props?: DropzoneInputProps) => DropzoneInputProps;
|
|
7
|
+
isDragActive: boolean;
|
|
8
|
+
files: File[];
|
|
9
|
+
removeFile: (file: File) => void;
|
|
10
|
+
rejectionMessage: string | undefined;
|
|
11
|
+
maxSize: number | undefined;
|
|
12
|
+
id: string;
|
|
13
|
+
invalid: boolean;
|
|
14
|
+
describedBy: string | undefined;
|
|
15
|
+
labelId: string | undefined;
|
|
16
|
+
disabled: boolean | undefined;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Reads the enclosing `Dropzone`'s `useDropzone` state — `getRootProps`/
|
|
20
|
+
* `getInputProps` have to be spread from a single hook call, so every other
|
|
21
|
+
* part in this compound family (including `FileUpload`'s own trigger, which
|
|
22
|
+
* reuses `Dropzone`'s root) reaches it this way instead of calling
|
|
23
|
+
* `useDropzone` a second time. Returns `null` outside a `Dropzone`.
|
|
24
|
+
*/
|
|
25
|
+
export declare const useDropzoneContext: () => DropzoneContextValue | null;
|
|
3
26
|
export interface DropzoneProps {
|
|
4
27
|
value?: File[];
|
|
5
28
|
onValueChange?: (files: File[]) => void;
|
|
6
29
|
accept?: Accept;
|
|
7
30
|
maxFiles?: number;
|
|
8
31
|
maxSize?: number;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
error?: ReactNode;
|
|
12
|
-
required?: boolean;
|
|
32
|
+
/** Marks the area invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
33
|
+
invalid?: boolean;
|
|
13
34
|
disabled?: boolean;
|
|
14
35
|
id?: string;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export declare const Dropzone: {
|
|
39
|
+
({ value, onValueChange, accept, maxFiles, maxSize, invalid, disabled, id: idProp, children, }: DropzoneProps): import("react").JSX.Element;
|
|
40
|
+
displayName: string;
|
|
41
|
+
};
|
|
42
|
+
export type DropzoneTriggerProps = ComponentPropsWithoutRef<'div'>;
|
|
43
|
+
export declare const DropzoneTrigger: {
|
|
44
|
+
({ className, ...rest }: DropzoneTriggerProps): import("react").JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const DropzoneRejection: {
|
|
48
|
+
(): import("react").JSX.Element | null;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
export interface DropzoneFileItemProps {
|
|
52
|
+
file: File;
|
|
53
|
+
onRemove?: () => void;
|
|
15
54
|
}
|
|
16
|
-
declare const
|
|
17
|
-
({
|
|
55
|
+
export declare const DropzoneFileItem: {
|
|
56
|
+
({ file, onRemove }: DropzoneFileItemProps): import("react").JSX.Element;
|
|
57
|
+
displayName: string;
|
|
58
|
+
};
|
|
59
|
+
export declare const DropzoneFileList: {
|
|
60
|
+
(): import("react").JSX.Element | null;
|
|
18
61
|
displayName: string;
|
|
19
62
|
};
|
|
20
|
-
export
|
|
63
|
+
export {};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default Dropzone;
|
|
3
|
-
export type { DropzoneProps } from './Dropzone';
|
|
1
|
+
export { Dropzone, DropzoneFileItem, DropzoneFileList, DropzoneRejection, DropzoneTrigger, formatFileSize, useDropzoneContext, type DropzoneFileItemProps, type DropzoneProps, type DropzoneTriggerProps, } from './Dropzone';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
+
export interface FieldContextValue {
|
|
4
|
+
/** The id every `Field` part derives its own id from, unless it sets one explicitly. */
|
|
5
|
+
id: string;
|
|
6
|
+
descriptionId: string;
|
|
7
|
+
errorId: string;
|
|
8
|
+
/**
|
|
9
|
+
* Precomputed from which of `FieldDescription`/`FieldError` are actually
|
|
10
|
+
* present among `Field`'s own direct children — not just "both ids,
|
|
11
|
+
* always" — so `FieldControl` never points `aria-describedby` at an id
|
|
12
|
+
* that isn't rendered. Only sees *direct* children, matching how
|
|
13
|
+
* Dialog's header/body/footer are assembled as a flat list too.
|
|
14
|
+
*/
|
|
15
|
+
describedBy: string | undefined;
|
|
16
|
+
invalid: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `FieldLabel`'s own rendered id, only when one is actually present among
|
|
19
|
+
* `Field`'s direct children — for a control whose interactive element
|
|
20
|
+
* isn't natively labelable (e.g. a `role="combobox"` `<div>`), which has
|
|
21
|
+
* to reach for `aria-labelledby` instead of `<label htmlFor>`.
|
|
22
|
+
*/
|
|
23
|
+
labelId: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The enclosing `FieldLabel`'s text, when its children is a plain string
|
|
26
|
+
* — for a control that needs the label as a string for a third-party
|
|
27
|
+
* library's own accessible-name prop (e.g. cmdk's `Command`'s `label`),
|
|
28
|
+
* not as rendered JSX.
|
|
29
|
+
*/
|
|
30
|
+
labelText: string | undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Reads the enclosing `Field`'s generated ids, for a control that wants to
|
|
34
|
+
* auto-wire its own `id`/`aria-describedby`/`aria-invalid` when nested
|
|
35
|
+
* inside one — returns `null` outside a `Field`, so a control works
|
|
36
|
+
* standalone too. This is how Input/Select/etc. (from their own migration
|
|
37
|
+
* phase onward) pick up a `Field`'s ids without the two being otherwise
|
|
38
|
+
* connected — `Field` never renders the control itself.
|
|
39
|
+
*/
|
|
40
|
+
export declare const useFieldContext: () => FieldContextValue | null;
|
|
41
|
+
export interface ResolvedFieldProps {
|
|
42
|
+
id: string;
|
|
43
|
+
invalid: boolean;
|
|
44
|
+
describedBy: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Every first-party control migrated onto `Field` (Input, SearchInput,
|
|
48
|
+
* PasswordInput, Textarea, NumberInput, OtpInput, ...) needs the exact same
|
|
49
|
+
* three-way fallback for its own explicit prop vs. the enclosing `Field`'s
|
|
50
|
+
* context vs. a locally generated id — inlining that in each component
|
|
51
|
+
* pushed several of them over this codebase's cyclomatic-complexity lint
|
|
52
|
+
* budget on its own. Centralizing it here means that budget is spent once,
|
|
53
|
+
* not once per control.
|
|
54
|
+
*/
|
|
55
|
+
export declare const useResolvedFieldProps: (props: {
|
|
56
|
+
id?: string;
|
|
57
|
+
invalid?: boolean;
|
|
58
|
+
describedBy?: string;
|
|
59
|
+
}) => ResolvedFieldProps;
|
|
60
|
+
export interface FieldProps extends ComponentPropsWithoutRef<'div'> {
|
|
61
|
+
/**
|
|
62
|
+
* Marks the field invalid for any part that reads it via
|
|
63
|
+
* `useFieldContext` (e.g. a control applying `aria-invalid` / its own
|
|
64
|
+
* `invalid` styling). Setting this here, once, is what lets `FieldError`
|
|
65
|
+
* and the control agree on invalid state without a prop threaded
|
|
66
|
+
* between sibling elements by hand.
|
|
67
|
+
*/
|
|
68
|
+
invalid?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export declare const Field: {
|
|
71
|
+
({ invalid, children, ...rest }: FieldProps): import("react").JSX.Element;
|
|
72
|
+
displayName: string;
|
|
73
|
+
};
|
|
74
|
+
export interface FieldLabelProps extends Omit<ComponentPropsWithoutRef<'label'>, 'htmlFor'> {
|
|
75
|
+
/** Renders a required-field asterisk after the label text. */
|
|
76
|
+
required?: boolean;
|
|
77
|
+
children?: ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Defaults to the enclosing `Field`'s id, or pass a specific id directly.
|
|
80
|
+
* Pass `false` to omit `htmlFor` entirely, for a control whose real
|
|
81
|
+
* interactive element doesn't carry the `Field`'s id itself (e.g.
|
|
82
|
+
* cmdk-based inputs, which always overwrite `id` with their own
|
|
83
|
+
* internally generated one) — omitting it avoids a label whose
|
|
84
|
+
* click-to-focus silently does nothing.
|
|
85
|
+
*/
|
|
86
|
+
htmlFor?: string | false;
|
|
87
|
+
}
|
|
88
|
+
export declare const FieldLabel: {
|
|
89
|
+
({ required, htmlFor, id, children, ...rest }: FieldLabelProps): import("react").JSX.Element;
|
|
90
|
+
displayName: string;
|
|
91
|
+
};
|
|
92
|
+
export type FieldControlProps = ComponentPropsWithoutRef<typeof Slot>;
|
|
93
|
+
export declare const FieldControl: {
|
|
94
|
+
({ children, ...rest }: FieldControlProps): import("react").JSX.Element;
|
|
95
|
+
displayName: string;
|
|
96
|
+
};
|
|
97
|
+
export type FieldDescriptionProps = ComponentPropsWithoutRef<'p'>;
|
|
98
|
+
export declare const FieldDescription: {
|
|
99
|
+
({ id, ...rest }: FieldDescriptionProps): import("react").JSX.Element;
|
|
100
|
+
displayName: string;
|
|
101
|
+
};
|
|
102
|
+
export type FieldErrorProps = ComponentPropsWithoutRef<'p'>;
|
|
103
|
+
export declare const FieldError: {
|
|
104
|
+
({ id, ...rest }: FieldErrorProps): import("react").JSX.Element;
|
|
105
|
+
displayName: string;
|
|
106
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Field, FieldControl, FieldDescription, FieldError, FieldLabel, useFieldContext, useResolvedFieldProps, type FieldContextValue, type FieldControlProps, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, type ResolvedFieldProps, } from './Field';
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
3
|
-
export
|
|
4
|
-
value
|
|
5
|
-
onValueChange?: (files: File[]) => void;
|
|
6
|
-
accept?: Accept;
|
|
7
|
-
maxFiles?: number;
|
|
8
|
-
maxSize?: number;
|
|
9
|
-
label?: ReactNode;
|
|
10
|
-
description?: ReactNode;
|
|
11
|
-
error?: ReactNode;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
id?: string;
|
|
15
|
-
}
|
|
16
|
-
declare const FileUpload: {
|
|
17
|
-
({ value, onValueChange, accept, maxFiles, maxSize, label, description, error, required, disabled, id: idProp, }: FileUploadProps): import("react").JSX.Element;
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { DropzoneFileItem, DropzoneFileList, DropzoneRejection, type DropzoneProps } from '../dropzone/Dropzone';
|
|
3
|
+
export declare const FileUpload: {
|
|
4
|
+
({ value, onValueChange, accept, maxFiles, maxSize, invalid, disabled, id: idProp, children, }: DropzoneProps): import("react").JSX.Element;
|
|
18
5
|
displayName: string;
|
|
19
6
|
};
|
|
20
|
-
export
|
|
7
|
+
export type FileUploadTriggerProps = ComponentPropsWithoutRef<'button'>;
|
|
8
|
+
export declare const FileUploadTrigger: {
|
|
9
|
+
({ className, children, ...rest }: FileUploadTriggerProps): import("react").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export { DropzoneFileItem as FileUploadFileItem, DropzoneFileList as FileUploadFileList, DropzoneRejection as FileUploadRejection, };
|
|
13
|
+
export type { DropzoneProps as FileUploadProps };
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default FileUpload;
|
|
3
|
-
export type { FileUploadProps } from './FileUpload';
|
|
1
|
+
export { FileUpload, FileUploadFileItem, FileUploadFileList, FileUploadRejection, FileUploadTrigger, type FileUploadProps, type FileUploadTriggerProps, } from './FileUpload';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ButtonProps } from '@vinyasa/button';
|
|
2
2
|
import { type ReactNode } from 'react';
|
|
3
|
-
export interface IconButtonProps extends Omit<ButtonProps, 'children'
|
|
3
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'children'> {
|
|
4
4
|
icon: ReactNode;
|
|
5
5
|
'aria-label': string;
|
|
6
6
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export type InputSize = 'sm' | 'md' | 'lg';
|
|
3
3
|
export interface InputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
4
|
-
label?: ReactNode;
|
|
5
|
-
description?: ReactNode;
|
|
6
|
-
error?: ReactNode;
|
|
7
|
-
required?: boolean;
|
|
8
4
|
size?: InputSize;
|
|
5
|
+
/** Marks the input invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
6
|
+
invalid?: boolean;
|
|
9
7
|
}
|
|
10
8
|
declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
9
|
export default Input;
|
|
@@ -1,35 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
options: MultiSelectOption[];
|
|
9
|
-
value?: string[];
|
|
10
|
-
defaultValue?: string[];
|
|
11
|
-
onValueChange?: (value: string[]) => void;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
label?: ReactNode;
|
|
14
|
-
description?: ReactNode;
|
|
15
|
-
error?: ReactNode;
|
|
16
|
-
required?: boolean;
|
|
1
|
+
import * as Popover from '@radix-ui/react-popover';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
+
import { ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList } from '../combobox/Combobox';
|
|
4
|
+
export declare const MultiSelect: import("react").FC<Popover.PopoverProps>;
|
|
5
|
+
export interface MultiSelectTriggerProps extends Omit<ComponentPropsWithoutRef<'div'>, 'id'> {
|
|
6
|
+
/** Marks the trigger invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
7
|
+
invalid?: boolean;
|
|
17
8
|
size?: 'sm' | 'md' | 'lg';
|
|
18
|
-
emptyMessage?: ReactNode;
|
|
19
|
-
/** Caps how many selected-item chips render before collapsing the rest into a "+n" badge. Defaults to 2. */
|
|
20
|
-
maxVisibleChips?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Replaces the built-in chip-row trigger entirely — passed straight
|
|
23
|
-
* through to Popover.Trigger's `asChild`, so it keeps the same open/close
|
|
24
|
-
* click and keyboard wiring. The element is responsible for its own
|
|
25
|
-
* styling, accessibility attributes, and displaying the current
|
|
26
|
-
* selection (the built-in per-chip remove buttons don't come with it).
|
|
27
|
-
*/
|
|
28
|
-
trigger?: ReactNode;
|
|
29
9
|
id?: string;
|
|
30
10
|
}
|
|
31
|
-
declare const
|
|
32
|
-
({
|
|
11
|
+
export declare const MultiSelectTrigger: {
|
|
12
|
+
({ invalid, size, id: idProp, className, onKeyDown, ...rest }: MultiSelectTriggerProps): import("react").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export type MultiSelectPlaceholderProps = ComponentPropsWithoutRef<'span'>;
|
|
16
|
+
export declare const MultiSelectPlaceholder: {
|
|
17
|
+
({ className, ...rest }: MultiSelectPlaceholderProps): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export type MultiSelectChipRowProps = ComponentPropsWithoutRef<'span'>;
|
|
21
|
+
export declare const MultiSelectChipRow: {
|
|
22
|
+
({ className, ...rest }: MultiSelectChipRowProps): import("react").JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
export type MultiSelectChipProps = ComponentPropsWithoutRef<'span'>;
|
|
26
|
+
export declare const MultiSelectChip: {
|
|
27
|
+
({ className, ...rest }: MultiSelectChipProps): import("react").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export interface MultiSelectChipRemoveProps extends ComponentPropsWithoutRef<'button'> {
|
|
31
|
+
children?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export declare const MultiSelectChipRemove: {
|
|
34
|
+
({ className, children, type, ...rest }: MultiSelectChipRemoveProps): import("react").JSX.Element;
|
|
35
|
+
displayName: string;
|
|
36
|
+
};
|
|
37
|
+
export type MultiSelectChipOverflowProps = ComponentPropsWithoutRef<'span'>;
|
|
38
|
+
export declare const MultiSelectChipOverflow: {
|
|
39
|
+
({ className, ...rest }: MultiSelectChipOverflowProps): import("react").JSX.Element;
|
|
33
40
|
displayName: string;
|
|
34
41
|
};
|
|
35
|
-
export
|
|
42
|
+
export { ComboboxContent as MultiSelectContent, ComboboxEmpty as MultiSelectEmpty, ComboboxInput as MultiSelectInput, ComboboxItem as MultiSelectItem, ComboboxItemIndicator as MultiSelectItemIndicator, ComboboxList as MultiSelectList, };
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default MultiSelect;
|
|
3
|
-
export type { MultiSelectOption, MultiSelectProps } from './MultiSelect';
|
|
1
|
+
export { MultiSelect, MultiSelectChip, MultiSelectChipOverflow, MultiSelectChipRemove, MultiSelectChipRow, MultiSelectContent, MultiSelectEmpty, MultiSelectInput, MultiSelectItem, MultiSelectItemIndicator, MultiSelectList, MultiSelectPlaceholder, MultiSelectTrigger, type MultiSelectChipOverflowProps, type MultiSelectChipProps, type MultiSelectChipRemoveProps, type MultiSelectChipRowProps, type MultiSelectPlaceholderProps, type MultiSelectTriggerProps, } from './MultiSelect';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
3
3
|
export interface NumberInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'type'> {
|
|
4
|
-
label?: ReactNode;
|
|
5
|
-
description?: ReactNode;
|
|
6
|
-
error?: ReactNode;
|
|
7
|
-
required?: boolean;
|
|
8
4
|
size?: NumberInputSize;
|
|
5
|
+
/** Marks the input invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
6
|
+
invalid?: boolean;
|
|
9
7
|
/** Shows +/- stepper buttons that call the native stepUp/stepDown. Defaults to true. */
|
|
10
8
|
showSteppers?: boolean;
|
|
11
9
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
1
|
export interface OtpInputProps {
|
|
3
|
-
label?: ReactNode;
|
|
4
|
-
description?: ReactNode;
|
|
5
|
-
error?: ReactNode;
|
|
6
2
|
/** Number of digit slots. Defaults to 6. */
|
|
7
3
|
length?: number;
|
|
8
4
|
value?: string;
|
|
9
5
|
defaultValue?: string;
|
|
10
6
|
onChange?: (value: string) => void;
|
|
11
7
|
onComplete?: (value: string) => void;
|
|
8
|
+
/** Marks the input invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
9
|
+
invalid?: boolean;
|
|
12
10
|
disabled?: boolean;
|
|
13
11
|
id?: string;
|
|
14
12
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef
|
|
1
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
export type PasswordInputSize = 'sm' | 'md' | 'lg';
|
|
3
3
|
export interface PasswordInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'type'> {
|
|
4
|
-
label?: ReactNode;
|
|
5
|
-
description?: ReactNode;
|
|
6
|
-
error?: ReactNode;
|
|
7
|
-
required?: boolean;
|
|
8
4
|
size?: PasswordInputSize;
|
|
5
|
+
/** Marks the input invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
6
|
+
invalid?: boolean;
|
|
9
7
|
}
|
|
10
8
|
declare const PasswordInput: import("react").ForwardRefExoticComponent<PasswordInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
9
|
export default PasswordInput;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as RadixRadioGroup from '@radix-ui/react-radio-group';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
disabled?: boolean;
|
|
2
|
+
export interface RadioGroupProps extends Omit<RadixRadioGroup.RadioGroupProps, 'id'> {
|
|
3
|
+
/** Marks the whole group invalid — falls back to the enclosing `Field`'s own `invalid` when nested in one. */
|
|
4
|
+
invalid?: boolean;
|
|
5
|
+
id?: string;
|
|
7
6
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
7
|
+
export declare const RadioGroup: {
|
|
8
|
+
({ className, invalid, id: idProp, ...rest }: RadioGroupProps): import("react").JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
};
|
|
11
|
+
export type RadioGroupItemProps = RadixRadioGroup.RadioGroupItemProps;
|
|
12
|
+
export declare const RadioGroupItem: {
|
|
13
|
+
({ className, ...rest }: RadioGroupItemProps): import("react").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export type RadioGroupIndicatorProps = RadixRadioGroup.RadioGroupIndicatorProps;
|
|
17
|
+
export declare const RadioGroupIndicator: {
|
|
18
|
+
({ className, ...rest }: RadioGroupIndicatorProps): import("react").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default RadioGroup;
|
|
3
|
-
export type { RadioGroupProps, RadioOption } from './RadioGroup';
|
|
1
|
+
export { RadioGroup, RadioGroupIndicator, RadioGroupItem, type RadioGroupIndicatorProps, type RadioGroupItemProps, type RadioGroupProps, } from './RadioGroup';
|