@cambly/syntax-core 20.0.0 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Badge/Badge.cjs +2 -2
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +1 -1
- package/dist/RichSelect/RichSelectList.cjs +3 -3
- package/dist/RichSelect/RichSelectList.js +2 -2
- package/dist/SelectList/SelectList.cjs +3 -3
- package/dist/SelectList/SelectList.js +2 -2
- package/dist/TextField/TextField.cjs +3 -3
- package/dist/TextField/TextField.js +2 -2
- package/dist/__chunks/{PAC42QWP.cjs → 3ZKXEILC.cjs} +5 -5
- package/dist/__chunks/{SJSSW5MP.cjs → 5NYVFU4A.cjs} +2 -1
- package/dist/__chunks/5NYVFU4A.cjs.map +1 -0
- package/dist/__chunks/{JWSI5EOR.js → 5OYS7RA7.js} +1 -1
- package/dist/__chunks/{JWSI5EOR.js.map → 5OYS7RA7.js.map} +1 -1
- package/dist/__chunks/{DG5BGE3F.js → FGZ2KY62.js} +2 -2
- package/dist/__chunks/{VXPUQYXA.js → GQ3EDG2X.js} +2 -2
- package/dist/__chunks/{DAIZZROA.js → LPNV4GH3.js} +2 -1
- package/dist/__chunks/LPNV4GH3.js.map +1 -0
- package/dist/__chunks/{CQWIABDZ.cjs → LT2LND2P.cjs} +1 -1
- package/dist/__chunks/{CQWIABDZ.cjs.map → LT2LND2P.cjs.map} +1 -1
- package/dist/__chunks/{KSBBGTKF.cjs → LVKEK2EY.cjs} +3 -3
- package/dist/__chunks/{LHQQKL6Q.js → PIJIEP6L.js} +2 -2
- package/dist/__chunks/{6MV5I6RV.cjs → SJOBDTPK.cjs} +5 -5
- package/dist/index.cjs +6 -6
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/__chunks/DAIZZROA.js.map +0 -1
- package/dist/__chunks/SJSSW5MP.cjs.map +0 -1
- /package/dist/__chunks/{PAC42QWP.cjs.map → 3ZKXEILC.cjs.map} +0 -0
- /package/dist/__chunks/{DG5BGE3F.js.map → FGZ2KY62.js.map} +0 -0
- /package/dist/__chunks/{VXPUQYXA.js.map → GQ3EDG2X.js.map} +0 -0
- /package/dist/__chunks/{KSBBGTKF.cjs.map → LVKEK2EY.cjs.map} +0 -0
- /package/dist/__chunks/{LHQQKL6Q.js.map → PIJIEP6L.js.map} +0 -0
- /package/dist/__chunks/{6MV5I6RV.cjs.map → SJOBDTPK.cjs.map} +0 -0
package/dist/Badge/Badge.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _5NYVFU4Acjs = require('../__chunks/5NYVFU4A.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 =
|
|
16
|
+
exports.default = _5NYVFU4Acjs.Badge_default;
|
|
17
17
|
//# sourceMappingURL=Badge.cjs.map
|
package/dist/Badge/Badge.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare const Badge: ({ icon: Icon, text, color, }: {
|
|
|
23
23
|
*
|
|
24
24
|
* @defaultValue "sky"
|
|
25
25
|
*/
|
|
26
|
-
color?: "destructive300" | "success300" | "gray370" | "gray870" | "cream" | "lilac" | "orange" | "pink" | "sky" | "tan" | "thistle" | undefined;
|
|
26
|
+
color?: "destructive300" | "success300" | "yellow700" | "gray370" | "gray870" | "cream" | "lilac" | "orange" | "pink" | "sky" | "tan" | "thistle" | undefined;
|
|
27
27
|
}) => JSX.Element;
|
|
28
28
|
|
|
29
29
|
export { Badge as default };
|
package/dist/Badge/Badge.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _3ZKXEILCcjs = require('../__chunks/3ZKXEILC.cjs');
|
|
5
5
|
require('../__chunks/VZTP4FJU.cjs');
|
|
6
6
|
require('../__chunks/Y5R3XLL7.cjs');
|
|
7
7
|
require('../__chunks/3RX4RMGC.cjs');
|
|
8
8
|
require('../__chunks/VJWLFFAD.cjs');
|
|
9
9
|
require('../__chunks/WFVGNGEP.cjs');
|
|
10
|
-
require('../__chunks/
|
|
10
|
+
require('../__chunks/LT2LND2P.cjs');
|
|
11
11
|
require('../__chunks/5I7B5SAF.cjs');
|
|
12
12
|
require('../__chunks/6KSVCCCB.cjs');
|
|
13
13
|
require('../__chunks/7COSMEXW.cjs');
|
|
@@ -47,5 +47,5 @@ require('../__chunks/E5P6WRJD.cjs');
|
|
|
47
47
|
require('../__chunks/X2SDR4SD.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
exports.default =
|
|
50
|
+
exports.default = _3ZKXEILCcjs.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/
|
|
4
|
+
} from "../__chunks/GQ3EDG2X.js";
|
|
5
5
|
import "../__chunks/ATUBU46J.js";
|
|
6
6
|
import "../__chunks/QURJJHRN.js";
|
|
7
7
|
import "../__chunks/CXENLD6O.js";
|
|
8
8
|
import "../__chunks/GDXRRA57.js";
|
|
9
9
|
import "../__chunks/4U4UW4AK.js";
|
|
10
|
-
import "../__chunks/
|
|
10
|
+
import "../__chunks/5OYS7RA7.js";
|
|
11
11
|
import "../__chunks/7YH3K65I.js";
|
|
12
12
|
import "../__chunks/36DG472B.js";
|
|
13
13
|
import "../__chunks/W6JOWMNG.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _SJOBDTPKcjs = require('../__chunks/SJOBDTPK.cjs');
|
|
5
5
|
require('../__chunks/JVGX637E.cjs');
|
|
6
|
-
require('../__chunks/
|
|
6
|
+
require('../__chunks/LT2LND2P.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 =
|
|
21
|
+
exports.default = _SJOBDTPKcjs.SelectList;
|
|
22
22
|
//# sourceMappingURL=SelectList.cjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
SelectList
|
|
4
|
-
} from "../__chunks/
|
|
4
|
+
} from "../__chunks/FGZ2KY62.js";
|
|
5
5
|
import "../__chunks/SPQ7DQHG.js";
|
|
6
|
-
import "../__chunks/
|
|
6
|
+
import "../__chunks/5OYS7RA7.js";
|
|
7
7
|
import "../__chunks/KKADUD65.js";
|
|
8
8
|
import "../__chunks/IB6JZQF3.js";
|
|
9
9
|
import "../__chunks/4U4UW4AK.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../__chunks/
|
|
4
|
+
var _LVKEK2EYcjs = require('../__chunks/LVKEK2EY.cjs');
|
|
5
|
+
require('../__chunks/5NYVFU4A.cjs');
|
|
6
6
|
require('../__chunks/WFVGNGEP.cjs');
|
|
7
7
|
require('../__chunks/QODNNCT2.cjs');
|
|
8
8
|
|
|
@@ -16,5 +16,5 @@ require('../__chunks/K4AUV2VK.cjs');
|
|
|
16
16
|
require('../__chunks/X2SDR4SD.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.default =
|
|
19
|
+
exports.default = _LVKEK2EYcjs.TextField;
|
|
20
20
|
//# sourceMappingURL=TextField.cjs.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
TextField
|
|
4
|
-
} from "../__chunks/
|
|
5
|
-
import "../__chunks/
|
|
4
|
+
} from "../__chunks/PIJIEP6L.js";
|
|
5
|
+
import "../__chunks/LPNV4GH3.js";
|
|
6
6
|
import "../__chunks/4U4UW4AK.js";
|
|
7
7
|
import "../__chunks/IB6JZQF3.js";
|
|
8
8
|
import "../__chunks/4U4UW4AK.js";
|
|
@@ -9,7 +9,7 @@ var _3RX4RMGCcjs = require('./3RX4RMGC.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _LT2LND2Pcjs = require('./LT2LND2P.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
|
|
150
|
+
return _LT2LND2Pcjs.ColorBaseDestructive700;
|
|
151
151
|
} else {
|
|
152
152
|
if (color === "clear") {
|
|
153
|
-
return
|
|
153
|
+
return _LT2LND2Pcjs.ColorCambioWhite100;
|
|
154
154
|
} else {
|
|
155
|
-
return
|
|
155
|
+
return _LT2LND2Pcjs.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=
|
|
289
|
+
//# sourceMappingURL=3ZKXEILC.cjs.map
|
|
@@ -23,6 +23,7 @@ var textColorForBackgroundColor = (color) => {
|
|
|
23
23
|
case "pink":
|
|
24
24
|
case "lilac":
|
|
25
25
|
case "cream":
|
|
26
|
+
case "yellow700":
|
|
26
27
|
return "gray900";
|
|
27
28
|
default:
|
|
28
29
|
return "white";
|
|
@@ -72,4 +73,4 @@ var Badge_default = Badge;
|
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
exports.Badge_default = Badge_default;
|
|
75
|
-
//# sourceMappingURL=
|
|
76
|
+
//# sourceMappingURL=5NYVFU4A.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["css-module:./Badge.module.css#css-module","../../src/Badge/Badge.tsx"],"names":[],"mappings":";;;;;;;;;AAA0F,IAAO,uBAAQ,EAAC,QAAO,gBAAe;;;ACmFxH,SACW,KADX;AA9DR,IAAM,8BAA8B,CAClC,UACwB;AACxB,UAAQ,OAAO;AAAA,IACb,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAKA,IAAM,QAAQ,CAAC;AAAA,EACb,MAAM;AAAA,EACN;AAAA,EACA,QAAQ;AACV,MAiBmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,WAAW;AAAA,MAEX;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,OAAO,4BAA4B,KAAK;AAAA,UAExC,+BAAC,eAAI,SAAQ,QAAO,KAAK,GAAG,YAAW,UAAS,gBAAe,SAC5D;AAAA,oBAAQ,oBAAC,QAAK,WAAW,qBAAO,MAAM,MAAM,KAAK;AAAA,YAClD;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,4BAA4B,KAAK;AAAA,gBACxC,MAAM;AAAA,gBACN,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA,aACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ","sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Badge/Badge.module.css\"; export default {\"icon\":\"_icon_1g9xb_1\"}","import { type ComponentProps } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport styles from \"./Badge.module.css\";\nimport type InternalIcon from \"../Icon/Icon\";\n\nconst badgeColor = [\n \"sky\",\n \"success300\",\n \"destructive300\",\n \"orange\",\n \"tan\",\n \"gray370\",\n \"gray870\",\n \"lilac\",\n \"thistle\",\n \"pink\",\n \"cream\",\n \"yellow700\",\n] as const;\n\nconst textColorForBackgroundColor = (\n color: (typeof badgeColor)[number],\n): \"gray900\" | \"white\" => {\n switch (color) {\n case \"gray370\":\n case \"destructive300\":\n case \"orange\":\n case \"tan\":\n case \"success300\":\n case \"sky\":\n case \"thistle\":\n case \"pink\":\n case \"lilac\":\n case \"cream\":\n case \"yellow700\":\n return \"gray900\";\n default:\n return \"white\";\n }\n};\n\n/**\n * [Badge](https://cambly-syntax.vercel.app/?path=/docs/components-badge--docs) is a component to display short text and give additional context to features and other components.\n */\nconst Badge = ({\n icon: Icon,\n text,\n color = \"sky\",\n}: {\n /**\n * The icon to be displayed. Please use a [Material Icon](https://material.io/resources/icons/)\n */\n icon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The text to display inside the badge\n */\n text: string;\n /**\n * The color of the badge\n *\n * @defaultValue \"sky\"\n */\n color?: (typeof badgeColor)[number];\n}): JSX.Element => {\n return (\n <Box\n display=\"inlineFlex\"\n paddingX={2}\n paddingY={1}\n rounding={\"sm\"}\n backgroundColor={color}\n alignItems=\"center\"\n justifyContent=\"center\"\n minHeight={24}\n >\n <Typography\n size={100}\n weight=\"medium\"\n color={textColorForBackgroundColor(color)}\n >\n <Box display=\"flex\" gap={1} alignItems=\"center\" justifyContent=\"start\">\n {Icon && <Icon className={styles.icon} size={100} />}\n <Typography\n color={textColorForBackgroundColor(color)}\n size={100}\n weight=\"medium\"\n >\n {text}\n </Typography>\n </Box>\n </Typography>\n </Box>\n );\n};\n\nexport default Badge;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on
|
|
1
|
+
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"sourcesContent":["/**\n * Do not edit directly\n * Generated on Fri, 30 Aug 2024 22:55:05 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":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ColorBaseDestructive700,
|
|
7
7
|
ColorBaseGray700,
|
|
8
8
|
ColorCambioWhite100
|
|
9
|
-
} from "./
|
|
9
|
+
} from "./5OYS7RA7.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=
|
|
143
|
+
//# sourceMappingURL=FGZ2KY62.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
ColorBaseDestructive700,
|
|
10
10
|
ColorBaseGray700,
|
|
11
11
|
ColorCambioWhite100
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./5OYS7RA7.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=
|
|
289
|
+
//# sourceMappingURL=GQ3EDG2X.js.map
|
|
@@ -23,6 +23,7 @@ var textColorForBackgroundColor = (color) => {
|
|
|
23
23
|
case "pink":
|
|
24
24
|
case "lilac":
|
|
25
25
|
case "cream":
|
|
26
|
+
case "yellow700":
|
|
26
27
|
return "gray900";
|
|
27
28
|
default:
|
|
28
29
|
return "white";
|
|
@@ -72,4 +73,4 @@ var Badge_default = Badge;
|
|
|
72
73
|
export {
|
|
73
74
|
Badge_default
|
|
74
75
|
};
|
|
75
|
-
//# sourceMappingURL=
|
|
76
|
+
//# sourceMappingURL=LPNV4GH3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["css-module:./Badge.module.css#css-module","../../src/Badge/Badge.tsx"],"sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Badge/Badge.module.css\"; export default {\"icon\":\"_icon_1g9xb_1\"}","import { type ComponentProps } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport styles from \"./Badge.module.css\";\nimport type InternalIcon from \"../Icon/Icon\";\n\nconst badgeColor = [\n \"sky\",\n \"success300\",\n \"destructive300\",\n \"orange\",\n \"tan\",\n \"gray370\",\n \"gray870\",\n \"lilac\",\n \"thistle\",\n \"pink\",\n \"cream\",\n \"yellow700\",\n] as const;\n\nconst textColorForBackgroundColor = (\n color: (typeof badgeColor)[number],\n): \"gray900\" | \"white\" => {\n switch (color) {\n case \"gray370\":\n case \"destructive300\":\n case \"orange\":\n case \"tan\":\n case \"success300\":\n case \"sky\":\n case \"thistle\":\n case \"pink\":\n case \"lilac\":\n case \"cream\":\n case \"yellow700\":\n return \"gray900\";\n default:\n return \"white\";\n }\n};\n\n/**\n * [Badge](https://cambly-syntax.vercel.app/?path=/docs/components-badge--docs) is a component to display short text and give additional context to features and other components.\n */\nconst Badge = ({\n icon: Icon,\n text,\n color = \"sky\",\n}: {\n /**\n * The icon to be displayed. Please use a [Material Icon](https://material.io/resources/icons/)\n */\n icon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The text to display inside the badge\n */\n text: string;\n /**\n * The color of the badge\n *\n * @defaultValue \"sky\"\n */\n color?: (typeof badgeColor)[number];\n}): JSX.Element => {\n return (\n <Box\n display=\"inlineFlex\"\n paddingX={2}\n paddingY={1}\n rounding={\"sm\"}\n backgroundColor={color}\n alignItems=\"center\"\n justifyContent=\"center\"\n minHeight={24}\n >\n <Typography\n size={100}\n weight=\"medium\"\n color={textColorForBackgroundColor(color)}\n >\n <Box display=\"flex\" gap={1} alignItems=\"center\" justifyContent=\"start\">\n {Icon && <Icon className={styles.icon} size={100} />}\n <Typography\n color={textColorForBackgroundColor(color)}\n size={100}\n weight=\"medium\"\n >\n {text}\n </Typography>\n </Box>\n </Typography>\n </Box>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;;;;AAA0F,IAAO,uBAAQ,EAAC,QAAO,gBAAe;;;ACmFxH,SACW,KADX;AA9DR,IAAM,8BAA8B,CAClC,UACwB;AACxB,UAAQ,OAAO;AAAA,IACb,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAKA,IAAM,QAAQ,CAAC;AAAA,EACb,MAAM;AAAA,EACN;AAAA,EACA,QAAQ;AACV,MAiBmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,WAAW;AAAA,MAEX;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,OAAO,4BAA4B,KAAK;AAAA,UAExC,+BAAC,eAAI,SAAQ,QAAO,KAAK,GAAG,YAAW,UAAS,gBAAe,SAC5D;AAAA,oBAAQ,oBAAC,QAAK,WAAW,qBAAO,MAAM,MAAM,KAAK;AAAA,YAClD;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,4BAA4B,KAAK;AAAA,gBACxC,MAAM;AAAA,gBACN,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA,aACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
|
@@ -10,4 +10,4 @@ var ColorCambioWhite100 = "#ffffff";
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
exports.ColorBaseDestructive700 = ColorBaseDestructive700; exports.ColorBaseGray700 = ColorBaseGray700; exports.ColorCambioWhite100 = ColorCambioWhite100;
|
|
13
|
-
//# sourceMappingURL=
|
|
13
|
+
//# sourceMappingURL=LT2LND2P.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
|
|
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, 30 Aug 2024 22:55:05 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,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client"
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _5NYVFU4Acjs = require('./5NYVFU4A.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _QODNNCT2cjs = require('./QODNNCT2.cjs');
|
|
@@ -98,7 +98,7 @@ function TextField({
|
|
|
98
98
|
dangerouslySetInlineStyle: { __style: { top: "25%" } },
|
|
99
99
|
marginEnd: 4,
|
|
100
100
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
|
-
|
|
101
|
+
_5NYVFU4Acjs.Badge_default,
|
|
102
102
|
{
|
|
103
103
|
text: endBadge,
|
|
104
104
|
color: on === "lightBackground" ? "gray370" : "gray870"
|
|
@@ -118,4 +118,4 @@ function TextField({
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
exports.TextField = TextField;
|
|
121
|
-
//# sourceMappingURL=
|
|
121
|
+
//# sourceMappingURL=LVKEK2EY.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
Badge_default
|
|
4
|
-
} from "./
|
|
4
|
+
} from "./LPNV4GH3.js";
|
|
5
5
|
import {
|
|
6
6
|
Box_default
|
|
7
7
|
} from "./IB6JZQF3.js";
|
|
@@ -118,4 +118,4 @@ function TextField({
|
|
|
118
118
|
export {
|
|
119
119
|
TextField
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=
|
|
121
|
+
//# sourceMappingURL=PIJIEP6L.js.map
|
|
@@ -6,7 +6,7 @@ var _JVGX637Ecjs = require('./JVGX637E.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _LT2LND2Pcjs = require('./LT2LND2P.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
|
|
69
|
+
return _LT2LND2Pcjs.ColorBaseDestructive700;
|
|
70
70
|
} else {
|
|
71
71
|
if (on === "darkBackground") {
|
|
72
|
-
return
|
|
72
|
+
return _LT2LND2Pcjs.ColorCambioWhite100;
|
|
73
73
|
} else {
|
|
74
|
-
return
|
|
74
|
+
return _LT2LND2Pcjs.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=
|
|
143
|
+
//# sourceMappingURL=SJOBDTPK.cjs.map
|
package/dist/index.cjs
CHANGED
|
@@ -32,11 +32,11 @@ var _RUXLZWRZcjs = require('./__chunks/RUXLZWRZ.cjs');
|
|
|
32
32
|
require('./__chunks/TH4TA3JN.cjs');
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _SJOBDTPKcjs = require('./__chunks/SJOBDTPK.cjs');
|
|
36
36
|
require('./__chunks/JVGX637E.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _3ZKXEILCcjs = require('./__chunks/3ZKXEILC.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _VZTP4FJUcjs = require('./__chunks/VZTP4FJU.cjs');
|
|
@@ -46,7 +46,7 @@ require('./__chunks/3RX4RMGC.cjs');
|
|
|
46
46
|
|
|
47
47
|
var _VJWLFFADcjs = require('./__chunks/VJWLFFAD.cjs');
|
|
48
48
|
require('./__chunks/WFVGNGEP.cjs');
|
|
49
|
-
require('./__chunks/
|
|
49
|
+
require('./__chunks/LT2LND2P.cjs');
|
|
50
50
|
require('./__chunks/5I7B5SAF.cjs');
|
|
51
51
|
|
|
52
52
|
|
|
@@ -77,10 +77,10 @@ require('./__chunks/RYUXG4AS.cjs');
|
|
|
77
77
|
var _36JMUQOLcjs = require('./__chunks/36JMUQOL.cjs');
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
var
|
|
80
|
+
var _LVKEK2EYcjs = require('./__chunks/LVKEK2EY.cjs');
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _5NYVFU4Acjs = require('./__chunks/5NYVFU4A.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
var _IUX3GQRDcjs = require('./__chunks/IUX3GQRD.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 =
|
|
165
|
+
exports.Avatar = _GQUBAKFOcjs.Avatar_default; exports.AvatarGroup = _GEXK47GRcjs.AvatarGroup; exports.Badge = _5NYVFU4Acjs.Badge_default; exports.Box = _QODNNCT2cjs.Box_default; exports.Button = _7COSMEXWcjs.Button_default; exports.ButtonGroup = _6KSVCCCBcjs.ButtonGroup_default; exports.Card = _AVJQ2E2Gcjs.Card_default; exports.Checkbox = _S7BCIAUQcjs.Checkbox_default; exports.Chip = _PBHDA7GVcjs.Chip_default; exports.Divider = _A3B4YKGNcjs.Divider; exports.Heading = _Q7CC3YA4cjs.Heading_default; exports.Icon = _IBT4YOI5cjs.Icon_default; exports.IconButton = _VJWLFFADcjs.IconButton_default; exports.IconLinkButton = _RUXLZWRZcjs.IconLinkButton_default; exports.LinkButton = _YNGB4N62cjs.LinkButton_default; exports.Modal = _SAPSO6DDcjs.Modal; exports.Popover = _VZTP4FJUcjs.Popover_default; exports.RadioButton = _AI52ORKAcjs.RadioButton_default; exports.RichSelectList = _3ZKXEILCcjs.RichSelectList_default; exports.SelectList = _SJOBDTPKcjs.SelectList; exports.TabButton = _Q65LBFK3cjs.TabButton; exports.TabLink = _E3KSILLWcjs.TabLink_default; exports.Tabs = _4QUXUGJPcjs.Tabs; exports.TapArea = _3UEOKPM2cjs.TapArea_default; exports.TextArea = _IUX3GQRDcjs.TextArea_default; exports.TextField = _LVKEK2EYcjs.TextField; exports.ThemeProvider = _36JMUQOLcjs.ThemeProvider; exports.Tooltip = _JACR34JOcjs.Tooltip_default; exports.Typography = _RVU3UEZIcjs.Typography_default; exports.WordConfetti = _FHQ7KPFEcjs.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/
|
|
35
|
+
} from "./__chunks/FGZ2KY62.js";
|
|
36
36
|
import "./__chunks/SPQ7DQHG.js";
|
|
37
37
|
import {
|
|
38
38
|
RichSelectList_default
|
|
39
|
-
} from "./__chunks/
|
|
39
|
+
} from "./__chunks/GQ3EDG2X.js";
|
|
40
40
|
import {
|
|
41
41
|
Popover_default
|
|
42
42
|
} from "./__chunks/ATUBU46J.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
IconButton_default
|
|
47
47
|
} from "./__chunks/GDXRRA57.js";
|
|
48
48
|
import "./__chunks/4U4UW4AK.js";
|
|
49
|
-
import "./__chunks/
|
|
49
|
+
import "./__chunks/5OYS7RA7.js";
|
|
50
50
|
import "./__chunks/7YH3K65I.js";
|
|
51
51
|
import {
|
|
52
52
|
ButtonGroup_default
|
|
@@ -77,10 +77,10 @@ import {
|
|
|
77
77
|
} from "./__chunks/KTX4P4Q2.js";
|
|
78
78
|
import {
|
|
79
79
|
TextField
|
|
80
|
-
} from "./__chunks/
|
|
80
|
+
} from "./__chunks/PIJIEP6L.js";
|
|
81
81
|
import {
|
|
82
82
|
Badge_default
|
|
83
|
-
} from "./__chunks/
|
|
83
|
+
} from "./__chunks/LPNV4GH3.js";
|
|
84
84
|
import {
|
|
85
85
|
TextArea_default
|
|
86
86
|
} from "./__chunks/D5RAT3YV.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["css-module:./Badge.module.css#css-module","../../src/Badge/Badge.tsx"],"sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Badge/Badge.module.css\"; export default {\"icon\":\"_icon_1g9xb_1\"}","import { type ComponentProps } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport styles from \"./Badge.module.css\";\nimport type InternalIcon from \"../Icon/Icon\";\n\nconst badgeColor = [\n \"sky\",\n \"success300\",\n \"destructive300\",\n \"orange\",\n \"tan\",\n \"gray370\",\n \"gray870\",\n \"lilac\",\n \"thistle\",\n \"pink\",\n \"cream\",\n] as const;\n\nconst textColorForBackgroundColor = (\n color: (typeof badgeColor)[number],\n): \"gray900\" | \"white\" => {\n switch (color) {\n case \"gray370\":\n case \"destructive300\":\n case \"orange\":\n case \"tan\":\n case \"success300\":\n case \"sky\":\n case \"thistle\":\n case \"pink\":\n case \"lilac\":\n case \"cream\":\n return \"gray900\";\n default:\n return \"white\";\n }\n};\n\n/**\n * [Badge](https://cambly-syntax.vercel.app/?path=/docs/components-badge--docs) is a component to display short text and give additional context to features and other components.\n */\nconst Badge = ({\n icon: Icon,\n text,\n color = \"sky\",\n}: {\n /**\n * The icon to be displayed. Please use a [Material Icon](https://material.io/resources/icons/)\n */\n icon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The text to display inside the badge\n */\n text: string;\n /**\n * The color of the badge\n *\n * @defaultValue \"sky\"\n */\n color?: (typeof badgeColor)[number];\n}): JSX.Element => {\n return (\n <Box\n display=\"inlineFlex\"\n paddingX={2}\n paddingY={1}\n rounding={\"sm\"}\n backgroundColor={color}\n alignItems=\"center\"\n justifyContent=\"center\"\n minHeight={24}\n >\n <Typography\n size={100}\n weight=\"medium\"\n color={textColorForBackgroundColor(color)}\n >\n <Box display=\"flex\" gap={1} alignItems=\"center\" justifyContent=\"start\">\n {Icon && <Icon className={styles.icon} size={100} />}\n <Typography\n color={textColorForBackgroundColor(color)}\n size={100}\n weight=\"medium\"\n >\n {text}\n </Typography>\n </Box>\n </Typography>\n </Box>\n );\n};\n\nexport default Badge;\n"],"mappings":";;;;;;;;;AAA0F,IAAO,uBAAQ,EAAC,QAAO,gBAAe;;;ACiFxH,SACW,KADX;AA7DR,IAAM,8BAA8B,CAClC,UACwB;AACxB,UAAQ,OAAO;AAAA,IACb,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAKA,IAAM,QAAQ,CAAC;AAAA,EACb,MAAM;AAAA,EACN;AAAA,EACA,QAAQ;AACV,MAiBmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,WAAW;AAAA,MAEX;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,OAAO,4BAA4B,KAAK;AAAA,UAExC,+BAAC,eAAI,SAAQ,QAAO,KAAK,GAAG,YAAW,UAAS,gBAAe,SAC5D;AAAA,oBAAQ,oBAAC,QAAK,WAAW,qBAAO,MAAM,MAAM,KAAK;AAAA,YAClD;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,4BAA4B,KAAK;AAAA,gBACxC,MAAM;AAAA,gBACN,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA,aACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["css-module:./Badge.module.css#css-module","../../src/Badge/Badge.tsx"],"names":[],"mappings":";;;;;;;;;AAA0F,IAAO,uBAAQ,EAAC,QAAO,gBAAe;;;ACiFxH,SACW,KADX;AA7DR,IAAM,8BAA8B,CAClC,UACwB;AACxB,UAAQ,OAAO;AAAA,IACb,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAKA,IAAM,QAAQ,CAAC;AAAA,EACb,MAAM;AAAA,EACN;AAAA,EACA,QAAQ;AACV,MAiBmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,UAAU;AAAA,MACV,UAAU;AAAA,MACV,UAAU;AAAA,MACV,iBAAiB;AAAA,MACjB,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,WAAW;AAAA,MAEX;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,QAAO;AAAA,UACP,OAAO,4BAA4B,KAAK;AAAA,UAExC,+BAAC,eAAI,SAAQ,QAAO,KAAK,GAAG,YAAW,UAAS,gBAAe,SAC5D;AAAA,oBAAQ,oBAAC,QAAK,WAAW,qBAAO,MAAM,MAAM,KAAK;AAAA,YAClD;AAAA,cAAC;AAAA;AAAA,gBACC,OAAO,4BAA4B,KAAK;AAAA,gBACxC,MAAM;AAAA,gBACN,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA,aACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ","sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Badge/Badge.module.css\"; export default {\"icon\":\"_icon_1g9xb_1\"}","import { type ComponentProps } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport styles from \"./Badge.module.css\";\nimport type InternalIcon from \"../Icon/Icon\";\n\nconst badgeColor = [\n \"sky\",\n \"success300\",\n \"destructive300\",\n \"orange\",\n \"tan\",\n \"gray370\",\n \"gray870\",\n \"lilac\",\n \"thistle\",\n \"pink\",\n \"cream\",\n] as const;\n\nconst textColorForBackgroundColor = (\n color: (typeof badgeColor)[number],\n): \"gray900\" | \"white\" => {\n switch (color) {\n case \"gray370\":\n case \"destructive300\":\n case \"orange\":\n case \"tan\":\n case \"success300\":\n case \"sky\":\n case \"thistle\":\n case \"pink\":\n case \"lilac\":\n case \"cream\":\n return \"gray900\";\n default:\n return \"white\";\n }\n};\n\n/**\n * [Badge](https://cambly-syntax.vercel.app/?path=/docs/components-badge--docs) is a component to display short text and give additional context to features and other components.\n */\nconst Badge = ({\n icon: Icon,\n text,\n color = \"sky\",\n}: {\n /**\n * The icon to be displayed. Please use a [Material Icon](https://material.io/resources/icons/)\n */\n icon?:\n | React.ComponentType<{ className?: string }>\n | React.ComponentType<ComponentProps<typeof InternalIcon>>;\n /**\n * The text to display inside the badge\n */\n text: string;\n /**\n * The color of the badge\n *\n * @defaultValue \"sky\"\n */\n color?: (typeof badgeColor)[number];\n}): JSX.Element => {\n return (\n <Box\n display=\"inlineFlex\"\n paddingX={2}\n paddingY={1}\n rounding={\"sm\"}\n backgroundColor={color}\n alignItems=\"center\"\n justifyContent=\"center\"\n minHeight={24}\n >\n <Typography\n size={100}\n weight=\"medium\"\n color={textColorForBackgroundColor(color)}\n >\n <Box display=\"flex\" gap={1} alignItems=\"center\" justifyContent=\"start\">\n {Icon && <Icon className={styles.icon} size={100} />}\n <Typography\n color={textColorForBackgroundColor(color)}\n size={100}\n weight=\"medium\"\n >\n {text}\n </Typography>\n </Box>\n </Typography>\n </Box>\n );\n};\n\nexport default Badge;\n"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|