@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 2.38 kB
Source Map (JSON)
{"version":3,"file":"style.mjs","names":["cssVar"],"sources":["../../../src/Mermaid/SyntaxMermaid/style.ts"],"sourcesContent":["import { createStaticStyles, cx, keyframes } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n animated: css`\n img {\n opacity: 1;\n animation: ${fadeIn} 0.5s ease-in-out;\n }\n `,\n\n mermaid: cx(\n 'ant-mermaid-mermaid',\n css`\n img {\n display: block;\n width: 100%;\n height: auto;\n }\n `,\n ),\n\n noBackground: css`\n img {\n background: transparent !important;\n }\n `,\n\n noPadding: css`\n padding: 0;\n `,\n\n padding: css`\n padding: 16px;\n `,\n\n root: css`\n direction: ltr;\n margin: 0;\n padding: 0;\n text-align: start;\n `,\n\n unmermaid: css`\n color: ${cssVar.colorTextDescription};\n `,\n };\n});\n\nexport const variants = cva(styles.root, {\n defaultVariants: {\n animated: false,\n mermaid: true,\n showBackground: false,\n variant: 'borderless',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n mermaid: {\n false: styles.unmermaid,\n true: styles.mermaid,\n },\n showBackground: {\n false: styles.noBackground,\n true: null,\n },\n animated: {\n true: styles.animated,\n false: null,\n },\n variant: {\n filled: styles.padding,\n outlined: styles.padding,\n borderless: styles.noPadding,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n});\n"],"mappings":";;;;AAGA,MAAM,SAAS,SAAS;;;;;;;;AASxB,MAAa,SAAS,oBAAoB,EAAE,YAAK,uBAAa;AAC5D,QAAO;EACL,UAAU,KAAG;;;qBAGI,OAAO;;;EAIxB,SAAS,GACP,uBACA,KAAG;;;;;;QAOJ;EAED,cAAc,KAAG;;;;;EAMjB,WAAW,KAAG;;;EAId,SAAS,KAAG;;;EAIZ,MAAM,KAAG;;;;;;EAOT,WAAW,KAAG;eACHA,SAAO,qBAAqB;;EAExC;EACD;AAEF,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB;EACf,UAAU;EACV,SAAS;EACT,gBAAgB;EAChB,SAAS;EACV;CAED,UAAU;EACR,SAAS;GACP,OAAO,OAAO;GACd,MAAM,OAAO;GACd;EACD,gBAAgB;GACd,OAAO,OAAO;GACd,MAAM;GACP;EACD,UAAU;GACR,MAAM,OAAO;GACb,OAAO;GACR;EACD,SAAS;GACP,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,YAAY,OAAO;GACpB;EACF;CAEF,CAAC"}