@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
1 lines • 3.33 kB
Source Map (JSON)
{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/Tag/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n borderless: lobeStaticStylish.variantBorderlessWithoutHover,\n close: css`\n cursor: pointer;\n\n display: inline-flex;\n gap: 0;\n align-items: center;\n justify-content: center;\n\n margin: 0;\n padding: 0;\n border: none;\n\n color: ${cssVar.colorIcon};\n\n background: none;\n\n &:hover {\n color: ${cssVar.colorTextHeading};\n }\n `,\n filled: lobeStaticStylish.variantFilledWithoutHover,\n large: css`\n height: 28px;\n padding-inline: 12px;\n border-radius: 6px;\n `,\n middle: css`\n height: 22px;\n padding-inline: 8px;\n border-radius: 3px;\n `,\n outlined: lobeStaticStylish.variantOutlinedWithoutHover,\n round: css`\n && {\n border-radius: 999px;\n }\n `,\n roundLarge: css`\n padding-inline: 14px;\n `,\n roundMiddle: css`\n padding-inline: 10px;\n `,\n roundSmall: css`\n padding-inline: 8px;\n `,\n root: css`\n user-select: none;\n\n display: inline-flex;\n gap: 0.4em;\n align-items: center;\n justify-content: center;\n\n width: fit-content;\n margin: 0;\n\n font-size: ${cssVar.fontSizeSM};\n line-height: 1.2;\n white-space: nowrap;\n\n span {\n margin: 0;\n line-height: inherit;\n }\n `,\n small: css`\n height: 20px;\n padding-inline: 4px;\n border-radius: 3px;\n `,\n}));\n\nexport const variants = cva(styles.root, {\n compoundVariants: [\n {\n className: styles.roundSmall,\n shape: 'round',\n size: 'small',\n },\n {\n className: styles.roundMiddle,\n shape: 'round',\n size: 'middle',\n },\n {\n className: styles.roundLarge,\n shape: 'round',\n size: 'large',\n },\n ],\n defaultVariants: {\n shape: 'normal',\n size: 'middle',\n variant: 'filled',\n },\n variants: {\n shape: {\n normal: null,\n round: styles.round,\n },\n size: {\n large: styles.large,\n middle: styles.middle,\n small: styles.small,\n },\n variant: {\n borderless: styles.borderless,\n filled: styles.filled,\n outlined: styles.outlined,\n solid: styles.filled,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,YAAYA,cAAkB;CAC9B,OAAO,GAAG;;;;;;;;;;;;aAYC,OAAO,UAAU;;;;;eAKf,OAAO,iBAAiB;;;CAGrC,QAAQA,cAAkB;CAC1B,OAAO,GAAG;;;;;CAKV,QAAQ,GAAG;;;;;CAKX,UAAUA,cAAkB;CAC5B,OAAO,GAAG;;;;;CAKV,YAAY,GAAG;;;CAGf,aAAa,GAAG;;;CAGhB,YAAY,GAAG;;;CAGf,MAAM,GAAG;;;;;;;;;;;iBAWM,OAAO,WAAW;;;;;;;;;CASjC,OAAO,GAAG;;;;;AAKZ,EAAE;AAEF,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,kBAAkB;EAChB;GACE,WAAW,OAAO;GAClB,OAAO;GACP,MAAM;EACR;EACA;GACE,WAAW,OAAO;GAClB,OAAO;GACP,MAAM;EACR;EACA;GACE,WAAW,OAAO;GAClB,OAAO;GACP,MAAM;EACR;CACF;CACA,iBAAiB;EACf,OAAO;EACP,MAAM;EACN,SAAS;CACX;CACA,UAAU;EACR,OAAO;GACL,QAAQ;GACR,OAAO,OAAO;EAChB;EACA,MAAM;GACJ,OAAO,OAAO;GACd,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;EACA,SAAS;GACP,YAAY,OAAO;GACnB,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,OAAO,OAAO;EAChB;CACF;AACF,CAAC"}