{"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../src/Collapse/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const DEFAULT_PADDING = '12px 16px';\n\nexport const getPadding = (padding?: number | string) =>\n  !padding && padding !== 0\n    ? DEFAULT_PADDING\n    : `${typeof padding === 'string' ? padding : `${padding}px`} !important`;\n\nconst prefixCls = 'ant';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => {\n  return {\n    borderless: css`\n      &.${prefixCls}-collapse {\n        .${prefixCls}-collapse-header {\n          padding-inline: 0;\n        }\n        .${prefixCls}-collapse-panel {\n          padding-inline: 0;\n          .${prefixCls}-collapse-body {\n            padding-inline: 0;\n          }\n        }\n      }\n    `,\n    desc: css`\n      font-size: 12px;\n      color: ${cssVar.colorTextDescription};\n    `,\n    filledDark: css`\n      &.${prefixCls}-collapse {\n        .${prefixCls}-collapse-item {\n          background: ${cssVar.colorBgLayout};\n          .${prefixCls}-collapse-panel {\n            margin-inline: 3px;\n            margin-block-end: 3px;\n            border-radius: ${cssVar.borderRadius};\n            ${lobeStaticStylish.variantOutlinedWithoutHover};\n          }\n        }\n      }\n    `,\n    filledLight: css`\n      &.${prefixCls}-collapse {\n        .${prefixCls}-collapse-item {\n          background: ${cssVar.colorFillQuaternary};\n          .${prefixCls}-collapse-panel {\n            margin-inline: 3px;\n            margin-block-end: 3px;\n            border-radius: ${cssVar.borderRadius};\n            ${lobeStaticStylish.variantOutlinedWithoutHover};\n            background: ${cssVar.colorBgContainer};\n            ${lobeStaticStylish.shadow};\n          }\n        }\n      }\n    `,\n    gapOutlined: css`\n      &.${prefixCls}-collapse {\n        border: none;\n        background: transparent;\n        .${prefixCls}-collapse-item {\n          border: 1px solid ${cssVar.colorFillSecondary};\n          background: ${cssVar.colorBgContainer};\n        }\n\n        .${prefixCls}-collapse-item:not(:first-child) {\n          .${prefixCls}-collapse-header {\n            border-block-start: none;\n          }\n        }\n      }\n    `,\n    gapRoot: css`\n      &.${prefixCls}-collapse {\n        display: flex;\n        flex-direction: column;\n        border: none;\n        box-shadow: none;\n        .${prefixCls}-collapse-item {\n          border: none;\n          border-radius: ${cssVar.borderRadiusLG};\n        }\n      }\n    `,\n    hideCollapsibleIcon: css`\n      .${prefixCls}-collapse-expand-icon {\n        display: none !important;\n      }\n    `,\n    icon: css`\n      cursor: pointer;\n      transition: all 100ms ${cssVar.motionEaseOut};\n    `,\n    outlined: css`\n      &.${prefixCls}-collapse {\n        border: 1px solid ${cssVar.colorFillSecondary};\n        background: ${cssVar.colorBgContainer};\n        .${prefixCls}-collapse-item .${prefixCls}-collapse-header {\n          transition: none;\n        }\n        .${prefixCls}-collapse-item-active .${prefixCls}-collapse-header {\n          border-block-end: 1px solid ${cssVar.colorFillTertiary};\n        }\n        .${prefixCls}-collapse-item:not(:first-child) {\n          .${prefixCls}-collapse-header {\n            border-block-start: 1px solid ${cssVar.colorFillTertiary};\n          }\n        }\n      }\n    `,\n    root: css`\n      &.${prefixCls}-collapse {\n        display: flex;\n        flex-direction: column;\n        background: transparent;\n\n        .${prefixCls}-collapse-header {\n          overflow: hidden;\n          display: flex;\n          flex: none;\n          gap: 0.75em;\n          align-items: flex-start;\n\n          border-radius: 0 !important;\n\n          .${prefixCls}-collapse-header-text {\n            flex: 1;\n          }\n\n          .${prefixCls}-collapse-expand-icon {\n            align-items: center;\n            min-height: 28px;\n            margin: 0;\n            padding: 0;\n          }\n\n          .${prefixCls}-collapse-extra {\n            display: flex;\n            align-items: center;\n            min-height: 28px;\n          }\n        }\n\n        .${prefixCls}-collapse-panel {\n          background: transparent;\n        }\n      }\n    `,\n    title: css`\n      font-size: 16px;\n      font-weight: 500;\n      line-height: 28px;\n    `,\n  };\n});\n\nexport const variants = cva(styles.root, {\n  compoundVariants: [\n    {\n      class: styles.gapOutlined,\n      gap: true,\n      variant: 'outlined',\n    },\n    {\n      class: styles.filledDark,\n      isDarkMode: true,\n      variant: 'filled',\n    },\n    {\n      class: styles.filledLight,\n      isDarkMode: false,\n      variant: 'filled',\n    },\n  ],\n  defaultVariants: {\n    collapsible: true,\n    gap: false,\n    isDarkMode: false,\n  },\n\n  variants: {\n    collapsible: {\n      false: styles.hideCollapsibleIcon,\n      true: null,\n    },\n    gap: {\n      false: null,\n      true: styles.gapRoot,\n    },\n    isDarkMode: {\n      false: null,\n      true: null,\n    },\n    variant: {\n      borderless: styles.borderless,\n      filled: null,\n      outlined: styles.outlined,\n    },\n  },\n});\n"],"mappings":";;;;AAKA,MAAa,kBAAkB;AAE/B,MAAa,cAAc,YACzB,CAAC,WAAW,YAAY,IACpB,kBACA,GAAG,OAAO,YAAY,WAAW,UAAU,GAAG,QAAQ,IAAI;AAEhE,MAAM,YAAY;AAElB,MAAa,SAAS,oBAAoB,EAAE,KAAK,aAAa;AAC5D,QAAO;EACL,YAAY,GAAG;UACT,UAAU;WACT,UAAU;;;WAGV,UAAU;;aAER,UAAU;;;;;;EAMnB,MAAM,GAAG;;eAEE,OAAO,qBAAqB;;EAEvC,YAAY,GAAG;UACT,UAAU;WACT,UAAU;wBACG,OAAO,cAAc;aAChC,UAAU;;;6BAGM,OAAO,aAAa;cACnCA,cAAkB,4BAA4B;;;;;EAKxD,aAAa,GAAG;UACV,UAAU;WACT,UAAU;wBACG,OAAO,oBAAoB;aACtC,UAAU;;;6BAGM,OAAO,aAAa;cACnCA,cAAkB,4BAA4B;0BAClC,OAAO,iBAAiB;cACpCA,cAAkB,OAAO;;;;;EAKnC,aAAa,GAAG;UACV,UAAU;;;WAGT,UAAU;8BACS,OAAO,mBAAmB;wBAChC,OAAO,iBAAiB;;;WAGrC,UAAU;aACR,UAAU;;;;;;EAMnB,SAAS,GAAG;UACN,UAAU;;;;;WAKT,UAAU;;2BAEM,OAAO,eAAe;;;;EAI7C,qBAAqB,GAAG;SACnB,UAAU;;;;EAIf,MAAM,GAAG;;8BAEiB,OAAO,cAAc;;EAE/C,UAAU,G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