diff --git a/.size-snapshot.json b/.size-snapshot.json index a8269c307..afe1dad08 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,137 +1,109 @@ { "bundle.js": { - "bundled": 827878, - "minified": 759096, - "gzipped": 90513 + "bundled": 818457, + "minified": 751998, + "gzipped": 89501 }, "bundle.umd.js": { - "bundled": 837576, - "minified": 734730, - "gzipped": 86642 + "bundled": 827928, + "minified": 728400, + "gzipped": 85626 }, - "icons/icons/arrow.js": { - "bundled": 209, - "minified": 177, - "gzipped": 148, - "treeshaked": { - "rollup": { - "code": 66, - "import_statements": 66 - }, - "webpack": { - "code": 1087 - } - } - }, - "utils/colors/index.js": { - "bundled": 166, - "minified": 129, - "gzipped": 117, - "treeshaked": { - "rollup": { - "code": 19, - "import_statements": 19 - }, - "webpack": { - "code": 1003 - } - } - }, - "constants/breakpoints/index.js": { - "bundled": 232, - "minified": 200, - "gzipped": 158, + "constants/zScale/index.js": { + "bundled": 234, + "minified": 94, + "gzipped": 100, "treeshaked": { "rollup": { - "code": 107, - "import_statements": 57 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1101 + "code": 951 } } }, - "shared-components/button/components/linkButton/style.js": { - "bundled": 1745, - "minified": 1496, - "gzipped": 860, + "utils/shouldShowForEnvironment/index.js": { + "bundled": 431, + "minified": 275, + "gzipped": 185, "treeshaked": { "rollup": { - "code": 41, - "import_statements": 41 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1062 + "code": 951 } } }, - "icons/icons/arrowLeftIcon.js": { - "bundled": 257, - "minified": 225, - "gzipped": 154, + "constants/fonts/primary.js": { + "bundled": 338, + "minified": 321, + "gzipped": 234, "treeshaked": { "rollup": { - "code": 74, - "import_statements": 74 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1095 + "code": 951 } } }, - "icons/icons/circleSolidIcon.js": { - "bundled": 269, - "minified": 237, - "gzipped": 153, + "constants/fonts/secondary.js": { + "bundled": 347, + "minified": 330, + "gzipped": 240, "treeshaked": { "rollup": { - "code": 76, - "import_statements": 76 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1097 + "code": 951 } } }, - "icons/icons/chevronIcon.js": { - "bundled": 245, - "minified": 213, - "gzipped": 153, + "constants/spacer/index.js": { + "bundled": 360, + "minified": 205, + "gzipped": 129, "treeshaked": { "rollup": { - "code": 72, - "import_statements": 72 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1093 + "code": 951 } } }, - "icons/icons/arrowRightIcon.js": { - "bundled": 263, - "minified": 231, - "gzipped": 156, + "constants/progressBarStatus/index.js": { + "bundled": 128, + "minified": 111, + "gzipped": 99, "treeshaked": { "rollup": { - "code": 75, - "import_statements": 75 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1096 + "code": 951 } } }, - "constants/themes/primaryTheme.js": { - "bundled": 345, - "minified": 306, - "gzipped": 182, + "constants/animation/index.js": { + "bundled": 72, + "minified": 63, + "gzipped": 70, "treeshaked": { "rollup": { - "code": 97, - "import_statements": 97 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1207 + "code": 951 } } }, @@ -149,87 +121,101 @@ } } }, - "icons/icons/crossIcon.js": { - "bundled": 233, - "minified": 201, - "gzipped": 151, + "utils/throwOnUndefinedProperty/index.js": { + "bundled": 531, + "minified": 245, + "gzipped": 179, "treeshaked": { "rollup": { - "code": 70, - "import_statements": 70 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1091 + "code": 951 } } }, - "utils/accessibility/useResetFocus.js": { - "bundled": 735, - "minified": 179, - "gzipped": 140, + "shared-components/radioButton/index.js": { + "bundled": 1994, + "minified": 1051, + "gzipped": 515, "treeshaked": { "rollup": { - "code": 14, - "import_statements": 14 + "code": 369, + "import_statements": 230 }, "webpack": { - "code": 998 + "code": 1968 } } }, - "icons/icons/checkmarkIcon.js": { - "bundled": 257, - "minified": 225, - "gzipped": 154, + "constants/typography/secondaryTypography.js": { + "bundled": 396, + "minified": 259, + "gzipped": 188, "treeshaked": { "rollup": { - "code": 74, - "import_statements": 74 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1095 + "code": 951 } } }, - "constants/themes/secondaryTheme.js": { - "bundled": 369, - "minified": 330, - "gzipped": 183, + "shared-components/avatar/index.js": { + "bundled": 550, + "minified": 389, + "gzipped": 256, "treeshaked": { "rollup": { - "code": 103, - "import_statements": 103 + "code": 178, + "import_statements": 102 }, "webpack": { - "code": 1215 + "code": 1254 } } }, - "icons/icons/errorIcon.js": { - "bundled": 233, - "minified": 201, - "gzipped": 151, + "shared-components/avatar/style.js": { + "bundled": 1585, + "minified": 1420, + "gzipped": 953, "treeshaked": { "rollup": { - "code": 70, - "import_statements": 70 + "code": 334, + "import_statements": 36 }, "webpack": { - "code": 1091 + "code": 1320 } } }, - "shared-components/banner/index.js": { - "bundled": 1437, - "minified": 911, - "gzipped": 440, + "icons/icons/checkmarkIcon.js": { + "bundled": 257, + "minified": 225, + "gzipped": 154, "treeshaked": { "rollup": { - "code": 426, - "import_statements": 353 + "code": 74, + "import_statements": 74 }, "webpack": { - "code": 1578 + "code": 1095 + } + } + }, + "shared-components/button/components/linkButton/style.js": { + "bundled": 1745, + "minified": 1496, + "gzipped": 878, + "treeshaked": { + "rollup": { + "code": 41, + "import_statements": 41 + }, + "webpack": { + "code": 1062 } } }, @@ -247,437 +233,437 @@ } } }, - "shared-components/verificationMessages/index.js": { - "bundled": 1802, - "minified": 942, - "gzipped": 462, + "constants/breakpoints/index.js": { + "bundled": 232, + "minified": 200, + "gzipped": 158, "treeshaked": { "rollup": { - "code": 367, - "import_statements": 312 + "code": 107, + "import_statements": 57 }, "webpack": { - "code": 1444 + "code": 1101 } } }, - "shared-components/optionButton/index.js": { - "bundled": 2173, - "minified": 1429, - "gzipped": 621, + "shared-components/callout/index.js": { + "bundled": 1274, + "minified": 588, + "gzipped": 344, "treeshaked": { "rollup": { - "code": 507, - "import_statements": 365 + "code": 492, + "import_statements": 209 }, "webpack": { - "code": 1491 + "code": 1683 } } }, - "shared-components/avatar/index.js": { - "bundled": 550, - "minified": 389, - "gzipped": 256, + "constants/typography/index.js": { + "bundled": 564, + "minified": 427, + "gzipped": 248, "treeshaked": { "rollup": { - "code": 178, - "import_statements": 102 + "code": 242, + "import_statements": 57 }, "webpack": { - "code": 1254 + "code": 1240 } } }, - "shared-components/callout/index.js": { - "bundled": 1274, - "minified": 588, - "gzipped": 344, + "icons/icons/arrowLeftIcon.js": { + "bundled": 257, + "minified": 225, + "gzipped": 154, "treeshaked": { "rollup": { - "code": 492, - "import_statements": 209 + "code": 74, + "import_statements": 74 }, "webpack": { - "code": 1683 + "code": 1095 } } }, - "shared-components/button/constants.js": { - "bundled": 603, - "minified": 390, - "gzipped": 211, + "shared-components/button/deprecatedPropsHandler.js": { + "bundled": 466, + "minified": 339, + "gzipped": 213, "treeshaked": { "rollup": { - "code": 48, - "import_statements": 48 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 1036 + "code": 951 } } }, - "shared-components/avatar/style.js": { - "bundled": 1585, - "minified": 1420, - "gzipped": 953, + "icons/icons/circleSolidIcon.js": { + "bundled": 269, + "minified": 237, + "gzipped": 153, "treeshaked": { - "rollup": { - "code": 334, - "import_statements": 36 + "rollup": { + "code": 76, + "import_statements": 76 }, "webpack": { - "code": 1320 + "code": 1097 } } }, - "shared-components/chip/index.js": { - "bundled": 867, - "minified": 378, - "gzipped": 249, + "constants/themes/primaryTheme.js": { + "bundled": 345, + "minified": 306, + "gzipped": 182, "treeshaked": { "rollup": { - "code": 201, - "import_statements": 130 + "code": 97, + "import_statements": 97 }, "webpack": { - "code": 1247 + "code": 1207 } } }, - "constants/typography/index.js": { - "bundled": 564, - "minified": 427, - "gzipped": 248, + "icons/icons/crossIcon.js": { + "bundled": 233, + "minified": 201, + "gzipped": 151, "treeshaked": { "rollup": { - "code": 242, - "import_statements": 57 + "code": 70, + "import_statements": 70 }, "webpack": { - "code": 1240 + "code": 1091 } } }, - "shared-components/transitions/index.js": { - "bundled": 730, - "minified": 487, - "gzipped": 281, + "icons/icons/arrowRightIcon.js": { + "bundled": 263, + "minified": 231, + "gzipped": 156, "treeshaked": { "rollup": { - "code": 155, - "import_statements": 121 + "code": 75, + "import_statements": 75 }, "webpack": { - "code": 1212 + "code": 1096 } } }, - "constants/spacer/index.js": { - "bundled": 360, - "minified": 205, - "gzipped": 129, + "constants/themes/secondaryTheme.js": { + "bundled": 369, + "minified": 330, + "gzipped": 183, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 103, + "import_statements": 103 }, "webpack": { - "code": 951 + "code": 1215 } } }, - "constants/progressBarStatus/index.js": { - "bundled": 128, - "minified": 111, - "gzipped": 99, + "shared-components/chip/index.js": { + "bundled": 867, + "minified": 378, + "gzipped": 249, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 201, + "import_statements": 130 }, "webpack": { - "code": 951 + "code": 1247 } } }, - "constants/typography/primaryTypography.js": { - "bundled": 391, - "minified": 254, - "gzipped": 185, + "icons/icons/errorIcon.js": { + "bundled": 233, + "minified": 201, + "gzipped": 151, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 70, + "import_statements": 70 }, "webpack": { - "code": 951 + "code": 1091 } } }, - "utils/shouldShowForEnvironment/index.js": { - "bundled": 431, - "minified": 275, - "gzipped": 185, + "shared-components/optionButton/index.js": { + "bundled": 2173, + "minified": 1429, + "gzipped": 621, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 507, + "import_statements": 365 }, "webpack": { - "code": 951 + "code": 1491 } } }, - "constants/fonts/primary.js": { - "bundled": 338, - "minified": 321, - "gzipped": 234, + "shared-components/accordion/index.js": { + "bundled": 3291, + "minified": 1731, + "gzipped": 813, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 1464, + "import_statements": 460 }, "webpack": { - "code": 951 + "code": 2768 } } }, - "utils/styles/buttonReset.js": { - "bundled": 93, - "minified": 86, - "gzipped": 93, + "shared-components/icon/style.js": { + "bundled": 1496, + "minified": 1343, + "gzipped": 889, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 61, + "import_statements": 61 }, "webpack": { - "code": 951 + "code": 1082 } } }, - "constants/typography/secondaryTypography.js": { - "bundled": 396, - "minified": 259, - "gzipped": 188, + "shared-components/button/index.js": { + "bundled": 3658, + "minified": 1977, + "gzipped": 804, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 1626, + "import_statements": 608 }, "webpack": { - "code": 951 + "code": 2994 } } }, - "shared-components/toggle/index.js": { - "bundled": 1804, - "minified": 993, - "gzipped": 520, + "shared-components/button/constants.js": { + "bundled": 603, + "minified": 390, + "gzipped": 211, "treeshaked": { "rollup": { - "code": 302, - "import_statements": 268 + "code": 48, + "import_statements": 48 }, "webpack": { - "code": 1330 + "code": 1036 } } }, - "constants/zScale/index.js": { - "bundled": 234, - "minified": 94, - "gzipped": 100, + "utils/withDeprecationWarning/index.js": { + "bundled": 812, + "minified": 339, + "gzipped": 230, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 44, + "import_statements": 44 }, "webpack": { - "code": 951 + "code": 1029 } } }, - "constants/animation/index.js": { - "bundled": 72, - "minified": 63, - "gzipped": 70, + "utils/accessibility/useResetFocus.js": { + "bundled": 735, + "minified": 179, + "gzipped": 140, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 14, + "import_statements": 14 }, "webpack": { - "code": 951 + "code": 998 } } }, - "constants/fonts/secondary.js": { - "bundled": 347, - "minified": 330, - "gzipped": 240, + "shared-components/transitions/index.js": { + "bundled": 730, + "minified": 487, + "gzipped": 281, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 155, + "import_statements": 121 }, "webpack": { - "code": 951 + "code": 1212 } } }, - "shared-components/icon/style.js": { - "bundled": 1496, - "minified": 1343, - "gzipped": 889, + "utils/colors/index.js": { + "bundled": 166, + "minified": 129, + "gzipped": 117, "treeshaked": { "rollup": { - "code": 61, - "import_statements": 61 + "code": 19, + "import_statements": 19 }, "webpack": { - "code": 1082 + "code": 1003 } } }, - "utils/throwOnUndefinedProperty/index.js": { - "bundled": 531, - "minified": 245, - "gzipped": 179, + "icons/icons/chevronIcon.js": { + "bundled": 245, + "minified": 213, + "gzipped": 153, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 72, + "import_statements": 72 }, "webpack": { - "code": 951 + "code": 1093 } } }, - "shared-components/accordion/index.js": { - "bundled": 3291, - "minified": 1731, - "gzipped": 813, + "shared-components/button/shared-components/container/index.js": { + "bundled": 7040, + "minified": 6805, + "gzipped": 2030, "treeshaked": { "rollup": { - "code": 1464, - "import_statements": 460 + "code": 887, + "import_statements": 190 }, "webpack": { - "code": 2768 + "code": 2071 } } }, - "shared-components/loadingSpinner/index.js": { - "bundled": 1625, - "minified": 802, - "gzipped": 368, + "shared-components/checkbox/index.js": { + "bundled": 2188, + "minified": 1077, + "gzipped": 531, "treeshaked": { "rollup": { - "code": 239, - "import_statements": 194 + "code": 369, + "import_statements": 230 }, "webpack": { - "code": 1284 + "code": 2006 } } }, - "shared-components/button/deprecatedPropsHandler.js": { - "bundled": 466, - "minified": 339, - "gzipped": 213, + "shared-components/dropdown/desktopDropdown.js": { + "bundled": 9417, + "minified": 7800, + "gzipped": 3383, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 245, + "import_statements": 245 }, "webpack": { - "code": 951 + "code": 1469 } } }, - "shared-components/checkbox/index.js": { - "bundled": 2188, - "minified": 1077, - "gzipped": 531, + "shared-components/typography/index.js": { + "bundled": 59378, + "minified": 58060, + "gzipped": 3862, "treeshaked": { "rollup": { - "code": 369, - "import_statements": 230 + "code": 3046, + "import_statements": 119 }, "webpack": { - "code": 2006 + "code": 4232 } } }, - "shared-components/progressBar/index.js": { - "bundled": 2005, - "minified": 1082, - "gzipped": 521, + "shared-components/field/index.js": { + "bundled": 2775, + "minified": 1460, + "gzipped": 660, "treeshaked": { "rollup": { - "code": 412, - "import_statements": 326 + "code": 1250, + "import_statements": 399 }, "webpack": { - "code": 1513 + "code": 2545 } } }, - "utils/withDeprecationWarning/index.js": { - "bundled": 812, - "minified": 339, - "gzipped": 230, + "shared-components/toggle/style.js": { + "bundled": 6921, + "minified": 6691, + "gzipped": 2463, "treeshaked": { "rollup": { - "code": 44, - "import_statements": 44 + "code": 735, + "import_statements": 126 }, "webpack": { - "code": 1029 + "code": 1825 } } }, - "shared-components/typography/index.js": { - "bundled": 59378, - "minified": 58060, - "gzipped": 3862, + "_virtual/_rollupPluginBabelHelpers.js": { + "bundled": 5593, + "minified": 3899, + "gzipped": 1264, "treeshaked": { "rollup": { - "code": 3046, - "import_statements": 119 + "code": 0, + "import_statements": 0 }, "webpack": { - "code": 4232 + "code": 951 } } }, - "shared-components/tooltip/index.js": { - "bundled": 5385, - "minified": 2521, - "gzipped": 1024, + "shared-components/dialogModal/index.js": { + "bundled": 3417, + "minified": 1831, + "gzipped": 884, "treeshaked": { "rollup": { - "code": 639, - "import_statements": 438 + "code": 533, + "import_statements": 499 }, "webpack": { - "code": 1686 + "code": 1543 } } }, - "shared-components/button/shared-components/loader/index.js": { - "bundled": 856, - "minified": 452, - "gzipped": 270, + "shared-components/carousel/arrow/style.js": { + "bundled": 5005, + "minified": 4677, + "gzipped": 2054, "treeshaked": { "rollup": { - "code": 55, - "import_statements": 55 + "code": 1000, + "import_statements": 122 }, "webpack": { - "code": 1105 + "code": 2092 } } }, @@ -695,283 +681,311 @@ } } }, - "shared-components/button/shared-components/container/index.js": { - "bundled": 7040, - "minified": 6805, - "gzipped": 2030, + "shared-components/tabs/index.js": { + "bundled": 1365, + "minified": 775, + "gzipped": 414, "treeshaked": { "rollup": { - "code": 887, - "import_statements": 190 + "code": 320, + "import_statements": 223 }, "webpack": { - "code": 2071 + "code": 1366 } } }, - "shared-components/progressBar/style.js": { - "bundled": 7851, - "minified": 7395, - "gzipped": 2196, + "shared-components/callout/style.js": { + "bundled": 7501, + "minified": 7166, + "gzipped": 1608, "treeshaked": { "rollup": { - "code": 1495, - "import_statements": 258 + "code": 765, + "import_statements": 126 }, "webpack": { - "code": 2657 + "code": 1863 } } }, - "shared-components/button/components/textButton/style.js": { - "bundled": 1886, - "minified": 1743, - "gzipped": 1128, + "shared-components/dropdown/mobileDropdown.js": { + "bundled": 1572, + "minified": 749, + "gzipped": 420, "treeshaked": { "rollup": { - "code": 548, - "import_statements": 126 + "code": 116, + "import_statements": 116 }, "webpack": { - "code": 1636 + "code": 1236 } } }, - "shared-components/dropdown/desktopDropdown.js": { - "bundled": 9422, - "minified": 7805, - "gzipped": 3380, + "shared-components/carousel/arrow/index.js": { + "bundled": 1536, + "minified": 829, + "gzipped": 371, + "treeshaked": { + "rollup": { + "code": 183, + "import_statements": 183 + }, + "webpack": { + "code": 1350 + } + } + }, + "shared-components/button/shared-components/loader/index.js": { + "bundled": 856, + "minified": 452, + "gzipped": 270, "treeshaked": { "rollup": { - "code": 246, - "import_statements": 246 + "code": 55, + "import_statements": 55 }, "webpack": { - "code": 1474 + "code": 1105 } } }, - "shared-components/field/index.js": { - "bundled": 2775, - "minified": 1460, - "gzipped": 660, + "shared-components/selectorButton/index.js": { + "bundled": 10115, + "minified": 9113, + "gzipped": 2566, "treeshaked": { "rollup": { - "code": 1250, - "import_statements": 399 + "code": 604, + "import_statements": 435 }, "webpack": { - "code": 2545 + "code": 1659 } } }, - "shared-components/carousel/style.js": { - "bundled": 20339, - "minified": 19698, - "gzipped": 4811, + "shared-components/verificationMessages/index.js": { + "bundled": 1802, + "minified": 942, + "gzipped": 462, "treeshaked": { "rollup": { - "code": 3136, - "import_statements": 79 + "code": 367, + "import_statements": 312 }, "webpack": { - "code": 4187 + "code": 1444 } } }, - "shared-components/accordion/thumbnails/style.js": { - "bundled": 11587, - "minified": 11311, - "gzipped": 2350, + "shared-components/verificationMessages/formatMessage/index.js": { + "bundled": 527, + "minified": 358, + "gzipped": 216, "treeshaked": { "rollup": { - "code": 920, - "import_statements": 147 + "code": 60, + "import_statements": 60 }, "webpack": { - "code": 2030 + "code": 1110 } } }, - "_virtual/_rollupPluginBabelHelpers.js": { - "bundled": 5593, - "minified": 3899, - "gzipped": 1264, + "shared-components/loadingSpinner/style.js": { + "bundled": 9585, + "minified": 9204, + "gzipped": 2761, "treeshaked": { "rollup": { - "code": 0, - "import_statements": 0 + "code": 1413, + "import_statements": 158 }, "webpack": { - "code": 951 + "code": 2481 } } }, - "shared-components/banner/style.js": { - "bundled": 14602, - "minified": 14062, - "gzipped": 3327, + "shared-components/button/components/textButton/style.js": { + "bundled": 1886, + "minified": 1743, + "gzipped": 1128, "treeshaked": { "rollup": { - "code": 1593, - "import_statements": 282 + "code": 548, + "import_statements": 126 }, "webpack": { - "code": 2802 + "code": 1636 } } }, - "shared-components/button/components/textButton/index.js": { - "bundled": 1440, - "minified": 736, - "gzipped": 387, + "shared-components/toggle/index.js": { + "bundled": 1804, + "minified": 993, + "gzipped": 520, "treeshaked": { "rollup": { - "code": 267, - "import_statements": 235 + "code": 302, + "import_statements": 268 }, "webpack": { - "code": 1357 + "code": 1330 } } }, - "shared-components/carousel/index.js": { - "bundled": 5328, - "minified": 2239, - "gzipped": 1017, + "shared-components/progressBar/index.js": { + "bundled": 2005, + "minified": 1082, + "gzipped": 521, "treeshaked": { "rollup": { - "code": 1868, - "import_statements": 359 + "code": 412, + "import_statements": 326 }, "webpack": { - "code": 3227 + "code": 1513 } } }, - "shared-components/accordion/thumbnails/index.js": { - "bundled": 1158, - "minified": 568, - "gzipped": 295, + "shared-components/carousel/style.js": { + "bundled": 20339, + "minified": 19698, + "gzipped": 4811, "treeshaked": { "rollup": { - "code": 55, - "import_statements": 55 + "code": 3136, + "import_statements": 79 }, "webpack": { - "code": 1105 + "code": 4187 + } + } + }, + "utils/helperTransition/index.js": { + "bundled": 1617, + "minified": 1056, + "gzipped": 455, + "treeshaked": { + "rollup": { + "code": 154, + "import_statements": 154 + }, + "webpack": { + "code": 1278 } } }, - "shared-components/accordion/style.js": { - "bundled": 36006, - "minified": 34950, - "gzipped": 4790, + "shared-components/tabs/style.js": { + "bundled": 5295, + "minified": 5081, + "gzipped": 2411, "treeshaked": { "rollup": { - "code": 2701, - "import_statements": 220 + "code": 1094, + "import_statements": 326 }, "webpack": { - "code": 3885 + "code": 2323 } } }, - "constants/boxShadows/index.js": { - "bundled": 1688, - "minified": 1530, - "gzipped": 520, + "shared-components/button/components/textButton/index.js": { + "bundled": 1440, + "minified": 736, + "gzipped": 387, "treeshaked": { "rollup": { - "code": 916, - "import_statements": 162 + "code": 267, + "import_statements": 235 }, "webpack": { - "code": 2168 + "code": 1357 } } }, - "constants/mediaQueries/index.js": { - "bundled": 717, - "minified": 606, - "gzipped": 338, + "shared-components/offClickWrapper/index.js": { + "bundled": 1252, + "minified": 704, + "gzipped": 363, "treeshaked": { "rollup": { - "code": 365, - "import_statements": 206 + "code": 153, + "import_statements": 108 }, "webpack": { - "code": 1472 + "code": 1171 } } }, - "constants/colors/secondary.js": { - "bundled": 1490, - "minified": 1167, - "gzipped": 502, + "shared-components/loadingSpinner/index.js": { + "bundled": 1625, + "minified": 802, + "gzipped": 368, "treeshaked": { "rollup": { - "code": 1017, - "import_statements": 26 + "code": 239, + "import_statements": 194 }, "webpack": { - "code": 2011 + "code": 1284 } } }, - "shared-components/dropdown/mobileDropdown.js": { - "bundled": 1572, - "minified": 749, - "gzipped": 420, + "shared-components/dropdown/index.js": { + "bundled": 3810, + "minified": 1689, + "gzipped": 738, "treeshaked": { "rollup": { - "code": 116, - "import_statements": 116 + "code": 496, + "import_statements": 275 }, "webpack": { - "code": 1236 + "code": 1577 } } }, - "shared-components/radioButton/index.js": { - "bundled": 1994, - "minified": 1051, - "gzipped": 515, + "shared-components/accordion/thumbnails/index.js": { + "bundled": 1158, + "minified": 568, + "gzipped": 295, "treeshaked": { "rollup": { - "code": 369, - "import_statements": 230 + "code": 55, + "import_statements": 55 }, "webpack": { - "code": 1968 + "code": 1105 } } }, - "shared-components/loadingSpinner/style.js": { - "bundled": 9585, - "minified": 9204, - "gzipped": 2761, + "constants/mediaQueries/index.js": { + "bundled": 717, + "minified": 606, + "gzipped": 338, "treeshaked": { "rollup": { - "code": 1413, - "import_statements": 158 + "code": 365, + "import_statements": 206 }, "webpack": { - "code": 2481 + "code": 1472 } } }, - "shared-components/button/index.js": { - "bundled": 3730, - "minified": 1995, - "gzipped": 813, + "constants/themes/types.js": { + "bundled": 440, + "minified": 411, + "gzipped": 230, "treeshaked": { "rollup": { - "code": 1644, - "import_statements": 608 + "code": 278, + "import_statements": 204 }, "webpack": { - "code": 3012 + "code": 1385 } } }, @@ -989,262 +1003,234 @@ } } }, - "shared-components/dialogModal/index.js": { - "bundled": 3417, - "minified": 1831, - "gzipped": 884, - "treeshaked": { - "rollup": { - "code": 533, - "import_statements": 499 - }, - "webpack": { - "code": 1543 - } - } - }, - "shared-components/verificationMessages/formatMessage/index.js": { - "bundled": 527, - "minified": 358, - "gzipped": 216, - "treeshaked": { - "rollup": { - "code": 60, - "import_statements": 60 - }, - "webpack": { - "code": 1110 - } - } - }, - "shared-components/container/style.js": { - "bundled": 17313, - "minified": 16568, - "gzipped": 2878, + "shared-components/optionButton/style.js": { + "bundled": 38105, + "minified": 36924, + "gzipped": 4850, "treeshaked": { "rollup": { - "code": 1322, - "import_statements": 201 + "code": 2620, + "import_statements": 273 }, "webpack": { - "code": 2504 + "code": 3821 } } }, - "shared-components/toggle/style.js": { - "bundled": 6921, - "minified": 6691, - "gzipped": 2463, + "shared-components/progressBar/style.js": { + "bundled": 7851, + "minified": 7395, + "gzipped": 2196, "treeshaked": { "rollup": { - "code": 735, - "import_statements": 126 + "code": 1495, + "import_statements": 258 }, "webpack": { - "code": 1825 + "code": 2657 } } }, - "shared-components/alert/style.js": { - "bundled": 35145, - "minified": 34180, - "gzipped": 5189, + "shared-components/accordion/thumbnails/style.js": { + "bundled": 11577, + "minified": 11297, + "gzipped": 2344, "treeshaked": { "rollup": { - "code": 3041, - "import_statements": 390 + "code": 927, + "import_statements": 154 }, "webpack": { - "code": 4404 + "code": 2012 } } }, - "shared-components/chip/style.js": { - "bundled": 7256, - "minified": 6771, - "gzipped": 2590, + "constants/colors/index.js": { + "bundled": 5038, + "minified": 4069, + "gzipped": 1475, "treeshaked": { "rollup": { - "code": 1300, - "import_statements": 172 + "code": 2904, + "import_statements": 182 }, "webpack": { - "code": 2408 + "code": 4131 } } }, - "utils/helperTransition/index.js": { - "bundled": 1617, - "minified": 1056, - "gzipped": 455, + "shared-components/transitions/style.js": { + "bundled": 8240, + "minified": 7838, + "gzipped": 1877, "treeshaked": { "rollup": { - "code": 154, - "import_statements": 154 + "code": 761, + "import_statements": 213 }, "webpack": { - "code": 1278 + "code": 1975 } } }, "shared-components/button/components/linkButton/index.js": { - "bundled": 2830, - "minified": 1432, - "gzipped": 651, + "bundled": 2758, + "minified": 1414, + "gzipped": 642, "treeshaked": { "rollup": { - "code": 1138, + "code": 1120, "import_statements": 414 }, "webpack": { - "code": 2472 + "code": 2454 } } }, - "shared-components/dialogModal/style.js": { - "bundled": 15808, - "minified": 15583, - "gzipped": 3598, + "constants/colors/secondary.js": { + "bundled": 1156, + "minified": 991, + "gzipped": 442, "treeshaked": { "rollup": { - "code": 1798, - "import_statements": 255 + "code": 841, + "import_statements": 26 }, "webpack": { - "code": 3024 + "code": 1835 } } }, - "shared-components/tabs/style.js": { - "bundled": 5300, - "minified": 5086, - "gzipped": 2407, + "constants/boxShadows/index.js": { + "bundled": 1730, + "minified": 1572, + "gzipped": 530, "treeshaked": { "rollup": { - "code": 1095, - "import_statements": 327 + "code": 918, + "import_statements": 164 }, "webpack": { - "code": 2328 + "code": 2170 } } }, - "shared-components/tabs/index.js": { - "bundled": 1365, - "minified": 775, - "gzipped": 414, + "icons/icons/svgs/CrossIcon.js": { + "bundled": 498, + "minified": 427, + "gzipped": 304, "treeshaked": { "rollup": { - "code": 320, - "import_statements": 223 + "code": 84, + "import_statements": 84 }, "webpack": { - "code": 1366 + "code": 1141 } } }, - "shared-components/carousel/arrow/index.js": { - "bundled": 1536, - "minified": 829, - "gzipped": 371, + "shared-components/chip/style.js": { + "bundled": 7239, + "minified": 6754, + "gzipped": 2593, "treeshaked": { "rollup": { - "code": 183, - "import_statements": 183 + "code": 1295, + "import_statements": 172 }, "webpack": { - "code": 1350 + "code": 2403 } } }, - "shared-components/offClickWrapper/index.js": { - "bundled": 1252, - "minified": 704, - "gzipped": 363, + "shared-components/dialogModal/style.js": { + "bundled": 15808, + "minified": 15583, + "gzipped": 3598, "treeshaked": { "rollup": { - "code": 153, - "import_statements": 108 + "code": 1798, + "import_statements": 255 }, "webpack": { - "code": 1171 + "code": 3024 } } }, - "shared-components/callout/style.js": { - "bundled": 7538, - "minified": 7203, - "gzipped": 1632, + "shared-components/button/components/roundButton/index.js": { + "bundled": 3706, + "minified": 1962, + "gzipped": 805, "treeshaked": { "rollup": { - "code": 770, - "import_statements": 126 + "code": 1535, + "import_statements": 623 }, "webpack": { - "code": 1868 + "code": 2893 } } }, - "shared-components/dropdown/index.js": { - "bundled": 3810, - "minified": 1689, - "gzipped": 738, + "shared-components/accordion/style.js": { + "bundled": 36046, + "minified": 34990, + "gzipped": 4796, "treeshaked": { "rollup": { - "code": 496, - "import_statements": 275 + "code": 2705, + "import_statements": 220 }, "webpack": { - "code": 1577 + "code": 3889 } } }, - "shared-components/dropdown/style.js": { - "bundled": 44185, - "minified": 43006, - "gzipped": 5906, + "shared-components/container/style.js": { + "bundled": 17296, + "minified": 16551, + "gzipped": 2909, "treeshaked": { "rollup": { - "code": 2644, - "import_statements": 241 + "code": 1321, + "import_statements": 201 }, "webpack": { - "code": 3865 + "code": 2503 } } }, - "shared-components/optionButton/style.js": { - "bundled": 38105, - "minified": 36924, - "gzipped": 4850, + "icons/icons/svgs/ArrowRightIcon.js": { + "bundled": 475, + "minified": 404, + "gzipped": 307, "treeshaked": { "rollup": { - "code": 2620, - "import_statements": 273 + "code": 84, + "import_statements": 84 }, "webpack": { - "code": 3821 + "code": 1141 } } }, - "shared-components/carousel/arrow/style.js": { - "bundled": 5005, - "minified": 4677, - "gzipped": 2054, + "shared-components/tooltip/index.js": { + "bundled": 5385, + "minified": 2521, + "gzipped": 1024, "treeshaked": { "rollup": { - "code": 1000, - "import_statements": 122 + "code": 639, + "import_statements": 438 }, "webpack": { - "code": 2092 + "code": 1686 } } }, "index.js": { "bundled": 2185, "minified": 2005, - "gzipped": 465, + "gzipped": 466, "treeshaked": { "rollup": { "code": 1472, @@ -1255,24 +1241,24 @@ } } }, - "shared-components/selectorButton/index.js": { - "bundled": 10115, - "minified": 9113, - "gzipped": 2566, + "shared-components/dropdown/style.js": { + "bundled": 44091, + "minified": 42912, + "gzipped": 5892, "treeshaked": { "rollup": { - "code": 604, - "import_statements": 435 + "code": 2634, + "import_statements": 241 }, "webpack": { - "code": 1659 + "code": 3855 } } }, - "icons/icons/svgs/ArrowRightIcon.js": { - "bundled": 475, - "minified": 404, - "gzipped": 307, + "icons/icons/svgs/ArrowLeftIcon.js": { + "bundled": 465, + "minified": 394, + "gzipped": 300, "treeshaked": { "rollup": { "code": 84, @@ -1283,24 +1269,10 @@ } } }, - "constants/themes/types.js": { - "bundled": 440, - "minified": 411, - "gzipped": 230, - "treeshaked": { - "rollup": { - "code": 278, - "import_statements": 204 - }, - "webpack": { - "code": 1385 - } - } - }, - "icons/icons/svgs/ArrowLeftIcon.js": { - "bundled": 465, - "minified": 394, - "gzipped": 300, + "icons/icons/svgs/Arrow.js": { + "bundled": 430, + "minified": 359, + "gzipped": 281, "treeshaked": { "rollup": { "code": 84, @@ -1311,52 +1283,52 @@ } } }, - "shared-components/transitions/style.js": { - "bundled": 8240, - "minified": 7838, - "gzipped": 1877, + "constants/colors/primary.js": { + "bundled": 1146, + "minified": 981, + "gzipped": 464, "treeshaked": { "rollup": { - "code": 761, - "import_statements": 213 + "code": 841, + "import_statements": 26 }, "webpack": { - "code": 1975 + "code": 1835 } } }, - "constants/colors/primary.js": { - "bundled": 1872, - "minified": 1566, - "gzipped": 520, + "shared-components/field/style.js": { + "bundled": 34937, + "minified": 34194, + "gzipped": 4747, "treeshaked": { "rollup": { - "code": 1214, - "import_statements": 52 + "code": 2496, + "import_statements": 254 }, "webpack": { - "code": 2327 + "code": 3720 } } }, - "constants/colors/index.js": { - "bundled": 5038, - "minified": 4069, - "gzipped": 1475, + "shared-components/carousel/index.js": { + "bundled": 5328, + "minified": 2239, + "gzipped": 1017, "treeshaked": { "rollup": { - "code": 2904, - "import_statements": 182 + "code": 1868, + "import_statements": 359 }, "webpack": { - "code": 4131 + "code": 3227 } } }, "shared-components/button/shared-components/loader/style.js": { "bundled": 6670, "minified": 5901, - "gzipped": 2570, + "gzipped": 2568, "treeshaked": { "rollup": { "code": 1710, @@ -1367,115 +1339,101 @@ } } }, - "shared-components/selectorButton/style.js": { - "bundled": 23656, - "minified": 22922, - "gzipped": 4162, - "treeshaked": { - "rollup": { - "code": 2157, - "import_statements": 172 - }, - "webpack": { - "code": 3294 - } - } - }, - "shared-components/button/components/roundButton/index.js": { - "bundled": 3778, - "minified": 1980, - "gzipped": 811, + "shared-components/button/components/roundButton/style.js": { + "bundled": 25574, + "minified": 24267, + "gzipped": 4798, "treeshaked": { "rollup": { - "code": 1553, - "import_statements": 623 + "code": 594, + "import_statements": 186 }, "webpack": { - "code": 2911 + "code": 1764 } } }, - "shared-components/field/style.js": { - "bundled": 34905, - "minified": 34162, - "gzipped": 4783, + "icons/icons/svgs/ChevronIcon.js": { + "bundled": 452, + "minified": 381, + "gzipped": 285, "treeshaked": { "rollup": { - "code": 2492, - "import_statements": 254 + "code": 84, + "import_statements": 84 }, "webpack": { - "code": 3716 + "code": 1141 } } }, - "icons/icons/svgs/CrossIcon.js": { - "bundled": 498, - "minified": 427, - "gzipped": 304, + "shared-components/icon/index.js": { + "bundled": 1924, + "minified": 1065, + "gzipped": 512, "treeshaked": { "rollup": { - "code": 84, - "import_statements": 84 + "code": 346, + "import_statements": 221 }, "webpack": { - "code": 1141 + "code": 1933 } } }, - "shared-components/button/components/roundButton/style.js": { - "bundled": 28663, - "minified": 26957, - "gzipped": 5167, + "shared-components/selectorButton/style.js": { + "bundled": 23656, + "minified": 22922, + "gzipped": 4162, "treeshaked": { "rollup": { - "code": 594, - "import_statements": 186 + "code": 2157, + "import_statements": 172 }, "webpack": { - "code": 1764 + "code": 3294 } } }, - "shared-components/icon/index.js": { - "bundled": 1924, - "minified": 1065, - "gzipped": 512, + "shared-components/tooltip/style.js": { + "bundled": 113561, + "minified": 111686, + "gzipped": 8309, "treeshaked": { "rollup": { - "code": 346, - "import_statements": 221 + "code": 3213, + "import_statements": 162 }, "webpack": { - "code": 1933 + "code": 4402 } } }, - "icons/icons/svgs/ErrorIcon.js": { - "bundled": 836, - "minified": 753, - "gzipped": 470, + "shared-components/alert/style.js": { + "bundled": 35145, + "minified": 34180, + "gzipped": 5189, "treeshaked": { "rollup": { - "code": 84, - "import_statements": 84 + "code": 3041, + "import_statements": 390 }, "webpack": { - "code": 1141 + "code": 4404 } } }, - "icons/icons/svgs/Arrow.js": { - "bundled": 430, - "minified": 359, - "gzipped": 281, + "shared-components/button/style.js": { + "bundled": 35880, + "minified": 34012, + "gzipped": 6753, "treeshaked": { "rollup": { - "code": 84, - "import_statements": 84 + "code": 4652, + "import_statements": 308 }, "webpack": { - "code": 1141 + "code": 6094 } } }, @@ -1493,10 +1451,10 @@ } } }, - "icons/icons/svgs/CircleSolidIcon.js": { - "bundled": 474, - "minified": 379, - "gzipped": 275, + "icons/icons/svgs/ErrorIcon.js": { + "bundled": 836, + "minified": 753, + "gzipped": 470, "treeshaked": { "rollup": { "code": 84, @@ -1507,10 +1465,10 @@ } } }, - "icons/icons/svgs/ChevronIcon.js": { - "bundled": 452, - "minified": 381, - "gzipped": 285, + "icons/icons/svgs/CircleSolidIcon.js": { + "bundled": 474, + "minified": 379, + "gzipped": 275, "treeshaked": { "rollup": { "code": 84, @@ -1521,31 +1479,31 @@ } } }, - "shared-components/button/style.js": { - "bundled": 35866, - "minified": 33998, - "gzipped": 6763, + "shared-components/alert/index.js": { + "bundled": 5684, + "minified": 2498, + "gzipped": 1098, "treeshaked": { "rollup": { - "code": 4650, - "import_statements": 308 + "code": 2019, + "import_statements": 636 }, "webpack": { - "code": 6092 + "code": 3554 } } }, "shared-components/immersiveModal/style.js": { - "bundled": 103152, - "minified": 101936, - "gzipped": 7724, + "bundled": 103147, + "minified": 101931, + "gzipped": 7727, "treeshaked": { "rollup": { - "code": 4482, - "import_statements": 408 + "code": 4481, + "import_statements": 407 }, "webpack": { - "code": 5865 + "code": 5860 } } }, @@ -1563,45 +1521,73 @@ } } }, - "shared-components/tooltip/style.js": { - "bundled": 113561, - "minified": 111686, - "gzipped": 8309, + "icons/icons/svgs/InfoIcon.js": { + "bundled": 478, + "minified": 407, + "gzipped": 307, "treeshaked": { "rollup": { - "code": 3213, - "import_statements": 162 + "code": 84, + "import_statements": 84 }, "webpack": { - "code": 4402 + "code": 1141 } } }, - "shared-components/alert/index.js": { - "bundled": 5684, - "minified": 2498, - "gzipped": 1098, + "shared-components/banner/index.js": { + "bundled": 1437, + "minified": 911, + "gzipped": 440, "treeshaked": { "rollup": { - "code": 2019, - "import_statements": 636 + "code": 426, + "import_statements": 353 }, "webpack": { - "code": 3554 + "code": 1578 } } }, - "icons/icons/svgs/InfoIcon.js": { - "bundled": 478, - "minified": 407, - "gzipped": 307, + "icons/icons/arrow.js": { + "bundled": 209, + "minified": 177, + "gzipped": 148, "treeshaked": { "rollup": { - "code": 84, - "import_statements": 84 + "code": 66, + "import_statements": 66 }, "webpack": { - "code": 1141 + "code": 1087 + } + } + }, + "constants/typography/primaryTypography.js": { + "bundled": 391, + "minified": 254, + "gzipped": 185, + "treeshaked": { + "rollup": { + "code": 0, + "import_statements": 0 + }, + "webpack": { + "code": 951 + } + } + }, + "shared-components/banner/style.js": { + "bundled": 14597, + "minified": 14057, + "gzipped": 3329, + "treeshaked": { + "rollup": { + "code": 1592, + "import_statements": 281 + }, + "webpack": { + "code": 2797 } } } diff --git a/src/constants/boxShadows/index.ts b/src/constants/boxShadows/index.ts index f45be726a..b59499dc5 100644 --- a/src/constants/boxShadows/index.ts +++ b/src/constants/boxShadows/index.ts @@ -3,17 +3,18 @@ */ import { transparentize } from '../../utils'; -import COLORS from '../colors'; +// TODO: Add theme support for box shadow +import PRIMARY_COLORS from '../colors/primary'; -const boxShadowColor = `${COLORS.primary}`; +const boxShadowColor = `${PRIMARY_COLORS.primary}`; const boxShadowOverlayColor = '#505050'; export const BASE_CONFIG = { clickable: `0px 8px 24px rgba(52, 51, 82, 0.05)`, clickableHover: `0px 8px 24px rgba(52, 51, 82, 0.10)`, message: `0 12px 20px 0 ${transparentize(boxShadowColor, 0.05)}`, - focus: `0px 0px 0px 2px ${COLORS.white}, 0px 0px 0px 4px ${COLORS.primary}`, - focusInner: `inset 0px 0px 0px 2px ${COLORS.primary}`, + focus: `0px 0px 0px 2px ${PRIMARY_COLORS.white}, 0px 0px 0px 4px ${PRIMARY_COLORS.primary}`, + focusInner: `inset 0px 0px 0px 2px ${PRIMARY_COLORS.primary}`, } as const; export const OLD_BASE_CONFIG = { diff --git a/src/constants/colors/index.ts b/src/constants/colors/index.ts deleted file mode 100644 index e676a1c65..000000000 --- a/src/constants/colors/index.ts +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Note: Each config is exported separately to be rendered in storybook: - * https://github.com/PocketDerm/PocketDerm/blob/master/resources/assets/component-library/stories/colors/index.js#L5 - */ - -import PropTypes from 'prop-types'; - -import { withDeprecationWarning } from '../../utils'; - -const DEFAULT = '#706D87'; -const DEFAULT_BACKGROUND = '#ededf0'; -const DEFAULT_BORDER = '#e1e0e6'; - -export const brandColors = { - // Primary 1 - purple100: '#332e54', - purple85: '#524D6E', - purple70: DEFAULT, - purple30: '#c3c0cd', - purple15: DEFAULT_BORDER, - purple10: DEFAULT_BACKGROUND, - purple4: '#f8f8fa', - - // Primary 2 - lavender100: '#a6a1e2', - lavender80: '#b8b4e8', - lavender60: '#cac7ee', - lavender10: '#efeef7', - - // Secondary - brown: '#b76706', - green: '#6c9d4b', - greenLight: '#cad1b4', - peach: '#efd4c7', - red: '#ff5e4d', - - // Status - statusGreen: '#2B6E33', - statusGreenBackground: '#EAF1EB', - statusGreenBorder: '#DFE9E0', - statusPurple: '#554CB3', - statusPurpleBackground: '#EEEDF7', - statusPurpleBorder: '#E5E3F3', - statusRed: '#BD200F', - statusRedBackground: '#F7EAE8', - statusRedBorder: '#F3DEDC', - statusGrey: DEFAULT, - statusGreyBackground: DEFAULT_BACKGROUND, - statusGreyBorder: DEFAULT_BORDER, - - // Misc - black: '#000000', - white: '#ffffff', - yellow: '#eed153', - facebookBlue: '#305c99', -} as const; - -export const legacyColors = { - charcoal: '#353a39', - grey1: '#999999', // numbers go from darkest to lightest - orange: '#fc7b65', - teal: '#d5e9e5', - yellowLight: '#f4f2b0', - purple80: '#5C5876', - purple60: '#858298', -} as const; - -export const colorAliases = { - // Legacy - purple: brandColors.purple100, - purpleTint1: brandColors.purple85, - purpleTint2: brandColors.purple70, - - // brand colors - primary: brandColors.purple100, - primaryTint1: brandColors.purple85, - primaryTint2: brandColors.purple70, - primaryTint3: brandColors.purple30, - primaryTint4: brandColors.purple15, - secondary: brandColors.lavender100, - tertiary: brandColors.purple4, - - // general colors - success: brandColors.statusGreen, - successBackground: brandColors.statusGreenBackground, - successBorder: brandColors.statusGreenBorder, - info: brandColors.statusPurple, - infoBackground: brandColors.statusPurpleBackground, - infoBorder: brandColors.statusPurpleBorder, - error: brandColors.statusRed, - errorBackground: brandColors.statusRedBackground, - errorBorder: brandColors.statusRedBorder, - default: brandColors.purple70, - defaultBackground: brandColors.purple10, - defaultBorder: brandColors.purple15, - accent: brandColors.red, - disabled: brandColors.purple10, - failure: brandColors.red, - hover: brandColors.purple4, - warning: legacyColors.yellowLight, - - // ui colors - background: brandColors.purple4, - backgroundDark: brandColors.purple4, - border: brandColors.purple10, - divider: brandColors.purple10, - - // form colors - radioBorder: brandColors.purple30, - radioBorderSelected: brandColors.lavender100, - - // typography - textMuted: brandColors.purple70, - textGhost: brandColors.purple30, - textDisabled: brandColors.purple30, - - // overlay - overlay: 'rgba(45, 45, 48, 0.7)', - overlayHidden: 'rgba(45, 45, 48, 0)', - overlaySolid: 'rgba(45, 45, 48, 1)', - overlayTransition: 'rgba(45, 45, 48, 0.3)', -} as const; - -export const postcardColors = { - postcardSocialBg: '#f2f2f2', - postcardWhite: brandColors.purple4, - postcardGreen: '#b8dca6', - postcardBlue: '#cae9f1', - postcardNude: '#e0c2b1', - postcardPeach: '#ffd3b0', - postcardOrange: legacyColors.orange, - postcardBlack: '#414141', - postcardGrey: '#bfc6cb', - postcardYellow: brandColors.yellow, -} as const; - -// Dont change these keys -- will affect treatment page guide colors -export const guideColors = { - sunscreenGuide: '#fcf4d5', - bigZitsGuide: '#f3d7be', - birthControlGuide: '#d0eae5', - oilySkinGuide: '#bdc5cb', - dietGuide: '#efd5ca', - drySkinGuide: '#f3f1a4', - makeupGuide: '#f7a9b7', - azelaicAcidGuide: '#9ddcc5', - vitaminCGuide: '#f5c065', - tretinoinGuide: '#d2c8b0', - niacinamideGuide: '#f2a486', - clindamycinGuide: '#bad383', - zincPyrithioneGuide: '#83c6e3', - ourFavoriteMoisturizersGuide: '#a7a0cf', - recommendedCleansersGuide: '#cad1b5', -} as const; - -const sharedColors = { - ...brandColors, - ...colorAliases, - ...postcardColors, - ...guideColors, -} as const; - -const colorsCompilation = { - ...sharedColors, - ...legacyColors, -} as const; - -const deprecatedProperties = { - purple80: 'purple80 is deprecated. Use purple85 instead', - purple60: 'purple60 is deprecated. Use purple70 instead', -} as const; - -// Do not include deprecated properties in PropTypes or it will trigger warning -// eslint-disable-next-line -const { purple80, purple60, ...allOtherLegacyColors } = legacyColors; - -const NON_DEPRECATED_COLORS = { - ...sharedColors, - ...allOtherLegacyColors, -} as const; - -export const COLORS_PROP_TYPES = PropTypes.oneOf( - Object.values(NON_DEPRECATED_COLORS), -); - -export default withDeprecationWarning(colorsCompilation, deprecatedProperties); diff --git a/src/constants/colors/primary.ts b/src/constants/colors/primary.ts index 966a42d89..2abc2dda0 100644 --- a/src/constants/colors/primary.ts +++ b/src/constants/colors/primary.ts @@ -1,65 +1,41 @@ import PropTypes from 'prop-types'; -import COLORS from '.'; - const PRIMARY_COLORS = { - // brand colors - primary: COLORS.purple100, - primaryTint1: COLORS.purple85, - primaryTint2: COLORS.purple70, - primaryTint3: COLORS.purple30, - primaryTint4: COLORS.purple15, - secondary: COLORS.lavender100, - secondaryTint1: COLORS.lavender80, - secondaryTint2: COLORS.lavender60, - secondaryTint3: COLORS.lavender10, - secondaryTint4: COLORS.lavender10, - tertiary: COLORS.purple4, - tertiaryTint1: COLORS.purple4, - tertiaryTint2: COLORS.purple4, - tertiaryTint3: COLORS.purple4, - tertiaryTint4: COLORS.purple4, - - // general colors - success: COLORS.statusGreen, - successBackground: COLORS.statusGreenBackground, - successBorder: COLORS.statusGreenBorder, - info: COLORS.statusPurple, - infoBackground: COLORS.statusPurpleBackground, - infoBorder: COLORS.statusPurpleBorder, - error: COLORS.statusRed, - errorBackground: COLORS.statusRedBackground, - errorBorder: COLORS.statusRedBorder, - default: COLORS.purple70, - defaultBackground: COLORS.purple10, - defaultBorder: COLORS.purple15, - accent: COLORS.red, - disabled: COLORS.purple10, - failure: COLORS.red, - hover: COLORS.purple4, - warning: COLORS.yellowLight, - - // ui colors - background: COLORS.purple4, - backgroundDark: COLORS.purple4, - border: COLORS.purple10, - divider: COLORS.purple10, - - // form colors - radioBorder: COLORS.purple30, - radioBorderSelected: COLORS.lavender100, - - // typography - textMuted: COLORS.purple70, - textGhost: COLORS.purple30, - textDisabled: COLORS.purple30, - - // overlay + primary: '#332E54', + primaryTint1: '#524D6E', + primaryTint2: '#706D87', + primaryTint3: '#C3C0CD', + primaryTint4: '#E1E0E6', + secondary: '#A6A1E2', + secondaryTint1: '#B8B4E8', + secondaryTint2: '#CAC7EE', + secondaryTint3: '#EFEEF7', + secondaryTint4: '#EFEEF7', + tertiary: '#F8F8FA', + tertiaryTint1: '#F8F8FA', + tertiaryTint2: '#F8F8FA', + tertiaryTint3: '#F8F8FA', + tertiaryTint4: '#F8F8FA', + default: '#706D87', + defaultLight: '#EDEDF0', + defaultBorder: '#E1E0E6', + success: '#2B6E33', + successLight: '#EAF1EB', + successBorder: '#DFE9E0', + error: '#BD200F', + errorLight: '#F7EAE8', + errorBorder: '#F3DEDC', + info: '#554CB3', + infoLight: '#EEEDF7', + infoBorder: '#E5E3F3', + background: '#F8F8FA', + backgroundDark: '#F8F8FA', overlay: 'rgba(45, 45, 48, 0.7)', - overlaySolid: 'rgba(45, 45, 48, 1)', - - black: COLORS.black, - white: COLORS.white, + overlaySolid: '#2D2D30', + border: '#EDEDF0', + textDisabled: '#C3C0CD', + black: '#000000', + white: '#FFFFFF', transparent: 'transparent', } as const; diff --git a/src/constants/colors/secondary.ts b/src/constants/colors/secondary.ts index c2681477d..6ba1518f6 100644 --- a/src/constants/colors/secondary.ts +++ b/src/constants/colors/secondary.ts @@ -1,7 +1,6 @@ import PropTypes from 'prop-types'; const SECONDARY_COLORS = { - // brand colors primary: '#2D2926', primaryTint1: '#2D2926', primaryTint2: '#2D2926', @@ -17,45 +16,24 @@ const SECONDARY_COLORS = { tertiaryTint2: '#E5E2DF', tertiaryTint3: '#F2F0EF', tertiaryTint4: '#F2F0EF', - - // general colors + default: '#2C2A25', + defaultLight: '#F0EEEC', + defaultBorder: '#F0EEEC', success: '#406237', - successBackground: '#ECEFEB', + successLight: '#ECEFEB', successBorder: '#ECEFEB', - info: '#2C2A25', - infoBackground: '#FDF9D3', - infoBorder: '#FDF9D3', error: '#A33F29', - errorBackground: '#F6ECEA', + errorLight: '#F6ECEA', errorBorder: '#F6ECEA', - default: '#2C2A25', - defaultBackground: '#F0EEEC', - defaultBorder: '#F0EEEC', - accent: '#F0EEEC', - disabled: '', - failure: '', - hover: '', - warning: '', - - // ui colors + info: '#2C2A25', + infoLight: '#FDF9D3', + infoBorder: '#FDF9D3', background: '#FFFDF2', backgroundDark: '#C4BFB7', - border: '#E5E2DF', - divider: '#E5E2DF', - - // form colors - radioBorder: '', - radioBorderSelected: '', - - // typography - textMuted: '#2D2926', - textGhost: '#CBC5BF', // TODO: Delete? - textDisabled: '#CBC5BF', - - // overlay overlay: 'rgba(45, 41, 38, 0.7)', overlaySolid: '#2D2926', - + border: '#E5E2DF', + textDisabled: '#CBC5BF', black: '#2D2926', white: '#FFFDF2', transparent: 'transparent', diff --git a/src/constants/index.ts b/src/constants/index.ts index a4015eb98..07e634204 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -1,8 +1,6 @@ export { default as ANIMATION } from './animation'; export { default as BOX_SHADOWS } from './boxShadows'; export { default as BREAKPOINTS } from './breakpoints'; -// TODO: Remove once all consumer usage is using theming -export { default as COLORS } from './colors'; export { default as FONTS } from './fonts'; export { default as GRID } from './grid'; export { default as LAYOUT } from './layout'; diff --git a/src/shared-components/accordion/__snapshots__/test.tsx.snap b/src/shared-components/accordion/__snapshots__/test.tsx.snap index 0a06112d0..e0b4863a4 100644 --- a/src/shared-components/accordion/__snapshots__/test.tsx.snap +++ b/src/shared-components/accordion/__snapshots__/test.tsx.snap @@ -25,7 +25,7 @@ exports[` renders disabled accordion 1`] = ` -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); - color: #332e54; + color: #332E54; -webkit-transition: color 350ms,-webkit-transform 350ms; -webkit-transition: color 350ms,transform 350ms; transition: color 350ms,transform 350ms; @@ -39,11 +39,11 @@ exports[` renders disabled accordion 1`] = ` } .emotion-9 { - border: 1px solid #ededf0; + border: 1px solid #EDEDF0; width: 100%; opacity: 0.4; - background-color: #ededf0; - border-color: #c3c0cd; + background-color: #EDEDF0; + border-color: #C3C0CD; } .emotion-9:not(:last-child) { @@ -64,7 +64,7 @@ exports[` renders disabled accordion 1`] = ` .emotion-5:focus { outline: none; - box-shadow: inset 0px 0px 0px 2px #332e54; + box-shadow: inset 0px 0px 0px 2px #332E54; } .emotion-10:last-of-type .emotion-5:focus { @@ -98,7 +98,7 @@ exports[` renders disabled accordion 1`] = ` > renders no border accordion 1`] = ` .emotion-5:focus { outline: none; - box-shadow: inset 0px 0px 0px 2px #332e54; + box-shadow: inset 0px 0px 0px 2px #332E54; } .emotion-10:last-of-type .emotion-5:focus { @@ -172,7 +172,7 @@ exports[` renders no border accordion 1`] = ` -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); - color: #332e54; + color: #332E54; -webkit-transition: color 350ms,-webkit-transform 350ms; -webkit-transition: color 350ms,transform 350ms; transition: color 350ms,transform 350ms; @@ -219,7 +219,7 @@ exports[` renders no border accordion 1`] = ` > renders no border accordion 1`] = ` exports[` renders regular accordion 1`] = ` .emotion-9 { - border: 1px solid #ededf0; + border: 1px solid #EDEDF0; width: 100%; } @@ -270,7 +270,7 @@ exports[` renders regular accordion 1`] = ` .emotion-5:focus { outline: none; - box-shadow: inset 0px 0px 0px 2px #332e54; + box-shadow: inset 0px 0px 0px 2px #332E54; } .emotion-10:last-of-type .emotion-5:focus { @@ -302,7 +302,7 @@ exports[` renders regular accordion 1`] = ` -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); - color: #332e54; + color: #332E54; -webkit-transition: color 350ms,-webkit-transform 350ms; -webkit-transition: color 350ms,transform 350ms; transition: color 350ms,transform 350ms; @@ -341,7 +341,7 @@ exports[` renders regular accordion 1`] = ` > UI snapshot render with size large styles 1`] = ` .emotion-0 { height: 80px; width: 80px; - background-color: #a6a1e2; + background-color: #A6A1E2; border-radius: 50%; overflow: hidden; } @@ -20,7 +20,7 @@ exports[` UI snapshot render with size medium styles 1`] = ` .emotion-0 { height: 48px; width: 48px; - background-color: #a6a1e2; + background-color: #A6A1E2; border-radius: 50%; overflow: hidden; } @@ -36,7 +36,7 @@ exports[` UI snapshot renders the component with default props 1`] = ` .emotion-0 { height: 32px; width: 32px; - background-color: #a6a1e2; + background-color: #A6A1E2; border-radius: 50%; overflow: hidden; } diff --git a/src/shared-components/banner/__snapshots__/test.tsx.snap b/src/shared-components/banner/__snapshots__/test.tsx.snap index da945bc1b..b28621133 100644 --- a/src/shared-components/banner/__snapshots__/test.tsx.snap +++ b/src/shared-components/banner/__snapshots__/test.tsx.snap @@ -18,14 +18,14 @@ exports[`Banner UI snapshots renders error type and text 1`] = ` -webkit-box-align: flex-start; -ms-flex-align: flex-start; align-items: flex-start; - color: #ffffff; + color: #FFFFFF; font-size: 0.875rem; } .emotion-1 svg { height: 1rem; width: 1rem; - fill: #ffffff; + fill: #FFFFFF; } .emotion-0 { @@ -33,7 +33,7 @@ exports[`Banner UI snapshots renders error type and text 1`] = ` -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); - color: #ffffff; + color: #FFFFFF; -webkit-transition: color 350ms,-webkit-transform 350ms; -webkit-transition: color 350ms,transform 350ms; transition: color 350ms,transform 350ms; @@ -58,7 +58,7 @@ exports[`Banner UI snapshots renders error type and text 1`] = ` .emotion-7:focus { outline: none; - box-shadow: 0px 0px 0px 2px #ffffff,0px 0px 0px 4px #332e54; + box-shadow: 0px 0px 0px 2px #FFFFFF,0px 0px 0px 4px #332E54; } @media (min-width:768px) { @@ -79,7 +79,7 @@ exports[`Banner UI snapshots renders error type and text 1`] = ` > UI snapshots renders with props 1`] = ` transition: all 350ms ease-in-out; -webkit-text-decoration: none; text-decoration: none; - background-color: #ededf0; - border-color: #ededf0; - color: #c3c0cd; + background-color: #EDEDF0; + border-color: #EDEDF0; + color: #C3C0CD; cursor: not-allowed; - fill: #c3c0cd; + fill: #C3C0CD; min-width: 208px; max-width: 325px; width: -webkit-max-content; @@ -138,13 +138,13 @@ exports[` UI snapshots renders with props 1`] = ` .emotion-7:active, .emotion-7:focus { outline: none; - box-shadow: 0px 0px 0px 2px #ffffff,0px 0px 0px 4px #332e54; + box-shadow: 0px 0px 0px 2px #FFFFFF,0px 0px 0px 4px #332E54; } .emotion-7:visited, .emotion-7:hover { opacity: 1; - color: #c3c0cd; + color: #C3C0CD; } .emotion-3 { diff --git a/src/shared-components/button/components/linkButton/__snapshots__/test.tsx.snap b/src/shared-components/button/components/linkButton/__snapshots__/test.tsx.snap index 79a6931af..814e42b08 100644 --- a/src/shared-components/button/components/linkButton/__snapshots__/test.tsx.snap +++ b/src/shared-components/button/components/linkButton/__snapshots__/test.tsx.snap @@ -28,10 +28,10 @@ exports[` UI snapshots renders with props 1`] = ` transition: all 350ms ease-in-out; -webkit-text-decoration: none; text-decoration: none; - background-color: #332e54; - border-color: #332e54; - color: #ffffff; - fill: #ffffff; + background-color: #332E54; + border-color: #332E54; + color: #FFFFFF; + fill: #FFFFFF; min-width: 208px; max-width: 325px; width: -webkit-max-content; @@ -47,7 +47,7 @@ exports[` UI snapshots renders with props 1`] = ` .emotion-4:active, .emotion-4:focus { outline: none; - box-shadow: 0px 0px 0px 2px #ffffff,0px 0px 0px 4px #332e54; + box-shadow: 0px 0px 0px 2px #FFFFFF,0px 0px 0px 4px #332E54; } .emotion-4:visited, @@ -58,7 +58,7 @@ exports[` UI snapshots renders with props 1`] = ` .emotion-4:focus, .emotion-4:not([href]):not([tabindex]):hover, .emotion-4:not([href]):not([tabindex]):focus { - color: #ffffff; + color: #FFFFFF; } .emotion-2 { diff --git a/src/shared-components/button/components/linkButton/index.tsx b/src/shared-components/button/components/linkButton/index.tsx index 19d1bc0cb..44b8f3e5f 100644 --- a/src/shared-components/button/components/linkButton/index.tsx +++ b/src/shared-components/button/components/linkButton/index.tsx @@ -45,7 +45,7 @@ export const LinkButton = ({ children, disabled = false, onClick = () => undefined, - textColor = '', + textColor, ...rest }: LinkProps) => { const theme = useTheme(); diff --git a/src/shared-components/button/components/linkButton/style.ts b/src/shared-components/button/components/linkButton/style.ts index 701fd0d80..96df354a4 100644 --- a/src/shared-components/button/components/linkButton/style.ts +++ b/src/shared-components/button/components/linkButton/style.ts @@ -14,7 +14,7 @@ export const linkButtonStyles = ({ disabled: boolean; buttonType: ButtonType; buttonColor: ThemeColors; - textColor: ThemeColors; + textColor?: ThemeColors; theme: ThemeType; }) => css` ${baseButtonStyles({ diff --git a/src/shared-components/button/components/roundButton/__snapshots__/test.tsx.snap b/src/shared-components/button/components/roundButton/__snapshots__/test.tsx.snap index b9d80169a..f2a418810 100644 --- a/src/shared-components/button/components/roundButton/__snapshots__/test.tsx.snap +++ b/src/shared-components/button/components/roundButton/__snapshots__/test.tsx.snap @@ -136,11 +136,11 @@ exports[` UI snapshots renders with props 1`] = ` transition: all 350ms ease-in-out; -webkit-text-decoration: none; text-decoration: none; - background-color: #ededf0; - border-color: #ededf0; - color: #c3c0cd; + background-color: #EDEDF0; + border-color: #EDEDF0; + color: #C3C0CD; cursor: not-allowed; - fill: #c3c0cd; + fill: #C3C0CD; min-width: 208px; max-width: 325px; width: -webkit-max-content; @@ -163,13 +163,13 @@ exports[` UI snapshots renders with props 1`] = ` .emotion-3:active, .emotion-3:focus { outline: none; - box-shadow: 0px 0px 0px 2px #ffffff,0px 0px 0px 4px #332e54; + box-shadow: 0px 0px 0px 2px #FFFFFF,0px 0px 0px 4px #332E54; } .emotion-3:visited, .emotion-3:hover { opacity: 1; - color: #c3c0cd; + color: #C3C0CD; } .emotion-3 > svg { @@ -237,7 +237,7 @@ exports[` UI snapshots renders with props 1`] = ` } .emotion-1 span { - background-color: #ffffff; + background-color: #FFFFFF; } .emotion-5 { diff --git a/src/shared-components/button/components/roundButton/index.tsx b/src/shared-components/button/components/roundButton/index.tsx index e5d43bac6..8b8a1d576 100644 --- a/src/shared-components/button/components/roundButton/index.tsx +++ b/src/shared-components/button/components/roundButton/index.tsx @@ -62,7 +62,7 @@ export const RoundButton = ({ isLoading = false, loading = undefined, onClick = () => undefined, - textColor = '', + textColor, ...rest }: RoundButtonProps) => { const theme = useTheme(); @@ -93,7 +93,7 @@ export const RoundButton = ({ /> {children && ( -

+

{children}

)} diff --git a/src/shared-components/button/components/roundButton/style.ts b/src/shared-components/button/components/roundButton/style.ts index b858c61c9..7c9f907b7 100644 --- a/src/shared-components/button/components/roundButton/style.ts +++ b/src/shared-components/button/components/roundButton/style.ts @@ -68,8 +68,6 @@ export const roundButtonLoader = (disabled: boolean, theme: ThemeType) => css` /** * Given a color as an argument, * determine an alternate color for pairing - * @param string color the current color name of the round button (e.g purple, primary, etc.) - * @return string hex string of the alternate color (e.g. #efefef) */ const determineAlternateTextColor = ( buttonColor: ThemeColors, @@ -90,7 +88,7 @@ const determineAlternateTextColor = ( const contrastLevel: tinycolor.WCAG2Options = { level: 'AA', size: 'large' }; const lighterIsReadable = tinycolor.isReadable( - theme.COLORS.defaultBackground, + theme.COLORS.defaultLight, lighterVersion, contrastLevel, ); @@ -101,16 +99,13 @@ const determineAlternateTextColor = ( /** * get the text color of the button - * @param string color the current color name of the round button (e.g purple, primary, etc.) - * @param string textColor custom override for the text color - * @return string hex string of the text color */ const buttonTextColor = ( buttonColor: ThemeColors, - textColor: string, theme: ThemeType, + textColor?: ThemeColors, ) => { - if (textColor !== '') { + if (textColor) { return textColor; } @@ -123,9 +118,9 @@ const buttonTextColor = ( export const roundButtonTextStyles = ( buttonColor: ThemeColors, - textColor: string, theme: ThemeType, + textColor?: ThemeColors, ) => css` - color: ${buttonTextColor(buttonColor, textColor, theme)}; + color: ${buttonTextColor(buttonColor, theme, textColor)}; margin: 10px 0; `; diff --git a/src/shared-components/button/components/textButton/__snapshots__/test.tsx.snap b/src/shared-components/button/components/textButton/__snapshots__/test.tsx.snap index 1e4e39c16..46e1defbe 100644 --- a/src/shared-components/button/components/textButton/__snapshots__/test.tsx.snap +++ b/src/shared-components/button/components/textButton/__snapshots__/test.tsx.snap @@ -37,7 +37,7 @@ exports[` UI snapshots renders with disabled prop 1`] = ` border-color: transparent; background-color: transparent; border-radius: 0.25rem; - color: #c3c0cd; + color: #C3C0CD; cursor: not-allowed; } @@ -49,7 +49,7 @@ exports[` UI snapshots renders with disabled prop 1`] = ` .emotion-2:active, .emotion-2:focus { outline: none; - box-shadow: 0px 0px 0px 2px #ffffff,0px 0px 0px 4px #332e54; + box-shadow: 0px 0px 0px 2px #FFFFFF,0px 0px 0px 4px #332E54; }