@cambly/syntax-core 19.2.0 → 19.2.1
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 -4
- package/dist/Badge/Badge.d.ts +1 -1
- package/dist/Badge/Badge.js +3 -3
- package/dist/Button/Button.cjs +4 -4
- package/dist/Button/Button.js +3 -3
- package/dist/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/Checkbox/Checkbox.cjs +4 -4
- package/dist/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Checkbox/Checkbox.js +3 -3
- package/dist/Chip/Chip.cjs +4 -4
- package/dist/Chip/Chip.js +3 -3
- package/dist/Heading/Heading.cjs +4 -4
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.js +3 -3
- package/dist/LinkButton/LinkButton.cjs +4 -4
- package/dist/LinkButton/LinkButton.js +3 -3
- package/dist/Modal/Modal.cjs +5 -5
- package/dist/Modal/Modal.js +4 -4
- package/dist/RadioButton/RadioButton.cjs +4 -4
- package/dist/RadioButton/RadioButton.d.ts +1 -1
- package/dist/RadioButton/RadioButton.js +3 -3
- package/dist/RichSelect/RichSelectBox.cjs +10 -10
- package/dist/RichSelect/RichSelectBox.d.ts +1 -1
- package/dist/RichSelect/RichSelectBox.js +9 -9
- package/dist/RichSelect/RichSelectChip.cjs +5 -5
- package/dist/RichSelect/RichSelectChip.js +4 -4
- package/dist/RichSelect/RichSelectList.cjs +12 -12
- package/dist/RichSelect/RichSelectList.d.ts +1 -1
- package/dist/RichSelect/RichSelectList.js +11 -11
- package/dist/RichSelect/RichSelectRadioButton.cjs +5 -5
- package/dist/RichSelect/RichSelectRadioButton.d.ts +1 -1
- package/dist/RichSelect/RichSelectRadioButton.js +4 -4
- package/dist/RichSelect/RichSelectSection.cjs +4 -4
- package/dist/RichSelect/RichSelectSection.js +3 -3
- package/dist/SelectList/SelectList.cjs +5 -5
- package/dist/SelectList/SelectList.js +4 -4
- package/dist/TabButton/TabButton.cjs +5 -5
- package/dist/TabButton/TabButton.js +4 -4
- package/dist/TabLink/TabLink.cjs +5 -5
- package/dist/TabLink/TabLink.js +4 -4
- package/dist/Tabs/TabInternal.cjs +4 -4
- package/dist/Tabs/TabInternal.js +3 -3
- package/dist/TapArea/TapArea.d.ts +1 -1
- package/dist/TextArea/TextArea.cjs +4 -4
- package/dist/TextArea/TextArea.css +21 -9
- package/dist/TextArea/TextArea.css.map +1 -1
- package/dist/TextArea/TextArea.js +3 -3
- package/dist/TextField/TextField.cjs +4 -4
- package/dist/TextField/TextField.css +21 -9
- package/dist/TextField/TextField.css.map +1 -1
- package/dist/TextField/TextField.d.ts +7 -1
- package/dist/TextField/TextField.js +3 -3
- package/dist/Tooltip/Tooltip.cjs +4 -4
- package/dist/Tooltip/Tooltip.js +3 -3
- package/dist/Typography/Typography.cjs +3 -3
- package/dist/Typography/Typography.d.ts +3 -3
- package/dist/Typography/Typography.js +2 -2
- package/dist/WordConfetti/WordConfetti.cjs +4 -4
- package/dist/WordConfetti/WordConfetti.js +3 -3
- package/dist/__chunks/{E3A6VFMB.cjs → 23LD2DDB.cjs} +4 -4
- package/dist/__chunks/{YMIQ7WYX.js → 2PSHSFAV.js} +2 -2
- package/dist/__chunks/{OQSEZXJ6.cjs → 2RPK7IB4.cjs} +3 -3
- package/dist/__chunks/{TWWEORFR.js → 44XT4MCS.js} +3 -3
- package/dist/__chunks/{TWWEORFR.js.map → 44XT4MCS.js.map} +1 -1
- package/dist/__chunks/{BFEZ3PUT.cjs → 7VNHS3DA.cjs} +3 -3
- package/dist/__chunks/{HO7QM7X2.js → ACYC4E6D.js} +1 -1
- package/dist/__chunks/{HO7QM7X2.js.map → ACYC4E6D.js.map} +1 -1
- package/dist/__chunks/{5NI7VPKS.cjs → AJC6QV6M.cjs} +17 -15
- package/dist/__chunks/AJC6QV6M.cjs.map +1 -0
- package/dist/__chunks/{OVHMMIVE.cjs → BFZFNLM5.cjs} +3 -3
- package/dist/__chunks/{AHICHJTL.js → BYNWTNUV.js} +2 -2
- package/dist/__chunks/{ML36DCKL.cjs → C5V4NLVS.cjs} +3 -3
- package/dist/__chunks/{OBQBJKAY.cjs → CMUPFOVX.cjs} +3 -3
- package/dist/__chunks/{DWVTJZC6.js → CVRG3CQ3.js} +2 -2
- package/dist/__chunks/{5S7HZU4Z.js → D45HCKL3.js} +2 -2
- package/dist/__chunks/{ZYPHFC2R.js → DTQMK5RP.js} +2 -2
- package/dist/__chunks/{KR6JQ2DS.js → FSSHUBX3.js} +2 -2
- package/dist/__chunks/{5SG2TWV3.cjs → G2RAXJEA.cjs} +19 -19
- package/dist/__chunks/{OMXDPTE4.cjs → GK3YX7CI.cjs} +10 -10
- package/dist/__chunks/{E27BHPP7.js → HG43LCAW.js} +2 -2
- package/dist/__chunks/{OYIKKE7V.js → HILWIYOJ.js} +2 -2
- package/dist/__chunks/{4SO4HHVL.js → IEBCEU7G.js} +7 -7
- package/dist/__chunks/{S4JNYLMA.cjs → JN5UK7KH.cjs} +4 -4
- package/dist/__chunks/{DAK5IGJK.js → KIEWPPIM.js} +2 -2
- package/dist/__chunks/KIEWPPIM.js.map +1 -0
- package/dist/__chunks/{ZHU5A7BH.js → M57BB52X.js} +5 -5
- package/dist/__chunks/{PBHAJ42K.js → MTR3ESEZ.js} +2 -2
- package/dist/__chunks/{4EVPNC6V.js → MZ3D63DQ.js} +17 -15
- package/dist/__chunks/MZ3D63DQ.js.map +1 -0
- package/dist/__chunks/{URBKDUMU.cjs → OOAQZC7E.cjs} +3 -3
- package/dist/__chunks/{UXSGTOGU.cjs → PCEOK3GO.cjs} +3 -3
- package/dist/__chunks/{VWM2UOZ3.cjs → PGDIO77V.cjs} +3 -3
- package/dist/__chunks/{66VTCVJA.cjs → PGMFMTEU.cjs} +3 -3
- package/dist/__chunks/{AUO7CEJI.cjs → QJGERVMN.cjs} +6 -6
- package/dist/__chunks/QJGERVMN.cjs.map +1 -0
- package/dist/__chunks/{56LMASNQ.js → RVF6GMID.js} +2 -2
- package/dist/__chunks/{TG2RCNZT.js → SG3FRX2U.js} +2 -2
- package/dist/__chunks/{GMIOWJBD.js → STMMCDX5.js} +2 -2
- package/dist/__chunks/{KY2TFXG3.js → SVNXSJ7Z.js} +2 -2
- package/dist/__chunks/{BDCZ5GX7.cjs → TA4EX7DL.cjs} +4 -2
- package/dist/__chunks/TA4EX7DL.cjs.map +1 -0
- package/dist/__chunks/{F2ZYHRNY.js → TGUOITLK.js} +2 -2
- package/dist/__chunks/{JOTFTEBX.cjs → TTR4ZAGC.cjs} +3 -3
- package/dist/__chunks/{4MHKTQMD.js → VAVIKPVS.js} +2 -2
- package/dist/__chunks/{OLWRIS56.js → VJNSSF3W.js} +2 -2
- package/dist/__chunks/{CWVVOO2G.cjs → W4YEJQZH.cjs} +8 -8
- package/dist/__chunks/{EHZAOGLQ.cjs → WHTMS6T3.cjs} +3 -3
- package/dist/__chunks/{5NQO6SP3.cjs → WS6CZJQ6.cjs} +3 -3
- package/dist/__chunks/WS6CZJQ6.cjs.map +1 -0
- package/dist/__chunks/{IHGDCH62.cjs → WSKCMPTD.cjs} +3 -3
- package/dist/__chunks/{4AI6GQ5U.cjs → WT62D7UB.cjs} +3 -3
- package/dist/__chunks/{ULC7XW64.cjs → X4H65FEF.cjs} +1 -1
- package/dist/__chunks/{ULC7XW64.cjs.map → X4H65FEF.cjs.map} +1 -1
- package/dist/__chunks/{KZIOUAWM.js → XRYFXCR2.js} +3 -3
- package/dist/__chunks/{VU4LGL2W.js → YSI244J6.js} +4 -2
- package/dist/__chunks/YSI244J6.js.map +1 -0
- package/dist/__chunks/{CCKTB7L5.cjs → Z3S2ZWTJ.cjs} +3 -3
- package/dist/colors/textColors.cjs +2 -2
- package/dist/colors/textColors.d.ts +1 -1
- package/dist/colors/textColors.js +1 -1
- package/dist/index.cjs +25 -25
- package/dist/index.css +21 -9
- package/dist/index.css.map +1 -1
- package/dist/index.js +24 -24
- package/package.json +1 -1
- package/dist/__chunks/4EVPNC6V.js.map +0 -1
- package/dist/__chunks/5NI7VPKS.cjs.map +0 -1
- package/dist/__chunks/5NQO6SP3.cjs.map +0 -1
- package/dist/__chunks/AUO7CEJI.cjs.map +0 -1
- package/dist/__chunks/BDCZ5GX7.cjs.map +0 -1
- package/dist/__chunks/DAK5IGJK.js.map +0 -1
- package/dist/__chunks/VU4LGL2W.js.map +0 -1
- /package/dist/__chunks/{E3A6VFMB.cjs.map → 23LD2DDB.cjs.map} +0 -0
- /package/dist/__chunks/{YMIQ7WYX.js.map → 2PSHSFAV.js.map} +0 -0
- /package/dist/__chunks/{OQSEZXJ6.cjs.map → 2RPK7IB4.cjs.map} +0 -0
- /package/dist/__chunks/{BFEZ3PUT.cjs.map → 7VNHS3DA.cjs.map} +0 -0
- /package/dist/__chunks/{OVHMMIVE.cjs.map → BFZFNLM5.cjs.map} +0 -0
- /package/dist/__chunks/{AHICHJTL.js.map → BYNWTNUV.js.map} +0 -0
- /package/dist/__chunks/{ML36DCKL.cjs.map → C5V4NLVS.cjs.map} +0 -0
- /package/dist/__chunks/{OBQBJKAY.cjs.map → CMUPFOVX.cjs.map} +0 -0
- /package/dist/__chunks/{DWVTJZC6.js.map → CVRG3CQ3.js.map} +0 -0
- /package/dist/__chunks/{5S7HZU4Z.js.map → D45HCKL3.js.map} +0 -0
- /package/dist/__chunks/{ZYPHFC2R.js.map → DTQMK5RP.js.map} +0 -0
- /package/dist/__chunks/{KR6JQ2DS.js.map → FSSHUBX3.js.map} +0 -0
- /package/dist/__chunks/{5SG2TWV3.cjs.map → G2RAXJEA.cjs.map} +0 -0
- /package/dist/__chunks/{OMXDPTE4.cjs.map → GK3YX7CI.cjs.map} +0 -0
- /package/dist/__chunks/{E27BHPP7.js.map → HG43LCAW.js.map} +0 -0
- /package/dist/__chunks/{OYIKKE7V.js.map → HILWIYOJ.js.map} +0 -0
- /package/dist/__chunks/{4SO4HHVL.js.map → IEBCEU7G.js.map} +0 -0
- /package/dist/__chunks/{S4JNYLMA.cjs.map → JN5UK7KH.cjs.map} +0 -0
- /package/dist/__chunks/{ZHU5A7BH.js.map → M57BB52X.js.map} +0 -0
- /package/dist/__chunks/{PBHAJ42K.js.map → MTR3ESEZ.js.map} +0 -0
- /package/dist/__chunks/{URBKDUMU.cjs.map → OOAQZC7E.cjs.map} +0 -0
- /package/dist/__chunks/{UXSGTOGU.cjs.map → PCEOK3GO.cjs.map} +0 -0
- /package/dist/__chunks/{VWM2UOZ3.cjs.map → PGDIO77V.cjs.map} +0 -0
- /package/dist/__chunks/{66VTCVJA.cjs.map → PGMFMTEU.cjs.map} +0 -0
- /package/dist/__chunks/{56LMASNQ.js.map → RVF6GMID.js.map} +0 -0
- /package/dist/__chunks/{TG2RCNZT.js.map → SG3FRX2U.js.map} +0 -0
- /package/dist/__chunks/{GMIOWJBD.js.map → STMMCDX5.js.map} +0 -0
- /package/dist/__chunks/{KY2TFXG3.js.map → SVNXSJ7Z.js.map} +0 -0
- /package/dist/__chunks/{F2ZYHRNY.js.map → TGUOITLK.js.map} +0 -0
- /package/dist/__chunks/{JOTFTEBX.cjs.map → TTR4ZAGC.cjs.map} +0 -0
- /package/dist/__chunks/{4MHKTQMD.js.map → VAVIKPVS.js.map} +0 -0
- /package/dist/__chunks/{OLWRIS56.js.map → VJNSSF3W.js.map} +0 -0
- /package/dist/__chunks/{CWVVOO2G.cjs.map → W4YEJQZH.cjs.map} +0 -0
- /package/dist/__chunks/{EHZAOGLQ.cjs.map → WHTMS6T3.cjs.map} +0 -0
- /package/dist/__chunks/{IHGDCH62.cjs.map → WSKCMPTD.cjs.map} +0 -0
- /package/dist/__chunks/{4AI6GQ5U.cjs.map → WT62D7UB.cjs.map} +0 -0
- /package/dist/__chunks/{KZIOUAWM.js.map → XRYFXCR2.js.map} +0 -0
- /package/dist/__chunks/{CCKTB7L5.cjs.map → Z3S2ZWTJ.cjs.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\n}): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-darkBackground\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n}\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_1of18_1\",\"label\":\"_label_1of18_22\",\"md\":\"_md_1of18_26\",\"height\":\"_height_1of18_30\",\"inputError\":\"_inputError_1of18_34\"}"],"mappings":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AD8F5P,SAcQ,KAdR;AAhFW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GA2DiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,+BAA+B;AAAA,YAEjD,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextField/TextField.tsx","css-module:./TextField.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AAAA,EAGE;AAAA,OACK;AACP,OAAO,gBAAgB;;;ACL2E,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AD8F5P,SAcQ,KAdR;AAhFW,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,eAAe;AAAA,EACf,UAAU,eAAe;AAAA,EACzB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AACF,GA2DiB;AACf,QAAM,aAAa,cAAc;AACjC,QAAM,WAAW,CAAC,cAAc;AAChC,QAAM,UAAU,MAAM;AACtB,QAAM,UAAU,kBAAM;AAEtB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,KAAK;AAAA,MACL,OAAM;AAAA,MACN,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,SAAS,WAAW,MAAM;AAAA,QAC5B;AAAA,MACF;AAAA,MAEC;AAAA,iBACC,oBAAC,WAAM,WAAW,yBAAO,OAAO,SAAS,SACvC,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,WAAW,yBAAO,WAAW,yBAAO,IAAI,yBAAO,QAAQ;AAAA,cAChE,CAAC,yBAAO,UAAU,GAAG;AAAA,YACvB,CAAC;AAAA,YACD,eAAa;AAAA,YACb;AAAA,YACA,IAAI;AAAA,YACJ;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA;AAAA,QACF;AAAA,SACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,OAAO,YAAY,+BAA+B;AAAA,YAEjD,uBAAa;AAAA;AAAA,QAChB,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ","sourcesContent":["import React, {\n type ReactElement,\n type HTMLInputTypeAttribute,\n useId,\n} from \"react\";\nimport classNames from \"classnames\";\nimport styles from \"./TextField.module.css\";\nimport Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport useIsHydrated from \"../useIsHydrated\";\n\n/**\n * [TextField](https://cambly-syntax.vercel.app/?path=/docs/components-textfield--docs) is a component that allows users to enter text.\n */\nexport default function TextField({\n autoComplete,\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength,\n onChange,\n placeholder = \"\",\n type = \"text\",\n value = \"\",\n step,\n}: {\n /**\n * The autocomplete attribute specifies whether or not an input field should have autocomplete enabled.\n *\n * Feel free to add new values from the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) as needed\n */\n autoComplete?: \"current-password\" | \"new-password\" | \"off\" | \"on\" | \"email\";\n /**\n * A data-testid to make querying for the TextField easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextField will be disabled.\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * Text shown below TextField if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextField\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextField visible label\n */\n label: string;\n /**\n * Maximum length of the TextField\n */\n maxLength?: number;\n /**\n * The callback to be called the input changes\n */\n onChange: React.ChangeEventHandler<HTMLInputElement>;\n /**\n * Optional TextField placeholder text\n */\n placeholder?: string;\n /**\n * Input type of the TextField\n *\n * See [full list of input types](https://developer.mozilla.org/en-US/docs/Learn/Forms/HTML5_input_types)\n */\n type?: HTMLInputTypeAttribute;\n /**\n * Value of the TextField\n */\n value: string;\n /**\n * Specified legal number intervals for an input field. Specifically for time or number. If for time, specify in milliseconds. Must be a positive value.\n */\n step?: number;\n}): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n >\n {label && (\n <label className={styles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <input\n autoComplete={autoComplete}\n className={classNames(styles.textfield, styles.md, styles.height, {\n [styles.inputError]: errorText,\n })}\n data-testid={dataTestId}\n disabled={disabled}\n id={inputId}\n maxLength={maxLength}\n type={type}\n onChange={onChange}\n placeholder={placeholder}\n value={value}\n step={step}\n />\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-darkBackground\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n}\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_1of18_1\",\"label\":\"_label_1of18_22\",\"md\":\"_md_1of18_26\",\"height\":\"_height_1of18_30\",\"inputError\":\"_inputError_1of18_34\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Typography/Typography.tsx","css-module:./Typography.module.css#css-module"],"names":["Typography"],"mappings":";;;;;;AAAA,OAAO,gBAAgB;AACvB,SAAS,kBAAqD;;;ACDsC,IAAO,4BAAQ,EAAC,cAAa,uBAAsB,aAAY,uBAAsB,SAAQ,mBAAkB,SAAQ,mBAAkB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,sBAAqB,YAAW,uBAAsB,UAAS,qBAAoB,aAAY,wBAAuB,cAAa,yBAAwB,SAAQ,oBAAmB,OAAM,kBAAiB,WAAU,sBAAqB,UAAS,qBAAoB,YAAW,uBAAsB,QAAO,mBAAkB,aAAY,wBAAuB,UAAS,qBAAoB,aAAY,wBAAuB,aAAY,wBAAuB,QAAO,mBAAkB,QAAO,mBAAkB,QAAO,mBAAkB,QAAO,kBAAiB;;;ADqJn9B;AA7IJ,IAAM,aAAa,WAuHjB,SAASA,YACT;AAAA,EACE,QAAQ;AAAA,EACR,KAAK;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AACX,GACA,KACc;AACd,QAAM,MAAM;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,0BAAO;AAAA,QACP,0BAAO,KAAK;AAAA,QACZ,0BAAO,MAAM;AAAA,QACb,cAAc,UAAU,0BAAO,QAAQ,0BAAO;AAAA,QAC9C,UAAU,KAAK;AAAA,QACf,UAAU,0BAAO;AAAA,QACjB,0BAAO,OAAO,MAAM;AAAA,QACpB,cAAc,eAAe,0BAAO;AAAA,QACpC,aAAa,0BAAO;AAAA,QACpB,aAAa,QAAQ,0BAAO;AAAA,QAC5B,OAAO,OAAO,0BAAO,IAAI,MAAM;AAAA,MACjC;AAAA,MACA,eAAa;AAAA,MACb,OAAO;AAAA,QACL,iBAAiB;AAAA,MACnB;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ","sourcesContent":["import classNames from \"classnames\";\nimport { forwardRef, type ReactElement, type ReactNode } from \"react\";\nimport styles from \"./Typography.module.css\";\nimport textColor from \"../colors/textColors\";\n\n/**\n * [Typography](https://cambly-syntax.vercel.app/?path=/docs/components-typography--docs) is a component that renders text.\n */\nconst Typography = forwardRef<\n HTMLDivElement,\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 \"div\"\n */\n as?: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\";\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 | \"destructive-darkBackground\"\n | \"success\"\n | \"success-darkBackground\"\n | \"white\"\n | \"white-secondary\"\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 id for the element\n */\n id?: string;\n /**\n * Whether the text should flow inline with other elements.\n *\n * @defaultValue false\n */\n inline?: boolean;\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 * Mobile (viewport width <= 480px)::\n * * `0`: 12px\n * * `100`: 13px\n * * `200`: 16px\n * * `300`: 19px\n * * `400`: 25px\n * * `700`: 38px\n * * `800`: 46px\n * * `900`: 55px\n * * `1100`: 83px\n *\n * Desktop (viewport width > 480px):\n * * `0`: 12px\n * * `100`: 13px\n * * `200`: 16px\n * * `300`: 20px\n * * `400`: 25px\n * * `700`: 49px\n * * `800`: 63px\n * * `900`: 76px\n * * `1100`: 119px\n *\n * @defaultValue 200\n */\n size?: 0 | 100 | 200 | 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The tooltip to be displayed when the user hovers the text\n */\n tooltip?: string;\n /**\n * Whether the text should be transformed to uppercase.\n *\n * @defaultValue \"none\"\n */\n transform?: \"none\" | \"uppercase\";\n /**\n * Whether the text has an underline.\n *\n * @defaultValue false\n */\n underline?: boolean;\n /**\n * Indicates the boldness of the text.\n *\n * * `regular`: 400\n * * `medium`: 510\n * * `semiBold`: 590\n * * `bold`: 710\n *\n * @defaultValue \"regular\"\n */\n weight?: \"regular\" | \"medium\" | \"semiBold\" | \"bold\";\n }\n>(function Typography(\n {\n align = \"start\",\n as = \"div\",\n children,\n color = \"gray900\",\n \"data-testid\": dataTestId,\n fontStyle = \"sans-serif\",\n id,\n inline = false,\n lineClamp = undefined,\n size = 200,\n tooltip,\n transform = \"none\",\n underline = false,\n weight = \"regular\",\n },\n ref,\n): ReactElement {\n const Tag = as;\n\n return (\n <Tag\n id={id}\n className={classNames(\n styles.typography,\n styles[align],\n styles[weight],\n fontStyle === \"serif\" ? styles.serif : styles.sansSerif,\n textColor(color),\n inline && styles.inline,\n styles[`size${size}`],\n transform === \"uppercase\" && styles.uppercase,\n underline && styles.underline,\n lineClamp != null && styles.lineClamp,\n as === \"p\" && styles[`p${size}`],\n )}\n data-testid={dataTestId}\n style={{\n WebkitLineClamp: lineClamp,\n }}\n title={tooltip}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n\nexport default Typography;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Typography/Typography.module.css\"; export default {\"typography\":\"_typography_1fz2y_1\",\"sansSerif\":\"_sansSerif_1fz2y_22\",\"serif\":\"_serif_1fz2y_27\",\"size0\":\"_size0_1fz2y_73\",\"size100\":\"_size100_1fz2y_77\",\"size200\":\"_size200_1fz2y_81\",\"size300\":\"_size300_1fz2y_85\",\"size400\":\"_size400_1fz2y_89\",\"size700\":\"_size700_1fz2y_93\",\"size800\":\"_size800_1fz2y_97\",\"size900\":\"_size900_1fz2y_101\",\"size1100\":\"_size1100_1fz2y_105\",\"center\":\"_center_1fz2y_133\",\"forceLeft\":\"_forceLeft_1fz2y_137\",\"forceRight\":\"_forceRight_1fz2y_141\",\"start\":\"_start_1fz2y_145\",\"end\":\"_end_1fz2y_149\",\"regular\":\"_regular_1fz2y_155\",\"medium\":\"_medium_1fz2y_159\",\"semiBold\":\"_semiBold_1fz2y_163\",\"bold\":\"_bold_1fz2y_167\",\"underline\":\"_underline_1fz2y_171\",\"inline\":\"_inline_1fz2y_175\",\"uppercase\":\"_uppercase_1fz2y_179\",\"lineClamp\":\"_lineClamp_1fz2y_183\",\"p100\":\"_p100_1fz2y_192\",\"p200\":\"_p200_1fz2y_196\",\"p300\":\"_p300_1fz2y_200\",\"p400\":\"_p400_1fz2y_204\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/TextArea/TextArea.tsx","css-module:./TextArea.module.css#css-module","css-module:../TextField/TextField.module.css#css-module"],"names":["TextArea"],"mappings":";;;;;;;;;;;;AAEA,SAAmC,OAAO,kBAAkB;;;ACFoC,IAAO,0BAAQ,EAAC,YAAW,qBAAoB,cAAa,uBAAsB,oBAAmB,8BAA6B,kBAAiB,4BAA2B,cAAa,uBAAsB;;;ACA/M,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,SAAQ,mBAAkB,MAAK,gBAAe,UAAS,oBAAmB,cAAa,uBAAsB;;;AFKhQ,OAAO,gBAAgB;AAuFjB,SAeQ,KAfR;AAxBN,IAAM,WAAW;AAAA,EACf,SAASA,UACP;AAAA,IACE,eAAe;AAAA,IACf,UAAU,eAAe;AAAA,IACzB,YAAY;AAAA,IACZ,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR;AAAA,IACA,SAAS;AAAA,EACX,GACA,cACc;AACd,UAAM,aAAa,cAAc;AACjC,UAAM,WAAW,CAAC,cAAc;AAChC,UAAM,UAAU,MAAM;AACtB,UAAM,UAAU,kBAAM;AAEtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAQ;AAAA,QACR,WAAU;AAAA,QACV,KAAK;AAAA,QACL,OAAM;AAAA,QACN,2BAA2B;AAAA,UACzB,SAAS;AAAA,YACP,SAAS,WAAW,MAAM;AAAA,UAC5B;AAAA,QACF;AAAA,QACA,UAAS;AAAA,QAER;AAAA,mBACC,oBAAC,WAAM,WAAW,yBAAgB,OAAO,SAAS,SAChD,8BAAC,eAAI,UAAU,GACb,8BAAC,sBAAW,MAAM,KAAK,OAAM,WAC1B,iBACH,GACF,GACF;AAAA,UAEF,oBAAC,sBAAW,MAAM,KAChB;AAAA,YAAC;AAAA;AAAA,cACC,eAAa;AAAA,cACb,KAAK;AAAA,cACL,WAAW;AAAA,gBACT,yBAAgB;AAAA,gBAChB,wBAAO;AAAA,gBACP,wBAAO,SAAS,QAAQ;AAAA,gBACxB;AAAA,kBACE,CAAC,yBAAgB,UAAU,GAAG;AAAA,gBAChC;AAAA,cACF;AAAA,cACA,IAAI;AAAA,cACJ;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF,GACF;AAAA,WACE,cAAc,cACd,oBAAC,eAAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO,YAAY,+BAA+B;AAAA,cAEjD,uBAAa;AAAA;AAAA,UAChB,GACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ","sourcesContent":["import Box from \"../Box/Box\";\nimport Typography from \"../Typography/Typography\";\nimport React, { type ReactElement, useId, forwardRef } from \"react\";\nimport styles from \"./TextArea.module.css\";\nimport textFieldStyles from \"../TextField/TextField.module.css\";\nimport classNames from \"classnames\";\nimport useIsHydrated from \"../useIsHydrated\";\n\ntype TextAreaProps = {\n /**\n * A data-testid to make querying for the TextArea easier.\n */\n \"data-testid\"?: string;\n /**\n * If true, the TextArea will be disabled.\n */\n disabled?: boolean;\n /**\n * Text shown below TextArea if there is an input error.\n */\n errorText?: string;\n /**\n * Informative helper text shown below TextArea\n */\n helperText?: string;\n /**\n * TextField id, if not provided, a unique id will be generated\n */\n id?: string;\n /**\n * TextArea visible label\n */\n label: string;\n /**\n * Maximum number of characters allowed in the TextArea\n */\n maxLength?: number;\n /**\n * Callback fired when the value is changed.\n */\n onChange: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * Placeholder text to display when TextArea is empty\n */\n placeholder?: string;\n /**\n * Sets which part resizes when the user drags the resize handle.\n * * `none`: TextArea can not be resized\n * * `horizontal`: TextArea can only be resized horizontally\n * * `vertical`: TextArea can only be resized vertically\n * * `both`: TextArea can be resized horizontally and vertically\n *\n * @defaultvalue `none`\n */\n resize?: \"none\" | \"horizontal\" | \"vertical\" | \"both\";\n /**\n * Number of rows to display\n */\n rows?: number;\n /**\n * Value of the TextArea\n */\n value: string;\n};\n\n/**\n * [TextArea](https://cambly-syntax.vercel.app/?path=/docs/components-textarea--docs) allows users to enter multiple lines of text.\n */\nconst TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"data-testid\": dataTestId,\n disabled: disabledProp = false,\n errorText = \"\",\n helperText = \"\",\n id,\n label,\n maxLength = 1024,\n placeholder = \"\",\n rows = 3,\n value = \"\",\n onChange,\n resize = \"none\",\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const inputId = id ?? reactId;\n\n return (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={2}\n width=\"100%\"\n dangerouslySetInlineStyle={{\n __style: {\n opacity: disabled ? 0.5 : 1,\n },\n }}\n position=\"relative\"\n >\n {label && (\n <label className={textFieldStyles.label} htmlFor={inputId}>\n <Box paddingX={1}>\n <Typography size={100} color=\"gray700\">\n {label}\n </Typography>\n </Box>\n </label>\n )}\n <Typography size={100}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n styles.textarea,\n styles[`resize${resize}`],\n {\n [textFieldStyles.inputError]: errorText,\n },\n )}\n id={inputId}\n placeholder={placeholder}\n maxLength={maxLength}\n onChange={onChange}\n rows={rows}\n value={value}\n disabled={disabled}\n />\n </Typography>\n {(helperText || errorText) && (\n <Box paddingX={1}>\n <Typography\n size={100}\n color={errorText ? \"destructive-darkBackground\" : \"gray700\"}\n >\n {errorText || helperText}\n </Typography>\n </Box>\n )}\n </Box>\n );\n },\n);\n\nexport default TextArea;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextArea/TextArea.module.css\"; export default {\"textarea\":\"_textarea_1sb0v_1\",\"resizenone\":\"_resizenone_1sb0v_6\",\"resizehorizontal\":\"_resizehorizontal_1sb0v_10\",\"resizevertical\":\"_resizevertical_1sb0v_14\",\"resizeboth\":\"_resizeboth_1sb0v_18\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_1of18_1\",\"label\":\"_label_1of18_22\",\"md\":\"_md_1of18_26\",\"height\":\"_height_1of18_30\",\"inputError\":\"_inputError_1of18_34\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/colors/textColors.ts"],"names":[],"mappings":";;;;;;AAEe,SAAR,UACL,OAWQ;AACR,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IAErB;AACE,aAAO,sBAAY;AAAA,EACvB;AACF","sourcesContent":["import colorStyles from \"../colors/colors.module.css\";\n\nexport default function textColor(\n color:\n | \"gray900\"\n | \"gray700\"\n | \"primary\"\n | \"destructive-primary\"\n | \"destructive-darkBackground\"\n | \"success\"\n | \"success-darkBackground\"\n | \"white\"\n | \"white-secondary\"\n | \"inherit\",\n): string {\n switch (color) {\n case \"gray700\":\n return colorStyles.cambioGray800Color;\n case \"white\":\n return colorStyles.cambioWhiteColor;\n case \"white-secondary\":\n return colorStyles.cambioWhite70Color;\n case \"inherit\":\n return colorStyles.inheritColor;\n case \"destructive-primary\":\n return colorStyles.cambioDestructive900Color;\n case \"destructive-darkBackground\":\n return colorStyles.cambioDestructive700Color;\n case \"success\":\n return colorStyles.cambioSuccess700Color;\n case \"success-darkBackground\":\n return colorStyles.cambioSuccess100Color;\n // primary / gray900\n default:\n return colorStyles.cambioBlackColor;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Typography/Typography.tsx","css-module:./Typography.module.css#css-module"],"sourcesContent":["import classNames from \"classnames\";\nimport { forwardRef, type ReactElement, type ReactNode } from \"react\";\nimport styles from \"./Typography.module.css\";\nimport textColor from \"../colors/textColors\";\n\n/**\n * [Typography](https://cambly-syntax.vercel.app/?path=/docs/components-typography--docs) is a component that renders text.\n */\nconst Typography = forwardRef<\n HTMLDivElement,\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 \"div\"\n */\n as?: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\";\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 | \"destructive-darkBackground\"\n | \"success\"\n | \"success-darkBackground\"\n | \"white\"\n | \"white-secondary\"\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 id for the element\n */\n id?: string;\n /**\n * Whether the text should flow inline with other elements.\n *\n * @defaultValue false\n */\n inline?: boolean;\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 * Mobile (viewport width <= 480px)::\n * * `0`: 12px\n * * `100`: 13px\n * * `200`: 16px\n * * `300`: 19px\n * * `400`: 25px\n * * `700`: 38px\n * * `800`: 46px\n * * `900`: 55px\n * * `1100`: 83px\n *\n * Desktop (viewport width > 480px):\n * * `0`: 12px\n * * `100`: 13px\n * * `200`: 16px\n * * `300`: 20px\n * * `400`: 25px\n * * `700`: 49px\n * * `800`: 63px\n * * `900`: 76px\n * * `1100`: 119px\n *\n * @defaultValue 200\n */\n size?: 0 | 100 | 200 | 300 | 400 | 700 | 800 | 900 | 1100;\n /**\n * The tooltip to be displayed when the user hovers the text\n */\n tooltip?: string;\n /**\n * Whether the text should be transformed to uppercase.\n *\n * @defaultValue \"none\"\n */\n transform?: \"none\" | \"uppercase\";\n /**\n * Whether the text has an underline.\n *\n * @defaultValue false\n */\n underline?: boolean;\n /**\n * Indicates the boldness of the text.\n *\n * * `regular`: 400\n * * `medium`: 510\n * * `semiBold`: 590\n * * `bold`: 710\n *\n * @defaultValue \"regular\"\n */\n weight?: \"regular\" | \"medium\" | \"semiBold\" | \"bold\";\n }\n>(function Typography(\n {\n align = \"start\",\n as = \"div\",\n children,\n color = \"gray900\",\n \"data-testid\": dataTestId,\n fontStyle = \"sans-serif\",\n id,\n inline = false,\n lineClamp = undefined,\n size = 200,\n tooltip,\n transform = \"none\",\n underline = false,\n weight = \"regular\",\n },\n ref,\n): ReactElement {\n const Tag = as;\n\n return (\n <Tag\n id={id}\n className={classNames(\n styles.typography,\n styles[align],\n styles[weight],\n fontStyle === \"serif\" ? styles.serif : styles.sansSerif,\n textColor(color),\n inline && styles.inline,\n styles[`size${size}`],\n transform === \"uppercase\" && styles.uppercase,\n underline && styles.underline,\n lineClamp != null && styles.lineClamp,\n as === \"p\" && styles[`p${size}`],\n )}\n data-testid={dataTestId}\n style={{\n WebkitLineClamp: lineClamp,\n }}\n title={tooltip}\n ref={ref}\n >\n {children}\n </Tag>\n );\n});\n\nexport default Typography;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Typography/Typography.module.css\"; export default {\"typography\":\"_typography_1fz2y_1\",\"sansSerif\":\"_sansSerif_1fz2y_22\",\"serif\":\"_serif_1fz2y_27\",\"size0\":\"_size0_1fz2y_73\",\"size100\":\"_size100_1fz2y_77\",\"size200\":\"_size200_1fz2y_81\",\"size300\":\"_size300_1fz2y_85\",\"size400\":\"_size400_1fz2y_89\",\"size700\":\"_size700_1fz2y_93\",\"size800\":\"_size800_1fz2y_97\",\"size900\":\"_size900_1fz2y_101\",\"size1100\":\"_size1100_1fz2y_105\",\"center\":\"_center_1fz2y_133\",\"forceLeft\":\"_forceLeft_1fz2y_137\",\"forceRight\":\"_forceRight_1fz2y_141\",\"start\":\"_start_1fz2y_145\",\"end\":\"_end_1fz2y_149\",\"regular\":\"_regular_1fz2y_155\",\"medium\":\"_medium_1fz2y_159\",\"semiBold\":\"_semiBold_1fz2y_163\",\"bold\":\"_bold_1fz2y_167\",\"underline\":\"_underline_1fz2y_171\",\"inline\":\"_inline_1fz2y_175\",\"uppercase\":\"_uppercase_1fz2y_179\",\"lineClamp\":\"_lineClamp_1fz2y_183\",\"p100\":\"_p100_1fz2y_192\",\"p200\":\"_p200_1fz2y_196\",\"p300\":\"_p300_1fz2y_200\",\"p400\":\"_p400_1fz2y_204\"}"],"mappings":";;;;;;AAAA,OAAO,gBAAgB;AACvB,SAAS,kBAAqD;;;ACDsC,IAAO,4BAAQ,EAAC,cAAa,uBAAsB,aAAY,uBAAsB,SAAQ,mBAAkB,SAAQ,mBAAkB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,qBAAoB,WAAU,sBAAqB,YAAW,uBAAsB,UAAS,qBAAoB,aAAY,wBAAuB,cAAa,yBAAwB,SAAQ,oBAAmB,OAAM,kBAAiB,WAAU,sBAAqB,UAAS,qBAAoB,YAAW,uBAAsB,QAAO,mBAAkB,aAAY,wBAAuB,UAAS,qBAAoB,aAAY,wBAAuB,aAAY,wBAAuB,QAAO,mBAAkB,QAAO,mBAAkB,QAAO,mBAAkB,QAAO,kBAAiB;;;ADqJn9B;AA7IJ,IAAM,aAAa,WAuHjB,SAASA,YACT;AAAA,EACE,QAAQ;AAAA,EACR,KAAK;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,OAAO;AAAA,EACP;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AACX,GACA,KACc;AACd,QAAM,MAAM;AAEZ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT,0BAAO;AAAA,QACP,0BAAO,KAAK;AAAA,QACZ,0BAAO,MAAM;AAAA,QACb,cAAc,UAAU,0BAAO,QAAQ,0BAAO;AAAA,QAC9C,UAAU,KAAK;AAAA,QACf,UAAU,0BAAO;AAAA,QACjB,0BAAO,OAAO,MAAM;AAAA,QACpB,cAAc,eAAe,0BAAO;AAAA,QACpC,aAAa,0BAAO;AAAA,QACpB,aAAa,QAAQ,0BAAO;AAAA,QAC5B,OAAO,OAAO,0BAAO,IAAI,MAAM;AAAA,MACjC;AAAA,MACA,eAAa;AAAA,MACb,OAAO;AAAA,QACL,iBAAiB;AAAA,MACnB;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ;","names":["Typography"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/colors/textColors.ts"],"sourcesContent":["import colorStyles from \"../colors/colors.module.css\";\n\nexport default function textColor(\n color:\n | \"gray900\"\n | \"gray700\"\n | \"primary\"\n | \"destructive-primary\"\n | \"destructive-darkBackground\"\n | \"success\"\n | \"success-darkBackground\"\n | \"white\"\n | \"white-secondary\"\n | \"inherit\",\n): string {\n switch (color) {\n case \"gray700\":\n return colorStyles.cambioGray800Color;\n case \"white\":\n return colorStyles.cambioWhiteColor;\n case \"white-secondary\":\n return colorStyles.cambioWhite70Color;\n case \"inherit\":\n return colorStyles.inheritColor;\n case \"destructive-primary\":\n return colorStyles.cambioDestructive900Color;\n case \"destructive-darkBackground\":\n return colorStyles.cambioDestructive700Color;\n case \"success\":\n return colorStyles.cambioSuccess700Color;\n case \"success-darkBackground\":\n return colorStyles.cambioSuccess100Color;\n // primary / gray900\n default:\n return colorStyles.cambioBlackColor;\n }\n}\n"],"mappings":";;;;;;AAEe,SAAR,UACL,OAWQ;AACR,UAAQ,OAAO;AAAA,IACb,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IACrB,KAAK;AACH,aAAO,sBAAY;AAAA,IAErB;AACE,aAAO,sBAAY;AAAA,EACvB;AACF;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|