@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
@@ -126,7 +126,7 @@
126
126
  }
127
127
 
128
128
  .sbqkrxf {
129
- align-items: center;
129
+ align-items: flex-start;
130
130
  gap: var(--vinyasa-space2);
131
131
  display: inline-flex;
132
132
  }
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  var __webpack_modules__ = {
3
+ 51 () {},
3
4
  400 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
4
5
  function toPrimitive(t, r) {
5
6
  if ("object" != typeof t || !t) return t;
@@ -91,24 +92,12 @@ var __webpack_modules__ = {
91
92
  c: ()=>createRuntimeFn
92
93
  });
93
94
  },
94
- 891 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
95
- __webpack_require__.d(__webpack_exports__, {
96
- ij: ()=>descriptionText,
97
- kc: ()=>errorText,
98
- Ij: ()=>fieldControl,
99
- X_: ()=>fieldControlWithLeadingIcon,
100
- RY: ()=>fieldControlWithTrailingIcon,
101
- Y8: ()=>fieldGroup,
102
- KT: ()=>fieldIconButton,
103
- k$: ()=>fieldIconLeading,
104
- k: ()=>fieldIconTrailing,
105
- Pf: ()=>label,
106
- Zy: ()=>requiredMark
107
- });
108
- var createRuntimeFn_62c9670f_esm = __webpack_require__(400);
95
+ 318 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
96
+ __webpack_require__(51);
97
+ var _vanilla_extract_recipes_createRuntimeFn__rspack_import_1 = __webpack_require__(400);
109
98
  var descriptionText = 'sbqkrxd';
110
99
  var errorText = 'sbqkrxe';
111
- var fieldControl = (0, createRuntimeFn_62c9670f_esm.c)({
100
+ var fieldControl = (0, _vanilla_extract_recipes_createRuntimeFn__rspack_import_1.c)({
112
101
  defaultClassName: 'sbqkrx0',
113
102
  variantClassNames: {
114
103
  size: {
@@ -133,51 +122,218 @@ var __webpack_modules__ = {
133
122
  var fieldIconTrailing = 'sbqkrx7';
134
123
  var label = 'sbqkrxb';
135
124
  var requiredMark = 'sbqkrxc';
125
+ __webpack_require__.d(__webpack_exports__, {
126
+ Ij: ()=>fieldControl,
127
+ KT: ()=>fieldIconButton,
128
+ Pf: ()=>label,
129
+ RY: ()=>fieldControlWithTrailingIcon,
130
+ X_: ()=>fieldControlWithLeadingIcon,
131
+ Y8: ()=>fieldGroup,
132
+ Zy: ()=>requiredMark,
133
+ ij: ()=>descriptionText,
134
+ k: ()=>fieldIconTrailing,
135
+ k$: ()=>fieldIconLeading,
136
+ kc: ()=>errorText
137
+ });
136
138
  },
137
- 140 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
139
+ 598 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
138
140
  var react_jsx_runtime__rspack_import_0 = __webpack_require__(732);
139
- var _field_css__rspack_import_1 = __webpack_require__(891);
140
- const describedByIds = (id, { description, error })=>{
141
- const ids = [];
142
- if (description) ids.push(`${id}-description`);
143
- if (error) ids.push(`${id}-error`);
144
- return ids.length > 0 ? ids.join(' ') : void 0;
141
+ var _radix_ui_react_slot__rspack_import_1 = __webpack_require__(922);
142
+ var react__rspack_import_2 = __webpack_require__(15);
143
+ var _field_css__rspack_import_3 = __webpack_require__(318);
144
+ function _define_property(obj, key, value) {
145
+ if (key in obj) Object.defineProperty(obj, key, {
146
+ value: value,
147
+ enumerable: true,
148
+ configurable: true,
149
+ writable: true
150
+ });
151
+ else obj[key] = value;
152
+ return obj;
153
+ }
154
+ function _object_spread(target) {
155
+ for(var i = 1; i < arguments.length; i++){
156
+ var source = null != arguments[i] ? arguments[i] : {};
157
+ var ownKeys = Object.keys(source);
158
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
159
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
160
+ }));
161
+ ownKeys.forEach(function(key) {
162
+ _define_property(target, key, source[key]);
163
+ });
164
+ }
165
+ return target;
166
+ }
167
+ function ownKeys(object, enumerableOnly) {
168
+ var keys = Object.keys(object);
169
+ if (Object.getOwnPropertySymbols) {
170
+ var symbols = Object.getOwnPropertySymbols(object);
171
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
172
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
173
+ });
174
+ keys.push.apply(keys, symbols);
175
+ }
176
+ return keys;
177
+ }
178
+ function _object_spread_props(target, source) {
179
+ source = null != source ? source : {};
180
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
181
+ else ownKeys(Object(source)).forEach(function(key) {
182
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
183
+ });
184
+ return target;
185
+ }
186
+ function _object_without_properties(source, excluded) {
187
+ if (null == source) return {};
188
+ var target = {}, sourceKeys, key, i;
189
+ if ("u" > typeof Reflect && Reflect.ownKeys) {
190
+ sourceKeys = Reflect.ownKeys(Object(source));
191
+ for(i = 0; i < sourceKeys.length; i++){
192
+ key = sourceKeys[i];
193
+ if (!(excluded.indexOf(key) >= 0)) {
194
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
195
+ }
196
+ }
197
+ return target;
198
+ }
199
+ target = _object_without_properties_loose(source, excluded);
200
+ if (Object.getOwnPropertySymbols) {
201
+ sourceKeys = Object.getOwnPropertySymbols(source);
202
+ for(i = 0; i < sourceKeys.length; i++){
203
+ key = sourceKeys[i];
204
+ if (!(excluded.indexOf(key) >= 0)) {
205
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
206
+ }
207
+ }
208
+ }
209
+ return target;
210
+ }
211
+ function _object_without_properties_loose(source, excluded) {
212
+ if (null == source) return {};
213
+ var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
214
+ for(i = 0; i < sourceKeys.length; i++){
215
+ key = sourceKeys[i];
216
+ if (!(excluded.indexOf(key) >= 0)) {
217
+ if (Object.prototype.propertyIsEnumerable.call(source, key)) target[key] = source[key];
218
+ }
219
+ }
220
+ return target;
221
+ }
222
+ const FieldContext = /*#__PURE__*/ (0, react__rspack_import_2.createContext)(null);
223
+ const useFieldContext = ()=>(0, react__rspack_import_2.useContext)(FieldContext);
224
+ const useResolvedFieldProps = (props)=>{
225
+ var _ref, _props_id, _ref1, _props_invalid, _props_describedBy;
226
+ const context = useFieldContext();
227
+ const generatedId = (0, react__rspack_import_2.useId)();
228
+ return {
229
+ id: null != (_ref = null != (_props_id = props.id) ? _props_id : null == context ? void 0 : context.id) ? _ref : generatedId,
230
+ invalid: null != (_ref1 = null != (_props_invalid = props.invalid) ? _props_invalid : null == context ? void 0 : context.invalid) ? _ref1 : false,
231
+ describedBy: null != (_props_describedBy = props.describedBy) ? _props_describedBy : null == context ? void 0 : context.describedBy
232
+ };
233
+ };
234
+ const Field = (_0)=>{
235
+ let { invalid = false, children } = _0, rest = _object_without_properties(_0, [
236
+ "invalid",
237
+ "children"
238
+ ]);
239
+ const generatedId = (0, react__rspack_import_2.useId)();
240
+ const descriptionId = `${generatedId}-description`;
241
+ const errorId = `${generatedId}-error`;
242
+ const labelId = `${generatedId}-label`;
243
+ const directChildren = react__rspack_import_2.Children.toArray(children).filter(react__rspack_import_2.isValidElement);
244
+ const describedByIds = directChildren.reduce((ids, child)=>{
245
+ if (child.type === FieldDescription) ids.push(descriptionId);
246
+ if (child.type === FieldError) ids.push(errorId);
247
+ return ids;
248
+ }, []);
249
+ const labelChild = directChildren.find((child)=>child.type === FieldLabel);
250
+ const labelChildText = labelChild && 'string' == typeof labelChild.props.children ? labelChild.props.children : void 0;
251
+ const value = {
252
+ id: generatedId,
253
+ descriptionId,
254
+ errorId,
255
+ describedBy: describedByIds.length > 0 ? describedByIds.join(' ') : void 0,
256
+ invalid,
257
+ labelId: labelChild ? labelId : void 0,
258
+ labelText: labelChildText
259
+ };
260
+ return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(FieldContext.Provider, {
261
+ value: value,
262
+ children: /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("div", _object_spread_props(_object_spread({}, rest), {
263
+ children: children
264
+ }))
265
+ });
145
266
  };
146
- const FieldChrome = ({ id, label, description, error, required, children, disableLabelFor = false })=>/*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("div", {
267
+ Field.displayName = 'Field';
268
+ const FieldLabel = (_0)=>{
269
+ let { required, htmlFor, id, children } = _0, rest = _object_without_properties(_0, [
270
+ "required",
271
+ "htmlFor",
272
+ "id",
273
+ "children"
274
+ ]);
275
+ const context = useFieldContext();
276
+ const resolvedHtmlFor = false === htmlFor ? void 0 : null != htmlFor ? htmlFor : null == context ? void 0 : context.id;
277
+ return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("label", _object_spread_props(_object_spread({
278
+ htmlFor: resolvedHtmlFor,
279
+ id: null != id ? id : null == context ? void 0 : context.labelId,
280
+ className: _field_css__rspack_import_3.Pf
281
+ }, rest), {
147
282
  children: [
148
- label ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsxs)("label", {
149
- htmlFor: disableLabelFor ? void 0 : id,
150
- id: `${id}-label`,
151
- className: _field_css__rspack_import_1.Pf,
152
- children: [
153
- label,
154
- required ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("span", {
155
- className: _field_css__rspack_import_1.Zy,
156
- "aria-hidden": "true",
157
- children: "*"
158
- }) : null
159
- ]
160
- }) : null,
161
283
  children,
162
- description ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", {
163
- id: `${id}-description`,
164
- className: _field_css__rspack_import_1.ij,
165
- children: description
166
- }) : null,
167
- error ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", {
168
- id: `${id}-error`,
169
- className: _field_css__rspack_import_1.kc,
170
- role: "alert",
171
- children: error
284
+ required ? /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("span", {
285
+ className: _field_css__rspack_import_3.Zy,
286
+ "aria-hidden": "true",
287
+ children: "*"
172
288
  }) : null
173
289
  ]
174
- });
175
- const __rspack_default_export = FieldChrome;
290
+ }));
291
+ };
292
+ FieldLabel.displayName = 'FieldLabel';
293
+ const FieldControl = (_0)=>{
294
+ let { children } = _0, rest = _object_without_properties(_0, [
295
+ "children"
296
+ ]);
297
+ const context = useFieldContext();
298
+ return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)(_radix_ui_react_slot__rspack_import_1.Slot, _object_spread_props(_object_spread({
299
+ id: null == context ? void 0 : context.id,
300
+ "aria-describedby": null == context ? void 0 : context.describedBy,
301
+ "aria-invalid": null == context ? void 0 : context.invalid
302
+ }, rest), {
303
+ children: children
304
+ }));
305
+ };
306
+ FieldControl.displayName = 'FieldControl';
307
+ const FieldDescription = (_0)=>{
308
+ let { id } = _0, rest = _object_without_properties(_0, [
309
+ "id"
310
+ ]);
311
+ const context = useFieldContext();
312
+ return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", _object_spread({
313
+ id: null != id ? id : null == context ? void 0 : context.descriptionId,
314
+ className: _field_css__rspack_import_3.ij
315
+ }, rest));
316
+ };
317
+ FieldDescription.displayName = "FieldDescription";
318
+ const FieldError = (_0)=>{
319
+ let { id } = _0, rest = _object_without_properties(_0, [
320
+ "id"
321
+ ]);
322
+ const context = useFieldContext();
323
+ return /*#__PURE__*/ (0, react_jsx_runtime__rspack_import_0.jsx)("p", _object_spread({
324
+ id: null != id ? id : null == context ? void 0 : context.errorId,
325
+ className: _field_css__rspack_import_3.kc,
326
+ role: "alert"
327
+ }, rest));
328
+ };
329
+ FieldError.displayName = 'FieldError';
176
330
  __webpack_require__.d(__webpack_exports__, {}, {
177
- A: __rspack_default_export,
178
- z: describedByIds
331
+ I: useResolvedFieldProps
179
332
  });
180
333
  },
334
+ 922 (module) {
335
+ module.exports = require("@radix-ui/react-slot");
336
+ },
181
337
  586 (module) {
182
338
  module.exports = require("@vinyasa/icons");
183
339
  },
@@ -241,8 +397,8 @@ var __webpack_exports__ = {};
241
397
  var jsx_runtime_ = __webpack_require__(732);
242
398
  var icons_ = __webpack_require__(586);
243
399
  var external_react_ = __webpack_require__(15);
244
- var field = __webpack_require__(140);
245
- var field_css = __webpack_require__(891);
400
+ var field_css = __webpack_require__(318);
401
+ var Field = __webpack_require__(598);
246
402
  function _define_property(obj, key, value) {
247
403
  if (key in obj) Object.defineProperty(obj, key, {
248
404
  value: value,
@@ -306,65 +462,55 @@ var __webpack_exports__ = {};
306
462
  let _ref = [
307
463
  _0,
308
464
  _1
309
- ], [_ref1, ..._rest] = _ref, { label, description, error, required, size, onClear, value, id: idProp, className } = _ref1, rest = _object_without_properties(_ref1, [
310
- "label",
311
- "description",
312
- "error",
313
- "required",
465
+ ], [_ref1, ..._rest] = _ref, { size, invalid, onClear, value, id: idProp, className, 'aria-describedby': ariaDescribedBy } = _ref1, rest = _object_without_properties(_ref1, [
314
466
  "size",
467
+ "invalid",
315
468
  "onClear",
316
469
  "value",
317
470
  "id",
318
- "className"
471
+ "className",
472
+ 'aria-describedby'
319
473
  ]), [ref] = _rest;
320
- const generatedId = (0, external_react_.useId)();
321
- const id = null != idProp ? idProp : generatedId;
474
+ const { id, invalid: isInvalid, describedBy } = (0, Field.I)({
475
+ id: idProp,
476
+ invalid,
477
+ describedBy: ariaDescribedBy
478
+ });
322
479
  const showClear = Boolean(onClear) && Boolean(value);
323
480
  const classes = [
324
481
  (0, field_css.Ij)({
325
482
  size,
326
- invalid: Boolean(error)
483
+ invalid: isInvalid
327
484
  }),
328
485
  field_css.X_,
329
486
  showClear ? field_css.RY : '',
330
487
  null != className ? className : ''
331
488
  ].filter(Boolean).join(' ');
332
- return /*#__PURE__*/ (0, jsx_runtime_.jsx)(field.A, {
333
- id: id,
334
- label: label,
335
- description: description,
336
- error: error,
337
- required: required,
338
- children: /*#__PURE__*/ (0, jsx_runtime_.jsxs)("div", {
339
- className: field_css.Y8,
340
- children: [
341
- /*#__PURE__*/ (0, jsx_runtime_.jsx)("span", {
342
- className: field_css.k$,
343
- "aria-hidden": "true",
344
- children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.SearchIcon, {})
345
- }),
346
- /*#__PURE__*/ (0, jsx_runtime_.jsx)("input", _object_spread({
347
- ref: ref,
348
- id: id,
349
- type: "search",
350
- value: value,
351
- className: classes,
352
- required: required,
353
- "aria-invalid": error ? true : void 0,
354
- "aria-describedby": (0, field.z)(id, {
355
- description,
356
- error
357
- })
358
- }, rest)),
359
- showClear ? /*#__PURE__*/ (0, jsx_runtime_.jsx)("button", {
360
- type: "button",
361
- className: `${field_css.k} ${field_css.KT}`,
362
- onClick: onClear,
363
- "aria-label": "Clear search",
364
- children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.XIcon, {})
365
- }) : null
366
- ]
367
- })
489
+ return /*#__PURE__*/ (0, jsx_runtime_.jsxs)("div", {
490
+ className: field_css.Y8,
491
+ children: [
492
+ /*#__PURE__*/ (0, jsx_runtime_.jsx)("span", {
493
+ className: field_css.k$,
494
+ "aria-hidden": "true",
495
+ children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.SearchIcon, {})
496
+ }),
497
+ /*#__PURE__*/ (0, jsx_runtime_.jsx)("input", _object_spread({
498
+ ref: ref,
499
+ id: id,
500
+ type: "search",
501
+ value: value,
502
+ className: classes,
503
+ "aria-invalid": isInvalid,
504
+ "aria-describedby": describedBy
505
+ }, rest)),
506
+ showClear ? /*#__PURE__*/ (0, jsx_runtime_.jsx)("button", {
507
+ type: "button",
508
+ className: `${field_css.k} ${field_css.KT}`,
509
+ onClick: onClear,
510
+ "aria-label": "Clear search",
511
+ children: /*#__PURE__*/ (0, jsx_runtime_.jsx)(icons_.XIcon, {})
512
+ }) : null
513
+ ]
368
514
  });
369
515
  });
370
516
  SearchInput.displayName = 'SearchInput';
@@ -126,7 +126,7 @@
126
126
  }
127
127
 
128
128
  .sbqkrxf {
129
- align-items: center;
129
+ align-items: flex-start;
130
130
  gap: var(--vinyasa-space2);
131
131
  display: inline-flex;
132
132
  }