@thecb/components 10.4.7-beta.1 → 10.4.8-beta.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.
package/dist/index.cjs.js CHANGED
@@ -14131,7 +14131,9 @@ var GenericErrorIcon = function GenericErrorIcon() {
14131
14131
  }));
14132
14132
  };
14133
14133
 
14134
- var IconAdd = function IconAdd() {
14134
+ var IconAdd = function IconAdd(_ref) {
14135
+ var _ref$strokeWidth = _ref.strokeWidth,
14136
+ strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth;
14135
14137
  return /*#__PURE__*/React__default.createElement("svg", {
14136
14138
  xmlns: "http://www.w3.org/2000/svg",
14137
14139
  xmlnsXlink: "http://www.w3.org/1999/xlink",
@@ -14141,12 +14143,13 @@ var IconAdd = function IconAdd() {
14141
14143
  className: "icon"
14142
14144
  }, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("path", {
14143
14145
  id: "path-1",
14146
+ strokeWidth: strokeWidth,
14144
14147
  d: "M7.91666623 4.78508747L4.78508747 4.78508747 4.78508747 7.91666623 3.74122788 7.91666623 3.74122788 4.78508747 0.609649123 4.78508747 0.609649123 3.74122788 3.74122788 3.74122788 3.74122788 0.609649123 4.78508747 0.609649123 4.78508747 3.74122788 7.91666623 3.74122788z"
14145
14148
  })), /*#__PURE__*/React__default.createElement("g", {
14146
14149
  fill: "none",
14147
14150
  fillRule: "evenodd",
14148
14151
  stroke: "none",
14149
- strokeWidth: "1"
14152
+ strokeWidth: strokeWidth
14150
14153
  }, /*#__PURE__*/React__default.createElement("g", {
14151
14154
  transform: "translate(-407 -563)"
14152
14155
  }, /*#__PURE__*/React__default.createElement("g", {
@@ -14164,9 +14167,10 @@ var IconAdd = function IconAdd() {
14164
14167
  xlinkHref: "#path-1"
14165
14168
  })), /*#__PURE__*/React__default.createElement("circle", {
14166
14169
  className: "stroke",
14170
+ strokeWidth: strokeWidth,
14167
14171
  cx: "8.155",
14168
14172
  cy: "8.072",
14169
- r: "8"
14173
+ r: strokeWidth == 1 ? "8" : "7"
14170
14174
  }))))));
14171
14175
  };
14172
14176
 
@@ -27836,13 +27840,13 @@ var Placeholder = function Placeholder(_ref2) {
27836
27840
  childGap: "0"
27837
27841
  }, variant === "large" && /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(Box, {
27838
27842
  padding: "0",
27839
- extraStyles: ".fill { \n fill: ".concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n }")
27843
+ extraStyles: ".fill { \n fill: ".concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } ")
27840
27844
  }, variant === "large" ? /*#__PURE__*/React__default.createElement(Center, {
27841
27845
  intrinsic: true
27842
27846
  }, getLargeIcon(largeIcon), /*#__PURE__*/React__default.createElement(Text$1, {
27843
27847
  variant: "pS",
27844
27848
  color: themeValues.color,
27845
- weight: FONT_WEIGHT_REGULAR,
27849
+ weight: FONT_WEIGHT_SEMIBOLD,
27846
27850
  extraStyles: "text-align: center;"
27847
27851
  }, text)) : /*#__PURE__*/React__default.createElement(Cover, {
27848
27852
  singleChild: true,
@@ -27850,12 +27854,14 @@ var Placeholder = function Placeholder(_ref2) {
27850
27854
  }, /*#__PURE__*/React__default.createElement(Cluster, {
27851
27855
  justify: "center",
27852
27856
  align: "center"
27853
- }, /*#__PURE__*/React__default.createElement(IconAdd, null), /*#__PURE__*/React__default.createElement(Center, {
27857
+ }, /*#__PURE__*/React__default.createElement(IconAdd, {
27858
+ strokeWidth: "2"
27859
+ }), /*#__PURE__*/React__default.createElement(Center, {
27854
27860
  intrinsic: true
27855
27861
  }, /*#__PURE__*/React__default.createElement(Text$1, {
27856
27862
  variant: "pS",
27857
27863
  color: themeValues.color,
27858
- weight: FONT_WEIGHT_REGULAR,
27864
+ weight: FONT_WEIGHT_SEMIBOLD,
27859
27865
  extraStyles: "padding: 0 0 0 8px; text-align: center;"
27860
27866
  }, text)))))))))));
27861
27867
  };
@@ -38771,17 +38777,17 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38771
38777
  };
38772
38778
 
38773
38779
  var onBackground = "".concat(MATISSE_BLUE);
38774
- var disabledBackground = "".concat(MANATEE_GREY);
38775
- var disabledBackgroundLight = "".concat(ATHENS_GREY);
38780
+ var disabledBackground = "".concat(IRON_GREY);
38776
38781
  var white = "".concat(WHITE);
38782
+ var offBackground = "".concat(REGENT_GREY);
38777
38783
  var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
38778
38784
  var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
38779
38785
  var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
38780
38786
  var fallbackValues$y = {
38781
38787
  onBackground: onBackground,
38782
38788
  disabledBackground: disabledBackground,
38783
- disabledBackgroundLight: disabledBackgroundLight,
38784
38789
  white: white,
38790
+ offBackground: offBackground,
38785
38791
  rightLabelStyles: rightLabelStyles,
38786
38792
  leftLabelStyles: leftLabelStyles
38787
38793
  };
@@ -38799,7 +38805,7 @@ var HiddenToggleSwitchBox = styled__default.input.withConfig({
38799
38805
  var VisibleSwitchComponent = styled__default.label.withConfig({
38800
38806
  displayName: "ToggleSwitch__VisibleSwitchComponent",
38801
38807
  componentId: "sc-1t51u6v-1"
38802
- })(["width:44px;height:24px;border-radius:12px;border:none;position:relative;box-sizing:border-box;cursor:", ";display:inline-block;&:hover{box-shadow:", ";}&:focus{box-shadow:0px 2px 5px 0px rgba(0,0,0,0.5);}", ""], function (_ref3) {
38808
+ })(["width:48px;height:24px;border-radius:48px;border:none;position:relative;box-sizing:border-box;cursor:", ";display:inline-block;&:hover{box-shadow:", ";}&:focus{box-shadow:0px 2px 5px 0px rgba(0,0,0,0.5);}", ""], function (_ref3) {
38803
38809
  var disabled = _ref3.disabled;
38804
38810
  return disabled ? "auto" : "pointer";
38805
38811
  }, function (_ref4) {
@@ -38809,10 +38815,14 @@ var VisibleSwitchComponent = styled__default.label.withConfig({
38809
38815
  var isMobile = _ref5.isMobile;
38810
38816
  return isMobile ? "transform: scale(0.75)" : "";
38811
38817
  });
38812
- var ToggleSwitchRingComponent = styled__default.div.withConfig({
38813
- displayName: "ToggleSwitch__ToggleSwitchRingComponent",
38818
+ var ToggleSwitchMiddleRingComponent = styled__default.div.withConfig({
38819
+ displayName: "ToggleSwitch__ToggleSwitchMiddleRingComponent",
38814
38820
  componentId: "sc-1t51u6v-2"
38815
- })(["position:absolute;width:16px;height:16px;border:none;border-radius:50%;box-sizing:border-box;"]);
38821
+ })(["position:absolute;width:20px;height:20px;border:none;border-radius:50%;box-sizing:border-box;"]);
38822
+ var ToggleSwitchInnerRingComponent = styled__default.div.withConfig({
38823
+ displayName: "ToggleSwitch__ToggleSwitchInnerRingComponent",
38824
+ componentId: "sc-1t51u6v-3"
38825
+ })(["position:absolute;width:14px;height:14px;top:3px;left:3px;right:3px;bottom:3px;border-radius:50%;box-sizing:border-box;"]);
38816
38826
  var ToggleSwitch = function ToggleSwitch(_ref6) {
38817
38827
  var _ref6$isOn = _ref6.isOn,
38818
38828
  isOn = _ref6$isOn === void 0 ? false : _ref6$isOn,
@@ -38829,30 +38839,52 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
38829
38839
  themeValues = _ref6.themeValues,
38830
38840
  isMobile = _ref6.isMobile,
38831
38841
  dataQa = _ref6.dataQa;
38832
- var ToggleSwitchRing = posed(ToggleSwitchRingComponent)({
38842
+ var ToggleSwitchInnerRing = posed(ToggleSwitchInnerRingComponent)({
38843
+ off: {
38844
+ backgroundColor: themeValues.offBackground,
38845
+ transition: {
38846
+ ease: "easeOut"
38847
+ }
38848
+ },
38849
+ on: {
38850
+ backgroundColor: themeValues.onBackground,
38851
+ transition: {
38852
+ ease: "easeIn"
38853
+ }
38854
+ },
38855
+ disabled: {
38856
+ backgroundColor: themeValues.disabledBackground
38857
+ }
38858
+ });
38859
+ var ToggleSwitchMiddleRing = posed(ToggleSwitchMiddleRingComponent)({
38833
38860
  off: {
38834
- backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
38835
- left: "4px",
38836
- top: "3px",
38837
- bottom: "3px",
38838
- right: "20px",
38861
+ backgroundColor: themeValues.white,
38862
+ left: "2px",
38863
+ top: "2px",
38864
+ bottom: "2px",
38865
+ right: "24px",
38839
38866
  transition: {
38840
38867
  ease: "backIn"
38841
38868
  }
38842
38869
  },
38843
38870
  on: {
38844
38871
  backgroundColor: themeValues.white,
38845
- right: "8px",
38846
- top: "3px",
38847
- bottom: "4px",
38848
- left: "23px",
38872
+ right: "1px",
38873
+ top: "2px",
38874
+ bottom: "2px",
38875
+ left: "25px",
38849
38876
  transition: {
38850
38877
  ease: "backIn"
38851
38878
  }
38879
+ },
38880
+ disabled: {
38881
+ backgroundColor: themeValues.white,
38882
+ left: "2px",
38883
+ top: "2px",
38884
+ bottom: "2px",
38885
+ right: "24px"
38852
38886
  }
38853
38887
  });
38854
-
38855
- // to do: for disabled, background color should not be white (should be lighter disabled background)
38856
38888
  var VisibleSwitch = posed(VisibleSwitchComponent)({
38857
38889
  focusable: true,
38858
38890
  hoverable: true,
@@ -38865,20 +38897,19 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
38865
38897
  boxShadow: "0px 2px 5px 0px rgba(0,0,0,0.5)"
38866
38898
  },
38867
38899
  off: {
38868
- border: "1px solid",
38869
- backgroundColor: disabled ? themeValues.disabledBackgroundLight : themeValues.white,
38870
- borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
38900
+ backgroundColor: themeValues.offBackground,
38871
38901
  transition: {
38872
38902
  ease: "easeOut"
38873
38903
  }
38874
38904
  },
38875
38905
  on: {
38876
- border: "1px solid",
38877
- backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
38878
- borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
38906
+ backgroundColor: themeValues.onBackground,
38879
38907
  transition: {
38880
38908
  ease: "easeIn"
38881
38909
  }
38910
+ },
38911
+ disabled: {
38912
+ backgroundColor: themeValues.disabledBackground
38882
38913
  }
38883
38914
  });
38884
38915
  var handleKeyDown = function handleKeyDown(e) {
@@ -38913,11 +38944,11 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
38913
38944
  htmlFor: "#toggle-".concat(name),
38914
38945
  onClick: disabled ? noop : onToggle,
38915
38946
  onKeyDown: disabled ? noop : handleKeyDown,
38916
- pose: isOn ? "on" : "off",
38947
+ pose: disabled ? "disabled" : isOn ? "on" : "off",
38917
38948
  tabIndex: disabled ? -1 : 0,
38918
38949
  disabled: disabled,
38919
38950
  isMobile: isMobile
38920
- }, /*#__PURE__*/React__default.createElement(ToggleSwitchRing, null)))), label && /*#__PURE__*/React__default.createElement(Heading$1, {
38951
+ }, /*#__PURE__*/React__default.createElement(ToggleSwitchMiddleRing, null, /*#__PURE__*/React__default.createElement(ToggleSwitchInnerRing, null))))), label && /*#__PURE__*/React__default.createElement(Heading$1, {
38921
38952
  variant: "h4",
38922
38953
  weight: FONT_WEIGHT_SEMIBOLD,
38923
38954
  extraStyles: "margin: 0 0.5rem; position: relative; bottom: 1px; display: inline-block;",