@cambly/syntax-core 20.6.0 → 20.7.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.
Files changed (38) hide show
  1. package/dist/Avatar/Avatar.d.ts +1 -1
  2. package/dist/Badge/Badge.d.ts +1 -1
  3. package/dist/ButtonGroup/ButtonGroup.d.ts +1 -1
  4. package/dist/Checkbox/Checkbox.d.ts +1 -1
  5. package/dist/Heading/Heading.d.ts +1 -1
  6. package/dist/RadioButton/RadioButton.d.ts +1 -1
  7. package/dist/RichSelect/RichSelectBox.d.ts +1 -1
  8. package/dist/RichSelect/RichSelectList.cjs +3 -3
  9. package/dist/RichSelect/RichSelectList.d.ts +1 -1
  10. package/dist/RichSelect/RichSelectList.js +2 -2
  11. package/dist/RichSelect/RichSelectRadioButton.d.ts +1 -1
  12. package/dist/SelectList/SelectList.cjs +3 -3
  13. package/dist/SelectList/SelectList.js +2 -2
  14. package/dist/TapArea/TapArea.d.ts +1 -1
  15. package/dist/Typography/Typography.d.ts +3 -3
  16. package/dist/WordConfetti/WordConfetti.cjs +2 -2
  17. package/dist/WordConfetti/WordConfetti.js +1 -1
  18. package/dist/__chunks/{YGFJ2STL.cjs → 5ITNEIMC.cjs} +32 -27
  19. package/dist/__chunks/5ITNEIMC.cjs.map +1 -0
  20. package/dist/__chunks/{OPDVLDRQ.js → 5R4TON7U.js} +33 -28
  21. package/dist/__chunks/5R4TON7U.js.map +1 -0
  22. package/dist/__chunks/{XJVLA3PA.cjs → 7VI7DO7P.cjs} +1 -1
  23. package/dist/__chunks/{XJVLA3PA.cjs.map → 7VI7DO7P.cjs.map} +1 -1
  24. package/dist/__chunks/{67K5GWKL.cjs → IFPLOCSV.cjs} +5 -5
  25. package/dist/__chunks/{RWJSEIJ6.js → JGDLN47H.js} +1 -1
  26. package/dist/__chunks/{RWJSEIJ6.js.map → JGDLN47H.js.map} +1 -1
  27. package/dist/__chunks/{JKEJPSO2.cjs → RZSHTFXZ.cjs} +5 -5
  28. package/dist/__chunks/{VF2KL6JX.js → WCHW3AYL.js} +2 -2
  29. package/dist/__chunks/{BMTUKQRY.js → WIKMZ7QF.js} +2 -2
  30. package/dist/index.cjs +5 -5
  31. package/dist/index.js +4 -4
  32. package/package.json +3 -3
  33. package/dist/__chunks/OPDVLDRQ.js.map +0 -1
  34. package/dist/__chunks/YGFJ2STL.cjs.map +0 -1
  35. /package/dist/__chunks/{67K5GWKL.cjs.map → IFPLOCSV.cjs.map} +0 -0
  36. /package/dist/__chunks/{JKEJPSO2.cjs.map → RZSHTFXZ.cjs.map} +0 -0
  37. /package/dist/__chunks/{VF2KL6JX.js.map → WCHW3AYL.js.map} +0 -0
  38. /package/dist/__chunks/{BMTUKQRY.js.map → WIKMZ7QF.js.map} +0 -0
@@ -25,7 +25,7 @@ declare const Avatar: ({ accessibilityLabel, icon, size, src, }: {
25
25
  *
26
26
  * @defaultValue `md`
27
27
  */
28
- size?: "md" | "sm" | "xs" | "lg" | "xl" | undefined;
28
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
29
29
  /**
30
30
  * URL of the image to display as the avatar.
31
31
  */
@@ -11,7 +11,7 @@ declare const Badge: ({ icon: Icon, text, color, }: {
11
11
  className?: string | undefined;
12
12
  }> | React.ComponentType<{
13
13
  color?: "inherit" | "black" | "destructive100" | "destructive200" | "destructive300" | "destructive700" | "destructive800" | "destructive900" | "gray10" | "gray100" | "gray200" | "gray30" | "gray60" | "gray300" | "gray700" | "gray80" | "gray800" | "gray900" | "orange100" | "orange200" | "orange300" | "orange700" | "orange800" | "orange900" | "primary100" | "primary200" | "primary300" | "primary700" | "primary800" | "primary900" | "purple100" | "purple200" | "purple300" | "purple700" | "purple800" | "purple900" | "success100" | "success200" | "success300" | "success700" | "success800" | "success900" | "white" | "white40" | "white70" | "yellow100" | "yellow200" | "yellow300" | "yellow700" | "yellow800" | "yellow900" | "gray270" | "gray370" | "gray870" | "cream" | "lilac" | "navy" | "orange" | "pink" | "purple" | "red" | "sky" | "slate" | "tan" | "teal" | "thistle" | undefined;
14
- size?: 100 | 200 | 300 | 400 | 500 | 700 | 800 | 900 | 600 | 1000 | undefined;
14
+ size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | undefined;
15
15
  path?: string | undefined;
16
16
  } & React.RefAttributes<SVGSVGElement>> | undefined;
17
17
  /**
@@ -23,7 +23,7 @@ declare const ButtonGroup: ({ orientation, size, children, smOrientation, lgOrie
23
23
  *
24
24
  * @defaultValue "md"
25
25
  */
26
- size?: "md" | "sm" | "lg" | undefined;
26
+ size?: "sm" | "md" | "lg" | undefined;
27
27
  /**
28
28
  * Buttons to be rendered inside the button group
29
29
  */
@@ -32,7 +32,7 @@ declare const Checkbox: ({ checked, "data-testid": dataTestId, disabled: disable
32
32
  *
33
33
  * @defaultValue "md"
34
34
  */
35
- size?: "md" | "sm" | undefined;
35
+ size?: "sm" | "md" | undefined;
36
36
  /**
37
37
  * The text accompanying the checkbox
38
38
  */
@@ -11,7 +11,7 @@ declare const Heading: ({ align, as, children, color, "data-testid": dataTestId,
11
11
  *
12
12
  * @defaultValue "start"
13
13
  */
14
- align?: "center" | "end" | "start" | "forceLeft" | "forceRight" | undefined;
14
+ align?: "center" | "start" | "end" | "forceLeft" | "forceRight" | undefined;
15
15
  /**
16
16
  * DOM element to render as.
17
17
  *
@@ -50,7 +50,7 @@ declare const RadioButton: ({ checked, "data-testid": dataTestId, dangerouslyFor
50
50
  *
51
51
  * @defaultValue "md"
52
52
  */
53
- size?: "md" | "sm" | undefined;
53
+ size?: "sm" | "md" | undefined;
54
54
  /**
55
55
  * Value of the selected radio option
56
56
  */
@@ -49,7 +49,7 @@ declare const _default: React__default.ForwardRefExoticComponent<RichSelectBoxPr
49
49
  Chip: React__default.ForwardRefExoticComponent<RichSelectItemProps & React__default.RefAttributes<HTMLDivElement>>;
50
50
  RadioButton: React__default.ForwardRefExoticComponent<RichSelectItemProps & {
51
51
  name: string;
52
- size?: "md" | "sm" | undefined;
52
+ size?: "sm" | "md" | undefined;
53
53
  } & React__default.RefAttributes<HTMLDivElement>>;
54
54
  };
55
55
 
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _JKEJPSO2cjs = require('../__chunks/JKEJPSO2.cjs');
4
+ var _RZSHTFXZcjs = require('../__chunks/RZSHTFXZ.cjs');
5
5
  require('../__chunks/IJHKE2Y3.cjs');
6
6
  require('../__chunks/RHJARLXB.cjs');
7
7
  require('../__chunks/OKT24L6D.cjs');
8
8
  require('../__chunks/KFNK5PLG.cjs');
9
9
  require('../__chunks/WFVGNGEP.cjs');
10
- require('../__chunks/XJVLA3PA.cjs');
10
+ require('../__chunks/7VI7DO7P.cjs');
11
11
  require('../__chunks/AFOQ6JVB.cjs');
12
12
  require('../__chunks/6KSVCCCB.cjs');
13
13
  require('../__chunks/BVNFNAUO.cjs');
@@ -47,5 +47,5 @@ require('../__chunks/E5P6WRJD.cjs');
47
47
  require('../__chunks/X2SDR4SD.cjs');
48
48
 
49
49
 
50
- exports.default = _JKEJPSO2cjs.RichSelectList_default;
50
+ exports.default = _RZSHTFXZcjs.RichSelectList_default;
51
51
  //# sourceMappingURL=RichSelectList.cjs.map
@@ -74,7 +74,7 @@ declare const _default: typeof RichSelectList & {
74
74
  Chip: React__default.ForwardRefExoticComponent<RichSelectItemProps & React__default.RefAttributes<HTMLDivElement>>;
75
75
  RadioButton: React__default.ForwardRefExoticComponent<RichSelectItemProps & {
76
76
  name: string;
77
- size?: "md" | "sm" | undefined;
77
+ size?: "sm" | "md" | undefined;
78
78
  } & React__default.RefAttributes<HTMLDivElement>>;
79
79
  };
80
80
 
@@ -1,13 +1,13 @@
1
1
  "use client"
2
2
  import {
3
3
  RichSelectList_default
4
- } from "../__chunks/BMTUKQRY.js";
4
+ } from "../__chunks/WIKMZ7QF.js";
5
5
  import "../__chunks/IUMHK3GF.js";
6
6
  import "../__chunks/VZUFYOET.js";
7
7
  import "../__chunks/QVK3VV5M.js";
8
8
  import "../__chunks/SZTZ3IZ5.js";
9
9
  import "../__chunks/4U4UW4AK.js";
10
- import "../__chunks/RWJSEIJ6.js";
10
+ import "../__chunks/JGDLN47H.js";
11
11
  import "../__chunks/RJS7BKZD.js";
12
12
  import "../__chunks/36DG472B.js";
13
13
  import "../__chunks/DZNR7V5P.js";
@@ -5,7 +5,7 @@ import 'react-aria';
5
5
 
6
6
  declare const _default: React__default.ForwardRefExoticComponent<RichSelectItemProps & {
7
7
  name: string;
8
- size?: "md" | "sm" | undefined;
8
+ size?: "sm" | "md" | undefined;
9
9
  } & React__default.RefAttributes<HTMLDivElement>>;
10
10
 
11
11
  export { _default as default };
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _67K5GWKLcjs = require('../__chunks/67K5GWKL.cjs');
4
+ var _IFPLOCSVcjs = require('../__chunks/IFPLOCSV.cjs');
5
5
  require('../__chunks/JVGX637E.cjs');
6
- require('../__chunks/XJVLA3PA.cjs');
6
+ require('../__chunks/7VI7DO7P.cjs');
7
7
  require('../__chunks/XLUVINJW.cjs');
8
8
  require('../__chunks/QODNNCT2.cjs');
9
9
  require('../__chunks/WFVGNGEP.cjs');
@@ -18,5 +18,5 @@ require('../__chunks/NOELZTQX.cjs');
18
18
  require('../__chunks/X2SDR4SD.cjs');
19
19
 
20
20
 
21
- exports.default = _67K5GWKLcjs.SelectList;
21
+ exports.default = _IFPLOCSVcjs.SelectList;
22
22
  //# sourceMappingURL=SelectList.cjs.map
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  import {
3
3
  SelectList
4
- } from "../__chunks/VF2KL6JX.js";
4
+ } from "../__chunks/WCHW3AYL.js";
5
5
  import "../__chunks/SPQ7DQHG.js";
6
- import "../__chunks/RWJSEIJ6.js";
6
+ import "../__chunks/JGDLN47H.js";
7
7
  import "../__chunks/KKADUD65.js";
8
8
  import "../__chunks/IB6JZQF3.js";
9
9
  import "../__chunks/4U4UW4AK.js";
@@ -48,7 +48,7 @@ declare const TapArea: React__default.ForwardRefExoticComponent<React__default.A
48
48
  *
49
49
  * @defaultValue "none"
50
50
  */
51
- rounding?: "none" | "md" | "sm" | "full" | undefined;
51
+ rounding?: "sm" | "md" | "full" | "none" | undefined;
52
52
  /**
53
53
  * The tab index of the tap area
54
54
  */
@@ -12,7 +12,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
12
12
  *
13
13
  * @defaultValue "start"
14
14
  */
15
- align?: "center" | "end" | "start" | "forceLeft" | "forceRight" | undefined;
15
+ align?: "center" | "start" | "end" | "forceLeft" | "forceRight" | undefined;
16
16
  /**
17
17
  * DOM element to render as.
18
18
  *
@@ -28,7 +28,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
28
28
  *
29
29
  * @defaultValue "gray900"
30
30
  */
31
- color?: "inherit" | "gray700" | "gray900" | "white" | "primary" | "destructive-primary" | "destructive-lightBackground" | "destructive-darkBackground" | "success" | "success-darkBackground" | "white-secondary" | undefined;
31
+ color?: "inherit" | "gray700" | "gray900" | "white" | "primary" | "destructive-primary" | "success" | "destructive-darkBackground" | "destructive-lightBackground" | "success-darkBackground" | "white-secondary" | undefined;
32
32
  /**
33
33
  * Test id for the text
34
34
  */
@@ -111,7 +111,7 @@ declare const Typography: React.ForwardRefExoticComponent<{
111
111
  *
112
112
  * @defaultValue "regular"
113
113
  */
114
- weight?: "bold" | "regular" | "medium" | "semiBold" | undefined;
114
+ weight?: "regular" | "medium" | "semiBold" | "bold" | undefined;
115
115
  } & React.RefAttributes<HTMLDivElement>>;
116
116
 
117
117
  export { Typography as default };
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _YGFJ2STLcjs = require('../__chunks/YGFJ2STL.cjs');
4
+ var _5ITNEIMCcjs = require('../__chunks/5ITNEIMC.cjs');
5
5
  require('../__chunks/QODNNCT2.cjs');
6
6
  require('../__chunks/WFVGNGEP.cjs');
7
7
 
@@ -13,5 +13,5 @@ require('../__chunks/2XIVACBM.cjs');
13
13
  require('../__chunks/X2SDR4SD.cjs');
14
14
 
15
15
 
16
- exports.default = _YGFJ2STLcjs.WordConfetti_default;
16
+ exports.default = _5ITNEIMCcjs.WordConfetti_default;
17
17
  //# sourceMappingURL=WordConfetti.cjs.map
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  WordConfetti_default
4
- } from "../__chunks/OPDVLDRQ.js";
4
+ } from "../__chunks/5R4TON7U.js";
5
5
  import "../__chunks/IB6JZQF3.js";
6
6
  import "../__chunks/4U4UW4AK.js";
7
7
  import "../__chunks/4U4UW4AK.js";
@@ -14,7 +14,7 @@ var themeBackgroundColors = {
14
14
  cool: ["sky", "slate", "teal"],
15
15
  warm: ["red", "tan", "orange"]
16
16
  };
17
- var degreeOfTiltOptions = [-6, -6, -3, -3, 0, 3, 3, 6, 6];
17
+ var degreeOfTiltOptions = [-6, -3, 0, 3, 6];
18
18
  var paddings = {
19
19
  300: "16px 20px 16px 20px",
20
20
  400: "20px 24px 20px 24px",
@@ -31,15 +31,30 @@ var gaps = {
31
31
  900: 9,
32
32
  1100: 10
33
33
  };
34
+ var hashWord = (string) => {
35
+ let hash = 0;
36
+ if (string.length === 0)
37
+ return hash;
38
+ for (let i = 0; i < string.length; i++) {
39
+ const char = string.charCodeAt(i);
40
+ hash = (hash << 5) - hash + char;
41
+ hash |= 0;
42
+ }
43
+ return Math.abs(hash);
44
+ };
34
45
  var WordConfetto = ({
35
- backgroundColor,
36
- rotation,
46
+ "data-testid": dataTestId,
37
47
  size,
38
- text
48
+ text,
49
+ theme
39
50
  }) => {
51
+ const hash = hashWord(text);
52
+ const backgroundColor = themeBackgroundColors[theme][hash % Object.values(themeBackgroundColors[theme]).length];
53
+ const rotation = degreeOfTiltOptions[hash % degreeOfTiltOptions.length];
40
54
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
41
55
  _QODNNCT2cjs.Box_default,
42
56
  {
57
+ "data-testid": dataTestId,
43
58
  backgroundColor,
44
59
  dangerouslySetInlineStyle: {
45
60
  __style: {
@@ -61,14 +76,6 @@ var WordConfetti = _react.forwardRef.call(void 0,
61
76
  theme,
62
77
  words
63
78
  } = props;
64
- const styledWords = _react.useMemo.call(void 0,
65
- () => words.map((word) => ({
66
- text: word,
67
- backgroundColor: themeBackgroundColors[theme][Math.floor(Math.random() * 3)],
68
- rotation: degreeOfTiltOptions[Math.floor(Math.random() * 9)]
69
- })),
70
- [theme, words]
71
- );
72
79
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
73
80
  _QODNNCT2cjs.Box_default,
74
81
  {
@@ -78,20 +85,18 @@ var WordConfetti = _react.forwardRef.call(void 0,
78
85
  "data-testid": dataTestId,
79
86
  ref,
80
87
  gap: gaps[size],
81
- children: styledWords.map(
82
- ({ text, backgroundColor, rotation }, index) => {
83
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
84
- WordConfetto,
85
- {
86
- backgroundColor,
87
- rotation,
88
- size,
89
- text
90
- },
91
- `${text}+${index}`
92
- );
93
- }
94
- )
88
+ children: words.map((word, index) => {
89
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
90
+ WordConfetto,
91
+ {
92
+ "data-testid": dataTestId ? `${dataTestId}-${index}` : void 0,
93
+ size,
94
+ text: word,
95
+ theme
96
+ },
97
+ `${word}${index}`
98
+ );
99
+ })
95
100
  }
96
101
  );
97
102
  }
@@ -101,4 +106,4 @@ var WordConfetti_default = WordConfetti;
101
106
 
102
107
 
103
108
  exports.WordConfetti_default = WordConfetti_default;
104
- //# sourceMappingURL=YGFJ2STL.cjs.map
109
+ //# sourceMappingURL=5ITNEIMC.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/WordConfetti/WordConfetti.tsx"],"names":["WordConfetti"],"mappings":";;;;;;;;;AAAA,SAAyB,kBAAqC;AAuExD;AAnEN,IAAM,wBAAwB;AAAA,EAC5B,SAAS,CAAC,QAAQ,SAAS,SAAS;AAAA,EACpC,MAAM,CAAC,OAAO,SAAS,MAAM;AAAA,EAC7B,MAAM,CAAC,OAAO,OAAO,QAAQ;AAC/B;AAEA,IAAM,sBAAsB,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC;AAE5C,IAAM,WAAW;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,OAAO;AAAA,EACX,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,WAAW,CAAC,WAA2B;AAC3C,MAAI,OAAO;AACX,MAAI,OAAO,WAAW;AAAG,WAAO;AAChC,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,UAAM,OAAO,OAAO,WAAW,CAAC;AAChC,YAAQ,QAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,KAAK,IAAI,IAAI;AACtB;AAEA,IAAM,eAAe,CAAC;AAAA,EACpB,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACF,MAKoB;AAClB,QAAM,OAAO,SAAS,IAAI;AAC1B,QAAM,kBACJ,sBAAsB,KAAK,EACzB,OAAO,OAAO,OAAO,sBAAsB,KAAK,CAAC,EAAE,MACrD;AACF,QAAM,WAAW,oBAAoB,OAAO,oBAAoB,MAAM;AAEtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb;AAAA,MACA,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,SAAS,IAAI;AAAA,UACtB,WAAW,UAAU;AAAA,QACvB;AAAA,MACF;AAAA,MACA,OAAM;AAAA,MAEN,8BAAC,sBAAW,MAAY,QAAO,QAAO,WAAU,SAC7C,gBACH;AAAA;AAAA,EACF;AAEJ;AA8BA,IAAM,eAAe;AAAA,EACnB,SAASA,cAAa,OAA0B,KAAkB;AAChE,UAAM;AAAA,MACJ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAEJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR;AAAA,QACA,UAAS;AAAA,QACT,eAAa;AAAA,QACb;AAAA,QACA,KAAK,KAAK,IAAI;AAAA,QAEb,gBAAM,IAAI,CAAC,MAAM,UAAqB;AACrC,iBACE;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,aAAa,GAAG,cAAc,UAAU;AAAA,cAErD;AAAA,cACA,MAAM;AAAA,cACN;AAAA;AAAA,YAHK,GAAG,OAAO;AAAA,UAIjB;AAAA,QAEJ,CAAC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ","sourcesContent":["import { type ReactNode, forwardRef, type ReactElement } from \"react\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\n\nconst themeBackgroundColors = {\n neutral: [\"pink\", \"lilac\", \"thistle\"],\n cool: [\"sky\", \"slate\", \"teal\"],\n warm: [\"red\", \"tan\", \"orange\"],\n} as const;\n\nconst degreeOfTiltOptions = [-6, -3, 0, 3, 6] as const;\n\nconst paddings = {\n 300: \"16px 20px 16px 20px\",\n 400: \"20px 24px 20px 24px\",\n 700: \"24px 28px 24px 28px\",\n 800: \"28px 40px 28px 40px\",\n 900: \"32px 48px 32px 48px\",\n 1100: \"36px 56px 36px 56px\",\n};\n\nconst gaps = {\n 300: 3,\n 400: 4,\n 700: 6,\n 800: 6,\n 900: 9,\n 1100: 10,\n} as const;\n\nconst hashWord = (string: string): number => {\n let hash = 0;\n if (string.length === 0) return hash;\n for (let i = 0; i < string.length; i++) {\n const char = string.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash |= 0; // Convert to 32bit integer\n }\n return Math.abs(hash);\n};\n\nconst WordConfetto = ({\n \"data-testid\": dataTestId,\n size,\n text,\n theme,\n}: {\n \"data-testid\"?: string;\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n text: string;\n theme: \"neutral\" | \"cool\" | \"warm\";\n}): ReactElement => {\n const hash = hashWord(text);\n const backgroundColor =\n themeBackgroundColors[theme][\n hash % Object.values(themeBackgroundColors[theme]).length\n ];\n const rotation = degreeOfTiltOptions[hash % degreeOfTiltOptions.length];\n\n return (\n <Box\n data-testid={dataTestId}\n backgroundColor={backgroundColor}\n dangerouslySetInlineStyle={{\n __style: {\n padding: paddings[size],\n transform: `rotate(${rotation}deg)`,\n },\n }}\n width=\"fit-content\"\n >\n <Typography size={size} weight=\"bold\" fontStyle=\"serif\">\n {text}\n </Typography>\n </Box>\n );\n};\n\ntype Direction = \"row\" | \"column\";\ntype WordConfettiProps = {\n /**\n * Test id for the confetti\n */\n \"data-testid\"?: string;\n /**\n * The direction to display the words.\n * @defaultValue row\n */\n direction?: Direction;\n /**\n * The size of the font in the confetti.\n */\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The theme for the background colors of the confetti.\n */\n theme: \"neutral\" | \"cool\" | \"warm\";\n /**\n * The words to display as confetti.\n */\n words: string[];\n};\n\n/**\n * [WordConfetti](https://cambly-syntax.vercel.app/?path=/docs/components-wordconfetti--docs) is a container for displaying words in different color themes and fun offset angles.\n */\nconst WordConfetti = forwardRef<HTMLDivElement, WordConfettiProps>(\n function WordConfetti(props: WordConfettiProps, ref): JSX.Element {\n const {\n \"data-testid\": dataTestId,\n direction = \"row\",\n size,\n theme,\n words,\n } = props;\n\n return (\n <Box\n display=\"flex\"\n direction={direction}\n flexWrap=\"wrap\"\n data-testid={dataTestId}\n ref={ref}\n gap={gaps[size]}\n >\n {words.map((word, index): ReactNode => {\n return (\n <WordConfetto\n data-testid={dataTestId ? `${dataTestId}-${index}` : undefined}\n key={`${word}${index}`}\n size={size}\n text={word}\n theme={theme}\n />\n );\n })}\n </Box>\n );\n },\n);\n\nexport default WordConfetti;\n"]}
@@ -7,14 +7,14 @@ import {
7
7
  } from "./RVPSNO77.js";
8
8
 
9
9
  // src/WordConfetti/WordConfetti.tsx
10
- import { forwardRef, useMemo } from "react";
10
+ import { forwardRef } from "react";
11
11
  import { jsx } from "react/jsx-runtime";
12
12
  var themeBackgroundColors = {
13
13
  neutral: ["pink", "lilac", "thistle"],
14
14
  cool: ["sky", "slate", "teal"],
15
15
  warm: ["red", "tan", "orange"]
16
16
  };
17
- var degreeOfTiltOptions = [-6, -6, -3, -3, 0, 3, 3, 6, 6];
17
+ var degreeOfTiltOptions = [-6, -3, 0, 3, 6];
18
18
  var paddings = {
19
19
  300: "16px 20px 16px 20px",
20
20
  400: "20px 24px 20px 24px",
@@ -31,15 +31,30 @@ var gaps = {
31
31
  900: 9,
32
32
  1100: 10
33
33
  };
34
+ var hashWord = (string) => {
35
+ let hash = 0;
36
+ if (string.length === 0)
37
+ return hash;
38
+ for (let i = 0; i < string.length; i++) {
39
+ const char = string.charCodeAt(i);
40
+ hash = (hash << 5) - hash + char;
41
+ hash |= 0;
42
+ }
43
+ return Math.abs(hash);
44
+ };
34
45
  var WordConfetto = ({
35
- backgroundColor,
36
- rotation,
46
+ "data-testid": dataTestId,
37
47
  size,
38
- text
48
+ text,
49
+ theme
39
50
  }) => {
51
+ const hash = hashWord(text);
52
+ const backgroundColor = themeBackgroundColors[theme][hash % Object.values(themeBackgroundColors[theme]).length];
53
+ const rotation = degreeOfTiltOptions[hash % degreeOfTiltOptions.length];
40
54
  return /* @__PURE__ */ jsx(
41
55
  Box_default,
42
56
  {
57
+ "data-testid": dataTestId,
43
58
  backgroundColor,
44
59
  dangerouslySetInlineStyle: {
45
60
  __style: {
@@ -61,14 +76,6 @@ var WordConfetti = forwardRef(
61
76
  theme,
62
77
  words
63
78
  } = props;
64
- const styledWords = useMemo(
65
- () => words.map((word) => ({
66
- text: word,
67
- backgroundColor: themeBackgroundColors[theme][Math.floor(Math.random() * 3)],
68
- rotation: degreeOfTiltOptions[Math.floor(Math.random() * 9)]
69
- })),
70
- [theme, words]
71
- );
72
79
  return /* @__PURE__ */ jsx(
73
80
  Box_default,
74
81
  {
@@ -78,20 +85,18 @@ var WordConfetti = forwardRef(
78
85
  "data-testid": dataTestId,
79
86
  ref,
80
87
  gap: gaps[size],
81
- children: styledWords.map(
82
- ({ text, backgroundColor, rotation }, index) => {
83
- return /* @__PURE__ */ jsx(
84
- WordConfetto,
85
- {
86
- backgroundColor,
87
- rotation,
88
- size,
89
- text
90
- },
91
- `${text}+${index}`
92
- );
93
- }
94
- )
88
+ children: words.map((word, index) => {
89
+ return /* @__PURE__ */ jsx(
90
+ WordConfetto,
91
+ {
92
+ "data-testid": dataTestId ? `${dataTestId}-${index}` : void 0,
93
+ size,
94
+ text: word,
95
+ theme
96
+ },
97
+ `${word}${index}`
98
+ );
99
+ })
95
100
  }
96
101
  );
97
102
  }
@@ -101,4 +106,4 @@ var WordConfetti_default = WordConfetti;
101
106
  export {
102
107
  WordConfetti_default
103
108
  };
104
- //# sourceMappingURL=OPDVLDRQ.js.map
109
+ //# sourceMappingURL=5R4TON7U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/WordConfetti/WordConfetti.tsx"],"sourcesContent":["import { type ReactNode, forwardRef, type ReactElement } from \"react\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\n\nconst themeBackgroundColors = {\n neutral: [\"pink\", \"lilac\", \"thistle\"],\n cool: [\"sky\", \"slate\", \"teal\"],\n warm: [\"red\", \"tan\", \"orange\"],\n} as const;\n\nconst degreeOfTiltOptions = [-6, -3, 0, 3, 6] as const;\n\nconst paddings = {\n 300: \"16px 20px 16px 20px\",\n 400: \"20px 24px 20px 24px\",\n 700: \"24px 28px 24px 28px\",\n 800: \"28px 40px 28px 40px\",\n 900: \"32px 48px 32px 48px\",\n 1100: \"36px 56px 36px 56px\",\n};\n\nconst gaps = {\n 300: 3,\n 400: 4,\n 700: 6,\n 800: 6,\n 900: 9,\n 1100: 10,\n} as const;\n\nconst hashWord = (string: string): number => {\n let hash = 0;\n if (string.length === 0) return hash;\n for (let i = 0; i < string.length; i++) {\n const char = string.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n hash |= 0; // Convert to 32bit integer\n }\n return Math.abs(hash);\n};\n\nconst WordConfetto = ({\n \"data-testid\": dataTestId,\n size,\n text,\n theme,\n}: {\n \"data-testid\"?: string;\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n text: string;\n theme: \"neutral\" | \"cool\" | \"warm\";\n}): ReactElement => {\n const hash = hashWord(text);\n const backgroundColor =\n themeBackgroundColors[theme][\n hash % Object.values(themeBackgroundColors[theme]).length\n ];\n const rotation = degreeOfTiltOptions[hash % degreeOfTiltOptions.length];\n\n return (\n <Box\n data-testid={dataTestId}\n backgroundColor={backgroundColor}\n dangerouslySetInlineStyle={{\n __style: {\n padding: paddings[size],\n transform: `rotate(${rotation}deg)`,\n },\n }}\n width=\"fit-content\"\n >\n <Typography size={size} weight=\"bold\" fontStyle=\"serif\">\n {text}\n </Typography>\n </Box>\n );\n};\n\ntype Direction = \"row\" | \"column\";\ntype WordConfettiProps = {\n /**\n * Test id for the confetti\n */\n \"data-testid\"?: string;\n /**\n * The direction to display the words.\n * @defaultValue row\n */\n direction?: Direction;\n /**\n * The size of the font in the confetti.\n */\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The theme for the background colors of the confetti.\n */\n theme: \"neutral\" | \"cool\" | \"warm\";\n /**\n * The words to display as confetti.\n */\n words: string[];\n};\n\n/**\n * [WordConfetti](https://cambly-syntax.vercel.app/?path=/docs/components-wordconfetti--docs) is a container for displaying words in different color themes and fun offset angles.\n */\nconst WordConfetti = forwardRef<HTMLDivElement, WordConfettiProps>(\n function WordConfetti(props: WordConfettiProps, ref): JSX.Element {\n const {\n \"data-testid\": dataTestId,\n direction = \"row\",\n size,\n theme,\n words,\n } = props;\n\n return (\n <Box\n display=\"flex\"\n direction={direction}\n flexWrap=\"wrap\"\n data-testid={dataTestId}\n ref={ref}\n gap={gaps[size]}\n >\n {words.map((word, index): ReactNode => {\n return (\n <WordConfetto\n data-testid={dataTestId ? `${dataTestId}-${index}` : undefined}\n key={`${word}${index}`}\n size={size}\n text={word}\n theme={theme}\n />\n );\n })}\n </Box>\n );\n },\n);\n\nexport default WordConfetti;\n"],"mappings":";;;;;;;;;AAAA,SAAyB,kBAAqC;AAuExD;AAnEN,IAAM,wBAAwB;AAAA,EAC5B,SAAS,CAAC,QAAQ,SAAS,SAAS;AAAA,EACpC,MAAM,CAAC,OAAO,SAAS,MAAM;AAAA,EAC7B,MAAM,CAAC,OAAO,OAAO,QAAQ;AAC/B;AAEA,IAAM,sBAAsB,CAAC,IAAI,IAAI,GAAG,GAAG,CAAC;AAE5C,IAAM,WAAW;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,OAAO;AAAA,EACX,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,WAAW,CAAC,WAA2B;AAC3C,MAAI,OAAO;AACX,MAAI,OAAO,WAAW;AAAG,WAAO;AAChC,WAAS,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;AACtC,UAAM,OAAO,OAAO,WAAW,CAAC;AAChC,YAAQ,QAAQ,KAAK,OAAO;AAC5B,YAAQ;AAAA,EACV;AACA,SAAO,KAAK,IAAI,IAAI;AACtB;AAEA,IAAM,eAAe,CAAC;AAAA,EACpB,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACF,MAKoB;AAClB,QAAM,OAAO,SAAS,IAAI;AAC1B,QAAM,kBACJ,sBAAsB,KAAK,EACzB,OAAO,OAAO,OAAO,sBAAsB,KAAK,CAAC,EAAE,MACrD;AACF,QAAM,WAAW,oBAAoB,OAAO,oBAAoB,MAAM;AAEtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa;AAAA,MACb;AAAA,MACA,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,SAAS,IAAI;AAAA,UACtB,WAAW,UAAU;AAAA,QACvB;AAAA,MACF;AAAA,MACA,OAAM;AAAA,MAEN,8BAAC,sBAAW,MAAY,QAAO,QAAO,WAAU,SAC7C,gBACH;AAAA;AAAA,EACF;AAEJ;AA8BA,IAAM,eAAe;AAAA,EACnB,SAASA,cAAa,OAA0B,KAAkB;AAChE,UAAM;AAAA,MACJ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAEJ,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR;AAAA,QACA,UAAS;AAAA,QACT,eAAa;AAAA,QACb;AAAA,QACA,KAAK,KAAK,IAAI;AAAA,QAEb,gBAAM,IAAI,CAAC,MAAM,UAAqB;AACrC,iBACE;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,aAAa,GAAG,cAAc,UAAU;AAAA,cAErD;AAAA,cACA,MAAM;AAAA,cACN;AAAA;AAAA,YAHK,GAAG,OAAO;AAAA,UAIjB;AAAA,QAEJ,CAAC;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;","names":["WordConfetti"]}
@@ -10,4 +10,4 @@ var ColorCambioWhite100 = "#ffffff";
10
10
 
11
11
 
12
12
  exports.ColorBaseDestructive700 = ColorBaseDestructive700; exports.ColorBaseGray700 = ColorBaseGray700; exports.ColorCambioWhite100 = ColorCambioWhite100;
13
- //# sourceMappingURL=XJVLA3PA.cjs.map
13
+ //# sourceMappingURL=7VI7DO7P.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"names":[],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AAqCzB,IAAM,sBAAsB","sourcesContent":["/**\n * Do not edit directly\n * Generated on Fri, 27 Sep 2024 17:29:00 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"]}
1
+ {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"names":[],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AAqCzB,IAAM,sBAAsB","sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 01 Oct 2024 21:18:21 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"]}
@@ -6,7 +6,7 @@ var _JVGX637Ecjs = require('./JVGX637E.cjs');
6
6
 
7
7
 
8
8
 
9
- var _XJVLA3PAcjs = require('./XJVLA3PA.cjs');
9
+ var _7VI7DO7Pcjs = require('./7VI7DO7P.cjs');
10
10
 
11
11
 
12
12
  var _XLUVINJWcjs = require('./XLUVINJW.cjs');
@@ -66,12 +66,12 @@ function SelectList({
66
66
  };
67
67
  const getArrowIconColor = () => {
68
68
  if (errorText) {
69
- return _XJVLA3PAcjs.ColorBaseDestructive700;
69
+ return _7VI7DO7Pcjs.ColorBaseDestructive700;
70
70
  } else {
71
71
  if (on === "darkBackground") {
72
- return _XJVLA3PAcjs.ColorCambioWhite100;
72
+ return _7VI7DO7Pcjs.ColorCambioWhite100;
73
73
  } else {
74
- return _XJVLA3PAcjs.ColorBaseGray700;
74
+ return _7VI7DO7Pcjs.ColorBaseGray700;
75
75
  }
76
76
  }
77
77
  };
@@ -140,4 +140,4 @@ SelectList.Option = _JVGX637Ecjs.SelectOption_default;
140
140
 
141
141
 
142
142
  exports.SelectList = SelectList;
143
- //# sourceMappingURL=67K5GWKL.cjs.map
143
+ //# sourceMappingURL=IFPLOCSV.cjs.map
@@ -10,4 +10,4 @@ export {
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
12
  };
13
- //# sourceMappingURL=RWJSEIJ6.js.map
13
+ //# sourceMappingURL=JGDLN47H.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Fri, 27 Sep 2024 17:29:00 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AAqCzB,IAAM,sBAAsB;","names":[]}
1
+ {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Tue, 01 Oct 2024 21:18:21 GMT\n */\n\nexport const ColorBaseBlack = \"#000000\";\nexport const ColorBaseDestructive100 = \"#fef3f5\";\nexport const ColorBaseDestructive200 = \"#fad6de\";\nexport const ColorBaseDestructive300 = \"#f2a2b2\";\nexport const ColorBaseDestructive700 = \"#d32a4b\";\nexport const ColorBaseDestructive800 = \"#81162c\";\nexport const ColorBaseDestructive900 = \"#55101d\";\nexport const ColorBaseGray10 = \"#cbcbcb\"; // Used as the default color for dividers and inner strokes\nexport const ColorBaseGray30 = \"#000000\"; // For IconButton background when on top of an image\nexport const ColorBaseGray60 = \"#000000\"; // Used for icon background in classroom video grid\nexport const ColorBaseGray80 = \"#000000\"; // Used as the background for modals\nexport const ColorBaseGray100 = \"#f7f7f7\";\nexport const ColorBaseGray200 = \"#f0f0f0\"; // Used for light mode backgrounds when showing card content on top\nexport const ColorBaseGray300 = \"#d0d0d0\"; // Used for component outlines, eg: select and textfield\nexport const ColorBaseGray700 = \"#767676\"; // For secondary text in light mode\nexport const ColorBaseGray800 = \"#353535\";\nexport const ColorBaseGray900 = \"#191919\"; // Default text color, Classroom background\nexport const ColorBaseOrange100 = \"#fdf2f0\";\nexport const ColorBaseOrange200 = \"#f6cdc4\";\nexport const ColorBaseOrange300 = \"#ec9987\";\nexport const ColorBaseOrange700 = \"#c34124\";\nexport const ColorBaseOrange800 = \"#732818\";\nexport const ColorBaseOrange900 = \"#4d1a10\";\nexport const ColorBasePrimary100 = \"#eff6fa\";\nexport const ColorBasePrimary200 = \"#c1dbe7\";\nexport const ColorBasePrimary300 = \"#84b7d0\";\nexport const ColorBasePrimary700 = \"#236482\";\nexport const ColorBasePrimary800 = \"#274858\";\nexport const ColorBasePrimary900 = \"#1b303b\";\nexport const ColorBaseSuccess100 = \"#eff7f1\";\nexport const ColorBaseSuccess200 = \"#bddcc6\";\nexport const ColorBaseSuccess300 = \"#81ba92\";\nexport const ColorBaseSuccess700 = \"#397b4d\";\nexport const ColorBaseSuccess800 = \"#2d4936\";\nexport const ColorBaseSuccess900 = \"#1e3124\";\nexport const ColorBasePurple100 = \"#f9f5fa\";\nexport const ColorBasePurple200 = \"#e8dceb\";\nexport const ColorBasePurple300 = \"#cdb4d3\";\nexport const ColorBasePurple700 = \"#8b5f95\";\nexport const ColorBasePurple800 = \"#523b58\";\nexport const ColorBasePurple900 = \"#37273b\";\nexport const ColorBaseYellow100 = \"#fdf5d9\";\nexport const ColorBaseYellow200 = \"#fbe8a3\";\nexport const ColorBaseYellow300 = \"#f8d663\";\nexport const ColorBaseYellow700 = \"#ffc929\";\nexport const ColorBaseYellow800 = \"#765f1c\";\nexport const ColorBaseYellow900 = \"#3b3009\";\nexport const ColorBaseWhite = \"#ffffff\";\nexport const ColorCambioBlack = \"#050500\";\nexport const ColorCambioWhite40 = \"#ffffff\";\nexport const ColorCambioWhite70 = \"#ffffff\";\nexport const ColorCambioWhite100 = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray270 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#5e5952\";\nexport const ColorCambioGray800 = \"#363432\";\nexport const ColorCambioGray870 = \"#5e5952\";\nexport const ColorCambioGray900 = \"#262625\";\nexport const ColorCambioDestructive100 = \"#ffdeda\";\nexport const ColorCambioDestructive300 = \"#ff8071\";\nexport const ColorCambioDestructive370 = \"#ff8071\";\nexport const ColorCambioDestructive700 = \"#c93f32\";\nexport const ColorCambioDestructive770 = \"#c93f32\";\nexport const ColorCambioDestructive900 = \"#6d0002\";\nexport const ColorCambioSuccess100 = \"#daf2c8\";\nexport const ColorCambioSuccess300 = \"#84ce64\";\nexport const ColorCambioSuccess370 = \"#84ce64\";\nexport const ColorCambioSuccess700 = \"#3c7f20\";\nexport const ColorCambioSuccess770 = \"#3c7f20\";\nexport const ColorCambioSuccess900 = \"#103e00\";\nexport const ColorCambioRed = \"#f56e56\";\nexport const ColorCambioOrange = \"#ff8f57\";\nexport const ColorCambioTan = \"#ffb47d\";\nexport const ColorCambioCream = \"#fffad1\";\nexport const ColorCambioPurple = \"#6840a8\";\nexport const ColorCambioLilac = \"#b59ef0\";\nexport const ColorCambioThistle = \"#d69ca4\";\nexport const ColorCambioPink = \"#ffccea\";\nexport const ColorCambioNavy = \"#191142\";\nexport const ColorCambioTeal = \"#44a6cf\";\nexport const ColorCambioSlate = \"#7c9fc6\";\nexport const ColorCambioSky = \"#b1e8fc\";\nexport const ColorCambioYellow700 = \"#ffe733\";\nexport const ColorCambioTransparentFull = \"#000000\";\nexport const Elevation400 = \"0px 16px 32px 0px #00000040\";\nexport const SyntaxFontSansSerif = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\";\nexport const ShadowInteractive = \"0px 3px 16px 0px rgba(144, 134, 130, 0.05), 0px 2px 30px 0px rgba(144, 134, 130, 0.02)\";\n"],"mappings":";;;AASO,IAAM,0BAA0B;AAUhC,IAAM,mBAAmB;AAqCzB,IAAM,sBAAsB;","names":[]}
@@ -9,7 +9,7 @@ var _OKT24L6Dcjs = require('./OKT24L6D.cjs');
9
9
 
10
10
 
11
11
 
12
- var _XJVLA3PAcjs = require('./XJVLA3PA.cjs');
12
+ var _7VI7DO7Pcjs = require('./7VI7DO7P.cjs');
13
13
 
14
14
 
15
15
 
@@ -147,12 +147,12 @@ function RichSelectList(props) {
147
147
  };
148
148
  const getArrowIconColor = () => {
149
149
  if (errorText) {
150
- return _XJVLA3PAcjs.ColorBaseDestructive700;
150
+ return _7VI7DO7Pcjs.ColorBaseDestructive700;
151
151
  } else {
152
152
  if (color === "clear") {
153
- return _XJVLA3PAcjs.ColorCambioWhite100;
153
+ return _7VI7DO7Pcjs.ColorCambioWhite100;
154
154
  } else {
155
- return _XJVLA3PAcjs.ColorBaseGray700;
155
+ return _7VI7DO7Pcjs.ColorBaseGray700;
156
156
  }
157
157
  }
158
158
  };
@@ -286,4 +286,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
286
286
 
287
287
 
288
288
  exports.RichSelectList_default = RichSelectList_default;
289
- //# sourceMappingURL=JKEJPSO2.cjs.map
289
+ //# sourceMappingURL=RZSHTFXZ.cjs.map
@@ -6,7 +6,7 @@ import {
6
6
  ColorBaseDestructive700,
7
7
  ColorBaseGray700,
8
8
  ColorCambioWhite100
9
- } from "./RWJSEIJ6.js";
9
+ } from "./JGDLN47H.js";
10
10
  import {
11
11
  Focus_module_default
12
12
  } from "./KKADUD65.js";
@@ -140,4 +140,4 @@ SelectList.Option = SelectOption_default;
140
140
  export {
141
141
  SelectList
142
142
  };
143
- //# sourceMappingURL=VF2KL6JX.js.map
143
+ //# sourceMappingURL=WCHW3AYL.js.map
@@ -9,7 +9,7 @@ import {
9
9
  ColorBaseDestructive700,
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
- } from "./RWJSEIJ6.js";
12
+ } from "./JGDLN47H.js";
13
13
  import {
14
14
  RichSelectBoxContext,
15
15
  RichSelectBox_default,
@@ -286,4 +286,4 @@ var RichSelectList_default = Object.assign(RichSelectList, {
286
286
  export {
287
287
  RichSelectList_default
288
288
  };
289
- //# sourceMappingURL=BMTUKQRY.js.map
289
+ //# sourceMappingURL=WIKMZ7QF.js.map
package/dist/index.cjs CHANGED
@@ -32,11 +32,11 @@ var _R7BL4JYZcjs = require('./__chunks/R7BL4JYZ.cjs');
32
32
  require('./__chunks/TH4TA3JN.cjs');
33
33
 
34
34
 
35
- var _67K5GWKLcjs = require('./__chunks/67K5GWKL.cjs');
35
+ var _IFPLOCSVcjs = require('./__chunks/IFPLOCSV.cjs');
36
36
  require('./__chunks/JVGX637E.cjs');
37
37
 
38
38
 
39
- var _JKEJPSO2cjs = require('./__chunks/JKEJPSO2.cjs');
39
+ var _RZSHTFXZcjs = require('./__chunks/RZSHTFXZ.cjs');
40
40
 
41
41
 
42
42
  var _IJHKE2Y3cjs = require('./__chunks/IJHKE2Y3.cjs');
@@ -46,7 +46,7 @@ require('./__chunks/OKT24L6D.cjs');
46
46
 
47
47
  var _KFNK5PLGcjs = require('./__chunks/KFNK5PLG.cjs');
48
48
  require('./__chunks/WFVGNGEP.cjs');
49
- require('./__chunks/XJVLA3PA.cjs');
49
+ require('./__chunks/7VI7DO7P.cjs');
50
50
  require('./__chunks/AFOQ6JVB.cjs');
51
51
 
52
52
 
@@ -106,7 +106,7 @@ require('./__chunks/F3SUJGZL.cjs');
106
106
  require('./__chunks/UKQIAZA5.cjs');
107
107
 
108
108
 
109
- var _YGFJ2STLcjs = require('./__chunks/YGFJ2STL.cjs');
109
+ var _5ITNEIMCcjs = require('./__chunks/5ITNEIMC.cjs');
110
110
 
111
111
 
112
112
  var _QODNNCT2cjs = require('./__chunks/QODNNCT2.cjs');
@@ -162,5 +162,5 @@ require('./__chunks/X2SDR4SD.cjs');
162
162
 
163
163
 
164
164
 
165
- exports.Avatar = _GQUBAKFOcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _J5XNUGR3cjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _BVNFNAUOcjs.Button_default; exports.ButtonGroup = _6KSVCCCBcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _XUDOYOWHcjs.Checkbox_default; exports.Chip = _MENEINOOcjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _O7M2NMNZcjs.Heading_default; exports.Icon = _HRTHCEIFcjs.Icon_default; exports.IconButton = _KFNK5PLGcjs.IconButton_default; exports.IconLinkButton = _R7BL4JYZcjs.IconLinkButton_default; exports.LinkButton = _4UT6BROBcjs.LinkButton_default; exports.Modal = _AHM6QK6Ucjs.Modal; exports.Popover = _IJHKE2Y3cjs.Popover_default; exports.RadioButton = _DHXH7ZSGcjs.RadioButton_default; exports.RichSelectList = _JKEJPSO2cjs.RichSelectList_default; exports.SelectList = _67K5GWKLcjs.SelectList; exports.TabButton = _FXLAQKABcjs.TabButton; exports.TabLink = _TOAI3Z5Mcjs.TabLink_default; exports.Tabs = _4QUXUGJPcjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _VVRMCACEcjs.TextArea_default; exports.TextField = _PMNFDB6Ccjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _3ULBWSHTcjs.Tooltip_default; exports.Typography = _4TYOP5XMcjs.Typography_default; exports.WordConfetti = _YGFJ2STLcjs.WordConfetti_default;
165
+ exports.Avatar = _GQUBAKFOcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _J5XNUGR3cjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _BVNFNAUOcjs.Button_default; exports.ButtonGroup = _6KSVCCCBcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _XUDOYOWHcjs.Checkbox_default; exports.Chip = _MENEINOOcjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _O7M2NMNZcjs.Heading_default; exports.Icon = _HRTHCEIFcjs.Icon_default; exports.IconButton = _KFNK5PLGcjs.IconButton_default; exports.IconLinkButton = _R7BL4JYZcjs.IconLinkButton_default; exports.LinkButton = _4UT6BROBcjs.LinkButton_default; exports.Modal = _AHM6QK6Ucjs.Modal; exports.Popover = _IJHKE2Y3cjs.Popover_default; exports.RadioButton = _DHXH7ZSGcjs.RadioButton_default; exports.RichSelectList = _RZSHTFXZcjs.RichSelectList_default; exports.SelectList = _IFPLOCSVcjs.SelectList; exports.TabButton = _FXLAQKABcjs.TabButton; exports.TabLink = _TOAI3Z5Mcjs.TabLink_default; exports.Tabs = _4QUXUGJPcjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _VVRMCACEcjs.TextArea_default; exports.TextField = _PMNFDB6Ccjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _3ULBWSHTcjs.Tooltip_default; exports.Typography = _4TYOP5XMcjs.Typography_default; exports.WordConfetti = _5ITNEIMCcjs.WordConfetti_default;
166
166
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -32,11 +32,11 @@ import {
32
32
  import "./__chunks/YLWWTB4I.js";
33
33
  import {
34
34
  SelectList
35
- } from "./__chunks/VF2KL6JX.js";
35
+ } from "./__chunks/WCHW3AYL.js";
36
36
  import "./__chunks/SPQ7DQHG.js";
37
37
  import {
38
38
  RichSelectList_default
39
- } from "./__chunks/BMTUKQRY.js";
39
+ } from "./__chunks/WIKMZ7QF.js";
40
40
  import {
41
41
  Popover_default
42
42
  } from "./__chunks/IUMHK3GF.js";
@@ -46,7 +46,7 @@ import {
46
46
  IconButton_default
47
47
  } from "./__chunks/SZTZ3IZ5.js";
48
48
  import "./__chunks/4U4UW4AK.js";
49
- import "./__chunks/RWJSEIJ6.js";
49
+ import "./__chunks/JGDLN47H.js";
50
50
  import "./__chunks/RJS7BKZD.js";
51
51
  import {
52
52
  ButtonGroup_default
@@ -106,7 +106,7 @@ import "./__chunks/YGON3SJ5.js";
106
106
  import "./__chunks/M4CFLT64.js";
107
107
  import {
108
108
  WordConfetti_default
109
- } from "./__chunks/OPDVLDRQ.js";
109
+ } from "./__chunks/5R4TON7U.js";
110
110
  import {
111
111
  Box_default
112
112
  } from "./__chunks/IB6JZQF3.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cambly/syntax-core",
3
3
  "description": "Cambly design system core components",
4
- "version": "20.6.0",
4
+ "version": "20.7.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "react": "18.2.0",
29
29
  "tsup": "6.7.0",
30
30
  "typescript": "5.0.4",
31
- "@cambly/syntax-tsconfig": "1.4.1",
32
- "@cambly/eslint-config-syntax": "1.4.0"
31
+ "@cambly/eslint-config-syntax": "1.4.0",
32
+ "@cambly/syntax-tsconfig": "1.4.1"
33
33
  },
34
34
  "publishConfig": {
35
35
  "access": "public"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/WordConfetti/WordConfetti.tsx"],"sourcesContent":["import { type ReactNode, forwardRef, useMemo, type ReactElement } from \"react\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\n\nconst themeBackgroundColors = {\n neutral: [\"pink\", \"lilac\", \"thistle\"],\n cool: [\"sky\", \"slate\", \"teal\"],\n warm: [\"red\", \"tan\", \"orange\"],\n} as const;\n\nconst degreeOfTiltOptions = [-6, -6, -3, -3, 0, 3, 3, 6, 6];\n\nconst paddings = {\n 300: \"16px 20px 16px 20px\",\n 400: \"20px 24px 20px 24px\",\n 700: \"24px 28px 24px 28px\",\n 800: \"28px 40px 28px 40px\",\n 900: \"32px 48px 32px 48px\",\n 1100: \"36px 56px 36px 56px\",\n};\n\nconst gaps = {\n 300: 3,\n 400: 4,\n 700: 6,\n 800: 6,\n 900: 9,\n 1100: 10,\n} as const;\n\nconst WordConfetto = ({\n backgroundColor,\n rotation,\n size,\n text,\n}: {\n backgroundColor:\n | \"pink\"\n | \"lilac\"\n | \"thistle\"\n | \"sky\"\n | \"slate\"\n | \"teal\"\n | \"red\"\n | \"tan\"\n | \"orange\";\n rotation: number;\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n text: string;\n}): ReactElement => {\n return (\n <Box\n backgroundColor={backgroundColor}\n dangerouslySetInlineStyle={{\n __style: {\n padding: paddings[size],\n transform: `rotate(${rotation}deg)`,\n },\n }}\n width=\"fit-content\"\n >\n <Typography size={size} weight=\"bold\" fontStyle=\"serif\">\n {text}\n </Typography>\n </Box>\n );\n};\n\ntype Direction = \"row\" | \"column\";\ntype WordConfettiProps = {\n /**\n * Test id for the confetti\n */\n \"data-testid\"?: string;\n /**\n * The direction to display the words.\n * @defaultValue row\n */\n direction?: Direction;\n /**\n * The size of the font in the confetti.\n */\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The theme for the background colors of the confetti.\n */\n theme: \"neutral\" | \"cool\" | \"warm\";\n /**\n * The words to display as confetti.\n */\n words: string[];\n};\n\n/**\n * [WordConfetti](https://cambly-syntax.vercel.app/?path=/docs/components-wordconfetti--docs) is a container for displaying words in different color themes and fun offset angles.\n */\nconst WordConfetti = forwardRef<HTMLDivElement, WordConfettiProps>(\n function WordConfetti(props: WordConfettiProps, ref): JSX.Element {\n const {\n \"data-testid\": dataTestId,\n direction = \"row\",\n size,\n theme,\n words,\n } = props;\n\n const styledWords = useMemo(\n () =>\n words.map((word) => ({\n text: word,\n backgroundColor:\n themeBackgroundColors[theme][Math.floor(Math.random() * 3)],\n rotation: degreeOfTiltOptions[Math.floor(Math.random() * 9)],\n })),\n [theme, words],\n );\n\n return (\n <Box\n display=\"flex\"\n direction={direction}\n flexWrap=\"wrap\"\n data-testid={dataTestId}\n ref={ref}\n gap={gaps[size]}\n >\n {styledWords.map(\n ({ text, backgroundColor, rotation }, index): ReactNode => {\n return (\n <WordConfetto\n key={`${text}+${index}`}\n backgroundColor={backgroundColor}\n rotation={rotation}\n size={size}\n text={text}\n />\n );\n },\n )}\n </Box>\n );\n },\n);\n\nexport default WordConfetti;\n"],"mappings":";;;;;;;;;AAAA,SAAyB,YAAY,eAAkC;AA6DjE;AAzDN,IAAM,wBAAwB;AAAA,EAC5B,SAAS,CAAC,QAAQ,SAAS,SAAS;AAAA,EACpC,MAAM,CAAC,OAAO,SAAS,MAAM;AAAA,EAC7B,MAAM,CAAC,OAAO,OAAO,QAAQ;AAC/B;AAEA,IAAM,sBAAsB,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE1D,IAAM,WAAW;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,OAAO;AAAA,EACX,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAcoB;AAClB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,SAAS,IAAI;AAAA,UACtB,WAAW,UAAU;AAAA,QACvB;AAAA,MACF;AAAA,MACA,OAAM;AAAA,MAEN,8BAAC,sBAAW,MAAY,QAAO,QAAO,WAAU,SAC7C,gBACH;AAAA;AAAA,EACF;AAEJ;AA8BA,IAAM,eAAe;AAAA,EACnB,SAASA,cAAa,OAA0B,KAAkB;AAChE,UAAM;AAAA,MACJ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAEJ,UAAM,cAAc;AAAA,MAClB,MACE,MAAM,IAAI,CAAC,UAAU;AAAA,QACnB,MAAM;AAAA,QACN,iBACE,sBAAsB,KAAK,EAAE,KAAK,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC;AAAA,QAC5D,UAAU,oBAAoB,KAAK,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC;AAAA,MAC7D,EAAE;AAAA,MACJ,CAAC,OAAO,KAAK;AAAA,IACf;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR;AAAA,QACA,UAAS;AAAA,QACT,eAAa;AAAA,QACb;AAAA,QACA,KAAK,KAAK,IAAI;AAAA,QAEb,sBAAY;AAAA,UACX,CAAC,EAAE,MAAM,iBAAiB,SAAS,GAAG,UAAqB;AACzD,mBACE;AAAA,cAAC;AAAA;AAAA,gBAEC;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA;AAAA,cAJK,GAAG,QAAQ;AAAA,YAKlB;AAAA,UAEJ;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ;","names":["WordConfetti"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/WordConfetti/WordConfetti.tsx"],"names":["WordConfetti"],"mappings":";;;;;;;;;AAAA,SAAyB,YAAY,eAAkC;AA6DjE;AAzDN,IAAM,wBAAwB;AAAA,EAC5B,SAAS,CAAC,QAAQ,SAAS,SAAS;AAAA,EACpC,MAAM,CAAC,OAAO,SAAS,MAAM;AAAA,EAC7B,MAAM,CAAC,OAAO,OAAO,QAAQ;AAC/B;AAEA,IAAM,sBAAsB,CAAC,IAAI,IAAI,IAAI,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE1D,IAAM,WAAW;AAAA,EACf,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,OAAO;AAAA,EACX,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,KAAK;AAAA,EACL,MAAM;AACR;AAEA,IAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAcoB;AAClB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,SAAS,IAAI;AAAA,UACtB,WAAW,UAAU;AAAA,QACvB;AAAA,MACF;AAAA,MACA,OAAM;AAAA,MAEN,8BAAC,sBAAW,MAAY,QAAO,QAAO,WAAU,SAC7C,gBACH;AAAA;AAAA,EACF;AAEJ;AA8BA,IAAM,eAAe;AAAA,EACnB,SAASA,cAAa,OAA0B,KAAkB;AAChE,UAAM;AAAA,MACJ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAEJ,UAAM,cAAc;AAAA,MAClB,MACE,MAAM,IAAI,CAAC,UAAU;AAAA,QACnB,MAAM;AAAA,QACN,iBACE,sBAAsB,KAAK,EAAE,KAAK,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC;AAAA,QAC5D,UAAU,oBAAoB,KAAK,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC;AAAA,MAC7D,EAAE;AAAA,MACJ,CAAC,OAAO,KAAK;AAAA,IACf;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR;AAAA,QACA,UAAS;AAAA,QACT,eAAa;AAAA,QACb;AAAA,QACA,KAAK,KAAK,IAAI;AAAA,QAEb,sBAAY;AAAA,UACX,CAAC,EAAE,MAAM,iBAAiB,SAAS,GAAG,UAAqB;AACzD,mBACE;AAAA,cAAC;AAAA;AAAA,gBAEC;AAAA,gBACA;AAAA,gBACA;AAAA,gBACA;AAAA;AAAA,cAJK,GAAG,QAAQ;AAAA,YAKlB;AAAA,UAEJ;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,uBAAQ","sourcesContent":["import { type ReactNode, forwardRef, useMemo, type ReactElement } from \"react\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\n\nconst themeBackgroundColors = {\n neutral: [\"pink\", \"lilac\", \"thistle\"],\n cool: [\"sky\", \"slate\", \"teal\"],\n warm: [\"red\", \"tan\", \"orange\"],\n} as const;\n\nconst degreeOfTiltOptions = [-6, -6, -3, -3, 0, 3, 3, 6, 6];\n\nconst paddings = {\n 300: \"16px 20px 16px 20px\",\n 400: \"20px 24px 20px 24px\",\n 700: \"24px 28px 24px 28px\",\n 800: \"28px 40px 28px 40px\",\n 900: \"32px 48px 32px 48px\",\n 1100: \"36px 56px 36px 56px\",\n};\n\nconst gaps = {\n 300: 3,\n 400: 4,\n 700: 6,\n 800: 6,\n 900: 9,\n 1100: 10,\n} as const;\n\nconst WordConfetto = ({\n backgroundColor,\n rotation,\n size,\n text,\n}: {\n backgroundColor:\n | \"pink\"\n | \"lilac\"\n | \"thistle\"\n | \"sky\"\n | \"slate\"\n | \"teal\"\n | \"red\"\n | \"tan\"\n | \"orange\";\n rotation: number;\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n text: string;\n}): ReactElement => {\n return (\n <Box\n backgroundColor={backgroundColor}\n dangerouslySetInlineStyle={{\n __style: {\n padding: paddings[size],\n transform: `rotate(${rotation}deg)`,\n },\n }}\n width=\"fit-content\"\n >\n <Typography size={size} weight=\"bold\" fontStyle=\"serif\">\n {text}\n </Typography>\n </Box>\n );\n};\n\ntype Direction = \"row\" | \"column\";\ntype WordConfettiProps = {\n /**\n * Test id for the confetti\n */\n \"data-testid\"?: string;\n /**\n * The direction to display the words.\n * @defaultValue row\n */\n direction?: Direction;\n /**\n * The size of the font in the confetti.\n */\n size: 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The theme for the background colors of the confetti.\n */\n theme: \"neutral\" | \"cool\" | \"warm\";\n /**\n * The words to display as confetti.\n */\n words: string[];\n};\n\n/**\n * [WordConfetti](https://cambly-syntax.vercel.app/?path=/docs/components-wordconfetti--docs) is a container for displaying words in different color themes and fun offset angles.\n */\nconst WordConfetti = forwardRef<HTMLDivElement, WordConfettiProps>(\n function WordConfetti(props: WordConfettiProps, ref): JSX.Element {\n const {\n \"data-testid\": dataTestId,\n direction = \"row\",\n size,\n theme,\n words,\n } = props;\n\n const styledWords = useMemo(\n () =>\n words.map((word) => ({\n text: word,\n backgroundColor:\n themeBackgroundColors[theme][Math.floor(Math.random() * 3)],\n rotation: degreeOfTiltOptions[Math.floor(Math.random() * 9)],\n })),\n [theme, words],\n );\n\n return (\n <Box\n display=\"flex\"\n direction={direction}\n flexWrap=\"wrap\"\n data-testid={dataTestId}\n ref={ref}\n gap={gaps[size]}\n >\n {styledWords.map(\n ({ text, backgroundColor, rotation }, index): ReactNode => {\n return (\n <WordConfetto\n key={`${text}+${index}`}\n backgroundColor={backgroundColor}\n rotation={rotation}\n size={size}\n text={text}\n />\n );\n },\n )}\n </Box>\n );\n },\n);\n\nexport default WordConfetti;\n"]}