@economic/taco 0.0.26-alpha.6 → 0.0.27-alpha.0

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 (49) hide show
  1. package/dist/components/Combobox/Combobox.d.ts +3 -0
  2. package/dist/components/Combobox/useCombobox.d.ts +1 -1
  3. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  4. package/dist/components/Field/Field.d.ts +24 -13
  5. package/dist/components/Input/Input.d.ts +5 -2
  6. package/dist/components/Input/util.d.ts +3 -1
  7. package/dist/components/Listbox/Listbox.d.ts +7 -3
  8. package/dist/components/Listbox/ScrollableList.d.ts +5 -2
  9. package/dist/components/Listbox/useListbox.d.ts +1 -1
  10. package/dist/components/SearchInput/SearchInput.d.ts +1 -1
  11. package/dist/components/Select/Select.d.ts +1 -1
  12. package/dist/components/Textarea/Textarea.d.ts +5 -2
  13. package/dist/esm/components/Checkbox/Checkbox.js +5 -5
  14. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  15. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  16. package/dist/esm/components/Combobox/useCombobox.js +1 -1
  17. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  18. package/dist/esm/components/Field/Field.js +18 -37
  19. package/dist/esm/components/Field/Field.js.map +1 -1
  20. package/dist/esm/components/IconButton/IconButton.js +1 -1
  21. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  22. package/dist/esm/components/Input/Input.js +4 -5
  23. package/dist/esm/components/Input/Input.js.map +1 -1
  24. package/dist/esm/components/Input/util.js +39 -12
  25. package/dist/esm/components/Input/util.js.map +1 -1
  26. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  27. package/dist/esm/components/Listbox/ScrollableList.js +1 -1
  28. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  29. package/dist/esm/components/Listbox/useListbox.js +1 -3
  30. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  31. package/dist/esm/components/RadioGroup/RadioGroup.js +2 -2
  32. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  33. package/dist/esm/components/Select/Select.js +0 -1
  34. package/dist/esm/components/Select/Select.js.map +1 -1
  35. package/dist/esm/components/Select/useSelect.js +4 -3
  36. package/dist/esm/components/Select/useSelect.js.map +1 -1
  37. package/dist/esm/components/Switch/Switch.js +2 -2
  38. package/dist/esm/components/Switch/Switch.js.map +1 -1
  39. package/dist/esm/components/Table/util/renderColumn.js +1 -1
  40. package/dist/esm/components/Table/util/renderColumn.js.map +1 -1
  41. package/dist/esm/components/Textarea/Textarea.js +1 -1
  42. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  43. package/dist/taco.cjs.development.js +78 -72
  44. package/dist/taco.cjs.development.js.map +1 -1
  45. package/dist/taco.cjs.production.min.js +1 -1
  46. package/dist/taco.cjs.production.min.js.map +1 -1
  47. package/dist/utils/tailwind.d.ts +1 -0
  48. package/package.json +2 -2
  49. package/types.json +432 -455
@@ -3467,7 +3467,7 @@ var IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {
3467
3467
  rounded = _props$rounded === void 0 ? false : _props$rounded,
3468
3468
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$6);
3469
3469
 
3470
- var className = cn(getButtonClasses(), getAppearanceClasses(appearance, true), {
3470
+ var className = cn('w-8', getButtonClasses(), getAppearanceClasses(appearance, true), {
3471
3471
  'rounded-full': rounded,
3472
3472
  rounded: !rounded,
3473
3473
  'cursor-not-allowed opacity-50': props.disabled,
@@ -4187,13 +4187,13 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4187
4187
  onChange = props.onChange,
4188
4188
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$c);
4189
4189
 
4190
- var className = cn('h-5 w-5 border rounded text-sm', {
4190
+ var className = cn('h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem]', {
4191
4191
  'mr-2': !!label,
4192
4192
  'border-grey-dark text-blue focus:border-blue focus:yt-focus': !props.disabled && !invalid,
4193
4193
  'border-grey text-blue-light cursor-not-allowed': props.disabled,
4194
4194
  'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,
4195
4195
  'border-red text-red focus:border-red focus:yt-focus-red': invalid && !props.disabled
4196
- }, props.className);
4196
+ });
4197
4197
  var handleChange;
4198
4198
 
4199
4199
  if (onChange) {
@@ -4203,9 +4203,9 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4203
4203
  }
4204
4204
 
4205
4205
  var element = React.createElement(CheckboxPrimitive.Root, Object.assign({}, otherProps, {
4206
+ "data-taco": "checkbox",
4206
4207
  checked: indeterminate ? 'indeterminate' : checked,
4207
4208
  className: className,
4208
- "data-taco": "checkbox",
4209
4209
  onCheckedChange: handleChange,
4210
4210
  ref: ref
4211
4211
  }), React.createElement(CheckboxPrimitive.Indicator, {
@@ -4218,8 +4218,8 @@ var Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {
4218
4218
  if (label) {
4219
4219
  var labelClassName = cn('flex items-center cursor-pointer', {
4220
4220
  'cursor-not-allowed text-grey-dark': props.disabled
4221
- });
4222
- element = React.createElement("label", {
4221
+ }, props.className);
4222
+ return React.createElement("label", {
4223
4223
  className: labelClassName
4224
4224
  }, element, label);
4225
4225
  }
@@ -4242,30 +4242,56 @@ var useProxiedRef = function useProxiedRef(ref) {
4242
4242
  };
4243
4243
 
4244
4244
  var getInputClasses = function getInputClasses(props) {
4245
- return cn('peer bg-white text-black text-sm border font-normal not-italic no-underline rounded inline-flex leading-6 px-2 relative w-full text-ellipsis transition-all delay-100 ease-in flex items-center', {
4245
+ var _cn;
4246
+
4247
+ return cn('peer bg-white text-black text-sm border font-normal not-italic no-underline rounded inline-flex leading-6 px-2 relative w-full text-ellipsis transition-all delay-100 ease-in flex items-center', (_cn = {
4246
4248
  'cursor-not-allowed text-black bg-grey': props.readOnly,
4247
- 'border-grey text-opacity-25 cursor-not-allowed': props.disabled,
4248
- 'bg-[rgba(255,255,0,0.075)]': props.highlighted && props.disabled,
4249
- 'bg-[rgba(255,255,0,0.2)]': props.highlighted && !props.disabled,
4250
- 'border-grey-dark hover:shadow-[0_0_0.1rem_theme(colors.grey.darker)] focus:border-blue-light focus:yt-focus active:border-blue-dark': !props.invalid,
4251
- 'border-red hover:shadow-[0_0_0.15rem_theme(colors.red.DEFAULT)] focus:border-red-light focus:yt-focus-red active:border-red-dark': props.invalid
4252
- });
4249
+ 'border-grey text-opacity-25 cursor-not-allowed': props.disabled
4250
+ }, _cn[getStateClasses$1(props.state)] = !props.disabled, _cn['bg-[rgba(255,255,0,0.075)]'] = props.highlighted && props.disabled, _cn['bg-[rgba(255,255,0,0.2)]'] = props.highlighted && !props.disabled, _cn));
4253
4251
  };
4254
- var getButtonStateClasses = function getButtonStateClasses(invalid) {
4255
- if (invalid) {
4256
- return '!border-red focus:!border-red-light focus:yt-focus-red peer-focus:!border-red-light peer-focus:peer-active:!border-red-dark';
4252
+ var getStateClasses$1 = function getStateClasses(value) {
4253
+ switch (value) {
4254
+ case 'success':
4255
+ return 'border-green hover:shadow-[0_0_0.15rem_theme(colors.green.DEFAULT)] focus:border-green-light focus:yt-focus-green active:border-green-dark';
4256
+
4257
+ case 'error':
4258
+ return 'border-red hover:shadow-[0_0_0.15rem_theme(colors.red.DEFAULT)] focus:border-red-light focus:yt-focus-red active:border-red-dark';
4259
+
4260
+ case 'warning':
4261
+ return 'border-yellow-dark hover:shadow-[0_0_0.15rem_theme(colors.yellow.dark)] focus:yt-focus-yellow active:border-yellow-dark';
4262
+
4263
+ case 'information':
4264
+ return 'border-blue hover:shadow-[0_0_0.15rem_theme(colors.blue.dark)] focus:border-blue-light focus:yt-focus active:border-blue-dark';
4265
+
4266
+ default:
4267
+ return 'border-grey-dark hover:shadow-[0_0_0.1rem_theme(colors.grey.darker)] focus:border-blue-light focus:yt-focus active:border-blue-dark';
4257
4268
  }
4269
+ };
4270
+ var getButtonStateClasses = function getButtonStateClasses(value) {
4271
+ switch (value) {
4272
+ case 'success':
4273
+ return '!border-green focus:!border-green-light focus:yt-focus-green peer-focus:!border-green-light peer-focus:peer-active:!border-green-dark';
4274
+
4275
+ case 'error':
4276
+ return '!border-red focus:!border-red-light focus:yt-focus-red peer-focus:!border-red-light peer-focus:peer-active:!border-red-dark';
4277
+
4278
+ case 'warning':
4279
+ return '!border-yellow-dark focus:!border-yellow-dark focus:yt-focus-yellow peer-focus:peer-active:!border-yellow-dark';
4258
4280
 
4259
- return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4281
+ case 'information':
4282
+ return '!border-blue focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4283
+
4284
+ default:
4285
+ return '!border-grey-dark focus:!border-blue-light peer-focus:!border-blue-light peer-focus:peer-active:!border-blue-dark';
4286
+ }
4260
4287
  };
4261
4288
 
4262
- var _excluded$d = ["button", "icon", "highlighted", "invalid", "onKeyDown", "autoFocus"];
4289
+ var _excluded$d = ["button", "icon", "highlighted", "onKeyDown", "state", "autoFocus"];
4263
4290
  var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4264
4291
  var button = props.button,
4265
4292
  icon = props.icon,
4266
- _props$invalid = props.invalid,
4267
- invalid = _props$invalid === void 0 ? false : _props$invalid,
4268
4293
  onKeyDown = props.onKeyDown,
4294
+ state = props.state,
4269
4295
  autoFocus = props.autoFocus,
4270
4296
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
4271
4297
 
@@ -4308,7 +4334,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4308
4334
  var _button$props$disable, _cn;
4309
4335
 
4310
4336
  var disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
4311
- var buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', (_cn = {}, _cn[getButtonStateClasses(invalid)] = !props.disabled, _cn), button.props.className);
4337
+ var buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', (_cn = {}, _cn[getButtonStateClasses(state)] = !props.disabled, _cn), button.props.className);
4312
4338
  extra = React.cloneElement(button, {
4313
4339
  className: buttonClassName,
4314
4340
  disabled: disabled
@@ -4327,7 +4353,7 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4327
4353
  }
4328
4354
 
4329
4355
  var containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
4330
- input = React.createElement("div", {
4356
+ return React.createElement("div", {
4331
4357
  className: containerClassName,
4332
4358
  "data-taco": "input-container"
4333
4359
  }, input, extra);
@@ -4425,7 +4451,7 @@ var useListScrollTo = function useListScrollTo(internalRef, itemRefs) {
4425
4451
  };
4426
4452
  };
4427
4453
 
4428
- var _excluded$e = ["data", "disabled", "highlighted", "id", "invalid", "loading", "onChange", "onClick", "onFocus", "onKeyDown", "readOnly", "scrollOnFocus", "value", "multiselect", "selectedIndexes", "allOptionsSelected"],
4454
+ var _excluded$e = ["data", "disabled", "highlighted", "id", "loading", "onChange", "onClick", "onFocus", "onKeyDown", "readOnly", "scrollOnFocus", "state", "value", "multiselect", "selectedIndexes", "allOptionsSelected"],
4429
4455
  _excluded2$1 = ["children", "icon"];
4430
4456
  var getId = function getId(id, value) {
4431
4457
  return id + "_" + value;
@@ -4827,7 +4853,7 @@ var filterData = function filterData(data, value) {
4827
4853
  });
4828
4854
  };
4829
4855
 
4830
- var _excluded$g = ["aria-label", "aria-labelledby", "data", "defaultValue", "disabled", "inline", "loading", "onChange", "onClick", "onKeyDown", "onSearch", "readOnly", "value"];
4856
+ var _excluded$g = ["aria-label", "aria-labelledby", "data", "defaultValue", "disabled", "id", "inline", "loading", "onChange", "onClick", "onKeyDown", "onSearch", "readOnly", "value"];
4831
4857
  var debouncer = /*#__PURE__*/debounce(function (f) {
4832
4858
  return f();
4833
4859
  }, 200);
@@ -5940,50 +5966,32 @@ Dialog.Extra = Extra;
5940
5966
  Dialog.Drawer = Drawer;
5941
5967
  Dialog.Close = Close$2;
5942
5968
 
5943
- var _excluded$n = ["children", "disabled", "invalid", "label", "message", "required"];
5969
+ var _excluded$n = ["disabled", "children", "message", "state"];
5944
5970
  var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5945
- var _children$props$id, _children$props, _children$props$inval, _children$props2, _children$props$requi, _children$props3, _children$props4;
5946
-
5947
- var children = props.children,
5948
- disabled = props.disabled,
5949
- invalid = props.invalid,
5950
- label = props.label,
5971
+ var disabled = props.disabled,
5972
+ children = props.children,
5951
5973
  message = props.message,
5952
- required = props.required,
5974
+ state = props.state,
5953
5975
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$n);
5954
5976
 
5955
- var idRef = React.useRef((_children$props$id = children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props.id) !== null && _children$props$id !== void 0 ? _children$props$id : uuid.v4());
5956
- var isInvalid = (_children$props$inval = children === null || children === void 0 ? void 0 : (_children$props2 = children.props) === null || _children$props2 === void 0 ? void 0 : _children$props2.invalid) !== null && _children$props$inval !== void 0 ? _children$props$inval : invalid;
5957
- var isRequired = (_children$props$requi = children === null || children === void 0 ? void 0 : (_children$props3 = children.props) === null || _children$props3 === void 0 ? void 0 : _children$props3.required) !== null && _children$props$requi !== void 0 ? _children$props$requi : required;
5958
- var className = cn('flex flex-col mb-1', {
5959
- 'pt-5': !label
5960
- }, props.className);
5961
- var labelClassName = cn('font-bold text-xs leading-4 h-4 truncate mb-1', {
5977
+ var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5962
5978
  'text-grey-dark': disabled
5963
- });
5964
- var messageClassName = cn('text-xs leading-normal truncate flex-none', {
5965
- 'text-grey-darkest': !isInvalid,
5966
- 'text-red': isInvalid,
5979
+ }, props.className);
5980
+ var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5981
+ 'text-grey-darkest': !state || state === 'default',
5982
+ 'text-red': state === 'error',
5983
+ 'text-green': state === 'success',
5984
+ 'text-blue': state === 'information',
5985
+ 'text-yellow-dark': state === 'warning',
5967
5986
  'opacity-50': disabled
5968
- });
5969
-
5970
- if (!label && !(children !== null && children !== void 0 && children.props['aria-label'])) {
5971
- console.warn('TACO - You are creating a Field without a `label`, you must pass an `aria-label` to the Field child to provide an accessible experience for our users.');
5972
- }
5973
-
5974
- return React.createElement("div", Object.assign({}, otherProps, {
5987
+ }, props.className);
5988
+ return React.createElement("label", Object.assign({}, otherProps, {
5975
5989
  className: className,
5976
- "data-taco": "field",
5990
+ "data-taco": "label",
5977
5991
  ref: ref
5978
- }), label && React.createElement("label", {
5979
- htmlFor: idRef.current,
5980
- className: labelClassName,
5981
- "data-taco": "label"
5982
- }, label, isRequired ? '*' : ''), idRef.current !== (children === null || children === void 0 ? void 0 : (_children$props4 = children.props) === null || _children$props4 === void 0 ? void 0 : _children$props4.id) ? React.cloneElement(children, {
5983
- id: idRef.current
5984
- }) : children, message && React.createElement("span", {
5992
+ }), children, message && React.createElement("span", {
5985
5993
  className: messageClassName,
5986
- role: isInvalid ? 'alert' : undefined
5994
+ role: state === 'error' ? 'alert' : undefined
5987
5995
  }, message));
5988
5996
  });
5989
5997
 
@@ -6149,7 +6157,7 @@ var useTypeahead = function useTypeahead(_ref) {
6149
6157
  };
6150
6158
  };
6151
6159
 
6152
- var _excluded$s = ["data", "defaultValue", "disabled", "emptyValue", "id", "invalid", "name", "onChange", "onFocus", "onKeyDown", "value"];
6160
+ var _excluded$s = ["data", "defaultValue", "disabled", "emptyValue", "id", "name", "onChange", "onFocus", "onKeyDown", "value"];
6153
6161
  var useListbox = function useListbox(_ref, ref) {
6154
6162
  var _ref$data = _ref.data,
6155
6163
  externalData = _ref$data === void 0 ? [] : _ref$data,
@@ -6157,7 +6165,6 @@ var useListbox = function useListbox(_ref, ref) {
6157
6165
  disabled = _ref.disabled,
6158
6166
  emptyValue = _ref.emptyValue,
6159
6167
  nativeId = _ref.id,
6160
- invalid = _ref.invalid,
6161
6168
  name = _ref.name,
6162
6169
  onChange = _ref.onChange,
6163
6170
  onFocus = _ref.onFocus,
@@ -6272,7 +6279,6 @@ var useListbox = function useListbox(_ref, ref) {
6272
6279
  data: data,
6273
6280
  disabled: disabled,
6274
6281
  id: id,
6275
- invalid: invalid,
6276
6282
  onChange: handleListboxChange,
6277
6283
  onFocus: handleListboxFocus,
6278
6284
  onKeyDown: handleListboxKeyDown,
@@ -6835,14 +6841,14 @@ var RadioGroupItem = /*#__PURE__*/React.forwardRef(function RadioGroupItem(props
6835
6841
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$z);
6836
6842
 
6837
6843
  var disabled = context.disabled || props.disabled;
6838
- var className = cn('flex items-center justify-center h-4 w-4 mr-2 rounded-full bg-white border-2 ', {
6844
+ var className = cn('flex flex-shrink-0 self-start items-center justify-center h-4 w-4 mr-2 mt-[0.2rem] rounded-full bg-white border-2 ', {
6839
6845
  'border-grey-dark focus:border-blue focus:yt-focus aria-checked:bg-blue aria-checked:border-blue': !disabled && !context.invalid,
6840
6846
  'border-grey cursor-not-allowed aria-checked:bg-grey-dark aria-checked:border-grey-dark': disabled,
6841
6847
  'border-red text-red focus:border-red focus:yt-focus-red aria-checked:bg-red aria-checked:border-red': context.invalid && !disabled
6842
6848
  });
6843
6849
  var labelClassName = cn('flex items-center cursor-pointer', {
6844
6850
  'cursor-not-allowed text-grey-dark': disabled
6845
- });
6851
+ }, props.className);
6846
6852
  return React.createElement("label", {
6847
6853
  className: labelClassName
6848
6854
  }, React.createElement(RadioGroupPrimitive.Item, Object.assign({}, otherProps, {
@@ -7399,7 +7405,8 @@ var useSelect = function useSelect(_ref, ref) {
7399
7405
  var id = React.useMemo(function () {
7400
7406
  return nativeId || "select_" + uuid.v4();
7401
7407
  }, [nativeId]);
7402
- var internalInputRef = React.useRef(null); // support 'escape' resetting to the value that was set when the listbox opened
7408
+ var internalInputRef = React.useRef(null);
7409
+ var buttonId = id + "-button"; // support 'escape' resetting to the value that was set when the listbox opened
7403
7410
 
7404
7411
  var _React$useState2 = React.useState(value),
7405
7412
  lastValue = _React$useState2[0],
@@ -7526,9 +7533,9 @@ var useSelect = function useSelect(_ref, ref) {
7526
7533
  var button = {
7527
7534
  'aria-haspopup': 'listbox',
7528
7535
  'aria-label': ariaLabel ? ariaLabel + " " + text : undefined,
7529
- 'aria-labelledby': ariaLabelledBy ? ariaLabelledBy + " " + id : undefined,
7536
+ 'aria-labelledby': ariaLabelledBy ? ariaLabelledBy + " " + buttonId : undefined,
7530
7537
  disabled: disabled,
7531
- id: id,
7538
+ id: buttonId,
7532
7539
  onKeyDown: !disabled && !readOnly ? handleButtonKeyDown : undefined,
7533
7540
  type: 'button'
7534
7541
  };
@@ -7610,7 +7617,6 @@ var BaseSelect = /*#__PURE__*/React.forwardRef(function BaseSelect(props, ref) {
7610
7617
 
7611
7618
  var commonListboxProps = _extends({}, listbox, {
7612
7619
  className: 'w-auto',
7613
- invalid: undefined,
7614
7620
  style: {
7615
7621
  minWidth: selectDimensions === null || selectDimensions === void 0 ? void 0 : selectDimensions.width
7616
7622
  },
@@ -9103,7 +9109,7 @@ var Column = function Column(_ref) {
9103
9109
  'cursor-pointer': !cell.disableSorting,
9104
9110
  'justify-start text-left': cell.align === 'left',
9105
9111
  'justify-end text-right': cell.align === 'right',
9106
- 'justify-center text-center': !cell.align
9112
+ 'justify-center text-center': cell.align === 'center' || !cell.align
9107
9113
  }),
9108
9114
  style: _extends({}, cell.style, {
9109
9115
  flex: cell.flex
@@ -9675,7 +9681,7 @@ Tabs.List = TabList;
9675
9681
  Tabs.Trigger = TabTrigger;
9676
9682
  Tabs.Content = TabContent;
9677
9683
 
9678
- var _excluded$Q = ["defaultValue", "highlighted", "invalid", "onKeyDown"];
9684
+ var _excluded$Q = ["defaultValue", "highlighted", "onKeyDown", "state"];
9679
9685
  var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9680
9686
  var onKeyDown = props.onKeyDown,
9681
9687
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$Q);
@@ -9721,14 +9727,14 @@ var Switch = /*#__PURE__*/React.forwardRef(function Switch(props, ref) {
9721
9727
  onCheckedChange: onChange,
9722
9728
  ref: ref
9723
9729
  }), React.createElement(PrimitiveSwitch.Thumb, {
9724
- className: "'will-change-transform group-aria-checked:translate-x-5 mt-1 h-4 w-4 translate-x-1 rounded-full bg-white transition-transform"
9730
+ className: "'will-change-transform transition-transform translate-x-1 group-aria-checked:translate-x-5 h-4 w-4 mt-1 bg-white rounded-full"
9725
9731
  }));
9726
9732
 
9727
9733
  if (label) {
9728
9734
  var labelClassName = cn('flex items-center cursor-pointer', {
9729
9735
  'cursor-not-allowed text-grey-dark': props.disabled
9730
9736
  });
9731
- element = React.createElement("label", {
9737
+ return React.createElement("label", {
9732
9738
  className: labelClassName
9733
9739
  }, element, label);
9734
9740
  }