@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 2.25 kB
Source Map (JSON)
{"version":3,"file":"styles.mjs","names":["lobeStaticStylish","cssVar"],"sources":["../../src/Tag/styles.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nconst prefixCls = 'ant';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n borderless: lobeStaticStylish.variantBorderlessWithoutHover,\n filled: lobeStaticStylish.variantFilledWithoutHover,\n large: css`\n &.${prefixCls}-tag {\n height: 28px;\n padding-inline: 12px;\n border-radius: 6px !important;\n }\n `,\n outlined: lobeStaticStylish.variantOutlinedWithoutHover,\n root: css`\n color: ${cssVar.colorTextSecondary};\n\n &.${prefixCls}-tag {\n user-select: none;\n\n display: flex;\n gap: 0.4em;\n align-items: center;\n justify-content: center;\n\n width: fit-content;\n height: 22px;\n margin: 0;\n border-radius: 3px;\n\n line-height: 1.2;\n\n span {\n margin: 0;\n }\n\n span:not(.anticon) {\n line-height: inherit;\n }\n }\n `,\n small: css`\n &.${prefixCls}-tag {\n height: 20px;\n padding-inline: 4px;\n border-radius: 3px;\n }\n `,\n}));\n\nexport const variants = cva(styles.root, {\n defaultVariants: {\n size: 'middle',\n variant: 'filled',\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: styles.filled,\n outlined: styles.outlined,\n borderless: styles.borderless,\n },\n size: {\n small: styles.small,\n middle: null,\n large: styles.large,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n});\n"],"mappings":";;;;;AAKA,MAAM,YAAY;AAElB,MAAa,SAAS,oBAAoB,EAAE,YAAK,wBAAc;CAC7D,YAAYA,cAAkB;CAC9B,QAAQA,cAAkB;CAC1B,OAAO,KAAG;QACJ,UAAU;;;;;;CAMhB,UAAUA,cAAkB;CAC5B,MAAM,KAAG;aACEC,SAAO,mBAAmB;;QAE/B,UAAU;;;;;;;;;;;;;;;;;;;;;;;;CAwBhB,OAAO,KAAG;QACJ,UAAU;;;;;;CAMjB,EAAE;AAEH,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB;EACf,MAAM;EACN,SAAS;EACV;CAED,UAAU;EACR,SAAS;GACP,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,YAAY,OAAO;GACpB;EACD,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ;GACR,OAAO,OAAO;GACf;EACF;CAEF,CAAC"}