@cambly/syntax-core 18.10.0 → 18.11.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.
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _PE6RT2GKcjs = require('../__chunks/PE6RT2GK.cjs');
4
+ var _5IZ4JQU2cjs = require('../__chunks/5IZ4JQU2.cjs');
5
5
  require('../__chunks/GEXK47GR.cjs');
6
6
  require('../__chunks/QODNNCT2.cjs');
7
7
  require('../__chunks/WFVGNGEP.cjs');
@@ -12,5 +12,5 @@ require('../__chunks/2XIVACBM.cjs');
12
12
  require('../__chunks/X2SDR4SD.cjs');
13
13
 
14
14
 
15
- exports.default = _PE6RT2GKcjs.Avatar_default;
15
+ exports.default = _5IZ4JQU2cjs.Avatar_default;
16
16
  //# sourceMappingURL=Avatar.cjs.map
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  Avatar_default
4
- } from "../__chunks/TTHO5EMR.js";
4
+ } from "../__chunks/P4XC5C2X.js";
5
5
  import "../__chunks/FPROMKT3.js";
6
6
  import "../__chunks/IB6JZQF3.js";
7
7
  import "../__chunks/4U4UW4AK.js";
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _E5A7QN33cjs = require('../__chunks/E5A7QN33.cjs');
4
+ var _ZQRHNSQ2cjs = require('../__chunks/ZQRHNSQ2.cjs');
5
5
  require('../__chunks/B6775YJ4.cjs');
6
6
  require('../__chunks/B3RYP36U.cjs');
7
7
  require('../__chunks/3RX4RMGC.cjs');
8
8
  require('../__chunks/PZEDDYBZ.cjs');
9
9
  require('../__chunks/WFVGNGEP.cjs');
10
- require('../__chunks/MPIUJXFD.cjs');
10
+ require('../__chunks/DBLZGE4Z.cjs');
11
11
  require('../__chunks/UON4NESK.cjs');
12
12
  require('../__chunks/C5XPZTFO.cjs');
13
13
  require('../__chunks/RIAJV3ZH.cjs');
@@ -47,5 +47,5 @@ require('../__chunks/E5P6WRJD.cjs');
47
47
  require('../__chunks/X2SDR4SD.cjs');
48
48
 
49
49
 
50
- exports.default = _E5A7QN33cjs.RichSelectList_default;
50
+ exports.default = _ZQRHNSQ2cjs.RichSelectList_default;
51
51
  //# sourceMappingURL=RichSelectList.cjs.map
@@ -1,13 +1,13 @@
1
1
  "use client"
2
2
  import {
3
3
  RichSelectList_default
4
- } from "../__chunks/JJKHUZDD.js";
4
+ } from "../__chunks/5FFV6JB7.js";
5
5
  import "../__chunks/TTCJEHHX.js";
6
6
  import "../__chunks/3D6LFUMA.js";
7
7
  import "../__chunks/CXENLD6O.js";
8
8
  import "../__chunks/HVGNETJV.js";
9
9
  import "../__chunks/4U4UW4AK.js";
10
- import "../__chunks/FRQEPBPS.js";
10
+ import "../__chunks/MM33KQI4.js";
11
11
  import "../__chunks/KKV5SSD5.js";
12
12
  import "../__chunks/BOX3VY3Q.js";
13
13
  import "../__chunks/BIW5AZCF.js";
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _Y2DE7Y6Ccjs = require('../__chunks/Y2DE7Y6C.cjs');
5
- require('../__chunks/MPIUJXFD.cjs');
4
+ var _WYTFLC3Acjs = require('../__chunks/WYTFLC3A.cjs');
5
+ require('../__chunks/DBLZGE4Z.cjs');
6
6
  require('../__chunks/XLUVINJW.cjs');
7
7
  require('../__chunks/QODNNCT2.cjs');
8
8
  require('../__chunks/JVGX637E.cjs');
@@ -18,5 +18,5 @@ require('../__chunks/NOELZTQX.cjs');
18
18
  require('../__chunks/X2SDR4SD.cjs');
19
19
 
20
20
 
21
- exports.default = _Y2DE7Y6Ccjs.SelectList;
21
+ exports.default = _WYTFLC3Acjs.SelectList;
22
22
  //# sourceMappingURL=SelectList.cjs.map
@@ -1,8 +1,8 @@
1
1
  "use client"
2
2
  import {
3
3
  SelectList
4
- } from "../__chunks/QTTRDMPZ.js";
5
- import "../__chunks/FRQEPBPS.js";
4
+ } from "../__chunks/2PTV75PN.js";
5
+ import "../__chunks/MM33KQI4.js";
6
6
  import "../__chunks/KKADUD65.js";
7
7
  import "../__chunks/IB6JZQF3.js";
8
8
  import "../__chunks/SPQ7DQHG.js";
@@ -3,7 +3,7 @@ import {
3
3
  ColorBaseDestructive700,
4
4
  ColorBaseGray700,
5
5
  ColorCambioWhite100
6
- } from "./FRQEPBPS.js";
6
+ } from "./MM33KQI4.js";
7
7
  import {
8
8
  Focus_module_default
9
9
  } from "./KKADUD65.js";
@@ -148,4 +148,4 @@ SelectList.Option = SelectOption_default;
148
148
  export {
149
149
  SelectList
150
150
  };
151
- //# sourceMappingURL=QTTRDMPZ.js.map
151
+ //# sourceMappingURL=2PTV75PN.js.map
@@ -9,7 +9,7 @@ import {
9
9
  ColorBaseDestructive700,
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
- } from "./FRQEPBPS.js";
12
+ } from "./MM33KQI4.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=JJKHUZDD.js.map
289
+ //# sourceMappingURL=5FFV6JB7.js.map
@@ -18,11 +18,11 @@ var Avatar_module_default = { "avatar": "_avatar_gvbh2_1", "avatarImage": "_avat
18
18
  // src/Avatar/Avatar.tsx
19
19
  var _jsxruntime = require('react/jsx-runtime');
20
20
  var sizeToIconStyles = {
21
- xs: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },
22
- sm: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },
23
- md: { bottom: 6, marginInlineEnd: 2, height: 8, width: 8 },
24
- lg: { bottom: 6, marginInlineEnd: 6, height: 12, width: 12 },
25
- xl: { bottom: 8, marginInlineEnd: 6, height: 12, width: 12 }
21
+ xs: { bottom: 4, marginInlineEnd: 0, height: 8, width: 8 },
22
+ sm: { bottom: 4, marginInlineEnd: 0, height: 10, width: 10 },
23
+ md: { bottom: 4, marginInlineEnd: 0, height: 12, width: 12 },
24
+ lg: { bottom: 4, marginInlineEnd: 0, height: 16, width: 16 },
25
+ xl: { bottom: 4, marginInlineEnd: 4, height: 16, width: 16 }
26
26
  };
27
27
  var sizeToMargin = {
28
28
  xs: -10,
@@ -38,6 +38,17 @@ function AvatarInternal({
38
38
  size = "md",
39
39
  src
40
40
  }) {
41
+ function getBorderSize() {
42
+ switch (size) {
43
+ case "xs":
44
+ case "sm":
45
+ return 0.5;
46
+ case "md":
47
+ case "lg":
48
+ case "xl":
49
+ return 1;
50
+ }
51
+ }
41
52
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _classnames2.default.call(void 0, Avatar_module_default.avatar, Avatar_module_default[size]), children: [
42
53
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
43
54
  "img",
@@ -61,7 +72,7 @@ function AvatarInternal({
61
72
  backgroundColor: "white",
62
73
  dangerouslySetInlineStyle: {
63
74
  __style: _X2SDR4SDcjs.__spreadValues.call(void 0, {
64
- border: "1px solid white"
75
+ border: `${getBorderSize()}px solid white`
65
76
  }, sizeToIconStyles[size])
66
77
  },
67
78
  rounding: "full",
@@ -125,4 +136,4 @@ var Avatar_default = Avatar;
125
136
 
126
137
 
127
138
  exports.Avatar_default = Avatar_default;
128
- //# sourceMappingURL=PE6RT2GK.cjs.map
139
+ //# sourceMappingURL=5IZ4JQU2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,eAAc,wBAAuB,sBAAqB,gCAA+B,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAA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QACT,iBAAgB;AAAA,QAChB,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,QAAQ,GAAG,cAAc;AAAA,aACtB,iBAAiB,IAAI;AAAA,QAE5B;AAAA,QACA,UAAS;AAAA,QAER;AAAA;AAAA,IACH,GACF;AAAA,KAEJ;AAEJ;AAKA,IAAM,SAAS,CAAC;AAAA,EACd;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,MA0BmB;AACjB,QAAM,qBAAqB,eAAe;AAE1C,MAAI,uBAAuB,MAAM;AAC/B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,UAAS;AAAA,QACT,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,iBAAiB,aAAa,mBAAmB,IAAI;AAAA,UACvD;AAAA,QACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,YAAW;AAAA,YACX,gBAAe;AAAA,YACf,iBAAgB;AAAA,YAChB,UAAS;AAAA,YAET;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA,SAAO;AAAA,gBACP,MAAM,mBAAmB;AAAA,gBACzB;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,iBAAQ","sourcesContent":["import { type ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\nimport Box from \"../Box/Box\";\nimport { useAvatarGroup } from \"../AvatarGroup/AvatarGroup\";\n\nconst sizeToIconStyles = {\n xs: { bottom: 4, marginInlineEnd: 0, height: 8, width: 8 },\n sm: { bottom: 4, marginInlineEnd: 0, height: 10, width: 10 },\n md: { bottom: 4, marginInlineEnd: 0, height: 12, width: 12 },\n lg: { bottom: 4, marginInlineEnd: 0, height: 16, width: 16 },\n xl: { bottom: 4, marginInlineEnd: 4, height: 16, width: 16 },\n} as const;\n\nconst sizeToMargin = {\n xs: -10,\n sm: -14,\n md: -22,\n lg: -28,\n xl: -34,\n} as const;\n\nfunction AvatarInternal({\n accessibilityLabel,\n icon,\n outline,\n size = \"md\",\n src,\n}: {\n accessibilityLabel: string;\n icon?: React.ReactElement;\n outline?: boolean;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n src: string;\n}): ReactElement {\n function getBorderSize() {\n switch (size) {\n case \"xs\":\n case \"sm\":\n return 0.5;\n case \"md\":\n case \"lg\":\n case \"xl\":\n return 1;\n }\n }\n return (\n <div className={classNames(styles.avatar, styles[size])}>\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(\n styles.avatarImage,\n outline && styles.avatarImageOutline,\n styles[size],\n )}\n />\n {icon && (\n <Box display=\"flex\" position=\"relative\" justifyContent=\"end\">\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"absolute\"\n backgroundColor=\"white\"\n dangerouslySetInlineStyle={{\n __style: {\n border: `${getBorderSize()}px solid white`,\n ...sizeToIconStyles[size],\n },\n }}\n rounding=\"full\"\n >\n {icon}\n </Box>\n </Box>\n )}\n </div>\n );\n}\n\n/**\n * [Avatar](https://cambly-syntax.vercel.app/?path=/docs/components-avatar--docs) is a circular image that represents a user.\n */\nconst Avatar = ({\n accessibilityLabel,\n icon,\n size = \"md\",\n src,\n}: {\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * optional icon that appears on the bottom corner of the avatar\n */\n icon?: React.ReactElement;\n /**\n * Size of the avatar.\n *\n * * `xs`: 24px\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n * * `xl`: 80px\n *\n * @defaultValue `md`\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n}): JSX.Element => {\n const avatarGroupContext = useAvatarGroup();\n\n if (avatarGroupContext !== null) {\n return (\n <Box\n position=\"relative\"\n dangerouslySetInlineStyle={{\n __style: {\n marginInlineEnd: sizeToMargin[avatarGroupContext.size],\n },\n }}\n >\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n backgroundColor=\"white\"\n rounding=\"full\"\n >\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n outline\n size={avatarGroupContext.size}\n src={src}\n />\n </Box>\n </Box>\n );\n }\n\n return (\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n size={size}\n src={src}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_gvbh2_1\",\"avatarImage\":\"_avatarImage_gvbh2_5\",\"avatarImageOutline\":\"_avatarImageOutline_gvbh2_13\",\"xs\":\"_xs_gvbh2_17\",\"sm\":\"_sm_gvbh2_22\",\"md\":\"_md_gvbh2_27\",\"lg\":\"_lg_gvbh2_32\",\"xl\":\"_xl_gvbh2_37\"}"]}
@@ -10,4 +10,4 @@ var ColorCambioWhite100 = "#ffffff";
10
10
 
11
11
 
12
12
  exports.ColorBaseDestructive700 = ColorBaseDestructive700; exports.ColorBaseGray700 = ColorBaseGray700; exports.ColorCambioWhite100 = ColorCambioWhite100;
13
- //# sourceMappingURL=MPIUJXFD.cjs.map
13
+ //# sourceMappingURL=DBLZGE4Z.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 Mon, 29 Jul 2024 18:16:57 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 Mon, 29 Jul 2024 22:58:53 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"]}
@@ -10,4 +10,4 @@ export {
10
10
  ColorBaseGray700,
11
11
  ColorCambioWhite100
12
12
  };
13
- //# sourceMappingURL=FRQEPBPS.js.map
13
+ //# sourceMappingURL=MM33KQI4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Mon, 29 Jul 2024 18:16:57 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 Mon, 29 Jul 2024 22:58:53 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":[]}
@@ -18,11 +18,11 @@ var Avatar_module_default = { "avatar": "_avatar_gvbh2_1", "avatarImage": "_avat
18
18
  // src/Avatar/Avatar.tsx
19
19
  import { jsx, jsxs } from "react/jsx-runtime";
20
20
  var sizeToIconStyles = {
21
- xs: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },
22
- sm: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },
23
- md: { bottom: 6, marginInlineEnd: 2, height: 8, width: 8 },
24
- lg: { bottom: 6, marginInlineEnd: 6, height: 12, width: 12 },
25
- xl: { bottom: 8, marginInlineEnd: 6, height: 12, width: 12 }
21
+ xs: { bottom: 4, marginInlineEnd: 0, height: 8, width: 8 },
22
+ sm: { bottom: 4, marginInlineEnd: 0, height: 10, width: 10 },
23
+ md: { bottom: 4, marginInlineEnd: 0, height: 12, width: 12 },
24
+ lg: { bottom: 4, marginInlineEnd: 0, height: 16, width: 16 },
25
+ xl: { bottom: 4, marginInlineEnd: 4, height: 16, width: 16 }
26
26
  };
27
27
  var sizeToMargin = {
28
28
  xs: -10,
@@ -38,6 +38,17 @@ function AvatarInternal({
38
38
  size = "md",
39
39
  src
40
40
  }) {
41
+ function getBorderSize() {
42
+ switch (size) {
43
+ case "xs":
44
+ case "sm":
45
+ return 0.5;
46
+ case "md":
47
+ case "lg":
48
+ case "xl":
49
+ return 1;
50
+ }
51
+ }
41
52
  return /* @__PURE__ */ jsxs("div", { className: classNames(Avatar_module_default.avatar, Avatar_module_default[size]), children: [
42
53
  /* @__PURE__ */ jsx(
43
54
  "img",
@@ -61,7 +72,7 @@ function AvatarInternal({
61
72
  backgroundColor: "white",
62
73
  dangerouslySetInlineStyle: {
63
74
  __style: __spreadValues({
64
- border: "1px solid white"
75
+ border: `${getBorderSize()}px solid white`
65
76
  }, sizeToIconStyles[size])
66
77
  },
67
78
  rounding: "full",
@@ -125,4 +136,4 @@ var Avatar_default = Avatar;
125
136
  export {
126
137
  Avatar_default
127
138
  };
128
- //# sourceMappingURL=TTHO5EMR.js.map
139
+ //# sourceMappingURL=P4XC5C2X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module"],"sourcesContent":["import { type ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\nimport Box from \"../Box/Box\";\nimport { useAvatarGroup } from \"../AvatarGroup/AvatarGroup\";\n\nconst sizeToIconStyles = {\n xs: { bottom: 4, marginInlineEnd: 0, height: 8, width: 8 },\n sm: { bottom: 4, marginInlineEnd: 0, height: 10, width: 10 },\n md: { bottom: 4, marginInlineEnd: 0, height: 12, width: 12 },\n lg: { bottom: 4, marginInlineEnd: 0, height: 16, width: 16 },\n xl: { bottom: 4, marginInlineEnd: 4, height: 16, width: 16 },\n} as const;\n\nconst sizeToMargin = {\n xs: -10,\n sm: -14,\n md: -22,\n lg: -28,\n xl: -34,\n} as const;\n\nfunction AvatarInternal({\n accessibilityLabel,\n icon,\n outline,\n size = \"md\",\n src,\n}: {\n accessibilityLabel: string;\n icon?: React.ReactElement;\n outline?: boolean;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n src: string;\n}): ReactElement {\n function getBorderSize() {\n switch (size) {\n case \"xs\":\n case \"sm\":\n return 0.5;\n case \"md\":\n case \"lg\":\n case \"xl\":\n return 1;\n }\n }\n return (\n <div className={classNames(styles.avatar, styles[size])}>\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(\n styles.avatarImage,\n outline && styles.avatarImageOutline,\n styles[size],\n )}\n />\n {icon && (\n <Box display=\"flex\" position=\"relative\" justifyContent=\"end\">\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"absolute\"\n backgroundColor=\"white\"\n dangerouslySetInlineStyle={{\n __style: {\n border: `${getBorderSize()}px solid white`,\n ...sizeToIconStyles[size],\n },\n }}\n rounding=\"full\"\n >\n {icon}\n </Box>\n </Box>\n )}\n </div>\n );\n}\n\n/**\n * [Avatar](https://cambly-syntax.vercel.app/?path=/docs/components-avatar--docs) is a circular image that represents a user.\n */\nconst Avatar = ({\n accessibilityLabel,\n icon,\n size = \"md\",\n src,\n}: {\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * optional icon that appears on the bottom corner of the avatar\n */\n icon?: React.ReactElement;\n /**\n * Size of the avatar.\n *\n * * `xs`: 24px\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n * * `xl`: 80px\n *\n * @defaultValue `md`\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n}): JSX.Element => {\n const avatarGroupContext = useAvatarGroup();\n\n if (avatarGroupContext !== null) {\n return (\n <Box\n position=\"relative\"\n dangerouslySetInlineStyle={{\n __style: {\n marginInlineEnd: sizeToMargin[avatarGroupContext.size],\n },\n }}\n >\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n backgroundColor=\"white\"\n rounding=\"full\"\n >\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n outline\n size={avatarGroupContext.size}\n src={src}\n />\n </Box>\n </Box>\n );\n }\n\n return (\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n size={size}\n src={src}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_gvbh2_1\",\"avatarImage\":\"_avatarImage_gvbh2_5\",\"avatarImageOutline\":\"_avatarImageOutline_gvbh2_13\",\"xs\":\"_xs_gvbh2_17\",\"sm\":\"_sm_gvbh2_22\",\"md\":\"_md_gvbh2_27\",\"lg\":\"_lg_gvbh2_32\",\"xl\":\"_xl_gvbh2_37\"}"],"mappings":";;;;;;;;;;;;AACA,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,eAAc,wBAAuB,sBAAqB,gCAA+B,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,eAAc;;;AD+C/T,SACE,KADF;AAzCJ,IAAM,mBAAmB;AAAA,EACvB,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,OAAO,EAAE;AAAA,EACzD,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAAA,EAC3D,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAAA,EAC3D,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAAA,EAC3D,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAC7D;AAEA,IAAM,eAAe;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,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;AAAA,YAChB,UAAS;AAAA,YAET;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA;AAAA,gBACA,SAAO;AAAA,gBACP,MAAM,mBAAmB;AAAA,gBACzB;AAAA;AAAA,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,iBAAQ;","names":[]}
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _MPIUJXFDcjs = require('./MPIUJXFD.cjs');
6
+ var _DBLZGE4Zcjs = require('./DBLZGE4Z.cjs');
7
7
 
8
8
 
9
9
  var _XLUVINJWcjs = require('./XLUVINJW.cjs');
@@ -68,12 +68,12 @@ function SelectList({
68
68
  };
69
69
  const getArrowIconColor = () => {
70
70
  if (errorText) {
71
- return _MPIUJXFDcjs.ColorBaseDestructive700;
71
+ return _DBLZGE4Zcjs.ColorBaseDestructive700;
72
72
  } else {
73
73
  if (color === "clear") {
74
- return _MPIUJXFDcjs.ColorCambioWhite100;
74
+ return _DBLZGE4Zcjs.ColorCambioWhite100;
75
75
  } else {
76
- return _MPIUJXFDcjs.ColorBaseGray700;
76
+ return _DBLZGE4Zcjs.ColorBaseGray700;
77
77
  }
78
78
  }
79
79
  };
@@ -148,4 +148,4 @@ SelectList.Option = _JVGX637Ecjs.SelectOption_default;
148
148
 
149
149
 
150
150
  exports.SelectList = SelectList;
151
- //# sourceMappingURL=Y2DE7Y6C.cjs.map
151
+ //# sourceMappingURL=WYTFLC3A.cjs.map
@@ -9,7 +9,7 @@ var _3RX4RMGCcjs = require('./3RX4RMGC.cjs');
9
9
 
10
10
 
11
11
 
12
- var _MPIUJXFDcjs = require('./MPIUJXFD.cjs');
12
+ var _DBLZGE4Zcjs = require('./DBLZGE4Z.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 _MPIUJXFDcjs.ColorBaseDestructive700;
150
+ return _DBLZGE4Zcjs.ColorBaseDestructive700;
151
151
  } else {
152
152
  if (color === "clear") {
153
- return _MPIUJXFDcjs.ColorCambioWhite100;
153
+ return _DBLZGE4Zcjs.ColorCambioWhite100;
154
154
  } else {
155
- return _MPIUJXFDcjs.ColorBaseGray700;
155
+ return _DBLZGE4Zcjs.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=E5A7QN33.cjs.map
289
+ //# sourceMappingURL=ZQRHNSQ2.cjs.map
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
2
2
 
3
3
 
4
- var _PE6RT2GKcjs = require('./__chunks/PE6RT2GK.cjs');
4
+ var _5IZ4JQU2cjs = require('./__chunks/5IZ4JQU2.cjs');
5
5
 
6
6
 
7
7
  var _E3A6VFMBcjs = require('./__chunks/E3A6VFMB.cjs');
@@ -35,10 +35,10 @@ var _RUXLZWRZcjs = require('./__chunks/RUXLZWRZ.cjs');
35
35
  require('./__chunks/TH4TA3JN.cjs');
36
36
 
37
37
 
38
- var _Y2DE7Y6Ccjs = require('./__chunks/Y2DE7Y6C.cjs');
38
+ var _WYTFLC3Acjs = require('./__chunks/WYTFLC3A.cjs');
39
39
 
40
40
 
41
- var _E5A7QN33cjs = require('./__chunks/E5A7QN33.cjs');
41
+ var _ZQRHNSQ2cjs = require('./__chunks/ZQRHNSQ2.cjs');
42
42
 
43
43
 
44
44
  var _B6775YJ4cjs = require('./__chunks/B6775YJ4.cjs');
@@ -48,7 +48,7 @@ require('./__chunks/3RX4RMGC.cjs');
48
48
 
49
49
  var _PZEDDYBZcjs = require('./__chunks/PZEDDYBZ.cjs');
50
50
  require('./__chunks/WFVGNGEP.cjs');
51
- require('./__chunks/MPIUJXFD.cjs');
51
+ require('./__chunks/DBLZGE4Z.cjs');
52
52
  require('./__chunks/UON4NESK.cjs');
53
53
 
54
54
 
@@ -151,5 +151,5 @@ require('./__chunks/X2SDR4SD.cjs');
151
151
 
152
152
 
153
153
 
154
- exports.Avatar = _PE6RT2GKcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _E3A6VFMBcjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _RIAJV3ZHcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _RNYDANOZcjs.Checkbox_default; exports.Chip = _IHGDCH62cjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _CCKTB7L5cjs.Heading_default; exports.Icon = _TYVC4QEVcjs.Icon_default; exports.IconButton = _PZEDDYBZcjs.IconButton_default; exports.IconLinkButton = _RUXLZWRZcjs.IconLinkButton_default; exports.LinkButton = _JOTFTEBXcjs.LinkButton_default; exports.Modal = _3Y6HGWJGcjs.Modal; exports.Popover = _B6775YJ4cjs.Popover_default; exports.RadioButton = _24C55LXAcjs.RadioButton_default; exports.RichSelectList = _E5A7QN33cjs.RichSelectList_default; exports.SelectList = _Y2DE7Y6Ccjs.SelectList; exports.Tabs = _6VFQ76T5cjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _AUO7CEJIcjs.TextArea_default; exports.TextField = _5NI7VPKScjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _UXSGTOGUcjs.Tooltip_default; exports.Typography = _5NQO6SP3cjs.Typography_default;
154
+ exports.Avatar = _5IZ4JQU2cjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _E3A6VFMBcjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _RIAJV3ZHcjs.Button_default; exports.ButtonGroup = _C5XPZTFOcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _RNYDANOZcjs.Checkbox_default; exports.Chip = _IHGDCH62cjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _CCKTB7L5cjs.Heading_default; exports.Icon = _TYVC4QEVcjs.Icon_default; exports.IconButton = _PZEDDYBZcjs.IconButton_default; exports.IconLinkButton = _RUXLZWRZcjs.IconLinkButton_default; exports.LinkButton = _JOTFTEBXcjs.LinkButton_default; exports.Modal = _3Y6HGWJGcjs.Modal; exports.Popover = _B6775YJ4cjs.Popover_default; exports.RadioButton = _24C55LXAcjs.RadioButton_default; exports.RichSelectList = _ZQRHNSQ2cjs.RichSelectList_default; exports.SelectList = _WYTFLC3Acjs.SelectList; exports.Tabs = _6VFQ76T5cjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _AUO7CEJIcjs.TextArea_default; exports.TextField = _5NI7VPKScjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _UXSGTOGUcjs.Tooltip_default; exports.Typography = _5NQO6SP3cjs.Typography_default;
155
155
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  Avatar_default
4
- } from "./__chunks/TTHO5EMR.js";
4
+ } from "./__chunks/P4XC5C2X.js";
5
5
  import {
6
6
  Badge_default
7
7
  } from "./__chunks/OYIKKE7V.js";
@@ -35,10 +35,10 @@ import {
35
35
  import "./__chunks/YLWWTB4I.js";
36
36
  import {
37
37
  SelectList
38
- } from "./__chunks/QTTRDMPZ.js";
38
+ } from "./__chunks/2PTV75PN.js";
39
39
  import {
40
40
  RichSelectList_default
41
- } from "./__chunks/JJKHUZDD.js";
41
+ } from "./__chunks/5FFV6JB7.js";
42
42
  import {
43
43
  Popover_default
44
44
  } from "./__chunks/TTCJEHHX.js";
@@ -48,7 +48,7 @@ import {
48
48
  IconButton_default
49
49
  } from "./__chunks/HVGNETJV.js";
50
50
  import "./__chunks/4U4UW4AK.js";
51
- import "./__chunks/FRQEPBPS.js";
51
+ import "./__chunks/MM33KQI4.js";
52
52
  import "./__chunks/KKV5SSD5.js";
53
53
  import {
54
54
  ButtonGroup_default
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": "18.10.0",
4
+ "version": "18.11.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,eAAc,wBAAuB,sBAAqB,gCAA+B,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,eAAc;;;ADoC/T,SACE,KADF;AA9BJ,IAAM,mBAAmB;AAAA,EACvB,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,OAAO,EAAE;AAAA,EACzD,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,OAAO,EAAE;AAAA,EACzD,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,OAAO,EAAE;AAAA,EACzD,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAAA,EAC3D,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,IAAI,OAAO,GAAG;AAC7D;AAEA,IAAM,eAAe;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,E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,YACF;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,iBAAQ","sourcesContent":["import { type ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\nimport Box from \"../Box/Box\";\nimport { useAvatarGroup } from \"../AvatarGroup/AvatarGroup\";\n\nconst sizeToIconStyles = {\n xs: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },\n sm: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },\n md: { bottom: 6, marginInlineEnd: 2, height: 8, width: 8 },\n lg: { bottom: 6, marginInlineEnd: 6, height: 12, width: 12 },\n xl: { bottom: 8, marginInlineEnd: 6, height: 12, width: 12 },\n} as const;\n\nconst sizeToMargin = {\n xs: -10,\n sm: -14,\n md: -22,\n lg: -28,\n xl: -34,\n} as const;\n\nfunction AvatarInternal({\n accessibilityLabel,\n icon,\n outline,\n size = \"md\",\n src,\n}: {\n accessibilityLabel: string;\n icon?: React.ReactElement;\n outline?: boolean;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n src: string;\n}): ReactElement {\n return (\n <div className={classNames(styles.avatar, styles[size])}>\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(\n styles.avatarImage,\n outline && styles.avatarImageOutline,\n styles[size],\n )}\n />\n {icon && (\n <Box display=\"flex\" position=\"relative\" justifyContent=\"end\">\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"absolute\"\n backgroundColor=\"white\"\n dangerouslySetInlineStyle={{\n __style: {\n border: \"1px solid white\",\n ...sizeToIconStyles[size],\n },\n }}\n rounding=\"full\"\n >\n {icon}\n </Box>\n </Box>\n )}\n </div>\n );\n}\n\n/**\n * [Avatar](https://cambly-syntax.vercel.app/?path=/docs/components-avatar--docs) is a circular image that represents a user.\n */\nconst Avatar = ({\n accessibilityLabel,\n icon,\n size = \"md\",\n src,\n}: {\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * optional icon that appears on the bottom corner of the avatar\n */\n icon?: React.ReactElement;\n /**\n * Size of the avatar.\n *\n * * `xs`: 24px\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n * * `xl`: 80px\n *\n * @defaultValue `md`\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n}): JSX.Element => {\n const avatarGroupContext = useAvatarGroup();\n\n if (avatarGroupContext !== null) {\n return (\n <Box\n position=\"relative\"\n dangerouslySetInlineStyle={{\n __style: {\n marginInlineEnd: sizeToMargin[avatarGroupContext.size],\n },\n }}\n >\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n backgroundColor=\"white\"\n rounding=\"full\"\n >\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n outline\n size={avatarGroupContext.size}\n src={src}\n />\n </Box>\n </Box>\n );\n }\n\n return (\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n size={size}\n src={src}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_gvbh2_1\",\"avatarImage\":\"_avatarImage_gvbh2_5\",\"avatarImageOutline\":\"_avatarImageOutline_gvbh2_13\",\"xs\":\"_xs_gvbh2_17\",\"sm\":\"_sm_gvbh2_22\",\"md\":\"_md_gvbh2_27\",\"lg\":\"_lg_gvbh2_32\",\"xl\":\"_xl_gvbh2_37\"}"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/Avatar/Avatar.tsx","css-module:./Avatar.module.css#css-module"],"sourcesContent":["import { type ReactElement } from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./Avatar.module.css\";\nimport Box from \"../Box/Box\";\nimport { useAvatarGroup } from \"../AvatarGroup/AvatarGroup\";\n\nconst sizeToIconStyles = {\n xs: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },\n sm: { bottom: 6, marginInlineEnd: 2, height: 4, width: 4 },\n md: { bottom: 6, marginInlineEnd: 2, height: 8, width: 8 },\n lg: { bottom: 6, marginInlineEnd: 6, height: 12, width: 12 },\n xl: { bottom: 8, marginInlineEnd: 6, height: 12, width: 12 },\n} as const;\n\nconst sizeToMargin = {\n xs: -10,\n sm: -14,\n md: -22,\n lg: -28,\n xl: -34,\n} as const;\n\nfunction AvatarInternal({\n accessibilityLabel,\n icon,\n outline,\n size = \"md\",\n src,\n}: {\n accessibilityLabel: string;\n icon?: React.ReactElement;\n outline?: boolean;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n src: string;\n}): ReactElement {\n return (\n <div className={classNames(styles.avatar, styles[size])}>\n <img\n alt={accessibilityLabel}\n src={src}\n className={classNames(\n styles.avatarImage,\n outline && styles.avatarImageOutline,\n styles[size],\n )}\n />\n {icon && (\n <Box display=\"flex\" position=\"relative\" justifyContent=\"end\">\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"absolute\"\n backgroundColor=\"white\"\n dangerouslySetInlineStyle={{\n __style: {\n border: \"1px solid white\",\n ...sizeToIconStyles[size],\n },\n }}\n rounding=\"full\"\n >\n {icon}\n </Box>\n </Box>\n )}\n </div>\n );\n}\n\n/**\n * [Avatar](https://cambly-syntax.vercel.app/?path=/docs/components-avatar--docs) is a circular image that represents a user.\n */\nconst Avatar = ({\n accessibilityLabel,\n icon,\n size = \"md\",\n src,\n}: {\n /**\n * Alt text to use for the image.\n * This should describe the image to people using screen readers.\n */\n accessibilityLabel: string;\n /**\n * optional icon that appears on the bottom corner of the avatar\n */\n icon?: React.ReactElement;\n /**\n * Size of the avatar.\n *\n * * `xs`: 24px\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n * * `xl`: 80px\n *\n * @defaultValue `md`\n */\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * URL of the image to display as the avatar.\n */\n src: string;\n}): JSX.Element => {\n const avatarGroupContext = useAvatarGroup();\n\n if (avatarGroupContext !== null) {\n return (\n <Box\n position=\"relative\"\n dangerouslySetInlineStyle={{\n __style: {\n marginInlineEnd: sizeToMargin[avatarGroupContext.size],\n },\n }}\n >\n <Box\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n backgroundColor=\"white\"\n rounding=\"full\"\n >\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n outline\n size={avatarGroupContext.size}\n src={src}\n />\n </Box>\n </Box>\n );\n }\n\n return (\n <AvatarInternal\n accessibilityLabel={accessibilityLabel}\n icon={icon}\n size={size}\n src={src}\n />\n );\n};\n\nexport default Avatar;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Avatar/Avatar.module.css\"; export default {\"avatar\":\"_avatar_gvbh2_1\",\"avatarImage\":\"_avatarImage_gvbh2_5\",\"avatarImageOutline\":\"_avatarImageOutline_gvbh2_13\",\"xs\":\"_xs_gvbh2_17\",\"sm\":\"_sm_gvbh2_22\",\"md\":\"_md_gvbh2_27\",\"lg\":\"_lg_gvbh2_32\",\"xl\":\"_xl_gvbh2_37\"}"],"mappings":";;;;;;;;;;;;AACA,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,eAAc,wBAAuB,sBAAqB,gCAA+B,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,MAAK,eAAc;;;ADoC/T,SACE,KADF;AA9BJ,IAAM,mBAAmB;AAAA,EACvB,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,GAAG,OAAO,EAAE;AAAA,EACzD,IAAI,EAAE,QAAQ,GAAG,iBAAiB,GAAG,QAAQ,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