@cambly/syntax-core 10.30.0 → 10.32.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.cjs +6 -8
- package/dist/Avatar/Avatar.css +175 -189
- package/dist/Avatar/Avatar.css.map +1 -1
- package/dist/Avatar/Avatar.d.ts +2 -9
- package/dist/Avatar/Avatar.js +5 -7
- package/dist/AvatarGroup/AvatarGroup.cjs +5 -7
- package/dist/AvatarGroup/AvatarGroup.css +167 -158
- package/dist/AvatarGroup/AvatarGroup.css.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts +2 -9
- package/dist/AvatarGroup/AvatarGroup.js +4 -6
- package/dist/Badge/Badge.cjs +6 -8
- package/dist/Badge/Badge.css +212 -239
- package/dist/Badge/Badge.css.map +1 -1
- package/dist/Badge/Badge.js +5 -7
- package/dist/Box/Box.cjs +6 -6
- package/dist/Box/Box.css +167 -158
- package/dist/Box/Box.css.map +1 -1
- package/dist/Box/Box.d.ts +2 -10
- package/dist/Box/Box.js +7 -7
- package/dist/Button/Button.cjs +11 -14
- package/dist/Button/Button.css +231 -283
- package/dist/Button/Button.css.map +1 -1
- package/dist/Button/Button.d.ts +1 -16
- package/dist/Button/Button.js +10 -13
- package/dist/Button/constants/iconSize.cjs +2 -3
- package/dist/Button/constants/iconSize.css +19 -44
- package/dist/Button/constants/iconSize.css.map +1 -1
- package/dist/Button/constants/iconSize.js +1 -2
- package/dist/ButtonGroup/ButtonGroup.cjs +2 -3
- package/dist/ButtonGroup/ButtonGroup.css +6 -15
- package/dist/ButtonGroup/ButtonGroup.css.map +1 -1
- package/dist/ButtonGroup/ButtonGroup.d.ts +0 -6
- package/dist/ButtonGroup/ButtonGroup.js +1 -2
- package/dist/Card/Card.cjs +5 -7
- package/dist/Card/Card.css +167 -158
- package/dist/Card/Card.css.map +1 -1
- package/dist/Card/Card.d.ts +1 -1
- package/dist/Card/Card.js +4 -6
- package/dist/Checkbox/Checkbox.cjs +4 -5
- package/dist/Checkbox/Checkbox.css +222 -254
- package/dist/Checkbox/Checkbox.css.map +1 -1
- package/dist/Checkbox/Checkbox.js +3 -4
- package/dist/Chip/Chip.cjs +6 -8
- package/dist/Chip/Chip.css +225 -270
- package/dist/Chip/Chip.css.map +1 -1
- package/dist/Chip/Chip.d.ts +1 -4
- package/dist/Chip/Chip.js +5 -7
- package/dist/Dialog/Dialog.cjs +4 -6
- package/dist/Dialog/Dialog.css +167 -158
- package/dist/Dialog/Dialog.css.map +1 -1
- package/dist/Dialog/Dialog.js +3 -5
- package/dist/Dialog/ModalDialog.cjs +12 -16
- package/dist/Dialog/ModalDialog.css +178 -309
- package/dist/Dialog/ModalDialog.css.map +1 -1
- package/dist/Dialog/ModalDialog.js +10 -14
- package/dist/Divider/Divider.cjs +3 -4
- package/dist/Divider/Divider.css +164 -140
- package/dist/Divider/Divider.css.map +1 -1
- package/dist/Divider/Divider.js +2 -3
- package/dist/Heading/Heading.cjs +4 -5
- package/dist/Heading/Heading.css +209 -221
- package/dist/Heading/Heading.css.map +1 -1
- package/dist/Heading/Heading.d.ts +3 -9
- package/dist/Heading/Heading.js +3 -4
- package/dist/IconButton/IconButton.cjs +6 -9
- package/dist/IconButton/IconButton.css +175 -291
- package/dist/IconButton/IconButton.css.map +1 -1
- package/dist/IconButton/IconButton.d.ts +3 -18
- package/dist/IconButton/IconButton.js +5 -8
- package/dist/LinkButton/LinkButton.cjs +9 -12
- package/dist/LinkButton/LinkButton.css +228 -265
- package/dist/LinkButton/LinkButton.css.map +1 -1
- package/dist/LinkButton/LinkButton.d.ts +2 -20
- package/dist/LinkButton/LinkButton.js +8 -11
- package/dist/Modal/Layer.cjs +5 -7
- package/dist/Modal/Layer.css +167 -158
- package/dist/Modal/Layer.css.map +1 -1
- package/dist/Modal/Layer.js +4 -6
- package/dist/Modal/Modal.cjs +13 -17
- package/dist/Modal/Modal.css +227 -411
- package/dist/Modal/Modal.css.map +1 -1
- package/dist/Modal/Modal.js +12 -16
- package/dist/Popover/Popover.cjs +13 -17
- package/dist/Popover/Popover.css +178 -309
- package/dist/Popover/Popover.css.map +1 -1
- package/dist/Popover/Popover.js +11 -15
- package/dist/RadioButton/RadioButton.cjs +6 -8
- package/dist/RadioButton/RadioButton.css +212 -239
- package/dist/RadioButton/RadioButton.css.map +1 -1
- package/dist/RadioButton/RadioButton.js +5 -7
- package/dist/RichSelect/RichSelectBox.cjs +20 -23
- package/dist/RichSelect/RichSelectBox.css +250 -329
- package/dist/RichSelect/RichSelectBox.css.map +1 -1
- package/dist/RichSelect/RichSelectBox.js +18 -21
- package/dist/RichSelect/RichSelectChip.cjs +7 -9
- package/dist/RichSelect/RichSelectChip.css +225 -270
- package/dist/RichSelect/RichSelectChip.css.map +1 -1
- package/dist/RichSelect/RichSelectChip.js +6 -8
- package/dist/RichSelect/RichSelectList.cjs +27 -31
- package/dist/RichSelect/RichSelectList.css +338 -468
- package/dist/RichSelect/RichSelectList.css.map +1 -1
- package/dist/RichSelect/RichSelectList.js +25 -29
- package/dist/RichSelect/RichSelectRadioButton.cjs +7 -9
- package/dist/RichSelect/RichSelectRadioButton.css +212 -239
- package/dist/RichSelect/RichSelectRadioButton.css.map +1 -1
- package/dist/RichSelect/RichSelectRadioButton.js +6 -8
- package/dist/RichSelect/RichSelectSection.cjs +4 -5
- package/dist/RichSelect/RichSelectSection.css +209 -221
- package/dist/RichSelect/RichSelectSection.css.map +1 -1
- package/dist/RichSelect/RichSelectSection.js +3 -4
- package/dist/SelectList/SelectList.cjs +7 -9
- package/dist/SelectList/SelectList.css +223 -274
- package/dist/SelectList/SelectList.css.map +1 -1
- package/dist/SelectList/SelectList.d.ts +1 -0
- package/dist/SelectList/SelectList.js +6 -8
- package/dist/TapArea/TapArea.cjs +7 -3
- package/dist/TapArea/TapArea.css +2054 -15
- package/dist/TapArea/TapArea.css.map +1 -1
- package/dist/TapArea/TapArea.js +6 -2
- package/dist/TextArea/TextArea.cjs +6 -8
- package/dist/TextArea/TextArea.css +223 -305
- package/dist/TextArea/TextArea.css.map +1 -1
- package/dist/TextArea/TextArea.js +5 -7
- package/dist/TextField/TextField.cjs +6 -8
- package/dist/TextField/TextField.css +222 -289
- package/dist/TextField/TextField.css.map +1 -1
- package/dist/TextField/TextField.d.ts +0 -6
- package/dist/TextField/TextField.js +5 -7
- package/dist/ThemeProvider/ThemeProvider.cjs +2 -4
- package/dist/ThemeProvider/ThemeProvider.d.ts +3 -9
- package/dist/ThemeProvider/ThemeProvider.js +3 -5
- package/dist/Tooltip/Tooltip.cjs +5 -7
- package/dist/Tooltip/Tooltip.css +212 -239
- package/dist/Tooltip/Tooltip.css.map +1 -1
- package/dist/Tooltip/Tooltip.js +4 -6
- package/dist/Typography/Typography.cjs +3 -4
- package/dist/Typography/Typography.css +209 -221
- package/dist/Typography/Typography.css.map +1 -1
- package/dist/Typography/Typography.d.ts +3 -21
- package/dist/Typography/Typography.js +2 -3
- package/dist/__chunks/2MQDGNBM.cjs +112 -0
- package/dist/__chunks/2MQDGNBM.cjs.map +1 -0
- package/dist/__chunks/{GJBW4BG7.js → 2XOJNXTC.js} +2 -2
- package/dist/__chunks/{BVYHALMT.cjs → 3RDV2SM7.cjs} +8 -12
- package/dist/__chunks/3RDV2SM7.cjs.map +1 -0
- package/dist/__chunks/{FPHP3T7U.js → 423C767D.js} +8 -25
- package/dist/__chunks/423C767D.js.map +1 -0
- package/dist/__chunks/{Q4HTXMNF.js → 4325RESS.js} +3 -7
- package/dist/__chunks/4325RESS.js.map +1 -0
- package/dist/__chunks/45TMKSJQ.cjs +9 -0
- package/dist/__chunks/45TMKSJQ.cjs.map +1 -0
- package/dist/__chunks/{CS66HKUB.cjs → 4E7A4J3K.cjs} +28 -42
- package/dist/__chunks/4E7A4J3K.cjs.map +1 -0
- package/dist/__chunks/{GEGGHBSM.cjs → 4HCWQMZO.cjs} +18 -18
- package/dist/__chunks/{AKKJTW7U.js → 53IGOH2V.js} +9 -19
- package/dist/__chunks/53IGOH2V.js.map +1 -0
- package/dist/__chunks/{UKLQ64N7.cjs → 5PL5GKUK.cjs} +6 -3
- package/dist/__chunks/5PL5GKUK.cjs.map +1 -0
- package/dist/__chunks/5VVFGPW6.cjs +72 -0
- package/dist/__chunks/5VVFGPW6.cjs.map +1 -0
- package/dist/__chunks/6CZHUML6.js +37 -0
- package/dist/__chunks/6CZHUML6.js.map +1 -0
- package/dist/__chunks/{JXOKXBDZ.cjs → ASFZDRJJ.cjs} +9 -21
- package/dist/__chunks/ASFZDRJJ.cjs.map +1 -0
- package/dist/__chunks/{ICDRMDXD.js → B5BNKWTJ.js} +1 -1
- package/dist/__chunks/{ICDRMDXD.js.map → B5BNKWTJ.js.map} +1 -1
- package/dist/__chunks/{A323TCSA.cjs → BEKUOSKU.cjs} +5 -11
- package/dist/__chunks/BEKUOSKU.cjs.map +1 -0
- package/dist/__chunks/{W5MIJIZA.cjs → BNBE2XVM.cjs} +5 -14
- package/dist/__chunks/BNBE2XVM.cjs.map +1 -0
- package/dist/__chunks/BOX3VY3Q.js +30 -0
- package/dist/__chunks/BOX3VY3Q.js.map +1 -0
- package/dist/__chunks/BYVURUTU.cjs +37 -0
- package/dist/__chunks/BYVURUTU.cjs.map +1 -0
- package/dist/__chunks/C5XPZTFO.cjs +30 -0
- package/dist/__chunks/C5XPZTFO.cjs.map +1 -0
- package/dist/__chunks/{4GTNQPPD.js → CAEGAJQ2.js} +9 -21
- package/dist/__chunks/CAEGAJQ2.js.map +1 -0
- package/dist/__chunks/{3OWAOKRW.js → CPQLZKCY.js} +17 -27
- package/dist/__chunks/CPQLZKCY.js.map +1 -0
- package/dist/__chunks/{BQOD4WU7.js → CUJFDOPJ.js} +29 -43
- package/dist/__chunks/CUJFDOPJ.js.map +1 -0
- package/dist/__chunks/{IB3FQANU.js → DEXL5BXD.js} +10 -36
- package/dist/__chunks/DEXL5BXD.js.map +1 -0
- package/dist/__chunks/{HYRATHVK.cjs → DMA6PPUZ.cjs} +6 -7
- package/dist/__chunks/DMA6PPUZ.cjs.map +1 -0
- package/dist/__chunks/{7SCBZPIF.cjs → DQRU6NZI.cjs} +1 -1
- package/dist/__chunks/{7SCBZPIF.cjs.map → DQRU6NZI.cjs.map} +1 -1
- package/dist/__chunks/{6P6ARVEA.cjs → E32CAKEB.cjs} +3 -3
- package/dist/__chunks/EB7WKQ35.js +9 -0
- package/dist/__chunks/EB7WKQ35.js.map +1 -0
- package/dist/__chunks/{6OCOGTM5.cjs → EMVONWGI.cjs} +20 -33
- package/dist/__chunks/EMVONWGI.cjs.map +1 -0
- package/dist/__chunks/{3FMGCZP2.cjs → EOHYUABJ.cjs} +12 -22
- package/dist/__chunks/EOHYUABJ.cjs.map +1 -0
- package/dist/__chunks/ESGHXEEA.cjs +91 -0
- package/dist/__chunks/ESGHXEEA.cjs.map +1 -0
- package/dist/__chunks/{MONMI3LS.js → FRR2K77P.js} +2 -2
- package/dist/__chunks/{HCHFPFNX.js → GCE2CI4A.js} +5 -11
- package/dist/__chunks/GCE2CI4A.js.map +1 -0
- package/dist/__chunks/HAI43LQ2.cjs +117 -0
- package/dist/__chunks/HAI43LQ2.cjs.map +1 -0
- package/dist/__chunks/{EKHHYK7U.cjs → HNXMVFBH.cjs} +15 -25
- package/dist/__chunks/HNXMVFBH.cjs.map +1 -0
- package/dist/__chunks/JFI6TDAC.js +72 -0
- package/dist/__chunks/JFI6TDAC.js.map +1 -0
- package/dist/__chunks/{FTKHKS6W.js → JJMHCJ37.js} +3 -3
- package/dist/__chunks/JWJK72BH.js +17 -0
- package/dist/__chunks/JWJK72BH.js.map +1 -0
- package/dist/__chunks/{TDR3JRXZ.js → KCGPFLPK.js} +16 -29
- package/dist/__chunks/KCGPFLPK.js.map +1 -0
- package/dist/__chunks/{WOIJRASP.cjs → KNFEGYQM.cjs} +3 -3
- package/dist/__chunks/KZR322YX.cjs +97 -0
- package/dist/__chunks/KZR322YX.cjs.map +1 -0
- package/dist/__chunks/KZT53ITQ.cjs +9 -0
- package/dist/__chunks/KZT53ITQ.cjs.map +1 -0
- package/dist/__chunks/LBA34HLF.cjs +47 -0
- package/dist/__chunks/LBA34HLF.cjs.map +1 -0
- package/dist/__chunks/{3CNALXRL.js → LQ6UZ6GG.js} +8 -8
- package/dist/__chunks/{3HBVE6VG.js → LV2KIGSE.js} +8 -18
- package/dist/__chunks/LV2KIGSE.js.map +1 -0
- package/dist/__chunks/M3PAAPMI.cjs +56 -0
- package/dist/__chunks/M3PAAPMI.cjs.map +1 -0
- package/dist/__chunks/{ZUQC37VB.cjs → MI5OUDV4.cjs} +3 -3
- package/dist/__chunks/{5MKCDCHQ.cjs → MLUQYLT2.cjs} +20 -28
- package/dist/__chunks/MLUQYLT2.cjs.map +1 -0
- package/dist/__chunks/{KTTIFVGY.js → MOLOILVI.js} +2 -2
- package/dist/__chunks/{AYTJYJHI.js → N6YLXBLU.js} +4 -9
- package/dist/__chunks/N6YLXBLU.js.map +1 -0
- package/dist/__chunks/{VLK5CARI.cjs → N7WA46RL.cjs} +7 -7
- package/dist/__chunks/{Y2HREK3T.js → NFIK6RYN.js} +4 -4
- package/dist/__chunks/NPOX7QNB.js +91 -0
- package/dist/__chunks/NPOX7QNB.js.map +1 -0
- package/dist/__chunks/PIB5AHP5.js +128 -0
- package/dist/__chunks/PIB5AHP5.js.map +1 -0
- package/dist/__chunks/PUTZ53EC.js +9 -0
- package/dist/__chunks/PUTZ53EC.js.map +1 -0
- package/dist/__chunks/QT6IRCGW.cjs +9 -0
- package/dist/__chunks/QT6IRCGW.cjs.map +1 -0
- package/dist/__chunks/{5MJ6NOUC.js → RCEIKIN5.js} +6 -3
- package/dist/__chunks/RCEIKIN5.js.map +1 -0
- package/dist/__chunks/{7BAMJSUF.js → RGOIFORP.js} +4 -10
- package/dist/__chunks/RGOIFORP.js.map +1 -0
- package/dist/__chunks/{GANR5JVV.cjs → RJ3ZYLJS.cjs} +7 -13
- package/dist/__chunks/RJ3ZYLJS.cjs.map +1 -0
- package/dist/__chunks/S6TNP7G5.js +9 -0
- package/dist/__chunks/S6TNP7G5.js.map +1 -0
- package/dist/__chunks/{FLFJRP4T.js → SJRKFU77.js} +23 -37
- package/dist/__chunks/SJRKFU77.js.map +1 -0
- package/dist/__chunks/{SFOAZYZG.cjs → SND6HHAL.cjs} +3 -3
- package/dist/__chunks/{2HNPYS3S.cjs → T75YP5VR.cjs} +32 -42
- package/dist/__chunks/T75YP5VR.cjs.map +1 -0
- package/dist/__chunks/{I6CGA2ER.js → TEKYRS2R.js} +6 -10
- package/dist/__chunks/TEKYRS2R.js.map +1 -0
- package/dist/__chunks/{63GEZVJ4.js → TK2EQ6QG.js} +6 -7
- package/dist/__chunks/TK2EQ6QG.js.map +1 -0
- package/dist/__chunks/{PKBQW5T6.cjs → TNVQI6LF.cjs} +4 -8
- package/dist/__chunks/TNVQI6LF.cjs.map +1 -0
- package/dist/__chunks/{X5KCRFFF.js → TSR66LRL.js} +11 -21
- package/dist/__chunks/TSR66LRL.js.map +1 -0
- package/dist/__chunks/UAXX2ZEQ.cjs +17 -0
- package/dist/__chunks/UAXX2ZEQ.cjs.map +1 -0
- package/dist/__chunks/VKL4RHBK.js +97 -0
- package/dist/__chunks/VKL4RHBK.js.map +1 -0
- package/dist/__chunks/{CPIFXRXD.cjs → VM56IP2S.cjs} +19 -29
- package/dist/__chunks/VM56IP2S.cjs.map +1 -0
- package/dist/__chunks/W74F2R45.cjs +128 -0
- package/dist/__chunks/W74F2R45.cjs.map +1 -0
- package/dist/__chunks/{N5B6KNJR.js → WBMHYMAT.js} +18 -26
- package/dist/__chunks/WBMHYMAT.js.map +1 -0
- package/dist/__chunks/XCSW34UM.cjs +94 -0
- package/dist/__chunks/XCSW34UM.cjs.map +1 -0
- package/dist/__chunks/XL37HTXI.js +117 -0
- package/dist/__chunks/XL37HTXI.js.map +1 -0
- package/dist/__chunks/YAM7DAOZ.js +94 -0
- package/dist/__chunks/YAM7DAOZ.js.map +1 -0
- package/dist/__chunks/{UF7SXHS4.js → YBOF6XGJ.js} +4 -13
- package/dist/__chunks/YBOF6XGJ.js.map +1 -0
- package/dist/__chunks/{K27Z66LH.js → YF53K6PE.js} +2 -2
- package/dist/__chunks/{LECUYS4O.cjs → YJI76DU2.cjs} +5 -5
- package/dist/__chunks/{THYSYYWS.cjs → ZQRUOZFX.cjs} +5 -10
- package/dist/__chunks/ZQRUOZFX.cjs.map +1 -0
- package/dist/colors/backgroundColor.cjs +3 -5
- package/dist/colors/backgroundColor.css +164 -140
- package/dist/colors/backgroundColor.css.map +1 -1
- package/dist/colors/backgroundColor.d.ts +3 -4
- package/dist/colors/backgroundColor.js +4 -6
- package/dist/colors/border.cjs +11 -0
- package/dist/colors/border.css +446 -0
- package/dist/colors/border.css.map +1 -0
- package/dist/colors/border.d.ts +5 -0
- package/dist/colors/border.js +11 -0
- package/dist/colors/foregroundColor.cjs +3 -5
- package/dist/colors/foregroundColor.css +164 -140
- package/dist/colors/foregroundColor.css.map +1 -1
- package/dist/colors/foregroundColor.d.ts +3 -4
- package/dist/colors/foregroundColor.js +4 -6
- package/dist/constants.cjs +0 -2
- package/dist/constants.cjs.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +0 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.cjs +41 -46
- package/dist/index.css +308 -553
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +44 -49
- package/package.json +1 -1
- package/dist/Button/constants/classicSize.cjs +0 -11
- package/dist/Button/constants/classicSize.cjs.map +0 -1
- package/dist/Button/constants/classicSize.d.ts +0 -3
- package/dist/Button/constants/classicSize.js +0 -11
- package/dist/Button/constants/classicSize.js.map +0 -1
- package/dist/Button/constants/color.cjs +0 -11
- package/dist/Button/constants/color.d.ts +0 -4
- package/dist/Button/constants/color.js +0 -11
- package/dist/__chunks/2HNPYS3S.cjs.map +0 -1
- package/dist/__chunks/2RWNBVOK.cjs +0 -114
- package/dist/__chunks/2RWNBVOK.cjs.map +0 -1
- package/dist/__chunks/3FMGCZP2.cjs.map +0 -1
- package/dist/__chunks/3HBVE6VG.js.map +0 -1
- package/dist/__chunks/3OWAOKRW.js.map +0 -1
- package/dist/__chunks/4GTNQPPD.js.map +0 -1
- package/dist/__chunks/5MJ6NOUC.js.map +0 -1
- package/dist/__chunks/5MKCDCHQ.cjs.map +0 -1
- package/dist/__chunks/5OLT2HH5.js +0 -43
- package/dist/__chunks/5OLT2HH5.js.map +0 -1
- package/dist/__chunks/5PWYNWVE.js +0 -115
- package/dist/__chunks/5PWYNWVE.js.map +0 -1
- package/dist/__chunks/63GEZVJ4.js.map +0 -1
- package/dist/__chunks/6OCOGTM5.cjs.map +0 -1
- package/dist/__chunks/7BAMJSUF.js.map +0 -1
- package/dist/__chunks/A323TCSA.cjs.map +0 -1
- package/dist/__chunks/AKKJTW7U.js.map +0 -1
- package/dist/__chunks/AYTJYJHI.js.map +0 -1
- package/dist/__chunks/B7PDT66P.js +0 -9
- package/dist/__chunks/B7PDT66P.js.map +0 -1
- package/dist/__chunks/BQOD4WU7.js.map +0 -1
- package/dist/__chunks/BVYHALMT.cjs.map +0 -1
- package/dist/__chunks/BXHT3UUW.js +0 -9
- package/dist/__chunks/BXHT3UUW.js.map +0 -1
- package/dist/__chunks/CPIFXRXD.cjs.map +0 -1
- package/dist/__chunks/CS66HKUB.cjs.map +0 -1
- package/dist/__chunks/DTKTTGU5.cjs +0 -9
- package/dist/__chunks/DTKTTGU5.cjs.map +0 -1
- package/dist/__chunks/EKHHYK7U.cjs.map +0 -1
- package/dist/__chunks/FH2W3CI2.cjs +0 -126
- package/dist/__chunks/FH2W3CI2.cjs.map +0 -1
- package/dist/__chunks/FLFJRP4T.js.map +0 -1
- package/dist/__chunks/FPHP3T7U.js.map +0 -1
- package/dist/__chunks/GANR5JVV.cjs.map +0 -1
- package/dist/__chunks/GFKDPMFK.js +0 -25
- package/dist/__chunks/GFKDPMFK.js.map +0 -1
- package/dist/__chunks/GWJGZYZO.js +0 -150
- package/dist/__chunks/GWJGZYZO.js.map +0 -1
- package/dist/__chunks/HCHFPFNX.js.map +0 -1
- package/dist/__chunks/HWQUS53M.cjs +0 -25
- package/dist/__chunks/HWQUS53M.cjs.map +0 -1
- package/dist/__chunks/HYRATHVK.cjs.map +0 -1
- package/dist/__chunks/I6CGA2ER.js.map +0 -1
- package/dist/__chunks/IB3FQANU.js.map +0 -1
- package/dist/__chunks/J43HGNHN.cjs +0 -82
- package/dist/__chunks/J43HGNHN.cjs.map +0 -1
- package/dist/__chunks/JAC64LLA.js +0 -17
- package/dist/__chunks/JAC64LLA.js.map +0 -1
- package/dist/__chunks/JNYNLJGY.js +0 -137
- package/dist/__chunks/JNYNLJGY.js.map +0 -1
- package/dist/__chunks/JXOKXBDZ.cjs.map +0 -1
- package/dist/__chunks/KYIRM6PZ.cjs +0 -137
- package/dist/__chunks/KYIRM6PZ.cjs.map +0 -1
- package/dist/__chunks/N5B6KNJR.js.map +0 -1
- package/dist/__chunks/NCUQOLOV.cjs +0 -115
- package/dist/__chunks/NCUQOLOV.cjs.map +0 -1
- package/dist/__chunks/OAZD7W2W.cjs +0 -96
- package/dist/__chunks/OAZD7W2W.cjs.map +0 -1
- package/dist/__chunks/OMFFRI3K.js +0 -9
- package/dist/__chunks/OMFFRI3K.js.map +0 -1
- package/dist/__chunks/OU5C2MBA.js +0 -114
- package/dist/__chunks/OU5C2MBA.js.map +0 -1
- package/dist/__chunks/PKBQW5T6.cjs.map +0 -1
- package/dist/__chunks/Q4HTXMNF.js.map +0 -1
- package/dist/__chunks/QAS3KERZ.cjs +0 -9
- package/dist/__chunks/QAS3KERZ.cjs.map +0 -1
- package/dist/__chunks/RVFY33X2.cjs +0 -43
- package/dist/__chunks/RVFY33X2.cjs.map +0 -1
- package/dist/__chunks/S5QHTHST.cjs +0 -9
- package/dist/__chunks/S5QHTHST.cjs.map +0 -1
- package/dist/__chunks/SHHN3SRR.js +0 -9
- package/dist/__chunks/SHHN3SRR.js.map +0 -1
- package/dist/__chunks/TDR3JRXZ.js.map +0 -1
- package/dist/__chunks/THYSYYWS.cjs.map +0 -1
- package/dist/__chunks/UF7SXHS4.js.map +0 -1
- package/dist/__chunks/UKLQ64N7.cjs.map +0 -1
- package/dist/__chunks/UQY2ELTZ.cjs +0 -64
- package/dist/__chunks/UQY2ELTZ.cjs.map +0 -1
- package/dist/__chunks/UVROGDYB.js +0 -128
- package/dist/__chunks/UVROGDYB.js.map +0 -1
- package/dist/__chunks/VR4ZFZ4Z.js +0 -96
- package/dist/__chunks/VR4ZFZ4Z.js.map +0 -1
- package/dist/__chunks/W2JRKN5E.cjs +0 -9
- package/dist/__chunks/W2JRKN5E.cjs.map +0 -1
- package/dist/__chunks/W5MIJIZA.cjs.map +0 -1
- package/dist/__chunks/X5KCRFFF.js.map +0 -1
- package/dist/__chunks/XU3CLITI.cjs +0 -128
- package/dist/__chunks/XU3CLITI.cjs.map +0 -1
- package/dist/__chunks/ZCSR6NFB.cjs +0 -17
- package/dist/__chunks/ZCSR6NFB.cjs.map +0 -1
- package/dist/__chunks/ZRO3RCYX.cjs +0 -150
- package/dist/__chunks/ZRO3RCYX.cjs.map +0 -1
- package/dist/colors/foregroundTypographyColor.cjs +0 -24
- package/dist/colors/foregroundTypographyColor.cjs.map +0 -1
- package/dist/colors/foregroundTypographyColor.d.ts +0 -5
- package/dist/colors/foregroundTypographyColor.js +0 -24
- package/dist/colors/foregroundTypographyColor.js.map +0 -1
- /package/dist/__chunks/{GJBW4BG7.js.map → 2XOJNXTC.js.map} +0 -0
- /package/dist/__chunks/{GEGGHBSM.cjs.map → 4HCWQMZO.cjs.map} +0 -0
- /package/dist/__chunks/{6P6ARVEA.cjs.map → E32CAKEB.cjs.map} +0 -0
- /package/dist/__chunks/{MONMI3LS.js.map → FRR2K77P.js.map} +0 -0
- /package/dist/__chunks/{FTKHKS6W.js.map → JJMHCJ37.js.map} +0 -0
- /package/dist/__chunks/{WOIJRASP.cjs.map → KNFEGYQM.cjs.map} +0 -0
- /package/dist/__chunks/{3CNALXRL.js.map → LQ6UZ6GG.js.map} +0 -0
- /package/dist/__chunks/{ZUQC37VB.cjs.map → MI5OUDV4.cjs.map} +0 -0
- /package/dist/__chunks/{KTTIFVGY.js.map → MOLOILVI.js.map} +0 -0
- /package/dist/__chunks/{VLK5CARI.cjs.map → N7WA46RL.cjs.map} +0 -0
- /package/dist/__chunks/{Y2HREK3T.js.map → NFIK6RYN.js.map} +0 -0
- /package/dist/__chunks/{SFOAZYZG.cjs.map → SND6HHAL.cjs.map} +0 -0
- /package/dist/__chunks/{K27Z66LH.js.map → YF53K6PE.js.map} +0 -0
- /package/dist/__chunks/{LECUYS4O.cjs.map → YJI76DU2.cjs.map} +0 -0
- /package/dist/{Button/constants/color.cjs.map → colors/border.cjs.map} +0 -0
- /package/dist/{Button/constants/color.js.map → colors/border.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Card/Card.tsx"],"sourcesContent":["import Box from \"../Box/Box\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport type allColors from \"../colors/allColors\";\n\ntype CardType = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The background color of the box.\n * @defaultValue `white`\n */\n backgroundColor?: (typeof allColors)[number];\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n /**\n * The size of the card (Cambio only) which specifies the padding and spacing of the card.\n *\n * `compact`: 8px padding\n * `roomy`: 16px padding\n *\n * @defaultValue `roomy`\n */\n size?: \"compact\" | \"roomy\";\n};\n\n/**\n * [Card](https://cambly-syntax.vercel.app/?path=/docs/components-card--docs) is a basic container component to apply consistent styling and render child components.\n */\nexport default function Card({\n backgroundColor = \"white\",\n children,\n size,\n \"data-testid\": dataTestId,\n}: CardType): JSX.Element {\n const { themeName } = useTheme();\n\n const cambioPadding = size === \"compact\" ? 2 : 4;\n\n return (\n <Box\n rounding={themeName === \"classic\" ? \"lg\" : \"md\"}\n padding={themeName === \"classic\" ? 5 : cambioPadding}\n smPadding={themeName === \"classic\" ? 7 : undefined}\n width=\"100%\"\n backgroundColor={backgroundColor}\n data-testid={dataTestId}\n >\n {children}\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;AA2CI;AAXW,SAAR,KAAsB;AAAA,EAC3B,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA,eAAe;AACjB,GAA0B;AACxB,QAAM,EAAE,UAAU,IAAI,SAAS;AAE/B,QAAM,gBAAgB,SAAS,YAAY,IAAI;AAE/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,cAAc,YAAY,OAAO;AAAA,MAC3C,SAAS,cAAc,YAAY,IAAI;AAAA,MACvC,WAAW,cAAc,YAAY,IAAI;AAAA,MACzC,OAAM;AAAA,MACN;AAAA,MACA,eAAa;AAAA,MAEZ;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Card/Card.tsx"],"names":[],"mappings":";;;;;;;;;AA2CI;AAXW,SAAR,KAAsB;AAAA,EAC3B,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA,eAAe;AACjB,GAA0B;AACxB,QAAM,EAAE,UAAU,IAAI,SAAS;AAE/B,QAAM,gBAAgB,SAAS,YAAY,IAAI;AAE/C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,UAAU,cAAc,YAAY,OAAO;AAAA,MAC3C,SAAS,cAAc,YAAY,IAAI;AAAA,MACvC,WAAW,cAAc,YAAY,IAAI;AAAA,MACzC,OAAM;AAAA,MACN;AAAA,MACA,eAAa;AAAA,MAEZ;AAAA;AAAA,EACH;AAEJ","sourcesContent":["import Box from \"../Box/Box\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport type allColors from \"../colors/allColors\";\n\ntype CardType = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The background color of the box.\n * @defaultValue `white`\n */\n backgroundColor?: (typeof allColors)[number];\n /**\n * The child components to render within Card.\n */\n children: JSX.Element;\n /**\n * The size of the card (Cambio only) which specifies the padding and spacing of the card.\n *\n * `compact`: 8px padding\n * `roomy`: 16px padding\n *\n * @defaultValue `roomy`\n */\n size?: \"compact\" | \"roomy\";\n};\n\n/**\n * [Card](https://cambly-syntax.vercel.app/?path=/docs/components-card--docs) is a basic container component to apply consistent styling and render child components.\n */\nexport default function Card({\n backgroundColor = \"white\",\n children,\n size,\n \"data-testid\": dataTestId,\n}: CardType): JSX.Element {\n const { themeName } = useTheme();\n\n const cambioPadding = size === \"compact\" ? 2 : 4;\n\n return (\n <Box\n rounding={themeName === \"classic\" ? \"lg\" : \"md\"}\n padding={themeName === \"classic\" ? 5 : cambioPadding}\n smPadding={themeName === \"classic\" ? 7 : undefined}\n width=\"100%\"\n backgroundColor={backgroundColor}\n data-testid={dataTestId}\n >\n {children}\n </Box>\n );\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Modal/Modal.tsx","css-module:./Modal.module.css#css-module"],"sourcesContent":["import { type ReactElement } from \"react\";\nimport classnames from \"classnames\";\n\nimport Heading from \"../Heading/Heading\";\nimport Box from \"../Box/Box\";\n\nimport FocusTrap from \"./FocusTrap\";\nimport StopScroll from \"./StopScroll\";\nimport Layer from \"./Layer\";\nimport styles from \"./Modal.module.css\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport IconButton from \"../IconButton/IconButton\";\n\nconst sizeWidth = {\n sm: 600,\n lg: 600,\n} as const;\n\nfunction XIconCambio({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path>\n </svg>\n );\n}\n\n/**\n * [Modal](https://cambly-syntax.vercel.app/?path=/docs/components-modal--docs) is a dialog that appears on top of the main content and locks user interaction within the modal.\n *\n ```\n const [showModal, setShowModal] = useState(false)\n\n return (\n <>\n {showModal && <Modal\n header=\"header text\"\n onDismiss={() => setShowModal(false)}\n footer={\n <>\n <Button\n text=\"Cancel\"\n color=\"secondary\"\n onClick={() => {}}\n />\n <Button\n text=\"Confirm\"\n onClick={() => {}}\n />\n </>\n }\n >\n <Typography>\n Body text goes here!\n </Typography>\n </Modal> }\n </>\n )\n ```\n */\nexport default function Modal({\n header,\n children,\n image,\n onDismiss,\n footer,\n accessibilityCloseLabel = \"close modal\",\n size = \"sm\",\n zIndex = 1,\n \"data-testid\": dataTestId,\n}: {\n /**\n * The modal's main content. Should typically take in `Typography`'d text.\n */\n children: JSX.Element;\n /**\n * The header inside a modal as a string.\n */\n header: string;\n /**\n * What the X button (or clicking out of the modal area) does.\n * Typically used for closing the Modal\n */\n onDismiss: () => void;\n /**\n * The optional image rendered above the Modal.\n * Image\n * * Size should be 600w x 200h\n * * Be sure to set width=\"100%\" on the image\n * If images aren't that sized, should ask design to give another image.\n */\n image?: JSX.Element;\n /**\n * The footer for the bottom area of the Modal. Typically used for rendering buttons.\n * * Use Syntax `Button` and pass it into footer.\n * * If one button, just pass it in. If two, wrap in a React fragment (`<> </>`)\n * * If two(2) buttons, put primary button _second_.\n *\n <>\n <Button\n text=\"Cancel\"\n color=\"secondary\"\n onClick={() => {}}\n />\n <Button\n text=\"Confirm\"\n onClick={() => {}}\n />\n </>\n */\n footer?: JSX.Element;\n /**\n * The accessibilty text on the close button.\n * (Sets the aria-label of the button)\n *\n *\n * @defaultValue close modal\n */\n accessibilityCloseLabel?: string;\n /**\n * The size of the card\n * * `sm`: 600px (deprecated)\n * * `lg`: 600px\n *\n *\n * @defaultValue sm\n * @deprecated\n */\n size?: keyof typeof sizeWidth;\n /**\n * The z-index for the modal.\n * Typically used if there are other things on the page with higher z-index and you need this overlayed on top.\n *\n * @defaultValue 0\n */\n zIndex?: number;\n /**\n * Test id for the modal\n */\n \"data-testid\"?: string;\n}): ReactElement {\n const { themeName } = useTheme();\n return (\n <Layer zIndex={zIndex}>\n <StopScroll>\n <FocusTrap>\n <div\n className={classnames(\n styles.backdrop,\n themeName === \"classic\"\n ? styles.backdropClassic\n : styles.backdropCambio,\n )}\n role=\"presentation\"\n onClick={(e) => e.target === e.currentTarget && onDismiss()}\n onKeyDown={(e) => e.key === \"Escape\" && onDismiss()}\n >\n <Box\n data-testid={dataTestId}\n backgroundColor=\"white\"\n rounding=\"md\"\n display=\"flex\"\n marginStart={4}\n marginEnd={4}\n marginTop={8}\n marginBottom={8}\n minWidth={240}\n maxHeight=\"calc(100vh - 64px)\"\n maxWidth={sizeWidth[size]}\n overflow=\"hidden\"\n position=\"relative\"\n width=\"100%\"\n >\n <Box\n position=\"absolute\"\n dangerouslySetInlineStyle={{\n __style: { top: 4, right: 4 },\n }}\n >\n <IconButton\n accessibilityLabel={accessibilityCloseLabel}\n color={image ? \"primary\" : \"tertiary\"}\n on={image ? \"darkBackground\" : \"lightBackground\"}\n onClick={onDismiss}\n size=\"sm\"\n icon={XIconCambio}\n />\n </Box>\n\n <Box display=\"flex\" direction=\"column\" width=\"100%\">\n {image && <Box>{image}</Box>}\n <Box padding={6}>\n <Heading as=\"h1\" size={600} fontStyle=\"serif\">\n {header}\n </Heading>\n </Box>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n paddingX={6}\n marginBottom={footer ? 0 : 6}\n >\n {children}\n </Box>\n {footer && (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={3}\n smDirection=\"row\"\n smJustifyContent=\"end\"\n lgDirection=\"row\"\n lgJustifyContent=\"end\"\n padding={6}\n >\n {footer}\n </Box>\n )}\n </Box>\n </Box>\n </div>\n </FocusTrap>\n </StopScroll>\n </Layer>\n );\n}\n\nModal.displayName = \"Modal\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Modal/Modal.module.css\"; export default {\"backdrop\":\"_backdrop_9g2f1_1\",\"backdropClassic\":\"_backdropClassic_9g2f1_9\",\"backdropCambio\":\"_backdropCambio_9g2f1_13\",\"closeButton\":\"_closeButton_9g2f1_17\",\"closeButtonClassic\":\"_closeButtonClassic_9g2f1_32\",\"closeButtonWithImage\":\"_closeButtonWithImage_9g2f1_44\",\"closeButtonWithImageCambio\":\"_closeButtonWithImageCambio_9g2f1_48\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,gBAAgB;;;ACDmE,IAAO,uBAAQ,EAAC,YAAW,qBAAoB,mBAAkB,4BAA2B,kBAAiB,4BAA2B,eAAc,yBAAwB,sBAAqB,gCAA+B,wBAAuB,kCAAiC,8BAA6B,uCAAsC;;;AD2Bjb,cAuKQ,YAvKR;AAdN,IAAM,YAAY;AAAA,EAChB,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,SAAS,YAAY,EAAE,UAAU,GAA2B;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,WAAU;AAAA,MACV,eAAY;AAAA,MACZ,SAAQ;AAAA,MAER,8BAAC,UAAK,GAAE,yGAAwG;AAAA;AAAA,EAClH;AAEJ;AAmCe,SAAR,MAAuB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,0BAA0B;AAAA,EAC1B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,eAAe;AACjB,GAsEiB;AACf,QAAM,EAAE,UAAU,IAAI,SAAS;AAC/B,SACE,oBAAC,SAAM,QACL,8BAAC,cACC,8BAAC,aACC;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT,qBAAO;AAAA,QACP,cAAc,YACV,qBAAO,kBACP,qBAAO;AAAA,MACb;AAAA,MACA,MAAK;AAAA,MACL,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,iBAAiB,UAAU;AAAA,MAC1D,WAAW,CAAC,MAAM,EAAE,QAAQ,YAAY,UAAU;AAAA,MAElD;AAAA,QAAC;AAAA;AAAA,UACC,eAAa;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AAM,cAAc;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
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\nfunction cambioWeight({\n fontStyle,\n size,\n}: {\n fontStyle: \"serif\" | \"sans-serif\";\n size: 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100;\n}): \"bold\" | \"medium\" | \"regular\" {\n if (fontStyle === \"serif\" && [400, 500, 600].includes(size)) {\n return \"bold\";\n } else if (fontStyle === \"serif\") {\n return \"medium\";\n } else {\n return \"regular\";\n }\n}\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 = \"sans-serif\",\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\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={\n themeName === \"classic\"\n ? classicWeight\n : cambioWeight({ fontStyle, size })\n }\n >\n {children}\n </Typography>\n );\n};\n\nexport default Heading;\n"],"mappings":";;;;;;;;;AAqHI;AAjHJ,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AACF,GAGkC;AAChC,MAAI,cAAc,WAAW,CAAC,KAAK,KAAK,GAAG,EAAE,SAAS,IAAI,GAAG;AAC3D,WAAO;AAAA,EACT,WAAW,cAAc,SAAS;AAChC,WAAO;AAAA,EACT,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAKA,IAAM,UAAU,CAAC;AAAA,EACf,QAAQ;AAAA,EACR,KAAK;AAAA,EACL;AAAA,EACA,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AAAA,EACZ;AAAA,EACA,OAAO;AACT,MAgFoB;AAClB,QAAM,EAAE,UAAU,IAAI,SAAS;AAC/B,QAAM,gBAAgB,CAAC,KAAK,GAAG,EAAE,SAAS,IAAI,IAAI,UAAU;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA,QACE,cAAc,YACV,gBACA,aAAa,EAAE,WAAW,KAAK,CAAC;AAAA,MAGrC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,kBAAQ;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
// css-module:../colors/colors.module.css#css-module
|
|
4
|
-
var colors_module_default = { "inheritColor": "_inheritColor_rzcwj_2", "destructive700Color": "_destructive700Color_rzcwj_6", "gray700Color": "_gray700Color_rzcwj_10", "gray900Color": "_gray900Color_rzcwj_14", "primary700Color": "_primary700Color_rzcwj_18", "success700Color": "_success700Color_rzcwj_22", "whiteColor": "_whiteColor_rzcwj_26", "blackBackgroundColor": "_blackBackgroundColor_rzcwj_31", "destructive100BackgroundColor": "_destructive100BackgroundColor_rzcwj_35", "destructive200BackgroundColor": "_destructive200BackgroundColor_rzcwj_39", "destructive300BackgroundColor": "_destructive300BackgroundColor_rzcwj_43", "destructive700BackgroundColor": "_destructive700BackgroundColor_rzcwj_47", "destructive800BackgroundColor": "_destructive800BackgroundColor_rzcwj_51", "destructive900BackgroundColor": "_destructive900BackgroundColor_rzcwj_55", "gray10BackgroundColor": "_gray10BackgroundColor_rzcwj_59", "gray30BackgroundColor": "_gray30BackgroundColor_rzcwj_63", "gray60BackgroundColor": "_gray60BackgroundColor_rzcwj_67", "gray80BackgroundColor": "_gray80BackgroundColor_rzcwj_71", "gray100BackgroundColor": "_gray100BackgroundColor_rzcwj_75", "gray200BackgroundColor": "_gray200BackgroundColor_rzcwj_79", "gray300BackgroundColor": "_gray300BackgroundColor_rzcwj_83", "gray700BackgroundColor": "_gray700BackgroundColor_rzcwj_87", "gray800BackgroundColor": "_gray800BackgroundColor_rzcwj_91", "gray900BackgroundColor": "_gray900BackgroundColor_rzcwj_95", "orange100BackgroundColor": "_orange100BackgroundColor_rzcwj_99", "orange200BackgroundColor": "_orange200BackgroundColor_rzcwj_103", "orange300BackgroundColor": "_orange300BackgroundColor_rzcwj_107", "orange700BackgroundColor": "_orange700BackgroundColor_rzcwj_111", "orange800BackgroundColor": "_orange800BackgroundColor_rzcwj_115", "orange900BackgroundColor": "_orange900BackgroundColor_rzcwj_119", "primary100BackgroundColor": "_primary100BackgroundColor_rzcwj_123", "primary200BackgroundColor": "_primary200BackgroundColor_rzcwj_127", "primary300BackgroundColor": "_primary300BackgroundColor_rzcwj_131", "primary700BackgroundColor": "_primary700BackgroundColor_rzcwj_135", "primary800BackgroundColor": "_primary800BackgroundColor_rzcwj_139", "primary900BackgroundColor": "_primary900BackgroundColor_rzcwj_143", "success100BackgroundColor": "_success100BackgroundColor_rzcwj_147", "success200BackgroundColor": "_success200BackgroundColor_rzcwj_151", "success300BackgroundColor": "_success300BackgroundColor_rzcwj_155", "success700BackgroundColor": "_success700BackgroundColor_rzcwj_159", "success800BackgroundColor": "_success800BackgroundColor_rzcwj_163", "success900BackgroundColor": "_success900BackgroundColor_rzcwj_167", "purple100BackgroundColor": "_purple100BackgroundColor_rzcwj_171", "purple200BackgroundColor": "_purple200BackgroundColor_rzcwj_175", "purple300BackgroundColor": "_purple300BackgroundColor_rzcwj_179", "purple700BackgroundColor": "_purple700BackgroundColor_rzcwj_183", "purple800BackgroundColor": "_purple800BackgroundColor_rzcwj_187", "purple900BackgroundColor": "_purple900BackgroundColor_rzcwj_191", "whiteBackgroundColor": "_whiteBackgroundColor_rzcwj_195", "yellow100BackgroundColor": "_yellow100BackgroundColor_rzcwj_199", "yellow200BackgroundColor": "_yellow200BackgroundColor_rzcwj_203", "yellow300BackgroundColor": "_yellow300BackgroundColor_rzcwj_207", "yellow700BackgroundColor": "_yellow700BackgroundColor_rzcwj_211", "yellow800BackgroundColor": "_yellow800BackgroundColor_rzcwj_215", "yellow900BackgroundColor": "_yellow900BackgroundColor_rzcwj_219", "cambioBlackColor": "_cambioBlackColor_rzcwj_224", "cambioWhiteColor": "_cambioWhiteColor_rzcwj_228", "cambioGray100Color": "_cambioGray100Color_rzcwj_232", "cambioGray200Color": "_cambioGray200Color_rzcwj_236", "cambioGray300Color": "_cambioGray300Color_rzcwj_240", "cambioGray370Color": "_cambioGray370Color_rzcwj_244", "cambioGray700Color": "_cambioGray700Color_rzcwj_248", "cambioGray800Color": "_cambioGray800Color_rzcwj_252", "cambioGray870Color": "_cambioGray870Color_rzcwj_256", "cambioGray900Color": "_cambioGray900Color_rzcwj_260", "cambioDestructive100Color": "_cambioDestructive100Color_rzcwj_264", "cambioDestructive300Color": "_cambioDestructive300Color_rzcwj_268", "cambioDestructive370Color": "_cambioDestructive370Color_rzcwj_272", "cambioDestructive700Color": "_cambioDestructive700Color_rzcwj_276", "cambioDestructive770Color": "_cambioDestructive770Color_rzcwj_280", "cambioDestructive900Color": "_cambioDestructive900Color_rzcwj_284", "cambioSuccess100Color": "_cambioSuccess100Color_rzcwj_288", "cambioSuccess300Color": "_cambioSuccess300Color_rzcwj_292", "cambioSuccess370Color": "_cambioSuccess370Color_rzcwj_296", "cambioSuccess700Color": "_cambioSuccess700Color_rzcwj_300", "cambioSuccess770Color": "_cambioSuccess770Color_rzcwj_304", "cambioSuccess900Color": "_cambioSuccess900Color_rzcwj_308", "cambioRedColor": "_cambioRedColor_rzcwj_312", "cambioOrangeColor": "_cambioOrangeColor_rzcwj_316", "cambioTanColor": "_cambioTanColor_rzcwj_320", "cambioCreamColor": "_cambioCreamColor_rzcwj_324", "cambioPurpleColor": "_cambioPurpleColor_rzcwj_328", "cambioLilacColor": "_cambioLilacColor_rzcwj_332", "cambioThistleColor": "_cambioThistleColor_rzcwj_336", "cambioPinkColor": "_cambioPinkColor_rzcwj_340", "cambioNavyColor": "_cambioNavyColor_rzcwj_344", "cambioTealColor": "_cambioTealColor_rzcwj_348", "cambioSlateColor": "_cambioSlateColor_rzcwj_352", "cambioSkyColor": "_cambioSkyColor_rzcwj_356", "cambioYellow700Color": "_cambioYellow700Color_rzcwj_360", "cambioTransparentFullBackgroundColor": "_cambioTransparentFullBackgroundColor_rzcwj_364", "cambioBlackBackgroundColor": "_cambioBlackBackgroundColor_rzcwj_368", "cambioWhiteBackgroundColor": "_cambioWhiteBackgroundColor_rzcwj_372", "cambioGray100BackgroundColor": "_cambioGray100BackgroundColor_rzcwj_376", "cambioGray200BackgroundColor": "_cambioGray200BackgroundColor_rzcwj_380", "cambioGray300BackgroundColor": "_cambioGray300BackgroundColor_rzcwj_384", "gray370BackgroundColor": "_gray370BackgroundColor_rzcwj_388", "cambioGray370BackgroundColor": "_cambioGray370BackgroundColor_rzcwj_392", "cambioGray700BackgroundColor": "_cambioGray700BackgroundColor_rzcwj_396", "cambioGray800BackgroundColor": "_cambioGray800BackgroundColor_rzcwj_400", "gray870BackgroundColor": "_gray870BackgroundColor_rzcwj_404", "cambioGray870BackgroundColor": "_cambioGray870BackgroundColor_rzcwj_408", "cambioGray900BackgroundColor": "_cambioGray900BackgroundColor_rzcwj_412", "cambioDestructive100BackgroundColor": "_cambioDestructive100BackgroundColor_rzcwj_416", "cambioDestructive300BackgroundColor": "_cambioDestructive300BackgroundColor_rzcwj_420", "cambioDestructive370BackgroundColor": "_cambioDestructive370BackgroundColor_rzcwj_424", "cambioDestructive700BackgroundColor": "_cambioDestructive700BackgroundColor_rzcwj_428", "cambioDestructive770BackgroundColor": "_cambioDestructive770BackgroundColor_rzcwj_432", "cambioDestructive900BackgroundColor": "_cambioDestructive900BackgroundColor_rzcwj_436", "cambioSuccess100BackgroundColor": "_cambioSuccess100BackgroundColor_rzcwj_440", "cambioSuccess300BackgroundColor": "_cambioSuccess300BackgroundColor_rzcwj_444", "cambioSuccess370BackgroundColor": "_cambioSuccess370BackgroundColor_rzcwj_448", "cambioSuccess700BackgroundColor": "_cambioSuccess700BackgroundColor_rzcwj_452", "cambioSuccess770BackgroundColor": "_cambioSuccess770BackgroundColor_rzcwj_456", "cambioSuccess900BackgroundColor": "_cambioSuccess900BackgroundColor_rzcwj_460", "redBackgroundColor": "_redBackgroundColor_rzcwj_464", "cambioRedBackgroundColor": "_cambioRedBackgroundColor_rzcwj_468", "orangeBackgroundColor": "_orangeBackgroundColor_rzcwj_472", "cambioOrangeBackgroundColor": "_cambioOrangeBackgroundColor_rzcwj_476", "tanBackgroundColor": "_tanBackgroundColor_rzcwj_480", "cambioTanBackgroundColor": "_cambioTanBackgroundColor_rzcwj_484", "creamBackgroundColor": "_creamBackgroundColor_rzcwj_488", "cambioCreamBackgroundColor": "_cambioCreamBackgroundColor_rzcwj_492", "purpleBackgroundColor": "_purpleBackgroundColor_rzcwj_496", "cambioPurpleBackgroundColor": "_cambioPurpleBackgroundColor_rzcwj_500", "lilacBackgroundColor": "_lilacBackgroundColor_rzcwj_504", "cambioLilacBackgroundColor": "_cambioLilacBackgroundColor_rzcwj_508", "thistleBackgroundColor": "_thistleBackgroundColor_rzcwj_512", "cambioThistleBackgroundColor": "_cambioThistleBackgroundColor_rzcwj_516", "pinkBackgroundColor": "_pinkBackgroundColor_rzcwj_520", "cambioPinkBackgroundColor": "_cambioPinkBackgroundColor_rzcwj_524", "navyBackgroundColor": "_navyBackgroundColor_rzcwj_528", "cambioNavyBackgroundColor": "_cambioNavyBackgroundColor_rzcwj_532", "tealBackgroundColor": "_tealBackgroundColor_rzcwj_536", "cambioTealBackgroundColor": "_cambioTealBackgroundColor_rzcwj_540", "slateBackgroundColor": "_slateBackgroundColor_rzcwj_544", "cambioSlateBackgroundColor": "_cambioSlateBackgroundColor_rzcwj_548", "skyBackgroundColor": "_skyBackgroundColor_rzcwj_552", "cambioSkyBackgroundColor": "_cambioSkyBackgroundColor_rzcwj_556", "cambioYellow700BackgroundColor": "_cambioYellow700BackgroundColor_rzcwj_560" };
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
colors_module_default
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=B7PDT66P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["css-module:../colors/colors.module.css#css-module"],"sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"inheritColor\":\"_inheritColor_rzcwj_2\",\"destructive700Color\":\"_destructive700Color_rzcwj_6\",\"gray700Color\":\"_gray700Color_rzcwj_10\",\"gray900Color\":\"_gray900Color_rzcwj_14\",\"primary700Color\":\"_primary700Color_rzcwj_18\",\"success700Color\":\"_success700Color_rzcwj_22\",\"whiteColor\":\"_whiteColor_rzcwj_26\",\"blackBackgroundColor\":\"_blackBackgroundColor_rzcwj_31\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_rzcwj_35\",\"destructive200BackgroundColor\":\"_destructive200BackgroundColor_rzcwj_39\",\"destructive300BackgroundColor\":\"_destructive300BackgroundColor_rzcwj_43\",\"destructive700BackgroundColor\":\"_destructive700BackgroundColor_rzcwj_47\",\"destructive800BackgroundColor\":\"_destructive800BackgroundColor_rzcwj_51\",\"destructive900BackgroundColor\":\"_destructive900BackgroundColor_rzcwj_55\",\"gray10BackgroundColor\":\"_gray10BackgroundColor_rzcwj_59\",\"gray30BackgroundColor\":\"_gray30BackgroundColor_rzcwj_63\",\"gray60BackgroundColor\":\"_gray60BackgroundColor_rzcwj_67\",\"gray80BackgroundColor\":\"_gray80BackgroundColor_rzcwj_71\",\"gray100BackgroundColor\":\"_gray100BackgroundColor_rzcwj_75\",\"gray200BackgroundColor\":\"_gray200BackgroundColor_rzcwj_79\",\"gray300BackgroundColor\":\"_gray300BackgroundColor_rzcwj_83\",\"gray700BackgroundColor\":\"_gray700BackgroundColor_rzcwj_87\",\"gray800BackgroundColor\":\"_gray800BackgroundColor_rzcwj_91\",\"gray900BackgroundColor\":\"_gray900BackgroundColor_rzcwj_95\",\"orange100BackgroundColor\":\"_orange100BackgroundColor_rzcwj_99\",\"orange200BackgroundColor\":\"_orange200BackgroundColor_rzcwj_103\",\"orange300BackgroundColor\":\"_orange300BackgroundColor_rzcwj_107\",\"orange700BackgroundColor\":\"_orange700BackgroundColor_rzcwj_111\",\"orange800BackgroundColor\":\"_orange800BackgroundColor_rzcwj_115\",\"orange900BackgroundColor\":\"_orange900BackgroundColor_rzcwj_119\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_rzcwj_123\",\"primary200BackgroundColor\":\"_primary200BackgroundColor_rzcwj_127\",\"primary300BackgroundColor\":\"_primary300BackgroundColor_rzcwj_131\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_rzcwj_135\",\"primary800BackgroundColor\":\"_primary800BackgroundColor_rzcwj_139\",\"primary900BackgroundColor\":\"_primary900BackgroundColor_rzcwj_143\",\"success100BackgroundColor\":\"_success100BackgroundColor_rzcwj_147\",\"success200BackgroundColor\":\"_success200BackgroundColor_rzcwj_151\",\"success300BackgroundColor\":\"_success300BackgroundColor_rzcwj_155\",\"success700BackgroundColor\":\"_success700BackgroundColor_rzcwj_159\",\"success800BackgroundColor\":\"_success800BackgroundColor_rzcwj_163\",\"success900BackgroundColor\":\"_success900BackgroundColor_rzcwj_167\",\"purple100BackgroundColor\":\"_purple100BackgroundColor_rzcwj_171\",\"purple200BackgroundColor\":\"_purple200BackgroundColor_rzcwj_175\",\"purple300BackgroundColor\":\"_purple300BackgroundColor_rzcwj_179\",\"purple700BackgroundColor\":\"_purple700BackgroundColor_rzcwj_183\",\"purple800BackgroundColor\":\"_purple800BackgroundColor_rzcwj_187\",\"purple900BackgroundColor\":\"_purple900BackgroundColor_rzcwj_191\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_rzcwj_195\",\"yellow100BackgroundColor\":\"_yellow100BackgroundColor_rzcwj_199\",\"yellow200BackgroundColor\":\"_yellow200BackgroundColor_rzcwj_203\",\"yellow300BackgroundColor\":\"_yellow300BackgroundColor_rzcwj_207\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_rzcwj_211\",\"yellow800BackgroundColor\":\"_yellow800BackgroundColor_rzcwj_215\",\"yellow900BackgroundColor\":\"_yellow900BackgroundColor_rzcwj_219\",\"cambioBlackColor\":\"_cambioBlackColor_rzcwj_224\",\"cambioWhiteColor\":\"_cambioWhiteColor_rzcwj_228\",\"cambioGray100Color\":\"_cambioGray100Color_rzcwj_232\",\"cambioGray200Color\":\"_cambioGray200Color_rzcwj_236\",\"cambioGray300Color\":\"_cambioGray300Color_rzcwj_240\",\"cambioGray370Color\":\"_cambioGray370Color_rzcwj_244\",\"cambioGray700Color\":\"_cambioGray700Color_rzcwj_248\",\"cambioGray800Color\":\"_cambioGray800Color_rzcwj_252\",\"cambioGray870Color\":\"_cambioGray870Color_rzcwj_256\",\"cambioGray900Color\":\"_cambioGray900Color_rzcwj_260\",\"cambioDestructive100Color\":\"_cambioDestructive100Color_rzcwj_264\",\"cambioDestructive300Color\":\"_cambioDestructive300Color_rzcwj_268\",\"cambioDestructive370Color\":\"_cambioDestructive370Color_rzcwj_272\",\"cambioDestructive700Color\":\"_cambioDestructive700Color_rzcwj_276\",\"cambioDestructive770Color\":\"_cambioDestructive770Color_rzcwj_280\",\"cambioDestructive900Color\":\"_cambioDestructive900Color_rzcwj_284\",\"cambioSuccess100Color\":\"_cambioSuccess100Color_rzcwj_288\",\"cambioSuccess300Color\":\"_cambioSuccess300Color_rzcwj_292\",\"cambioSuccess370Color\":\"_cambioSuccess370Color_rzcwj_296\",\"cambioSuccess700Color\":\"_cambioSuccess700Color_rzcwj_300\",\"cambioSuccess770Color\":\"_cambioSuccess770Color_rzcwj_304\",\"cambioSuccess900Color\":\"_cambioSuccess900Color_rzcwj_308\",\"cambioRedColor\":\"_cambioRedColor_rzcwj_312\",\"cambioOrangeColor\":\"_cambioOrangeColor_rzcwj_316\",\"cambioTanColor\":\"_cambioTanColor_rzcwj_320\",\"cambioCreamColor\":\"_cambioCreamColor_rzcwj_324\",\"cambioPurpleColor\":\"_cambioPurpleColor_rzcwj_328\",\"cambioLilacColor\":\"_cambioLilacColor_rzcwj_332\",\"cambioThistleColor\":\"_cambioThistleColor_rzcwj_336\",\"cambioPinkColor\":\"_cambioPinkColor_rzcwj_340\",\"cambioNavyColor\":\"_cambioNavyColor_rzcwj_344\",\"cambioTealColor\":\"_cambioTealColor_rzcwj_348\",\"cambioSlateColor\":\"_cambioSlateColor_rzcwj_352\",\"cambioSkyColor\":\"_cambioSkyColor_rzcwj_356\",\"cambioYellow700Color\":\"_cambioYellow700Color_rzcwj_360\",\"cambioTransparentFullBackgroundColor\":\"_cambioTransparentFullBackgroundColor_rzcwj_364\",\"cambioBlackBackgroundColor\":\"_cambioBlackBackgroundColor_rzcwj_368\",\"cambioWhiteBackgroundColor\":\"_cambioWhiteBackgroundColor_rzcwj_372\",\"cambioGray100BackgroundColor\":\"_cambioGray100BackgroundColor_rzcwj_376\",\"cambioGray200BackgroundColor\":\"_cambioGray200BackgroundColor_rzcwj_380\",\"cambioGray300BackgroundColor\":\"_cambioGray300BackgroundColor_rzcwj_384\",\"gray370BackgroundColor\":\"_gray370BackgroundColor_rzcwj_388\",\"cambioGray370BackgroundColor\":\"_cambioGray370BackgroundColor_rzcwj_392\",\"cambioGray700BackgroundColor\":\"_cambioGray700BackgroundColor_rzcwj_396\",\"cambioGray800BackgroundColor\":\"_cambioGray800BackgroundColor_rzcwj_400\",\"gray870BackgroundColor\":\"_gray870BackgroundColor_rzcwj_404\",\"cambioGray870BackgroundColor\":\"_cambioGray870BackgroundColor_rzcwj_408\",\"cambioGray900BackgroundColor\":\"_cambioGray900BackgroundColor_rzcwj_412\",\"cambioDestructive100BackgroundColor\":\"_cambioDestructive100BackgroundColor_rzcwj_416\",\"cambioDestructive300BackgroundColor\":\"_cambioDestructive300BackgroundColor_rzcwj_420\",\"cambioDestructive370BackgroundColor\":\"_cambioDestructive370BackgroundColor_rzcwj_424\",\"cambioDestructive700BackgroundColor\":\"_cambioDestructive700BackgroundColor_rzcwj_428\",\"cambioDestructive770BackgroundColor\":\"_cambioDestructive770BackgroundColor_rzcwj_432\",\"cambioDestructive900BackgroundColor\":\"_cambioDestructive900BackgroundColor_rzcwj_436\",\"cambioSuccess100BackgroundColor\":\"_cambioSuccess100BackgroundColor_rzcwj_440\",\"cambioSuccess300BackgroundColor\":\"_cambioSuccess300BackgroundColor_rzcwj_444\",\"cambioSuccess370BackgroundColor\":\"_cambioSuccess370BackgroundColor_rzcwj_448\",\"cambioSuccess700BackgroundColor\":\"_cambioSuccess700BackgroundColor_rzcwj_452\",\"cambioSuccess770BackgroundColor\":\"_cambioSuccess770BackgroundColor_rzcwj_456\",\"cambioSuccess900BackgroundColor\":\"_cambioSuccess900BackgroundColor_rzcwj_460\",\"redBackgroundColor\":\"_redBackgroundColor_rzcwj_464\",\"cambioRedBackgroundColor\":\"_cambioRedBackgroundColor_rzcwj_468\",\"orangeBackgroundColor\":\"_orangeBackgroundColor_rzcwj_472\",\"cambioOrangeBackgroundColor\":\"_cambioOrangeBackgroundColor_rzcwj_476\",\"tanBackgroundColor\":\"_tanBackgroundColor_rzcwj_480\",\"cambioTanBackgroundColor\":\"_cambioTanBackgroundColor_rzcwj_484\",\"creamBackgroundColor\":\"_creamBackgroundColor_rzcwj_488\",\"cambioCreamBackgroundColor\":\"_cambioCreamBackgroundColor_rzcwj_492\",\"purpleBackgroundColor\":\"_purpleBackgroundColor_rzcwj_496\",\"cambioPurpleBackgroundColor\":\"_cambioPurpleBackgroundColor_rzcwj_500\",\"lilacBackgroundColor\":\"_lilacBackgroundColor_rzcwj_504\",\"cambioLilacBackgroundColor\":\"_cambioLilacBackgroundColor_rzcwj_508\",\"thistleBackgroundColor\":\"_thistleBackgroundColor_rzcwj_512\",\"cambioThistleBackgroundColor\":\"_cambioThistleBackgroundColor_rzcwj_516\",\"pinkBackgroundColor\":\"_pinkBackgroundColor_rzcwj_520\",\"cambioPinkBackgroundColor\":\"_cambioPinkBackgroundColor_rzcwj_524\",\"navyBackgroundColor\":\"_navyBackgroundColor_rzcwj_528\",\"cambioNavyBackgroundColor\":\"_cambioNavyBackgroundColor_rzcwj_532\",\"tealBackgroundColor\":\"_tealBackgroundColor_rzcwj_536\",\"cambioTealBackgroundColor\":\"_cambioTealBackgroundColor_rzcwj_540\",\"slateBackgroundColor\":\"_slateBackgroundColor_rzcwj_544\",\"cambioSlateBackgroundColor\":\"_cambioSlateBackgroundColor_rzcwj_548\",\"skyBackgroundColor\":\"_skyBackgroundColor_rzcwj_552\",\"cambioSkyBackgroundColor\":\"_cambioSkyBackgroundColor_rzcwj_556\",\"cambioYellow700BackgroundColor\":\"_cambioYellow700BackgroundColor_rzcwj_560\"}"],"mappings":";;;AAA4F,IAAO,wBAAQ,EAAC,gBAAe,yBAAwB,uBAAsB,gCAA+B,gBAAe,0BAAyB,gBAAe,0BAAyB,mBAAkB,6BAA4B,mBAAkB,6BAA4B,cAAa,wBAAuB,wBAAuB,kCAAiC,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,4BAA2B,sCAAqC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,wBAAuB,mCAAkC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,u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AyC,wBAAuB,mCAAkC,8BAA6B,yCAAwC,0BAAyB,qCAAoC,gCAA+B,2CAA0C,uBAAsB,kCAAiC,6BAA4B,wCAAuC,uBAAsB,kCAAiC,6BAA4B,wCAAuC,uBAAsB,kCAAiC,6BAA4B,wCAAuC,wBAAuB,mCAAkC,8BAA6B,yCAAwC,sBAAqB,iCAAgC,4BAA2B,uCAAsC,kCAAiC,4CAA2C;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Button/Button.tsx","css-module:./Button.module.css#css-module"],"sourcesContent":["import React, { forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport iconSize from \"./constants/iconSize\";\nimport textVariant from \"./constants/textVariant\";\nimport loadingIconSize from \"./constants/loadingIconSize\";\nimport styles from \"./Button.module.css\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport { classicColor, cambioColor } from \"./constants/color\";\nimport {\n classicBackgroundColor,\n cambioBackgroundColor,\n} from \"../colors/backgroundColor\";\nimport {\n classicForegroundColor,\n cambioForegroundColor,\n} from \"../colors/foregroundColor\";\n\ntype ButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * Classic only:\n * * `inverse`\n * * `success`\n *\n * Cambio only:\n * * `success-primary`\n * * `success-secondary`\n * * `success-tertiary`\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\"\n | \"inverse\";\n /**\n * The size of the button\n *\n * Classic:\n * * `sm`: 32px\n * * `md`: 40px\n * * `lg`: 48px\n *\n * Cambio:\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className?: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className?: string }>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button (Cambio only)\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * The callback to be called when the button is clicked\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n /**\n * The type you want to set for the primitive `<button/>`\n */\n type?: \"button\" | \"submit\" | \"reset\";\n};\n\n/**\n * [Button](https://cambly-syntax.vercel.app/?path=/docs/components-button--docs) is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n \"data-testid\": dataTestId,\n text,\n loadingText,\n color = \"primary\",\n size = \"md\",\n accessibilityLabel,\n disabled = false,\n loading = false,\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n tooltip,\n type = \"button\",\n }: ButtonProps,\n ref,\n ) => {\n const isHydrated = useIsHydrated();\n const { themeName } = useTheme();\n\n const foregroundColorClass =\n themeName === \"classic\"\n ? classicForegroundColor(classicColor(color))\n : cambioForegroundColor(cambioColor(color), on);\n\n const backgroundColorClass =\n themeName === \"classic\"\n ? classicBackgroundColor(classicColor(color))\n : cambioBackgroundColor(cambioColor(color), on);\n\n const disabledCambioPrimary =\n themeName === \"cambio\" && color === \"primary\" && disabled;\n\n return (\n <button\n data-testid={dataTestId}\n ref={ref}\n aria-label={accessibilityLabel}\n type={type}\n title={tooltip}\n disabled={!isHydrated || disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColorClass,\n backgroundColorClass,\n themeName === \"classic\" ? styles[size] : styles[`${size}Cambio`],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n [styles.secondaryBorder]:\n themeName === \"classic\" && color === \"secondary\",\n [styles.secondaryDestructiveBorder]:\n themeName === \"classic\" && color === \"destructive-secondary\",\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon\n className={classNames(\n styles.icon,\n iconSize[size],\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <Box paddingX={1}>\n <Typography\n size={\n themeName === \"classic\" ? textVariant[size] : textVariant[size]\n }\n >\n <span\n className={classNames(\n // Temporary - until we have cambio colors on Typography\n foregroundColorClass,\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n style={{ fontWeight: 500 }}\n >\n {loading ? loadingText : text}\n </span>\n </Typography>\n </Box>\n )}\n {!loading && EndIcon && (\n <EndIcon\n className={classNames(\n styles.icon,\n iconSize[size],\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColorClass)}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_9efd1_1\",\"buttonGap\":\"_buttonGap_9efd1_9\",\"disabledCambioPrimary\":\"_disabledCambioPrimary_9efd1_50\",\"fullWidth\":\"_fullWidth_9efd1_54\",\"sm\":\"_sm_9efd1_58\",\"md\":\"_md_9efd1_65\",\"lg\":\"_lg_9efd1_72\",\"smCambio\":\"_smCambio_9efd1_79\",\"mdCambio\":\"_mdCambio_9efd1_86\",\"lgCambio\":\"_lgCambio_9efd1_93\",\"icon\":\"_icon_9efd1_100\",\"smIcon\":\"_smIcon_9efd1_104\",\"mdIcon\":\"_mdIcon_9efd1_111\",\"lgIcon\":\"_lgIcon_9efd1_118\",\"secondaryBorder\":\"_secondaryBorder_9efd1_125\",\"secondaryDestructiveBorder\":\"_secondaryDestructiveBorder_9efd1_129\",\"loading\":\"_loading_9efd1_143\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_9efd1_1\",\"loadingCircle\":\"_loadingCircle_9efd1_147\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,kBAAkB;AAClC,OAAO,gBAAgB;;;ACDqE,IAAO,wBAAQ,EAAC,UAAS,mBAAkB,aAAY,sBAAqB,yBAAwB,mCAAkC,aAAY,uBAAsB,MAAK,gBAAe,MAAK,gBAAe,MAAK,gBAAe,YAAW,sBAAqB,YAAW,sBAAqB,YAAW,sBAAqB,QAAO,mBAAkB,UAAS,qBAAoB,UAAS,qBAAoB,UAAS,qBAAoB,mBAAkB,8BAA6B,8BAA6B,yCAAwC,WAAU,sBAAqB,6BAA4B,sCAAqC,iBAAgB,2BAA0B;;;ADwKxwB,SAwBI,KAxBJ;AAtCN,IAAM,SAAS;AAAA,EACb,CACE;AAAA,IACE,eAAe;AAAA,IACf;AAAA,IACA;AAAA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AAI,UAAU,GACb;AAAA,YAAC;AAAA;AAAA,cACC,MACE,cAAc,YAAY,oBAAY,IAAI,IAAI,oBAAY,IAAI;AAAA,cAGhE;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW;AAAA;AAAA,oBAET;AAAA,oBACA,yBAAyB,sBAAO;AAAA,kBAClC;AAAA,kBACA,OAAO,EAAE,YAAY,IAAI;AAAA,kBAExB,oBAAU,cAAc;AAAA;AAAA,cAC3B;AAAA;AAAA,UACF,GACF;AAAA,UAED,CAAC,WAAW,WACX;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT,sBAAO;AAAA,gBACP,iBAAS,IAAI;AAAA,gBACb,yBAAyB,sBAAO;AAAA,cAClC;AAAA;AAAA,UACF;AAAA,UAED,WACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,WAAW,sBAAO,SAAS,oBAAoB;AAAA,cAC1D,SAAQ;AAAA,cACR,OAAO,wBAAgB,IAAI;AAAA,cAC3B,QAAQ,wBAAgB,IAAI;AAAA,cAE5B;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW,sBAAO;AAAA,kBAClB,IAAG;AAAA,kBACH,IAAG;AAAA,kBACH,GAAE;AAAA,kBACF,MAAK;AAAA,kBACL,aAAY;AAAA;AAAA,cACd;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAErB,IAAO,iBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Tooltip/Tooltip.tsx","css-module:./Tooltip.module.css#css-module"],"names":["AriaTooltip","Tooltip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,kBAAqD;AACrE,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA,gBAAgB;AAAA,EAEhB,WAAW;AAAA,EACX,kBAAkB;AAAA,OAEb;AAKP,OAAO,gBAAgB;;;AC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,CAAC,UAAU,EAAE,YAAY,UAAU,MACjC,iCACE;AAAA,8BAAC,gBAAa;AAAA,UACd,oBAAC,sBAAW,MAAM,KAAK,OAAM,SAC1B,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA,UAAU;AAAA;AAAA,UACZ;AAAA,WACF;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ,CAAC;AAwDD,IAAM,UAAU,WAAyC,SAASC,SAChE,OACA,KACc;AACd,QAAM;AAAA,IACJ;AAAA,IACA,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,IAAI;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAa;AAAA,MACb;AAAA,MACA,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR;AAAA,MAGA;AAAA,4BAAC,uBAAa,UAAS;AAAA,QACvB;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,WAAW,2BAA2B,SAAS;AAAA,YAC/C,cAAY;AAAA,YACZ,eAAa;AAAA,YACb;AAAA,YAEC;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,kBAAQ","sourcesContent":["import React, { forwardRef, type ReactNode, type ReactElement } from \"react\";\nimport { mergeProps } from \"react-aria\";\nimport {\n composeRenderProps,\n OverlayArrow as ReactAriaOverlayArrow,\n type OverlayArrowProps as ReactAriaOverlayArrowProps,\n Tooltip as ReactAriaTooltip,\n TooltipTrigger as ReactAriaTooltipTrigger,\n type TooltipProps as ReactAriaTooltipProps,\n} from \"react-aria-components\";\n\nimport Triggerable from \"../react-aria-utils/Triggerable\";\nimport Typography from \"../Typography/Typography\";\nimport OverlayVisibility from \"../react-aria-utils/OverlayVisibility\";\nimport classNames from \"classnames\";\nimport boxStyles from \"../Box/Box.module.css\";\nimport paddingStyles from \"../Box/padding.module.css\";\nimport roundingStyles from \"../rounding.module.css\";\nimport colorStyles from \"../colors/colors.module.css\";\nimport styles from \"./Tooltip.module.css\";\nimport {\n type Placement,\n syntaxToReactAriaPlacement,\n} from \"../react-aria-utils/placement\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\nfunction TooltipArrow(props: ReactAriaOverlayArrowProps): ReactElement {\n return (\n <ReactAriaOverlayArrow {...props}>\n {({ placement }) => {\n if (placement === \"center\") return null;\n if (placement === \"left\") return null;\n if (placement === \"right\") return null;\n return (\n <div\n className={classNames([\n boxStyles.block,\n styles[`arrowPlacement${placement}`],\n ])}\n >\n <svg\n className={classNames([boxStyles.block])}\n width={40}\n height={5}\n viewBox=\"0 0 40 5\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M17 0L22 5H12L17 0Z\" fill=\"currentColor\" />\n </svg>\n </div>\n );\n }}\n </ReactAriaOverlayArrow>\n );\n}\n\n/**\n * AriaTooltip: This component extends Tooltip from react-aria-components\n * It applies syntax styles and adds aadditional props:\n * - onContentChangeVisibility\n */\nexport const AriaTooltip = forwardRef<\n HTMLDivElement,\n ReactAriaTooltipProps & {\n /** Optional handler for change of visibility for overlaid content, for analytics timing */\n onChangeContentVisibility?: (visible: boolean) => void;\n }\n>(function AriaTooltip(\n { children: childrenProp, onChangeContentVisibility, ...otherProps },\n ref,\n): ReactElement {\n const { themeName } = useTheme();\n const className = classNames([\n boxStyles.box,\n colorStyles.gray900Color,\n themeName === \"classic\"\n ? colorStyles.gray900BackgroundColor\n : colorStyles.cambioBlackBackgroundColor,\n paddingStyles.paddingX2,\n paddingStyles.paddingY2,\n themeName === \"classic\"\n ? roundingStyles.roundingsm\n : roundingStyles.roundingsmCambio,\n styles.tooltip,\n ]);\n return (\n <ReactAriaTooltip\n ref={ref}\n {...mergeProps(\n {\n className,\n offset: 8,\n crossOffset: 0,\n },\n otherProps,\n )}\n >\n {composeRenderProps(\n childrenProp,\n (children, { isEntering, isExiting }) => (\n <>\n <TooltipArrow />\n <Typography size={100} color=\"white\">\n {children}\n </Typography>\n <OverlayVisibility\n isEntering={isEntering}\n isExiting={isExiting}\n onChange={onChangeContentVisibility}\n />\n </>\n ),\n )}\n </ReactAriaTooltip>\n );\n});\n\ntype TooltipProps = {\n /**\n * Test id for the floating tooltip\n */\n \"data-testid\"?: string;\n /**\n * How long a user hovers before tooltip shows (in ms)\n * @defaultValue 0\n */\n delay?: number;\n /** Optional boolean to disable tooltip trigger behavior */\n disabled?: boolean;\n /** Optional aria-label for the tooltip (content element) */\n accessibilityLabel?: string;\n /** Required trigger element */\n children: ReactElement;\n /** Content to be shown inside the tooltip. */\n content: ReactNode;\n /** If set to true the tooltip will render initially open */\n initialOpen?: boolean;\n /** Optional handler for change of visibility for popover content, for analytics timing */\n onChangeContentVisibility?: (visible: boolean) => void;\n /** Optional handler for change of visibility for popover content, for control */\n onOpenChange?: (open: boolean) => void;\n /** Optional boolean to control open state of tooltip externally */\n open?: boolean;\n /**\n * Location of the tooltip content relative to anchor element\n * @defaultValue \"top-end\"\n */\n placement?: Placement;\n};\n/**\n * [Tooltip](https://cambly-syntax.vercel.app/?path=/docs/components-tooltip--docs) displays contextual information on hover or focus.\n *\n * Tooltip content is hidden by default and shown on hover or focus.\n * The content is hidden again when the user mouses out of the trigger element or blurs the trigger element or presses Escape\n *\n * Example Usage:\n ```\n <Tooltip\n delay={200}\n placement=\"bottom-start\"\n initialOpen\n content={(\n <Box padding={2}>\n ... some content goes here\n </Box>\n )}\n >\n <Button text=\"Trigger me\" />\n </Tooltip>\n ```\n */\nconst Tooltip = forwardRef<HTMLDivElement, TooltipProps>(function Tooltip(\n props,\n ref,\n): ReactElement {\n const {\n accessibilityLabel,\n \"data-testid\": dataTestId,\n delay = 0,\n disabled = false,\n children,\n content,\n initialOpen,\n onChangeContentVisibility,\n onOpenChange,\n open,\n placement = \"top\",\n } = props;\n\n return (\n <ReactAriaTooltipTrigger\n defaultOpen={initialOpen}\n delay={delay}\n closeDelay={500}\n isDisabled={disabled}\n isOpen={open}\n onOpenChange={onOpenChange}\n >\n {/* transfer focus handlers to child element if it is focusable */}\n <Triggerable>{children}</Triggerable>\n <AriaTooltip\n ref={ref}\n placement={syntaxToReactAriaPlacement(placement)}\n aria-label={accessibilityLabel}\n data-testid={dataTestId}\n onChangeContentVisibility={onChangeContentVisibility}\n >\n {content}\n </AriaTooltip>\n </ReactAriaTooltipTrigger>\n );\n});\n\nexport default Tooltip;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Tooltip/Tooltip.module.css\"; export default {\"tooltip\":\"_tooltip_11pyp_1\",\"arrowPlacementtop\":\"_arrowPlacementtop_11pyp_5\",\"arrowPlacementbottom\":\"_arrowPlacementbottom_11pyp_10\"}"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
// css-module:./colors.module.css#css-module
|
|
4
|
-
var colors_module_default = { "inheritColor": "_inheritColor_rzcwj_2", "destructive700Color": "_destructive700Color_rzcwj_6", "gray700Color": "_gray700Color_rzcwj_10", "gray900Color": "_gray900Color_rzcwj_14", "primary700Color": "_primary700Color_rzcwj_18", "success700Color": "_success700Color_rzcwj_22", "whiteColor": "_whiteColor_rzcwj_26", "blackBackgroundColor": "_blackBackgroundColor_rzcwj_31", "destructive100BackgroundColor": "_destructive100BackgroundColor_rzcwj_35", "destructive200BackgroundColor": "_destructive200BackgroundColor_rzcwj_39", "destructive300BackgroundColor": "_destructive300BackgroundColor_rzcwj_43", "destructive700BackgroundColor": "_destructive700BackgroundColor_rzcwj_47", "destructive800BackgroundColor": "_destructive800BackgroundColor_rzcwj_51", "destructive900BackgroundColor": "_destructive900BackgroundColor_rzcwj_55", "gray10BackgroundColor": "_gray10BackgroundColor_rzcwj_59", "gray30BackgroundColor": "_gray30BackgroundColor_rzcwj_63", "gray60BackgroundColor": "_gray60BackgroundColor_rzcwj_67", "gray80BackgroundColor": "_gray80BackgroundColor_rzcwj_71", "gray100BackgroundColor": "_gray100BackgroundColor_rzcwj_75", "gray200BackgroundColor": "_gray200BackgroundColor_rzcwj_79", "gray300BackgroundColor": "_gray300BackgroundColor_rzcwj_83", "gray700BackgroundColor": "_gray700BackgroundColor_rzcwj_87", "gray800BackgroundColor": "_gray800BackgroundColor_rzcwj_91", "gray900BackgroundColor": "_gray900BackgroundColor_rzcwj_95", "orange100BackgroundColor": "_orange100BackgroundColor_rzcwj_99", "orange200BackgroundColor": "_orange200BackgroundColor_rzcwj_103", "orange300BackgroundColor": "_orange300BackgroundColor_rzcwj_107", "orange700BackgroundColor": "_orange700BackgroundColor_rzcwj_111", "orange800BackgroundColor": "_orange800BackgroundColor_rzcwj_115", "orange900BackgroundColor": "_orange900BackgroundColor_rzcwj_119", "primary100BackgroundColor": "_primary100BackgroundColor_rzcwj_123", "primary200BackgroundColor": "_primary200BackgroundColor_rzcwj_127", "primary300BackgroundColor": "_primary300BackgroundColor_rzcwj_131", "primary700BackgroundColor": "_primary700BackgroundColor_rzcwj_135", "primary800BackgroundColor": "_primary800BackgroundColor_rzcwj_139", "primary900BackgroundColor": "_primary900BackgroundColor_rzcwj_143", "success100BackgroundColor": "_success100BackgroundColor_rzcwj_147", "success200BackgroundColor": "_success200BackgroundColor_rzcwj_151", "success300BackgroundColor": "_success300BackgroundColor_rzcwj_155", "success700BackgroundColor": "_success700BackgroundColor_rzcwj_159", "success800BackgroundColor": "_success800BackgroundColor_rzcwj_163", "success900BackgroundColor": "_success900BackgroundColor_rzcwj_167", "purple100BackgroundColor": "_purple100BackgroundColor_rzcwj_171", "purple200BackgroundColor": "_purple200BackgroundColor_rzcwj_175", "purple300BackgroundColor": "_purple300BackgroundColor_rzcwj_179", "purple700BackgroundColor": "_purple700BackgroundColor_rzcwj_183", "purple800BackgroundColor": "_purple800BackgroundColor_rzcwj_187", "purple900BackgroundColor": "_purple900BackgroundColor_rzcwj_191", "whiteBackgroundColor": "_whiteBackgroundColor_rzcwj_195", "yellow100BackgroundColor": "_yellow100BackgroundColor_rzcwj_199", "yellow200BackgroundColor": "_yellow200BackgroundColor_rzcwj_203", "yellow300BackgroundColor": "_yellow300BackgroundColor_rzcwj_207", "yellow700BackgroundColor": "_yellow700BackgroundColor_rzcwj_211", "yellow800BackgroundColor": "_yellow800BackgroundColor_rzcwj_215", "yellow900BackgroundColor": "_yellow900BackgroundColor_rzcwj_219", "cambioBlackColor": "_cambioBlackColor_rzcwj_224", "cambioWhiteColor": "_cambioWhiteColor_rzcwj_228", "cambioGray100Color": "_cambioGray100Color_rzcwj_232", "cambioGray200Color": "_cambioGray200Color_rzcwj_236", "cambioGray300Color": "_cambioGray300Color_rzcwj_240", "cambioGray370Color": "_cambioGray370Color_rzcwj_244", "cambioGray700Color": "_cambioGray700Color_rzcwj_248", "cambioGray800Color": "_cambioGray800Color_rzcwj_252", "cambioGray870Color": "_cambioGray870Color_rzcwj_256", "cambioGray900Color": "_cambioGray900Color_rzcwj_260", "cambioDestructive100Color": "_cambioDestructive100Color_rzcwj_264", "cambioDestructive300Color": "_cambioDestructive300Color_rzcwj_268", "cambioDestructive370Color": "_cambioDestructive370Color_rzcwj_272", "cambioDestructive700Color": "_cambioDestructive700Color_rzcwj_276", "cambioDestructive770Color": "_cambioDestructive770Color_rzcwj_280", "cambioDestructive900Color": "_cambioDestructive900Color_rzcwj_284", "cambioSuccess100Color": "_cambioSuccess100Color_rzcwj_288", "cambioSuccess300Color": "_cambioSuccess300Color_rzcwj_292", "cambioSuccess370Color": "_cambioSuccess370Color_rzcwj_296", "cambioSuccess700Color": "_cambioSuccess700Color_rzcwj_300", "cambioSuccess770Color": "_cambioSuccess770Color_rzcwj_304", "cambioSuccess900Color": "_cambioSuccess900Color_rzcwj_308", "cambioRedColor": "_cambioRedColor_rzcwj_312", "cambioOrangeColor": "_cambioOrangeColor_rzcwj_316", "cambioTanColor": "_cambioTanColor_rzcwj_320", "cambioCreamColor": "_cambioCreamColor_rzcwj_324", "cambioPurpleColor": "_cambioPurpleColor_rzcwj_328", "cambioLilacColor": "_cambioLilacColor_rzcwj_332", "cambioThistleColor": "_cambioThistleColor_rzcwj_336", "cambioPinkColor": "_cambioPinkColor_rzcwj_340", "cambioNavyColor": "_cambioNavyColor_rzcwj_344", "cambioTealColor": "_cambioTealColor_rzcwj_348", "cambioSlateColor": "_cambioSlateColor_rzcwj_352", "cambioSkyColor": "_cambioSkyColor_rzcwj_356", "cambioYellow700Color": "_cambioYellow700Color_rzcwj_360", "cambioTransparentFullBackgroundColor": "_cambioTransparentFullBackgroundColor_rzcwj_364", "cambioBlackBackgroundColor": "_cambioBlackBackgroundColor_rzcwj_368", "cambioWhiteBackgroundColor": "_cambioWhiteBackgroundColor_rzcwj_372", "cambioGray100BackgroundColor": "_cambioGray100BackgroundColor_rzcwj_376", "cambioGray200BackgroundColor": "_cambioGray200BackgroundColor_rzcwj_380", "cambioGray300BackgroundColor": "_cambioGray300BackgroundColor_rzcwj_384", "gray370BackgroundColor": "_gray370BackgroundColor_rzcwj_388", "cambioGray370BackgroundColor": "_cambioGray370BackgroundColor_rzcwj_392", "cambioGray700BackgroundColor": "_cambioGray700BackgroundColor_rzcwj_396", "cambioGray800BackgroundColor": "_cambioGray800BackgroundColor_rzcwj_400", "gray870BackgroundColor": "_gray870BackgroundColor_rzcwj_404", "cambioGray870BackgroundColor": "_cambioGray870BackgroundColor_rzcwj_408", "cambioGray900BackgroundColor": "_cambioGray900BackgroundColor_rzcwj_412", "cambioDestructive100BackgroundColor": "_cambioDestructive100BackgroundColor_rzcwj_416", "cambioDestructive300BackgroundColor": "_cambioDestructive300BackgroundColor_rzcwj_420", "cambioDestructive370BackgroundColor": "_cambioDestructive370BackgroundColor_rzcwj_424", "cambioDestructive700BackgroundColor": "_cambioDestructive700BackgroundColor_rzcwj_428", "cambioDestructive770BackgroundColor": "_cambioDestructive770BackgroundColor_rzcwj_432", "cambioDestructive900BackgroundColor": "_cambioDestructive900BackgroundColor_rzcwj_436", "cambioSuccess100BackgroundColor": "_cambioSuccess100BackgroundColor_rzcwj_440", "cambioSuccess300BackgroundColor": "_cambioSuccess300BackgroundColor_rzcwj_444", "cambioSuccess370BackgroundColor": "_cambioSuccess370BackgroundColor_rzcwj_448", "cambioSuccess700BackgroundColor": "_cambioSuccess700BackgroundColor_rzcwj_452", "cambioSuccess770BackgroundColor": "_cambioSuccess770BackgroundColor_rzcwj_456", "cambioSuccess900BackgroundColor": "_cambioSuccess900BackgroundColor_rzcwj_460", "redBackgroundColor": "_redBackgroundColor_rzcwj_464", "cambioRedBackgroundColor": "_cambioRedBackgroundColor_rzcwj_468", "orangeBackgroundColor": "_orangeBackgroundColor_rzcwj_472", "cambioOrangeBackgroundColor": "_cambioOrangeBackgroundColor_rzcwj_476", "tanBackgroundColor": "_tanBackgroundColor_rzcwj_480", "cambioTanBackgroundColor": "_cambioTanBackgroundColor_rzcwj_484", "creamBackgroundColor": "_creamBackgroundColor_rzcwj_488", "cambioCreamBackgroundColor": "_cambioCreamBackgroundColor_rzcwj_492", "purpleBackgroundColor": "_purpleBackgroundColor_rzcwj_496", "cambioPurpleBackgroundColor": "_cambioPurpleBackgroundColor_rzcwj_500", "lilacBackgroundColor": "_lilacBackgroundColor_rzcwj_504", "cambioLilacBackgroundColor": "_cambioLilacBackgroundColor_rzcwj_508", "thistleBackgroundColor": "_thistleBackgroundColor_rzcwj_512", "cambioThistleBackgroundColor": "_cambioThistleBackgroundColor_rzcwj_516", "pinkBackgroundColor": "_pinkBackgroundColor_rzcwj_520", "cambioPinkBackgroundColor": "_cambioPinkBackgroundColor_rzcwj_524", "navyBackgroundColor": "_navyBackgroundColor_rzcwj_528", "cambioNavyBackgroundColor": "_cambioNavyBackgroundColor_rzcwj_532", "tealBackgroundColor": "_tealBackgroundColor_rzcwj_536", "cambioTealBackgroundColor": "_cambioTealBackgroundColor_rzcwj_540", "slateBackgroundColor": "_slateBackgroundColor_rzcwj_544", "cambioSlateBackgroundColor": "_cambioSlateBackgroundColor_rzcwj_548", "skyBackgroundColor": "_skyBackgroundColor_rzcwj_552", "cambioSkyBackgroundColor": "_cambioSkyBackgroundColor_rzcwj_556", "cambioYellow700BackgroundColor": "_cambioYellow700BackgroundColor_rzcwj_560" };
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
colors_module_default
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=BXHT3UUW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["css-module:./colors.module.css#css-module"],"sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"inheritColor\":\"_inheritColor_rzcwj_2\",\"destructive700Color\":\"_destructive700Color_rzcwj_6\",\"gray700Color\":\"_gray700Color_rzcwj_10\",\"gray900Color\":\"_gray900Color_rzcwj_14\",\"primary700Color\":\"_primary700Color_rzcwj_18\",\"success700Color\":\"_success700Color_rzcwj_22\",\"whiteColor\":\"_whiteColor_rzcwj_26\",\"blackBackgroundColor\":\"_blackBackgroundColor_rzcwj_31\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_rzcwj_35\",\"destructive200BackgroundColor\":\"_destructive200BackgroundColor_rzcwj_39\",\"destructive300BackgroundColor\":\"_destructive300BackgroundColor_rzcwj_43\",\"destructive700BackgroundColor\":\"_destructive700BackgroundColor_rzcwj_47\",\"destructive800BackgroundColor\":\"_destructive800BackgroundColor_rzcwj_51\",\"destructive900BackgroundColor\":\"_destructive900BackgroundColor_rzcwj_55\",\"gray10BackgroundColor\":\"_gray10BackgroundColor_rzcwj_59\",\"gray30BackgroundColor\":\"_gray30BackgroundColor_rzcwj_63\",\"gray60BackgroundColor\":\"_gray60BackgroundColor_rzcwj_67\",\"gray80BackgroundColor\":\"_gray80BackgroundColor_rzcwj_71\",\"gray100BackgroundColor\":\"_gray100BackgroundColor_rzcwj_75\",\"gray200BackgroundColor\":\"_gray200BackgroundColor_rzcwj_79\",\"gray300BackgroundColor\":\"_gray300BackgroundColor_rzcwj_83\",\"gray700BackgroundColor\":\"_gray700BackgroundColor_rzcwj_87\",\"gray800BackgroundColor\":\"_gray800BackgroundColor_rzcwj_91\",\"gray900BackgroundColor\":\"_gray900BackgroundColor_rzcwj_95\",\"orange100BackgroundColor\":\"_orange100BackgroundColor_rzcwj_99\",\"orange200BackgroundColor\":\"_orange200BackgroundColor_rzcwj_103\",\"orange300BackgroundColor\":\"_orange300BackgroundColor_rzcwj_107\",\"orange700BackgroundColor\":\"_orange700BackgroundColor_rzcwj_111\",\"orange800BackgroundColor\":\"_orange800BackgroundColor_rzcwj_115\",\"orange900BackgroundColor\":\"_orange900BackgroundColor_rzcwj_119\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_rzcwj_123\",\"primary200BackgroundColor\":\"_primary200BackgroundColor_rzcwj_127\",\"primary300BackgroundColor\":\"_primary300BackgroundColor_rzcwj_131\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_rzcwj_135\",\"primary800BackgroundColor\":\"_primary800BackgroundColor_rzcwj_139\",\"primary900BackgroundColor\":\"_primary900BackgroundColor_rzcwj_143\",\"success100BackgroundColor\":\"_success100BackgroundColor_rzcwj_147\",\"success200BackgroundColor\":\"_success200BackgroundColor_rzcwj_151\",\"success300BackgroundColor\":\"_success300BackgroundColor_rzcwj_155\",\"success700BackgroundColor\":\"_success700BackgroundColor_rzcwj_159\",\"success800BackgroundColor\":\"_success800BackgroundColor_rzcwj_163\",\"success900BackgroundColor\":\"_success900BackgroundColor_rzcwj_167\",\"purple100BackgroundColor\":\"_purple100BackgroundColor_rzcwj_171\",\"purple200BackgroundColor\":\"_purple200BackgroundColor_rzcwj_175\",\"purple300BackgroundColor\":\"_purple300BackgroundColor_rzcwj_179\",\"purple700BackgroundColor\":\"_purple700BackgroundColor_rzcwj_183\",\"purple800BackgroundColor\":\"_purple800BackgroundColor_rzcwj_187\",\"purple900BackgroundColor\":\"_purple900BackgroundColor_rzcwj_191\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_rzcwj_195\",\"yellow100BackgroundColor\":\"_yellow100BackgroundColor_rzcwj_199\",\"yellow200BackgroundColor\":\"_yellow200BackgroundColor_rzcwj_203\",\"yellow300BackgroundColor\":\"_yellow300BackgroundColor_rzcwj_207\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_rzcwj_211\",\"yellow800BackgroundColor\":\"_yellow800BackgroundColor_rzcwj_215\",\"yellow900BackgroundColor\":\"_yellow900BackgroundColor_rzcwj_219\",\"cambioBlackColor\":\"_cambioBlackColor_rzcwj_224\",\"cambioWhiteColor\":\"_cambioWhiteColor_rzcwj_228\",\"cambioGray100Color\":\"_cambioGray100Color_rzcwj_232\",\"cambioGray200Color\":\"_cambioGray200Color_rzcwj_236\",\"cambioGray300Color\":\"_cambioGray300Color_rzcwj_240\",\"cambioGray370Color\":\"_cambioGray370Color_rzcwj_244\",\"cambioGray700Color\":\"_cambioGray700Color_rzcwj_248\",\"cambioGray800Color\":\"_cambioGray800Color_rzcwj_252\",\"cambioGray870Color\":\"_cambioGray870Color_rzcwj_256\",\"cambioGray900Color\":\"_cambioGray900Color_rzcwj_260\",\"cambioDestructive100Color\":\"_cambioDestructive100Color_rzcwj_264\",\"cambioDestructive300Color\":\"_cambioDestructive300Color_rzcwj_268\",\"cambioDestructive370Color\":\"_cambioDestructive370Color_rzcwj_272\",\"cambioDestructive700Color\":\"_cambioDestructive700Color_rzcwj_276\",\"cambioDestructive770Color\":\"_cambioDestructive770Color_rzcwj_280\",\"cambioDestructive900Color\":\"_cambioDestructive900Color_rzcwj_284\",\"cambioSuccess100Color\":\"_cambioSuccess100Color_rzcwj_288\",\"cambioSuccess300Color\":\"_cambioSuccess300Color_rzcwj_292\",\"cambioSuccess370Color\":\"_cambioSuccess370Color_rzcwj_296\",\"cambioSuccess700Color\":\"_cambioSuccess700Color_rzcwj_300\",\"cambioSuccess770Color\":\"_cambioSuccess770Color_rzcwj_304\",\"cambioSuccess900Color\":\"_cambioSuccess900Color_rzcwj_308\",\"cambioRedColor\":\"_cambioRedColor_rzcwj_312\",\"cambioOrangeColor\":\"_cambioOrangeColor_rzcwj_316\",\"cambioTanColor\":\"_cambioTanColor_rzcwj_320\",\"cambioCreamColor\":\"_cambioCreamColor_rzcwj_324\",\"cambioPurpleColor\":\"_cambioPurpleColor_rzcwj_328\",\"cambioLilacColor\":\"_cambioLilacColor_rzcwj_332\",\"cambioThistleColor\":\"_cambioThistleColor_rzcwj_336\",\"cambioPinkColor\":\"_cambioPinkColor_rzcwj_340\",\"cambioNavyColor\":\"_cambioNavyColor_rzcwj_344\",\"cambioTealColor\":\"_cambioTealColor_rzcwj_348\",\"cambioSlateColor\":\"_cambioSlateColor_rzcwj_352\",\"cambioSkyColor\":\"_cambioSkyColor_rzcwj_356\",\"cambioYellow700Color\":\"_cambioYellow700Color_rzcwj_360\",\"cambioTransparentFullBackgroundColor\":\"_cambioTransparentFullBackgroundColor_rzcwj_364\",\"cambioBlackBackgroundColor\":\"_cambioBlackBackgroundColor_rzcwj_368\",\"cambioWhiteBackgroundColor\":\"_cambioWhiteBackgroundColor_rzcwj_372\",\"cambioGray100BackgroundColor\":\"_cambioGray100BackgroundColor_rzcwj_376\",\"cambioGray200BackgroundColor\":\"_cambioGray200BackgroundColor_rzcwj_380\",\"cambioGray300BackgroundColor\":\"_cambioGray300BackgroundColor_rzcwj_384\",\"gray370BackgroundColor\":\"_gray370BackgroundColor_rzcwj_388\",\"cambioGray370BackgroundColor\":\"_cambioGray370BackgroundColor_rzcwj_392\",\"cambioGray700BackgroundColor\":\"_cambioGray700BackgroundColor_rzcwj_396\",\"cambioGray800BackgroundColor\":\"_cambioGray800BackgroundColor_rzcwj_400\",\"gray870BackgroundColor\":\"_gray870BackgroundColor_rzcwj_404\",\"cambioGray870BackgroundColor\":\"_cambioGray870BackgroundColor_rzcwj_408\",\"cambioGray900BackgroundColor\":\"_cambioGray900BackgroundColor_rzcwj_412\",\"cambioDestructive100BackgroundColor\":\"_cambioDestructive100BackgroundColor_rzcwj_416\",\"cambioDestructive300BackgroundColor\":\"_cambioDestructive300BackgroundColor_rzcwj_420\",\"cambioDestructive370BackgroundColor\":\"_cambioDestructive370BackgroundColor_rzcwj_424\",\"cambioDestructive700BackgroundColor\":\"_cambioDestructive700BackgroundColor_rzcwj_428\",\"cambioDestructive770BackgroundColor\":\"_cambioDestructive770BackgroundColor_rzcwj_432\",\"cambioDestructive900BackgroundColor\":\"_cambioDestructive900BackgroundColor_rzcwj_436\",\"cambioSuccess100BackgroundColor\":\"_cambioSuccess100BackgroundColor_rzcwj_440\",\"cambioSuccess300BackgroundColor\":\"_cambioSuccess300BackgroundColor_rzcwj_444\",\"cambioSuccess370BackgroundColor\":\"_cambioSuccess370BackgroundColor_rzcwj_448\",\"cambioSuccess700BackgroundColor\":\"_cambioSuccess700BackgroundColor_rzcwj_452\",\"cambioSuccess770BackgroundColor\":\"_cambioSuccess770BackgroundColor_rzcwj_456\",\"cambioSuccess900BackgroundColor\":\"_cambioSuccess900BackgroundColor_rzcwj_460\",\"redBackgroundColor\":\"_redBackgroundColor_rzcwj_464\",\"cambioRedBackgroundColor\":\"_cambioRedBackgroundColor_rzcwj_468\",\"orangeBackgroundColor\":\"_orangeBackgroundColor_rzcwj_472\",\"cambioOrangeBackgroundColor\":\"_cambioOrangeBackgroundColor_rzcwj_476\",\"tanBackgroundColor\":\"_tanBackgroundColor_rzcwj_480\",\"cambioTanBackgroundColor\":\"_cambioTanBackgroundColor_rzcwj_484\",\"creamBackgroundColor\":\"_creamBackgroundColor_rzcwj_488\",\"cambioCreamBackgroundColor\":\"_cambioCreamBackgroundColor_rzcwj_492\",\"purpleBackgroundColor\":\"_purpleBackgroundColor_rzcwj_496\",\"cambioPurpleBackgroundColor\":\"_cambioPurpleBackgroundColor_rzcwj_500\",\"lilacBackgroundColor\":\"_lilacBackgroundColor_rzcwj_504\",\"cambioLilacBackgroundColor\":\"_cambioLilacBackgroundColor_rzcwj_508\",\"thistleBackgroundColor\":\"_thistleBackgroundColor_rzcwj_512\",\"cambioThistleBackgroundColor\":\"_cambioThistleBackgroundColor_rzcwj_516\",\"pinkBackgroundColor\":\"_pinkBackgroundColor_rzcwj_520\",\"cambioPinkBackgroundColor\":\"_cambioPinkBackgroundColor_rzcwj_524\",\"navyBackgroundColor\":\"_navyBackgroundColor_rzcwj_528\",\"cambioNavyBackgroundColor\":\"_cambioNavyBackgroundColor_rzcwj_532\",\"tealBackgroundColor\":\"_tealBackgroundColor_rzcwj_536\",\"cambioTealBackgroundColor\":\"_cambioTealBackgroundColor_rzcwj_540\",\"slateBackgroundColor\":\"_slateBackgroundColor_rzcwj_544\",\"cambioSlateBackgroundColor\":\"_cambioSlateBackgroundColor_rzcwj_548\",\"skyBackgroundColor\":\"_skyBackgroundColor_rzcwj_552\",\"cambioSkyBackgroundColor\":\"_cambioSkyBackgroundColor_rzcwj_556\",\"cambioYellow700BackgroundColor\":\"_cambioYellow700BackgroundColor_rzcwj_560\"}"],"mappings":";;;AAA4F,IAAO,wBAAQ,EAAC,gBAAe,yBAAwB,uBAAsB,gCAA+B,gBAAe,0BAAyB,gBAAe,0BAAyB,mBAAkB,6BAA4B,mBAAkB,6BAA4B,cAAa,wBAAuB,wBAAuB,kCAAiC,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,4BAA2B,sCAAqC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA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;AAAA;AAAA,kBACC,QAAO;AAAA,kBACP,WAAU;AAAA,kBACV,UAAU;AAAA,kBACV,cAAc,SAAS,IAAI;AAAA,kBAE1B;AAAA;AAAA,cACH;AAAA,cACC,UACC;AAAA,gBAAC;AAAA;AAAA,kBACC,SAAQ;AAAA,kBACR,WAAU;AAAA,kBACV,KAAK;AAAA,kBACL,aAAY;AAAA,kBACZ,kBAAiB;AAAA,kBACjB,aAAY;AAAA,kBACZ,kBAAiB;AAAA,kBACjB,SAAS;AAAA,kBAER;AAAA;AAAA,cACH;AAAA,eAEJ;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF,GACF,GACF,GACF;AAEJ;AAEA,MAAM,cAAc","sourcesContent":["import { type ReactElement } from \"react\";\nimport classnames from \"classnames\";\n\nimport Heading from \"../Heading/Heading\";\nimport Box from \"../Box/Box\";\n\nimport FocusTrap from \"./FocusTrap\";\nimport StopScroll from \"./StopScroll\";\nimport Layer from \"./Layer\";\nimport styles from \"./Modal.module.css\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport IconButton from \"../IconButton/IconButton\";\n\nconst sizeWidth = {\n sm: 600,\n lg: 600,\n} as const;\n\nfunction XIconCambio({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n fill=\"currentColor\"\n focusable=\"false\"\n aria-hidden=\"true\"\n viewBox=\"0 0 24 24\"\n >\n <path d=\"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"></path>\n </svg>\n );\n}\n\n/**\n * [Modal](https://cambly-syntax.vercel.app/?path=/docs/components-modal--docs) is a dialog that appears on top of the main content and locks user interaction within the modal.\n *\n ```\n const [showModal, setShowModal] = useState(false)\n\n return (\n <>\n {showModal && <Modal\n header=\"header text\"\n onDismiss={() => setShowModal(false)}\n footer={\n <>\n <Button\n text=\"Cancel\"\n color=\"secondary\"\n onClick={() => {}}\n />\n <Button\n text=\"Confirm\"\n onClick={() => {}}\n />\n </>\n }\n >\n <Typography>\n Body text goes here!\n </Typography>\n </Modal> }\n </>\n )\n ```\n */\nexport default function Modal({\n header,\n children,\n image,\n onDismiss,\n footer,\n accessibilityCloseLabel = \"close modal\",\n size = \"sm\",\n zIndex = 1,\n \"data-testid\": dataTestId,\n}: {\n /**\n * The modal's main content. Should typically take in `Typography`'d text.\n */\n children: JSX.Element;\n /**\n * The header inside a modal as a string.\n */\n header: string;\n /**\n * What the X button (or clicking out of the modal area) does.\n * Typically used for closing the Modal\n */\n onDismiss: () => void;\n /**\n * The optional image rendered above the Modal.\n * Image\n * * Size should be 600w x 200h\n * * Be sure to set width=\"100%\" on the image\n * If images aren't that sized, should ask design to give another image.\n */\n image?: JSX.Element;\n /**\n * The footer for the bottom area of the Modal. Typically used for rendering buttons.\n * * Use Syntax `Button` and pass it into footer.\n * * If one button, just pass it in. If two, wrap in a React fragment (`<> </>`)\n * * If two(2) buttons, put primary button _second_.\n *\n <>\n <Button\n text=\"Cancel\"\n color=\"secondary\"\n onClick={() => {}}\n />\n <Button\n text=\"Confirm\"\n onClick={() => {}}\n />\n </>\n */\n footer?: JSX.Element;\n /**\n * The accessibilty text on the close button.\n * (Sets the aria-label of the button)\n *\n *\n * @defaultValue close modal\n */\n accessibilityCloseLabel?: string;\n /**\n * The size of the card\n * * `sm`: 600px (deprecated)\n * * `lg`: 600px\n *\n *\n * @defaultValue sm\n * @deprecated\n */\n size?: keyof typeof sizeWidth;\n /**\n * The z-index for the modal.\n * Typically used if there are other things on the page with higher z-index and you need this overlayed on top.\n *\n * @defaultValue 0\n */\n zIndex?: number;\n /**\n * Test id for the modal\n */\n \"data-testid\"?: string;\n}): ReactElement {\n const { themeName } = useTheme();\n return (\n <Layer zIndex={zIndex}>\n <StopScroll>\n <FocusTrap>\n <div\n className={classnames(\n styles.backdrop,\n themeName === \"classic\"\n ? styles.backdropClassic\n : styles.backdropCambio,\n )}\n role=\"presentation\"\n onClick={(e) => e.target === e.currentTarget && onDismiss()}\n onKeyDown={(e) => e.key === \"Escape\" && onDismiss()}\n >\n <Box\n data-testid={dataTestId}\n backgroundColor=\"white\"\n rounding=\"md\"\n display=\"flex\"\n marginStart={4}\n marginEnd={4}\n marginTop={8}\n marginBottom={8}\n minWidth={240}\n maxHeight=\"calc(100vh - 64px)\"\n maxWidth={sizeWidth[size]}\n overflow=\"hidden\"\n position=\"relative\"\n width=\"100%\"\n >\n <Box\n position=\"absolute\"\n dangerouslySetInlineStyle={{\n __style: { top: 4, right: 4 },\n }}\n >\n <IconButton\n accessibilityLabel={accessibilityCloseLabel}\n color={image ? \"primary\" : \"tertiary\"}\n on={image ? \"darkBackground\" : \"lightBackground\"}\n onClick={onDismiss}\n size=\"sm\"\n icon={XIconCambio}\n />\n </Box>\n\n <Box display=\"flex\" direction=\"column\" width=\"100%\">\n {image && <Box>{image}</Box>}\n <Box padding={6}>\n <Heading as=\"h1\" size={600} fontStyle=\"serif\">\n {header}\n </Heading>\n </Box>\n <Box\n height=\"100%\"\n overflowY=\"auto\"\n paddingX={6}\n marginBottom={footer ? 0 : 6}\n >\n {children}\n </Box>\n {footer && (\n <Box\n display=\"flex\"\n direction=\"column\"\n gap={3}\n smDirection=\"row\"\n smJustifyContent=\"end\"\n lgDirection=\"row\"\n lgJustifyContent=\"end\"\n padding={6}\n >\n {footer}\n </Box>\n )}\n </Box>\n </Box>\n </div>\n </FocusTrap>\n </StopScroll>\n </Layer>\n );\n}\n\nModal.displayName = \"Modal\";\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Modal/Modal.module.css\"; export default {\"backdrop\":\"_backdrop_9g2f1_1\",\"backdropClassic\":\"_backdropClassic_9g2f1_9\",\"backdropCambio\":\"_backdropCambio_9g2f1_13\",\"closeButton\":\"_closeButton_9g2f1_17\",\"closeButtonClassic\":\"_closeButtonClassic_9g2f1_32\",\"closeButtonWithImage\":\"_closeButtonWithImage_9g2f1_44\",\"closeButtonWithImageCambio\":\"_closeButtonWithImageCambio_9g2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AQ,wBAAgB,IAAI;AAAA,cAE5B;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW,sBAAO;AAAA,kBAClB,IAAG;AAAA,kBACH,IAAG;AAAA,kBACH,GAAE;AAAA,kBACF,MAAK;AAAA,kBACL,aAAY;AAAA;AAAA,cACd;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAErB,IAAO,iBAAQ","sourcesContent":["import React, { forwardRef } from \"react\";\nimport classNames from \"classnames\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport Box from \"../Box/Box\";\nimport iconSize from \"./constants/iconSize\";\nimport textVariant from \"./constants/textVariant\";\nimport loadingIconSize from \"./constants/loadingIconSize\";\nimport styles from \"./Button.module.css\";\nimport useIsHydrated from \"../useIsHydrated\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\nimport { classicColor, cambioColor } from \"./constants/color\";\nimport {\n classicBackgroundColor,\n cambioBackgroundColor,\n} from \"../colors/backgroundColor\";\nimport {\n classicForegroundColor,\n cambioForegroundColor,\n} from \"../colors/foregroundColor\";\n\ntype ButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The text to be displayed inside the button when it is in a loading state\n */\n loadingText?: string;\n /**\n * The color of the button\n *\n * Classic only:\n * * `inverse`\n * * `success`\n *\n * Cambio only:\n * * `success-primary`\n * * `success-secondary`\n * * `success-tertiary`\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\"\n | \"inverse\";\n /**\n * The size of the button\n *\n * Classic:\n * * `sm`: 32px\n * * `md`: 40px\n * * `lg`: 48px\n *\n * Cambio:\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * The label to be used for accessibility\n */\n accessibilityLabel?: string;\n /**\n * If `true`, the button will be disabled\n *\n * @defaultValue false\n */\n disabled?: boolean;\n /**\n * If `true`, the button will be in a loading state\n *\n * @defaultValue false\n */\n loading?: boolean;\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n startIcon?: React.ComponentType<{ className?: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n */\n endIcon?: React.ComponentType<{ className?: string }>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button (Cambio only)\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * The callback to be called when the button is clicked\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n /**\n * The tooltip to be displayed when the user hovers over the button\n */\n tooltip?: string;\n /**\n * The type you want to set for the primitive `<button/>`\n */\n type?: \"button\" | \"submit\" | \"reset\";\n};\n\n/**\n * [Button](https://cambly-syntax.vercel.app/?path=/docs/components-button--docs) is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n \"data-testid\": dataTestId,\n text,\n loadingText,\n color = \"primary\",\n size = \"md\",\n accessibilityLabel,\n disabled = false,\n loading = false,\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n tooltip,\n type = \"button\",\n }: ButtonProps,\n ref,\n ) => {\n const isHydrated = useIsHydrated();\n const { themeName } = useTheme();\n\n const foregroundColorClass =\n themeName === \"classic\"\n ? classicForegroundColor(classicColor(color))\n : cambioForegroundColor(cambioColor(color), on);\n\n const backgroundColorClass =\n themeName === \"classic\"\n ? classicBackgroundColor(classicColor(color))\n : cambioBackgroundColor(cambioColor(color), on);\n\n const disabledCambioPrimary =\n themeName === \"cambio\" && color === \"primary\" && disabled;\n\n return (\n <button\n data-testid={dataTestId}\n ref={ref}\n aria-label={accessibilityLabel}\n type={type}\n title={tooltip}\n disabled={!isHydrated || disabled || loading}\n onClick={onClick}\n className={classNames(\n styles.button,\n foregroundColorClass,\n backgroundColorClass,\n themeName === \"classic\" ? styles[size] : styles[`${size}Cambio`],\n {\n [styles.fullWidth]: fullWidth,\n [styles.buttonGap]: size === \"lg\" || size === \"md\",\n [styles.secondaryBorder]:\n themeName === \"classic\" && color === \"secondary\",\n [styles.secondaryDestructiveBorder]:\n themeName === \"classic\" && color === \"destructive-secondary\",\n },\n )}\n >\n {!loading && StartIcon && (\n <StartIcon\n className={classNames(\n styles.icon,\n iconSize[size],\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n />\n )}\n {((loading && loadingText) || (!loading && text)) && (\n <Box paddingX={1}>\n <Typography\n size={\n themeName === \"classic\" ? textVariant[size] : textVariant[size]\n }\n >\n <span\n className={classNames(\n // Temporary - until we have cambio colors on Typography\n foregroundColorClass,\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n style={{ fontWeight: 500 }}\n >\n {loading ? loadingText : text}\n </span>\n </Typography>\n </Box>\n )}\n {!loading && EndIcon && (\n <EndIcon\n className={classNames(\n styles.icon,\n iconSize[size],\n disabledCambioPrimary && styles.disabledCambioPrimary,\n )}\n />\n )}\n {loading && (\n <svg\n className={classNames(styles.loading, foregroundColorClass)}\n viewBox=\"22 22 44 44\"\n width={loadingIconSize[size]}\n height={loadingIconSize[size]}\n >\n <circle\n className={styles.loadingCircle}\n cx=\"44\"\n cy=\"44\"\n r=\"20.2\"\n fill=\"none\"\n strokeWidth=\"3.6\"\n />\n </svg>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = \"Button\";\n\nexport default Button;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/Button/Button.module.css\"; export default {\"button\":\"_button_9efd1_1\",\"buttonGap\":\"_buttonGap_9efd1_9\",\"disabledCambioPrimary\":\"_disabledCambioPrimary_9efd1_50\",\"fullWidth\":\"_fullWidth_9efd1_54\",\"sm\":\"_sm_9efd1_58\",\"md\":\"_md_9efd1_65\",\"lg\":\"_lg_9efd1_72\",\"smCambio\":\"_smCambio_9efd1_79\",\"mdCambio\":\"_mdCambio_9efd1_86\",\"lgCambio\":\"_lgCambio_9efd1_93\",\"icon\":\"_icon_9efd1_100\",\"smIcon\":\"_smIcon_9efd1_104\",\"mdIcon\":\"_mdIcon_9efd1_111\",\"lgIcon\":\"_lgIcon_9efd1_118\",\"secondaryBorder\":\"_secondaryBorder_9efd1_125\",\"secondaryDestructiveBorder\":\"_secondaryDestructiveBorder_9efd1_129\",\"loading\":\"_loading_9efd1_143\",\"syntaxButtonLoadingRotate\":\"_syntaxButtonLoadingRotate_9efd1_1\",\"loadingCircle\":\"_loadingCircle_9efd1_147\"}"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client"
|
|
2
|
-
|
|
3
|
-
// css-module:./colors.module.css#css-module
|
|
4
|
-
var colors_module_default = { "inheritColor": "_inheritColor_rzcwj_2", "destructive700Color": "_destructive700Color_rzcwj_6", "gray700Color": "_gray700Color_rzcwj_10", "gray900Color": "_gray900Color_rzcwj_14", "primary700Color": "_primary700Color_rzcwj_18", "success700Color": "_success700Color_rzcwj_22", "whiteColor": "_whiteColor_rzcwj_26", "blackBackgroundColor": "_blackBackgroundColor_rzcwj_31", "destructive100BackgroundColor": "_destructive100BackgroundColor_rzcwj_35", "destructive200BackgroundColor": "_destructive200BackgroundColor_rzcwj_39", "destructive300BackgroundColor": "_destructive300BackgroundColor_rzcwj_43", "destructive700BackgroundColor": "_destructive700BackgroundColor_rzcwj_47", "destructive800BackgroundColor": "_destructive800BackgroundColor_rzcwj_51", "destructive900BackgroundColor": "_destructive900BackgroundColor_rzcwj_55", "gray10BackgroundColor": "_gray10BackgroundColor_rzcwj_59", "gray30BackgroundColor": "_gray30BackgroundColor_rzcwj_63", "gray60BackgroundColor": "_gray60BackgroundColor_rzcwj_67", "gray80BackgroundColor": "_gray80BackgroundColor_rzcwj_71", "gray100BackgroundColor": "_gray100BackgroundColor_rzcwj_75", "gray200BackgroundColor": "_gray200BackgroundColor_rzcwj_79", "gray300BackgroundColor": "_gray300BackgroundColor_rzcwj_83", "gray700BackgroundColor": "_gray700BackgroundColor_rzcwj_87", "gray800BackgroundColor": "_gray800BackgroundColor_rzcwj_91", "gray900BackgroundColor": "_gray900BackgroundColor_rzcwj_95", "orange100BackgroundColor": "_orange100BackgroundColor_rzcwj_99", "orange200BackgroundColor": "_orange200BackgroundColor_rzcwj_103", "orange300BackgroundColor": "_orange300BackgroundColor_rzcwj_107", "orange700BackgroundColor": "_orange700BackgroundColor_rzcwj_111", "orange800BackgroundColor": "_orange800BackgroundColor_rzcwj_115", "orange900BackgroundColor": "_orange900BackgroundColor_rzcwj_119", "primary100BackgroundColor": "_primary100BackgroundColor_rzcwj_123", "primary200BackgroundColor": "_primary200BackgroundColor_rzcwj_127", "primary300BackgroundColor": "_primary300BackgroundColor_rzcwj_131", "primary700BackgroundColor": "_primary700BackgroundColor_rzcwj_135", "primary800BackgroundColor": "_primary800BackgroundColor_rzcwj_139", "primary900BackgroundColor": "_primary900BackgroundColor_rzcwj_143", "success100BackgroundColor": "_success100BackgroundColor_rzcwj_147", "success200BackgroundColor": "_success200BackgroundColor_rzcwj_151", "success300BackgroundColor": "_success300BackgroundColor_rzcwj_155", "success700BackgroundColor": "_success700BackgroundColor_rzcwj_159", "success800BackgroundColor": "_success800BackgroundColor_rzcwj_163", "success900BackgroundColor": "_success900BackgroundColor_rzcwj_167", "purple100BackgroundColor": "_purple100BackgroundColor_rzcwj_171", "purple200BackgroundColor": "_purple200BackgroundColor_rzcwj_175", "purple300BackgroundColor": "_purple300BackgroundColor_rzcwj_179", "purple700BackgroundColor": "_purple700BackgroundColor_rzcwj_183", "purple800BackgroundColor": "_purple800BackgroundColor_rzcwj_187", "purple900BackgroundColor": "_purple900BackgroundColor_rzcwj_191", "whiteBackgroundColor": "_whiteBackgroundColor_rzcwj_195", "yellow100BackgroundColor": "_yellow100BackgroundColor_rzcwj_199", "yellow200BackgroundColor": "_yellow200BackgroundColor_rzcwj_203", "yellow300BackgroundColor": "_yellow300BackgroundColor_rzcwj_207", "yellow700BackgroundColor": "_yellow700BackgroundColor_rzcwj_211", "yellow800BackgroundColor": "_yellow800BackgroundColor_rzcwj_215", "yellow900BackgroundColor": "_yellow900BackgroundColor_rzcwj_219", "cambioBlackColor": "_cambioBlackColor_rzcwj_224", "cambioWhiteColor": "_cambioWhiteColor_rzcwj_228", "cambioGray100Color": "_cambioGray100Color_rzcwj_232", "cambioGray200Color": "_cambioGray200Color_rzcwj_236", "cambioGray300Color": "_cambioGray300Color_rzcwj_240", "cambioGray370Color": "_cambioGray370Color_rzcwj_244", "cambioGray700Color": "_cambioGray700Color_rzcwj_248", "cambioGray800Color": "_cambioGray800Color_rzcwj_252", "cambioGray870Color": "_cambioGray870Color_rzcwj_256", "cambioGray900Color": "_cambioGray900Color_rzcwj_260", "cambioDestructive100Color": "_cambioDestructive100Color_rzcwj_264", "cambioDestructive300Color": "_cambioDestructive300Color_rzcwj_268", "cambioDestructive370Color": "_cambioDestructive370Color_rzcwj_272", "cambioDestructive700Color": "_cambioDestructive700Color_rzcwj_276", "cambioDestructive770Color": "_cambioDestructive770Color_rzcwj_280", "cambioDestructive900Color": "_cambioDestructive900Color_rzcwj_284", "cambioSuccess100Color": "_cambioSuccess100Color_rzcwj_288", "cambioSuccess300Color": "_cambioSuccess300Color_rzcwj_292", "cambioSuccess370Color": "_cambioSuccess370Color_rzcwj_296", "cambioSuccess700Color": "_cambioSuccess700Color_rzcwj_300", "cambioSuccess770Color": "_cambioSuccess770Color_rzcwj_304", "cambioSuccess900Color": "_cambioSuccess900Color_rzcwj_308", "cambioRedColor": "_cambioRedColor_rzcwj_312", "cambioOrangeColor": "_cambioOrangeColor_rzcwj_316", "cambioTanColor": "_cambioTanColor_rzcwj_320", "cambioCreamColor": "_cambioCreamColor_rzcwj_324", "cambioPurpleColor": "_cambioPurpleColor_rzcwj_328", "cambioLilacColor": "_cambioLilacColor_rzcwj_332", "cambioThistleColor": "_cambioThistleColor_rzcwj_336", "cambioPinkColor": "_cambioPinkColor_rzcwj_340", "cambioNavyColor": "_cambioNavyColor_rzcwj_344", "cambioTealColor": "_cambioTealColor_rzcwj_348", "cambioSlateColor": "_cambioSlateColor_rzcwj_352", "cambioSkyColor": "_cambioSkyColor_rzcwj_356", "cambioYellow700Color": "_cambioYellow700Color_rzcwj_360", "cambioTransparentFullBackgroundColor": "_cambioTransparentFullBackgroundColor_rzcwj_364", "cambioBlackBackgroundColor": "_cambioBlackBackgroundColor_rzcwj_368", "cambioWhiteBackgroundColor": "_cambioWhiteBackgroundColor_rzcwj_372", "cambioGray100BackgroundColor": "_cambioGray100BackgroundColor_rzcwj_376", "cambioGray200BackgroundColor": "_cambioGray200BackgroundColor_rzcwj_380", "cambioGray300BackgroundColor": "_cambioGray300BackgroundColor_rzcwj_384", "gray370BackgroundColor": "_gray370BackgroundColor_rzcwj_388", "cambioGray370BackgroundColor": "_cambioGray370BackgroundColor_rzcwj_392", "cambioGray700BackgroundColor": "_cambioGray700BackgroundColor_rzcwj_396", "cambioGray800BackgroundColor": "_cambioGray800BackgroundColor_rzcwj_400", "gray870BackgroundColor": "_gray870BackgroundColor_rzcwj_404", "cambioGray870BackgroundColor": "_cambioGray870BackgroundColor_rzcwj_408", "cambioGray900BackgroundColor": "_cambioGray900BackgroundColor_rzcwj_412", "cambioDestructive100BackgroundColor": "_cambioDestructive100BackgroundColor_rzcwj_416", "cambioDestructive300BackgroundColor": "_cambioDestructive300BackgroundColor_rzcwj_420", "cambioDestructive370BackgroundColor": "_cambioDestructive370BackgroundColor_rzcwj_424", "cambioDestructive700BackgroundColor": "_cambioDestructive700BackgroundColor_rzcwj_428", "cambioDestructive770BackgroundColor": "_cambioDestructive770BackgroundColor_rzcwj_432", "cambioDestructive900BackgroundColor": "_cambioDestructive900BackgroundColor_rzcwj_436", "cambioSuccess100BackgroundColor": "_cambioSuccess100BackgroundColor_rzcwj_440", "cambioSuccess300BackgroundColor": "_cambioSuccess300BackgroundColor_rzcwj_444", "cambioSuccess370BackgroundColor": "_cambioSuccess370BackgroundColor_rzcwj_448", "cambioSuccess700BackgroundColor": "_cambioSuccess700BackgroundColor_rzcwj_452", "cambioSuccess770BackgroundColor": "_cambioSuccess770BackgroundColor_rzcwj_456", "cambioSuccess900BackgroundColor": "_cambioSuccess900BackgroundColor_rzcwj_460", "redBackgroundColor": "_redBackgroundColor_rzcwj_464", "cambioRedBackgroundColor": "_cambioRedBackgroundColor_rzcwj_468", "orangeBackgroundColor": "_orangeBackgroundColor_rzcwj_472", "cambioOrangeBackgroundColor": "_cambioOrangeBackgroundColor_rzcwj_476", "tanBackgroundColor": "_tanBackgroundColor_rzcwj_480", "cambioTanBackgroundColor": "_cambioTanBackgroundColor_rzcwj_484", "creamBackgroundColor": "_creamBackgroundColor_rzcwj_488", "cambioCreamBackgroundColor": "_cambioCreamBackgroundColor_rzcwj_492", "purpleBackgroundColor": "_purpleBackgroundColor_rzcwj_496", "cambioPurpleBackgroundColor": "_cambioPurpleBackgroundColor_rzcwj_500", "lilacBackgroundColor": "_lilacBackgroundColor_rzcwj_504", "cambioLilacBackgroundColor": "_cambioLilacBackgroundColor_rzcwj_508", "thistleBackgroundColor": "_thistleBackgroundColor_rzcwj_512", "cambioThistleBackgroundColor": "_cambioThistleBackgroundColor_rzcwj_516", "pinkBackgroundColor": "_pinkBackgroundColor_rzcwj_520", "cambioPinkBackgroundColor": "_cambioPinkBackgroundColor_rzcwj_524", "navyBackgroundColor": "_navyBackgroundColor_rzcwj_528", "cambioNavyBackgroundColor": "_cambioNavyBackgroundColor_rzcwj_532", "tealBackgroundColor": "_tealBackgroundColor_rzcwj_536", "cambioTealBackgroundColor": "_cambioTealBackgroundColor_rzcwj_540", "slateBackgroundColor": "_slateBackgroundColor_rzcwj_544", "cambioSlateBackgroundColor": "_cambioSlateBackgroundColor_rzcwj_548", "skyBackgroundColor": "_skyBackgroundColor_rzcwj_552", "cambioSkyBackgroundColor": "_cambioSkyBackgroundColor_rzcwj_556", "cambioYellow700BackgroundColor": "_cambioYellow700BackgroundColor_rzcwj_560" };
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.colors_module_default = colors_module_default;
|
|
9
|
-
//# sourceMappingURL=DTKTTGU5.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["css-module:./colors.module.css#css-module"],"names":[],"mappings":";;;AAA4F,IAAO,wBAAQ,EAAC,gBAAe,yBAAwB,uBAAsB,gCAA+B,gBAAe,0BAAyB,gBAAe,0BAAyB,mBAAkB,6BAA4B,mBAAkB,6BAA4B,cAAa,wBAAuB,wBAAuB,kCAAiC,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,iCAAgC,2CAA0C,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,yBAAwB,mCAAkC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,0BAAyB,oCAAmC,4BAA2B,sCAAqC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,4BAA2B,uCAAsC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,wCAAuC,6BAA4B,w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A6C,mCAAkC,8CAA6C,sBAAqB,iCAAgC,4BAA2B,uCAAsC,yBAAwB,oCAAmC,+BAA8B,0CAAyC,sBAAqB,iCAAgC,4BAA2B,uCAAsC,wBAAuB,mCAAkC,8BAA6B,yCAAwC,yBAAwB,oCAAmC,+BAA8B,0CAAyC,wBAAuB,mCAAkC,8BAA6B,yCAAwC,0BAAyB,qCAAoC,gCAA+B,2CAA0C,uBAAsB,kCAAiC,6BAA4B,wCAAuC,uBAAsB,kCAAiC,6BAA4B,wCAAuC,uBAAsB,kCAAiC,6BAA4B,wCAAuC,wBAAuB,mCAAkC,8BAA6B,yCAAwC,sBAAqB,iCAAgC,4BAA2B,uCAAsC,kCAAiC,4CAA2C","sourcesContent":["import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/colors/colors.module.css\"; export default {\"inheritColor\":\"_inheritColor_rzcwj_2\",\"destructive700Color\":\"_destructive700Color_rzcwj_6\",\"gray700Color\":\"_gray700Color_rzcwj_10\",\"gray900Color\":\"_gray900Color_rzcwj_14\",\"primary700Color\":\"_primary700Color_rzcwj_18\",\"success700Color\":\"_success700Color_rzcwj_22\",\"whiteColor\":\"_whiteColor_rzcwj_26\",\"blackBackgroundColor\":\"_blackBackgroundColor_rzcwj_31\",\"destructive100BackgroundColor\":\"_destructive100BackgroundColor_rzcwj_35\",\"destructive200BackgroundColor\":\"_destructive200BackgroundColor_rzcwj_39\",\"destructive300BackgroundColor\":\"_destructive300BackgroundColor_rzcwj_43\",\"destructive700BackgroundColor\":\"_destructive700BackgroundColor_rzcwj_47\",\"destructive800BackgroundColor\":\"_destructive800BackgroundColor_rzcwj_51\",\"destructive900BackgroundColor\":\"_destructive900BackgroundColor_rzcwj_55\",\"gray10BackgroundColor\":\"_gray10BackgroundColor_rzcwj_59\",\"gray30BackgroundColor\":\"_gray30BackgroundColor_rzcwj_63\",\"gray60BackgroundColor\":\"_gray60BackgroundColor_rzcwj_67\",\"gray80BackgroundColor\":\"_gray80BackgroundColor_rzcwj_71\",\"gray100BackgroundColor\":\"_gray100BackgroundColor_rzcwj_75\",\"gray200BackgroundColor\":\"_gray200BackgroundColor_rzcwj_79\",\"gray300BackgroundColor\":\"_gray300BackgroundColor_rzcwj_83\",\"gray700BackgroundColor\":\"_gray700BackgroundColor_rzcwj_87\",\"gray800BackgroundColor\":\"_gray800BackgroundColor_rzcwj_91\",\"gray900BackgroundColor\":\"_gray900BackgroundColor_rzcwj_95\",\"orange100BackgroundColor\":\"_orange100BackgroundColor_rzcwj_99\",\"orange200BackgroundColor\":\"_orange200BackgroundColor_rzcwj_103\",\"orange300BackgroundColor\":\"_orange300BackgroundColor_rzcwj_107\",\"orange700BackgroundColor\":\"_orange700BackgroundColor_rzcwj_111\",\"orange800BackgroundColor\":\"_orange800BackgroundColor_rzcwj_115\",\"orange900BackgroundColor\":\"_orange900BackgroundColor_rzcwj_119\",\"primary100BackgroundColor\":\"_primary100BackgroundColor_rzcwj_123\",\"primary200BackgroundColor\":\"_primary200BackgroundColor_rzcwj_127\",\"primary300BackgroundColor\":\"_primary300BackgroundColor_rzcwj_131\",\"primary700BackgroundColor\":\"_primary700BackgroundColor_rzcwj_135\",\"primary800BackgroundColor\":\"_primary800BackgroundColor_rzcwj_139\",\"primary900BackgroundColor\":\"_primary900BackgroundColor_rzcwj_143\",\"success100BackgroundColor\":\"_success100BackgroundColor_rzcwj_147\",\"success200BackgroundColor\":\"_success200BackgroundColor_rzcwj_151\",\"success300BackgroundColor\":\"_success300BackgroundColor_rzcwj_155\",\"success700BackgroundColor\":\"_success700BackgroundColor_rzcwj_159\",\"success800BackgroundColor\":\"_success800BackgroundColor_rzcwj_163\",\"success900BackgroundColor\":\"_success900BackgroundColor_rzcwj_167\",\"purple100BackgroundColor\":\"_purple100BackgroundColor_rzcwj_171\",\"purple200BackgroundColor\":\"_purple200BackgroundColor_rzcwj_175\",\"purple300BackgroundColor\":\"_purple300BackgroundColor_rzcwj_179\",\"purple700BackgroundColor\":\"_purple700BackgroundColor_rzcwj_183\",\"purple800BackgroundColor\":\"_purple800BackgroundColor_rzcwj_187\",\"purple900BackgroundColor\":\"_purple900BackgroundColor_rzcwj_191\",\"whiteBackgroundColor\":\"_whiteBackgroundColor_rzcwj_195\",\"yellow100BackgroundColor\":\"_yellow100BackgroundColor_rzcwj_199\",\"yellow200BackgroundColor\":\"_yellow200BackgroundColor_rzcwj_203\",\"yellow300BackgroundColor\":\"_yellow300BackgroundColor_rzcwj_207\",\"yellow700BackgroundColor\":\"_yellow700BackgroundColor_rzcwj_211\",\"yellow800BackgroundColor\":\"_yellow800BackgroundColor_rzcwj_215\",\"yellow900BackgroundColor\":\"_yellow900BackgroundColor_rzcwj_219\",\"cambioBlackColor\":\"_cambioBlackColor_rzcwj_224\",\"cambioWhiteColor\":\"_cambioWhiteColor_rzcwj_228\",\"cambioGray100Color\":\"_cambioGray100Color_rzcwj_232\",\"cambioGray200Color\":\"_cambioGray200Color_rzcwj_236\",\"cambioGray300Color\":\"_cambioGray300Color_rzcwj_240\",\"cambioGray370Color\":\"_cambioGray370Color_rzcwj_244\",\"cambioGray700Color\":\"_cambioGray700Color_rzcwj_248\",\"cambioGray800Color\":\"_cambioGray800Color_rzcwj_252\",\"cambioGray870Color\":\"_cambioGray870Color_rzcwj_256\",\"cambioGray900Color\":\"_cambioGray900Color_rzcwj_260\",\"cambioDestructive100Color\":\"_cambioDestructive100Color_rzcwj_264\",\"cambioDestructive300Color\":\"_cambioDestructive300Color_rzcwj_268\",\"cambioDestructive370Color\":\"_cambioDestructive370Color_rzcwj_272\",\"cambioDestructive700Color\":\"_cambioDestructive700Color_rzcwj_276\",\"cambioDestructive770Color\":\"_cambioDestructive770Color_rzcwj_280\",\"cambioDestructive900Color\":\"_cambioDestructive900Color_rzcwj_284\",\"cambioSuccess100Color\":\"_cambioSuccess100Color_rzcwj_288\",\"cambioSuccess300Color\":\"_cambioSuccess300Color_rzcwj_292\",\"cambioSuccess370Color\":\"_cambioSuccess370Color_rzcwj_296\",\"cambioSuccess700Color\":\"_cambioSuccess700Color_rzcwj_300\",\"cambioSuccess770Color\":\"_cambioSuccess770Color_rzcwj_304\",\"cambioSuccess900Color\":\"_cambioSuccess900Color_rzcwj_308\",\"cambioRedColor\":\"_cambioRedColor_rzcwj_312\",\"cambioOrangeColor\":\"_cambioOrangeColor_rzcwj_316\",\"cambioTanColor\":\"_cambioTanColor_rzcwj_320\",\"cambioCreamColor\":\"_cambioCreamColor_rzcwj_324\",\"cambioPurpleColor\":\"_cambioPurpleColor_rzcwj_328\",\"cambioLilacColor\":\"_cambioLilacColor_rzcwj_332\",\"cambioThistleColor\":\"_cambioThistleColor_rzcwj_336\",\"cambioPinkColor\":\"_cambioPinkColor_rzcwj_340\",\"cambioNavyColor\":\"_cambioNavyColor_rzcwj_344\",\"cambioTealColor\":\"_cambioTealColor_rzcwj_348\",\"cambioSlateColor\":\"_cambioSlateColor_rzcwj_352\",\"cambioSkyColor\":\"_cambioSkyColor_rzcwj_356\",\"cambioYellow700Color\":\"_cambioYellow700Color_rzcwj_360\",\"cambioTransparentFullBackgroundColor\":\"_cambioTransparentFullBackgroundColor_rzcwj_364\",\"cambioBlackBackgroundColor\":\"_cambioBlackBackgroundColor_rzcwj_368\",\"cambioWhiteBackgroundColor\":\"_cambioWhiteBackgroundColor_rzcwj_372\",\"cambioGray100BackgroundColor\":\"_cambioGray100BackgroundColor_rzcwj_376\",\"cambioGray200BackgroundColor\":\"_cambioGray200BackgroundColor_rzcwj_380\",\"cambioGray300BackgroundColor\":\"_cambioGray300BackgroundColor_rzcwj_384\",\"gray370BackgroundColor\":\"_gray370BackgroundColor_rzcwj_388\",\"cambioGray370BackgroundColor\":\"_cambioGray370BackgroundColor_rzcwj_392\",\"cambioGray700BackgroundColor\":\"_cambioGray700BackgroundColor_rzcwj_396\",\"cambioGray800BackgroundColor\":\"_cambioGray800BackgroundColor_rzcwj_400\",\"gray870BackgroundColor\":\"_gray870BackgroundColor_rzcwj_404\",\"cambioGray870BackgroundColor\":\"_cambioGray870BackgroundColor_rzcwj_408\",\"cambioGray900BackgroundColor\":\"_cambioGray900BackgroundColor_rzcwj_412\",\"cambioDestructive100BackgroundColor\":\"_cambioDestructive100BackgroundColor_rzcwj_416\",\"cambioDestructive300BackgroundColor\":\"_cambioDestructive300BackgroundColor_rzcwj_420\",\"cambioDestructive370BackgroundColor\":\"_cambioDestructive370BackgroundColor_rzcwj_424\",\"cambioDestructive700BackgroundColor\":\"_cambioDestructive700BackgroundColor_rzcwj_428\",\"cambioDestructive770BackgroundColor\":\"_cambioDestructive770BackgroundColor_rzcwj_432\",\"cambioDestructive900BackgroundColor\":\"_cambioDestructive900BackgroundColor_rzcwj_436\",\"cambioSuccess100BackgroundColor\":\"_cambioSuccess100BackgroundColor_rzcwj_440\",\"cambioSuccess300BackgroundColor\":\"_cambioSuccess300BackgroundColor_rzcwj_444\",\"cambioSuccess370BackgroundColor\":\"_cambioSuccess370BackgroundColor_rzcwj_448\",\"cambioSuccess700BackgroundColor\":\"_cambioSuccess700BackgroundColor_rzcwj_452\",\"cambioSuccess770BackgroundColor\":\"_cambioSuccess770BackgroundColor_rzcwj_456\",\"cambioSuccess900BackgroundColor\":\"_cambioSuccess900BackgroundColor_rzcwj_460\",\"redBackgroundColor\":\"_redBackgroundColor_rzcwj_464\",\"cambioRedBackgroundColor\":\"_cambioRedBackgroundColor_rzcwj_468\",\"orangeBackgroundColor\":\"_orangeBackgroundColor_rzcwj_472\",\"cambioOrangeBackgroundColor\":\"_cambioOrangeBackgroundColor_rzcwj_476\",\"tanBackgroundColor\":\"_tanBackgroundColor_rzcwj_480\",\"cambioTanBackgroundColor\":\"_cambioTanBackgroundColor_rzcwj_484\",\"creamBackgroundColor\":\"_creamBackgroundColor_rzcwj_488\",\"cambioCreamBackgroundColor\":\"_cambioCreamBackgroundColor_rzcwj_492\",\"purpleBackgroundColor\":\"_purpleBackgroundColor_rzcwj_496\",\"cambioPurpleBackgroundColor\":\"_cambioPurpleBackgroundColor_rzcwj_500\",\"lilacBackgroundColor\":\"_lilacBackgroundColor_rzcwj_504\",\"cambioLilacBackgroundColor\":\"_cambioLilacBackgroundColor_rzcwj_508\",\"thistleBackgroundColor\":\"_thistleBackgroundColor_rzcwj_512\",\"cambioThistleBackgroundColor\":\"_cambioThistleBackgroundColor_rzcwj_516\",\"pinkBackgroundColor\":\"_pinkBackgroundColor_rzcwj_520\",\"cambioPinkBackgroundColor\":\"_cambioPinkBackgroundColor_rzcwj_524\",\"navyBackgroundColor\":\"_navyBackgroundColor_rzcwj_528\",\"cambioNavyBackgroundColor\":\"_cambioNavyBackgroundColor_rzcwj_532\",\"tealBackgroundColor\":\"_tealBackgroundColor_rzcwj_536\",\"cambioTealBackgroundColor\":\"_cambioTealBackgroundColor_rzcwj_540\",\"slateBackgroundColor\":\"_slateBackgroundColor_rzcwj_544\",\"cambioSlateBackgroundColor\":\"_cambioSlateBackgroundColor_rzcwj_548\",\"skyBackgroundColor\":\"_skyBackgroundColor_rzcwj_552\",\"cambioSkyBackgroundColor\":\"_cambioSkyBackgroundColor_rzcwj_556\",\"cambioYellow700BackgroundColor\":\"_cambioYellow700BackgroundColor_rzcwj_560\"}"]}
|
|
@@ -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,MAAK,eAAc,MAAK,gBAAe,MAAK,gBAAe,kBAAiB,2BAA0B;;;ACAnJ,IAAO,2BAAQ,EAAC,aAAY,sBAAqB,oBAAmB,8BAA6B,mBAAkB,6BAA4B,SAAQ,mBAAkB,MAAK,gBAAe,YAAW,sBAAqB,gBAAe,0BAAyB,YAAW,sBAAqB,MAAK,gBAAe,YAAW,sBAAqB,MAAK,gBAAe,YAAW,sBAAqB,cAAa,wBAAuB,oBAAmB,6BAA4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F;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,wBAAwB;AAAA,cAE1C,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\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\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 * Size of the TextArea. Defines the font size and padding.\n *\n * Cambio only supports `md`\n *\n * @defaultValue \"md\"\n */\n size?: \"sm\" | \"md\" | \"lg\";\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 size = \"md\",\n value = \"\",\n onChange,\n }: TextAreaProps,\n forwardedRef,\n ): ReactElement {\n const isHydrated = useIsHydrated();\n const disabled = !isHydrated || disabledProp;\n const reactId = useId();\n const { themeName } = useTheme();\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={themeName === \"cambio\" ? \"relative\" : undefined}\n >\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 <Typography size={themeName === \"cambio\" ? 100 : 200}>\n <textarea\n data-testid={dataTestId}\n ref={forwardedRef}\n className={classNames(\n textFieldStyles.textfield,\n themeName === \"classic\"\n ? textFieldStyles.textfieldClassic\n : textFieldStyles.textfieldCambio,\n themeName === \"classic\" && textFieldStyles[size],\n themeName === \"classic\" && styles[size],\n themeName === \"classic\" ? styles.textarea : styles.textareaCambio,\n {\n [themeName === \"classic\"\n ? textFieldStyles.inputError\n : textFieldStyles.inputErrorCambio]: 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-primary\" : \"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_1owb5_1\",\"sm\":\"_sm_1owb5_5\",\"md\":\"_md_1owb5_10\",\"lg\":\"_lg_1owb5_15\",\"textareaCambio\":\"_textareaCambio_1owb5_20\"}","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/TextField/TextField.module.css\"; export default {\"textfield\":\"_textfield_kbdbw_1\",\"textfieldClassic\":\"_textfieldClassic_kbdbw_10\",\"textfieldCambio\":\"_textfieldCambio_kbdbw_14\",\"label\":\"_label_kbdbw_29\",\"sm\":\"_sm_kbdbw_33\",\"mdCambio\":\"_mdCambio_kbdbw_40\",\"heightCambio\":\"_heightCambio_kbdbw_44\",\"smHeight\":\"_smHeight_kbdbw_48\",\"md\":\"_md_kbdbw_40\",\"mdHeight\":\"_mdHeight_kbdbw_59\",\"lg\":\"_lg_kbdbw_63\",\"lgHeight\":\"_lgHeight_kbdbw_70\",\"inputError\":\"_inputError_kbdbw_74\",\"inputErrorCambio\":\"_inputErrorCambio_kbdbw_84\"}"]}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _5JUNB754cjs = require('./5JUNB754.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _ZCSR6NFBcjs = require('./ZCSR6NFB.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _W2JRKN5Ecjs = require('./W2JRKN5E.cjs');
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _HWQUS53Mcjs = require('./HWQUS53M.cjs');
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _UQY2ELTZcjs = require('./UQY2ELTZ.cjs');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _J43HGNHNcjs = require('./J43HGNHN.cjs');
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var _XU3CLITIcjs = require('./XU3CLITI.cjs');
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _JXOKXBDZcjs = require('./JXOKXBDZ.cjs');
|
|
29
|
-
|
|
30
|
-
// src/LinkButton/LinkButton.tsx
|
|
31
|
-
var _react = require('react');
|
|
32
|
-
var _classnames = require('classnames'); var _classnames2 = _interopRequireDefault(_classnames);
|
|
33
|
-
|
|
34
|
-
// css-module:./LinkButton.module.css#css-module
|
|
35
|
-
var LinkButton_module_default = { "linkButton": "_linkButton_1qjrb_1", "fitContent": "_fitContent_1qjrb_11" };
|
|
36
|
-
|
|
37
|
-
// src/LinkButton/LinkButton.tsx
|
|
38
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
39
|
-
var LinkButton = _react.forwardRef.call(void 0,
|
|
40
|
-
({
|
|
41
|
-
text,
|
|
42
|
-
href,
|
|
43
|
-
target,
|
|
44
|
-
rel,
|
|
45
|
-
"data-testid": dataTestId,
|
|
46
|
-
color = "primary",
|
|
47
|
-
size = "md",
|
|
48
|
-
fullWidth = false,
|
|
49
|
-
startIcon: StartIcon,
|
|
50
|
-
endIcon: EndIcon,
|
|
51
|
-
on = "lightBackground",
|
|
52
|
-
onClick
|
|
53
|
-
}, ref) => {
|
|
54
|
-
const { themeName } = _JXOKXBDZcjs.useTheme.call(void 0, );
|
|
55
|
-
const foregroundColorClass = themeName === "classic" ? _UQY2ELTZcjs.classicForegroundColor.call(void 0, _HWQUS53Mcjs.classicColor.call(void 0, color)) : _UQY2ELTZcjs.cambioForegroundColor.call(void 0, _HWQUS53Mcjs.cambioColor.call(void 0, color), on);
|
|
56
|
-
const backgroundColorClass = themeName === "classic" ? _J43HGNHNcjs.classicBackgroundColor.call(void 0, _HWQUS53Mcjs.classicColor.call(void 0, color)) : _J43HGNHNcjs.cambioBackgroundColor.call(void 0, _HWQUS53Mcjs.cambioColor.call(void 0, color), on);
|
|
57
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
58
|
-
"a",
|
|
59
|
-
{
|
|
60
|
-
href,
|
|
61
|
-
"data-testid": dataTestId,
|
|
62
|
-
target,
|
|
63
|
-
ref,
|
|
64
|
-
rel,
|
|
65
|
-
className: _classnames2.default.call(void 0,
|
|
66
|
-
LinkButton_module_default.linkButton,
|
|
67
|
-
_W2JRKN5Ecjs.Button_module_default.button,
|
|
68
|
-
foregroundColorClass,
|
|
69
|
-
backgroundColorClass,
|
|
70
|
-
themeName === "classic" ? _W2JRKN5Ecjs.Button_module_default[size] : _W2JRKN5Ecjs.Button_module_default[`${size}Cambio`],
|
|
71
|
-
{
|
|
72
|
-
[_W2JRKN5Ecjs.Button_module_default.fullWidth]: fullWidth,
|
|
73
|
-
[LinkButton_module_default.fitContent]: !fullWidth,
|
|
74
|
-
[_W2JRKN5Ecjs.Button_module_default.buttonGap]: size === "lg" || size === "md",
|
|
75
|
-
[_W2JRKN5Ecjs.Button_module_default.secondaryBorder]: themeName === "classic" && color === "secondary",
|
|
76
|
-
[_W2JRKN5Ecjs.Button_module_default.secondaryDestructiveBorder]: themeName === "classic" && color === "destructive-secondary"
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
onClick,
|
|
80
|
-
children: [
|
|
81
|
-
StartIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
|
-
StartIcon,
|
|
83
|
-
{
|
|
84
|
-
className: _classnames2.default.call(void 0,
|
|
85
|
-
_W2JRKN5Ecjs.Button_module_default.icon,
|
|
86
|
-
_ZCSR6NFBcjs.iconSize_default[size],
|
|
87
|
-
foregroundColorClass
|
|
88
|
-
)
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
92
|
-
_XU3CLITIcjs.Typography_default,
|
|
93
|
-
{
|
|
94
|
-
size: themeName === "classic" ? _5JUNB754cjs.textVariant_default[size] : _5JUNB754cjs.textVariant_default[size],
|
|
95
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
96
|
-
"span",
|
|
97
|
-
{
|
|
98
|
-
className: foregroundColorClass,
|
|
99
|
-
style: { fontWeight: 500 },
|
|
100
|
-
children: text
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
EndIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
106
|
-
EndIcon,
|
|
107
|
-
{
|
|
108
|
-
className: _classnames2.default.call(void 0,
|
|
109
|
-
_W2JRKN5Ecjs.Button_module_default.icon,
|
|
110
|
-
_ZCSR6NFBcjs.iconSize_default[size],
|
|
111
|
-
foregroundColorClass
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
]
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
LinkButton.displayName = "LinkButton";
|
|
121
|
-
var LinkButton_default = LinkButton;
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
exports.LinkButton_default = LinkButton_default;
|
|
126
|
-
//# sourceMappingURL=FH2W3CI2.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/LinkButton/LinkButton.tsx","css-module:./LinkButton.module.css#css-module"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAA2C;AACpD,OAAO,gBAAgB;;;ACD6E,IAAO,4BAAQ,EAAC,cAAa,uBAAsB,cAAa,uBAAsB;;;ADsJpL,SA2BI,KA3BJ;AA/BN,IAAM,aAAa;AAAA,EACjB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,IACT,KAAK;AAAA,IACL;AAAA,EACF,GACA,QACG;AACH,UAAM,EAAE,UAAU,IAAI,SAAS;AAE/B,UAAM,uBACJ,cA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;AACF;AAEA,WAAW,cAAc;AAEzB,IAAO,qBAAQ","sourcesContent":["import { forwardRef, type HtmlHTMLAttributes } from \"react\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport buttonStyles from \"../Button/Button.module.css\";\nimport iconSize from \"../Button/constants/iconSize\";\nimport textVariant from \"../Button/constants/textVariant\";\nimport styles from \"./LinkButton.module.css\";\n\nimport { classicColor, cambioColor } from \"../Button/constants/color\";\nimport {\n classicBackgroundColor,\n cambioBackgroundColor,\n} from \"../colors//backgroundColor\";\nimport {\n classicForegroundColor,\n cambioForegroundColor,\n} from \"../colors/foregroundColor\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\ntype LinkButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The link that the LinkButton should route to.\n *\n */\n href?: string;\n /**\n * The target attribute specifies where to open the linked document.\n *\n */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\";\n /**\n * The rel attribute specifies the relationship between the document and the link.\n *\n */\n rel?: HtmlHTMLAttributes<HTMLAnchorElement>[\"rel\"];\n /**\n * The color of the button\n *\n * Classic only:\n * * `inverse`\n * * `success`\n *\n * Cambio only:\n * * `success-primary`\n * * `success-secondary`\n * * `success-tertiary`\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\"\n | \"inverse\";\n /**\n * The size of the button\n *\n * Classic:\n * * `sm`: 32px\n * * `md`: 40px\n * * `lg`: 48px\n *\n * Cambio:\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n * Note: startIcon is not supported in the Cambio theme\n */\n startIcon?: React.ComponentType<{ className?: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n * Note: endIcon is not supported in the Cambio theme\n */\n endIcon?: React.ComponentType<{ className?: string }>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button (Cambio only)\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * An optional onClick event. This is used for certain wrapper's support (such as react-router-dom).\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n};\n\n/**\n * [LinkButton](https://cambly-syntax.vercel.app/?path=/docs/components-linkbutton--docs) is a \"variation\" of Button that should look identical to Button, but should be used to render links instead.\n */\nconst LinkButton = forwardRef<HTMLAnchorElement, LinkButtonProps>(\n (\n {\n text,\n href,\n target,\n rel,\n \"data-testid\": dataTestId,\n color = \"primary\",\n size = \"md\",\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n }: LinkButtonProps,\n ref,\n ) => {\n const { themeName } = useTheme();\n\n const foregroundColorClass =\n themeName === \"classic\"\n ? classicForegroundColor(classicColor(color))\n : cambioForegroundColor(cambioColor(color), on);\n\n const backgroundColorClass =\n themeName === \"classic\"\n ? classicBackgroundColor(classicColor(color))\n : cambioBackgroundColor(cambioColor(color), on);\n\n return (\n <a\n href={href}\n data-testid={dataTestId}\n target={target}\n ref={ref}\n rel={rel}\n className={classNames(\n styles.linkButton,\n buttonStyles.button,\n foregroundColorClass,\n backgroundColorClass,\n themeName === \"classic\"\n ? buttonStyles[size]\n : buttonStyles[`${size}Cambio`],\n {\n [buttonStyles.fullWidth]: fullWidth,\n [styles.fitContent]: !fullWidth,\n [buttonStyles.buttonGap]: size === \"lg\" || size === \"md\",\n [buttonStyles.secondaryBorder]:\n themeName === \"classic\" && color === \"secondary\",\n [buttonStyles.secondaryDestructiveBorder]:\n themeName === \"classic\" && color === \"destructive-secondary\",\n },\n )}\n onClick={onClick}\n >\n {StartIcon && (\n <StartIcon\n className={classNames(\n buttonStyles.icon,\n iconSize[size],\n foregroundColorClass,\n )}\n />\n )}\n <Typography\n size={themeName === \"classic\" ? textVariant[size] : textVariant[size]}\n >\n <span\n // Temporary - until we have cambio colors on Typogrphay\n className={foregroundColorClass}\n style={{ fontWeight: 500 }}\n >\n {text}\n </span>\n </Typography>\n {EndIcon && (\n <EndIcon\n className={classNames(\n buttonStyles.icon,\n iconSize[size],\n foregroundColorClass,\n )}\n />\n )}\n </a>\n );\n },\n);\n\nLinkButton.displayName = \"LinkButton\";\n\nexport default LinkButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/LinkButton/LinkButton.module.css\"; export default {\"linkButton\":\"_linkButton_1qjrb_1\",\"fitContent\":\"_fitContent_1qjrb_11\"}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/LinkButton/LinkButton.tsx","css-module:./LinkButton.module.css#css-module"],"sourcesContent":["import { forwardRef, type HtmlHTMLAttributes } from \"react\";\nimport classNames from \"classnames\";\nimport React from \"react\";\nimport { type Size } from \"../constants\";\nimport Typography from \"../Typography/Typography\";\nimport buttonStyles from \"../Button/Button.module.css\";\nimport iconSize from \"../Button/constants/iconSize\";\nimport textVariant from \"../Button/constants/textVariant\";\nimport styles from \"./LinkButton.module.css\";\n\nimport { classicColor, cambioColor } from \"../Button/constants/color\";\nimport {\n classicBackgroundColor,\n cambioBackgroundColor,\n} from \"../colors//backgroundColor\";\nimport {\n classicForegroundColor,\n cambioForegroundColor,\n} from \"../colors/foregroundColor\";\nimport { useTheme } from \"../ThemeProvider/ThemeProvider\";\n\ntype LinkButtonProps = {\n /**\n * Test id for the button\n */\n \"data-testid\"?: string;\n /**\n * The text to be displayed inside the button\n */\n text: string;\n /**\n * The link that the LinkButton should route to.\n *\n */\n href?: string;\n /**\n * The target attribute specifies where to open the linked document.\n *\n */\n target?: \"_blank\" | \"_self\" | \"_parent\" | \"_top\";\n /**\n * The rel attribute specifies the relationship between the document and the link.\n *\n */\n rel?: HtmlHTMLAttributes<HTMLAnchorElement>[\"rel\"];\n /**\n * The color of the button\n *\n * Classic only:\n * * `inverse`\n * * `success`\n *\n * Cambio only:\n * * `success-primary`\n * * `success-secondary`\n * * `success-tertiary`\n *\n * @defaultValue \"primary\"\n */\n color?:\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"destructive-primary\"\n | \"destructive-secondary\"\n | \"destructive-tertiary\"\n | \"branded\"\n | \"success\"\n | \"success-primary\"\n | \"success-secondary\"\n | \"success-tertiary\"\n | \"inverse\";\n /**\n * The size of the button\n *\n * Classic:\n * * `sm`: 32px\n * * `md`: 40px\n * * `lg`: 48px\n *\n * Cambio:\n * * `sm`: 32px\n * * `md`: 48px\n * * `lg`: 64px\n *\n * @defaultValue \"md\"\n */\n size?: (typeof Size)[number];\n /**\n * If `true`, the button will take up the full width of its container\n *\n * @defaultValue false\n */\n fullWidth?: boolean;\n /**\n * The icon to be displayed at the start of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n * Note: startIcon is not supported in the Cambio theme\n */\n startIcon?: React.ComponentType<{ className?: string }>;\n /**\n * The icon to be displayed at the end of the button. Please use a [Rounded Material Icon](https://material.io/resources/icons/?style=round)\n * Note: endIcon is not supported in the Cambio theme\n */\n endIcon?: React.ComponentType<{ className?: string }>;\n /**\n * Indicate whether the button renders on a light or dark background. Changes the color of the button (Cambio only)\n *\n * @defaulValue `lightBackground`\n */\n on?: \"lightBackground\" | \"darkBackground\";\n /**\n * An optional onClick event. This is used for certain wrapper's support (such as react-router-dom).\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n};\n\n/**\n * [LinkButton](https://cambly-syntax.vercel.app/?path=/docs/components-linkbutton--docs) is a \"variation\" of Button that should look identical to Button, but should be used to render links instead.\n */\nconst LinkButton = forwardRef<HTMLAnchorElement, LinkButtonProps>(\n (\n {\n text,\n href,\n target,\n rel,\n \"data-testid\": dataTestId,\n color = \"primary\",\n size = \"md\",\n fullWidth = false,\n startIcon: StartIcon,\n endIcon: EndIcon,\n on = \"lightBackground\",\n onClick,\n }: LinkButtonProps,\n ref,\n ) => {\n const { themeName } = useTheme();\n\n const foregroundColorClass =\n themeName === \"classic\"\n ? classicForegroundColor(classicColor(color))\n : cambioForegroundColor(cambioColor(color), on);\n\n const backgroundColorClass =\n themeName === \"classic\"\n ? classicBackgroundColor(classicColor(color))\n : cambioBackgroundColor(cambioColor(color), on);\n\n return (\n <a\n href={href}\n data-testid={dataTestId}\n target={target}\n ref={ref}\n rel={rel}\n className={classNames(\n styles.linkButton,\n buttonStyles.button,\n foregroundColorClass,\n backgroundColorClass,\n themeName === \"classic\"\n ? buttonStyles[size]\n : buttonStyles[`${size}Cambio`],\n {\n [buttonStyles.fullWidth]: fullWidth,\n [styles.fitContent]: !fullWidth,\n [buttonStyles.buttonGap]: size === \"lg\" || size === \"md\",\n [buttonStyles.secondaryBorder]:\n themeName === \"classic\" && color === \"secondary\",\n [buttonStyles.secondaryDestructiveBorder]:\n themeName === \"classic\" && color === \"destructive-secondary\",\n },\n )}\n onClick={onClick}\n >\n {StartIcon && (\n <StartIcon\n className={classNames(\n buttonStyles.icon,\n iconSize[size],\n foregroundColorClass,\n )}\n />\n )}\n <Typography\n size={themeName === \"classic\" ? textVariant[size] : textVariant[size]}\n >\n <span\n // Temporary - until we have cambio colors on Typogrphay\n className={foregroundColorClass}\n style={{ fontWeight: 500 }}\n >\n {text}\n </span>\n </Typography>\n {EndIcon && (\n <EndIcon\n className={classNames(\n buttonStyles.icon,\n iconSize[size],\n foregroundColorClass,\n )}\n />\n )}\n </a>\n );\n },\n);\n\nLinkButton.displayName = \"LinkButton\";\n\nexport default LinkButton;\n","import \"/home/runner/work/syntax/syntax/packages/syntax-core/src/LinkButton/LinkButton.module.css\"; export default {\"linkButton\":\"_linkButton_1qjrb_1\",\"fitContent\":\"_fitContent_1qjrb_11\"}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,kBAA2C;AACpD,OAAO,gBAAgB;;;ACD6E,IAAO,4BAAQ,EAAC,cAAa,uBAAsB,cAAa,uBAAsB;;;ADsJpL,SA2BI,KA3BJ;AA/BN,IAAM,aAAa;AAAA,EACjB,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,IACT,KAAK;AAAA,IACL;AAAA,EACF,GACA,QACG;AACH,UAAM,EAAE,UAAU,IAAI,SAAS;AAE/B,UAAM,uBACJ,cAAc,YACV,uBAAuB,aAAa,KAAK,CAAC,IAC1C,sBAAsB,YAAY,KAAK,GAAG,EAAE;AAElD,UAAM,uBACJ,cAAc,YACV,uBAAuB,aAAa,KAAK,CAAC,IAC1C,sBAAsB,YAAY,KAAK,GAAG,EAAE;AAElD,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW;AAAA,UACT,0BAAO;AAAA,UACP,sBAAa;AAAA,UACb;AAAA,UACA;AAAA,UACA,cAAc,YACV,sBAAa,IAAI,IACjB,sBAAa,GAAG,YAAY;AAAA,UAChC;AAAA,YACE,CAAC,sBAAa,SAAS,GAAG;AAAA,YAC1B,CAAC,0BAAO,UAAU,GAAG,CAAC;AAAA,YACtB,CAAC,sBAAa,SAAS,GAAG,SAAS,QAAQ,SAAS;AAAA,YACpD,CAAC,sBAAa,eAAe,GAC3B,cAAc,aAAa,UAAU;AAAA,YACvC,CAAC,sBAAa,0BAA0B,GACtC,cAAc,aAAa,UAAU;AAAA,UACzC;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA,uBACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT,sBAAa;AAAA,gBACb,iBAAS,IAAI;AAAA,gBACb;AAAA,cACF;AAAA;AAAA,UACF;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,MAAM,cAAc,YAAY,oBAAY,IAAI,IAAI,oBAAY,IAAI;AAAA,cAEpE;AAAA,gBAAC;AAAA;AAAA,kBAEC,WAAW;AAAA,kBACX,OAAO,EAAE,YAAY,IAAI;AAAA,kBAExB;AAAA;AAAA,cACH;AAAA;AAAA,UACF;AAAA,UACC,WACC;AAAA,YAAC;AAAA;AAAA,cACC,WAAW;AAAA,gBACT,sBAAa;AAAA,gBACb,iBAAS,IAAI;AAAA,gBACb;AAAA,cACF;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;AAEzB,IAAO,qBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/colors/foregroundColor.ts"],"sourcesContent":["import { type CambioColor, type Color } from \"../constants\";\nimport styles from \"./colors.module.css\";\n\nexport function classicForegroundColor(color: (typeof Color)[number]): string {\n switch (color) {\n case \"secondary\":\n case \"tertiary\":\n return styles.primary700Color;\n case \"destructive-secondary\":\n case \"destructive-tertiary\":\n return styles.destructive700Color;\n case \"branded\":\n return styles.gray900Color;\n case \"inverse\":\n return styles.whiteColor;\n default:\n return styles.whiteColor;\n }\n}\n\nexport function cambioForegroundColor(\n color: (typeof CambioColor)[number],\n on: \"lightBackground\" | \"darkBackground\",\n): string {\n if (on === \"lightBackground\") {\n switch (color) {\n case \"primary\":\n case \"success-primary\":\n case \"destructive-primary\":\n return styles.cambioWhiteColor;\n case \"success-secondary\":\n case \"success-tertiary\":\n return styles.cambioSuccess900Color;\n case \"destructive-secondary\":\n case \"destructive-tertiary\":\n return styles.cambioDestructive900Color;\n default:\n return styles.cambioBlackColor;\n }\n } else {\n switch (color) {\n case \"primary\":\n case \"success-primary\":\n case \"destructive-primary\":\n return styles.cambioBlackColor;\n case \"secondary\":\n case \"tertiary\":\n return styles.cambioWhiteColor;\n case \"success-secondary\":\n case \"success-tertiary\":\n return styles.cambioSuccess100Color;\n case \"destructive-secondary\":\n case \"destructive-tertiary\":\n return styles.cambioDestructive100Color;\n default: // branded\n return styles.cambioBlackColor;\n }\n }\n}\n"],"mappings":";;;;;;AAGO,SAAS,uBAAuB,OAAuC;AAC5E,UAAQ,OAAO;AAAA,IACb,KAAK;AAAA,IACL,KAAK;AACH,aAAO,sBAAO;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AACH,aAAO,sBAAO;AAAA,IAChB,KAAK;AACH,aAAO,sBAAO;AAAA,IAChB,KAAK;AACH,aAAO,sBAAO;AAAA,IAChB;AACE,aAAO,sBAAO;AAAA,EAClB;AACF;AAEO,SAAS,sBACd,OACA,IACQ;AACR,MAAI,OAAO,mBAAmB;AAC5B,YAAQ,OAAO;AAAA,MACb,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB;AACE,eAAO,sBAAO;AAAA,IAClB;AAAA,EACF,OAAO;AACL,YAAQ,OAAO;AAAA,MACb,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB,KAAK;AAAA,MACL,KAAK;AACH,eAAO,sBAAO;AAAA,MAChB;AACE,eAAO,sBAAO;AAAA,IAClB;AAAA,EACF;AACF;","names":[]}
|