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