@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 4.04 kB
Source Map (JSON)
{"version":3,"file":"styles.mjs","names":["cssVar"],"sources":["../../src/Text/styles.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n code: css`\n font-family: ${cssVar.fontFamilyCode};\n `,\n danger: css`\n color: ${cssVar.colorError};\n `,\n delete: css`\n text-decoration: line-through;\n `,\n disabled: css`\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n `,\n ellipsis: css`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n `,\n ellipsisMulti: css`\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n `,\n // Heading styles\n h1: css`\n font-size: calc(${cssVar.fontSize} * 2.5);\n font-weight: bold;\n line-height: 1.25;\n `,\n\n h2: css`\n font-size: calc(${cssVar.fontSize} * 2);\n font-weight: bold;\n line-height: 1.25;\n `,\n\n h3: css`\n font-size: calc(${cssVar.fontSize} * 1.5);\n font-weight: bold;\n line-height: 1.25;\n `,\n\n h4: css`\n font-size: calc(${cssVar.fontSize} * 1.25);\n font-weight: bold;\n line-height: 1.25;\n `,\n\n h5: css`\n font-size: ${cssVar.fontSize};\n font-weight: bold;\n line-height: 1.25;\n `,\n info: css`\n color: ${cssVar.colorInfo};\n `,\n\n italic: css`\n font-style: italic;\n `,\n\n mark: css`\n color: #000;\n background-color: ${cssVar.yellow};\n `,\n\n p: css`\n margin-block: 0;\n `,\n\n secondary: css`\n color: ${cssVar.colorTextDescription};\n `,\n\n strong: css`\n font-weight: bold;\n `,\n success: css`\n color: ${cssVar.colorSuccess};\n `,\n text: css`\n color: ${cssVar.colorText};\n `,\n underline: css`\n text-decoration: underline;\n `,\n warning: css`\n color: ${cssVar.colorWarning};\n `,\n}));\n\nexport const variants = cva(styles.text, {\n defaultVariants: {},\n variants: {\n as: {\n h1: styles.h1,\n h2: styles.h2,\n h3: styles.h3,\n h4: styles.h4,\n h5: styles.h5,\n p: styles.p,\n },\n code: {\n true: styles.code,\n },\n delete: {\n true: styles.delete,\n },\n disabled: {\n true: styles.disabled,\n },\n ellipsis: {\n multi: styles.ellipsisMulti,\n true: styles.ellipsis,\n },\n italic: {\n true: styles.italic,\n },\n mark: {\n true: styles.mark,\n },\n strong: {\n true: styles.strong,\n },\n type: {\n danger: styles.danger,\n info: styles.info,\n secondary: styles.secondary,\n success: styles.success,\n warning: styles.warning,\n },\n underline: {\n true: styles.underline,\n },\n },\n});\n"],"mappings":";;;;AAGA,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,MAAM,KAAG;mBACQA,SAAO,eAAe;;CAEvC,QAAQ,KAAG;aACAA,SAAO,WAAW;;CAE7B,QAAQ,KAAG;;;CAGX,UAAU,KAAG;;aAEFA,SAAO,kBAAkB;;CAEpC,UAAU,KAAG;;;;;CAKb,eAAe,KAAG;;;;;;CAOlB,IAAI,KAAG;sBACaA,SAAO,SAAS;;;;CAKpC,IAAI,KAAG;sBACaA,SAAO,SAAS;;;;CAKpC,IAAI,KAAG;sBACaA,SAAO,SAAS;;;;CAKpC,IAAI,KAAG;sBACaA,SAAO,SAAS;;;;CAKpC,IAAI,KAAG;iBACQA,SAAO,SAAS;;;;CAI/B,MAAM,KAAG;aACEA,SAAO,UAAU;;CAG5B,QAAQ,KAAG;;;CAIX,MAAM,KAAG;;wBAEaA,SAAO,OAAO;;CAGpC,GAAG,KAAG;;;CAIN,WAAW,KAAG;aACHA,SAAO,qBAAqB;;CAGvC,QAAQ,KAAG;;;CAGX,SAAS,KAAG;aACDA,SAAO,aAAa;;CAE/B,MAAM,KAAG;aACEA,SAAO,UAAU;;CAE5B,WAAW,KAAG;;;CAGd,SAAS,KAAG;aACDA,SAAO,aAAa;;CAEhC,EAAE;AAEH,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB,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