@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 +59 -46
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +59 -46
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.js +61 -33
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +3 -2
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -5
- package/src/components/molecules/link-card/LinkCard.theme.js +7 -21
package/dist/index.esm.js
CHANGED
|
@@ -39103,17 +39103,17 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
39103
39103
|
};
|
|
39104
39104
|
|
|
39105
39105
|
var onBackground = "".concat(MATISSE_BLUE);
|
|
39106
|
-
var disabledBackground = "".concat(
|
|
39107
|
-
var disabledBackgroundLight = "".concat(ATHENS_GREY);
|
|
39106
|
+
var disabledBackground = "".concat(IRON_GREY);
|
|
39108
39107
|
var white = "".concat(WHITE);
|
|
39108
|
+
var offBackground = "".concat(REGENT_GREY);
|
|
39109
39109
|
var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
|
|
39110
39110
|
var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
|
|
39111
39111
|
var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
|
|
39112
39112
|
var fallbackValues$y = {
|
|
39113
39113
|
onBackground: onBackground,
|
|
39114
39114
|
disabledBackground: disabledBackground,
|
|
39115
|
-
disabledBackgroundLight: disabledBackgroundLight,
|
|
39116
39115
|
white: white,
|
|
39116
|
+
offBackground: offBackground,
|
|
39117
39117
|
rightLabelStyles: rightLabelStyles,
|
|
39118
39118
|
leftLabelStyles: leftLabelStyles
|
|
39119
39119
|
};
|
|
@@ -39131,7 +39131,7 @@ var HiddenToggleSwitchBox = styled.input.withConfig({
|
|
|
39131
39131
|
var VisibleSwitchComponent = styled.label.withConfig({
|
|
39132
39132
|
displayName: "ToggleSwitch__VisibleSwitchComponent",
|
|
39133
39133
|
componentId: "sc-1t51u6v-1"
|
|
39134
|
-
})(["width:
|
|
39134
|
+
})(["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) {
|
|
39135
39135
|
var disabled = _ref3.disabled;
|
|
39136
39136
|
return disabled ? "auto" : "pointer";
|
|
39137
39137
|
}, function (_ref4) {
|
|
@@ -39141,10 +39141,14 @@ var VisibleSwitchComponent = styled.label.withConfig({
|
|
|
39141
39141
|
var isMobile = _ref5.isMobile;
|
|
39142
39142
|
return isMobile ? "transform: scale(0.75)" : "";
|
|
39143
39143
|
});
|
|
39144
|
-
var
|
|
39145
|
-
displayName: "
|
|
39144
|
+
var ToggleSwitchMiddleRingComponent = styled.div.withConfig({
|
|
39145
|
+
displayName: "ToggleSwitch__ToggleSwitchMiddleRingComponent",
|
|
39146
39146
|
componentId: "sc-1t51u6v-2"
|
|
39147
|
-
})(["position:absolute;width:
|
|
39147
|
+
})(["position:absolute;width:20px;height:20px;border:none;border-radius:50%;box-sizing:border-box;"]);
|
|
39148
|
+
var ToggleSwitchInnerRingComponent = styled.div.withConfig({
|
|
39149
|
+
displayName: "ToggleSwitch__ToggleSwitchInnerRingComponent",
|
|
39150
|
+
componentId: "sc-1t51u6v-3"
|
|
39151
|
+
})(["position:absolute;width:14px;height:14px;top:3px;left:3px;right:3px;bottom:3px;border-radius:50%;box-sizing:border-box;"]);
|
|
39148
39152
|
var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
39149
39153
|
var _ref6$isOn = _ref6.isOn,
|
|
39150
39154
|
isOn = _ref6$isOn === void 0 ? false : _ref6$isOn,
|
|
@@ -39161,26 +39165,50 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
39161
39165
|
themeValues = _ref6.themeValues,
|
|
39162
39166
|
isMobile = _ref6.isMobile,
|
|
39163
39167
|
dataQa = _ref6.dataQa;
|
|
39164
|
-
var
|
|
39168
|
+
var ToggleSwitchInnerRing = posed(ToggleSwitchInnerRingComponent)({
|
|
39165
39169
|
off: {
|
|
39166
|
-
backgroundColor:
|
|
39167
|
-
|
|
39168
|
-
|
|
39169
|
-
|
|
39170
|
-
|
|
39170
|
+
backgroundColor: themeValues.offBackground,
|
|
39171
|
+
transition: {
|
|
39172
|
+
ease: "easeOut"
|
|
39173
|
+
}
|
|
39174
|
+
},
|
|
39175
|
+
on: {
|
|
39176
|
+
backgroundColor: themeValues.onBackground,
|
|
39177
|
+
transition: {
|
|
39178
|
+
ease: "easeIn"
|
|
39179
|
+
}
|
|
39180
|
+
},
|
|
39181
|
+
disabled: {
|
|
39182
|
+
backgroundColor: themeValues.disabledBackground
|
|
39183
|
+
}
|
|
39184
|
+
});
|
|
39185
|
+
var ToggleSwitchMiddleRing = posed(ToggleSwitchMiddleRingComponent)({
|
|
39186
|
+
off: {
|
|
39187
|
+
backgroundColor: themeValues.white,
|
|
39188
|
+
left: "2px",
|
|
39189
|
+
top: "2px",
|
|
39190
|
+
bottom: "2px",
|
|
39191
|
+
right: "24px",
|
|
39171
39192
|
transition: {
|
|
39172
39193
|
ease: "backIn"
|
|
39173
39194
|
}
|
|
39174
39195
|
},
|
|
39175
39196
|
on: {
|
|
39176
39197
|
backgroundColor: themeValues.white,
|
|
39177
|
-
right: "
|
|
39178
|
-
top: "
|
|
39179
|
-
bottom: "
|
|
39180
|
-
left: "
|
|
39198
|
+
right: "1px",
|
|
39199
|
+
top: "2px",
|
|
39200
|
+
bottom: "2px",
|
|
39201
|
+
left: "25px",
|
|
39181
39202
|
transition: {
|
|
39182
39203
|
ease: "backIn"
|
|
39183
39204
|
}
|
|
39205
|
+
},
|
|
39206
|
+
disabled: {
|
|
39207
|
+
backgroundColor: themeValues.white,
|
|
39208
|
+
left: "2px",
|
|
39209
|
+
top: "2px",
|
|
39210
|
+
bottom: "2px",
|
|
39211
|
+
right: "24px"
|
|
39184
39212
|
}
|
|
39185
39213
|
});
|
|
39186
39214
|
var VisibleSwitch = posed(VisibleSwitchComponent)({
|
|
@@ -39195,20 +39223,19 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
39195
39223
|
boxShadow: "0px 2px 5px 0px rgba(0,0,0,0.5)"
|
|
39196
39224
|
},
|
|
39197
39225
|
off: {
|
|
39198
|
-
|
|
39199
|
-
backgroundColor: disabled ? themeValues.disabledBackgroundLight : themeValues.white,
|
|
39200
|
-
borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
39226
|
+
backgroundColor: themeValues.offBackground,
|
|
39201
39227
|
transition: {
|
|
39202
39228
|
ease: "easeOut"
|
|
39203
39229
|
}
|
|
39204
39230
|
},
|
|
39205
39231
|
on: {
|
|
39206
|
-
|
|
39207
|
-
backgroundColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
39208
|
-
borderColor: disabled ? themeValues.disabledBackground : themeValues.onBackground,
|
|
39232
|
+
backgroundColor: themeValues.onBackground,
|
|
39209
39233
|
transition: {
|
|
39210
39234
|
ease: "easeIn"
|
|
39211
39235
|
}
|
|
39236
|
+
},
|
|
39237
|
+
disabled: {
|
|
39238
|
+
backgroundColor: themeValues.disabledBackground
|
|
39212
39239
|
}
|
|
39213
39240
|
});
|
|
39214
39241
|
var handleKeyDown = function handleKeyDown(e) {
|
|
@@ -39243,11 +39270,11 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
39243
39270
|
htmlFor: "#toggle-".concat(name),
|
|
39244
39271
|
onClick: disabled ? noop : onToggle,
|
|
39245
39272
|
onKeyDown: disabled ? noop : handleKeyDown,
|
|
39246
|
-
pose: isOn ? "on" : "off",
|
|
39273
|
+
pose: disabled ? "disabled" : isOn ? "on" : "off",
|
|
39247
39274
|
tabIndex: disabled ? -1 : 0,
|
|
39248
39275
|
disabled: disabled,
|
|
39249
39276
|
isMobile: isMobile
|
|
39250
|
-
}, /*#__PURE__*/React.createElement(
|
|
39277
|
+
}, /*#__PURE__*/React.createElement(ToggleSwitchMiddleRing, null, /*#__PURE__*/React.createElement(ToggleSwitchInnerRing, null))))), label && /*#__PURE__*/React.createElement(Heading$1, {
|
|
39251
39278
|
variant: "h4",
|
|
39252
39279
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
39253
39280
|
extraStyles: "margin: 0 0.5rem; position: relative; bottom: 1px; display: inline-block;",
|
|
@@ -42963,27 +42990,13 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
|
|
|
42963
42990
|
var MISC_BILL_ICON = "MISC_SINGLE_BILL";
|
|
42964
42991
|
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));
|
|
42965
42992
|
|
|
42966
|
-
var disabledBackgroundColor$1 =
|
|
42967
|
-
|
|
42968
|
-
|
|
42969
|
-
var
|
|
42970
|
-
|
|
42971
|
-
|
|
42972
|
-
var
|
|
42973
|
-
primary: MANATEE_GREY
|
|
42974
|
-
};
|
|
42975
|
-
var activeBackgroundColor$1 = {
|
|
42976
|
-
primary: CORNFLOWER_BLUE
|
|
42977
|
-
};
|
|
42978
|
-
var backgroundColor$9 = {
|
|
42979
|
-
primary: LINK_WATER
|
|
42980
|
-
};
|
|
42981
|
-
var borderColor$5 = {
|
|
42982
|
-
primary: MOON_RAKER
|
|
42983
|
-
};
|
|
42984
|
-
var color$b = {
|
|
42985
|
-
primary: ROYAL_BLUE_VIVID
|
|
42986
|
-
};
|
|
42993
|
+
var disabledBackgroundColor$1 = TRANSPARENT;
|
|
42994
|
+
var disabledBorderColor$1 = GHOST_GREY;
|
|
42995
|
+
var disabledColor$1 = MANATEE_GREY;
|
|
42996
|
+
var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
42997
|
+
var backgroundColor$9 = LINK_WATER;
|
|
42998
|
+
var borderColor$5 = MOON_RAKER;
|
|
42999
|
+
var color$b = ROYAL_BLUE_VIVID;
|
|
42987
43000
|
var fallbackValues$I = {
|
|
42988
43001
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
42989
43002
|
disabledBorderColor: disabledBorderColor$1,
|