@nulogy/components 9.0.0 → 9.0.1

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.
package/dist/main.js CHANGED
@@ -51868,16 +51868,15 @@
51868
51868
  onClick = _ref.onClick;
51869
51869
  return /*#__PURE__*/React__default["default"].createElement(AnimatedBox, {
51870
51870
  position: "relative",
51871
- display: "flex",
51872
- alignItems: "center",
51873
- justifyContent: toggled ? "flex-end" : "flex-start",
51874
51871
  height: "24px",
51875
51872
  width: "48px",
51876
51873
  bg: disabled ? "grey" : getSwitchBackground(toggled),
51877
51874
  borderRadius: "20px",
51878
51875
  padding: "2px",
51879
51876
  boxShadow: "small",
51880
- whileHover: "hover",
51877
+ animate: toggled ? "toggled" : "initial",
51878
+ whileHover: "active",
51879
+ whileFocus: "active",
51881
51880
  onClick: onClick
51882
51881
  }, children);
51883
51882
  };
@@ -51887,18 +51886,20 @@
51887
51886
  children = _ref2.children;
51888
51887
  return /*#__PURE__*/React__default["default"].createElement(motion.div, {
51889
51888
  className: "slider",
51890
- layout: true,
51889
+ initial: false,
51891
51890
  variants: {
51892
- hover: {
51891
+ active: {
51893
51892
  boxShadow: disabled ? undefined : Theme.shadows.focus,
51894
51893
  scale: disabled ? undefined : animationConfig.scale
51894
+ },
51895
+ toggled: {
51896
+ marginLeft: Theme.space.x3
51897
+ },
51898
+ initial: {
51899
+ marginLeft: Theme.space.none
51895
51900
  }
51896
51901
  },
51897
51902
  transition: animationConfig.transition,
51898
- whileFocus: {
51899
- boxShadow: disabled ? undefined : Theme.shadows.focus,
51900
- scale: disabled ? undefined : animationConfig.scale
51901
- },
51902
51903
  style: {
51903
51904
  height: "20px",
51904
51905
  width: "20px",
@@ -51851,16 +51851,15 @@ var Switch = function Switch(_ref) {
51851
51851
  onClick = _ref.onClick;
51852
51852
  return /*#__PURE__*/React__default.createElement(AnimatedBox, {
51853
51853
  position: "relative",
51854
- display: "flex",
51855
- alignItems: "center",
51856
- justifyContent: toggled ? "flex-end" : "flex-start",
51857
51854
  height: "24px",
51858
51855
  width: "48px",
51859
51856
  bg: disabled ? "grey" : getSwitchBackground(toggled),
51860
51857
  borderRadius: "20px",
51861
51858
  padding: "2px",
51862
51859
  boxShadow: "small",
51863
- whileHover: "hover",
51860
+ animate: toggled ? "toggled" : "initial",
51861
+ whileHover: "active",
51862
+ whileFocus: "active",
51864
51863
  onClick: onClick
51865
51864
  }, children);
51866
51865
  };
@@ -51870,18 +51869,20 @@ var Slider = function Slider(_ref2) {
51870
51869
  children = _ref2.children;
51871
51870
  return /*#__PURE__*/React__default.createElement(motion.div, {
51872
51871
  className: "slider",
51873
- layout: true,
51872
+ initial: false,
51874
51873
  variants: {
51875
- hover: {
51874
+ active: {
51876
51875
  boxShadow: disabled ? undefined : Theme.shadows.focus,
51877
51876
  scale: disabled ? undefined : animationConfig.scale
51877
+ },
51878
+ toggled: {
51879
+ marginLeft: Theme.space.x3
51880
+ },
51881
+ initial: {
51882
+ marginLeft: Theme.space.none
51878
51883
  }
51879
51884
  },
51880
51885
  transition: animationConfig.transition,
51881
- whileFocus: {
51882
- boxShadow: disabled ? undefined : Theme.shadows.focus,
51883
- scale: disabled ? undefined : animationConfig.scale
51884
- },
51885
51886
  style: {
51886
51887
  height: "20px",
51887
51888
  width: "20px",
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
- import { DefaultNDSThemeType } from "../theme.type";
4
3
  import { ComponentSize } from "../NDSProvider/ComponentSizeContext";
4
+ import { DefaultNDSThemeType } from "../theme.type";
5
5
  declare const ToggleComponent: React.ForwardRefExoticComponent<SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
6
6
  onChange?: (...args: any[]) => any;
7
7
  size?: ComponentSize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {