@dxos/react-ui 0.3.7-main.8c7953e → 0.3.7-main.be1ccb9

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.
@@ -919,7 +919,8 @@ var Checkbox = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsCheck
919
919
  })
920
920
  })));
921
921
  });
922
- var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size, classNames, ...props }, forwardedRef) => {
922
+ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked, defaultChecked: propsDefaultChecked, onCheckedChange: propsOnCheckedChange, size = 5, classNames, ...props }, forwardedRef) => {
923
+ const { tx } = useThemeContext();
923
924
  const [checked, onCheckedChange] = useControllableState({
924
925
  prop: propsChecked,
925
926
  defaultProp: propsDefaultChecked,
@@ -936,11 +937,14 @@ var Switch = /* @__PURE__ */ forwardRef10(({ __inputScope, checked: propsChecked
936
937
  "aria-invalid": "true",
937
938
  "aria-errormessage": errorMessageId
938
939
  },
939
- // className: tx('input.checkbox', 'input--checkbox', { size }, 'shrink-0', classNames),
940
- className: "w-[56px] h-[32px] bg-transparent rounded-full px-[4px] border-2 border-neutral-500 relative data-[state=checked]:border-primary-500 data-[state=checked]:bg-primary-500 outline-none cursor-default",
940
+ className: tx("input.switch", "input--switch", {
941
+ size
942
+ }, classNames),
941
943
  ref: forwardedRef
942
944
  }, /* @__PURE__ */ React13.createElement(SwitchThumbPrimitive, {
943
- className: "block w-[22px] h-[22px] bg-neutral-500 rounded-full border-neutral-100 transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[22px] data-[state=checked]:bg-white"
945
+ className: tx("input.switchThumb", "input--switch__thumb", {
946
+ size
947
+ })
944
948
  }));
945
949
  });
946
950
  var Input = {