@lobehub/ui 5.34.0 → 5.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ const ActionIcon = memo(({ active, className, classNames, color, danger, disable
46
46
  "aria-label": popupTriggerLabel,
47
47
  className: cx(variants({
48
48
  active,
49
+ danger,
49
50
  glass,
50
51
  shadow
51
52
  }), classNames?.root, className),
@@ -1 +1 @@
1
- {"version":3,"file":"ActionIcon.mjs","names":[],"sources":["../../../src/base-ui/ActionIcon/ActionIcon.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport type { MouseEvent, Ref } from 'react';\nimport { memo, useMemo } from 'react';\n\nimport type { ButtonProps } from '@/base-ui/Button';\nimport Button from '@/base-ui/Button';\nimport Tooltip from '@/base-ui/Tooltip';\nimport Icon from '@/Icon';\n\nimport { variants } from './style';\nimport { type ActionIconProps } from './type';\nimport { calcSize } from './utils';\n\nconst resolveButtonType = (variant: ActionIconProps['variant']) => {\n if (variant === 'filled') return 'fill' as const;\n if (variant === 'outlined') return 'default' as const;\n return 'text' as const;\n};\n\nconst resolveButtonSize = (size: ActionIconProps['size']) => {\n if (size === 'small') return 'small' as const;\n if (size === 'large') return 'large' as const;\n return 'middle' as const;\n};\n\nconst ActionIcon = memo<ActionIconProps>(\n ({\n active,\n className,\n classNames,\n color,\n danger,\n disabled,\n fill,\n fillOpacity,\n fillRule,\n focusable,\n glass,\n icon,\n loading,\n onClick,\n ref,\n shadow,\n size = 'middle',\n spin: iconSpinning,\n style,\n styles,\n title,\n tooltipProps,\n variant = 'borderless',\n ...rest\n }) => {\n const { blockSize, borderRadius } = useMemo(() => calcSize(size), [size]);\n const popupTriggerAria = rest as {\n 'aria-expanded'?: unknown;\n 'aria-haspopup'?: unknown;\n 'aria-label'?: string;\n };\n const isPopupTrigger =\n popupTriggerAria['aria-haspopup'] !== undefined ||\n popupTriggerAria['aria-expanded'] !== undefined;\n const popupTriggerLabel =\n popupTriggerAria['aria-label'] ??\n (isPopupTrigger && typeof title === 'string' ? title : undefined);\n\n const handleClick: ButtonProps['onClick'] = (event) => {\n onClick?.(event as unknown as MouseEvent<HTMLDivElement>);\n };\n\n const iconNode = icon ? (\n <Icon\n className={classNames?.icon}\n color={color}\n fill={fill}\n fillOpacity={fillOpacity}\n fillRule={fillRule}\n focusable={focusable}\n icon={icon}\n size={size}\n spin={iconSpinning}\n style={{ pointerEvents: 'none', ...styles?.icon }}\n />\n ) : undefined;\n\n const node = (\n <Button\n {...(rest as unknown as ButtonProps)}\n aria-label={popupTriggerLabel}\n className={cx(variants({ active, glass, shadow }), classNames?.root, className)}\n danger={danger}\n disabled={disabled}\n htmlType=\"button\"\n icon={iconNode}\n loading={loading}\n ref={ref as unknown as Ref<HTMLButtonElement>}\n size={resolveButtonSize(size)}\n tabIndex={disabled ? -1 : 0}\n type={resolveButtonType(variant)}\n style={{\n borderRadius,\n height: blockSize,\n width: blockSize,\n ...styles?.root,\n ...style,\n }}\n onClick={handleClick}\n />\n );\n\n if (!title) return node;\n\n return (\n <Tooltip\n title={title}\n {...tooltipProps}\n styles={{\n ...tooltipProps?.styles,\n container: { pointerEvents: 'none', ...tooltipProps?.styles?.container },\n }}\n >\n {node}\n </Tooltip>\n );\n },\n);\n\nActionIcon.displayName = 'BaseActionIcon';\n\nexport default ActionIcon;\n"],"mappings":";;;;;;;;;;AAeA,MAAM,qBAAqB,YAAwC;CACjE,IAAI,YAAY,UAAU,OAAO;CACjC,IAAI,YAAY,YAAY,OAAO;CACnC,OAAO;AACT;AAEA,MAAM,qBAAqB,SAAkC;CAC3D,IAAI,SAAS,SAAS,OAAO;CAC7B,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO;AACT;AAEA,MAAM,aAAa,MAChB,EACC,QACA,WACA,YACA,OACA,QACA,UACA,MACA,aACA,UACA,WACA,OACA,MACA,SACA,SACA,KACA,QACA,OAAO,UACP,MAAM,cACN,OACA,QACA,OACA,cACA,UAAU,cACV,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,iBAAiB,cAAc,SAAS,IAAI,GAAG,CAAC,IAAI,CAAC;CACxE,MAAM,mBAAmB;CAKzB,MAAM,iBACJ,iBAAiB,qBAAqB,KAAA,KACtC,iBAAiB,qBAAqB,KAAA;CACxC,MAAM,oBACJ,iBAAiB,kBAChB,kBAAkB,OAAO,UAAU,WAAW,QAAQ,KAAA;CAEzD,MAAM,eAAuC,UAAU;EACrD,UAAU,KAA8C;CAC1D;CAEA,MAAM,WAAW,OACf,oBAAC,MAAD;EACE,WAAW,YAAY;EAChB;EACD;EACO;EACH;EACC;EACL;EACA;EACN,MAAM;EACN,OAAO;GAAE,eAAe;GAAQ,GAAG,QAAQ;EAAK;CACjD,CAAA,IACC,KAAA;CAEJ,MAAM,OACJ,oBAAC,QAAD;EACE,GAAK;EACL,cAAY;EACZ,WAAW,GAAG,SAAS;GAAE;GAAQ;GAAO;EAAO,CAAC,GAAG,YAAY,MAAM,SAAS;EACtE;EACE;EACV,UAAS;EACT,MAAM;EACG;EACJ;EACL,MAAM,kBAAkB,IAAI;EAC5B,UAAU,WAAW,KAAK;EAC1B,MAAM,kBAAkB,OAAO;EAC/B,OAAO;GACL;GACA,QAAQ;GACR,OAAO;GACP,GAAG,QAAQ;GACX,GAAG;EACL;EACA,SAAS;CACV,CAAA;CAGH,IAAI,CAAC,OAAO,OAAO;CAEnB,OACE,oBAAC,SAAD;EACS;EACP,GAAI;EACJ,QAAQ;GACN,GAAG,cAAc;GACjB,WAAW;IAAE,eAAe;IAAQ,GAAG,cAAc,QAAQ;GAAU;EACzE;EAEC,UAAA;CACM,CAAA;AAEb,CACF;AAEA,WAAW,cAAc"}
1
+ {"version":3,"file":"ActionIcon.mjs","names":[],"sources":["../../../src/base-ui/ActionIcon/ActionIcon.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport type { MouseEvent, Ref } from 'react';\nimport { memo, useMemo } from 'react';\n\nimport type { ButtonProps } from '@/base-ui/Button';\nimport Button from '@/base-ui/Button';\nimport Tooltip from '@/base-ui/Tooltip';\nimport Icon from '@/Icon';\n\nimport { variants } from './style';\nimport { type ActionIconProps } from './type';\nimport { calcSize } from './utils';\n\nconst resolveButtonType = (variant: ActionIconProps['variant']) => {\n if (variant === 'filled') return 'fill' as const;\n if (variant === 'outlined') return 'default' as const;\n return 'text' as const;\n};\n\nconst resolveButtonSize = (size: ActionIconProps['size']) => {\n if (size === 'small') return 'small' as const;\n if (size === 'large') return 'large' as const;\n return 'middle' as const;\n};\n\nconst ActionIcon = memo<ActionIconProps>(\n ({\n active,\n className,\n classNames,\n color,\n danger,\n disabled,\n fill,\n fillOpacity,\n fillRule,\n focusable,\n glass,\n icon,\n loading,\n onClick,\n ref,\n shadow,\n size = 'middle',\n spin: iconSpinning,\n style,\n styles,\n title,\n tooltipProps,\n variant = 'borderless',\n ...rest\n }) => {\n const { blockSize, borderRadius } = useMemo(() => calcSize(size), [size]);\n const popupTriggerAria = rest as {\n 'aria-expanded'?: unknown;\n 'aria-haspopup'?: unknown;\n 'aria-label'?: string;\n };\n const isPopupTrigger =\n popupTriggerAria['aria-haspopup'] !== undefined ||\n popupTriggerAria['aria-expanded'] !== undefined;\n const popupTriggerLabel =\n popupTriggerAria['aria-label'] ??\n (isPopupTrigger && typeof title === 'string' ? title : undefined);\n\n const handleClick: ButtonProps['onClick'] = (event) => {\n onClick?.(event as unknown as MouseEvent<HTMLDivElement>);\n };\n\n const iconNode = icon ? (\n <Icon\n className={classNames?.icon}\n color={color}\n fill={fill}\n fillOpacity={fillOpacity}\n fillRule={fillRule}\n focusable={focusable}\n icon={icon}\n size={size}\n spin={iconSpinning}\n style={{ pointerEvents: 'none', ...styles?.icon }}\n />\n ) : undefined;\n\n const node = (\n <Button\n {...(rest as unknown as ButtonProps)}\n aria-label={popupTriggerLabel}\n className={cx(variants({ active, danger, glass, shadow }), classNames?.root, className)}\n danger={danger}\n disabled={disabled}\n htmlType=\"button\"\n icon={iconNode}\n loading={loading}\n ref={ref as unknown as Ref<HTMLButtonElement>}\n size={resolveButtonSize(size)}\n tabIndex={disabled ? -1 : 0}\n type={resolveButtonType(variant)}\n style={{\n borderRadius,\n height: blockSize,\n width: blockSize,\n ...styles?.root,\n ...style,\n }}\n onClick={handleClick}\n />\n );\n\n if (!title) return node;\n\n return (\n <Tooltip\n title={title}\n {...tooltipProps}\n styles={{\n ...tooltipProps?.styles,\n container: { pointerEvents: 'none', ...tooltipProps?.styles?.container },\n }}\n >\n {node}\n </Tooltip>\n );\n },\n);\n\nActionIcon.displayName = 'BaseActionIcon';\n\nexport default ActionIcon;\n"],"mappings":";;;;;;;;;;AAeA,MAAM,qBAAqB,YAAwC;CACjE,IAAI,YAAY,UAAU,OAAO;CACjC,IAAI,YAAY,YAAY,OAAO;CACnC,OAAO;AACT;AAEA,MAAM,qBAAqB,SAAkC;CAC3D,IAAI,SAAS,SAAS,OAAO;CAC7B,IAAI,SAAS,SAAS,OAAO;CAC7B,OAAO;AACT;AAEA,MAAM,aAAa,MAChB,EACC,QACA,WACA,YACA,OACA,QACA,UACA,MACA,aACA,UACA,WACA,OACA,MACA,SACA,SACA,KACA,QACA,OAAO,UACP,MAAM,cACN,OACA,QACA,OACA,cACA,UAAU,cACV,GAAG,WACC;CACJ,MAAM,EAAE,WAAW,iBAAiB,cAAc,SAAS,IAAI,GAAG,CAAC,IAAI,CAAC;CACxE,MAAM,mBAAmB;CAKzB,MAAM,iBACJ,iBAAiB,qBAAqB,KAAA,KACtC,iBAAiB,qBAAqB,KAAA;CACxC,MAAM,oBACJ,iBAAiB,kBAChB,kBAAkB,OAAO,UAAU,WAAW,QAAQ,KAAA;CAEzD,MAAM,eAAuC,UAAU;EACrD,UAAU,KAA8C;CAC1D;CAEA,MAAM,WAAW,OACf,oBAAC,MAAD;EACE,WAAW,YAAY;EAChB;EACD;EACO;EACH;EACC;EACL;EACA;EACN,MAAM;EACN,OAAO;GAAE,eAAe;GAAQ,GAAG,QAAQ;EAAK;CACjD,CAAA,IACC,KAAA;CAEJ,MAAM,OACJ,oBAAC,QAAD;EACE,GAAK;EACL,cAAY;EACZ,WAAW,GAAG,SAAS;GAAE;GAAQ;GAAQ;GAAO;EAAO,CAAC,GAAG,YAAY,MAAM,SAAS;EAC9E;EACE;EACV,UAAS;EACT,MAAM;EACG;EACJ;EACL,MAAM,kBAAkB,IAAI;EAC5B,UAAU,WAAW,KAAK;EAC1B,MAAM,kBAAkB,OAAO;EAC/B,OAAO;GACL;GACA,QAAQ;GACR,OAAO;GACP,GAAG,QAAQ;GACX,GAAG;EACL;EACA,SAAS;CACV,CAAA;CAGH,IAAI,CAAC,OAAO,OAAO;CAEnB,OACE,oBAAC,SAAD;EACS;EACP,GAAI;EACJ,QAAQ;GACN,GAAG,cAAc;GACjB,WAAW;IAAE,eAAe;IAAQ,GAAG,cAAc,QAAQ;GAAU;EACzE;EAEC,UAAA;CACM,CAAA;AAEb,CACF;AAEA,WAAW,cAAc"}
@@ -1,7 +1,9 @@
1
1
  //#region src/base-ui/ActionIcon/style.d.ts
2
2
  declare const styles: {
3
3
  active: string;
4
+ dangerRoot: string;
4
5
  glass: string;
6
+ root: string;
5
7
  shadow: string;
6
8
  };
7
9
  //#endregion
@@ -2,16 +2,39 @@ import { staticStylish } from "../../styles/theme/customStylishStatic.mjs";
2
2
  import { createStaticStyles } from "antd-style";
3
3
  import { cva } from "class-variance-authority";
4
4
  //#region src/base-ui/ActionIcon/style.ts
5
- const styles = createStaticStyles(() => {
5
+ const styles = createStaticStyles(({ css, cssVar }) => {
6
6
  return {
7
7
  active: staticStylish.active,
8
+ dangerRoot: css`
9
+ &&:hover {
10
+ color: ${cssVar.colorError};
11
+ }
12
+
13
+ &&:active {
14
+ color: ${cssVar.colorErrorActive};
15
+ }
16
+ `,
8
17
  glass: staticStylish.blur,
18
+ root: css`
19
+ && {
20
+ color: ${cssVar.colorTextTertiary};
21
+ }
22
+
23
+ &&:hover {
24
+ color: ${cssVar.colorTextSecondary};
25
+ }
26
+
27
+ &&:active {
28
+ color: ${cssVar.colorText};
29
+ }
30
+ `,
9
31
  shadow: staticStylish.shadow
10
32
  };
11
33
  });
12
- const variants = cva(null, {
34
+ const variants = cva(styles.root, {
13
35
  defaultVariants: {
14
36
  active: false,
37
+ danger: false,
15
38
  glass: false,
16
39
  shadow: false
17
40
  },
@@ -20,6 +43,10 @@ const variants = cva(null, {
20
43
  false: null,
21
44
  true: styles.active
22
45
  },
46
+ danger: {
47
+ false: null,
48
+ true: styles.dangerRoot
49
+ },
23
50
  glass: {
24
51
  false: null,
25
52
  true: styles.glass
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/ActionIcon/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { lobeStaticStylish } from '@/styles';\n\nexport const styles = createStaticStyles(() => {\n return {\n active: lobeStaticStylish.active,\n glass: lobeStaticStylish.blur,\n shadow: lobeStaticStylish.shadow,\n };\n});\n\nexport const variants = cva(null, {\n defaultVariants: {\n active: false,\n glass: false,\n shadow: false,\n },\n\n variants: {\n active: {\n false: null,\n true: styles.active,\n },\n glass: {\n false: null,\n true: styles.glass,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,yBAAyB;CAC7C,OAAO;EACL,QAAQA,cAAkB;EAC1B,OAAOA,cAAkB;EACzB,QAAQA,cAAkB;CAC5B;AACF,CAAC;AAED,MAAa,WAAW,IAAI,MAAM;CAChC,iBAAiB;EACf,QAAQ;EACR,OAAO;EACP,QAAQ;CACV;CAEA,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"style.mjs","names":["lobeStaticStylish"],"sources":["../../../src/base-ui/ActionIcon/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 return {\n active: lobeStaticStylish.active,\n // && outranks base-ui Button's variant classes regardless of style insertion order\n dangerRoot: css`\n &&:hover {\n color: ${cssVar.colorError};\n }\n\n &&:active {\n color: ${cssVar.colorErrorActive};\n }\n `,\n glass: lobeStaticStylish.blur,\n root: css`\n && {\n color: ${cssVar.colorTextTertiary};\n }\n\n &&:hover {\n color: ${cssVar.colorTextSecondary};\n }\n\n &&:active {\n color: ${cssVar.colorText};\n }\n `,\n shadow: lobeStaticStylish.shadow,\n };\n});\n\nexport const variants = cva(styles.root, {\n defaultVariants: {\n active: false,\n danger: false,\n glass: false,\n shadow: false,\n },\n\n variants: {\n active: {\n false: null,\n true: styles.active,\n },\n danger: {\n false: null,\n true: styles.dangerRoot,\n },\n glass: {\n false: null,\n true: styles.glass,\n },\n shadow: {\n false: null,\n true: styles.shadow,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,aAAa;CAC5D,OAAO;EACL,QAAQA,cAAkB;EAE1B,YAAY,GAAG;;iBAEF,OAAO,WAAW;;;;iBAIlB,OAAO,iBAAiB;;;EAGrC,OAAOA,cAAkB;EACzB,MAAM,GAAG;;iBAEI,OAAO,kBAAkB;;;;iBAIzB,OAAO,mBAAmB;;;;iBAI1B,OAAO,UAAU;;;EAG9B,QAAQA,cAAkB;CAC5B;AACF,CAAC;AAED,MAAa,WAAW,IAAI,OAAO,MAAM;CACvC,iBAAiB;EACf,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;CACV;CAEA,UAAU;EACR,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;EACA,OAAO;GACL,OAAO;GACP,MAAM,OAAO;EACf;EACA,QAAQ;GACN,OAAO;GACP,MAAM,OAAO;EACf;CACF;AACF,CAAC"}
@@ -24,7 +24,7 @@ declare const styles: {
24
24
  declare const rootVariants: (props?: ({
25
25
  shadow?: boolean | null | undefined;
26
26
  size?: "large" | "middle" | "small" | null | undefined;
27
- variant?: "filled" | "outlined" | "borderless" | null | undefined;
27
+ variant?: "filled" | "borderless" | "outlined" | null | undefined;
28
28
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
29
29
  //#endregion
30
30
  export { rootVariants, styles };
@@ -17,7 +17,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
17
17
 
18
18
  font: inherit;
19
19
  font-size: 12px;
20
- color: ${cssVar.colorTextSecondary};
20
+ color: ${cssVar.colorTextTertiary};
21
21
  white-space: nowrap;
22
22
 
23
23
  background: transparent;
@@ -28,7 +28,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
28
28
  color 120ms ${cssVar.motionEaseOut};
29
29
 
30
30
  &:hover:not([data-disabled]) {
31
- color: ${cssVar.colorText};
31
+ color: ${cssVar.colorTextSecondary};
32
32
  background: ${cssVar.colorFillSecondary};
33
33
  }
34
34
 
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/ToggleGroup/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n item: css`\n cursor: pointer;\n user-select: none;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 4px;\n align-items: center;\n justify-content: center;\n\n border: 0;\n border-radius: ${cssVar.borderRadius};\n\n font: inherit;\n font-size: 12px;\n color: ${cssVar.colorTextSecondary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n background 120ms ${cssVar.motionEaseOut},\n color 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled]) {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-pressed] {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-pressed]:hover:not([data-disabled]) {\n background: ${cssVar.colorFill};\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n `,\n itemIcon: css`\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n `,\n itemLabel: css`\n display: inline-flex;\n align-items: center;\n `,\n itemMiddle: css`\n height: 28px;\n padding-inline: 8px;\n `,\n itemSmall: css`\n height: 24px;\n padding-inline: 6px;\n `,\n itemOutlined: css`\n border-radius: 0;\n\n & + & {\n border-inline-start: 1px solid ${cssVar.colorBorderSecondary};\n }\n `,\n root: css`\n display: inline-flex;\n align-items: center;\n `,\n rootBorderless: css`\n gap: 2px;\n `,\n rootOutlined: css`\n overflow: hidden;\n border: 1px solid ${cssVar.colorBorderSecondary};\n border-radius: ${cssVar.borderRadius};\n `,\n}));\n\nexport const rootVariants = cva(styles.root, {\n defaultVariants: { variant: 'outlined' },\n variants: {\n variant: {\n borderless: styles.rootBorderless,\n outlined: styles.rootOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: { size: 'middle', variant: 'outlined' },\n variants: {\n size: {\n middle: styles.itemMiddle,\n small: styles.itemSmall,\n },\n variant: {\n borderless: null,\n outlined: styles.itemOutlined,\n },\n },\n});\n"],"mappings":";;;AAGA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,MAAM,GAAG;;;;;;;;;;;qBAWU,OAAO,aAAa;;;;aAI5B,OAAO,mBAAmB;;;;;;;yBAOd,OAAO,cAAc;oBAC1B,OAAO,cAAc;;;eAG1B,OAAO,UAAU;oBACZ,OAAO,mBAAmB;;;;eAI/B,OAAO,UAAU;oBACZ,OAAO,mBAAmB;;;;oBAI1B,OAAO,UAAU;;;;2BAIV,OAAO,mBAAmB;;;;;;eAMtC,OAAO,kBAAkB;;;CAGtC,UAAU,GAAG;;;;;CAKb,WAAW,GAAG;;;;CAId,YAAY,GAAG;;;;CAIf,WAAW,GAAG;;;;CAId,cAAc,GAAG;;;;uCAIoB,OAAO,qBAAqB;;;CAGjE,MAAM,GAAG;;;;CAIT,gBAAgB,GAAG;;;CAGnB,cAAc,GAAG;;wBAEK,OAAO,qBAAqB;qBAC/B,OAAO,aAAa;;AAEzC,EAAE;AAEF,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB,EAAE,SAAS,WAAW;CACvC,UAAU,EACR,SAAS;EACP,YAAY,OAAO;EACnB,UAAU,OAAO;CACnB,EACF;AACF,CAAC;AAED,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB;EAAE,MAAM;EAAU,SAAS;CAAW;CACvD,UAAU;EACR,MAAM;GACJ,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;EACA,SAAS;GACP,YAAY;GACZ,UAAU,OAAO;EACnB;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/ToggleGroup/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n item: css`\n cursor: pointer;\n user-select: none;\n\n display: inline-flex;\n flex-shrink: 0;\n gap: 4px;\n align-items: center;\n justify-content: center;\n\n border: 0;\n border-radius: ${cssVar.borderRadius};\n\n font: inherit;\n font-size: 12px;\n color: ${cssVar.colorTextTertiary};\n white-space: nowrap;\n\n background: transparent;\n outline: none;\n\n transition:\n background 120ms ${cssVar.motionEaseOut},\n color 120ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled]) {\n color: ${cssVar.colorTextSecondary};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-pressed] {\n color: ${cssVar.colorText};\n background: ${cssVar.colorFillSecondary};\n }\n\n &[data-pressed]:hover:not([data-disabled]) {\n background: ${cssVar.colorFill};\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: -2px;\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n `,\n itemIcon: css`\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n `,\n itemLabel: css`\n display: inline-flex;\n align-items: center;\n `,\n itemMiddle: css`\n height: 28px;\n padding-inline: 8px;\n `,\n itemSmall: css`\n height: 24px;\n padding-inline: 6px;\n `,\n itemOutlined: css`\n border-radius: 0;\n\n & + & {\n border-inline-start: 1px solid ${cssVar.colorBorderSecondary};\n }\n `,\n root: css`\n display: inline-flex;\n align-items: center;\n `,\n rootBorderless: css`\n gap: 2px;\n `,\n rootOutlined: css`\n overflow: hidden;\n border: 1px solid ${cssVar.colorBorderSecondary};\n border-radius: ${cssVar.borderRadius};\n `,\n}));\n\nexport const rootVariants = cva(styles.root, {\n defaultVariants: { variant: 'outlined' },\n variants: {\n variant: {\n borderless: styles.rootBorderless,\n outlined: styles.rootOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: { size: 'middle', variant: 'outlined' },\n variants: {\n size: {\n middle: styles.itemMiddle,\n small: styles.itemSmall,\n },\n variant: {\n borderless: null,\n outlined: styles.itemOutlined,\n },\n },\n});\n"],"mappings":";;;AAGA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,MAAM,GAAG;;;;;;;;;;;qBAWU,OAAO,aAAa;;;;aAI5B,OAAO,kBAAkB;;;;;;;yBAOb,OAAO,cAAc;oBAC1B,OAAO,cAAc;;;eAG1B,OAAO,mBAAmB;oBACrB,OAAO,mBAAmB;;;;eAI/B,OAAO,UAAU;oBACZ,OAAO,mBAAmB;;;;oBAI1B,OAAO,UAAU;;;;2BAIV,OAAO,mBAAmB;;;;;;eAMtC,OAAO,kBAAkB;;;CAGtC,UAAU,GAAG;;;;;CAKb,WAAW,GAAG;;;;CAId,YAAY,GAAG;;;;CAIf,WAAW,GAAG;;;;CAId,cAAc,GAAG;;;;uCAIoB,OAAO,qBAAqB;;;CAGjE,MAAM,GAAG;;;;CAIT,gBAAgB,GAAG;;;CAGnB,cAAc,GAAG;;wBAEK,OAAO,qBAAqB;qBAC/B,OAAO,aAAa;;AAEzC,EAAE;AAEF,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB,EAAE,SAAS,WAAW;CACvC,UAAU,EACR,SAAS;EACP,YAAY,OAAO;EACnB,UAAU,OAAO;CACnB,EACF;AACF,CAAC;AAED,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB;EAAE,MAAM;EAAU,SAAS;CAAW;CACvD,UAAU;EACR,MAAM;GACJ,QAAQ,OAAO;GACf,OAAO,OAAO;EAChB;EACA,SAAS;GACP,YAAY;GACZ,UAAU,OAAO;EACnB;CACF;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "5.34.0",
3
+ "version": "5.34.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",