@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,36 +1 @@
1
- import "./switch.css";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useId } from "react";
4
- import { controlRow, controlLabel } from "./2995.js";
5
- import * as __rspack_external__radix_ui_react_switch_5e92b7ed from "@radix-ui/react-switch";
6
- var root = '_1u7tp1u0';
7
- var thumb = '_1u7tp1u1';
8
- const Switch = /*#__PURE__*/ forwardRef(({ label, id: idProp, className, ...rest }, ref)=>{
9
- const generatedId = useId();
10
- const id = idProp ?? generatedId;
11
- const classes = className ? `${root} ${className}` : root;
12
- return /*#__PURE__*/ jsxs("div", {
13
- className: controlRow,
14
- children: [
15
- /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_switch_5e92b7ed.Root, {
16
- ref: ref,
17
- id: id,
18
- className: classes,
19
- ...rest,
20
- children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_switch_5e92b7ed.Thumb, {
21
- className: thumb
22
- })
23
- }),
24
- label ? /*#__PURE__*/ jsx("label", {
25
- htmlFor: id,
26
- className: controlLabel,
27
- children: label
28
- }) : null
29
- ]
30
- });
31
- });
32
- Switch.displayName = 'Switch';
33
- const switch_Switch = Switch;
34
- const components_switch = switch_Switch;
35
- export default components_switch;
36
- export { components_switch as Switch };
1
+ export { Switch, SwitchThumb } from "./1485.js";
@@ -1,18 +1,19 @@
1
1
  import "./tags-input.css";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { XIcon } from "@vinyasa/icons";
4
- import { forwardRef, useId, useState } from "react";
5
- import { field, describedByIds } from "./4557.js";
6
- import { fieldControl } from "./2995.js";
4
+ import { forwardRef, useState } from "react";
5
+ import { fieldControl, useResolvedFieldProps } from "./2315.js";
7
6
  import { chipRow, triggerBox, chip, chipRemove } from "./6720.js";
8
7
  var tagInput = '_1w3na0r0';
9
- const TagsInput = /*#__PURE__*/ forwardRef(({ value, defaultValue = [], onValueChange, placeholder, label, description, error, required, size, max, disabled, id: idProp }, ref)=>{
8
+ const TagsInput = /*#__PURE__*/ forwardRef(({ value, defaultValue = [], onValueChange, placeholder, invalid, size, max, disabled, required, id: idProp }, ref)=>{
10
9
  const [internalValue, setInternalValue] = useState(defaultValue);
11
10
  const isControlled = void 0 !== value;
12
11
  const currentValue = isControlled ? value : internalValue;
13
12
  const [draft, setDraft] = useState('');
14
- const generatedId = useId();
15
- const id = idProp ?? generatedId;
13
+ const { id, invalid: isInvalid, describedBy } = useResolvedFieldProps({
14
+ id: idProp,
15
+ invalid
16
+ });
16
17
  const setValue = (next)=>{
17
18
  if (!isControlled) setInternalValue(next);
18
19
  onValueChange?.(next);
@@ -37,59 +38,50 @@ const TagsInput = /*#__PURE__*/ forwardRef(({ value, defaultValue = [], onValueC
37
38
  }
38
39
  if ('Backspace' === event.key && '' === draft && currentValue.length > 0) removeTag(currentValue[currentValue.length - 1]);
39
40
  };
40
- return /*#__PURE__*/ jsx(field, {
41
- id: id,
42
- label: label,
43
- description: description,
44
- error: error,
45
- required: required,
46
- children: /*#__PURE__*/ jsx("div", {
47
- className: `${fieldControl({
48
- size,
49
- invalid: Boolean(error)
50
- })} ${triggerBox}`,
51
- onClick: (event)=>{
52
- if (event.currentTarget === event.target) event.currentTarget.querySelector('input')?.focus();
53
- },
54
- children: /*#__PURE__*/ jsxs("span", {
55
- className: chipRow,
56
- children: [
57
- currentValue.map((tag)=>/*#__PURE__*/ jsxs("span", {
58
- className: chip,
59
- children: [
60
- tag,
61
- /*#__PURE__*/ jsx("button", {
62
- type: "button",
63
- className: chipRemove,
64
- "aria-label": `Remove ${tag}`,
65
- disabled: disabled,
66
- onClick: ()=>{
67
- removeTag(tag);
68
- },
69
- children: /*#__PURE__*/ jsx(XIcon, {})
70
- })
71
- ]
72
- }, tag)),
73
- /*#__PURE__*/ jsx("input", {
74
- ref: ref,
75
- id: id,
76
- className: tagInput,
77
- value: draft,
78
- placeholder: 0 === currentValue.length ? placeholder : void 0,
79
- disabled: disabled,
80
- required: required && 0 === currentValue.length,
81
- "aria-describedby": describedByIds(id, {
82
- description,
83
- error
84
- }),
85
- onChange: (event)=>{
86
- setDraft(event.target.value);
87
- },
88
- onKeyDown: handleKeyDown,
89
- onBlur: commitDraft
90
- })
91
- ]
92
- })
41
+ return /*#__PURE__*/ jsx("div", {
42
+ className: `${fieldControl({
43
+ size,
44
+ invalid: isInvalid
45
+ })} ${triggerBox}`,
46
+ onClick: (event)=>{
47
+ if (event.currentTarget === event.target) event.currentTarget.querySelector('input')?.focus();
48
+ },
49
+ children: /*#__PURE__*/ jsxs("span", {
50
+ className: chipRow,
51
+ children: [
52
+ currentValue.map((tag)=>/*#__PURE__*/ jsxs("span", {
53
+ className: chip,
54
+ children: [
55
+ tag,
56
+ /*#__PURE__*/ jsx("button", {
57
+ type: "button",
58
+ className: chipRemove,
59
+ "aria-label": `Remove ${tag}`,
60
+ disabled: disabled,
61
+ onClick: ()=>{
62
+ removeTag(tag);
63
+ },
64
+ children: /*#__PURE__*/ jsx(XIcon, {})
65
+ })
66
+ ]
67
+ }, tag)),
68
+ /*#__PURE__*/ jsx("input", {
69
+ ref: ref,
70
+ id: id,
71
+ className: tagInput,
72
+ value: draft,
73
+ placeholder: 0 === currentValue.length ? placeholder : void 0,
74
+ disabled: disabled,
75
+ required: required && 0 === currentValue.length,
76
+ "aria-invalid": isInvalid,
77
+ "aria-describedby": describedBy,
78
+ onChange: (event)=>{
79
+ setDraft(event.target.value);
80
+ },
81
+ onKeyDown: handleKeyDown,
82
+ onBlur: commitDraft
83
+ })
84
+ ]
93
85
  })
94
86
  });
95
87
  });
@@ -1,21 +1,23 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef, useId, useRef } from "react";
3
- import { fieldControl } from "./2995.js";
4
- import { field, describedByIds } from "./4557.js";
2
+ import { forwardRef, useRef } from "react";
3
+ import { fieldControl, useResolvedFieldProps } from "./2315.js";
5
4
  const mergeRefs = (...refs)=>(node)=>{
6
5
  for (const ref of refs)if ('function' == typeof ref) ref(node);
7
6
  else if (ref) ref.current = node;
8
7
  };
9
- const Textarea = /*#__PURE__*/ forwardRef(({ label, description, error, required, size, autoResize = false, onChange, id: idProp, className, style, ...rest }, ref)=>{
10
- const generatedId = useId();
11
- const id = idProp ?? generatedId;
8
+ const Textarea = /*#__PURE__*/ forwardRef(({ size, invalid, autoResize = false, onChange, id: idProp, className, style, 'aria-describedby': ariaDescribedBy, ...rest }, ref)=>{
9
+ const { id, invalid: isInvalid, describedBy } = useResolvedFieldProps({
10
+ id: idProp,
11
+ invalid,
12
+ describedBy: ariaDescribedBy
13
+ });
12
14
  const innerRef = useRef(null);
13
15
  const classes = className ? `${fieldControl({
14
16
  size,
15
- invalid: Boolean(error)
17
+ invalid: isInvalid
16
18
  })} ${className}` : fieldControl({
17
19
  size,
18
- invalid: Boolean(error)
20
+ invalid: isInvalid
19
21
  });
20
22
  const resize = (element)=>{
21
23
  element.style.height = 'auto';
@@ -25,30 +27,19 @@ const Textarea = /*#__PURE__*/ forwardRef(({ label, description, error, required
25
27
  if (autoResize) resize(event.currentTarget);
26
28
  onChange?.(event);
27
29
  };
28
- return /*#__PURE__*/ jsx(field, {
30
+ return /*#__PURE__*/ jsx("textarea", {
31
+ ref: mergeRefs(ref, innerRef),
29
32
  id: id,
30
- label: label,
31
- description: description,
32
- error: error,
33
- required: required,
34
- children: /*#__PURE__*/ jsx("textarea", {
35
- ref: mergeRefs(ref, innerRef),
36
- id: id,
37
- className: classes,
38
- required: required,
39
- "aria-invalid": error ? true : void 0,
40
- "aria-describedby": describedByIds(id, {
41
- description,
42
- error
43
- }),
44
- onChange: handleChange,
45
- style: autoResize ? {
46
- resize: 'none',
47
- overflow: 'hidden',
48
- ...style
49
- } : style,
50
- ...rest
51
- })
33
+ className: classes,
34
+ "aria-invalid": isInvalid,
35
+ "aria-describedby": describedBy,
36
+ onChange: handleChange,
37
+ style: autoResize ? {
38
+ resize: 'none',
39
+ overflow: 'hidden',
40
+ ...style
41
+ } : style,
42
+ ...rest
52
43
  });
53
44
  });
54
45
  Textarea.displayName = 'Textarea';
@@ -1,137 +1 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { CheckIcon, ClockIcon, SearchIcon } from "@vinyasa/icons";
3
- import { Command } from "cmdk";
4
- import { format, parse } from "date-fns";
5
- import { useId, useMemo, useState } from "react";
6
- import { field, describedByIds } from "./4557.js";
7
- import { fieldControl } from "./2995.js";
8
- import { triggerText, empty, triggerIcon, searchIcon, placeholder as selectPopover_css_placeholder, content, searchInput, item, itemIndicator, searchWrapper, trigger as selectPopover_css_trigger, list } from "./6720.js";
9
- import * as __rspack_external__radix_ui_react_popover_e2827c9f from "@radix-ui/react-popover";
10
- const REFERENCE_DATE = new Date(2000, 0, 1);
11
- const parseTime = (time)=>parse(time, 'HH:mm', REFERENCE_DATE);
12
- const generateTimeOptions = (stepMinutes)=>{
13
- const options = [];
14
- for(let minutes = 0; minutes < 1440; minutes += stepMinutes){
15
- const hours = Math.floor(minutes / 60);
16
- const mins = minutes % 60;
17
- options.push(`${String(hours).padStart(2, '0')}:${String(mins).padStart(2, '0')}`);
18
- }
19
- return options;
20
- };
21
- const TimePicker = ({ value, defaultValue, onValueChange, placeholder = 'Select a time', timeFormat = 'h:mm a', stepMinutes = 30, label, description, error, required, size, disabled, trigger, id: idProp })=>{
22
- const [internalValue, setInternalValue] = useState(defaultValue);
23
- const isControlled = void 0 !== value;
24
- const currentValue = isControlled ? value : internalValue;
25
- const [open, setOpen] = useState(false);
26
- const [search, setSearch] = useState('');
27
- const generatedId = useId();
28
- const id = idProp ?? generatedId;
29
- const options = useMemo(()=>generateTimeOptions(stepMinutes), [
30
- stepMinutes
31
- ]);
32
- const handleSelect = (time)=>{
33
- if (!isControlled) setInternalValue(time);
34
- onValueChange?.(time);
35
- setOpen(false);
36
- };
37
- return /*#__PURE__*/ jsx(field, {
38
- id: id,
39
- label: label,
40
- description: description,
41
- error: error,
42
- required: required,
43
- children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_popover_e2827c9f.Root, {
44
- open: open,
45
- onOpenChange: (next)=>{
46
- setOpen(next);
47
- if (!next) setSearch('');
48
- },
49
- children: [
50
- /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Trigger, {
51
- asChild: true,
52
- children: trigger ?? /*#__PURE__*/ jsxs("button", {
53
- type: "button",
54
- id: id,
55
- disabled: disabled,
56
- className: `${fieldControl({
57
- size,
58
- invalid: Boolean(error)
59
- })} ${selectPopover_css_trigger}`,
60
- "aria-describedby": describedByIds(id, {
61
- description,
62
- error
63
- }),
64
- children: [
65
- /*#__PURE__*/ jsx("span", {
66
- className: currentValue ? triggerText : `${triggerText} ${selectPopover_css_placeholder}`,
67
- children: currentValue ? format(parseTime(currentValue), timeFormat) : placeholder
68
- }),
69
- /*#__PURE__*/ jsx("span", {
70
- className: triggerIcon,
71
- "aria-hidden": "true",
72
- children: /*#__PURE__*/ jsx(ClockIcon, {})
73
- })
74
- ]
75
- })
76
- }),
77
- /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_e2827c9f.Content, {
78
- className: content,
79
- align: "start",
80
- sideOffset: 4,
81
- children: /*#__PURE__*/ jsxs(Command, {
82
- loop: true,
83
- label: 'string' == typeof label ? label : 'Search times',
84
- children: [
85
- /*#__PURE__*/ jsxs("div", {
86
- className: searchWrapper,
87
- children: [
88
- /*#__PURE__*/ jsx("span", {
89
- className: searchIcon,
90
- "aria-hidden": "true",
91
- children: /*#__PURE__*/ jsx(SearchIcon, {})
92
- }),
93
- /*#__PURE__*/ jsx(Command.Input, {
94
- autoFocus: true,
95
- value: search,
96
- onValueChange: setSearch,
97
- placeholder: "Search…",
98
- className: searchInput
99
- })
100
- ]
101
- }),
102
- /*#__PURE__*/ jsxs(Command.List, {
103
- className: list,
104
- children: [
105
- /*#__PURE__*/ jsx(Command.Empty, {
106
- className: empty,
107
- children: "No matching times."
108
- }),
109
- options.map((time)=>/*#__PURE__*/ jsxs(Command.Item, {
110
- value: format(parseTime(time), timeFormat),
111
- onSelect: ()=>{
112
- handleSelect(time);
113
- },
114
- className: item,
115
- "data-selected": time === currentValue,
116
- children: [
117
- format(parseTime(time), timeFormat),
118
- time === currentValue ? /*#__PURE__*/ jsx("span", {
119
- className: itemIndicator,
120
- children: /*#__PURE__*/ jsx(CheckIcon, {})
121
- }) : null
122
- ]
123
- }, time))
124
- ]
125
- })
126
- ]
127
- })
128
- })
129
- ]
130
- })
131
- });
132
- };
133
- TimePicker.displayName = 'TimePicker';
134
- const time_picker_TimePicker = TimePicker;
135
- const time_picker = time_picker_TimePicker;
136
- export default time_picker;
137
- export { time_picker as TimePicker };
1
+ export { TimePicker, TimePickerContent, TimePickerIcon, TimePickerTrigger, TimePickerValue } from "./7800.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vinyasa/form",
3
- "version": "1.0.22",
3
+ "version": "1.0.23",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -187,6 +187,13 @@
187
187
  "default": "./dist/esm/dropzone.js"
188
188
  },
189
189
  "./dropzone/style.css": "./dist/esm/dropzone.css",
190
+ "./field": {
191
+ "types": "./dist/esm/field.d.ts",
192
+ "import": "./dist/esm/field.js",
193
+ "require": "./dist/cjs/field.cjs",
194
+ "default": "./dist/esm/field.js"
195
+ },
196
+ "./field/style.css": "./dist/esm/field.css",
190
197
  "./rich-text-editor": {
191
198
  "types": "./dist/esm/rich-text-editor.d.ts",
192
199
  "import": "./dist/esm/rich-text-editor.js",
@@ -200,10 +207,10 @@
200
207
  "peerDependencies": {
201
208
  "react": "^18.0.0 || ^19.0.0",
202
209
  "react-dom": "^18.0.0 || ^19.0.0",
203
- "@vinyasa/button": "^1.0.22",
204
- "@vinyasa/layout": "^1.0.22",
205
- "@vinyasa/icons": "^1.0.22",
206
- "@vinyasa/tokens": "^1.0.22"
210
+ "@vinyasa/button": "^1.0.23",
211
+ "@vinyasa/icons": "^1.0.23",
212
+ "@vinyasa/layout": "^1.0.23",
213
+ "@vinyasa/tokens": "^1.0.23"
207
214
  },
208
215
  "dependencies": {
209
216
  "@radix-ui/react-checkbox": "^1.3.11",
@@ -211,6 +218,7 @@
211
218
  "@radix-ui/react-radio-group": "^1.4.7",
212
219
  "@radix-ui/react-select": "^2.3.7",
213
220
  "@radix-ui/react-slider": "^1.4.7",
221
+ "@radix-ui/react-slot": "^1.3.3",
214
222
  "@radix-ui/react-switch": "^1.3.7",
215
223
  "@radix-ui/react-toggle": "^1.1.18",
216
224
  "@tiptap/core": "^3.31.3",
@@ -235,10 +243,11 @@
235
243
  "@vanilla-extract/vite-plugin": "^5.2.3",
236
244
  "@vanilla-extract/webpack-plugin": "^2.3.27",
237
245
  "typescript": "^5.7.3",
238
- "@vinyasa/icons": "1.0.22",
239
- "@vinyasa/layout": "1.0.22",
240
- "@vinyasa/tokens": "1.0.22",
241
- "@vinyasa/button": "1.0.22"
246
+ "@vinyasa/layout": "1.0.23",
247
+ "@vinyasa/button": "1.0.23",
248
+ "@vinyasa/icons": "1.0.23",
249
+ "@vinyasa/tokens": "1.0.23",
250
+ "@vinyasa/typography": "1.0.23"
242
251
  },
243
252
  "scripts": {
244
253
  "build": "rslib build && node ../../scripts/postbuild-package.mjs",
package/dist/esm/2942.js DELETED
@@ -1,13 +0,0 @@
1
- import "./2942.css";
2
- var fileList = '_3ltn2y2';
3
- var fileListWrapper = '_3ltn2y1';
4
- var fileMeta = '_3ltn2y7';
5
- var fileName = '_3ltn2y4';
6
- var fileNameIcon = '_3ltn2y5';
7
- var fileNameText = '_3ltn2y6';
8
- var fileRemove = '_3ltn2y9';
9
- var fileRow = '_3ltn2y3';
10
- var fileSize = '_3ltn2y8';
11
- var rejectionText = '_3ltn2ya';
12
- var trigger = '_3ltn2y0';
13
- export { fileList, fileListWrapper, fileMeta, fileName, fileNameIcon, fileNameText, fileRemove, fileRow, fileSize, rejectionText, trigger };
package/dist/esm/4557.js DELETED
@@ -1,39 +0,0 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { label as field_css_label, errorText, descriptionText, requiredMark } from "./2995.js";
3
- const describedByIds = (id, { description, error })=>{
4
- const ids = [];
5
- if (description) ids.push(`${id}-description`);
6
- if (error) ids.push(`${id}-error`);
7
- return ids.length > 0 ? ids.join(' ') : void 0;
8
- };
9
- const FieldChrome = ({ id, label, description, error, required, children, disableLabelFor = false })=>/*#__PURE__*/ jsxs("div", {
10
- children: [
11
- label ? /*#__PURE__*/ jsxs("label", {
12
- htmlFor: disableLabelFor ? void 0 : id,
13
- id: `${id}-label`,
14
- className: field_css_label,
15
- children: [
16
- label,
17
- required ? /*#__PURE__*/ jsx("span", {
18
- className: requiredMark,
19
- "aria-hidden": "true",
20
- children: "*"
21
- }) : null
22
- ]
23
- }) : null,
24
- children,
25
- description ? /*#__PURE__*/ jsx("p", {
26
- id: `${id}-description`,
27
- className: descriptionText,
28
- children: description
29
- }) : null,
30
- error ? /*#__PURE__*/ jsx("p", {
31
- id: `${id}-error`,
32
- className: errorText,
33
- role: "alert",
34
- children: error
35
- }) : null
36
- ]
37
- });
38
- const field = FieldChrome;
39
- export { describedByIds, field };
@@ -1,43 +0,0 @@
1
- .rnivxt0 {
2
- justify-content: center;
3
- align-items: center;
4
- gap: var(--vinyasa-space2);
5
- width: 100%;
6
- padding: var(--vinyasa-space6);
7
- border: 2px dashed var(--vinyasa-border-color-default);
8
- border-radius: var(--vinyasa-radius-md);
9
- color: var(--vinyasa-text-muted);
10
- font-family: var(--vinyasa-font-family-sans);
11
- font-size: var(--vinyasa-font-size-sm);
12
- text-align: center;
13
- cursor: pointer;
14
- transition: border-color var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard), background-color var(--vinyasa-motion-duration-fast) var(--vinyasa-motion-easing-standard);
15
- background-color: #0000;
16
- flex-direction: column;
17
- display: flex;
18
- }
19
-
20
- .rnivxt0:focus-visible {
21
- border-color: var(--vinyasa-focus);
22
- box-shadow: 0 0 0 1px var(--vinyasa-focus), 0 0 0 4px color-mix(in srgb, var(--vinyasa-focus) 16%, transparent);
23
- outline: none;
24
- }
25
-
26
- .rnivxt0[data-disabled="true"] {
27
- opacity: var(--vinyasa-opacity-disabled);
28
- cursor: not-allowed;
29
- }
30
-
31
- .rnivxt1 {
32
- border-color: var(--vinyasa-focus);
33
- background-color: var(--vinyasa-secondary);
34
- }
35
-
36
- .rnivxt2 {
37
- font-size: 1.5rem;
38
- }
39
-
40
- .rnivxt3 {
41
- font-size: var(--vinyasa-font-size-xs);
42
- }
43
-
File without changes
File without changes
File without changes
File without changes
File without changes