@react-fabric/form 1.0.0-beta.61 → 1.0.0-beta.63

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 (155) hide show
  1. package/css/_colorPicker.css +35 -5
  2. package/css/_file.css +2 -2
  3. package/dist/cjs/builder/FileField.js +14 -11
  4. package/dist/cjs/builder/SchemaEditor.js +1 -1
  5. package/dist/cjs/builder/components/SchemaArrayForm.js +2 -4
  6. package/dist/cjs/builder/components/SchemaField.js +3 -3
  7. package/dist/cjs/form/Controller.js +1 -1
  8. package/dist/cjs/form/Form.js +42 -41
  9. package/dist/cjs/form/useForm.js +32 -0
  10. package/dist/cjs/hooks/useFileUploader.js +44 -32
  11. package/dist/cjs/hooks/useFormBuilder.js +3 -3
  12. package/dist/cjs/i18n/index.js +4 -4
  13. package/dist/cjs/index.js +2 -1
  14. package/dist/cjs/input/ArrayInput.js +66 -19
  15. package/dist/cjs/input/AvatarInput.js +21 -16
  16. package/dist/cjs/input/Checkbox.js +1 -1
  17. package/dist/cjs/input/ColorInput.js +26 -19
  18. package/dist/cjs/input/ColorPicker.js +16 -9
  19. package/dist/cjs/input/DateInput.js +3 -3
  20. package/dist/cjs/input/Field.js +1 -1
  21. package/dist/cjs/input/File.js +1 -1
  22. package/dist/cjs/input/Hidden.js +2 -11
  23. package/dist/cjs/input/Input.js +1 -1
  24. package/dist/cjs/input/Number.js +1 -1
  25. package/dist/cjs/input/Password.js +1 -1
  26. package/dist/cjs/input/Radio.js +1 -1
  27. package/dist/cjs/input/RadioGroup.js +7 -3
  28. package/dist/cjs/input/RangeSlider.js +1 -1
  29. package/dist/cjs/input/Search.js +1 -1
  30. package/dist/cjs/input/Slider.js +1 -1
  31. package/dist/cjs/input/Switch.js +4 -4
  32. package/dist/cjs/input/Textarea.js +1 -1
  33. package/dist/cjs/internal/InputWrapper.js +2 -2
  34. package/dist/cjs/ranger/index.js +5 -5
  35. package/dist/cjs/select/AutoComplete.js +4 -2
  36. package/dist/cjs/select/DualList.js +3 -3
  37. package/dist/cjs/select/List.js +7 -4
  38. package/dist/cjs/select/Options.js +5 -4
  39. package/dist/cjs/select/Select.js +5 -3
  40. package/dist/cjs/select/useSelect.js +15 -13
  41. package/dist/esm/builder/FileField.js +14 -11
  42. package/dist/esm/builder/SchemaEditor.js +1 -1
  43. package/dist/esm/builder/components/SchemaArrayForm.js +2 -4
  44. package/dist/esm/builder/components/SchemaField.js +3 -3
  45. package/dist/esm/form/Controller.js +1 -1
  46. package/dist/esm/form/Form.js +45 -43
  47. package/dist/esm/form/useForm.js +32 -0
  48. package/dist/esm/hooks/useFileUploader.js +45 -33
  49. package/dist/esm/hooks/useFormBuilder.js +3 -3
  50. package/dist/esm/i18n/index.js +2 -2
  51. package/dist/esm/index.js +2 -1
  52. package/dist/esm/input/ArrayInput.js +66 -19
  53. package/dist/esm/input/AvatarInput.js +21 -16
  54. package/dist/esm/input/Checkbox.js +1 -1
  55. package/dist/esm/input/ColorInput.js +27 -20
  56. package/dist/esm/input/ColorPicker.js +17 -10
  57. package/dist/esm/input/DateInput.js +3 -3
  58. package/dist/esm/input/Field.js +1 -1
  59. package/dist/esm/input/File.js +1 -1
  60. package/dist/esm/input/Hidden.js +3 -12
  61. package/dist/esm/input/Input.js +1 -1
  62. package/dist/esm/input/Number.js +1 -1
  63. package/dist/esm/input/Password.js +1 -1
  64. package/dist/esm/input/Radio.js +1 -1
  65. package/dist/esm/input/RadioGroup.js +7 -3
  66. package/dist/esm/input/RangeSlider.js +1 -1
  67. package/dist/esm/input/Search.js +1 -1
  68. package/dist/esm/input/Slider.js +1 -1
  69. package/dist/esm/input/Switch.js +4 -4
  70. package/dist/esm/input/Textarea.js +1 -1
  71. package/dist/esm/internal/InputWrapper.js +2 -2
  72. package/dist/esm/ranger/index.js +5 -5
  73. package/dist/esm/select/AutoComplete.js +4 -2
  74. package/dist/esm/select/DualList.js +3 -3
  75. package/dist/esm/select/List.js +8 -5
  76. package/dist/esm/select/Options.js +5 -4
  77. package/dist/esm/select/Select.js +6 -4
  78. package/dist/esm/select/useSelect.js +15 -13
  79. package/dist/types/builder/FileField.d.ts +2 -1
  80. package/dist/types/builder/SchemaEditor.d.ts +1 -1
  81. package/dist/types/form/Controller.d.ts +1 -1
  82. package/dist/types/form/Form.d.ts +7 -14
  83. package/dist/types/form/useForm.d.ts +11 -0
  84. package/dist/types/hooks/useFileUploader.d.ts +4 -2
  85. package/dist/types/index.d.ts +3 -2
  86. package/dist/types/input/ArrayInput.d.ts +5 -4
  87. package/dist/types/input/AvatarInput.d.ts +2 -2
  88. package/dist/types/input/Checkbox.d.ts +2 -2
  89. package/dist/types/input/ColorInput.d.ts +1 -1
  90. package/dist/types/input/ColorPicker.d.ts +5 -1
  91. package/dist/types/input/DateInput.d.ts +1 -1
  92. package/dist/types/input/Field.d.ts +1 -1
  93. package/dist/types/input/File.d.ts +1 -1
  94. package/dist/types/input/Hidden.d.ts +4 -12
  95. package/dist/types/input/Input.d.ts +1 -1
  96. package/dist/types/input/Number.d.ts +1 -1
  97. package/dist/types/input/Password.d.ts +1 -1
  98. package/dist/types/input/Radio.d.ts +2 -2
  99. package/dist/types/input/RadioGroup.d.ts +7 -3
  100. package/dist/types/input/RangeSlider.d.ts +1 -1
  101. package/dist/types/input/Search.d.ts +1 -1
  102. package/dist/types/input/Slider.d.ts +1 -1
  103. package/dist/types/input/Switch.d.ts +2 -2
  104. package/dist/types/input/Textarea.d.ts +1 -1
  105. package/dist/types/select/AutoComplete.d.ts +1 -1
  106. package/dist/types/select/DualList.d.ts +1 -1
  107. package/dist/types/select/List.d.ts +1 -1
  108. package/dist/types/select/Select.d.ts +1 -1
  109. package/dist/types/types/index.d.ts +3 -3
  110. package/dist/types/types/schema.d.ts +1 -1
  111. package/package.json +14 -14
  112. package/src/builder/FileField.tsx +5 -3
  113. package/src/builder/SchemaEditor.tsx +2 -2
  114. package/src/builder/components/SchemaArrayForm.tsx +1 -3
  115. package/src/builder/components/SchemaField.tsx +3 -3
  116. package/src/form/Controller.tsx +1 -1
  117. package/src/form/Form.tsx +21 -43
  118. package/src/form/useForm.ts +44 -0
  119. package/src/hooks/useFileUploader.ts +41 -29
  120. package/src/i18n/index.ts +2 -2
  121. package/src/index.ts +3 -7
  122. package/src/input/ArrayInput.tsx +20 -10
  123. package/src/input/AvatarInput.tsx +12 -12
  124. package/src/input/Checkbox.tsx +2 -2
  125. package/src/input/ColorInput.tsx +29 -45
  126. package/src/input/ColorPicker.tsx +42 -49
  127. package/src/input/DateInput.tsx +3 -3
  128. package/src/input/Field.tsx +2 -2
  129. package/src/input/File.tsx +1 -1
  130. package/src/input/Hidden.tsx +5 -25
  131. package/src/input/Input.tsx +1 -1
  132. package/src/input/Number.tsx +1 -1
  133. package/src/input/Password.tsx +1 -1
  134. package/src/input/Radio.tsx +2 -2
  135. package/src/input/RadioGroup.tsx +11 -3
  136. package/src/input/RangeSlider.tsx +1 -1
  137. package/src/input/Search.tsx +1 -1
  138. package/src/input/Slider.tsx +1 -1
  139. package/src/input/Switch.tsx +6 -6
  140. package/src/input/Textarea.tsx +1 -1
  141. package/src/internal/InputWrapper.tsx +1 -2
  142. package/src/select/AutoComplete.tsx +13 -52
  143. package/src/select/DualList.tsx +3 -3
  144. package/src/select/List.tsx +31 -69
  145. package/src/select/Options.tsx +4 -3
  146. package/src/select/Select.tsx +19 -41
  147. package/src/select/useSelect.tsx +24 -69
  148. package/src/types/index.ts +3 -3
  149. package/src/types/schema.ts +1 -1
  150. /package/dist/cjs/i18n/{ar.json.js → ar/form.json.js} +0 -0
  151. /package/dist/cjs/i18n/{en.json.js → en/form.json.js} +0 -0
  152. /package/dist/esm/i18n/{ar.json.js → ar/form.json.js} +0 -0
  153. /package/dist/esm/i18n/{en.json.js → en/form.json.js} +0 -0
  154. /package/src/i18n/{ar.json → ar/form.json} +0 -0
  155. /package/src/i18n/{en.json → en/form.json} +0 -0
@@ -1,8 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
+ var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
4
5
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
+ var _regeneratorRuntime = require('@babel/runtime/regenerator');
6
8
  var core = require('@dnd-kit/core');
7
9
  var sortable = require('@dnd-kit/sortable');
8
10
  var core$1 = require('@react-fabric/core');
@@ -31,7 +33,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
31
33
  * It also supports drag-and-drop sorting using `@dnd-kit/core` and `@dnd-kit/sortable` for a better user experience when reordering items.
32
34
  *
33
35
  * @param {ArrayInputProps<T>} props - The properties for the ArrayInput component.
34
- * @returns {JSX.Element} The rendered ArrayInput component.
36
+ * @returns {React.ReactElement} The rendered ArrayInput component.
35
37
  *
36
38
  * @example
37
39
  * ```jsx
@@ -121,13 +123,36 @@ var ArrayInput = function ArrayInput(_ref) {
121
123
  }
122
124
  return true;
123
125
  }, [canRemove, initialList, fields]);
124
- var handleAdd = react.useCallback(function (item) {
125
- if (!item) return;
126
- append(item);
127
- setTimeout(function () {
128
- form.setFocus("".concat(name, ".").concat(fields.length).concat(focusName ? "." + focusName : ""));
129
- }, 100);
130
- }, [name, fields, focusName]);
126
+ var handleAdd = react.useCallback(/*#__PURE__*/function () {
127
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(item) {
128
+ var _t;
129
+ return _regeneratorRuntime.wrap(function (_context) {
130
+ while (1) switch (_context.prev = _context.next) {
131
+ case 0:
132
+ if (item) {
133
+ _context.next = 1;
134
+ break;
135
+ }
136
+ return _context.abrupt("return");
137
+ case 1:
138
+ _t = append;
139
+ _context.next = 2;
140
+ return item;
141
+ case 2:
142
+ _t(_context.sent);
143
+ setTimeout(function () {
144
+ form.setFocus("".concat(name, ".").concat(fields.length).concat(focusName ? "." + focusName : ""));
145
+ }, 100);
146
+ case 3:
147
+ case "end":
148
+ return _context.stop();
149
+ }
150
+ }, _callee);
151
+ }));
152
+ return function (_x) {
153
+ return _ref2.apply(this, arguments);
154
+ };
155
+ }(), [name, fields, focusName]);
131
156
  var handleRemove = react.useCallback(function (item, index) {
132
157
  var ret = onBeforeRemove === null || onBeforeRemove === void 0 ? void 0 : onBeforeRemove(item, index);
133
158
  void Promise.resolve(ret).then(function (b) {
@@ -139,14 +164,14 @@ var ArrayInput = function ArrayInput(_ref) {
139
164
  }, [remove, onRemove, onBeforeRemove]);
140
165
  react.useImperativeHandle(arrayRef, function () {
141
166
  return {
142
- addItem: handleAdd,
167
+ addItem: function addItem(t) {
168
+ return handleAdd(Promise.resolve(t));
169
+ },
143
170
  removeItem: remove
144
171
  };
145
172
  });
146
- var Wrapper = react.useCallback(
147
- // eslint-disable-next-line @typescript-eslint/promise-function-async
148
- function (_ref2) {
149
- var children = _ref2.children;
173
+ var Wrapper = react.useCallback(function (_ref3) {
174
+ var children = _ref3.children;
150
175
  if (enableSorting) {
151
176
  // pass id list to dnd context
152
177
  var idMap = fields.map(function (item) {
@@ -173,10 +198,10 @@ var ArrayInput = function ArrayInput(_ref) {
173
198
  }, [enableSorting, fields]);
174
199
  // @ts-expect-error ignore
175
200
  Wrapper.displayName = "SortableWrapper";
176
- var SortableItem = react.useCallback(function (_ref3) {
177
- var id = _ref3.id,
178
- children = _ref3.children,
179
- className = _ref3.className;
201
+ var SortableItem = react.useCallback(function (_ref4) {
202
+ var id = _ref4.id,
203
+ children = _ref4.children,
204
+ className = _ref4.className;
180
205
  if (enableSorting) {
181
206
  var _useSortable = sortable.useSortable({
182
207
  id: id
@@ -221,7 +246,7 @@ var ArrayInput = function ArrayInput(_ref) {
221
246
  "aria-label": "Add item",
222
247
  icon: "icon-[mdi--plus-circle-outline]",
223
248
  onClick: function onClick() {
224
- return handleAdd(onAdd === null || onAdd === void 0 ? void 0 : onAdd());
249
+ return handleAdd(Promise.resolve(onAdd === null || onAdd === void 0 ? void 0 : onAdd()));
225
250
  },
226
251
  "data-invalid": !!error,
227
252
  disabled: !!disabled || readOnly || fields.length > maxItems,
@@ -246,7 +271,29 @@ var ArrayInput = function ArrayInput(_ref) {
246
271
  children: [typeof children === "function" ? children({
247
272
  index: index,
248
273
  item: item,
249
- name: "".concat(name, ".").concat(index)
274
+ name: "".concat(name, ".").concat(index),
275
+ onChange: function () {
276
+ var _onChange = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(val) {
277
+ var result;
278
+ return _regeneratorRuntime.wrap(function (_context2) {
279
+ while (1) switch (_context2.prev = _context2.next) {
280
+ case 0:
281
+ _context2.next = 1;
282
+ return Promise.resolve(val);
283
+ case 1:
284
+ result = _context2.sent;
285
+ result && form.setValue("".concat(name, ".").concat(index), result);
286
+ case 2:
287
+ case "end":
288
+ return _context2.stop();
289
+ }
290
+ }, _callee2);
291
+ }));
292
+ function onChange(_x2) {
293
+ return _onChange.apply(this, arguments);
294
+ }
295
+ return onChange;
296
+ }()
250
297
  }) : core$1.cloneChildren(children, function (child) {
251
298
  return /*#__PURE__*/react.cloneElement(child, Object.assign({
252
299
  disabled: disabled,
@@ -12,7 +12,7 @@ var useFileUploader = require('../hooks/useFileUploader.js');
12
12
  var Hidden = require('./Hidden.js');
13
13
  var jsxRuntime = require('react/jsx-runtime');
14
14
 
15
- var _excluded = ["size", "avatarName", "avatarClassName", "value", "rounded", "defaultValue", "fallbackIcon", "variant", "fileUrl", "uploadHandler"];
15
+ var _excluded = ["size", "avatarName", "avatarClassName", "value", "rounded", "defaultValue", "fallbackIcon", "variant", "fileUrl", "uploadHandler", "onChange"];
16
16
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
17
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
18
  /**
@@ -21,10 +21,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
21
21
  * It also provides a way to remove the uploaded file and shows upload progress.
22
22
  *
23
23
  * @param {Props} props - The properties for the AvatarInput component.
24
- * @returns {JSX.Element} - The rendered AvatarInput component.
24
+ * @returns {React.ReactElement} - The rendered AvatarInput component.
25
25
  */
26
26
  var AvatarInput = function AvatarInput(_ref) {
27
- var _list$;
27
+ var _files$2;
28
28
  var _ref$size = _ref.size,
29
29
  size = _ref$size === void 0 ? "6rem" : _ref$size,
30
30
  avatarName = _ref.avatarName,
@@ -36,17 +36,18 @@ var AvatarInput = function AvatarInput(_ref) {
36
36
  variant = _ref.variant,
37
37
  fileUrl = _ref.fileUrl,
38
38
  uploadHandler = _ref.uploadHandler,
39
+ _onChange = _ref.onChange,
39
40
  rest = _objectWithoutProperties(_ref, _excluded);
40
- var _useFileUploader = useFileUploader.useFileUploader( /*#__PURE__*/function () {
41
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, config) {
42
- return _regeneratorRuntime.wrap(function _callee$(_context) {
41
+ var _useFileUploader = useFileUploader.useFileUploader(/*#__PURE__*/function () {
42
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, config) {
43
+ return _regeneratorRuntime.wrap(function (_context) {
43
44
  while (1) switch (_context.prev = _context.next) {
44
45
  case 0:
45
- _context.next = 2;
46
+ _context.next = 1;
46
47
  return uploadHandler === null || uploadHandler === void 0 ? void 0 : uploadHandler(data, config);
47
- case 2:
48
+ case 1:
48
49
  return _context.abrupt("return", _context.sent);
49
- case 3:
50
+ case 2:
50
51
  case "end":
51
52
  return _context.stop();
52
53
  }
@@ -55,9 +56,14 @@ var AvatarInput = function AvatarInput(_ref) {
55
56
  return function (_x, _x2) {
56
57
  return _ref2.apply(this, arguments);
57
58
  };
58
- }(), value, false),
59
+ }(), value !== null && value !== void 0 ? value : defaultValue, {
60
+ multiple: false,
61
+ onChange: function onChange(files) {
62
+ var _files$path;
63
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange((_files$path = files === null || files === void 0 ? void 0 : files.path) !== null && _files$path !== void 0 ? _files$path : null);
64
+ }
65
+ }),
59
66
  files = _useFileUploader.files,
60
- list = _useFileUploader.list,
61
67
  upload = _useFileUploader.upload,
62
68
  remove = _useFileUploader.remove;
63
69
  var _useState = react.useState(""),
@@ -65,7 +71,7 @@ var AvatarInput = function AvatarInput(_ref) {
65
71
  base64 = _useState2[0],
66
72
  setBase64 = _useState2[1];
67
73
  react.useEffect(function () {
68
- if (list !== null && list !== void 0 && list.length) {
74
+ if (files !== null && files !== void 0 && files.length) {
69
75
  var _files$;
70
76
  var file = files === null || files === void 0 || (_files$ = files[0]) === null || _files$ === void 0 ? void 0 : _files$.file;
71
77
  void (file && new Response(file).blob().then(function (blob) {
@@ -82,14 +88,14 @@ var AvatarInput = function AvatarInput(_ref) {
82
88
  var _ref3, _fileUrl;
83
89
  setBase64((_ref3 = (_fileUrl = fileUrl === null || fileUrl === void 0 ? void 0 : fileUrl(defaultValue !== null && defaultValue !== void 0 ? defaultValue : "")) !== null && _fileUrl !== void 0 ? _fileUrl : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : "");
84
90
  }
85
- }, [files, list, defaultValue]);
91
+ }, [files, defaultValue]);
86
92
  react.useEffect(function () {
87
93
  var _fileUrl2, _fileUrl3;
88
94
  !value && defaultValue && setBase64((_fileUrl2 = fileUrl === null || fileUrl === void 0 ? void 0 : fileUrl(defaultValue)) !== null && _fileUrl2 !== void 0 ? _fileUrl2 : defaultValue);
89
95
  value && setBase64((_fileUrl3 = fileUrl === null || fileUrl === void 0 ? void 0 : fileUrl(value)) !== null && _fileUrl3 !== void 0 ? _fileUrl3 : value);
90
96
  }, [value, defaultValue]);
91
97
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
92
- className: "flex flex-nowrap items-end overflow-hidden",
98
+ className: "flex flex-nowrap items-end overflow-hidden p-px",
93
99
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
94
100
  className: classNames("inline-block leading-none relative outline overflow-hidden", rounded && "rounded-full", !rounded && "rounded"),
95
101
  children: [/*#__PURE__*/jsxRuntime.jsx(core.Avatar, {
@@ -114,8 +120,7 @@ var AvatarInput = function AvatarInput(_ref) {
114
120
  })]
115
121
  })]
116
122
  }), /*#__PURE__*/jsxRuntime.jsx(Hidden.HiddenInput, _objectSpread({
117
- hiddenValue: list === null || list === void 0 || (_list$ = list[0]) === null || _list$ === void 0 ? void 0 : _list$.path,
118
- defaultValue: defaultValue
123
+ value: files === null || files === void 0 || (_files$2 = files[0]) === null || _files$2 === void 0 ? void 0 : _files$2.path
119
124
  }, rest)), files.map(function (file, idx) {
120
125
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
121
126
  className: "px-2 py-1 flex-1 overflow-hidden",
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  * It also provides an error icon to indicate validation errors.
20
20
  *
21
21
  * @param {CheckboxProps} props - The properties for the Checkbox component.
22
- * @returns {JSX.Element} The rendered Checkbox component.
22
+ * @returns {React.ReactElement} The rendered Checkbox component.
23
23
  */
24
24
  var Checkbox = function Checkbox(_ref) {
25
25
  var ref = _ref.ref,
@@ -24,7 +24,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
24
24
  * and handling the color selection state.
25
25
  *
26
26
  * @param {ColorInputProps} props - The properties for the ColorInput component.
27
- * @returns {JSX.Element} - The rendered ColorInput component.
27
+ * @returns {React.ReactElement} - The rendered ColorInput component.
28
28
  */
29
29
  var ColorInput = function ColorInput(_ref) {
30
30
  _ref.ref;
@@ -123,24 +123,31 @@ var ColorInput = function ColorInput(_ref) {
123
123
  icon: "icon-[mdi--palette]"
124
124
  })
125
125
  })
126
- })), isOpen && /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
127
- ref: refs.setFloating,
128
- style: _objectSpread({
129
- zIndex: "var(--z-popover)"
130
- }, floatingStyles),
131
- "data-ref": "dropdownBody"
132
- }, getFloatingProps()), {}, {
133
- children: [/*#__PURE__*/jsxRuntime.jsx(ColorPicker.ColorPicker, _objectSpread(_objectSpread({}, rest), {}, {
134
- onChange: handleChange,
135
- defaultColor: defaultColor,
136
- value: actualValue
137
- })), /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingArrow, {
138
- ref: arrowRef,
139
- context: context,
140
- strokeWidth: 0.5,
141
- className: "fill-base stroke-muted"
142
- })]
143
- })), !disabled && showPicker && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
126
+ })), isOpen && /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingFocusManager, {
127
+ context: context,
128
+ closeOnFocusOut: true,
129
+ children: /*#__PURE__*/jsxRuntime.jsxs("div", _objectSpread(_objectSpread({
130
+ ref: refs.setFloating,
131
+ style: _objectSpread({
132
+ zIndex: "var(--z-popover)"
133
+ }, floatingStyles),
134
+ "data-ref": "dropdownBody"
135
+ }, getFloatingProps()), {}, {
136
+ children: [/*#__PURE__*/jsxRuntime.jsx(ColorPicker.ColorPicker, _objectSpread(_objectSpread({}, rest), {}, {
137
+ onChange: handleChange,
138
+ defaultColor: defaultColor,
139
+ value: actualValue
140
+ })), /*#__PURE__*/jsxRuntime.jsx(react$1.FloatingArrow, {
141
+ ref: arrowRef,
142
+ context: context,
143
+ strokeWidth: 0.5,
144
+ className: "stroke-muted",
145
+ style: {
146
+ fill: actualValue || "var(--bg-color-base)"
147
+ }
148
+ })]
149
+ }))
150
+ }), !disabled && showPicker && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
144
151
  className: "flex-content p-1",
145
152
  icon: "icon-[mdi--eyedropper]",
146
153
  onClick: function onClick() {
@@ -2,14 +2,14 @@
2
2
 
3
3
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
4
4
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
- var Color = require('color');
5
+ var chroma = require('chroma-js');
6
6
  var react = require('react');
7
7
  var reactColor = require('react-color');
8
8
  var jsxRuntime = require('react/jsx-runtime');
9
9
 
10
10
  var _excluded = ["a"],
11
11
  _excluded2 = ["a"];
12
- var DEFAULT_SWATCHES = [Color("#d7323a").mix(Color("#171a1c"), 0.5).hex(), Color("#ff781c").mix(Color("#171a1c"), 0.5).hex(), Color("#f7b731").mix(Color("#171a1c"), 0.5).hex(), Color("#88ab1b").mix(Color("#171a1c"), 0.5).hex(), Color("#22aa85").mix(Color("#171a1c"), 0.5).hex(), Color("#399bec").mix(Color("#171a1c"), 0.5).hex(), Color("#4862c8").mix(Color("#171a1c"), 0.5).hex(), Color("#aa66cf").mix(Color("#171a1c"), 0.5).hex(), Color("#f43f7b").mix(Color("#171a1c"), 0.5).hex(), Color("#a37f4f").mix(Color("#171a1c"), 0.5).hex(), "#d7323a", "#ff781c", "#f7b731", "#88ab1b", "#22aa85", "#399bec", "#4862c8", "#aa66cf", "#f43f7b", "#a37f4f", Color("#d7323a").mix(Color("#f1f3f4"), 0.5).hex(), Color("#ff781c").mix(Color("#f1f3f4"), 0.5).hex(), Color("#f7b731").mix(Color("#f1f3f4"), 0.5).hex(), Color("#88ab1b").mix(Color("#f1f3f4"), 0.5).hex(), Color("#22aa85").mix(Color("#f1f3f4"), 0.5).hex(), Color("#399bec").mix(Color("#f1f3f4"), 0.5).hex(), Color("#4862c8").mix(Color("#f1f3f4"), 0.5).hex(), Color("#aa66cf").mix(Color("#f1f3f4"), 0.5).hex(), Color("#f43f7b").mix(Color("#f1f3f4"), 0.5).hex(), Color("#a37f4f").mix(Color("#f1f3f4"), 0.5).hex(), "#171a1c", "#2d3439", "#444e55", "#5b6971", "#71838e", "#86959e", "#9ca8b0", "#b8c1c6", "#d5dadd", "#f1f3f4"];
12
+ var DEFAULT_SWATCHES = [chroma.mix("#d7323a", "#171a1c", 0.5, "lab").hex(), chroma.mix("#ff781c", "#171a1c", 0.5, "lab").hex(), chroma.mix("#f7b731", "#171a1c", 0.5, "lab").hex(), chroma.mix("#88ab1b", "#171a1c", 0.5, "lab").hex(), chroma.mix("#22aa85", "#171a1c", 0.5, "lab").hex(), chroma.mix("#399bec", "#171a1c", 0.5, "lab").hex(), chroma.mix("#4862c8", "#171a1c", 0.5, "lab").hex(), chroma.mix("#aa66cf", "#171a1c", 0.5, "lab").hex(), chroma.mix("#f43f7b", "#171a1c", 0.5, "lab").hex(), chroma.mix("#a37f4f", "#171a1c", 0.5, "lab").hex(), "#d7323a", "#ff781c", "#f7b731", "#88ab1b", "#22aa85", "#399bec", "#4862c8", "#aa66cf", "#f43f7b", "#a37f4f", chroma.mix("#d7323a", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#ff781c", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#f7b731", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#88ab1b", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#22aa85", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#399bec", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#4862c8", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#aa66cf", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#f43f7b", "#f1f3f4", 0.5, "lab").hex(), chroma.mix("#a37f4f", "#f1f3f4", 0.5, "lab").hex(), "#171a1c", "#2d3439", "#444e55", "#5b6971", "#71838e", "#86959e", "#9ca8b0", "#b8c1c6", "#d5dadd", "#f1f3f4"];
13
13
 
14
14
  /**
15
15
  * ColorPicker component allows users to select a color using a color picker UI.
@@ -17,11 +17,10 @@ var DEFAULT_SWATCHES = [Color("#d7323a").mix(Color("#171a1c"), 0.5).hex(), Color
17
17
  * The component uses the `react-color` library for the color picker functionality.
18
18
  *
19
19
  * @param {ColorProps} props - The properties for the ColorPicker component.
20
- * @returns {JSX.Element} The rendered ColorPicker component.
20
+ * @returns {React.ReactElement} The rendered ColorPicker component.
21
21
  *
22
22
  * @see {@link https://react-color.github.io/react-color/} for more details on the color picker library.
23
23
  */
24
- // eslint-disable-next-line react/display-name
25
24
  var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
26
25
  var value = _ref.value,
27
26
  onChange = _ref.onChange,
@@ -29,7 +28,9 @@ var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
29
28
  _ref$defaultColor = _ref.defaultColor,
30
29
  defaultColor = _ref$defaultColor === void 0 ? "#fff" : _ref$defaultColor,
31
30
  _ref$swatches = _ref.swatches,
32
- swatches = _ref$swatches === void 0 ? DEFAULT_SWATCHES : _ref$swatches;
31
+ swatches = _ref$swatches === void 0 ? DEFAULT_SWATCHES : _ref$swatches,
32
+ _ref$picker = _ref.picker,
33
+ picker = _ref$picker === void 0 ? "default" : _ref$picker;
33
34
  var _useState = react.useState(""),
34
35
  _useState2 = _slicedToArray(_useState, 2),
35
36
  actualValue = _useState2[0],
@@ -44,14 +45,19 @@ var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
44
45
  return onChange(e);
45
46
  });
46
47
  }, [onChange]);
48
+ var E = picker === "swatches" ? reactColor.BlockPicker : reactColor.SketchPicker;
47
49
  return /*#__PURE__*/jsxRuntime.jsx("div", {
48
- role: "none"
50
+ role: "none",
51
+ className: "fabric-colorPicker-container"
49
52
  // prevent default on mouse down to avoid selection issues
50
53
  ,
51
54
  onMouseDown: function onMouseDown(e) {
52
55
  return e.preventDefault();
53
56
  },
54
- children: /*#__PURE__*/jsxRuntime.jsx(reactColor.SketchPicker, {
57
+ style: {
58
+ "--color-selected": value
59
+ },
60
+ children: /*#__PURE__*/jsxRuntime.jsx(E, {
55
61
  width: "16rem",
56
62
  className: "fabric-colorPicker",
57
63
  styles: {
@@ -83,6 +89,7 @@ var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
83
89
  }
84
90
  },
85
91
  color: actualValue,
92
+ colors: swatches,
86
93
  presetColors: swatches,
87
94
  disableAlpha: hideAlpha,
88
95
  onChange: function onChange(_ref2) {
@@ -90,14 +97,14 @@ var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
90
97
  _ref2$rgb$a = _ref2$rgb.a,
91
98
  a = _ref2$rgb$a === void 0 ? 1 : _ref2$rgb$a,
92
99
  rgb = _objectWithoutProperties(_ref2$rgb, _excluded);
93
- return setActualValue(Color(rgb).alpha(a)[a < 1 ? "hexa" : "hex"]());
100
+ return setActualValue(chroma(rgb).alpha(a).hex());
94
101
  },
95
102
  onChangeComplete: function onChangeComplete(_ref3) {
96
103
  var _ref3$rgb = _ref3.rgb,
97
104
  _ref3$rgb$a = _ref3$rgb.a,
98
105
  a = _ref3$rgb$a === void 0 ? 1 : _ref3$rgb$a,
99
106
  rgb = _objectWithoutProperties(_ref3$rgb, _excluded2);
100
- return handleChange(Color(rgb).alpha(a)[a < 1 ? "hexa" : "hex"]());
107
+ return handleChange(chroma(rgb).alpha(a).hex());
101
108
  }
102
109
  })
103
110
  });
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  * The component supports both date and datetime types, with appropriate formatting.
23
23
  *
24
24
  * @param {DateProps} props - The properties for the DateInput component.
25
- * @returns {JSX.Element} - The rendered DateInput component.
25
+ * @returns {React.ReactElement} - The rendered DateInput component.
26
26
  */
27
27
  var DateInput = function DateInput(_ref) {
28
28
  var ref = _ref.ref,
@@ -175,7 +175,7 @@ var DateInput = function DateInput(_ref) {
175
175
  style: _objectSpread({
176
176
  zIndex: "var(--z-popover)"
177
177
  }, floatingStyles),
178
- className: "shadow-lg bg-base ring-1 ring-tint-100",
178
+ className: "shadow-lg bg-default ring-1 ring-tint-100",
179
179
  "data-ref": "dropdownBody"
180
180
  }, getFloatingProps()), {}, {
181
181
  children: [/*#__PURE__*/jsxRuntime.jsx(date.DatePanel, {
@@ -188,7 +188,7 @@ var DateInput = function DateInput(_ref) {
188
188
  ref: arrowRef,
189
189
  context: context,
190
190
  strokeWidth: 0.5,
191
- className: "fill-base stroke-muted"
191
+ className: "fill-default stroke-muted"
192
192
  })]
193
193
  }))]
194
194
  }));
@@ -24,7 +24,7 @@ var Field = function Field(_ref) {
24
24
  rest = _objectWithoutProperties(_ref, _excluded);
25
25
  return /*#__PURE__*/jsxRuntime.jsx(FieldWrapper.FieldWrapper, _objectSpread(_objectSpread({}, rest), {}, {
26
26
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
27
- className: classNames("fabric-fieldGroup", !plain && !noOutline && "outline", !plain && "bg-base", plain && "flex-wrap", "flex-1 rounded", !vertical && "flex"),
27
+ className: classNames("fabric-fieldGroup", !plain && !noOutline && "outline", !plain && "bg-default", plain && "flex-wrap", "flex-1 rounded", !vertical && "flex"),
28
28
  "data-vertical": !!vertical,
29
29
  children: core.cloneChildren(children, function (child) {
30
30
  return /*#__PURE__*/react.cloneElement(child, {
@@ -37,7 +37,7 @@ var FileExists = function FileExists(prop) {
37
37
  * It handles file changes, invalid states, and read-only or disabled states.
38
38
  *
39
39
  * @param {FileInputProps} props - The properties for the FileInput component.
40
- * @returns {JSX.Element} - The rendered FileInput component.
40
+ * @returns {React.ReactElement} - The rendered FileInput component.
41
41
  */
42
42
  var FileInput = function FileInput(_ref) {
43
43
  var _actualValue$map;
@@ -33,26 +33,17 @@ var jsxRuntime = require('react/jsx-runtime');
33
33
  * This is useful for cases where you need to update the form state without user interaction.
34
34
  *
35
35
  * @param {Object} props - Component properties.
36
- * @returns {JSX.Element} The rendered hidden input field and error icon.
36
+ * @returns {React.ReactElement} The rendered hidden input field and error icon.
37
37
  */
38
38
  var HiddenInput = function HiddenInput(_ref) {
39
- var hiddenValue = _ref.hiddenValue,
40
- defaultValue = _ref.defaultValue,
41
- onChange = _ref.onChange,
42
- invalid = _ref.invalid,
39
+ var invalid = _ref.invalid,
43
40
  error = _ref.error,
44
41
  _ref$value = _ref.value,
45
42
  value = _ref$value === void 0 ? "" : _ref$value,
46
43
  name = _ref.name;
47
- react.useEffect(function () {
48
- setTimeout(function () {
49
- onChange === null || onChange === void 0 || onChange(hiddenValue !== null && hiddenValue !== void 0 ? hiddenValue : defaultValue);
50
- }, 50);
51
- }, [hiddenValue, defaultValue]);
52
44
  return /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
53
45
  children: [/*#__PURE__*/jsxRuntime.jsx("input", {
54
46
  type: "hidden",
55
- onChange: onChange,
56
47
  value: value,
57
48
  name: name
58
49
  }), /*#__PURE__*/jsxRuntime.jsx(ErrorIcon.ErrorIcon, {
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  * The component uses a wrapper to handle the clear button and styling, and it supports deferred value updates to optimize performance.
20
20
  *
21
21
  * @param {TextInputProps} props - The properties for the text input component.
22
- * @returns {JSX.Element} - A JSX element representing the text input field.
22
+ * @returns {React.ReactElement} - A JSX element representing the text input field.
23
23
  */
24
24
  var Input = function Input(_ref) {
25
25
  var ref = _ref.ref,
@@ -18,7 +18,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
18
18
  * It also includes a clear button to reset the input value.
19
19
  *
20
20
  * @param {NumberProps} props - The properties for the Number input component.
21
- * @returns {JSX.Element} The rendered Number input component.
21
+ * @returns {React.ReactElement} The rendered Number input component.
22
22
  */
23
23
  var Number = function Number(_ref) {
24
24
  var ref = _ref.ref,
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  * Password input component with optional strength meter and toggle visibility.
20
20
  *
21
21
  * @param {PasswordProps} props - The properties for the Password component.
22
- * @returns {JSX.Element} The rendered Password input component.
22
+ * @returns {React.ReactElement} The rendered Password input component.
23
23
  */
24
24
  var Password = function Password(_ref) {
25
25
  var ref = _ref.ref,
@@ -17,7 +17,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
17
17
  * It supports disabled and invalid states, and allows for custom width.
18
18
  *
19
19
  * @param {RadioProps} props - The properties for the Radio component.
20
- * @returns {JSX.Element} The rendered Radio input component.
20
+ * @returns {React.ReactElement} The rendered Radio input component.
21
21
  */
22
22
  var Radio = function Radio(_ref) {
23
23
  var ref = _ref.ref,
@@ -3,11 +3,12 @@
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
5
5
  var core = require('@react-fabric/core');
6
+ var classNames = require('classnames');
6
7
  var react = require('react');
7
8
  var FieldWrapper = require('../internal/FieldWrapper.js');
8
9
  var jsxRuntime = require('react/jsx-runtime');
9
10
 
10
- var _excluded = ["children", "name", "className", "optionWidth", "onChange"];
11
+ var _excluded = ["children", "name", "className", "optionWidth", "vertical", "value", "onChange"];
11
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
14
  /**
@@ -16,21 +17,24 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
17
  * The component supports inline and vertical orientations, and can handle change events.
17
18
  *
18
19
  * @param {RadioGroupProps} props - The properties for the RadioGroup component.
19
- * @returns {JSX.Element} The rendered RadioGroup component.
20
+ * @returns {React.ReactElement} The rendered RadioGroup component.
20
21
  */
21
22
  var RadioGroup = function RadioGroup(_ref) {
22
23
  var children = _ref.children,
23
24
  name = _ref.name,
24
25
  className = _ref.className,
25
26
  optionWidth = _ref.optionWidth,
27
+ vertical = _ref.vertical,
28
+ value = _ref.value,
26
29
  onChange = _ref.onChange,
27
30
  rest = _objectWithoutProperties(_ref, _excluded);
28
31
  return /*#__PURE__*/jsxRuntime.jsx(FieldWrapper.FieldWrapper, _objectSpread(_objectSpread({}, rest), {}, {
29
32
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
30
- className: className,
33
+ className: classNames(className, vertical && "flex flex-col gap-1"),
31
34
  children: core.cloneChildren(children, function (child) {
32
35
  return /*#__PURE__*/react.cloneElement(child, {
33
36
  name: name,
37
+ checked: child.props.value === value,
34
38
  onChange: onChange,
35
39
  width: optionWidth
36
40
  });
@@ -22,7 +22,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
22
22
  * The component is designed to be flexible and customizable, allowing for various configurations.
23
23
  *
24
24
  * @param {RangeProps} props - The properties for the RangeSlider component.
25
- * @returns {JSX.Element} The rendered RangeSlider component.
25
+ * @returns {React.ReactElement} The rendered RangeSlider component.
26
26
  */
27
27
  var RangeSlider = function RangeSlider(_ref) {
28
28
  var error = _ref.error;
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  * and handling search actions with a debounce mechanism.
21
21
  *
22
22
  * @param {SearchProps} props - The properties for the Search component.
23
- * @returns {JSX.Element} The rendered Search input component.
23
+ * @returns {React.ReactElement} The rendered Search input component.
24
24
  */
25
25
  var Search = function Search(_ref) {
26
26
  var ref = _ref.ref,
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  * It also supports deferred value updates for smoother interactions.
21
21
  *
22
22
  * @param {SliderProps} props - The properties for the Slider component.
23
- * @returns {JSX.Element} The rendered Slider component.
23
+ * @returns {React.ReactElement} The rendered Slider component.
24
24
  */
25
25
  var Slider = function Slider(_ref) {
26
26
  var error = _ref.error;
@@ -21,7 +21,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
21
21
  * It supports disabled and invalid states, and handles change events.
22
22
  *
23
23
  * @param {SwitchProps} props - The properties for the Switch component.
24
- * @returns {JSX.Element} The rendered Switch input component.
24
+ * @returns {React.ReactElement} The rendered Switch input component.
25
25
  */
26
26
  var Switch = function Switch(_ref) {
27
27
  var ref = _ref.ref,
@@ -55,17 +55,17 @@ var Switch = function Switch(_ref) {
55
55
  onChange === null || onChange === void 0 || onChange((_e$target$checked2 = e === null || e === void 0 ? void 0 : e.target.checked) !== null && _e$target$checked2 !== void 0 ? _e$target$checked2 : false);
56
56
  }, [onChange]);
57
57
  return /*#__PURE__*/jsxRuntime.jsxs("label", {
58
- className: classNames(invalid ? "ring-danger-500" : "ring-primary-500", disabled ? "opacity-50 cursor-not-allowed" : "hover:opacity-100 cursor-pointer", "inline-flex gap-1 py-1 items-center relative cursor-pointer opacity-85 rounded ring-offset-2 has-focus-visible:ring-1"),
58
+ className: classNames(invalid ? "ring-danger-500" : "ring-primary-500", disabled ? "opacity-50 cursor-not-allowed" : "opacity-85 hover:opacity-100 cursor-pointer", "inline-flex gap-1 py-1 items-center relative rounded ring-offset-2 has-focus-visible:ring-1"),
59
59
  style: {
60
60
  width: width
61
61
  },
62
62
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
63
- className: classNames(actualValue && getColor.getBgClass(color ? "".concat(color, "-500") : "primary-500"), !actualValue && (defaultColor ? getColor.getBgClass("".concat(defaultColor, "-500")) : "bg-tint-200"), "relative grid grid-cols-2 items-center h-[1.5em] min-w-[2.5em] cursor-pointer rounded-full p-[0.25em] transition-colors duration-200 ease-in-out"),
63
+ className: classNames(actualValue && getColor.getBgClass(color ? "".concat(color, "-500") : "primary-500"), !actualValue && (defaultColor ? getColor.getBgClass("".concat(defaultColor, "-500")) : "bg-tint-200"), "relative grid grid-cols-2 items-center h-[1.5em] min-w-[2.5em] rounded-full p-[0.25em] transition-colors duration-200 ease-in-out"),
64
64
  style: {
65
65
  backgroundColor: actualValue ? getColor.getColor(color) : getColor.getColor(defaultColor)
66
66
  },
67
67
  children: [/*#__PURE__*/jsxRuntime.jsx("input", _objectSpread({
68
- className: classNames("appearance-none absolute opacity-0 inset-0 bg-transparent border-none outline-none ring-0"),
68
+ className: classNames("appearance-none absolute opacity-0 inset-0 bg-transparent border-none cursor-[inherit] outline-none ring-0"),
69
69
  "aria-invalid": invalid,
70
70
  "aria-disabled": disabled,
71
71
  disabled: disabled,
@@ -20,7 +20,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
20
20
  * providing a clear interface for text input with optional validation and accessibility features.
21
21
  *
22
22
  * @param {TextareaProps} props - The properties for the Textarea component.
23
- * @returns {JSX.Element} The rendered Textarea component.
23
+ * @returns {React.ReactElement} The rendered Textarea component.
24
24
  */
25
25
  var Textarea = function Textarea(_ref) {
26
26
  var ref = _ref.ref,