@thecb/components 10.5.5 → 10.5.6-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
@@ -39111,17 +39111,17 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
39111
39111
  };
39112
39112
 
39113
39113
  var onBackground = "".concat(MATISSE_BLUE);
39114
- var disabledBackground = "".concat(MANATEE_GREY);
39115
- var disabledBackgroundLight = "".concat(ATHENS_GREY);
39114
+ var disabledBackground = "".concat(IRON_GREY);
39116
39115
  var white = "".concat(WHITE);
39116
+ var offBackground = "".concat(REGENT_GREY);
39117
39117
  var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
39118
39118
  var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
39119
39119
  var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
39120
39120
  var fallbackValues$y = {
39121
39121
  onBackground: onBackground,
39122
39122
  disabledBackground: disabledBackground,
39123
- disabledBackgroundLight: disabledBackgroundLight,
39124
39123
  white: white,
39124
+ offBackground: offBackground,
39125
39125
  rightLabelStyles: rightLabelStyles,
39126
39126
  leftLabelStyles: leftLabelStyles
39127
39127
  };
@@ -39139,7 +39139,7 @@ var HiddenToggleSwitchBox = styled__default.input.withConfig({
39139
39139
  var VisibleSwitchComponent = styled__default.label.withConfig({
39140
39140
  displayName: "ToggleSwitch__VisibleSwitchComponent",
39141
39141
  componentId: "sc-1t51u6v-1"
39142
- })(["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) {
39142
+ })(["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) {
39143
39143
  var disabled = _ref3.disabled;
39144
39144
  return disabled ? "auto" : "pointer";
39145
39145
  }, function (_ref4) {
@@ -39149,10 +39149,14 @@ var VisibleSwitchComponent = styled__default.label.withConfig({
39149
39149
  var isMobile = _ref5.isMobile;
39150
39150
  return isMobile ? "transform: scale(0.75)" : "";
39151
39151
  });
39152
- var ToggleSwitchRingComponent = styled__default.div.withConfig({
39153
- displayName: "ToggleSwitch__ToggleSwitchRingComponent",
39152
+ var ToggleSwitchMiddleRingComponent = styled__default.div.withConfig({
39153
+ displayName: "ToggleSwitch__ToggleSwitchMiddleRingComponent",
39154
39154
  componentId: "sc-1t51u6v-2"
39155
- })(["position:absolute;width:16px;height:16px;border:none;border-radius:50%;box-sizing:border-box;"]);
39155
+ })(["position:absolute;width:20px;height:20px;border:none;border-radius:50%;box-sizing:border-box;"]);
39156
+ var ToggleSwitchInnerRingComponent = styled__default.div.withConfig({
39157
+ displayName: "ToggleSwitch__ToggleSwitchInnerRingComponent",
39158
+ componentId: "sc-1t51u6v-3"
39159
+ })(["position:absolute;width:14px;height:14px;top:3px;left:3px;right:3px;bottom:3px;border-radius:50%;box-sizing:border-box;"]);
39156
39160
  var ToggleSwitch = function ToggleSwitch(_ref6) {
39157
39161
  var _ref6$isOn = _ref6.isOn,
39158
39162
  isOn = _ref6$isOn === void 0 ? false : _ref6$isOn,
@@ -39169,26 +39173,50 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
39169
39173
  themeValues = _ref6.themeValues,
39170
39174
  isMobile = _ref6.isMobile,
39171
39175
  dataQa = _ref6.dataQa;
39172
- var ToggleSwitchRing = posed(ToggleSwitchRingComponent)({
39176
+ var ToggleSwitchInnerRing = posed(ToggleSwitchInnerRingComponent)({
39173
39177
  off: {
39174
- backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
39175
- left: "4px",
39176
- top: "3px",
39177
- bottom: "3px",
39178
- right: "20px",
39178
+ backgroundColor: themeValues.offBackground,
39179
+ transition: {
39180
+ ease: "easeOut"
39181
+ }
39182
+ },
39183
+ on: {
39184
+ backgroundColor: themeValues.onBackground,
39185
+ transition: {
39186
+ ease: "easeIn"
39187
+ }
39188
+ },
39189
+ disabled: {
39190
+ backgroundColor: themeValues.disabledBackground
39191
+ }
39192
+ });
39193
+ var ToggleSwitchMiddleRing = posed(ToggleSwitchMiddleRingComponent)({
39194
+ off: {
39195
+ backgroundColor: themeValues.white,
39196
+ left: "2px",
39197
+ top: "2px",
39198
+ bottom: "2px",
39199
+ right: "24px",
39179
39200
  transition: {
39180
39201
  ease: "backIn"
39181
39202
  }
39182
39203
  },
39183
39204
  on: {
39184
39205
  backgroundColor: themeValues.white,
39185
- right: "8px",
39186
- top: "3px",
39187
- bottom: "3px",
39188
- left: "22px",
39206
+ right: "1px",
39207
+ top: "2px",
39208
+ bottom: "2px",
39209
+ left: "25px",
39189
39210
  transition: {
39190
39211
  ease: "backIn"
39191
39212
  }
39213
+ },
39214
+ disabled: {
39215
+ backgroundColor: themeValues.white,
39216
+ left: "2px",
39217
+ top: "2px",
39218
+ bottom: "2px",
39219
+ right: "24px"
39192
39220
  }
39193
39221
  });
39194
39222
  var VisibleSwitch = posed(VisibleSwitchComponent)({
@@ -39203,20 +39231,19 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
39203
39231
  boxShadow: "0px 2px 5px 0px rgba(0,0,0,0.5)"
39204
39232
  },
39205
39233
  off: {
39206
- border: "1px solid",
39207
- backgroundColor: disabled ? themeValues.disabledBackgroundLight : themeValues.white,
39208
- borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
39234
+ backgroundColor: themeValues.offBackground,
39209
39235
  transition: {
39210
39236
  ease: "easeOut"
39211
39237
  }
39212
39238
  },
39213
39239
  on: {
39214
- border: "1px solid",
39215
- backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
39216
- borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
39240
+ backgroundColor: themeValues.onBackground,
39217
39241
  transition: {
39218
39242
  ease: "easeIn"
39219
39243
  }
39244
+ },
39245
+ disabled: {
39246
+ backgroundColor: themeValues.disabledBackground
39220
39247
  }
39221
39248
  });
39222
39249
  var handleKeyDown = function handleKeyDown(e) {
@@ -39251,11 +39278,11 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
39251
39278
  htmlFor: "#toggle-".concat(name),
39252
39279
  onClick: disabled ? noop : onToggle,
39253
39280
  onKeyDown: disabled ? noop : handleKeyDown,
39254
- pose: isOn ? "on" : "off",
39281
+ pose: disabled ? "disabled" : isOn ? "on" : "off",
39255
39282
  tabIndex: disabled ? -1 : 0,
39256
39283
  disabled: disabled,
39257
39284
  isMobile: isMobile
39258
- }, /*#__PURE__*/React__default.createElement(ToggleSwitchRing, null)))), label && /*#__PURE__*/React__default.createElement(Heading$1, {
39285
+ }, /*#__PURE__*/React__default.createElement(ToggleSwitchMiddleRing, null, /*#__PURE__*/React__default.createElement(ToggleSwitchInnerRing, null))))), label && /*#__PURE__*/React__default.createElement(Heading$1, {
39259
39286
  variant: "h4",
39260
39287
  weight: FONT_WEIGHT_SEMIBOLD,
39261
39288
  extraStyles: "margin: 0 0.5rem; position: relative; bottom: 1px; display: inline-block;",
@@ -42971,27 +42998,13 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
42971
42998
  var MISC_BILL_ICON = "MISC_SINGLE_BILL";
42972
42999
  var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, ACCOUNTS_GENERIC_ICON, AccountGenericIcon), ACCOUNTS_CONSTRUCTION_ICON, AccountConstructionIcon), ACCOUNTS_HEALTH_ICON, AccountMedicalIcon), ACCOUNTS_DENTAL_ICON, AccountDentalIcon), ACCOUNTS_UTILITY_ELECTRIC_ICON, AccountElectricIcon), ACCOUNTS_UTILITY_GARBAGE_ICON, AccountGarbageIcon), ACCOUNTS_UTILITY_GAS_ICON, AccountGasIcon), ACCOUNTS_UTILITY_WATER_ICON, AccountWaterIcon), PROPERTIES_PERSONAL_ICON, PropertyPersonalIcon), PROPERTIES_GARAGE_ICON, PropertyGarageIcon), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, PROPERTIES_BUSINESS_ICON, PropertyBusinessIcon), PROPERTIES_STOREFRONT_ICON, PropertyStorefrontIcon), PROPERTIES_APARTMENT_ICON, PropertyApartmentIcon), PROPERTIES_LAND_ICON, PropertyLandIcon), PROPERTIES_CAR_ICON, PropertyCarIcon), PROPERTIES_MOTORCYCLE_ICON, PropertyMotorcycleIcon), PROPERTIES_COMMERCIAL_AUTO_ICON, PropertyCommercialVehicleIcon), MISC_BILL_ICON, AccountBillIcon));
42973
43000
 
42974
- var disabledBackgroundColor$1 = {
42975
- primary: TRANSPARENT
42976
- };
42977
- var disabledBorderColor$1 = {
42978
- primary: GHOST_GREY
42979
- };
42980
- var disabledColor$1 = {
42981
- primary: MANATEE_GREY
42982
- };
42983
- var activeBackgroundColor$1 = {
42984
- primary: CORNFLOWER_BLUE
42985
- };
42986
- var backgroundColor$9 = {
42987
- primary: LINK_WATER
42988
- };
42989
- var borderColor$5 = {
42990
- primary: MOON_RAKER
42991
- };
42992
- var color$b = {
42993
- primary: ROYAL_BLUE_VIVID
42994
- };
43001
+ var disabledBackgroundColor$1 = TRANSPARENT;
43002
+ var disabledBorderColor$1 = GHOST_GREY;
43003
+ var disabledColor$1 = MANATEE_GREY;
43004
+ var activeBackgroundColor$1 = CORNFLOWER_BLUE;
43005
+ var backgroundColor$9 = LINK_WATER;
43006
+ var borderColor$5 = MOON_RAKER;
43007
+ var color$b = ROYAL_BLUE_VIVID;
42995
43008
  var fallbackValues$I = {
42996
43009
  disabledBackgroundColor: disabledBackgroundColor$1,
42997
43010
  disabledBorderColor: disabledBorderColor$1,