@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.
Files changed (140) hide show
  1. package/dist/cjs/autocomplete.cjs +709 -309
  2. package/dist/cjs/autocomplete.css +1 -1
  3. package/dist/cjs/checkbox.cjs +399 -244
  4. package/dist/cjs/checkbox.css +5 -1
  5. package/dist/cjs/color-picker.cjs +478 -325
  6. package/dist/cjs/color-picker.css +1 -1
  7. package/dist/cjs/combobox.cjs +574 -359
  8. package/dist/cjs/combobox.css +1 -1
  9. package/dist/cjs/date-picker.cjs +522 -322
  10. package/dist/cjs/date-picker.css +1 -1
  11. package/dist/cjs/dropzone.cjs +562 -391
  12. package/dist/cjs/dropzone.css +1 -1
  13. package/dist/cjs/field.cjs +353 -0
  14. package/dist/cjs/field.css +139 -0
  15. package/dist/cjs/file-upload.cjs +667 -380
  16. package/dist/cjs/file-upload.css +44 -1
  17. package/dist/cjs/index.cjs +3066 -2546
  18. package/dist/cjs/index.css +9 -1
  19. package/dist/cjs/input.cjs +220 -74
  20. package/dist/cjs/input.css +1 -1
  21. package/dist/cjs/multi-select.cjs +756 -400
  22. package/dist/cjs/multi-select.css +1 -1
  23. package/dist/cjs/number-input.cjs +267 -125
  24. package/dist/cjs/number-input.css +1 -1
  25. package/dist/cjs/otp-input.cjs +232 -85
  26. package/dist/cjs/otp-input.css +1 -1
  27. package/dist/cjs/password-input.cjs +239 -93
  28. package/dist/cjs/password-input.css +1 -1
  29. package/dist/cjs/radio-group.cjs +388 -246
  30. package/dist/cjs/radio-group.css +1 -1
  31. package/dist/cjs/range-slider.cjs +106 -62
  32. package/dist/cjs/rich-text-editor.cjs +549 -517
  33. package/dist/cjs/rich-text-editor.css +1 -1
  34. package/dist/cjs/search-input.cjs +244 -98
  35. package/dist/cjs/search-input.css +1 -1
  36. package/dist/cjs/select.cjs +485 -353
  37. package/dist/cjs/select.css +1 -1
  38. package/dist/cjs/slider.cjs +129 -155
  39. package/dist/cjs/switch.cjs +376 -239
  40. package/dist/cjs/switch.css +5 -1
  41. package/dist/cjs/tags-input.cjs +264 -113
  42. package/dist/cjs/tags-input.css +1 -1
  43. package/dist/cjs/textarea.cjs +225 -79
  44. package/dist/cjs/textarea.css +1 -1
  45. package/dist/cjs/time-picker.cjs +546 -371
  46. package/dist/cjs/time-picker.css +1 -1
  47. package/dist/cjs/toggle-button.cjs +18 -15
  48. package/dist/esm/{switch.css → 1485.css} +4 -0
  49. package/dist/esm/1485.js +28 -0
  50. package/dist/esm/{2995.css → 2315.css} +1 -1
  51. package/dist/esm/{2995.js → 2315.js} +96 -4
  52. package/dist/esm/2692.js +114 -0
  53. package/dist/esm/27.js +23 -27
  54. package/dist/esm/345.js +81 -0
  55. package/dist/esm/5074.js +66 -0
  56. package/dist/esm/5333.js +72 -0
  57. package/dist/esm/6982.js +35 -0
  58. package/dist/esm/7580.js +34 -0
  59. package/dist/esm/7678.js +101 -0
  60. package/dist/esm/7800.js +131 -0
  61. package/dist/esm/8479.js +115 -0
  62. package/dist/esm/{checkbox.css → 9167.css} +4 -0
  63. package/dist/esm/9167.js +30 -0
  64. package/dist/esm/9545.js +118 -0
  65. package/dist/esm/{2942.css → 9559.css} +43 -0
  66. package/dist/esm/9559.js +179 -0
  67. package/dist/esm/autocomplete.js +2 -95
  68. package/dist/esm/checkbox.js +1 -38
  69. package/dist/esm/color-picker.js +1 -130
  70. package/dist/esm/combobox.js +1 -126
  71. package/dist/esm/components/autocomplete/Autocomplete.d.ts +26 -16
  72. package/dist/esm/components/autocomplete/index.d.ts +1 -3
  73. package/dist/esm/components/checkbox/Checkbox.d.ts +12 -4
  74. package/dist/esm/components/checkbox/index.d.ts +1 -3
  75. package/dist/esm/components/color-picker/ColorPicker.d.ts +28 -21
  76. package/dist/esm/components/color-picker/index.d.ts +1 -3
  77. package/dist/esm/components/combobox/Combobox.d.ts +55 -29
  78. package/dist/esm/components/combobox/index.d.ts +1 -3
  79. package/dist/esm/components/date-picker/DatePicker.d.ts +28 -24
  80. package/dist/esm/components/date-picker/index.d.ts +1 -3
  81. package/dist/esm/components/dropzone/Dropzone.d.ts +52 -9
  82. package/dist/esm/components/dropzone/index.d.ts +1 -3
  83. package/dist/esm/components/field/Field.d.ts +106 -0
  84. package/dist/esm/components/field/index.d.ts +1 -0
  85. package/dist/esm/components/file-upload/FileUpload.d.ts +11 -18
  86. package/dist/esm/components/file-upload/index.d.ts +1 -3
  87. package/dist/esm/components/icon-button/IconButton.d.ts +1 -1
  88. package/dist/esm/components/input/Input.d.ts +3 -5
  89. package/dist/esm/components/multi-select/MultiSelect.d.ts +37 -30
  90. package/dist/esm/components/multi-select/index.d.ts +1 -3
  91. package/dist/esm/components/number-input/NumberInput.d.ts +3 -5
  92. package/dist/esm/components/otp-input/OtpInput.d.ts +2 -4
  93. package/dist/esm/components/password-input/PasswordInput.d.ts +3 -5
  94. package/dist/esm/components/radio-group/RadioGroup.d.ts +18 -10
  95. package/dist/esm/components/radio-group/index.d.ts +1 -3
  96. package/dist/esm/components/range-slider/RangeSlider.d.ts +1 -1
  97. package/dist/esm/components/rich-text-editor/RichTextEditor.d.ts +44 -7
  98. package/dist/esm/components/rich-text-editor/index.d.ts +1 -3
  99. package/dist/esm/components/search-input/SearchInput.d.ts +3 -5
  100. package/dist/esm/components/select/Select.d.ts +36 -23
  101. package/dist/esm/components/select/index.d.ts +1 -3
  102. package/dist/esm/components/slider/Slider.d.ts +17 -10
  103. package/dist/esm/components/slider/index.d.ts +1 -3
  104. package/dist/esm/components/switch/Switch.d.ts +10 -5
  105. package/dist/esm/components/switch/index.d.ts +1 -3
  106. package/dist/esm/components/tags-input/TagsInput.d.ts +3 -5
  107. package/dist/esm/components/textarea/Textarea.d.ts +3 -5
  108. package/dist/esm/components/time-picker/TimePicker.d.ts +31 -23
  109. package/dist/esm/components/time-picker/index.d.ts +1 -3
  110. package/dist/esm/date-picker.js +1 -118
  111. package/dist/esm/dropzone.js +1 -137
  112. package/dist/esm/field.d.ts +2 -24
  113. package/dist/esm/field.js +1 -0
  114. package/dist/esm/file-upload.js +2 -123
  115. package/dist/esm/index.d.ts +15 -14
  116. package/dist/esm/index.js +15 -14
  117. package/dist/esm/input.js +16 -25
  118. package/dist/esm/multi-select.js +2 -164
  119. package/dist/esm/number-input.js +65 -78
  120. package/dist/esm/otp-input.js +31 -38
  121. package/dist/esm/password-input.js +32 -41
  122. package/dist/esm/radio-group.js +1 -44
  123. package/dist/esm/range-slider.js +15 -8
  124. package/dist/esm/rich-text-editor.js +1 -212
  125. package/dist/esm/search-input.js +35 -44
  126. package/dist/esm/select.js +1 -87
  127. package/dist/esm/slider.js +1 -4
  128. package/dist/esm/switch.js +1 -36
  129. package/dist/esm/tags-input.js +51 -59
  130. package/dist/esm/textarea.js +22 -31
  131. package/dist/esm/time-picker.js +1 -137
  132. package/package.json +18 -9
  133. package/dist/esm/2942.js +0 -13
  134. package/dist/esm/4557.js +0 -39
  135. package/dist/esm/dropzone.css +0 -43
  136. /package/dist/esm/{date-picker.css → 2692.css} +0 -0
  137. /package/dist/esm/{select.css → 5333.css} +0 -0
  138. /package/dist/esm/{radio-group.css → 7580.css} +0 -0
  139. /package/dist/esm/{color-picker.css → 7678.css} +0 -0
  140. /package/dist/esm/{rich-text-editor.css → 9545.css} +0 -0
@@ -1,28 +1,35 @@
1
- import { type ReactNode } from 'react';
2
- export interface ColorPickerProps {
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 ColorPicker: {
25
- ({ value, defaultValue, onValueChange, label, description, error, required, size, disabled, presets, trigger, id: idProp, }: ColorPickerProps): import("react").JSX.Element;
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
- import ColorPicker from './ColorPicker';
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 { type ReactNode } from 'react';
2
- export interface ComboboxOption {
3
- value: string;
4
- label: ReactNode;
5
- disabled?: boolean;
6
- }
7
- export interface ComboboxProps {
8
- options: ComboboxOption[];
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 { 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 Combobox: {
31
- ({ options, value, defaultValue, onValueChange, placeholder, label, description, error, required, size, disabled, emptyMessage, trigger, id: idProp, }: ComboboxProps): import("react").JSX.Element;
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
- import Combobox from './Combobox';
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 { type ReactNode } from 'react';
2
- export interface DatePickerProps {
3
- value?: Date;
4
- defaultValue?: Date;
5
- onValueChange?: (date: Date | undefined) => void;
6
- placeholder?: string;
7
- /** date-fns format string for the trigger's display text. Defaults to 'PPP' (e.g. "April 29th, 2026"). */
8
- dateFormat?: string;
9
- label?: ReactNode;
10
- description?: ReactNode;
11
- error?: ReactNode;
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 DatePicker: {
26
- ({ value, defaultValue, onValueChange, placeholder, dateFormat, label, description, error, required, size, disabled, trigger, id: idProp, }: DatePickerProps): import("react").JSX.Element;
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
- import DatePicker from './DatePicker';
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
- label?: ReactNode;
10
- description?: ReactNode;
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 Dropzone: {
17
- ({ value, onValueChange, accept, maxFiles, maxSize, label, description, error, required, disabled, id: idProp, }: DropzoneProps): import("react").JSX.Element;
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 default Dropzone;
63
+ export {};
@@ -1,3 +1 @@
1
- import Dropzone from './Dropzone';
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 ReactNode } from 'react';
2
- import { type Accept } from 'react-dropzone';
3
- export interface FileUploadProps {
4
- value?: File[];
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 default FileUpload;
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
- import FileUpload from './FileUpload';
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' | 'leadingIcon' | 'trailingIcon'> {
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, type ReactNode } from 'react';
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 { type ReactNode } from 'react';
2
- export interface MultiSelectOption {
3
- value: string;
4
- label: ReactNode;
5
- disabled?: boolean;
6
- }
7
- export interface MultiSelectProps {
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 MultiSelect: {
32
- ({ options, value, defaultValue, onValueChange, placeholder, label, description, error, required, size, emptyMessage, maxVisibleChips, trigger, id: idProp, }: MultiSelectProps): import("react").JSX.Element;
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 default MultiSelect;
42
+ export { ComboboxContent as MultiSelectContent, ComboboxEmpty as MultiSelectEmpty, ComboboxInput as MultiSelectInput, ComboboxItem as MultiSelectItem, ComboboxItemIndicator as MultiSelectItemIndicator, ComboboxList as MultiSelectList, };
@@ -1,3 +1 @@
1
- import MultiSelect from './MultiSelect';
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, type ReactNode } from 'react';
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, type ReactNode } from 'react';
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
- import { type ReactNode } from 'react';
3
- export interface RadioOption {
4
- value: string;
5
- label: ReactNode;
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 interface RadioGroupProps extends Omit<RadixRadioGroup.RadioGroupProps, 'children'> {
9
- options: RadioOption[];
10
- }
11
- declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
12
- export default RadioGroup;
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
- import RadioGroup from './RadioGroup';
2
- export default RadioGroup;
3
- export type { RadioGroupProps, RadioOption } from './RadioGroup';
1
+ export { RadioGroup, RadioGroupIndicator, RadioGroupItem, type RadioGroupIndicatorProps, type RadioGroupItemProps, type RadioGroupProps, } from './RadioGroup';