@kaizen/design-tokens 10.5.2 → 10.6.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/css/variables.css +1 -1
- package/dist/cjs/index.cjs +18 -0
- package/dist/cjs/js/tokens.cjs +319 -0
- package/dist/cjs/legacy/ThemeManager.cjs +92 -0
- package/dist/cjs/legacy/ThemeProvider.cjs +82 -0
- package/dist/cjs/legacy/makeCssVariableDefinitionsMap.cjs +54 -0
- package/dist/{legacy/makeCssVariableTheme.js → cjs/legacy/makeCssVariableTheme.cjs} +27 -23
- package/dist/cjs/legacy/mapLeafsOfObject.cjs +46 -0
- package/dist/cjs/legacy/themes/heart.cjs +14 -0
- package/dist/cjs/legacy/themes/index.cjs +12 -0
- package/dist/cjs/lib/addExtraThemeEntries.cjs +52 -0
- package/dist/{lib/cssVariables.js → cjs/lib/cssVariables.cjs} +15 -11
- package/dist/cjs/lib/makeCssVariableDefinitionsMap.cjs +51 -0
- package/dist/cjs/lib/mapLeafsOfObject.cjs +43 -0
- package/dist/esm/index.mjs +7 -0
- package/dist/esm/js/tokens.mjs +317 -0
- package/dist/esm/legacy/ThemeManager.mjs +90 -0
- package/dist/esm/legacy/ThemeProvider.mjs +72 -0
- package/dist/esm/legacy/makeCssVariableDefinitionsMap.mjs +52 -0
- package/dist/esm/legacy/makeCssVariableTheme.mjs +62 -0
- package/dist/esm/legacy/mapLeafsOfObject.mjs +44 -0
- package/dist/esm/legacy/themes/heart.mjs +12 -0
- package/dist/esm/legacy/themes/index.mjs +9 -0
- package/dist/esm/lib/addExtraThemeEntries.mjs +44 -0
- package/dist/esm/lib/cssVariables.mjs +29 -0
- package/dist/esm/lib/makeCssVariableDefinitionsMap.mjs +49 -0
- package/dist/esm/lib/mapLeafsOfObject.mjs +41 -0
- package/dist/{index.d.ts → types/index.d.ts} +0 -1
- package/dist/types/js/index.d.ts +1 -0
- package/dist/{js → types/js}/tokens.d.ts +0 -1
- package/dist/{legacy → types/legacy}/ThemeManager.d.ts +0 -1
- package/dist/{legacy → types/legacy}/ThemeProvider.d.ts +2 -2
- package/dist/{legacy → types/legacy}/makeCssVariableDefinitionsMap.d.ts +0 -1
- package/dist/{legacy → types/legacy}/makeCssVariableTheme.d.ts +0 -1
- package/dist/{legacy → types/legacy}/mapLeafsOfObject.d.ts +0 -1
- package/dist/{legacy → types/legacy}/themes/heart.d.ts +0 -1
- package/dist/{legacy → types/legacy}/themes/index.d.ts +0 -1
- package/dist/{legacy → types/legacy}/types.d.ts +0 -1
- package/dist/{lib → types/lib}/__tests__/themeForTesting.d.ts +0 -1
- package/dist/{lib → types/lib}/addExtraThemeEntries.d.ts +0 -1
- package/dist/{lib → types/lib}/cssVariables.d.ts +0 -1
- package/dist/{lib → types/lib}/makeCssVariableDefinitionsMap.d.ts +0 -1
- package/dist/{lib → types/lib}/makeCssVariableTheme.d.ts +0 -1
- package/dist/{lib → types/lib}/mapLeafsOfObject.d.ts +0 -1
- package/dist/{lib → types/lib}/patterns.d.ts +0 -1
- package/dist/{types.d.ts → types/types.d.ts} +2 -1
- package/js/package.json +3 -2
- package/less/color.less +4 -0
- package/less/spacing.less +2 -0
- package/package.json +20 -12
- package/sass/color.scss +4 -0
- package/sass/spacing.scss +2 -0
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -31
- package/dist/index.js.map +0 -1
- package/dist/js/index.d.ts +0 -2
- package/dist/js/index.d.ts.map +0 -1
- package/dist/js/index.js +0 -18
- package/dist/js/index.js.map +0 -1
- package/dist/js/tokens.d.ts.map +0 -1
- package/dist/js/tokens.js +0 -318
- package/dist/js/tokens.js.map +0 -1
- package/dist/legacy/ThemeManager.d.ts.map +0 -1
- package/dist/legacy/ThemeManager.js +0 -80
- package/dist/legacy/ThemeManager.js.map +0 -1
- package/dist/legacy/ThemeProvider.d.ts.map +0 -1
- package/dist/legacy/ThemeProvider.js +0 -77
- package/dist/legacy/ThemeProvider.js.map +0 -1
- package/dist/legacy/makeCssVariableDefinitionsMap.d.ts.map +0 -1
- package/dist/legacy/makeCssVariableDefinitionsMap.js +0 -60
- package/dist/legacy/makeCssVariableDefinitionsMap.js.map +0 -1
- package/dist/legacy/makeCssVariableTheme.d.ts.map +0 -1
- package/dist/legacy/makeCssVariableTheme.js.map +0 -1
- package/dist/legacy/mapLeafsOfObject.d.ts.map +0 -1
- package/dist/legacy/mapLeafsOfObject.js +0 -64
- package/dist/legacy/mapLeafsOfObject.js.map +0 -1
- package/dist/legacy/themes/heart.d.ts.map +0 -1
- package/dist/legacy/themes/heart.js +0 -22
- package/dist/legacy/themes/heart.js.map +0 -1
- package/dist/legacy/themes/index.d.ts.map +0 -1
- package/dist/legacy/themes/index.js +0 -13
- package/dist/legacy/themes/index.js.map +0 -1
- package/dist/legacy/types.d.ts.map +0 -1
- package/dist/legacy/types.js +0 -3
- package/dist/legacy/types.js.map +0 -1
- package/dist/lib/__tests__/themeForTesting.d.ts.map +0 -1
- package/dist/lib/__tests__/themeForTesting.js +0 -21
- package/dist/lib/__tests__/themeForTesting.js.map +0 -1
- package/dist/lib/addExtraThemeEntries.d.ts.map +0 -1
- package/dist/lib/addExtraThemeEntries.js +0 -60
- package/dist/lib/addExtraThemeEntries.js.map +0 -1
- package/dist/lib/cssVariables.d.ts.map +0 -1
- package/dist/lib/cssVariables.js.map +0 -1
- package/dist/lib/makeCssVariableDefinitionsMap.d.ts.map +0 -1
- package/dist/lib/makeCssVariableDefinitionsMap.js +0 -57
- package/dist/lib/makeCssVariableDefinitionsMap.js.map +0 -1
- package/dist/lib/makeCssVariableTheme.d.ts.map +0 -1
- package/dist/lib/makeCssVariableTheme.js +0 -57
- package/dist/lib/makeCssVariableTheme.js.map +0 -1
- package/dist/lib/mapLeafsOfObject.d.ts.map +0 -1
- package/dist/lib/mapLeafsOfObject.js +0 -61
- package/dist/lib/mapLeafsOfObject.js.map +0 -1
- package/dist/lib/patterns.d.ts.map +0 -1
- package/dist/lib/patterns.js +0 -6
- package/dist/lib/patterns.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
package/css/variables.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
/** THIS IS AN AUTOGENERATED FILE **/
|
|
3
3
|
|
|
4
|
-
:root{--theme-key: heart; --animation-easing-function-ease-in-out: cubic-bezier(0.455, 0.03, 0.515, 0.955); --animation-easing-function-ease-in: cubic-bezier(0.55, 0.085, 0.68, 0.53); --animation-easing-function-ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94); --animation-easing-function-linear: linear; --animation-easing-function-bounce-in: cubic-bezier(0.485, 0.155, 0.24, 1.245); --animation-easing-function-bounce-out: cubic-bezier(0.485, 0.155, 0.515, 0.845); --animation-easing-function-bounce-in-out: cubic-bezier(0.76, -0.245, 0.24, 1.245); --animation-duration-instant: 0ms; --animation-duration-immediate: 100ms; --animation-duration-rapid: 200ms; --animation-duration-fast: 300ms; --animation-duration-slow: 400ms; --animation-duration-deliberate: 700ms; --border-solid-border-width: 2px; --border-solid-border-radius: 7px; --border-solid-border-style: solid; --border-solid-border-color: #e1e2ea; --border-solid-border-color-rgb: 225, 226, 234; --border-dashed-border-width: 2px; --border-dashed-border-radius: 7px; --border-dashed-border-style: dashed; --border-borderless-border-width: 2px; --border-borderless-border-radius: 7px; --border-borderless-border-style: solid; --border-borderless-border-color: transparent; --border-borderless-border-color-rgb: 0, 0, 0; --border-focus-ring-border-width: 2px; --border-focus-ring-border-radius: 10px; --border-focus-ring-border-style: solid; --border-width-1: 1px; --color-purple-100: #f4edf8; --color-purple-100-rgb: 244, 237, 248; --color-purple-200: #dfc9ea; --color-purple-200-rgb: 223, 201, 234; --color-purple-300: #c9a5dd; --color-purple-300-rgb: 201, 165, 221; --color-purple-400: #ae67b1; --color-purple-400-rgb: 174, 103, 177; --color-purple-500: #844587; --color-purple-500-rgb: 132, 69, 135; --color-purple-600: #5f3361; --color-purple-600-rgb: 95, 51, 97; --color-purple-700: #4a234d; --color-purple-700-rgb: 74, 35, 77; --color-purple-800: #2f2438; --color-purple-800-rgb: 47, 36, 56; --color-blue-100: #e6f6ff; --color-blue-100-rgb: 230, 246, 255; --color-blue-200: #bde2f5; --color-blue-200-rgb: 189, 226, 245; --color-blue-300: #73c0e8; --color-blue-300-rgb: 115, 192, 232; --color-blue-400: #008bd6; --color-blue-400-rgb: 0, 139, 214; --color-blue-500: #0168b3; --color-blue-500-rgb: 1, 104, 179; --color-blue-600: #004970; --color-blue-600-rgb: 0, 73, 112; --color-blue-700: #003157; --color-blue-700-rgb: 0, 49, 87; --color-green-100: #e8f8f4; --color-green-100-rgb: 232, 248, 244; --color-green-200: #c4ede2; --color-green-200-rgb: 196, 237, 226; --color-green-300: #8fdbc7; --color-green-300-rgb: 143, 219, 199; --color-green-400: #5dcaad; --color-green-400-rgb: 93, 202, 173; --color-green-500: #3f9a86; --color-green-500-rgb: 63, 154, 134; --color-green-600: #2c7d67; --color-green-600-rgb: 44, 125, 103; --color-green-700: #22594a; --color-green-700-rgb: 34, 89, 74; --color-yellow-100: #fff9e4; --color-yellow-100-rgb: 255, 249, 228; --color-yellow-200: #ffeeb3; --color-yellow-200-rgb: 255, 238, 179; --color-yellow-300: #ffe36e; --color-yellow-300-rgb: 255, 227, 110; --color-yellow-400: #ffca4d; --color-yellow-400-rgb: 255, 202, 77; --color-yellow-500: #ffb600; --color-yellow-500-rgb: 255, 182, 0; --color-yellow-600: #c68600; --color-yellow-600-rgb: 198, 134, 0; --color-yellow-700: #876400; --color-yellow-700-rgb: 135, 100, 0; --color-red-100: #fdeaee; --color-red-100-rgb: 253, 234, 238; --color-red-200: #f9c2cb; --color-red-200-rgb: 249, 194, 203; --color-red-300: #f597a8; --color-red-300-rgb: 245, 151, 168; --color-red-400: #e0707d; --color-red-400-rgb: 224, 112, 125; --color-red-500: #c93b55; --color-red-500-rgb: 201, 59, 85; --color-red-600: #a82433; --color-red-600-rgb: 168, 36, 51; --color-red-700: #6c1e20; --color-red-700-rgb: 108, 30, 32; --color-orange-100: #fff0e8; --color-orange-100-rgb: 255, 240, 232; --color-orange-200: #ffd1b9; --color-orange-200-rgb: 255, 209, 185; --color-orange-300: #ffb08a; --color-orange-300-rgb: 255, 176, 138; --color-orange-400: #ff9461; --color-orange-400-rgb: 255, 148, 97; --color-orange-500: #e96c2f; --color-orange-500-rgb: 233, 108, 47; --color-orange-600: #b74302; --color-orange-600-rgb: 183, 67, 2; --color-orange-700: #903c00; --color-orange-700-rgb: 144, 60, 0; --color-gray-100: #f9f9f9; --color-gray-100-rgb: 249, 249, 249; --color-gray-200: #f4f4f5; --color-gray-200-rgb: 244, 244, 245; --color-gray-300: #eaeaec; --color-gray-300-rgb: 234, 234, 236; --color-gray-400: #cdcdd0; --color-gray-400-rgb: 205, 205, 208; --color-gray-500: #878792; --color-gray-500-rgb: 135, 135, 146; --color-gray-600: #524e56; --color-gray-600-rgb: 82, 78, 86; --color-white: #ffffff; --color-white-rgb: 255, 255, 255; --data-viz-favorable: #7dd5bd; --data-viz-favorable-rgb: 125, 213, 189; --data-viz-unfavorable: #e68d97; --data-viz-unfavorable-rgb: 230, 141, 151; --layout-content-max-width: 1392px; --layout-content-max-width-with-sidebar: 1080px; --layout-content-side-margin: 72px; --layout-mobile-actions-drawer-height: 60px; --layout-navigation-bar-height: 72px; --layout-breakpoints-medium: 768px; --layout-breakpoints-large: 1080px; --shadow-small-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 3px 16px 0 rgba(0, 0, 0, 0.06); --shadow-large-box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.1), 0 8px 40px 0 rgba(0, 0, 0, 0.08); --spacing-0: 0; --spacing-1: .0625rem; --spacing-2: .125rem; --spacing-4: .25rem; --spacing-6: .375rem; --spacing-8: .5rem; --spacing-12: .75rem; --spacing-16: 1rem; --spacing-24: 1.5rem; --spacing-32: 2rem; --spacing-40: 2.5rem; --spacing-48: 3rem; --spacing-56: 3.5rem; --spacing-64: 4rem; --spacing-72: 4.5rem; --spacing-80: 5rem; --spacing-96: 6rem; --spacing-112: 7rem; --spacing-128: 8rem; --spacing-160: 10rem; --spacing-200: 12.5rem; --spacing-240: 15rem; --spacing-280: 17.5rem; --spacing-320: 20rem; --spacing-xs: 0.375rem; --spacing-sm: 0.75rem; --spacing-md: 1.5rem; --spacing-lg: 2.25rem; --spacing-xl: 3rem; --spacing-xxl: 3.75rem; --spacing-xxxl: 4.5rem; --spacing-xxxxl: 5.25rem; --spacing-xxxxxl: 6rem; --typography-data-large-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-large-font-weight: 700; --typography-data-large-font-size: 5.25rem; --typography-data-large-line-height: 5.25rem; --typography-data-large-letter-spacing: normal; --typography-data-large-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-large-units-font-weight: 700; --typography-data-large-units-font-size: 2.625rem; --typography-data-large-units-line-height: 5.25rem; --typography-data-large-units-letter-spacing: normal; --typography-data-medium-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-medium-font-weight: 700; --typography-data-medium-font-size: 3rem; --typography-data-medium-line-height: 5rem; --typography-data-medium-letter-spacing: normal; --typography-data-medium-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-medium-units-font-weight: 700; --typography-data-medium-units-font-size: 1.5rem; --typography-data-medium-units-line-height: 5rem; --typography-data-medium-units-letter-spacing: normal; --typography-data-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-small-font-weight: 700; --typography-data-small-font-size: 1.5rem; --typography-data-small-line-height: 1.5rem; --typography-data-small-letter-spacing: normal; --typography-data-small-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-small-units-font-weight: 700; --typography-data-small-units-font-size: 1.125rem; --typography-data-small-units-line-height: 1.5rem; --typography-data-small-units-letter-spacing: normal; --typography-display-0-font-family: "Tiempos Headline", Georgia, serif; --typography-display-0-font-weight: 800; --typography-display-0-font-size: 4.5rem; --typography-display-0-line-height: 5.25rem; --typography-display-0-letter-spacing: 0em; --typography-heading-1-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-1-font-weight: 700; --typography-heading-1-font-size: 2.125rem; --typography-heading-1-line-height: 2.625rem; --typography-heading-1-letter-spacing: normal; --typography-heading-2-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-2-font-weight: 700; --typography-heading-2-font-size: 1.75rem; --typography-heading-2-line-height: 2.25rem; --typography-heading-2-letter-spacing: normal; --typography-heading-3-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-3-font-weight: 700; --typography-heading-3-font-size: 1.375rem; --typography-heading-3-line-height: 1.875rem; --typography-heading-3-letter-spacing: normal; --typography-heading-4-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-4-font-weight: 600; --typography-heading-4-font-size: 1.125rem; --typography-heading-4-line-height: 1.5rem; --typography-heading-4-letter-spacing: normal; --typography-heading-5-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-5-font-weight: 600; --typography-heading-5-font-size: 1rem; --typography-heading-5-line-height: 1.5rem; --typography-heading-5-letter-spacing: normal; --typography-heading-6-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-6-font-weight: 700; --typography-heading-6-font-size: 0.875rem; --typography-heading-6-line-height: 1.5rem; --typography-heading-6-letter-spacing: normal; --typography-paragraph-intro-lede-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-intro-lede-font-weight: 400; --typography-paragraph-intro-lede-font-size: 1.25rem; --typography-paragraph-intro-lede-line-height: 1.875rem; --typography-paragraph-intro-lede-letter-spacing: 0; --typography-paragraph-intro-lede-max-width: 975px; --typography-paragraph-body-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-body-font-weight: 400; --typography-paragraph-body-font-size: 1rem; --typography-paragraph-body-line-height: 1.5rem; --typography-paragraph-body-letter-spacing: normal; --typography-paragraph-body-max-width: 780px; --typography-paragraph-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-small-font-weight: 400; --typography-paragraph-small-font-size: 0.875rem; --typography-paragraph-small-line-height: 1.125rem; --typography-paragraph-small-letter-spacing: normal; --typography-paragraph-small-max-width: 680px; --typography-paragraph-extra-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-extra-small-font-weight: 400; --typography-paragraph-extra-small-font-size: 0.75rem; --typography-paragraph-extra-small-line-height: 1.125rem; --typography-paragraph-extra-small-letter-spacing: normal; --typography-paragraph-extra-small-max-width: 600px; --typography-paragraph-bold-font-weight: 600; --typography-button-primary-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-button-primary-font-weight: 700; --typography-button-primary-font-size: 1.125rem; --typography-button-primary-line-height: 1.5rem; --typography-button-primary-letter-spacing: normal; --typography-button-secondary-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-button-secondary-font-weight: 500; --typography-button-secondary-font-size: 1rem; --typography-button-secondary-line-height: 1.5rem; --typography-button-secondary-letter-spacing: normal;}
|
|
4
|
+
:root{--theme-key: heart; --animation-easing-function-ease-in-out: cubic-bezier(0.455, 0.03, 0.515, 0.955); --animation-easing-function-ease-in: cubic-bezier(0.55, 0.085, 0.68, 0.53); --animation-easing-function-ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94); --animation-easing-function-linear: linear; --animation-easing-function-bounce-in: cubic-bezier(0.485, 0.155, 0.24, 1.245); --animation-easing-function-bounce-out: cubic-bezier(0.485, 0.155, 0.515, 0.845); --animation-easing-function-bounce-in-out: cubic-bezier(0.76, -0.245, 0.24, 1.245); --animation-duration-instant: 0ms; --animation-duration-immediate: 100ms; --animation-duration-rapid: 200ms; --animation-duration-fast: 300ms; --animation-duration-slow: 400ms; --animation-duration-deliberate: 700ms; --border-solid-border-width: 2px; --border-solid-border-radius: 7px; --border-solid-border-style: solid; --border-solid-border-color: #e1e2ea; --border-solid-border-color-rgb: 225, 226, 234; --border-dashed-border-width: 2px; --border-dashed-border-radius: 7px; --border-dashed-border-style: dashed; --border-borderless-border-width: 2px; --border-borderless-border-radius: 7px; --border-borderless-border-style: solid; --border-borderless-border-color: transparent; --border-borderless-border-color-rgb: 0, 0, 0; --border-focus-ring-border-width: 2px; --border-focus-ring-border-radius: 10px; --border-focus-ring-border-style: solid; --border-width-1: 1px; --color-purple-100: #f4edf8; --color-purple-100-rgb: 244, 237, 248; --color-purple-200: #dfc9ea; --color-purple-200-rgb: 223, 201, 234; --color-purple-300: #c9a5dd; --color-purple-300-rgb: 201, 165, 221; --color-purple-400: #ae67b1; --color-purple-400-rgb: 174, 103, 177; --color-purple-500: #844587; --color-purple-500-rgb: 132, 69, 135; --color-purple-600: #5f3361; --color-purple-600-rgb: 95, 51, 97; --color-purple-700: #4a234d; --color-purple-700-rgb: 74, 35, 77; --color-purple-800: #2f2438; --color-purple-800-rgb: 47, 36, 56; --color-blue-100: #e6f6ff; --color-blue-100-rgb: 230, 246, 255; --color-blue-200: #bde2f5; --color-blue-200-rgb: 189, 226, 245; --color-blue-300: #73c0e8; --color-blue-300-rgb: 115, 192, 232; --color-blue-400: #008bd6; --color-blue-400-rgb: 0, 139, 214; --color-blue-500: #0168b3; --color-blue-500-rgb: 1, 104, 179; --color-blue-600: #004970; --color-blue-600-rgb: 0, 73, 112; --color-blue-700: #003157; --color-blue-700-rgb: 0, 49, 87; --color-green-100: #e8f8f4; --color-green-100-rgb: 232, 248, 244; --color-green-200: #c4ede2; --color-green-200-rgb: 196, 237, 226; --color-green-300: #8fdbc7; --color-green-300-rgb: 143, 219, 199; --color-green-400: #5dcaad; --color-green-400-rgb: 93, 202, 173; --color-green-500: #3f9a86; --color-green-500-rgb: 63, 154, 134; --color-green-600: #2c7d67; --color-green-600-rgb: 44, 125, 103; --color-green-700: #22594a; --color-green-700-rgb: 34, 89, 74; --color-yellow-100: #fff9e4; --color-yellow-100-rgb: 255, 249, 228; --color-yellow-200: #ffeeb3; --color-yellow-200-rgb: 255, 238, 179; --color-yellow-300: #ffe36e; --color-yellow-300-rgb: 255, 227, 110; --color-yellow-400: #ffca4d; --color-yellow-400-rgb: 255, 202, 77; --color-yellow-500: #ffb600; --color-yellow-500-rgb: 255, 182, 0; --color-yellow-600: #c68600; --color-yellow-600-rgb: 198, 134, 0; --color-yellow-700: #876400; --color-yellow-700-rgb: 135, 100, 0; --color-red-100: #fdeaee; --color-red-100-rgb: 253, 234, 238; --color-red-200: #f9c2cb; --color-red-200-rgb: 249, 194, 203; --color-red-300: #f597a8; --color-red-300-rgb: 245, 151, 168; --color-red-400: #e0707d; --color-red-400-rgb: 224, 112, 125; --color-red-500: #c93b55; --color-red-500-rgb: 201, 59, 85; --color-red-600: #a82433; --color-red-600-rgb: 168, 36, 51; --color-red-700: #6c1e20; --color-red-700-rgb: 108, 30, 32; --color-orange-100: #fff0e8; --color-orange-100-rgb: 255, 240, 232; --color-orange-200: #ffd1b9; --color-orange-200-rgb: 255, 209, 185; --color-orange-300: #ffb08a; --color-orange-300-rgb: 255, 176, 138; --color-orange-400: #ff9461; --color-orange-400-rgb: 255, 148, 97; --color-orange-500: #e96c2f; --color-orange-500-rgb: 233, 108, 47; --color-orange-600: #b74302; --color-orange-600-rgb: 183, 67, 2; --color-orange-700: #903c00; --color-orange-700-rgb: 144, 60, 0; --color-gray-100: #f9f9f9; --color-gray-100-rgb: 249, 249, 249; --color-gray-200: #f4f4f5; --color-gray-200-rgb: 244, 244, 245; --color-gray-300: #eaeaec; --color-gray-300-rgb: 234, 234, 236; --color-gray-400: #cdcdd0; --color-gray-400-rgb: 205, 205, 208; --color-gray-500: #878792; --color-gray-500-rgb: 135, 135, 146; --color-gray-600: #524e56; --color-gray-600-rgb: 82, 78, 86; --color-white: #ffffff; --color-white-rgb: 255, 255, 255; --color-black: #000000; --color-black-rgb: 0, 0, 0; --data-viz-favorable: #7dd5bd; --data-viz-favorable-rgb: 125, 213, 189; --data-viz-unfavorable: #e68d97; --data-viz-unfavorable-rgb: 230, 141, 151; --layout-content-max-width: 1392px; --layout-content-max-width-with-sidebar: 1080px; --layout-content-side-margin: 72px; --layout-mobile-actions-drawer-height: 60px; --layout-navigation-bar-height: 72px; --layout-breakpoints-medium: 768px; --layout-breakpoints-large: 1080px; --shadow-small-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 3px 16px 0 rgba(0, 0, 0, 0.06); --shadow-large-box-shadow: 0 3px 9px 0 rgba(0, 0, 0, 0.1), 0 8px 40px 0 rgba(0, 0, 0, 0.08); --spacing-0: 0; --spacing-1: .0625rem; --spacing-2: .125rem; --spacing-4: .25rem; --spacing-6: .375rem; --spacing-8: .5rem; --spacing-12: .75rem; --spacing-16: 1rem; --spacing-20: 1.25rem; --spacing-24: 1.5rem; --spacing-32: 2rem; --spacing-40: 2.5rem; --spacing-48: 3rem; --spacing-56: 3.5rem; --spacing-64: 4rem; --spacing-72: 4.5rem; --spacing-80: 5rem; --spacing-96: 6rem; --spacing-112: 7rem; --spacing-128: 8rem; --spacing-160: 10rem; --spacing-200: 12.5rem; --spacing-240: 15rem; --spacing-280: 17.5rem; --spacing-320: 20rem; --spacing-xs: 0.375rem; --spacing-sm: 0.75rem; --spacing-md: 1.5rem; --spacing-lg: 2.25rem; --spacing-xl: 3rem; --spacing-xxl: 3.75rem; --spacing-xxxl: 4.5rem; --spacing-xxxxl: 5.25rem; --spacing-xxxxxl: 6rem; --typography-data-large-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-large-font-weight: 700; --typography-data-large-font-size: 5.25rem; --typography-data-large-line-height: 5.25rem; --typography-data-large-letter-spacing: normal; --typography-data-large-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-large-units-font-weight: 700; --typography-data-large-units-font-size: 2.625rem; --typography-data-large-units-line-height: 5.25rem; --typography-data-large-units-letter-spacing: normal; --typography-data-medium-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-medium-font-weight: 700; --typography-data-medium-font-size: 3rem; --typography-data-medium-line-height: 5rem; --typography-data-medium-letter-spacing: normal; --typography-data-medium-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-medium-units-font-weight: 700; --typography-data-medium-units-font-size: 1.5rem; --typography-data-medium-units-line-height: 5rem; --typography-data-medium-units-letter-spacing: normal; --typography-data-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-small-font-weight: 700; --typography-data-small-font-size: 1.5rem; --typography-data-small-line-height: 1.5rem; --typography-data-small-letter-spacing: normal; --typography-data-small-units-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-data-small-units-font-weight: 700; --typography-data-small-units-font-size: 1.125rem; --typography-data-small-units-line-height: 1.5rem; --typography-data-small-units-letter-spacing: normal; --typography-display-0-font-family: "Tiempos Headline", Georgia, serif; --typography-display-0-font-weight: 800; --typography-display-0-font-size: 4.5rem; --typography-display-0-line-height: 5.25rem; --typography-display-0-letter-spacing: 0em; --typography-heading-1-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-1-font-weight: 700; --typography-heading-1-font-size: 2.125rem; --typography-heading-1-line-height: 2.625rem; --typography-heading-1-letter-spacing: normal; --typography-heading-2-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-2-font-weight: 700; --typography-heading-2-font-size: 1.75rem; --typography-heading-2-line-height: 2.25rem; --typography-heading-2-letter-spacing: normal; --typography-heading-3-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-3-font-weight: 700; --typography-heading-3-font-size: 1.375rem; --typography-heading-3-line-height: 1.875rem; --typography-heading-3-letter-spacing: normal; --typography-heading-4-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-4-font-weight: 600; --typography-heading-4-font-size: 1.125rem; --typography-heading-4-line-height: 1.5rem; --typography-heading-4-letter-spacing: normal; --typography-heading-5-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-5-font-weight: 600; --typography-heading-5-font-size: 1rem; --typography-heading-5-line-height: 1.5rem; --typography-heading-5-letter-spacing: normal; --typography-heading-6-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-heading-6-font-weight: 700; --typography-heading-6-font-size: 0.875rem; --typography-heading-6-line-height: 1.5rem; --typography-heading-6-letter-spacing: normal; --typography-paragraph-intro-lede-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-intro-lede-font-weight: 400; --typography-paragraph-intro-lede-font-size: 1.25rem; --typography-paragraph-intro-lede-line-height: 1.875rem; --typography-paragraph-intro-lede-letter-spacing: 0; --typography-paragraph-intro-lede-max-width: 975px; --typography-paragraph-body-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-body-font-weight: 400; --typography-paragraph-body-font-size: 1rem; --typography-paragraph-body-line-height: 1.5rem; --typography-paragraph-body-letter-spacing: normal; --typography-paragraph-body-max-width: 780px; --typography-paragraph-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-small-font-weight: 400; --typography-paragraph-small-font-size: 0.875rem; --typography-paragraph-small-line-height: 1.125rem; --typography-paragraph-small-letter-spacing: normal; --typography-paragraph-small-max-width: 680px; --typography-paragraph-extra-small-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-paragraph-extra-small-font-weight: 400; --typography-paragraph-extra-small-font-size: 0.75rem; --typography-paragraph-extra-small-line-height: 1.125rem; --typography-paragraph-extra-small-letter-spacing: normal; --typography-paragraph-extra-small-max-width: 600px; --typography-paragraph-bold-font-weight: 600; --typography-button-primary-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-button-primary-font-weight: 700; --typography-button-primary-font-size: 1.125rem; --typography-button-primary-line-height: 1.5rem; --typography-button-primary-letter-spacing: normal; --typography-button-secondary-font-family: "Inter", "Noto Sans", Helvetica, Arial, sans-serif; --typography-button-secondary-font-weight: 500; --typography-button-secondary-font-size: 1rem; --typography-button-secondary-line-height: 1.5rem; --typography-button-secondary-letter-spacing: normal;}
|
|
5
5
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./legacy/themes/index.cjs');
|
|
4
|
+
var ThemeManager = require('./legacy/ThemeManager.cjs');
|
|
5
|
+
var ThemeProvider = require('./legacy/ThemeProvider.cjs');
|
|
6
|
+
var makeCssVariableDefinitionsMap = require('./legacy/makeCssVariableDefinitionsMap.cjs');
|
|
7
|
+
var makeCssVariableTheme = require('./legacy/makeCssVariableTheme.cjs');
|
|
8
|
+
var mapLeafsOfObject = require('./legacy/mapLeafsOfObject.cjs');
|
|
9
|
+
var heart = require('./legacy/themes/heart.cjs');
|
|
10
|
+
exports.defaultTheme = index.defaultTheme;
|
|
11
|
+
exports.ThemeManager = ThemeManager.ThemeManager;
|
|
12
|
+
exports.ThemeContext = ThemeProvider.ThemeContext;
|
|
13
|
+
exports.ThemeProvider = ThemeProvider.ThemeProvider;
|
|
14
|
+
exports.useTheme = ThemeProvider.useTheme;
|
|
15
|
+
exports.makeCssVariableDefinitionsMap = makeCssVariableDefinitionsMap.makeCssVariableDefinitionsMap;
|
|
16
|
+
exports.makeCSSVariableTheme = makeCssVariableTheme.makeCSSVariableTheme;
|
|
17
|
+
exports.mapLeafsOfObject = mapLeafsOfObject.mapLeafsOfObject;
|
|
18
|
+
exports.heartTheme = heart.heartTheme;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tokens = {
|
|
4
|
+
animation: {
|
|
5
|
+
easingFunction: {
|
|
6
|
+
easeInOut: "cubic-bezier(0.455, 0.03, 0.515, 0.955)",
|
|
7
|
+
easeIn: "cubic-bezier(0.55, 0.085, 0.68, 0.53)",
|
|
8
|
+
easeOut: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
9
|
+
linear: "linear",
|
|
10
|
+
bounceIn: "cubic-bezier(0.485, 0.155, 0.24, 1.245)",
|
|
11
|
+
bounceOut: "cubic-bezier(0.485, 0.155, 0.515, 0.845)",
|
|
12
|
+
bounceInOut: "cubic-bezier(0.76, -0.245, 0.24, 1.245)"
|
|
13
|
+
},
|
|
14
|
+
duration: {
|
|
15
|
+
instant: "0ms",
|
|
16
|
+
immediate: "100ms",
|
|
17
|
+
rapid: "200ms",
|
|
18
|
+
fast: "300ms",
|
|
19
|
+
slow: "400ms",
|
|
20
|
+
deliberate: "700ms"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
border: {
|
|
24
|
+
solid: {
|
|
25
|
+
borderWidth: "2px",
|
|
26
|
+
borderRadius: "7px",
|
|
27
|
+
borderStyle: "solid",
|
|
28
|
+
borderColor: "#e1e2ea"
|
|
29
|
+
},
|
|
30
|
+
dashed: {
|
|
31
|
+
borderWidth: "2px",
|
|
32
|
+
borderRadius: "7px",
|
|
33
|
+
borderStyle: "dashed"
|
|
34
|
+
},
|
|
35
|
+
borderless: {
|
|
36
|
+
borderWidth: "2px",
|
|
37
|
+
borderRadius: "7px",
|
|
38
|
+
borderStyle: "solid",
|
|
39
|
+
borderColor: "transparent"
|
|
40
|
+
},
|
|
41
|
+
focusRing: {
|
|
42
|
+
borderWidth: "2px",
|
|
43
|
+
borderRadius: "10px",
|
|
44
|
+
borderStyle: "solid"
|
|
45
|
+
},
|
|
46
|
+
width: {
|
|
47
|
+
1: "1px"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
color: {
|
|
51
|
+
purple: {
|
|
52
|
+
100: "#f4edf8",
|
|
53
|
+
200: "#dfc9ea",
|
|
54
|
+
300: "#c9a5dd",
|
|
55
|
+
400: "#ae67b1",
|
|
56
|
+
500: "#844587",
|
|
57
|
+
600: "#5f3361",
|
|
58
|
+
700: "#4a234d",
|
|
59
|
+
800: "#2f2438"
|
|
60
|
+
},
|
|
61
|
+
blue: {
|
|
62
|
+
100: "#e6f6ff",
|
|
63
|
+
200: "#bde2f5",
|
|
64
|
+
300: "#73c0e8",
|
|
65
|
+
400: "#008bd6",
|
|
66
|
+
500: "#0168b3",
|
|
67
|
+
600: "#004970",
|
|
68
|
+
700: "#003157"
|
|
69
|
+
},
|
|
70
|
+
green: {
|
|
71
|
+
100: "#e8f8f4",
|
|
72
|
+
200: "#c4ede2",
|
|
73
|
+
300: "#8fdbc7",
|
|
74
|
+
400: "#5dcaad",
|
|
75
|
+
500: "#3f9a86",
|
|
76
|
+
600: "#2c7d67",
|
|
77
|
+
700: "#22594a"
|
|
78
|
+
},
|
|
79
|
+
yellow: {
|
|
80
|
+
100: "#fff9e4",
|
|
81
|
+
200: "#ffeeb3",
|
|
82
|
+
300: "#ffe36e",
|
|
83
|
+
400: "#ffca4d",
|
|
84
|
+
500: "#ffb600",
|
|
85
|
+
600: "#c68600",
|
|
86
|
+
700: "#876400"
|
|
87
|
+
},
|
|
88
|
+
red: {
|
|
89
|
+
100: "#fdeaee",
|
|
90
|
+
200: "#f9c2cb",
|
|
91
|
+
300: "#f597a8",
|
|
92
|
+
400: "#e0707d",
|
|
93
|
+
500: "#c93b55",
|
|
94
|
+
600: "#a82433",
|
|
95
|
+
700: "#6c1e20"
|
|
96
|
+
},
|
|
97
|
+
orange: {
|
|
98
|
+
100: "#fff0e8",
|
|
99
|
+
200: "#ffd1b9",
|
|
100
|
+
300: "#ffb08a",
|
|
101
|
+
400: "#ff9461",
|
|
102
|
+
500: "#e96c2f",
|
|
103
|
+
600: "#b74302",
|
|
104
|
+
700: "#903c00"
|
|
105
|
+
},
|
|
106
|
+
gray: {
|
|
107
|
+
100: "#f9f9f9",
|
|
108
|
+
200: "#f4f4f5",
|
|
109
|
+
300: "#eaeaec",
|
|
110
|
+
400: "#cdcdd0",
|
|
111
|
+
500: "#878792",
|
|
112
|
+
600: "#524e56"
|
|
113
|
+
},
|
|
114
|
+
white: "#ffffff",
|
|
115
|
+
black: "#000000"
|
|
116
|
+
},
|
|
117
|
+
dataViz: {
|
|
118
|
+
favorable: "#7dd5bd",
|
|
119
|
+
unfavorable: "#e68d97"
|
|
120
|
+
},
|
|
121
|
+
layout: {
|
|
122
|
+
contentMaxWidth: "1392px",
|
|
123
|
+
contentMaxWidthWithSidebar: "1080px",
|
|
124
|
+
contentSideMargin: "72px",
|
|
125
|
+
mobileActionsDrawerHeight: "60px",
|
|
126
|
+
navigationBarHeight: "72px",
|
|
127
|
+
breakpoints: {
|
|
128
|
+
medium: "768px",
|
|
129
|
+
large: "1080px"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
shadow: {
|
|
133
|
+
small: {
|
|
134
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 3px 16px 0 rgba(0, 0, 0, 0.06)"
|
|
135
|
+
},
|
|
136
|
+
large: {
|
|
137
|
+
boxShadow: "0 3px 9px 0 rgba(0, 0, 0, 0.1), 0 8px 40px 0 rgba(0, 0, 0, 0.08)"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
spacing: {
|
|
141
|
+
xs: "0.375rem",
|
|
142
|
+
sm: "0.75rem",
|
|
143
|
+
md: "1.5rem",
|
|
144
|
+
lg: "2.25rem",
|
|
145
|
+
xl: "3rem",
|
|
146
|
+
xxl: "3.75rem",
|
|
147
|
+
xxxl: "4.5rem",
|
|
148
|
+
xxxxl: "5.25rem",
|
|
149
|
+
xxxxxl: "6rem",
|
|
150
|
+
0: "0",
|
|
151
|
+
1: ".0625rem",
|
|
152
|
+
2: ".125rem",
|
|
153
|
+
4: ".25rem",
|
|
154
|
+
6: ".375rem",
|
|
155
|
+
8: ".5rem",
|
|
156
|
+
12: ".75rem",
|
|
157
|
+
16: "1rem",
|
|
158
|
+
20: "1.25rem",
|
|
159
|
+
24: "1.5rem",
|
|
160
|
+
32: "2rem",
|
|
161
|
+
40: "2.5rem",
|
|
162
|
+
48: "3rem",
|
|
163
|
+
56: "3.5rem",
|
|
164
|
+
64: "4rem",
|
|
165
|
+
72: "4.5rem",
|
|
166
|
+
80: "5rem",
|
|
167
|
+
96: "6rem",
|
|
168
|
+
112: "7rem",
|
|
169
|
+
128: "8rem",
|
|
170
|
+
160: "10rem",
|
|
171
|
+
200: "12.5rem",
|
|
172
|
+
240: "15rem",
|
|
173
|
+
280: "17.5rem",
|
|
174
|
+
320: "20rem"
|
|
175
|
+
},
|
|
176
|
+
typography: {
|
|
177
|
+
dataLarge: {
|
|
178
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
179
|
+
fontWeight: 700,
|
|
180
|
+
fontSize: "5.25rem",
|
|
181
|
+
lineHeight: "5.25rem",
|
|
182
|
+
letterSpacing: "normal"
|
|
183
|
+
},
|
|
184
|
+
dataLargeUnits: {
|
|
185
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
186
|
+
fontWeight: 700,
|
|
187
|
+
fontSize: "2.625rem",
|
|
188
|
+
lineHeight: "5.25rem",
|
|
189
|
+
letterSpacing: "normal"
|
|
190
|
+
},
|
|
191
|
+
dataMedium: {
|
|
192
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
193
|
+
fontWeight: 700,
|
|
194
|
+
fontSize: "3rem",
|
|
195
|
+
lineHeight: "5rem",
|
|
196
|
+
letterSpacing: "normal"
|
|
197
|
+
},
|
|
198
|
+
dataMediumUnits: {
|
|
199
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
200
|
+
fontWeight: 700,
|
|
201
|
+
fontSize: "1.5rem",
|
|
202
|
+
lineHeight: "5rem",
|
|
203
|
+
letterSpacing: "normal"
|
|
204
|
+
},
|
|
205
|
+
dataSmall: {
|
|
206
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
207
|
+
fontWeight: 700,
|
|
208
|
+
fontSize: "1.5rem",
|
|
209
|
+
lineHeight: "1.5rem",
|
|
210
|
+
letterSpacing: "normal"
|
|
211
|
+
},
|
|
212
|
+
dataSmallUnits: {
|
|
213
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
214
|
+
fontWeight: 700,
|
|
215
|
+
fontSize: "1.125rem",
|
|
216
|
+
lineHeight: "1.5rem",
|
|
217
|
+
letterSpacing: "normal"
|
|
218
|
+
},
|
|
219
|
+
display0: {
|
|
220
|
+
fontFamily: '"Tiempos Headline", Georgia, serif',
|
|
221
|
+
fontWeight: 800,
|
|
222
|
+
fontSize: "4.5rem",
|
|
223
|
+
lineHeight: "5.25rem",
|
|
224
|
+
letterSpacing: "0em"
|
|
225
|
+
},
|
|
226
|
+
heading1: {
|
|
227
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
228
|
+
fontWeight: 700,
|
|
229
|
+
fontSize: "2.125rem",
|
|
230
|
+
lineHeight: "2.625rem",
|
|
231
|
+
letterSpacing: "normal"
|
|
232
|
+
},
|
|
233
|
+
heading2: {
|
|
234
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
235
|
+
fontWeight: 700,
|
|
236
|
+
fontSize: "1.75rem",
|
|
237
|
+
lineHeight: "2.25rem",
|
|
238
|
+
letterSpacing: "normal"
|
|
239
|
+
},
|
|
240
|
+
heading3: {
|
|
241
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
242
|
+
fontWeight: 700,
|
|
243
|
+
fontSize: "1.375rem",
|
|
244
|
+
lineHeight: "1.875rem",
|
|
245
|
+
letterSpacing: "normal"
|
|
246
|
+
},
|
|
247
|
+
heading4: {
|
|
248
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
249
|
+
fontWeight: 600,
|
|
250
|
+
fontSize: "1.125rem",
|
|
251
|
+
lineHeight: "1.5rem",
|
|
252
|
+
letterSpacing: "normal"
|
|
253
|
+
},
|
|
254
|
+
heading5: {
|
|
255
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
256
|
+
fontWeight: 600,
|
|
257
|
+
fontSize: "1rem",
|
|
258
|
+
lineHeight: "1.5rem",
|
|
259
|
+
letterSpacing: "normal"
|
|
260
|
+
},
|
|
261
|
+
heading6: {
|
|
262
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
263
|
+
fontWeight: 700,
|
|
264
|
+
fontSize: "0.875rem",
|
|
265
|
+
lineHeight: "1.5rem",
|
|
266
|
+
letterSpacing: "normal"
|
|
267
|
+
},
|
|
268
|
+
paragraphIntroLede: {
|
|
269
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
270
|
+
fontWeight: 400,
|
|
271
|
+
fontSize: "1.25rem",
|
|
272
|
+
lineHeight: "1.875rem",
|
|
273
|
+
letterSpacing: "0",
|
|
274
|
+
maxWidth: "975px"
|
|
275
|
+
},
|
|
276
|
+
paragraphBody: {
|
|
277
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
278
|
+
fontWeight: 400,
|
|
279
|
+
fontSize: "1rem",
|
|
280
|
+
lineHeight: "1.5rem",
|
|
281
|
+
letterSpacing: "normal",
|
|
282
|
+
maxWidth: "780px"
|
|
283
|
+
},
|
|
284
|
+
paragraphSmall: {
|
|
285
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
286
|
+
fontWeight: 400,
|
|
287
|
+
fontSize: "0.875rem",
|
|
288
|
+
lineHeight: "1.125rem",
|
|
289
|
+
letterSpacing: "normal",
|
|
290
|
+
maxWidth: "680px"
|
|
291
|
+
},
|
|
292
|
+
paragraphExtraSmall: {
|
|
293
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
294
|
+
fontWeight: 400,
|
|
295
|
+
fontSize: "0.75rem",
|
|
296
|
+
lineHeight: "1.125rem",
|
|
297
|
+
letterSpacing: "normal",
|
|
298
|
+
maxWidth: "600px"
|
|
299
|
+
},
|
|
300
|
+
paragraphBold: {
|
|
301
|
+
fontWeight: 600
|
|
302
|
+
},
|
|
303
|
+
buttonPrimary: {
|
|
304
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
305
|
+
fontWeight: 700,
|
|
306
|
+
fontSize: "1.125rem",
|
|
307
|
+
lineHeight: "1.5rem",
|
|
308
|
+
letterSpacing: "normal"
|
|
309
|
+
},
|
|
310
|
+
buttonSecondary: {
|
|
311
|
+
fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
|
|
312
|
+
fontWeight: 500,
|
|
313
|
+
fontSize: "1rem",
|
|
314
|
+
lineHeight: "1.5rem",
|
|
315
|
+
letterSpacing: "normal"
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
};
|
|
319
|
+
exports.tokens = tokens;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var makeCssVariableDefinitionsMap = require('../lib/makeCssVariableDefinitionsMap.cjs');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Use this class to set and apply themes, and to access or subscribe to the currently active one.
|
|
7
|
+
* This class fulfills the idea of theming and runtime theme switching by relying on CSS variables,
|
|
8
|
+
* and the ability to update them in JavaScript - a framework agnostic method.
|
|
9
|
+
*
|
|
10
|
+
* It works by converting a Theme interface to a flattened map of CSS variable keys and values, then calling `document.documentElement.style.setProperty(key, value)`.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Not needed if you are using `KaizenProvider` from `@kaizen/components` or `defaultPreset` from next-services.
|
|
14
|
+
*
|
|
15
|
+
* {@link https://cultureamp.design/?path=/docs/guides-app-starter--docs Check App Starter guidance}
|
|
16
|
+
*/
|
|
17
|
+
var ThemeManager = /** @class */function () {
|
|
18
|
+
function ThemeManager(theme, rootElementId, /* This allows you to stop the class from applying the theme automatically during construction. Defaults to true */
|
|
19
|
+
apply) {
|
|
20
|
+
if (rootElementId === void 0) {
|
|
21
|
+
rootElementId = "";
|
|
22
|
+
}
|
|
23
|
+
if (apply === void 0) {
|
|
24
|
+
apply = true;
|
|
25
|
+
}
|
|
26
|
+
var _this = this;
|
|
27
|
+
this.themeChangeListeners = [];
|
|
28
|
+
this.rootElement = null;
|
|
29
|
+
this.getRootElement = function () {
|
|
30
|
+
return _this.rootElement;
|
|
31
|
+
};
|
|
32
|
+
this.getRootElementId = function () {
|
|
33
|
+
return _this.rootElementId;
|
|
34
|
+
};
|
|
35
|
+
this.getCurrentTheme = function () {
|
|
36
|
+
return _this.theme;
|
|
37
|
+
};
|
|
38
|
+
this.setRootElement = function (element) {
|
|
39
|
+
_this.rootElement = element;
|
|
40
|
+
};
|
|
41
|
+
this.setRootElementId = function (rootElementId) {
|
|
42
|
+
return _this.rootElementId = rootElementId;
|
|
43
|
+
};
|
|
44
|
+
this.setAndApplyTheme = function (theme, force) {
|
|
45
|
+
if (!force) {
|
|
46
|
+
if (_this.theme === theme) return;
|
|
47
|
+
}
|
|
48
|
+
_this.theme = theme;
|
|
49
|
+
_this.applyCurrentTheme();
|
|
50
|
+
_this.notifyThemeChangeListeners(theme);
|
|
51
|
+
};
|
|
52
|
+
this.addThemeChangeListener = function (listener) {
|
|
53
|
+
_this.themeChangeListeners.push(listener);
|
|
54
|
+
};
|
|
55
|
+
this.removeThemeChangeListener = function (listener) {
|
|
56
|
+
_this.themeChangeListeners = _this.themeChangeListeners.filter(function (l) {
|
|
57
|
+
return l !== listener;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
this.applyCurrentTheme = function () {
|
|
61
|
+
var _a;
|
|
62
|
+
if (typeof window !== "undefined") {
|
|
63
|
+
_this.setRootElement((_a = document.getElementById(_this.rootElementId)) !== null && _a !== void 0 ? _a : document.documentElement);
|
|
64
|
+
var cssVariableDefinitions = makeCssVariableDefinitionsMap.makeCssVariableDefinitionsMap(_this.theme);
|
|
65
|
+
Object.entries(cssVariableDefinitions).forEach(function (_a) {
|
|
66
|
+
var _b;
|
|
67
|
+
var key = _a[0],
|
|
68
|
+
value = _a[1];
|
|
69
|
+
(_b = _this.rootElement) === null || _b === void 0 ? void 0 : _b.style.setProperty(key, value);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
this.notifyThemeChangeListeners = function (theme) {
|
|
74
|
+
_this.themeChangeListeners.forEach(function (listener) {
|
|
75
|
+
return listener(theme);
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
/*
|
|
79
|
+
For some reason, storybook likes this way of defining class properties better.
|
|
80
|
+
If you use `constructor( private theme: Theme, ...)` - theme becomes undefined within the class's methods.
|
|
81
|
+
*/
|
|
82
|
+
this.theme = theme;
|
|
83
|
+
this.rootElementId = rootElementId;
|
|
84
|
+
if (apply) this.applyCurrentTheme();
|
|
85
|
+
}
|
|
86
|
+
return ThemeManager;
|
|
87
|
+
}();
|
|
88
|
+
// I would like to expose this, but instantiating ThemeManager in some situations or runtimes (such as nodejs) cause exceptions.
|
|
89
|
+
// For now it is not exposed, but we might come back to it, as it makes sense to have a singleton ThemeManager in almost all cases
|
|
90
|
+
/* export const defaultThemeManager = new ThemeManager(defaultTheme) */
|
|
91
|
+
|
|
92
|
+
exports.ThemeManager = ThemeManager;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var ThemeManager = require('./ThemeManager.cjs');
|
|
6
|
+
var index = require('./themes/index.cjs');
|
|
7
|
+
function _interopDefault(e) {
|
|
8
|
+
return e && e.__esModule ? e : {
|
|
9
|
+
default: e
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
var ThemeContext = React__default.default.createContext(index.defaultTheme);
|
|
14
|
+
/**
|
|
15
|
+
* Wrap your application in this provider using a ThemeManager, to synchronise it with a react context.
|
|
16
|
+
* This allows child react elements to more easily use theme variables, using the {@link useTheme} hook.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Not needed if you are using `KaizenProvider` from `@kaizen/components` or `defaultPreset` from next-services.
|
|
20
|
+
*
|
|
21
|
+
* {@link https://cultureamp.design/?path=/docs/guides-app-starter--docs Check App Starter guidance}
|
|
22
|
+
*/
|
|
23
|
+
var ThemeProvider = function (_a) {
|
|
24
|
+
var themeManager = _a.themeManager,
|
|
25
|
+
props = tslib.__rest(_a, ["themeManager"]);
|
|
26
|
+
var themeManagerInstance = React.useState(function () {
|
|
27
|
+
return themeManager || new ThemeManager.ThemeManager(index.defaultTheme);
|
|
28
|
+
})[0];
|
|
29
|
+
var _b = React__default.default.useState(themeManagerInstance.getCurrentTheme()),
|
|
30
|
+
theme = _b[0],
|
|
31
|
+
setTheme = _b[1];
|
|
32
|
+
React__default.default.useEffect(function () {
|
|
33
|
+
var cancelled = false;
|
|
34
|
+
var listener = function (newTheme) {
|
|
35
|
+
if (!cancelled) setTheme(newTheme);
|
|
36
|
+
};
|
|
37
|
+
themeManagerInstance.addThemeChangeListener(listener);
|
|
38
|
+
return function () {
|
|
39
|
+
cancelled = true;
|
|
40
|
+
themeManagerInstance.removeThemeChangeListener(listener);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
return React__default.default.createElement(React__default.default.Fragment, null, React__default.default.createElement(ThemeContext.Provider, {
|
|
44
|
+
value: theme
|
|
45
|
+
}, props.children), React__default.default.createElement("link", {
|
|
46
|
+
rel: "preload",
|
|
47
|
+
href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-bold.woff2",
|
|
48
|
+
as: "font",
|
|
49
|
+
type: "font/woff2",
|
|
50
|
+
crossOrigin: "anonymous"
|
|
51
|
+
}), React__default.default.createElement("link", {
|
|
52
|
+
rel: "preload",
|
|
53
|
+
href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-demi-bold.woff2",
|
|
54
|
+
as: "font",
|
|
55
|
+
type: "font/woff2",
|
|
56
|
+
crossOrigin: "anonymous"
|
|
57
|
+
}), React__default.default.createElement("link", {
|
|
58
|
+
rel: "preload",
|
|
59
|
+
href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-medium.woff2",
|
|
60
|
+
as: "font",
|
|
61
|
+
type: "font/woff2",
|
|
62
|
+
crossOrigin: "anonymous"
|
|
63
|
+
}), React__default.default.createElement("link", {
|
|
64
|
+
rel: "preload",
|
|
65
|
+
href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-regular.woff2",
|
|
66
|
+
as: "font",
|
|
67
|
+
type: "font/woff2",
|
|
68
|
+
crossOrigin: "anonymous"
|
|
69
|
+
}), React__default.default.createElement("link", {
|
|
70
|
+
rel: "preload",
|
|
71
|
+
href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-bold.woff2",
|
|
72
|
+
as: "font",
|
|
73
|
+
type: "font/woff2",
|
|
74
|
+
crossOrigin: "anonymous"
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
var useTheme = function () {
|
|
78
|
+
return React__default.default.useContext(ThemeContext);
|
|
79
|
+
};
|
|
80
|
+
exports.ThemeContext = ThemeContext;
|
|
81
|
+
exports.ThemeProvider = ThemeProvider;
|
|
82
|
+
exports.useTheme = useTheme;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib = require('tslib');
|
|
4
|
+
var addExtraThemeEntries = require('../lib/addExtraThemeEntries.cjs');
|
|
5
|
+
var cssVariables = require('../lib/cssVariables.cjs');
|
|
6
|
+
var mapLeafsOfObject = require('./mapLeafsOfObject.cjs');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
|
|
10
|
+
* Make a map of CSS variables -> values in a consistent way.
|
|
11
|
+
* Use this to, for example, create a CSS file that declares each theme variable on the `:root` pseudo element.
|
|
12
|
+
* Or for example when you're defining CSS variables using `rootElement.style.setProperty` within ThemeManager.
|
|
13
|
+
*
|
|
14
|
+
* It is paramount that this function defines every variable that {@link makeCssVariableTheme} expects to be defined.
|
|
15
|
+
* Otherwise, it's possible that a CSS variable token (something that looks like var(--color-purple-100-rgb)) won't have a matching defined
|
|
16
|
+
* CSS variable like `--color-purple-100-rgb: 123, 123, 123;`
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
* For example:
|
|
20
|
+
* Input:
|
|
21
|
+
* ```
|
|
22
|
+
* {
|
|
23
|
+
* color: {
|
|
24
|
+
* whatever: {
|
|
25
|
+
* 100: "#ff0022"
|
|
26
|
+
* }
|
|
27
|
+
* }
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
* Output:
|
|
31
|
+
* ```
|
|
32
|
+
* {
|
|
33
|
+
* "--color-whatever-100": "#ff0022"
|
|
34
|
+
* }
|
|
35
|
+
*/
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Not needed if you are using `KaizenProvider` from `@kaizen/components` or `defaultPreset` from next-services.
|
|
38
|
+
*/
|
|
39
|
+
function makeCssVariableDefinitionsMap(theme) {
|
|
40
|
+
var accumulatedCssVariables = {};
|
|
41
|
+
// Shamelessly using a map function like a forEach
|
|
42
|
+
mapLeafsOfObject.mapLeafsOfObject(theme, function (path, value) {
|
|
43
|
+
// Key will be `--color-blah`
|
|
44
|
+
var key = cssVariables.objectPathToCssVarIdentifier(path);
|
|
45
|
+
var nextCssVariables = addExtraThemeEntries.addExtraThemeEntries(path, key, value, function (_, v) {
|
|
46
|
+
return "".concat(v);
|
|
47
|
+
}, {
|
|
48
|
+
augmentWithId: false
|
|
49
|
+
});
|
|
50
|
+
accumulatedCssVariables = tslib.__assign(tslib.__assign({}, accumulatedCssVariables), nextCssVariables);
|
|
51
|
+
});
|
|
52
|
+
return accumulatedCssVariables;
|
|
53
|
+
}
|
|
54
|
+
exports.makeCssVariableDefinitionsMap = makeCssVariableDefinitionsMap;
|