@kaizen/components 1.7.9 → 1.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -1,429 +1,25 @@
1
+ import { _ as __rest, a as __assign, b as __spreadArray, c as __spreadArrays, d as classNames, e as classnamesExports } from './index-8eb84ea0.js';
1
2
  import * as React from 'react';
2
- import React__default, { createContext, useState, useEffect, useContext, PureComponent, useRef, forwardRef, useMemo, useCallback, useLayoutEffect, createElement } from 'react';
3
- import { _ as __rest, a as __assign, b as __spreadArray, c as __spreadArrays, d as classNames, e as classnamesExports } from './index-cd3cb19d.js';
3
+ import React__default, { useState, useEffect, PureComponent, useRef, forwardRef, useMemo, useCallback, useContext, useLayoutEffect, createElement, createContext } from 'react';
4
4
  import { makeCssVariableDefinitionsMap } from '@kaizen/design-tokens';
5
5
 
6
- var ThemeManager = (
7
- /** @class */
8
- function() {
9
- function ThemeManager2(theme, rootElementId, apply) {
10
- if (rootElementId === void 0) {
11
- rootElementId = "";
12
- }
13
- if (apply === void 0) {
14
- apply = true;
15
- }
16
- var _this = this;
17
- this.themeChangeListeners = [];
18
- this.rootElement = null;
19
- this.getRootElement = function() {
20
- return _this.rootElement;
21
- };
22
- this.getRootElementId = function() {
23
- return _this.rootElementId;
24
- };
25
- this.getCurrentTheme = function() {
26
- return _this.theme;
27
- };
28
- this.setRootElement = function(element) {
29
- _this.rootElement = element;
30
- };
31
- this.setRootElementId = function(rootElementId2) {
32
- return _this.rootElementId = rootElementId2;
33
- };
34
- this.setAndApplyTheme = function(theme2, force) {
35
- if (!force) {
36
- if (_this.theme === theme2)
37
- return;
38
- }
39
- _this.theme = theme2;
40
- _this.applyCurrentTheme();
41
- _this.notifyThemeChangeListeners(theme2);
42
- };
43
- this.addThemeChangeListener = function(listener) {
44
- _this.themeChangeListeners.push(listener);
45
- };
46
- this.removeThemeChangeListener = function(listener) {
47
- _this.themeChangeListeners = _this.themeChangeListeners.filter(function(l) {
48
- return l !== listener;
49
- });
50
- };
51
- this.applyCurrentTheme = function() {
52
- var _a;
53
- if (typeof window !== "undefined") {
54
- _this.setRootElement((_a = document.getElementById(_this.rootElementId)) !== null && _a !== void 0 ? _a : document.documentElement);
55
- var cssVariableDefinitions = makeCssVariableDefinitionsMap(_this.theme);
56
- Object.entries(cssVariableDefinitions).forEach(function(_a2) {
57
- var _b;
58
- var key = _a2[0], value = _a2[1];
59
- (_b = _this.rootElement) === null || _b === void 0 ? void 0 : _b.style.setProperty(key, value);
60
- });
61
- }
62
- };
63
- this.notifyThemeChangeListeners = function(theme2) {
64
- _this.themeChangeListeners.forEach(function(listener) {
65
- return listener(theme2);
66
- });
67
- };
68
- this.theme = theme;
69
- this.rootElementId = rootElementId;
70
- if (apply)
71
- this.applyCurrentTheme();
72
- }
73
- return ThemeManager2;
74
- }()
75
- );
76
-
77
- var heartTheme = {
78
- themeKey: "heart",
79
- animation: {
80
- easingFunction: {
81
- easeInOut: "cubic-bezier(0.455, 0.03, 0.515, 0.955)",
82
- easeIn: "cubic-bezier(0.55, 0.085, 0.68, 0.53)",
83
- easeOut: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
84
- linear: "linear",
85
- bounceIn: "cubic-bezier(0.485, 0.155, 0.24, 1.245)",
86
- bounceOut: "cubic-bezier(0.485, 0.155, 0.515, 0.845)",
87
- bounceInOut: "cubic-bezier(0.76, -0.245, 0.24, 1.245)"
88
- },
89
- duration: {
90
- instant: "0ms",
91
- immediate: "100ms",
92
- rapid: "200ms",
93
- fast: "300ms",
94
- slow: "400ms",
95
- deliberate: "700ms"
96
- }
97
- },
98
- border: {
99
- solid: {
100
- borderWidth: "2px",
101
- borderRadius: "7px",
102
- borderStyle: "solid",
103
- borderColor: "#e1e2ea"
104
- },
105
- dashed: {
106
- borderWidth: "2px",
107
- borderRadius: "7px",
108
- borderStyle: "dashed"
109
- },
110
- borderless: {
111
- borderWidth: "2px",
112
- borderRadius: "7px",
113
- borderStyle: "solid",
114
- borderColor: "transparent"
115
- },
116
- focusRing: {
117
- borderWidth: "2px",
118
- borderRadius: "10px",
119
- borderStyle: "solid"
120
- }
121
- },
122
- color: {
123
- purple: {
124
- 100: "#f4edf8",
125
- 200: "#dfc9ea",
126
- 300: "#c9a5dd",
127
- 400: "#ae67b1",
128
- 500: "#844587",
129
- 600: "#5f3361",
130
- 700: "#4a234d",
131
- 800: "#2f2438"
132
- },
133
- blue: {
134
- 100: "#e6f6ff",
135
- 200: "#bde2f5",
136
- 300: "#73c0e8",
137
- 400: "#008bd6",
138
- 500: "#0168b3",
139
- 600: "#004970",
140
- 700: "#003157"
141
- },
142
- green: {
143
- 100: "#e8f8f4",
144
- 200: "#c4ede2",
145
- 300: "#8fdbc7",
146
- 400: "#5dcbad",
147
- 500: "#44a289",
148
- 600: "#2c7d67",
149
- 700: "#22594a"
150
- },
151
- yellow: {
152
- 100: "#fff9e4",
153
- 200: "#ffeeb3",
154
- 300: "#ffe36e",
155
- 400: "#ffca4d",
156
- 500: "#ffb600",
157
- 600: "#c68600",
158
- 700: "#876400"
159
- },
160
- red: {
161
- 100: "#fdeaee",
162
- 200: "#f9c2cb",
163
- 300: "#f597a8",
164
- 400: "#e0707d",
165
- 500: "#c93b55",
166
- 600: "#a82433",
167
- 700: "#6c1e20"
168
- },
169
- orange: {
170
- 100: "#fff0e8",
171
- 200: "#ffd1b9",
172
- 300: "#ffb08a",
173
- 400: "#ff9461",
174
- 500: "#e96c2f",
175
- 600: "#b74302",
176
- 700: "#903c00"
177
- },
178
- gray: {
179
- 100: "#f9f9f9",
180
- 200: "#f4f4f5",
181
- 300: "#eaeaec",
182
- 400: "#cdcdd0",
183
- 500: "#8c8c97",
184
- 600: "#524e56"
185
- },
186
- white: "#ffffff"
187
- },
188
- dataViz: {
189
- favorable: "#7dd5bd",
190
- unfavorable: "#e68d97"
191
- },
192
- layout: {
193
- contentMaxWidth: "1392px",
194
- contentMaxWidthWithSidebar: "1080px",
195
- contentSideMargin: "72px",
196
- mobileActionsDrawerHeight: "60px",
197
- navigationBarHeight: "72px",
198
- breakpoints: {
199
- medium: "768px",
200
- large: "1080px"
201
- }
202
- },
203
- shadow: {
204
- small: {
205
- boxShadow: "0px 3px 16px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1)"
206
- },
207
- large: {
208
- boxShadow: "0px 8px 40px rgba(0, 0, 0, 0.08), 0px 3px 9px rgba(0, 0, 0, 0.1)"
209
- }
210
- },
211
- spacing: {
212
- xs: "0.375rem",
213
- sm: "0.75rem",
214
- md: "1.5rem",
215
- lg: "2.25rem",
216
- xl: "3rem",
217
- xxl: "3.75rem",
218
- xxxl: "4.5rem",
219
- xxxxl: "5.25rem",
220
- xxxxxl: "6rem",
221
- 0: "0",
222
- 1: ".0625rem",
223
- 2: ".125rem",
224
- 4: ".25rem",
225
- 6: ".375rem",
226
- 8: ".5rem",
227
- 12: ".75rem",
228
- 16: "1rem",
229
- 24: "1.5rem",
230
- 32: "2rem",
231
- 40: "2.5rem",
232
- 48: "3rem",
233
- 56: "3.5rem",
234
- 64: "4rem",
235
- 72: "4.5rem",
236
- 80: "5rem",
237
- 96: "6rem",
238
- 112: "7rem",
239
- 128: "8rem",
240
- 160: "10rem",
241
- 200: "12.5rem",
242
- 240: "15rem",
243
- 280: "17.5rem",
244
- 320: "20rem"
245
- },
246
- typography: {
247
- dataLarge: {
248
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
249
- fontWeight: 700,
250
- fontSize: "5.25rem",
251
- lineHeight: "5.25rem",
252
- letterSpacing: "normal"
253
- },
254
- dataLargeUnits: {
255
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
256
- fontWeight: 700,
257
- fontSize: "2.625rem",
258
- lineHeight: "5.25rem",
259
- letterSpacing: "normal"
260
- },
261
- dataMedium: {
262
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
263
- fontWeight: 700,
264
- fontSize: "3rem",
265
- lineHeight: "5rem",
266
- letterSpacing: "normal"
267
- },
268
- dataMediumUnits: {
269
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
270
- fontWeight: 700,
271
- fontSize: "1.5rem",
272
- lineHeight: "5rem",
273
- letterSpacing: "normal"
274
- },
275
- dataSmall: {
276
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
277
- fontWeight: 700,
278
- fontSize: "1.5rem",
279
- lineHeight: "1.5rem",
280
- letterSpacing: "normal"
281
- },
282
- dataSmallUnits: {
283
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
284
- fontWeight: 700,
285
- fontSize: "1.125rem",
286
- lineHeight: "1.5rem",
287
- letterSpacing: "normal"
288
- },
289
- display0: {
290
- fontFamily: '"Tiempos Headline", Georgia, serif',
291
- fontWeight: 800,
292
- fontSize: "4.5rem",
293
- lineHeight: "5.25rem",
294
- letterSpacing: "0em"
295
- },
296
- heading1: {
297
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
298
- fontWeight: 700,
299
- fontSize: "2.125rem",
300
- lineHeight: "2.625rem",
301
- letterSpacing: "normal"
302
- },
303
- heading2: {
304
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
305
- fontWeight: 700,
306
- fontSize: "1.75rem",
307
- lineHeight: "2.25rem",
308
- letterSpacing: "normal"
309
- },
310
- heading3: {
311
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
312
- fontWeight: 700,
313
- fontSize: "1.375rem",
314
- lineHeight: "1.875rem",
315
- letterSpacing: "normal"
316
- },
317
- heading4: {
318
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
319
- fontWeight: 600,
320
- fontSize: "1.125rem",
321
- lineHeight: "1.5rem",
322
- letterSpacing: "normal"
323
- },
324
- heading5: {
325
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
326
- fontWeight: 600,
327
- fontSize: "1rem",
328
- lineHeight: "1.5rem",
329
- letterSpacing: "normal"
330
- },
331
- heading6: {
332
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
333
- fontWeight: 700,
334
- fontSize: "0.875rem",
335
- lineHeight: "1.5rem",
336
- letterSpacing: "normal"
337
- },
338
- paragraphIntroLede: {
339
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
340
- fontWeight: 400,
341
- fontSize: "1.25rem",
342
- lineHeight: "1.875rem",
343
- letterSpacing: "0"
344
- },
345
- paragraphBody: {
346
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
347
- fontWeight: 400,
348
- fontSize: "1rem",
349
- lineHeight: "1.5rem",
350
- letterSpacing: "normal"
351
- },
352
- paragraphSmall: {
353
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
354
- fontWeight: 400,
355
- fontSize: "0.875rem",
356
- lineHeight: "1.125rem",
357
- letterSpacing: "normal"
358
- },
359
- paragraphExtraSmall: {
360
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
361
- fontWeight: 400,
362
- fontSize: "0.75rem",
363
- lineHeight: "1.125rem",
364
- letterSpacing: "normal"
365
- },
366
- paragraphBold: {
367
- fontWeight: 600
368
- },
369
- buttonPrimary: {
370
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
371
- fontWeight: 700,
372
- fontSize: "1.125rem",
373
- lineHeight: "1.5rem",
374
- letterSpacing: "normal"
375
- },
376
- buttonSecondary: {
377
- fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
378
- fontWeight: 500,
379
- fontSize: "1rem",
380
- lineHeight: "1.5rem",
381
- letterSpacing: "normal"
382
- }
383
- }
384
- };
6
+ const ORIGIN_BASE_URL = "https://d1e7r7b0lb8p4d.cloudfront.net";
7
+ const assetUrl = (path) => [ORIGIN_BASE_URL, path].join("/");
385
8
 
386
- var defaultTheme = heartTheme;
9
+ var styles$f = {"img":"Brand-module_img__uWvra"};
387
10
 
388
- var ThemeContext = createContext(defaultTheme);
389
- var ThemeProvider = function(_a) {
390
- var themeManager = _a.themeManager, props = __rest(_a, ["themeManager"]);
391
- var themeManagerInstance = useState(function() {
392
- return themeManager || new ThemeManager(defaultTheme);
393
- })[0];
394
- var _b = useState(themeManagerInstance.getCurrentTheme()), theme = _b[0], setTheme = _b[1];
395
- useEffect(function() {
396
- var cancelled = false;
397
- var listener = function(newTheme) {
398
- if (!cancelled)
399
- setTheme(newTheme);
400
- };
401
- themeManagerInstance.addThemeChangeListener(listener);
402
- return function() {
403
- cancelled = true;
404
- themeManagerInstance.removeThemeChangeListener(listener);
405
- };
406
- }, []);
11
+ var Brand = function(_a) {
12
+ var variant = _a.variant, alt = _a.alt, _b = _a.reversed, reversed = _b === void 0 ? false : _b, classNameOverride = _a.classNameOverride, restProps = __rest(_a, ["variant", "alt", "reversed", "classNameOverride"]);
13
+ var brandTheme = reversed ? "-reversed" : "-default";
407
14
  return React__default.createElement(
408
- React__default.Fragment,
409
- null,
410
- React__default.createElement(ThemeContext.Provider, { value: theme }, props.children),
411
- React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
412
- React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-demi-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
413
- React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-medium.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
414
- React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-regular.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
415
- React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" })
15
+ "picture",
16
+ __assign({ className: classNameOverride }, restProps),
17
+ React__default.createElement("source", { srcSet: assetUrl("brand/".concat(variant, "-reversed.svg")), media: "(forced-colors: active) and (prefers-color-scheme: dark)" }),
18
+ React__default.createElement("source", { srcSet: assetUrl("brand/".concat(variant, "-default.svg")), media: "(forced-colors: active) and (prefers-color-scheme: light)" }),
19
+ React__default.createElement("img", { src: assetUrl("brand/".concat(variant).concat(brandTheme, ".svg")), alt, className: styles$f.img })
416
20
  );
417
21
  };
418
- var useTheme = function() {
419
- return useContext(ThemeContext);
420
- };
421
-
422
- var KaizenProvider = function(_a) {
423
- var children = _a.children, themeManager = _a.themeManager;
424
- return React__default.createElement(ThemeProvider, { themeManager }, children);
425
- };
426
- KaizenProvider.displayName = "KaizenProvider";
22
+ Brand.displayName = "Brand";
427
23
 
428
24
  var zeroRightClassName = 'right-scroll-bar-position';
429
25
  var fullWidthClassName = 'width-before-scroll-bar';
@@ -37247,11 +36843,11 @@ function Reference(_ref) {
37247
36843
  // Public types
37248
36844
 
37249
36845
  var esm = /*#__PURE__*/Object.freeze({
37250
- __proto__: null,
37251
- Manager: Manager,
37252
- Popper: Popper,
37253
- Reference: Reference,
37254
- usePopper: usePopper
36846
+ __proto__: null,
36847
+ Manager: Manager,
36848
+ Popper: Popper,
36849
+ Reference: Reference,
36850
+ usePopper: usePopper
37255
36851
  });
37256
36852
 
37257
36853
  var styles$d = {"filterPopover":"FilterPopover-module_filterPopover__OgOEM"};
@@ -37477,10 +37073,10 @@ var AppearanceAnim = {};
37477
37073
  function c(u,e,c){var i=this,a=useRef(null),o=useRef(0),f=useRef(null),l=useRef([]),m=useRef(),v=useRef(),d=useRef(u),p=useRef(!0);useEffect(function(){d.current=u;},[u]);var g=!e&&0!==e&&"undefined"!=typeof window;if("function"!=typeof u)throw new TypeError("Expected a function");e=+e||0;var w=!!(c=c||{}).leading,s=!("trailing"in c)||!!c.trailing,x="maxWait"in c,y=x?Math.max(+c.maxWait||0,e):null;useEffect(function(){return p.current=!0,function(){p.current=!1;}},[]);var h=useMemo(function(){var r=function(r){var n=l.current,t=m.current;return l.current=m.current=null,o.current=r,v.current=d.current.apply(t,n)},n=function(r,n){g&&cancelAnimationFrame(f.current),f.current=g?requestAnimationFrame(r):setTimeout(r,n);},t=function(r){if(!p.current)return !1;var n=r-a.current;return !a.current||n>=e||n<0||x&&r-o.current>=y},u=function(n){return f.current=null,s&&l.current?r(n):(l.current=m.current=null,v.current)},c=function r(){var c=Date.now();if(t(c))return u(c);if(p.current){var i=e-(c-a.current),f=x?Math.min(i,y-(c-o.current)):i;n(r,f);}},h=function(){var u=Date.now(),d=t(u);if(l.current=[].slice.call(arguments),m.current=i,a.current=u,d){if(!f.current&&p.current)return o.current=a.current,n(c,e),w?r(a.current):v.current;if(x)return n(c,e),r(a.current)}return f.current||n(c,e),v.current};return h.cancel=function(){f.current&&(g?cancelAnimationFrame(f.current):clearTimeout(f.current)),o.current=0,l.current=a.current=m.current=f.current=null;},h.isPending=function(){return !!f.current},h.flush=function(){return f.current?u(Date.now()):v.current},h},[w,x,e,y,s,g]);return h}function i(r,n){return r===n}function a(r){return "function"==typeof r?function(){return r}:r}function o(n,t,o){var f,l,m=o&&o.equalityFn||i,v=(f=useState(a(n)),l=f[1],[f[0],useCallback(function(r){return l(a(r))},[])]),d=v[0],p=v[1],g=c(useCallback(function(r){return p(r)},[p]),t,o),w=useRef(n);return m(w.current,n)||(g(n),w.current=n),[d,g]}function f$1(r,n,t){var u=void 0===t?{}:t,e=u.leading,i=u.trailing;return c(r,n,{maxWait:n,leading:void 0===e||e,trailing:void 0===i||i})}
37478
37074
 
37479
37075
  var index_module = /*#__PURE__*/Object.freeze({
37480
- __proto__: null,
37481
- useDebounce: o,
37482
- useDebouncedCallback: c,
37483
- useThrottledCallback: f$1
37076
+ __proto__: null,
37077
+ useDebounce: o,
37078
+ useDebouncedCallback: c,
37079
+ useThrottledCallback: f$1
37484
37080
  });
37485
37081
 
37486
37082
  var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(index_module);
@@ -38193,16 +37789,16 @@ function version(uuid) {
38193
37789
  }
38194
37790
 
38195
37791
  var esmBrowser = /*#__PURE__*/Object.freeze({
38196
- __proto__: null,
38197
- NIL: nil,
38198
- parse: parse,
38199
- stringify: stringify,
38200
- v1: v1,
38201
- v3: v3$1,
38202
- v4: v4,
38203
- v5: v5$1,
38204
- validate: validate,
38205
- version: version
37792
+ __proto__: null,
37793
+ NIL: nil,
37794
+ parse: parse,
37795
+ stringify: stringify,
37796
+ v1: v1,
37797
+ v3: v3$1,
37798
+ v4: v4,
37799
+ v5: v5$1,
37800
+ validate: validate,
37801
+ version: version
38206
37802
  });
38207
37803
 
38208
37804
  var require$$1 = /*@__PURE__*/getAugmentedNamespace(esmBrowser);
@@ -38221,8 +37817,8 @@ useUuid$1.useUuid = useUuid;
38221
37817
  var Tooltip_module = {"tooltip":"Tooltip-module_tooltip__80yPv","tooltipContent":"Tooltip-module_tooltipContent__gXHKT","default":"Tooltip-module_default__oLBfa","informative":"Tooltip-module_informative__Lw2ZJ","positive":"Tooltip-module_positive__31-es","cautionary":"Tooltip-module_cautionary__jr2QQ","highlight":"Tooltip-module_highlight__b5HMe","arrow":"Tooltip-module_arrow__LWe4h","arrowInner":"Tooltip-module_arrowInner__whQvw","arrowMain":"Tooltip-module_arrowMain__VSut6","arrowShadow":"Tooltip-module_arrowShadow__cwgsV","displayInline":"Tooltip-module_displayInline__iojZb","displayBlock":"Tooltip-module_displayBlock__RfmWl","displayInlineBlock":"Tooltip-module_displayInlineBlock__2q-e6","displayFlex":"Tooltip-module_displayFlex__orTOm","displayInlineFlex":"Tooltip-module_displayInlineFlex__z-4AS"};
38222
37818
 
38223
37819
  var Tooltip_module$1 = /*#__PURE__*/Object.freeze({
38224
- __proto__: null,
38225
- default: Tooltip_module
37820
+ __proto__: null,
37821
+ default: Tooltip_module
38226
37822
  });
38227
37823
 
38228
37824
  var require$$6 = /*@__PURE__*/getAugmentedNamespace(Tooltip_module$1);
@@ -45400,5 +44996,427 @@ FilterSelect.SectionDivider = SectionDivider;
45400
44996
  FilterSelect.Option = Option;
45401
44997
  FilterSelect.ItemDefaultRender = ListItem;
45402
44998
 
45403
- export { Filter, FilterButton, FilterButtonRemovable, FilterContents, FilterSelect, KaizenProvider, ThemeContext, ThemeManager, ThemeProvider, defaultTheme, heartTheme, useTheme };
44999
+ var ThemeManager = (
45000
+ /** @class */
45001
+ function() {
45002
+ function ThemeManager2(theme, rootElementId, apply) {
45003
+ if (rootElementId === void 0) {
45004
+ rootElementId = "";
45005
+ }
45006
+ if (apply === void 0) {
45007
+ apply = true;
45008
+ }
45009
+ var _this = this;
45010
+ this.themeChangeListeners = [];
45011
+ this.rootElement = null;
45012
+ this.getRootElement = function() {
45013
+ return _this.rootElement;
45014
+ };
45015
+ this.getRootElementId = function() {
45016
+ return _this.rootElementId;
45017
+ };
45018
+ this.getCurrentTheme = function() {
45019
+ return _this.theme;
45020
+ };
45021
+ this.setRootElement = function(element) {
45022
+ _this.rootElement = element;
45023
+ };
45024
+ this.setRootElementId = function(rootElementId2) {
45025
+ return _this.rootElementId = rootElementId2;
45026
+ };
45027
+ this.setAndApplyTheme = function(theme2, force) {
45028
+ if (!force) {
45029
+ if (_this.theme === theme2)
45030
+ return;
45031
+ }
45032
+ _this.theme = theme2;
45033
+ _this.applyCurrentTheme();
45034
+ _this.notifyThemeChangeListeners(theme2);
45035
+ };
45036
+ this.addThemeChangeListener = function(listener) {
45037
+ _this.themeChangeListeners.push(listener);
45038
+ };
45039
+ this.removeThemeChangeListener = function(listener) {
45040
+ _this.themeChangeListeners = _this.themeChangeListeners.filter(function(l) {
45041
+ return l !== listener;
45042
+ });
45043
+ };
45044
+ this.applyCurrentTheme = function() {
45045
+ var _a;
45046
+ if (typeof window !== "undefined") {
45047
+ _this.setRootElement((_a = document.getElementById(_this.rootElementId)) !== null && _a !== void 0 ? _a : document.documentElement);
45048
+ var cssVariableDefinitions = makeCssVariableDefinitionsMap(_this.theme);
45049
+ Object.entries(cssVariableDefinitions).forEach(function(_a2) {
45050
+ var _b;
45051
+ var key = _a2[0], value = _a2[1];
45052
+ (_b = _this.rootElement) === null || _b === void 0 ? void 0 : _b.style.setProperty(key, value);
45053
+ });
45054
+ }
45055
+ };
45056
+ this.notifyThemeChangeListeners = function(theme2) {
45057
+ _this.themeChangeListeners.forEach(function(listener) {
45058
+ return listener(theme2);
45059
+ });
45060
+ };
45061
+ this.theme = theme;
45062
+ this.rootElementId = rootElementId;
45063
+ if (apply)
45064
+ this.applyCurrentTheme();
45065
+ }
45066
+ return ThemeManager2;
45067
+ }()
45068
+ );
45069
+
45070
+ var heartTheme = {
45071
+ themeKey: "heart",
45072
+ animation: {
45073
+ easingFunction: {
45074
+ easeInOut: "cubic-bezier(0.455, 0.03, 0.515, 0.955)",
45075
+ easeIn: "cubic-bezier(0.55, 0.085, 0.68, 0.53)",
45076
+ easeOut: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
45077
+ linear: "linear",
45078
+ bounceIn: "cubic-bezier(0.485, 0.155, 0.24, 1.245)",
45079
+ bounceOut: "cubic-bezier(0.485, 0.155, 0.515, 0.845)",
45080
+ bounceInOut: "cubic-bezier(0.76, -0.245, 0.24, 1.245)"
45081
+ },
45082
+ duration: {
45083
+ instant: "0ms",
45084
+ immediate: "100ms",
45085
+ rapid: "200ms",
45086
+ fast: "300ms",
45087
+ slow: "400ms",
45088
+ deliberate: "700ms"
45089
+ }
45090
+ },
45091
+ border: {
45092
+ solid: {
45093
+ borderWidth: "2px",
45094
+ borderRadius: "7px",
45095
+ borderStyle: "solid",
45096
+ borderColor: "#e1e2ea"
45097
+ },
45098
+ dashed: {
45099
+ borderWidth: "2px",
45100
+ borderRadius: "7px",
45101
+ borderStyle: "dashed"
45102
+ },
45103
+ borderless: {
45104
+ borderWidth: "2px",
45105
+ borderRadius: "7px",
45106
+ borderStyle: "solid",
45107
+ borderColor: "transparent"
45108
+ },
45109
+ focusRing: {
45110
+ borderWidth: "2px",
45111
+ borderRadius: "10px",
45112
+ borderStyle: "solid"
45113
+ }
45114
+ },
45115
+ color: {
45116
+ purple: {
45117
+ 100: "#f4edf8",
45118
+ 200: "#dfc9ea",
45119
+ 300: "#c9a5dd",
45120
+ 400: "#ae67b1",
45121
+ 500: "#844587",
45122
+ 600: "#5f3361",
45123
+ 700: "#4a234d",
45124
+ 800: "#2f2438"
45125
+ },
45126
+ blue: {
45127
+ 100: "#e6f6ff",
45128
+ 200: "#bde2f5",
45129
+ 300: "#73c0e8",
45130
+ 400: "#008bd6",
45131
+ 500: "#0168b3",
45132
+ 600: "#004970",
45133
+ 700: "#003157"
45134
+ },
45135
+ green: {
45136
+ 100: "#e8f8f4",
45137
+ 200: "#c4ede2",
45138
+ 300: "#8fdbc7",
45139
+ 400: "#5dcbad",
45140
+ 500: "#44a289",
45141
+ 600: "#2c7d67",
45142
+ 700: "#22594a"
45143
+ },
45144
+ yellow: {
45145
+ 100: "#fff9e4",
45146
+ 200: "#ffeeb3",
45147
+ 300: "#ffe36e",
45148
+ 400: "#ffca4d",
45149
+ 500: "#ffb600",
45150
+ 600: "#c68600",
45151
+ 700: "#876400"
45152
+ },
45153
+ red: {
45154
+ 100: "#fdeaee",
45155
+ 200: "#f9c2cb",
45156
+ 300: "#f597a8",
45157
+ 400: "#e0707d",
45158
+ 500: "#c93b55",
45159
+ 600: "#a82433",
45160
+ 700: "#6c1e20"
45161
+ },
45162
+ orange: {
45163
+ 100: "#fff0e8",
45164
+ 200: "#ffd1b9",
45165
+ 300: "#ffb08a",
45166
+ 400: "#ff9461",
45167
+ 500: "#e96c2f",
45168
+ 600: "#b74302",
45169
+ 700: "#903c00"
45170
+ },
45171
+ gray: {
45172
+ 100: "#f9f9f9",
45173
+ 200: "#f4f4f5",
45174
+ 300: "#eaeaec",
45175
+ 400: "#cdcdd0",
45176
+ 500: "#8c8c97",
45177
+ 600: "#524e56"
45178
+ },
45179
+ white: "#ffffff"
45180
+ },
45181
+ dataViz: {
45182
+ favorable: "#7dd5bd",
45183
+ unfavorable: "#e68d97"
45184
+ },
45185
+ layout: {
45186
+ contentMaxWidth: "1392px",
45187
+ contentMaxWidthWithSidebar: "1080px",
45188
+ contentSideMargin: "72px",
45189
+ mobileActionsDrawerHeight: "60px",
45190
+ navigationBarHeight: "72px",
45191
+ breakpoints: {
45192
+ medium: "768px",
45193
+ large: "1080px"
45194
+ }
45195
+ },
45196
+ shadow: {
45197
+ small: {
45198
+ boxShadow: "0px 3px 16px rgba(0, 0, 0, 0.06), 0px 1px 3px rgba(0, 0, 0, 0.1)"
45199
+ },
45200
+ large: {
45201
+ boxShadow: "0px 8px 40px rgba(0, 0, 0, 0.08), 0px 3px 9px rgba(0, 0, 0, 0.1)"
45202
+ }
45203
+ },
45204
+ spacing: {
45205
+ xs: "0.375rem",
45206
+ sm: "0.75rem",
45207
+ md: "1.5rem",
45208
+ lg: "2.25rem",
45209
+ xl: "3rem",
45210
+ xxl: "3.75rem",
45211
+ xxxl: "4.5rem",
45212
+ xxxxl: "5.25rem",
45213
+ xxxxxl: "6rem",
45214
+ 0: "0",
45215
+ 1: ".0625rem",
45216
+ 2: ".125rem",
45217
+ 4: ".25rem",
45218
+ 6: ".375rem",
45219
+ 8: ".5rem",
45220
+ 12: ".75rem",
45221
+ 16: "1rem",
45222
+ 24: "1.5rem",
45223
+ 32: "2rem",
45224
+ 40: "2.5rem",
45225
+ 48: "3rem",
45226
+ 56: "3.5rem",
45227
+ 64: "4rem",
45228
+ 72: "4.5rem",
45229
+ 80: "5rem",
45230
+ 96: "6rem",
45231
+ 112: "7rem",
45232
+ 128: "8rem",
45233
+ 160: "10rem",
45234
+ 200: "12.5rem",
45235
+ 240: "15rem",
45236
+ 280: "17.5rem",
45237
+ 320: "20rem"
45238
+ },
45239
+ typography: {
45240
+ dataLarge: {
45241
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45242
+ fontWeight: 700,
45243
+ fontSize: "5.25rem",
45244
+ lineHeight: "5.25rem",
45245
+ letterSpacing: "normal"
45246
+ },
45247
+ dataLargeUnits: {
45248
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45249
+ fontWeight: 700,
45250
+ fontSize: "2.625rem",
45251
+ lineHeight: "5.25rem",
45252
+ letterSpacing: "normal"
45253
+ },
45254
+ dataMedium: {
45255
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45256
+ fontWeight: 700,
45257
+ fontSize: "3rem",
45258
+ lineHeight: "5rem",
45259
+ letterSpacing: "normal"
45260
+ },
45261
+ dataMediumUnits: {
45262
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45263
+ fontWeight: 700,
45264
+ fontSize: "1.5rem",
45265
+ lineHeight: "5rem",
45266
+ letterSpacing: "normal"
45267
+ },
45268
+ dataSmall: {
45269
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45270
+ fontWeight: 700,
45271
+ fontSize: "1.5rem",
45272
+ lineHeight: "1.5rem",
45273
+ letterSpacing: "normal"
45274
+ },
45275
+ dataSmallUnits: {
45276
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45277
+ fontWeight: 700,
45278
+ fontSize: "1.125rem",
45279
+ lineHeight: "1.5rem",
45280
+ letterSpacing: "normal"
45281
+ },
45282
+ display0: {
45283
+ fontFamily: '"Tiempos Headline", Georgia, serif',
45284
+ fontWeight: 800,
45285
+ fontSize: "4.5rem",
45286
+ lineHeight: "5.25rem",
45287
+ letterSpacing: "0em"
45288
+ },
45289
+ heading1: {
45290
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45291
+ fontWeight: 700,
45292
+ fontSize: "2.125rem",
45293
+ lineHeight: "2.625rem",
45294
+ letterSpacing: "normal"
45295
+ },
45296
+ heading2: {
45297
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45298
+ fontWeight: 700,
45299
+ fontSize: "1.75rem",
45300
+ lineHeight: "2.25rem",
45301
+ letterSpacing: "normal"
45302
+ },
45303
+ heading3: {
45304
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45305
+ fontWeight: 700,
45306
+ fontSize: "1.375rem",
45307
+ lineHeight: "1.875rem",
45308
+ letterSpacing: "normal"
45309
+ },
45310
+ heading4: {
45311
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45312
+ fontWeight: 600,
45313
+ fontSize: "1.125rem",
45314
+ lineHeight: "1.5rem",
45315
+ letterSpacing: "normal"
45316
+ },
45317
+ heading5: {
45318
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45319
+ fontWeight: 600,
45320
+ fontSize: "1rem",
45321
+ lineHeight: "1.5rem",
45322
+ letterSpacing: "normal"
45323
+ },
45324
+ heading6: {
45325
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45326
+ fontWeight: 700,
45327
+ fontSize: "0.875rem",
45328
+ lineHeight: "1.5rem",
45329
+ letterSpacing: "normal"
45330
+ },
45331
+ paragraphIntroLede: {
45332
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45333
+ fontWeight: 400,
45334
+ fontSize: "1.25rem",
45335
+ lineHeight: "1.875rem",
45336
+ letterSpacing: "0"
45337
+ },
45338
+ paragraphBody: {
45339
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45340
+ fontWeight: 400,
45341
+ fontSize: "1rem",
45342
+ lineHeight: "1.5rem",
45343
+ letterSpacing: "normal"
45344
+ },
45345
+ paragraphSmall: {
45346
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45347
+ fontWeight: 400,
45348
+ fontSize: "0.875rem",
45349
+ lineHeight: "1.125rem",
45350
+ letterSpacing: "normal"
45351
+ },
45352
+ paragraphExtraSmall: {
45353
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45354
+ fontWeight: 400,
45355
+ fontSize: "0.75rem",
45356
+ lineHeight: "1.125rem",
45357
+ letterSpacing: "normal"
45358
+ },
45359
+ paragraphBold: {
45360
+ fontWeight: 600
45361
+ },
45362
+ buttonPrimary: {
45363
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45364
+ fontWeight: 700,
45365
+ fontSize: "1.125rem",
45366
+ lineHeight: "1.5rem",
45367
+ letterSpacing: "normal"
45368
+ },
45369
+ buttonSecondary: {
45370
+ fontFamily: '"Inter", "Noto Sans", Helvetica, Arial, sans-serif',
45371
+ fontWeight: 500,
45372
+ fontSize: "1rem",
45373
+ lineHeight: "1.5rem",
45374
+ letterSpacing: "normal"
45375
+ }
45376
+ }
45377
+ };
45378
+
45379
+ var defaultTheme = heartTheme;
45380
+
45381
+ var ThemeContext = createContext(defaultTheme);
45382
+ var ThemeProvider = function(_a) {
45383
+ var themeManager = _a.themeManager, props = __rest(_a, ["themeManager"]);
45384
+ var themeManagerInstance = useState(function() {
45385
+ return themeManager || new ThemeManager(defaultTheme);
45386
+ })[0];
45387
+ var _b = useState(themeManagerInstance.getCurrentTheme()), theme = _b[0], setTheme = _b[1];
45388
+ useEffect(function() {
45389
+ var cancelled = false;
45390
+ var listener = function(newTheme) {
45391
+ if (!cancelled)
45392
+ setTheme(newTheme);
45393
+ };
45394
+ themeManagerInstance.addThemeChangeListener(listener);
45395
+ return function() {
45396
+ cancelled = true;
45397
+ themeManagerInstance.removeThemeChangeListener(listener);
45398
+ };
45399
+ }, []);
45400
+ return React__default.createElement(
45401
+ React__default.Fragment,
45402
+ null,
45403
+ React__default.createElement(ThemeContext.Provider, { value: theme }, props.children),
45404
+ React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
45405
+ React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-demi-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
45406
+ React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-medium.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
45407
+ React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/inter/inter-regular.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" }),
45408
+ React__default.createElement("link", { rel: "preload", href: "https://d1e7r7b0lb8p4d.cloudfront.net/fonts/tiempos/tiempos-headline-bold.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" })
45409
+ );
45410
+ };
45411
+ var useTheme = function() {
45412
+ return useContext(ThemeContext);
45413
+ };
45414
+
45415
+ var KaizenProvider = function(_a) {
45416
+ var children = _a.children, themeManager = _a.themeManager;
45417
+ return React__default.createElement(ThemeProvider, { themeManager }, children);
45418
+ };
45419
+ KaizenProvider.displayName = "KaizenProvider";
45420
+
45421
+ export { Brand, Filter, FilterButton, FilterButtonRemovable, FilterContents, FilterSelect, KaizenProvider, ThemeContext, ThemeManager, ThemeProvider, defaultTheme, heartTheme, useTheme };
45404
45422
  //# sourceMappingURL=index.js.map