@cambly/syntax-core 10.8.1 → 10.9.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/Avatar/Avatar.d.ts +1 -1
- package/dist/Badge/Badge.cjs +4 -3
- package/dist/Badge/Badge.css +114 -22
- package/dist/Badge/Badge.css.map +1 -1
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +3 -2
- package/dist/Button/Button.cjs +4 -4
- package/dist/Button/Button.css +114 -22
- package/dist/Button/Button.css.map +1 -1
- package/dist/Button/Button.js +3 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/Checkbox/Checkbox.cjs +4 -3
- package/dist/Checkbox/Checkbox.css +114 -22
- package/dist/Checkbox/Checkbox.css.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +3 -2
- package/dist/Chip/Chip.cjs +4 -3
- package/dist/Chip/Chip.css +114 -22
- package/dist/Chip/Chip.css.map +1 -1
- package/dist/Chip/Chip.js +3 -2
- package/dist/Dialog/ModalDialog.cjs +4 -4
- package/dist/Dialog/ModalDialog.js +3 -3
- package/dist/Heading/Heading.cjs +4 -3
- package/dist/Heading/Heading.css +114 -22
- package/dist/Heading/Heading.css.map +1 -1
- package/dist/Heading/Heading.d.ts +33 -4
- package/dist/Heading/Heading.js +3 -2
- package/dist/IconButton/IconButton.cjs +3 -3
- package/dist/IconButton/IconButton.js +2 -2
- package/dist/LinkButton/LinkButton.cjs +4 -4
- package/dist/LinkButton/LinkButton.css +114 -22
- package/dist/LinkButton/LinkButton.css.map +1 -1
- package/dist/LinkButton/LinkButton.js +3 -3
- package/dist/Modal/Modal.cjs +5 -4
- package/dist/Modal/Modal.css +114 -22
- package/dist/Modal/Modal.css.map +1 -1
- package/dist/Modal/Modal.js +4 -3
- package/dist/Popover/Popover.cjs +5 -5
- package/dist/Popover/Popover.js +4 -4
- package/dist/RadioButton/RadioButton.cjs +4 -3
- package/dist/RadioButton/RadioButton.css +114 -22
- package/dist/RadioButton/RadioButton.css.map +1 -1
- package/dist/RadioButton/RadioButton.d.ts +1 -1
- package/dist/RadioButton/RadioButton.js +3 -2
- package/dist/RichSelect/RichSelectBox.cjs +10 -10
- package/dist/RichSelect/RichSelectBox.css +114 -22
- package/dist/RichSelect/RichSelectBox.css.map +1 -1
- package/dist/RichSelect/RichSelectBox.d.ts +1 -1
- package/dist/RichSelect/RichSelectBox.js +9 -9
- package/dist/RichSelect/RichSelectChip.cjs +5 -4
- package/dist/RichSelect/RichSelectChip.css +114 -22
- package/dist/RichSelect/RichSelectChip.css.map +1 -1
- package/dist/RichSelect/RichSelectChip.js +4 -3
- package/dist/RichSelect/RichSelectList.cjs +15 -15
- package/dist/RichSelect/RichSelectList.css +114 -22
- package/dist/RichSelect/RichSelectList.css.map +1 -1
- package/dist/RichSelect/RichSelectList.d.ts +1 -1
- package/dist/RichSelect/RichSelectList.js +14 -14
- package/dist/RichSelect/RichSelectRadioButton.cjs +5 -4
- package/dist/RichSelect/RichSelectRadioButton.css +114 -22
- package/dist/RichSelect/RichSelectRadioButton.css.map +1 -1
- package/dist/RichSelect/RichSelectRadioButton.d.ts +1 -1
- package/dist/RichSelect/RichSelectRadioButton.js +4 -3
- package/dist/RichSelect/RichSelectSection.cjs +4 -3
- package/dist/RichSelect/RichSelectSection.css +114 -22
- package/dist/RichSelect/RichSelectSection.css.map +1 -1
- package/dist/RichSelect/RichSelectSection.js +3 -2
- package/dist/SelectList/SelectList.cjs +5 -4
- package/dist/SelectList/SelectList.css +114 -22
- package/dist/SelectList/SelectList.css.map +1 -1
- package/dist/SelectList/SelectList.js +4 -3
- package/dist/TapArea/TapArea.d.ts +1 -1
- package/dist/TextArea/TextArea.cjs +4 -3
- package/dist/TextArea/TextArea.css +114 -22
- package/dist/TextArea/TextArea.css.map +1 -1
- package/dist/TextArea/TextArea.js +3 -2
- package/dist/TextField/TextField.cjs +4 -3
- package/dist/TextField/TextField.css +114 -22
- package/dist/TextField/TextField.css.map +1 -1
- package/dist/TextField/TextField.js +3 -2
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/Tooltip/Tooltip.cjs +4 -3
- package/dist/Tooltip/Tooltip.css +114 -22
- package/dist/Tooltip/Tooltip.css.map +1 -1
- package/dist/Tooltip/Tooltip.js +3 -2
- package/dist/Typography/Typography.cjs +3 -2
- package/dist/Typography/Typography.css +114 -22
- package/dist/Typography/Typography.css.map +1 -1
- package/dist/Typography/Typography.d.ts +54 -5
- package/dist/Typography/Typography.js +2 -1
- package/dist/__chunks/{L4KE5YQS.cjs → 2IVYMX2N.cjs} +3 -3
- package/dist/__chunks/{FKV5VN7F.js → 2L772DMJ.js} +2 -2
- package/dist/__chunks/32FNU7ZY.js +128 -0
- package/dist/__chunks/32FNU7ZY.js.map +1 -0
- package/dist/__chunks/{CS6U6WBZ.js → 3UFCDOCF.js} +2 -2
- package/dist/__chunks/{3BFH4YPH.cjs → 4QCCTDDW.cjs} +4 -4
- package/dist/__chunks/{PLF2SHYM.js → 5HJFQPOL.js} +2 -2
- package/dist/__chunks/{RRAXSCWL.js → 6LBX2D7Z.js} +8 -8
- package/dist/__chunks/{BANKR5VQ.js → 6NXOQHE2.js} +2 -2
- package/dist/__chunks/{GQC7B3U6.cjs → 7W5RYLTS.cjs} +3 -3
- package/dist/__chunks/{KX4HD3Q3.cjs → ANT3IQ3X.cjs} +10 -10
- package/dist/__chunks/{53IMFXFX.js → ARYTS7XZ.js} +3 -3
- package/dist/__chunks/{53IMFXFX.js.map → ARYTS7XZ.js.map} +1 -1
- package/dist/__chunks/{RMC2RSHW.js → BIOBVFK4.js} +2 -2
- package/dist/__chunks/{4PICWHAJ.js → BQ6CW43H.js} +2 -2
- package/dist/__chunks/{LW7YGM7C.js → CRDTRKBH.js} +2 -2
- package/dist/__chunks/{P7UEPXTA.cjs → CVY5S6ZX.cjs} +4 -4
- package/dist/__chunks/{LIP6F5HL.js → DAMHOGG6.js} +2 -2
- package/dist/__chunks/{S6D6YJNT.cjs → DM4UMQ5D.cjs} +19 -19
- package/dist/__chunks/{EW5FQDYY.cjs → DSCWFIR3.cjs} +4 -4
- package/dist/__chunks/{EW5FQDYY.cjs.map → DSCWFIR3.cjs.map} +1 -1
- package/dist/__chunks/{2OKXRMSO.cjs → DWTZH7KM.cjs} +5 -5
- package/dist/__chunks/{4QLZTDKE.cjs → FINKF5MC.cjs} +3 -3
- package/dist/__chunks/{VXNZTCXZ.cjs → GJ44NFS5.cjs} +12 -5
- package/dist/__chunks/GJ44NFS5.cjs.map +1 -0
- package/dist/__chunks/{YCBSKN3Q.js → HOSRHZZG.js} +2 -2
- package/dist/__chunks/{2DU7NSCB.js → IOQT7L7F.js} +1 -1
- package/dist/__chunks/{2DU7NSCB.js.map → IOQT7L7F.js.map} +1 -1
- package/dist/__chunks/{TYZIM5GF.js → IOYNCG2J.js} +3 -3
- package/dist/__chunks/{4LYJ2Z5F.js → JBEJC7X2.js} +11 -4
- package/dist/__chunks/JBEJC7X2.js.map +1 -0
- package/dist/__chunks/{SSFANAKU.js → JOG44CT2.js} +5 -5
- package/dist/__chunks/{YMNL37TU.cjs → K2AMFXJG.cjs} +5 -5
- package/dist/__chunks/{BTZDTIOB.cjs → K2SCOMJX.cjs} +3 -3
- package/dist/__chunks/{NGCJ3BBY.js → KOZMH6AE.js} +3 -3
- package/dist/__chunks/{NGCJ3BBY.js.map → KOZMH6AE.js.map} +1 -1
- package/dist/__chunks/{HKGPCZ2V.js → KP3CHNJW.js} +5 -5
- package/dist/__chunks/{ZQFEITZH.cjs → LCEAHKFE.cjs} +3 -3
- package/dist/__chunks/{C6UG54GY.js → MQUMPR4A.js} +2 -2
- package/dist/__chunks/{HFRUEPJM.cjs → OI44OAX7.cjs} +6 -6
- package/dist/__chunks/{U6LLWKED.cjs → POAYQEOA.cjs} +1 -1
- package/dist/__chunks/{U6LLWKED.cjs.map → POAYQEOA.cjs.map} +1 -1
- package/dist/__chunks/{FXDPBBRB.js → Q5RYWCW7.js} +2 -2
- package/dist/__chunks/{HVGUWZ5I.js → RXNTJFP4.js} +5 -2
- package/dist/__chunks/RXNTJFP4.js.map +1 -0
- package/dist/__chunks/{W4UIYTBG.cjs → SJG2X2VN.cjs} +4 -4
- package/dist/__chunks/{W4UIYTBG.cjs.map → SJG2X2VN.cjs.map} +1 -1
- package/dist/__chunks/{DO56RCLX.js → T2WKEFB5.js} +2 -2
- package/dist/__chunks/TIW4V757.cjs +128 -0
- package/dist/__chunks/TIW4V757.cjs.map +1 -0
- package/dist/__chunks/{5WQ23BQE.js → TMH27D62.js} +5 -5
- package/dist/__chunks/{I37F5HVM.cjs → TVGN7SBI.cjs} +3 -3
- package/dist/__chunks/{EJTCFSQF.cjs → UXWIAEKV.cjs} +6 -6
- package/dist/__chunks/{63LUPH3X.cjs → WDR3YIMA.cjs} +3 -3
- package/dist/__chunks/{5NIFOD6K.cjs → WKDXUPAM.cjs} +5 -2
- package/dist/__chunks/WKDXUPAM.cjs.map +1 -0
- package/dist/__chunks/{5JI6NPPE.cjs → WPRJVUVL.cjs} +3 -3
- package/dist/__chunks/{JYKKN54U.cjs → X6F66N7W.cjs} +3 -3
- package/dist/index.cjs +26 -26
- package/dist/index.css +114 -22
- package/dist/index.css.map +1 -1
- package/dist/index.js +25 -25
- package/package.json +1 -1
- package/dist/__chunks/4LYJ2Z5F.js.map +0 -1
- package/dist/__chunks/5NIFOD6K.cjs.map +0 -1
- package/dist/__chunks/HVGUWZ5I.js.map +0 -1
- package/dist/__chunks/JBNXAIXY.cjs +0 -78
- package/dist/__chunks/JBNXAIXY.cjs.map +0 -1
- package/dist/__chunks/TGGJZ5GF.js +0 -78
- package/dist/__chunks/TGGJZ5GF.js.map +0 -1
- package/dist/__chunks/VXNZTCXZ.cjs.map +0 -1
- /package/dist/__chunks/{L4KE5YQS.cjs.map → 2IVYMX2N.cjs.map} +0 -0
- /package/dist/__chunks/{FKV5VN7F.js.map → 2L772DMJ.js.map} +0 -0
- /package/dist/__chunks/{CS6U6WBZ.js.map → 3UFCDOCF.js.map} +0 -0
- /package/dist/__chunks/{3BFH4YPH.cjs.map → 4QCCTDDW.cjs.map} +0 -0
- /package/dist/__chunks/{PLF2SHYM.js.map → 5HJFQPOL.js.map} +0 -0
- /package/dist/__chunks/{RRAXSCWL.js.map → 6LBX2D7Z.js.map} +0 -0
- /package/dist/__chunks/{BANKR5VQ.js.map → 6NXOQHE2.js.map} +0 -0
- /package/dist/__chunks/{GQC7B3U6.cjs.map → 7W5RYLTS.cjs.map} +0 -0
- /package/dist/__chunks/{KX4HD3Q3.cjs.map → ANT3IQ3X.cjs.map} +0 -0
- /package/dist/__chunks/{RMC2RSHW.js.map → BIOBVFK4.js.map} +0 -0
- /package/dist/__chunks/{4PICWHAJ.js.map → BQ6CW43H.js.map} +0 -0
- /package/dist/__chunks/{LW7YGM7C.js.map → CRDTRKBH.js.map} +0 -0
- /package/dist/__chunks/{P7UEPXTA.cjs.map → CVY5S6ZX.cjs.map} +0 -0
- /package/dist/__chunks/{LIP6F5HL.js.map → DAMHOGG6.js.map} +0 -0
- /package/dist/__chunks/{S6D6YJNT.cjs.map → DM4UMQ5D.cjs.map} +0 -0
- /package/dist/__chunks/{2OKXRMSO.cjs.map → DWTZH7KM.cjs.map} +0 -0
- /package/dist/__chunks/{4QLZTDKE.cjs.map → FINKF5MC.cjs.map} +0 -0
- /package/dist/__chunks/{YCBSKN3Q.js.map → HOSRHZZG.js.map} +0 -0
- /package/dist/__chunks/{TYZIM5GF.js.map → IOYNCG2J.js.map} +0 -0
- /package/dist/__chunks/{SSFANAKU.js.map → JOG44CT2.js.map} +0 -0
- /package/dist/__chunks/{YMNL37TU.cjs.map → K2AMFXJG.cjs.map} +0 -0
- /package/dist/__chunks/{BTZDTIOB.cjs.map → K2SCOMJX.cjs.map} +0 -0
- /package/dist/__chunks/{HKGPCZ2V.js.map → KP3CHNJW.js.map} +0 -0
- /package/dist/__chunks/{ZQFEITZH.cjs.map → LCEAHKFE.cjs.map} +0 -0
- /package/dist/__chunks/{C6UG54GY.js.map → MQUMPR4A.js.map} +0 -0
- /package/dist/__chunks/{HFRUEPJM.cjs.map → OI44OAX7.cjs.map} +0 -0
- /package/dist/__chunks/{FXDPBBRB.js.map → Q5RYWCW7.js.map} +0 -0
- /package/dist/__chunks/{DO56RCLX.js.map → T2WKEFB5.js.map} +0 -0
- /package/dist/__chunks/{5WQ23BQE.js.map → TMH27D62.js.map} +0 -0
- /package/dist/__chunks/{I37F5HVM.cjs.map → TVGN7SBI.cjs.map} +0 -0
- /package/dist/__chunks/{EJTCFSQF.cjs.map → UXWIAEKV.cjs.map} +0 -0
- /package/dist/__chunks/{63LUPH3X.cjs.map → WDR3YIMA.cjs.map} +0 -0
- /package/dist/__chunks/{5JI6NPPE.cjs.map → WPRJVUVL.cjs.map} +0 -0
- /package/dist/__chunks/{JYKKN54U.cjs.map → X6F66N7W.cjs.map} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _LTM57QMYcjs = require('./LTM57QMY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _FZRIE7EXcjs = require('./FZRIE7EX.cjs');
|
|
@@ -92,10 +92,10 @@ var Checkbox = ({
|
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
94
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
95
|
-
|
|
95
|
+
_TIW4V757cjs.Typography_default,
|
|
96
96
|
{
|
|
97
97
|
size: typographySize[size],
|
|
98
|
-
color: error ? "destructive-primary" : "
|
|
98
|
+
color: error ? "destructive-primary" : "gray900",
|
|
99
99
|
children: label
|
|
100
100
|
}
|
|
101
101
|
)
|
|
@@ -108,4 +108,4 @@ var Checkbox_default = Checkbox;
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
exports.Checkbox_default = Checkbox_default;
|
|
111
|
-
//# sourceMappingURL=
|
|
111
|
+
//# sourceMappingURL=DSCWFIR3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Checkbox/Checkbox.tsx","css-module:./Checkbox.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACDyE,IAAO,0BAAQ,EAAC,iBAAgB,0BAAyB,gBAAe,yBAAwB,YAAW,sBAAqB,YAAW,sBAAqB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,gBAAe,0BAAyB,mBAAkB,6BAA4B,wBAAuB,kCAAiC,cAAa,wBAAuB,mBAAkB,6BAA4B,gBAAe,0BAAyB,MAAK,gBAAe,MAAK,eAAc;;;ADwFjoB,SAYQ,KAZR;AAhFJ,IAAM,iBAAiB;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,YAAY;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AACN;AAKA,IAAM,WAAW,CAAC;AAAA,EAChB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR;AACF,MAwCoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,QAAM,kBAAkB,WAAW,wBAAO,UAAU,wBAAO,IAAI,CAAC;AAChE,QAAM,mBAAmB,WAAW,iBAAiB,wBAAO,cAAc;AAAA,IACxE,CAAC,wBAAO,eAAe,GAAG,CAAC;AAAA,IAC3B,CAAC,wBAAO,oBAAoB,GAAG;AAAA,IAC/B,CAAC,qBAAY,yBAAyB,GAAG,aAAa;AAAA,EACxD,CAAC;AACD,QAAM,iBAAiB,WAAW,iBAAiB,wBAAO,YAAY;AAAA,IACpE,CAAC,wBAAO,eAAe,GAAG,CAAC;AAAA,IAC3B,CAAC,wBAAO,YAAY,GAAG;AAAA,IACvB,CAAC,qBAAY,yBAAyB,GAAG,aAAa;AAAA,EACxD,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,wBAAO;AAAA,QACP,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,QACnD;AAAA,UACE,CAAC,wBAAO,QAAQ,GAAG;AAAA,QACrB;AAAA,MACF;AAAA,MAEA;AAAA,4BAAC,SAAI,WAAW,UAAU,iBAAiB,kBACxC,qBACC,oBAAC,SAAI,eAAY,QAAO,SAAQ,aAAY,OAAO,UAAU,IAAI,GAC/D;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA;AAAA,QACH,GACH,GAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa;AAAA,YACb,MAAK;AAAA,YACL,WAAW;AAAA,cACT,wBAAO;AAAA,cACP,wBAAO,IAAI;AAAA,cACX,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,YACrD;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,eAAe,IAAI;AAAA,YACzB,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n const checkboxStyling = classNames(styles.checkbox, styles[size]);\n const uncheckedStyling = classNames(checkboxStyling, styles.uncheckedBox, {\n [styles.uncheckedBorder]: !error,\n [styles.uncheckedErrorBorder]: error,\n [focusStyles.accessibilityOutlineFocus]: isFocused && isFocusVisible,\n });\n const checkedStyling = classNames(checkboxStyling, styles.checkedBox, {\n [styles.checkedNonError]: !error,\n [styles.checkedError]: error,\n [focusStyles.accessibilityOutlineFocus]: isFocused && isFocusVisible,\n });\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div className={checked ? checkedStyling : uncheckedStyling}>\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n fill=\"#fff\"\n d=\"m9 16.2-3.5-3.5a.9839.9839 0 0 0-1.4 0c-.39.39-.39 1.01 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7c.39-.39.39-1.01 0-1.4a.9839.9839 0 0 0-1.4 0L9 16.2z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"
|
|
1
|
+
{"version":3,"sources":["../../src/Checkbox/Checkbox.tsx","css-module:./Checkbox.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACDyE,IAAO,0BAAQ,EAAC,iBAAgB,0BAAyB,gBAAe,yBAAwB,YAAW,sBAAqB,YAAW,sBAAqB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,gBAAe,0BAAyB,mBAAkB,6BAA4B,wBAAuB,kCAAiC,cAAa,wBAAuB,mBAAkB,6BAA4B,gBAAe,0BAAyB,MAAK,gBAAe,MAAK,eAAc;;;ADwFjoB,SAYQ,KAZR;AAhFJ,IAAM,iBAAiB;AAAA,EACrB,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,IAAM,YAAY;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AACN;AAKA,IAAM,WAAW,CAAC;AAAA,EAChB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR;AACF,MAwCoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,QAAM,kBAAkB,WAAW,wBAAO,UAAU,wBAAO,IAAI,CAAC;AAChE,QAAM,mBAAmB,WAAW,iBAAiB,wBAAO,cAAc;AAAA,IACxE,CAAC,wBAAO,eAAe,GAAG,CAAC;AAAA,IAC3B,CAAC,wBAAO,oBAAoB,GAAG;AAAA,IAC/B,CAAC,qBAAY,yBAAyB,GAAG,aAAa;AAAA,EACxD,CAAC;AACD,QAAM,iBAAiB,WAAW,iBAAiB,wBAAO,YAAY;AAAA,IACpE,CAAC,wBAAO,eAAe,GAAG,CAAC;AAAA,IAC3B,CAAC,wBAAO,YAAY,GAAG;AAAA,IACvB,CAAC,qBAAY,yBAAyB,GAAG,aAAa;AAAA,EACxD,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,wBAAO;AAAA,QACP,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,QACnD;AAAA,UACE,CAAC,wBAAO,QAAQ,GAAG;AAAA,QACrB;AAAA,MACF;AAAA,MAEA;AAAA,4BAAC,SAAI,WAAW,UAAU,iBAAiB,kBACxC,qBACC,oBAAC,SAAI,eAAY,QAAO,SAAQ,aAAY,OAAO,UAAU,IAAI,GAC/D;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,GAAE;AAAA;AAAA,QACH,GACH,GAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,eAAa;AAAA,YACb,MAAK;AAAA,YACL,WAAW;AAAA,cACT,wBAAO;AAAA,cACP,wBAAO,IAAI;AAAA,cACX,wBAAO,SAAS,WAAW,aAAa,WAAW;AAAA,YACrD;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,eAAe,IAAI;AAAA,YACzB,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,mBAAQ","sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classNames from \"classnames\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport styles from \"./Checkbox.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\nconst typographySize = {\n sm: 100,\n md: 200,\n} as const;\n\nconst iconWidth = {\n sm: 12,\n md: 20,\n};\n\n/**\n * [Checkbox](https://cambly-syntax.vercel.app/?path=/docs/components-checkbox--docs) is a clickable element that will show if an option has been selected or not.\n */\nconst Checkbox = ({\n checked = false,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n size = \"md\",\n label,\n error = false,\n onChange,\n}: {\n /**\n * Whether or not the box has been clicked\n *\n * @defaultValue false\n */\n checked: boolean;\n /**\n * Test id for the checkbox\n */\n \"data-testid\"?: string;\n /**\n * The callback to be called when the checkbox value changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether or not the box is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * The size of the checkbox and icon\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * The text accompanying the checkbox\n */\n label: string;\n /**\n * Whether or not there is an error with the input\n *\n * @defaultValue false\n */\n error?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n const checkboxStyling = classNames(styles.checkbox, styles[size]);\n const uncheckedStyling = classNames(checkboxStyling, styles.uncheckedBox, {\n [styles.uncheckedBorder]: !error,\n [styles.uncheckedErrorBorder]: error,\n [focusStyles.accessibilityOutlineFocus]: isFocused && isFocusVisible,\n });\n const checkedStyling = classNames(checkboxStyling, styles.checkedBox, {\n [styles.checkedNonError]: !error,\n [styles.checkedError]: error,\n [focusStyles.accessibilityOutlineFocus]: isFocused && isFocusVisible,\n });\n\n return (\n <label\n className={classNames(\n styles.mainContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n },\n )}\n >\n <div className={checked ? checkedStyling : uncheckedStyling}>\n {checked && (\n <svg aria-hidden=\"true\" viewBox=\"0 0 24 24\" width={iconWidth[size]}>\n <path\n fill=\"#fff\"\n d=\"m9 16.2-3.5-3.5a.9839.9839 0 0 0-1.4 0c-.39.39-.39 1.01 0 1.4l4.19 4.19c.39.39 1.02.39 1.41 0L20.3 7.7c.39-.39.39-1.01 0-1.4a.9839.9839 0 0 0-1.4 0L9 16.2z\"\n ></path>\n </svg>\n )}\n </div>\n <input\n data-testid={dataTestId}\n type=\"checkbox\"\n className={classNames(\n styles.inputOverlay,\n styles[size],\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n <Typography\n size={typographySize[size]}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n </label>\n );\n};\n\nexport default Checkbox;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Checkbox/Checkbox.module.css\"; export default {\"mainContainer\":\"_mainContainer_an7al_1\",\"inputOverlay\":\"_inputOverlay_an7al_9\",\"checkbox\":\"_checkbox_an7al_17\",\"disabled\":\"_disabled_an7al_25\",\"cursorDisabled\":\"_cursorDisabled_an7al_29\",\"cursorEnabled\":\"_cursorEnabled_an7al_33\",\"uncheckedBox\":\"_uncheckedBox_an7al_37\",\"uncheckedBorder\":\"_uncheckedBorder_an7al_41\",\"uncheckedErrorBorder\":\"_uncheckedErrorBorder_an7al_45\",\"checkedBox\":\"_checkedBox_an7al_49\",\"checkedNonError\":\"_checkedNonError_an7al_53\",\"checkedError\":\"_checkedError_an7al_57\",\"sm\":\"_sm_an7al_61\",\"md\":\"_md_an7al_67\"}"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _SZCVEBN2cjs = require('./SZCVEBN2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _FZRIE7EXcjs = require('./FZRIE7EX.cjs');
|
|
@@ -52,8 +52,8 @@ var TextArea = _react.forwardRef.call(void 0,
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SZCVEBN2cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
56
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
55
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { className: TextField_module_default.label, htmlFor: inputId, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SZCVEBN2cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _TIW4V757cjs.Typography_default, { size: 100, color: "gray700", children: label }) }) }),
|
|
56
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _TIW4V757cjs.Typography_default, { size: 200, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
57
57
|
"textarea",
|
|
58
58
|
{
|
|
59
59
|
"data-testid": dataTestId,
|
|
@@ -77,7 +77,7 @@ var TextArea = _react.forwardRef.call(void 0,
|
|
|
77
77
|
}
|
|
78
78
|
) }),
|
|
79
79
|
(helperText || errorText) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SZCVEBN2cjs.Box_default, { paddingX: 1, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
80
|
-
|
|
80
|
+
_TIW4V757cjs.Typography_default,
|
|
81
81
|
{
|
|
82
82
|
size: 100,
|
|
83
83
|
color: errorText ? "destructive-primary" : "gray700",
|
|
@@ -94,4 +94,4 @@ var TextArea_default = TextArea;
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
exports.TextArea_default = TextArea_default;
|
|
97
|
-
//# sourceMappingURL=
|
|
97
|
+
//# sourceMappingURL=DWTZH7KM.cjs.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _SZCVEBN2cjs = require('./SZCVEBN2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _FZRIE7EXcjs = require('./FZRIE7EX.cjs');
|
|
@@ -55,7 +55,7 @@ var Chip = _react.forwardRef.call(void 0,
|
|
|
55
55
|
children: [
|
|
56
56
|
Icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Icon, { className: iconStyles }),
|
|
57
57
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _SZCVEBN2cjs.Box_default, { paddingX: Icon ? 1 : 0, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
58
|
-
|
|
58
|
+
_TIW4V757cjs.Typography_default,
|
|
59
59
|
{
|
|
60
60
|
size: typographySize[size],
|
|
61
61
|
color: selected ? "white" : "gray900",
|
|
@@ -73,4 +73,4 @@ var Chip_default = Chip;
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
exports.Chip_default = Chip_default;
|
|
76
|
-
//# sourceMappingURL=
|
|
76
|
+
//# sourceMappingURL=FINKF5MC.cjs.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _WKDXUPAMcjs = require('./WKDXUPAM.cjs');
|
|
4
7
|
|
|
5
8
|
// src/Heading/Heading.tsx
|
|
6
9
|
var _jsxruntime = require('react/jsx-runtime');
|
|
@@ -10,20 +13,24 @@ var Heading = ({
|
|
|
10
13
|
children,
|
|
11
14
|
color = "gray900",
|
|
12
15
|
"data-testid": dataTestId,
|
|
16
|
+
fontStyle,
|
|
13
17
|
lineClamp,
|
|
14
18
|
size = 500
|
|
15
19
|
}) => {
|
|
16
|
-
const
|
|
20
|
+
const { themeName } = _WKDXUPAMcjs.useTheme.call(void 0, );
|
|
21
|
+
const classicWeight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
22
|
+
const cambioWeight = fontStyle === "serif" ? "medium" : "regular";
|
|
17
23
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
18
|
-
|
|
24
|
+
_TIW4V757cjs.Typography_default,
|
|
19
25
|
{
|
|
20
26
|
align,
|
|
21
27
|
as,
|
|
22
28
|
color,
|
|
29
|
+
fontStyle,
|
|
23
30
|
"data-testid": dataTestId,
|
|
24
31
|
lineClamp,
|
|
25
32
|
size,
|
|
26
|
-
weight,
|
|
33
|
+
weight: themeName === "classic" ? classicWeight : cambioWeight,
|
|
27
34
|
children
|
|
28
35
|
}
|
|
29
36
|
);
|
|
@@ -33,4 +40,4 @@ var Heading_default = Heading;
|
|
|
33
40
|
|
|
34
41
|
|
|
35
42
|
exports.Heading_default = Heading_default;
|
|
36
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=GJ44NFS5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Heading/Heading.tsx"],"names":[],"mappings":";;;;;;;;AAsGI;AA/FJ,IAAM,UAAU,CAAC;AAAA,EACf,QAAQ;AAAA,EACR,KAAK;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,EACR,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA,OAAO;AACT,MAgFoB;AAClB,QAAM,EAAE,UAAU,IAAI,SAAS;AAC/B,QAAM,gBAAgB,CAAC,KAAK,GAAG,EAAE,SAAS,IAAI,IAAI,UAAU;AAC5D,QAAM,eAAe,cAAc,UAAU,WAAW;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,QAAQ,cAAc,YAAY,gBAAgB;AAAA,MAEjD;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,kBAAQ","sourcesContent":["import { type ReactElement, type ReactNode } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\n/**\n * [Heading](https://cambly-syntax.vercel.app/?path=/docs/components-heading--docs) enforces a consistent style & accessibility best practices for headings.\n */\nconst Heading = ({\n align = \"start\",\n as = \"h1\",\n children,\n color = \"gray900\",\n \"data-testid\": dataTestId,\n fontStyle,\n lineClamp,\n size = 500,\n}: {\n /**\n * Aligns the text to the left, right, or center of the container.\n * * `start` and `end` will align the text to the left or right of the container depending on the locale.\n * * `forceLeft` and `forceRight` will align the text to the left or right of the container regardless of the locale (should be used sparingly).\n *\n * @defaultValue \"start\"\n */\n align?: \"start\" | \"end\" | \"forceLeft\" | \"center\" | \"forceRight\";\n /**\n * DOM element to render as.\n *\n * @defaultValue \"h1\"\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n /**\n * The text to be rendered\n */\n children?: ReactNode;\n /**\n * The color of the text.\n *\n * @defaultValue \"gray900\"\n */\n color?:\n | \"gray900\"\n | \"gray700\"\n | \"primary\"\n | \"destructive-primary\"\n | \"success\"\n | \"white\"\n | \"inherit\";\n /**\n * Test id for the text.\n */\n \"data-testid\"?: string;\n /**\n * Style of the font\n *\n * Classic only supports `sans-serif`\n *\n * @defaultValue \"sans-serif\"\n */\n fontStyle?: \"serif\" | \"sans-serif\";\n /**\n * The number of lines we should truncate the text at\n */\n lineClamp?: number | undefined;\n /**\n * Size of the text.\n *\n * Classic:\n * * `500`: 20px\n * * `600`: 28px\n * * `700`: 40px\n * * `800`: 64px\n *\n * Cambio Mobile:\n * * `400`: 20px\n * * `500`: 23px\n * * `600`: 26px\n * * `700`: 29px\n * * `800`: 33px\n * * `900`: 37px\n * * `1000`: 41px\n * * `1100`: 46px\n *\n * Cambio Desktop (viewport width > 480px):\n * * `400`: 25px\n * * `500`: 31px\n * * `600`: 39px\n * * `700`: 49px\n * * `800`: 61px\n * * `900`: 76px\n * * `1000`: 95px\n * * `1100`: 119px\n *\n * @defaultValue 500\n */\n size?: 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100;\n}): ReactElement => {\n const { themeName } = useTheme();\n const classicWeight = [700, 800].includes(size) ? \"heavy\" : \"bold\";\n const cambioWeight = fontStyle === \"serif\" ? \"medium\" : \"regular\";\n\n return (\n <Typography\n align={align}\n as={as}\n color={color}\n fontStyle={fontStyle}\n data-testid={dataTestId}\n lineClamp={lineClamp}\n size={size}\n weight={themeName === \"classic\" ? classicWeight : cambioWeight}\n >\n {children}\n </Typography>\n );\n};\n\nexport default Heading;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RadioButton_default
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./KOZMH6AE.js";
|
|
4
4
|
import {
|
|
5
5
|
RichSelectItem_default
|
|
6
6
|
} from "./Y6L6EOCB.js";
|
|
@@ -36,4 +36,4 @@ var RichSelectRadioButton_default = forwardRef(
|
|
|
36
36
|
export {
|
|
37
37
|
RichSelectRadioButton_default
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=
|
|
39
|
+
//# sourceMappingURL=HOSRHZZG.js.map
|
|
@@ -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 Mon, 04 Mar 2024 20:04:23 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 ColorCambioWhite = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#888077\";\nexport const ColorCambioGray800 = \"#5c554d\";\nexport const ColorCambioGray870 = \"#5c554d\";\nexport const ColorCambioGray900 = \"#312b23\";\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\";\n"],"mappings":";AASO,IAAM,0BAA0B;AAWhC,IAAM,mBAAmB;","names":[]}
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
ColorBaseDestructive700,
|
|
6
6
|
ColorBaseGray800
|
|
7
|
-
} from "./
|
|
7
|
+
} from "./IOQT7L7F.js";
|
|
8
8
|
import {
|
|
9
9
|
Focus_module_default
|
|
10
10
|
} from "./2O6FDRTF.js";
|
|
11
11
|
import {
|
|
12
12
|
Typography_default
|
|
13
|
-
} from "./
|
|
13
|
+
} from "./32FNU7ZY.js";
|
|
14
14
|
import {
|
|
15
15
|
useIsHydrated
|
|
16
16
|
} from "./YJ7YDIGB.js";
|
|
@@ -124,4 +124,4 @@ SelectList.Option = SelectOption_default;
|
|
|
124
124
|
export {
|
|
125
125
|
SelectList
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=
|
|
127
|
+
//# sourceMappingURL=IOYNCG2J.js.map
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Typography_default
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./32FNU7ZY.js";
|
|
4
|
+
import {
|
|
5
|
+
useTheme
|
|
6
|
+
} from "./RXNTJFP4.js";
|
|
4
7
|
|
|
5
8
|
// src/Heading/Heading.tsx
|
|
6
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -10,20 +13,24 @@ var Heading = ({
|
|
|
10
13
|
children,
|
|
11
14
|
color = "gray900",
|
|
12
15
|
"data-testid": dataTestId,
|
|
16
|
+
fontStyle,
|
|
13
17
|
lineClamp,
|
|
14
18
|
size = 500
|
|
15
19
|
}) => {
|
|
16
|
-
const
|
|
20
|
+
const { themeName } = useTheme();
|
|
21
|
+
const classicWeight = [700, 800].includes(size) ? "heavy" : "bold";
|
|
22
|
+
const cambioWeight = fontStyle === "serif" ? "medium" : "regular";
|
|
17
23
|
return /* @__PURE__ */ jsx(
|
|
18
24
|
Typography_default,
|
|
19
25
|
{
|
|
20
26
|
align,
|
|
21
27
|
as,
|
|
22
28
|
color,
|
|
29
|
+
fontStyle,
|
|
23
30
|
"data-testid": dataTestId,
|
|
24
31
|
lineClamp,
|
|
25
32
|
size,
|
|
26
|
-
weight,
|
|
33
|
+
weight: themeName === "classic" ? classicWeight : cambioWeight,
|
|
27
34
|
children
|
|
28
35
|
}
|
|
29
36
|
);
|
|
@@ -33,4 +40,4 @@ var Heading_default = Heading;
|
|
|
33
40
|
export {
|
|
34
41
|
Heading_default
|
|
35
42
|
};
|
|
36
|
-
//# sourceMappingURL=
|
|
43
|
+
//# sourceMappingURL=JBEJC7X2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/Heading/Heading.tsx"],"sourcesContent":["import { type ReactElement, type ReactNode } from \"react\";\nimport Typography from \"../Typography/Typography\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\n/**\n * [Heading](https://cambly-syntax.vercel.app/?path=/docs/components-heading--docs) enforces a consistent style & accessibility best practices for headings.\n */\nconst Heading = ({\n align = \"start\",\n as = \"h1\",\n children,\n color = \"gray900\",\n \"data-testid\": dataTestId,\n fontStyle,\n lineClamp,\n size = 500,\n}: {\n /**\n * Aligns the text to the left, right, or center of the container.\n * * `start` and `end` will align the text to the left or right of the container depending on the locale.\n * * `forceLeft` and `forceRight` will align the text to the left or right of the container regardless of the locale (should be used sparingly).\n *\n * @defaultValue \"start\"\n */\n align?: \"start\" | \"end\" | \"forceLeft\" | \"center\" | \"forceRight\";\n /**\n * DOM element to render as.\n *\n * @defaultValue \"h1\"\n */\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n /**\n * The text to be rendered\n */\n children?: ReactNode;\n /**\n * The color of the text.\n *\n * @defaultValue \"gray900\"\n */\n color?:\n | \"gray900\"\n | \"gray700\"\n | \"primary\"\n | \"destructive-primary\"\n | \"success\"\n | \"white\"\n | \"inherit\";\n /**\n * Test id for the text.\n */\n \"data-testid\"?: string;\n /**\n * Style of the font\n *\n * Classic only supports `sans-serif`\n *\n * @defaultValue \"sans-serif\"\n */\n fontStyle?: \"serif\" | \"sans-serif\";\n /**\n * The number of lines we should truncate the text at\n */\n lineClamp?: number | undefined;\n /**\n * Size of the text.\n *\n * Classic:\n * * `500`: 20px\n * * `600`: 28px\n * * `700`: 40px\n * * `800`: 64px\n *\n * Cambio Mobile:\n * * `400`: 20px\n * * `500`: 23px\n * * `600`: 26px\n * * `700`: 29px\n * * `800`: 33px\n * * `900`: 37px\n * * `1000`: 41px\n * * `1100`: 46px\n *\n * Cambio Desktop (viewport width > 480px):\n * * `400`: 25px\n * * `500`: 31px\n * * `600`: 39px\n * * `700`: 49px\n * * `800`: 61px\n * * `900`: 76px\n * * `1000`: 95px\n * * `1100`: 119px\n *\n * @defaultValue 500\n */\n size?: 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100;\n}): ReactElement => {\n const { themeName } = useTheme();\n const classicWeight = [700, 800].includes(size) ? \"heavy\" : \"bold\";\n const cambioWeight = fontStyle === \"serif\" ? \"medium\" : \"regular\";\n\n return (\n <Typography\n align={align}\n as={as}\n color={color}\n fontStyle={fontStyle}\n data-testid={dataTestId}\n lineClamp={lineClamp}\n size={size}\n weight={themeName === \"classic\" ? classicWeight : cambioWeight}\n >\n {children}\n </Typography>\n );\n};\n\nexport default Heading;\n"],"mappings":";;;;;;;;AAsGI;AA/FJ,IAAM,UAAU,CAAC;AAAA,EACf,QAAQ;AAAA,EACR,KAAK;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,EACR,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA,OAAO;AACT,MAgFoB;AAClB,QAAM,EAAE,UAAU,IAAI,SAAS;AAC/B,QAAM,gBAAgB,CAAC,KAAK,GAAG,EAAE,SAAS,IAAI,IAAI,UAAU;AAC5D,QAAM,eAAe,cAAc,UAAU,WAAW;AAExD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,QAAQ,cAAc,YAAY,gBAAgB;AAAA,MAEjD;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,kBAAQ;","names":[]}
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./IISMRA4R.js";
|
|
4
4
|
import {
|
|
5
5
|
Button_default
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./TMH27D62.js";
|
|
7
7
|
import {
|
|
8
8
|
Divider
|
|
9
9
|
} from "./6VWFOSQZ.js";
|
|
10
10
|
import {
|
|
11
11
|
RichSelectChip_default
|
|
12
|
-
} from "./
|
|
12
|
+
} from "./DAMHOGG6.js";
|
|
13
13
|
import {
|
|
14
14
|
RichSelectSection_default
|
|
15
|
-
} from "./
|
|
15
|
+
} from "./BIOBVFK4.js";
|
|
16
16
|
import {
|
|
17
17
|
RichSelectRadioButton_default
|
|
18
|
-
} from "./
|
|
18
|
+
} from "./HOSRHZZG.js";
|
|
19
19
|
import {
|
|
20
20
|
RichSelectItemContext,
|
|
21
21
|
RichSelect_module_default
|
|
@@ -207,4 +207,4 @@ export {
|
|
|
207
207
|
RichSelectBoxContext,
|
|
208
208
|
RichSelectBox_default
|
|
209
209
|
};
|
|
210
|
-
//# sourceMappingURL=
|
|
210
|
+
//# sourceMappingURL=JOG44CT2.js.map
|
|
@@ -21,10 +21,10 @@ var _VS4SS6B3cjs = require('./VS4SS6B3.cjs');
|
|
|
21
21
|
var _MF7Q6ZSWcjs = require('./MF7Q6ZSW.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _WKDXUPAMcjs = require('./WKDXUPAM.cjs');
|
|
28
28
|
|
|
29
29
|
// src/LinkButton/LinkButton.tsx
|
|
30
30
|
var _react = require('react');
|
|
@@ -49,7 +49,7 @@ var LinkButton = _react.forwardRef.call(void 0,
|
|
|
49
49
|
endIcon: EndIcon,
|
|
50
50
|
onClick
|
|
51
51
|
}, ref) => {
|
|
52
|
-
const { themeName } =
|
|
52
|
+
const { themeName } = _WKDXUPAMcjs.useTheme.call(void 0, );
|
|
53
53
|
const foregroundColorClass = themeName === "classic" ? _VS4SS6B3cjs.classicForegroundColor.call(void 0, _PSWX5DBCcjs.classicColor.call(void 0, color)) : _VS4SS6B3cjs.cambioForegroundColor.call(void 0, _PSWX5DBCcjs.cambioColor.call(void 0, color));
|
|
54
54
|
const backgroundColorClass = themeName === "classic" ? _MF7Q6ZSWcjs.classicBackgroundColor.call(void 0, _PSWX5DBCcjs.classicColor.call(void 0, color)) : _MF7Q6ZSWcjs.cambioBackgroundColor.call(void 0, _PSWX5DBCcjs.cambioColor.call(void 0, color));
|
|
55
55
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
@@ -87,7 +87,7 @@ var LinkButton = _react.forwardRef.call(void 0,
|
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
89
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
90
|
-
|
|
90
|
+
_TIW4V757cjs.Typography_default,
|
|
91
91
|
{
|
|
92
92
|
size: themeName === "classic" ? _7AYSDTC6cjs.textVariant_default[size] : _7AYSDTC6cjs.textVariant_default[size],
|
|
93
93
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -121,4 +121,4 @@ var LinkButton_default = LinkButton;
|
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
exports.LinkButton_default = LinkButton_default;
|
|
124
|
-
//# sourceMappingURL=
|
|
124
|
+
//# sourceMappingURL=K2AMFXJG.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _2IVYMX2Ncjs = require('./2IVYMX2N.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _VA23P3ZIcjs = require('./VA23P3ZI.cjs');
|
|
@@ -129,7 +129,7 @@ var ModalDialog = _react.forwardRef.call(void 0,
|
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
132
|
-
|
|
132
|
+
_2IVYMX2Ncjs.IconButton_default,
|
|
133
133
|
{
|
|
134
134
|
onClick: () => state.close(),
|
|
135
135
|
color: "tertiary",
|
|
@@ -156,4 +156,4 @@ var ModalDialog_default = ModalDialog;
|
|
|
156
156
|
|
|
157
157
|
|
|
158
158
|
exports.AriaModalOverlay = AriaModalOverlay; exports.AriaModal = AriaModal; exports.ModalDialog_default = ModalDialog_default;
|
|
159
|
-
//# sourceMappingURL=
|
|
159
|
+
//# sourceMappingURL=K2SCOMJX.cjs.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./2O6FDRTF.js";
|
|
4
4
|
import {
|
|
5
5
|
Typography_default
|
|
6
|
-
} from "./
|
|
6
|
+
} from "./32FNU7ZY.js";
|
|
7
7
|
import {
|
|
8
8
|
useIsHydrated
|
|
9
9
|
} from "./YJ7YDIGB.js";
|
|
@@ -95,7 +95,7 @@ var RadioButton = ({
|
|
|
95
95
|
Typography_default,
|
|
96
96
|
{
|
|
97
97
|
size: size === "md" ? 200 : 100,
|
|
98
|
-
color: error ? "destructive-primary" : "
|
|
98
|
+
color: error ? "destructive-primary" : "gray900",
|
|
99
99
|
children: label
|
|
100
100
|
}
|
|
101
101
|
)
|
|
@@ -108,4 +108,4 @@ var RadioButton_default = RadioButton;
|
|
|
108
108
|
export {
|
|
109
109
|
RadioButton_default
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=
|
|
111
|
+
//# sourceMappingURL=KOZMH6AE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n const sharedStyles = classnames(styles.background, styles[size], {\n [styles.errorBorderColor]: error,\n [styles.borderColor]: !error,\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n });\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n [styles.smBase]: size === \"sm\",\n [styles.mdBase]: size === \"md\",\n },\n )}\n >\n {checked ? (\n <div\n className={classnames(sharedStyles, {\n [styles.mdCheckedBorder]: size === \"md\",\n [styles.smCheckedBorder]: size === \"sm\",\n })}\n />\n ) : (\n <div className={classnames(sharedStyles, styles.neutralBorder)} />\n )}\n <input\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"
|
|
1
|
+
{"version":3,"sources":["../../src/RadioButton/RadioButton.tsx","css-module:./RadioButton.module.css#css-module"],"sourcesContent":["import React, { type ReactElement, useState } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./RadioButton.module.css\";\nimport focusStyles from \"../Focus.module.css\";\nimport Typography from \"../Typography/Typography\";\nimport useFocusVisible from \"../useFocusVisible\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [RadioButton](https://cambly-syntax.vercel.app/?path=/docs/components-radiobutton--docs) is a radio button with accompanying text\n */\nconst RadioButton = ({\n checked = false,\n \"data-testid\": dataTestId,\n dangerouslyForceFocusStyles = false,\n disabled: disabledProp = false,\n error = false,\n id,\n label,\n name,\n onChange,\n size = \"md\",\n value,\n}: {\n /**\n * Whether or not the radio button is checked\n *\n * @defaultValue false\n */\n checked?: boolean;\n /**\n * Test id for the radio button\n */\n \"data-testid\"?: string;\n /**\n * Whether or not the radio button is disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Whether to show error color schema\n *\n * @defaultValue false\n */\n error?: boolean;\n /**\n * Id for the the radio button\n */\n id?: string;\n /**\n * Value to show end user\n */\n label: string;\n /**\n * The name of the grouping the radio buttons are in\n */\n name: string;\n /**\n * The callback to be called when the radio button is clicked\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Size of the components\n *\n * * `sm`: 16px\n * * `md`: 24px\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * Value of the selected radio option\n */\n value: string | number;\n /** forces focus ring styling */\n dangerouslyForceFocusStyles?: boolean;\n}): ReactElement => {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const [isFocused, setIsFocused] = useState(false);\n const { isFocusVisible } = useFocusVisible();\n\n const sharedStyles = classnames(styles.background, styles[size], {\n [styles.errorBorderColor]: error,\n [styles.borderColor]: !error,\n [focusStyles.accessibilityOutlineFocus]:\n (isFocused && isFocusVisible) || dangerouslyForceFocusStyles,\n });\n\n return (\n <label\n className={classnames(\n styles.radioBaseContainer,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.disabled]: disabled,\n [styles.smBase]: size === \"sm\",\n [styles.mdBase]: size === \"md\",\n },\n )}\n >\n {checked ? (\n <div\n className={classnames(sharedStyles, {\n [styles.mdCheckedBorder]: size === \"md\",\n [styles.smCheckedBorder]: size === \"sm\",\n })}\n />\n ) : (\n <div className={classnames(sharedStyles, styles.neutralBorder)} />\n )}\n <input\n data-testid={dataTestId}\n type=\"radio\"\n id={id}\n name={name}\n className={classnames(\n styles.radioStyleOverride,\n styles[`cursor${disabled ? \"Disabled\" : \"Enabled\"}`],\n {\n [styles.smOverride]: size === \"sm\",\n [styles.mdOverride]: size === \"md\",\n },\n )}\n checked={checked}\n onChange={onChange}\n disabled={disabled}\n value={value}\n onFocus={() => {\n setIsFocused(true);\n }}\n onBlur={() => {\n setIsFocused(false);\n }}\n />\n {label && (\n <Typography\n size={size === \"md\" ? 200 : 100}\n color={error ? \"destructive-primary\" : \"gray900\"}\n >\n {label}\n </Typography>\n )}\n </label>\n );\n};\n\nexport default RadioButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/RadioButton/RadioButton.module.css\"; export default {\"radioBaseContainer\":\"_radioBaseContainer_6h2zg_1\",\"disabled\":\"_disabled_6h2zg_9\",\"cursorDisabled\":\"_cursorDisabled_6h2zg_13\",\"cursorEnabled\":\"_cursorEnabled_6h2zg_17\",\"smBase\":\"_smBase_6h2zg_21\",\"mdBase\":\"_mdBase_6h2zg_25\",\"radioStyleOverride\":\"_radioStyleOverride_6h2zg_29\",\"smOverride\":\"_smOverride_6h2zg_34\",\"mdOverride\":\"_mdOverride_6h2zg_39\",\"background\":\"_background_6h2zg_44\",\"sm\":\"_sm_6h2zg_21\",\"md\":\"_md_6h2zg_25\",\"neutralBorder\":\"_neutralBorder_6h2zg_61\",\"smCheckedBorder\":\"_smCheckedBorder_6h2zg_65\",\"mdCheckedBorder\":\"_mdCheckedBorder_6h2zg_69\",\"errorBorderColor\":\"_errorBorderColor_6h2zg_73\",\"borderColor\":\"_borderColor_6h2zg_77\"}"],"mappings":";;;;;;;;;;;;;;AAAA,SAAmC,gBAAgB;AACnD,OAAO,gBAAgB;;;ACD+E,IAAO,6BAAQ,EAAC,sBAAqB,+BAA8B,YAAW,qBAAoB,kBAAiB,4BAA2B,iBAAgB,2BAA0B,UAAS,oBAAmB,UAAS,oBAAmB,sBAAqB,gCAA+B,cAAa,wBAAuB,cAAa,wBAAuB,cAAa,wBAAuB,MAAK,gBAAe,MAAK,gBAAe,iBAAgB,2BAA0B,mBAAkB,6BAA4B,mBAAkB,6BAA4B,oBAAmB,8BAA6B,eAAc,wBAAuB;;;AD4FrvB,SAYI,KAZJ;AAhFJ,IAAM,cAAc,CAAC;AAAA,EACnB,UAAU;AAAA,EACV,eAAe;AAAA,EACf,8BAA8B;AAAA,EAC9B,UAAU,eAAe;AAAA,EACzB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,MAsDoB;AAClB,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,EAAE,eAAe,IAAI,gBAAgB;AAE3C,QAAM,eAAe,WAAW,2BAAO,YAAY,2BAAO,IAAI,GAAG;AAAA,IAC/D,CAAC,2BAAO,gBAAgB,GAAG;AAAA,IAC3B,CAAC,2BAAO,WAAW,GAAG,CAAC;AAAA,IACvB,CAAC,qBAAY,yBAAyB,GACnC,aAAa,kBAAmB;AAAA,EACrC,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,2BAAO;AAAA,QACP,2BAAO,SAAS,WAAW,aAAa,WAAW;AAAA,QACnD;AAAA,UACE,CAAC,2BAAO,QAAQ,GAAG;AAAA,UACnB,CAAC,2BAAO,MAAM,GAAG,SAAS;AAAA,UAC1B,CAAC,2BAAO,MAAM,GAAG,SAAS;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,kBACC;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,WAAW,cAAc;AAAA,cAClC,CAAC,2BAAO,eAAe,GAAG,SAAS;AAAA,cACnC,CAAC,2BAAO,eAAe,GAAG,SAAS;AAAA,YACrC,CAAC;AAAA;AAAA,QACH,IAEA,oBAAC,SAAI,WAAW,WAAW,cAAc,2BAAO,aAAa,GAAG;AAAA,QAElE;AAAA,UAAC;AAAA;AAAA,YACC,eAAa;AAAA,YACb,MAAK;AAAA,YACL;AAAA,YACA;AAAA,YACA,WAAW;AAAA,cACT,2BAAO;AAAA,cACP,2BAAO,SAAS,WAAW,aAAa,WAAW;AAAA,cACnD;AAAA,gBACE,CAAC,2BAAO,UAAU,GAAG,SAAS;AAAA,gBAC9B,CAAC,2BAAO,UAAU,GAAG,SAAS;AAAA,cAChC;AAAA,YACF;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA,SAAS,MAAM;AACb,2BAAa,IAAI;AAAA,YACnB;AAAA,YACA,QAAQ,MAAM;AACZ,2BAAa,KAAK;AAAA,YACpB;AAAA;AAAA,QACF;AAAA,QACC,SACC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM,SAAS,OAAO,MAAM;AAAA,YAC5B,OAAO,QAAQ,wBAAwB;AAAA,YAEtC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,sBAAQ;","names":[]}
|
|
@@ -19,12 +19,12 @@ import {
|
|
|
19
19
|
cambioBackgroundColor,
|
|
20
20
|
classicBackgroundColor
|
|
21
21
|
} from "./YOMN7RCA.js";
|
|
22
|
-
import {
|
|
23
|
-
useTheme
|
|
24
|
-
} from "./HVGUWZ5I.js";
|
|
25
22
|
import {
|
|
26
23
|
Typography_default
|
|
27
|
-
} from "./
|
|
24
|
+
} from "./32FNU7ZY.js";
|
|
25
|
+
import {
|
|
26
|
+
useTheme
|
|
27
|
+
} from "./RXNTJFP4.js";
|
|
28
28
|
|
|
29
29
|
// src/LinkButton/LinkButton.tsx
|
|
30
30
|
import { forwardRef } from "react";
|
|
@@ -121,4 +121,4 @@ var LinkButton_default = LinkButton;
|
|
|
121
121
|
export {
|
|
122
122
|
LinkButton_default
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=
|
|
124
|
+
//# sourceMappingURL=KP3CHNJW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _FINKF5MCcjs = require('./FINKF5MC.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _GYI2PBXYcjs = require('./GYI2PBXY.cjs');
|
|
@@ -15,7 +15,7 @@ var _jsxruntime = require('react/jsx-runtime');
|
|
|
15
15
|
var RichSelectChip_default = _react.forwardRef.call(void 0,
|
|
16
16
|
function RichSelectChip(props, ref) {
|
|
17
17
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _GYI2PBXYcjs.RichSelectItem_default, _I64JGYX7cjs.__spreadProps.call(void 0, _I64JGYX7cjs.__spreadValues.call(void 0, {}, props), { ref, children: ({ isSelected, isFocusVisible, isDisabled }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
18
|
-
|
|
18
|
+
_FINKF5MCcjs.Chip_default,
|
|
19
19
|
{
|
|
20
20
|
text: props.label,
|
|
21
21
|
selected: isSelected,
|
|
@@ -30,4 +30,4 @@ var RichSelectChip_default = _react.forwardRef.call(void 0,
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
exports.RichSelectChip_default = RichSelectChip_default;
|
|
33
|
-
//# sourceMappingURL=
|
|
33
|
+
//# sourceMappingURL=LCEAHKFE.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton_default
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./CRDTRKBH.js";
|
|
4
4
|
import {
|
|
5
5
|
Dialog_default
|
|
6
6
|
} from "./ZEA5JDEB.js";
|
|
@@ -156,4 +156,4 @@ export {
|
|
|
156
156
|
AriaModal,
|
|
157
157
|
ModalDialog_default
|
|
158
158
|
};
|
|
159
|
-
//# sourceMappingURL=
|
|
159
|
+
//# sourceMappingURL=MQUMPR4A.js.map
|
|
@@ -4,13 +4,13 @@ var _GKECCWR3cjs = require('./GKECCWR3.cjs');
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _POAYQEOAcjs = require('./POAYQEOA.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _LTM57QMYcjs = require('./LTM57QMY.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _TIW4V757cjs = require('./TIW4V757.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
var _FZRIE7EXcjs = require('./FZRIE7EX.cjs');
|
|
@@ -62,7 +62,7 @@ function SelectList({
|
|
|
62
62
|
[SelectList_module_default.opacityOverlay]: disabled
|
|
63
63
|
}),
|
|
64
64
|
children: [
|
|
65
|
-
label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: selectId, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
65
|
+
label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: selectId, className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _TIW4V757cjs.Typography_default, { size: 100, color: "gray700", children: label }) }),
|
|
66
66
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: SelectList_module_default.selectWrapper, children: [
|
|
67
67
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
68
68
|
"select",
|
|
@@ -100,7 +100,7 @@ function SelectList({
|
|
|
100
100
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
101
101
|
"path",
|
|
102
102
|
{
|
|
103
|
-
fill: errorText ?
|
|
103
|
+
fill: errorText ? _POAYQEOAcjs.ColorBaseDestructive700 : _POAYQEOAcjs.ColorBaseGray800,
|
|
104
104
|
d: "M15.88 9.29 12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41-.39-.38-1.03-.39-1.42 0z"
|
|
105
105
|
}
|
|
106
106
|
)
|
|
@@ -108,7 +108,7 @@ function SelectList({
|
|
|
108
108
|
) })
|
|
109
109
|
] }),
|
|
110
110
|
(helperText || errorText) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: SelectList_module_default.outerTextContainer, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
111
|
-
|
|
111
|
+
_TIW4V757cjs.Typography_default,
|
|
112
112
|
{
|
|
113
113
|
size: 100,
|
|
114
114
|
color: errorText ? "destructive-primary" : "gray700",
|
|
@@ -124,4 +124,4 @@ SelectList.Option = _GKECCWR3cjs.SelectOption_default;
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
exports.SelectList = SelectList;
|
|
127
|
-
//# sourceMappingURL=
|
|
127
|
+
//# sourceMappingURL=OI44OAX7.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../syntax-design-tokens/dist/js/index.js"],"names":[],"mappings":";AASO,IAAM,0BAA0B;AAWhC,IAAM,mBAAmB","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;AAWhC,IAAM,mBAAmB","sourcesContent":["/**\n * Do not edit directly\n * Generated on Mon, 04 Mar 2024 20:04:23 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 ColorCambioWhite = \"#ffffff\";\nexport const ColorCambioGray100 = \"#faf4eb\";\nexport const ColorCambioGray200 = \"#e4dbd3\";\nexport const ColorCambioGray300 = \"#beb4ab\";\nexport const ColorCambioGray370 = \"#beb4ab\";\nexport const ColorCambioGray700 = \"#888077\";\nexport const ColorCambioGray800 = \"#5c554d\";\nexport const ColorCambioGray870 = \"#5c554d\";\nexport const ColorCambioGray900 = \"#312b23\";\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\";\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Heading_default
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./JBEJC7X2.js";
|
|
4
4
|
import {
|
|
5
5
|
StopScroll
|
|
6
6
|
} from "./AFINOME7.js";
|
|
@@ -107,4 +107,4 @@ Modal.displayName = "Modal";
|
|
|
107
107
|
export {
|
|
108
108
|
Modal
|
|
109
109
|
};
|
|
110
|
-
//# sourceMappingURL=
|
|
110
|
+
//# sourceMappingURL=Q5RYWCW7.js.map
|