UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

1 lines 3.47 kB
{"version":3,"file":"style.mjs","names":["lobeStaticStylish","cssVar"],"sources":["../../src/Input/style.ts"],"sourcesContent":["import { createStaticStyles, cx } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n return {\n borderless: css`\n &[class*='ant-input'] {\n ${lobeStaticStylish.variantBorderless}\n &:hover {\n ${lobeStaticStylish.variantBorderlessWithoutHover}\n }\n }\n `,\n borderlessOPT: css`\n &[class*='ant-otp'] {\n [class*='ant-otp-input'] {\n ${lobeStaticStylish.variantBorderless};\n }\n }\n `,\n filled: cx(\n lobeStaticStylish.variantFilled,\n css`\n &:focus-within {\n ${lobeStaticStylish.variantFilledWithoutHover}\n }\n `,\n ),\n\n filledOPT: css`\n &[class*='ant-otp'] {\n [class*='ant-otp-input'] {\n ${lobeStaticStylish.variantFilled};\n }\n }\n `,\n outlined: lobeStaticStylish.variantOutlined,\n outlinedOPT: css`\n &[class*='ant-otp'] {\n [class*='ant-otp-input'] {\n ${lobeStaticStylish.variantOutlined};\n }\n }\n `,\n root: css``,\n rootOPT: css`\n &[class*='ant-otp'] {\n [class*='ant-otp-input'] {\n &:focus-within {\n border-color: ${cssVar.colorBorder};\n }\n }\n }\n `,\n shadow: lobeStaticStylish.shadow,\n shadowOPT: css`\n &[class*='ant-otp'] {\n [class*='ant-otp-input'] {\n ${lobeStaticStylish.shadow};\n }\n }\n `,\n };\n});\n\nexport const variants = cva(styles.root, {\n defaultVariants: {\n shadow: false,\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 underlined: null,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n});\n\nexport const variantsOPT = cva(styles.rootOPT, {\n defaultVariants: {\n shadow: false,\n },\n /* eslint-disable sort-keys-fix/sort-keys-fix */\n variants: {\n variant: {\n filled: styles.filledOPT,\n outlined: styles.outlinedOPT,\n borderless: styles.borderlessOPT,\n underlined: null,\n },\n shadow: {\n false: null,\n true: styles.shadowOPT,\n },\n },\n /* eslint-enable sort-keys-fix/sort-keys-fix */\n});\n"],"mappings":";;;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,YAAK,uBAAa;AAC5D,QAAO;EACL,YAAY,KAAG;;UAETA,cAAkB,kBAAkB;;YAElCA,cAAkB,8BAA8B;;;;EAIxD,eAAe,KAAG;;;YAGVA,cAAkB,kBAAkB;;;;EAI5C,QAAQ,GACNA,cAAkB,eAClB,KAAG;;YAEGA,cAAkB,0BAA0B;;QAGnD;EAED,WAAW,KAAG;;;YAGNA,cAAkB,cAAc;;;;EAIxC,UAAUA,cAAkB;EAC5B,aAAa,KAAG;;;YAGRA,cAAkB,gBAAgB;;;;EAI1C,MAAM,KAAG;EACT,SAAS,KAAG;;;;4BAIYC,SAAO,YAAY;;;;;EAK3C,QAAQD,cAAkB;EAC1B,WAAW,KAAG;;;YAGNA,cAAkB,OAAO;;;;EAIlC;EACD;AAEF,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB,EACf,QAAQ,OACT;CAED,UAAU;EACR,SAAS;GACP,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,YAAY,OAAO;GACnB,YAAY;GACb;EACD,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;GACd;EACF;CAEF,CAAC;AAEF,MAAa,cAAc,IAAI,OAAO,SAAS;CAC7C,iBAAiB,EACf,QAAQ,OACT;CAED,UAAU;EACR,SAAS;GACP,QAAQ,OAAO;GACf,UAAU,OAAO;GACjB,YAAY,OAAO;GACnB,YAAY;GACb;EACD,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;GACd;EACF;CAEF,CAAC"}