@cdx-ui/components 0.0.1-beta.117 → 0.0.1-beta.119
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.
- package/lib/commonjs/animation/hooks/usePopupDialogContentAnimation.js +5 -3
- package/lib/commonjs/animation/hooks/usePopupDialogContentAnimation.js.map +1 -1
- package/lib/commonjs/animation/hooks/usePopupOverlayAnimation.js +3 -1
- package/lib/commonjs/animation/hooks/usePopupOverlayAnimation.js.map +1 -1
- package/lib/commonjs/components/AlertDialog/index.js +1 -2
- package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
- package/lib/commonjs/components/Chip/index.js +22 -2
- package/lib/commonjs/components/Chip/index.js.map +1 -1
- package/lib/commonjs/components/Chip/styles.js +49 -49
- package/lib/commonjs/components/Chip/styles.js.map +1 -1
- package/lib/commonjs/components/Dialog/index.js +25 -6
- package/lib/commonjs/components/Dialog/index.js.map +1 -1
- package/lib/commonjs/components/Dialog/styles.js +6 -6
- package/lib/commonjs/components/Dialog/styles.js.map +1 -1
- package/lib/commonjs/components/IconButton/index.js +11 -1
- package/lib/commonjs/components/IconButton/index.js.map +1 -1
- package/lib/commonjs/components/IconButton/styles.js +22 -22
- package/lib/commonjs/components/IconButton/styles.js.map +1 -1
- package/lib/commonjs/components/Skeleton/index.js +3 -1
- package/lib/commonjs/components/Skeleton/index.js.map +1 -1
- package/lib/commonjs/components/Toast/animation.js +3 -1
- package/lib/commonjs/components/Toast/animation.js.map +1 -1
- package/lib/commonjs/components/Toast/hooks.js +1 -0
- package/lib/commonjs/components/Toast/hooks.js.map +1 -1
- package/lib/commonjs/components/Toast/index.js +17 -2
- package/lib/commonjs/components/Toast/index.js.map +1 -1
- package/lib/commonjs/components/Toast/styles.js +8 -8
- package/lib/commonjs/components/Toast/styles.js.map +1 -1
- package/lib/commonjs/figma/AlertDialog.Title.figma.js +3 -3
- package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -1
- package/lib/commonjs/figma/Chip.figma.js +2 -2
- package/lib/commonjs/figma/Chip.figma.js.map +1 -1
- package/lib/commonjs/figma/Dialog.Title.figma.js +3 -3
- package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -1
- package/lib/commonjs/figma/IconButton.figma.js +1 -1
- package/lib/commonjs/figma/IconButton.figma.js.map +1 -1
- package/lib/commonjs/providers/toast/provider.js +1 -1
- package/lib/module/animation/hooks/usePopupDialogContentAnimation.js +5 -3
- package/lib/module/animation/hooks/usePopupDialogContentAnimation.js.map +1 -1
- package/lib/module/animation/hooks/usePopupOverlayAnimation.js +3 -1
- package/lib/module/animation/hooks/usePopupOverlayAnimation.js.map +1 -1
- package/lib/module/components/AlertDialog/index.js +1 -1
- package/lib/module/components/AlertDialog/index.js.map +1 -1
- package/lib/module/components/Chip/index.js +23 -3
- package/lib/module/components/Chip/index.js.map +1 -1
- package/lib/module/components/Chip/styles.js +49 -49
- package/lib/module/components/Chip/styles.js.map +1 -1
- package/lib/module/components/Dialog/index.js +25 -6
- package/lib/module/components/Dialog/index.js.map +1 -1
- package/lib/module/components/Dialog/styles.js +6 -6
- package/lib/module/components/Dialog/styles.js.map +1 -1
- package/lib/module/components/IconButton/index.js +12 -2
- package/lib/module/components/IconButton/index.js.map +1 -1
- package/lib/module/components/IconButton/styles.js +22 -22
- package/lib/module/components/IconButton/styles.js.map +1 -1
- package/lib/module/components/Skeleton/index.js +3 -1
- package/lib/module/components/Skeleton/index.js.map +1 -1
- package/lib/module/components/Toast/animation.js +3 -1
- package/lib/module/components/Toast/animation.js.map +1 -1
- package/lib/module/components/Toast/hooks.js +1 -0
- package/lib/module/components/Toast/hooks.js.map +1 -1
- package/lib/module/components/Toast/index.js +17 -2
- package/lib/module/components/Toast/index.js.map +1 -1
- package/lib/module/components/Toast/styles.js +8 -8
- package/lib/module/components/Toast/styles.js.map +1 -1
- package/lib/module/figma/AlertDialog.Title.figma.js +3 -3
- package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -1
- package/lib/module/figma/Chip.figma.js +2 -2
- package/lib/module/figma/Chip.figma.js.map +1 -1
- package/lib/module/figma/Dialog.Title.figma.js +3 -3
- package/lib/module/figma/Dialog.Title.figma.js.map +1 -1
- package/lib/module/figma/IconButton.figma.js +1 -1
- package/lib/module/figma/IconButton.figma.js.map +1 -1
- package/lib/module/providers/toast/provider.js +1 -1
- package/lib/typescript/animation/hooks/usePopupDialogContentAnimation.d.ts.map +1 -1
- package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts.map +1 -1
- package/lib/typescript/components/AlertDialog/index.d.ts +4 -5
- package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +21 -1
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +5 -5
- package/lib/typescript/components/Dialog/index.d.ts +15 -1
- package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
- package/lib/typescript/components/Dialog/styles.d.ts +2 -2
- package/lib/typescript/components/IconButton/index.d.ts +11 -1
- package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
- package/lib/typescript/components/IconButton/styles.d.ts +2 -2
- package/lib/typescript/components/Skeleton/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/animation.d.ts.map +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts +2 -2
- package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
- package/lib/typescript/components/Toast/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/styles.d.ts +4 -4
- package/lib/typescript/components/Toast/types.d.ts +11 -6
- package/lib/typescript/components/Toast/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/animation/hooks/usePopupDialogContentAnimation.ts +12 -3
- package/src/animation/hooks/usePopupOverlayAnimation.ts +8 -1
- package/src/components/AlertDialog/index.tsx +1 -1
- package/src/components/Chip/index.tsx +61 -3
- package/src/components/Chip/styles.ts +49 -49
- package/src/components/Dialog/index.tsx +50 -8
- package/src/components/Dialog/styles.ts +6 -6
- package/src/components/IconButton/index.tsx +30 -3
- package/src/components/IconButton/styles.ts +22 -22
- package/src/components/Skeleton/index.tsx +2 -1
- package/src/components/Toast/animation.ts +19 -1
- package/src/components/Toast/hooks.ts +3 -2
- package/src/components/Toast/index.tsx +33 -2
- package/src/components/Toast/styles.ts +8 -8
- package/src/components/Toast/types.ts +12 -6
- package/src/providers/toast/provider.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,IAAI,EACJ,IAAI,EACJ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAItB,OAAO,EAYL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EAaxB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyB/C,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAAC,EAAE,gBAAgB,EAAE,kBAAkB;IAClF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,QAAA,MAAM,UAAU,kGAuCf,CAAC;AAQF,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,qGAYlB,CAAC;AAQF,MAAM,WAAW,gBACf,SA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;IACxB,MAAM,EAAE,OAAO,YAAY,CAAC;IAC5B,KAAK,EAAE,OAAO,WAAW,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,MAAM,EAUb,uBAAuB,CAAC"}
|
|
@@ -6,10 +6,10 @@ export declare const dialogPopupVariants: (props?: ({
|
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export declare const dialogHeaderVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
8
8
|
export declare const dialogTitleVariants: (props?: ({
|
|
9
|
-
|
|
9
|
+
severity?: "danger" | "warning" | "success" | "neutral" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export declare const dialogTitleIconVariants: (props?: ({
|
|
12
|
-
|
|
12
|
+
severity?: "danger" | "warning" | "success" | "neutral" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export declare const dialogDescriptionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
15
|
export declare const dialogContentVariants: (props?: ({
|
|
@@ -3,7 +3,17 @@ import { type IButtonProps } from '@cdx-ui/primitives';
|
|
|
3
3
|
import type { ForgeIcon } from '@cdx-ui/icons';
|
|
4
4
|
import { type IconProps } from '../Icon';
|
|
5
5
|
import { type IconButtonVariantProps } from './styles';
|
|
6
|
-
export
|
|
6
|
+
export type IconButtonVariant = 'solid' | 'subtle' | 'ghost';
|
|
7
|
+
/** @deprecated Use {@link IconButtonVariant} (`'subtle'`) instead. */
|
|
8
|
+
export type IconButtonVariantTint = 'tint';
|
|
9
|
+
export interface IconButtonProps extends PressableProps, IButtonProps, Omit<IconButtonVariantProps, 'variant'> {
|
|
10
|
+
/**
|
|
11
|
+
* Visual style variant.
|
|
12
|
+
* @default 'solid'
|
|
13
|
+
*/
|
|
14
|
+
variant?: IconButtonVariant
|
|
15
|
+
/** @deprecated Use `'subtle'` instead. */
|
|
16
|
+
| 'tint';
|
|
7
17
|
className?: string;
|
|
8
18
|
/** Forge icon component to render (icon-only control). */
|
|
9
19
|
as: ForgeIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACL,KAAK,sBAAsB,EAI5B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/IconButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACL,KAAK,sBAAsB,EAI5B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,sEAAsE;AACtE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAI3C,MAAM,WAAW,eACf,SAAQ,cAAc,EAAE,YAAY,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC;IAC7E;;;OAGG;IACH,OAAO,CAAC,EACJ,iBAAiB;IACnB,0CAA0C;OACxC,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0DAA0D;IAC1D,EAAE,EAAE,SAAS,CAAC;IACd,+CAA+C;IAC/C,aAAa,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;CACxC;AAqDD,eAAO,MAAM,UAAU,kGAAiB,CAAC;AAEzC,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
export declare const iconButtonRootVariants: (props?: ({
|
|
3
|
-
variant?: "solid" | "ghost" | "
|
|
3
|
+
variant?: "solid" | "ghost" | "subtle" | null | undefined;
|
|
4
4
|
color?: "danger" | "action" | "neutral" | null | undefined;
|
|
5
5
|
size?: "small" | "default" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -8,7 +8,7 @@ export declare const iconButtonGlyphVariants: (props?: ({
|
|
|
8
8
|
size?: "small" | "default" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export declare const iconButtonIconColorVariants: (props?: ({
|
|
11
|
-
variant?: "solid" | "ghost" | "
|
|
11
|
+
variant?: "solid" | "ghost" | "subtle" | null | undefined;
|
|
12
12
|
color?: "danger" | "action" | "neutral" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export type IconButtonVariantProps = VariantProps<typeof iconButtonRootVariants>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,QAMN,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Skeleton/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,QAMN,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,yGAsBpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/animation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAEL,qBAAqB,EAMrB,gBAAgB,EAKjB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAI5D,eAAO,MAAM,WAAW,2DAKd,CAAC;AAEX,eAAO,MAAM,UAAU,sDAUP,CAAC;AAEjB,eAAO,MAAM,cAAc,2DAKjB,CAAC;AAEX,eAAO,MAAM,aAAa,sDAUV,CAAC;AAEjB,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACrD,uBAAuB,EAAE,OAAO,CAAC;IACjC,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC5C,OAAO,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,UAAU,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/animation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAEL,qBAAqB,EAMrB,gBAAgB,EAKjB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAI5D,eAAO,MAAM,WAAW,2DAKd,CAAC;AAEX,eAAO,MAAM,UAAU,sDAUP,CAAC;AAEjB,eAAO,MAAM,cAAc,2DAKjB,CAAC;AAEX,eAAO,MAAM,aAAa,sDAUV,CAAC;AAEjB,MAAM,WAAW,2BAA2B;IAC1C,eAAe,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACrD,uBAAuB,EAAE,OAAO,CAAC;IACjC,QAAQ,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC5C,OAAO,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC3C,UAAU,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;CAC5C;AAID;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,2BAA2B,CAiU7B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
2
|
import type { ButtonProps } from '../Button';
|
|
3
|
-
import {
|
|
3
|
+
import { ToastColorInternal } from './types';
|
|
4
4
|
export declare function useButtonColor({ color, toastColor, }: {
|
|
5
5
|
color: ButtonProps['color'];
|
|
6
|
-
toastColor:
|
|
6
|
+
toastColor: ToastColorInternal;
|
|
7
7
|
}): "danger" | "warning" | "success" | "info" | "action";
|
|
8
8
|
interface UseVerticalPlaceholderStylesParams {
|
|
9
9
|
rootClassName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,UAAU,GACX,EAAE;IACD,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,UAAU,EAAE,kBAAkB,CAAC;CAChC,wDAmBA;AAED,UAAU,kCAAkC;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,aAAa,EACb,KAAK,GACN,EAAE,kCAAkC;;;EAkDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAC;AA8B9C,OAAO,KAAK,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,IAAI,EAAE,MAAM,cAAc,CAAC;AA8B9C,OAAO,KAAK,EACV,iBAAiB,EAKjB,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,eAAe,EAChB,MAAM,SAAS,CAAC;AAyBjB,QAAA,MAAM,SAAS,6FAsOb,CAAC;AAIH,QAAA,MAAM,UAAU,kGAoBd,CAAC;AAIH,QAAA,MAAM,gBAAgB,wGAiBpB,CAAC;AAIH,QAAA,MAAM,SAAS;kDAAiD,cAAc;;CA4B7E,CAAC;AAMF,QAAA,MAAM,WAAW,2GAqBf,CAAC;AAIH,QAAA,MAAM,UAAU;;wCA8Bd,CAAC;AAIH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAoEpD;AAWD,KAAK,sBAAsB,GAAG,OAAO,SAAS,GAAG;IAC/C,KAAK,EAAE,OAAO,UAAU,CAAC;IACzB,WAAW,EAAE,OAAO,gBAAgB,CAAC;IACrC,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB,MAAM,EAAE,OAAO,WAAW,CAAC;IAC3B,KAAK,EAAE,OAAO,UAAU,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,KAAK,EAMZ,sBAAsB,CAAC;AAE7B,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -33,7 +33,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
33
33
|
* set `isAnimatedStyleActive={false}` on `Toast.Root`.
|
|
34
34
|
*/
|
|
35
35
|
export declare const toastRootVariants: (props?: ({
|
|
36
|
-
color?: "danger" | "warning" | "success" | "info" | "
|
|
36
|
+
color?: "danger" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
37
37
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
38
|
/**
|
|
39
39
|
* Toast wrapper variants
|
|
@@ -56,13 +56,13 @@ export declare const toastWrapperVariants: (props?: ({
|
|
|
56
56
|
placement?: "bottom" | "top" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | null | undefined;
|
|
57
57
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
58
58
|
export declare const toastLabelVariants: (props?: ({
|
|
59
|
-
color?: "danger" | "warning" | "success" | "info" | "
|
|
59
|
+
color?: "danger" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
60
60
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
61
61
|
export declare const toastDescriptionVariants: (props?: ({
|
|
62
|
-
color?: "danger" | "warning" | "success" | "info" | "
|
|
62
|
+
color?: "danger" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
63
63
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
64
64
|
export declare const toastIconVariants: (props?: ({
|
|
65
|
-
color?: "danger" | "warning" | "success" | "info" | "
|
|
65
|
+
color?: "danger" | "warning" | "success" | "info" | "neutral" | null | undefined;
|
|
66
66
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
67
67
|
export declare const toastStyleSheet: {
|
|
68
68
|
root: {
|
|
@@ -9,9 +9,14 @@ import type { IconButtonProps } from '../IconButton';
|
|
|
9
9
|
import type { IconProps } from '../Icon';
|
|
10
10
|
import { ToastColorProps } from './styles';
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Internal (normalized) toast color values used by CVA and context.
|
|
13
13
|
*/
|
|
14
|
-
export type
|
|
14
|
+
export type ToastColorInternal = ToastColorProps['color'];
|
|
15
|
+
/**
|
|
16
|
+
* Toast color types accepted by consumers.
|
|
17
|
+
* @remarks `'default'` is deprecated — use `'neutral'` instead.
|
|
18
|
+
*/
|
|
19
|
+
export type ToastColor = ToastColorInternal | 'default';
|
|
15
20
|
/**
|
|
16
21
|
* Toast placement types.
|
|
17
22
|
*
|
|
@@ -110,7 +115,7 @@ export type ToastRootAnimation = AnimationRoot<{
|
|
|
110
115
|
export interface ToastProps extends ToastRootProps, Omit<ToastComponentProps, 'id'> {
|
|
111
116
|
/**
|
|
112
117
|
* Color of the toast
|
|
113
|
-
* @default '
|
|
118
|
+
* @default 'neutral'
|
|
114
119
|
*/
|
|
115
120
|
color?: ToastColor;
|
|
116
121
|
/**
|
|
@@ -230,9 +235,9 @@ export type ToastCloseProps = Omit<IconButtonProps, 'as'> & {
|
|
|
230
235
|
*/
|
|
231
236
|
export interface ToastContextValue {
|
|
232
237
|
/**
|
|
233
|
-
* Color of the toast
|
|
238
|
+
* Color of the toast (normalized — always uses the current value names)
|
|
234
239
|
*/
|
|
235
|
-
color?:
|
|
240
|
+
color?: ToastColorInternal;
|
|
236
241
|
/**
|
|
237
242
|
* Function to hide the toast
|
|
238
243
|
*/
|
|
@@ -258,7 +263,7 @@ export type UseToastRootAnimationOptions = Pick<ToastProps, 'animation' | 'index
|
|
|
258
263
|
export interface DefaultToastProps extends ToastComponentProps {
|
|
259
264
|
/**
|
|
260
265
|
* Color of the toast
|
|
261
|
-
* @default '
|
|
266
|
+
* @default 'neutral'
|
|
262
267
|
*/
|
|
263
268
|
color?: ToastProps['color'];
|
|
264
269
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAA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C,IAAI,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D;;;OAGG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE;QACxB,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,KAAK,MAAM,CAAC;QACrD,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;KACxD,KAAK,IAAI,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.119",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"class-variance-authority": "^0.7.1",
|
|
77
77
|
"react-native-reanimated-carousel": "5.0.0-beta.5",
|
|
78
78
|
"uniwind": "1.10.0",
|
|
79
|
-
"@cdx-ui/primitives": "0.0.1-beta.
|
|
80
|
-
"@cdx-ui/
|
|
81
|
-
"@cdx-ui/
|
|
79
|
+
"@cdx-ui/primitives": "0.0.1-beta.119",
|
|
80
|
+
"@cdx-ui/icons": "0.0.1-beta.119",
|
|
81
|
+
"@cdx-ui/utils": "0.0.1-beta.119"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@react-navigation/bottom-tabs": "*",
|
|
@@ -104,6 +104,7 @@ export function usePopupDialogContentAnimation({
|
|
|
104
104
|
Keyboard.dismiss();
|
|
105
105
|
};
|
|
106
106
|
|
|
107
|
+
// Explicit deps for Vite/web without the Reanimated Babel plugin.
|
|
107
108
|
const contentTranslateY = useDerivedValue(() => {
|
|
108
109
|
const maxDragDistance = screenHeight - contentY.get();
|
|
109
110
|
|
|
@@ -119,11 +120,11 @@ export function usePopupDialogContentAnimation({
|
|
|
119
120
|
[0, -50],
|
|
120
121
|
Extrapolation.CLAMP,
|
|
121
122
|
);
|
|
122
|
-
});
|
|
123
|
+
}, [progress, screenHeight, contentY, gestureTranslationY]);
|
|
123
124
|
|
|
124
125
|
const contentScale = useDerivedValue(() => {
|
|
125
126
|
return interpolate(progress.get(), [1, 2], [1, 0.95], Extrapolation.CLAMP);
|
|
126
|
-
});
|
|
127
|
+
}, [progress]);
|
|
127
128
|
|
|
128
129
|
const panGesture = useMemo(
|
|
129
130
|
() =>
|
|
@@ -243,7 +244,15 @@ export function usePopupDialogContentAnimation({
|
|
|
243
244
|
},
|
|
244
245
|
],
|
|
245
246
|
};
|
|
246
|
-
}
|
|
247
|
+
}, [
|
|
248
|
+
isGestureReleaseAnimationRunning,
|
|
249
|
+
progress,
|
|
250
|
+
progressAnchor,
|
|
251
|
+
contentTranslateYAnchor,
|
|
252
|
+
contentScaleAnchor,
|
|
253
|
+
contentTranslateY,
|
|
254
|
+
contentScale,
|
|
255
|
+
]);
|
|
247
256
|
|
|
248
257
|
return {
|
|
249
258
|
contentY,
|
|
@@ -48,6 +48,7 @@ export function usePopupOverlayAnimation(options: UsePopupOverlayAnimationOption
|
|
|
48
48
|
defaultValue: [0, 1, 0] as [number, number, number],
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
// Explicit deps for Vite/web without the Reanimated Babel plugin.
|
|
51
52
|
const rContainerStyle = useAnimatedStyle(() => {
|
|
52
53
|
if (progress?.get() === undefined) {
|
|
53
54
|
return {};
|
|
@@ -68,7 +69,13 @@ export function usePopupOverlayAnimation(options: UsePopupOverlayAnimationOption
|
|
|
68
69
|
return {
|
|
69
70
|
opacity: interpolate(progress.get(), [0, 1, 2], opacityValue),
|
|
70
71
|
};
|
|
71
|
-
}
|
|
72
|
+
}, [
|
|
73
|
+
progress,
|
|
74
|
+
isDragging,
|
|
75
|
+
isGestureReleaseAnimationRunning,
|
|
76
|
+
isAnimationDisabledValue,
|
|
77
|
+
opacityValue,
|
|
78
|
+
]);
|
|
72
79
|
|
|
73
80
|
const enteringValue =
|
|
74
81
|
animationConfig?.entering ?? (isAnimationDisabledValue ? undefined : FadeIn.duration(200));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { forwardRef, useMemo, type ReactNode } from 'react';
|
|
1
|
+
import { forwardRef, useEffect, useMemo, type ReactNode } from 'react';
|
|
2
2
|
import { Text, View, type TextProps } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
ChipRoot as ChipRootPrimitive,
|
|
@@ -27,16 +27,74 @@ const useChipStyleContext = () => useStyleContext(SCOPE) as ChipVariantProps;
|
|
|
27
27
|
// ROOT
|
|
28
28
|
// =============================================================================
|
|
29
29
|
|
|
30
|
-
export
|
|
30
|
+
export type ChipVariant = 'subtle' | 'outline';
|
|
31
|
+
|
|
32
|
+
/** @deprecated Use {@link ChipVariant} (`'subtle'`) instead. */
|
|
33
|
+
export type ChipVariantTint = 'tint';
|
|
34
|
+
|
|
35
|
+
export type ChipColor = 'neutral' | 'action' | 'danger' | 'warning' | 'success' | 'info';
|
|
36
|
+
|
|
37
|
+
/** @deprecated Use {@link ChipColor} (`'neutral'`) instead. */
|
|
38
|
+
export type ChipColorDefault = 'default';
|
|
39
|
+
|
|
40
|
+
let hasWarnedChipTintVariant = false;
|
|
41
|
+
let hasWarnedChipDefaultColor = false;
|
|
42
|
+
|
|
43
|
+
export interface ChipProps extends IChipProps, Omit<ChipVariantProps, 'variant' | 'color'> {
|
|
44
|
+
/**
|
|
45
|
+
* Visual style variant.
|
|
46
|
+
* @default 'subtle'
|
|
47
|
+
*/
|
|
48
|
+
variant?:
|
|
49
|
+
| ChipVariant
|
|
50
|
+
/** @deprecated Use `'subtle'` instead. */
|
|
51
|
+
| 'tint';
|
|
52
|
+
/**
|
|
53
|
+
* Color theme applied to the chip surface and content.
|
|
54
|
+
* @default 'neutral'
|
|
55
|
+
*/
|
|
56
|
+
color?:
|
|
57
|
+
| ChipColor
|
|
58
|
+
/** @deprecated Use `'neutral'` instead. */
|
|
59
|
+
| 'default';
|
|
31
60
|
className?: string;
|
|
32
61
|
children?: ReactNode;
|
|
33
62
|
}
|
|
34
63
|
|
|
35
64
|
const ChipRoot = forwardRef<View, ChipProps>(
|
|
36
65
|
(
|
|
37
|
-
{
|
|
66
|
+
{
|
|
67
|
+
children,
|
|
68
|
+
variant: variantProp = 'subtle',
|
|
69
|
+
size = 'default',
|
|
70
|
+
color: colorProp = 'neutral',
|
|
71
|
+
className,
|
|
72
|
+
style,
|
|
73
|
+
...props
|
|
74
|
+
},
|
|
38
75
|
ref,
|
|
39
76
|
) => {
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (__DEV__ && variantProp === 'tint' && !hasWarnedChipTintVariant) {
|
|
79
|
+
hasWarnedChipTintVariant = true;
|
|
80
|
+
console.warn(
|
|
81
|
+
'[Chip] The `tint` variant is deprecated and will be removed in a future major release. Use `subtle` instead.',
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
}, [variantProp]);
|
|
85
|
+
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (__DEV__ && colorProp === 'default' && !hasWarnedChipDefaultColor) {
|
|
88
|
+
hasWarnedChipDefaultColor = true;
|
|
89
|
+
console.warn(
|
|
90
|
+
'[Chip] The `default` color is deprecated and will be removed in a future major release. Use `neutral` instead.',
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
}, [colorProp]);
|
|
94
|
+
|
|
95
|
+
const variant = variantProp === 'tint' ? 'subtle' : variantProp;
|
|
96
|
+
const color = colorProp === 'default' ? 'neutral' : colorProp;
|
|
97
|
+
|
|
40
98
|
const parent = useParentContext();
|
|
41
99
|
const ctx = useMemo(
|
|
42
100
|
() => ({ ...parent, [SCOPE]: { variant, size, color } }),
|
|
@@ -20,11 +20,11 @@ export const chipRootVariants = cva(
|
|
|
20
20
|
{
|
|
21
21
|
variants: {
|
|
22
22
|
variant: {
|
|
23
|
-
|
|
23
|
+
subtle: [],
|
|
24
24
|
outline: ['bg-transparent', 'border'],
|
|
25
25
|
},
|
|
26
26
|
color: {
|
|
27
|
-
|
|
27
|
+
neutral: [],
|
|
28
28
|
action: [],
|
|
29
29
|
danger: [],
|
|
30
30
|
warning: [],
|
|
@@ -38,70 +38,70 @@ export const chipRootVariants = cva(
|
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
compoundVariants: [
|
|
41
|
-
// ──
|
|
41
|
+
// ── subtle × color ────────────────────────────────────────────────────
|
|
42
42
|
{
|
|
43
|
-
variant: '
|
|
44
|
-
color: '
|
|
43
|
+
variant: 'subtle',
|
|
44
|
+
color: 'neutral',
|
|
45
45
|
className: [
|
|
46
|
-
'bg-surface-neutral-
|
|
46
|
+
'bg-surface-neutral-subtle',
|
|
47
47
|
Platform.select({
|
|
48
|
-
default: 'data-[active=true]:bg-surface-neutral-
|
|
49
|
-
web: 'data-[hover=true]:bg-surface-neutral-
|
|
48
|
+
default: 'data-[active=true]:bg-surface-neutral-subtle-active',
|
|
49
|
+
web: 'data-[hover=true]:bg-surface-neutral-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-subtle-active',
|
|
50
50
|
}),
|
|
51
51
|
],
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
variant: '
|
|
54
|
+
variant: 'subtle',
|
|
55
55
|
color: 'action',
|
|
56
56
|
className: [
|
|
57
|
-
'bg-surface-action-
|
|
57
|
+
'bg-surface-action-subtle',
|
|
58
58
|
Platform.select({
|
|
59
|
-
default: 'data-[active=true]:bg-surface-action-
|
|
60
|
-
web: 'data-[hover=true]:bg-surface-action-
|
|
59
|
+
default: 'data-[active=true]:bg-surface-action-subtle-active',
|
|
60
|
+
web: 'data-[hover=true]:bg-surface-action-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
|
|
61
61
|
}),
|
|
62
62
|
],
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
|
-
variant: '
|
|
65
|
+
variant: 'subtle',
|
|
66
66
|
color: 'danger',
|
|
67
67
|
className: [
|
|
68
|
-
'bg-surface-danger-
|
|
68
|
+
'bg-surface-danger-subtle',
|
|
69
69
|
Platform.select({
|
|
70
|
-
default: 'data-[active=true]:bg-surface-danger-
|
|
71
|
-
web: 'data-[hover=true]:bg-surface-danger-
|
|
70
|
+
default: 'data-[active=true]:bg-surface-danger-subtle-active',
|
|
71
|
+
web: 'data-[hover=true]:bg-surface-danger-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
|
|
72
72
|
}),
|
|
73
73
|
],
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
variant: '
|
|
76
|
+
variant: 'subtle',
|
|
77
77
|
color: 'warning',
|
|
78
78
|
className: [
|
|
79
|
-
'bg-surface-warning-
|
|
79
|
+
'bg-surface-warning-subtle',
|
|
80
80
|
Platform.select({
|
|
81
|
-
default: 'data-[active=true]:bg-surface-warning-
|
|
82
|
-
web: 'data-[hover=true]:bg-surface-warning-
|
|
81
|
+
default: 'data-[active=true]:bg-surface-warning-subtle-active',
|
|
82
|
+
web: 'data-[hover=true]:bg-surface-warning-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-warning-subtle-active',
|
|
83
83
|
}),
|
|
84
84
|
],
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
variant: '
|
|
87
|
+
variant: 'subtle',
|
|
88
88
|
color: 'success',
|
|
89
89
|
className: [
|
|
90
|
-
'bg-surface-success-
|
|
90
|
+
'bg-surface-success-subtle',
|
|
91
91
|
Platform.select({
|
|
92
|
-
default: 'data-[active=true]:bg-surface-success-
|
|
93
|
-
web: 'data-[hover=true]:bg-surface-success-
|
|
92
|
+
default: 'data-[active=true]:bg-surface-success-subtle-active',
|
|
93
|
+
web: 'data-[hover=true]:bg-surface-success-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-success-subtle-active',
|
|
94
94
|
}),
|
|
95
95
|
],
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
variant: '
|
|
98
|
+
variant: 'subtle',
|
|
99
99
|
color: 'info',
|
|
100
100
|
className: [
|
|
101
|
-
'bg-surface-info-
|
|
101
|
+
'bg-surface-info-subtle',
|
|
102
102
|
Platform.select({
|
|
103
|
-
default: 'data-[active=true]:bg-surface-info-
|
|
104
|
-
web: 'data-[hover=true]:bg-surface-info-
|
|
103
|
+
default: 'data-[active=true]:bg-surface-info-subtle-active',
|
|
104
|
+
web: 'data-[hover=true]:bg-surface-info-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-info-subtle-active',
|
|
105
105
|
}),
|
|
106
106
|
],
|
|
107
107
|
},
|
|
@@ -109,12 +109,12 @@ export const chipRootVariants = cva(
|
|
|
109
109
|
// ── outline × color ───────────────────────────────────────────────────
|
|
110
110
|
{
|
|
111
111
|
variant: 'outline',
|
|
112
|
-
color: '
|
|
112
|
+
color: 'neutral',
|
|
113
113
|
className: [
|
|
114
114
|
'border-stroke-primary',
|
|
115
115
|
Platform.select({
|
|
116
|
-
default: 'data-[active=true]:bg-surface-neutral-
|
|
117
|
-
web: 'data-[hover=true]:bg-surface-neutral-
|
|
116
|
+
default: 'data-[active=true]:bg-surface-neutral-subtle',
|
|
117
|
+
web: 'data-[hover=true]:bg-surface-neutral-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-subtle-active',
|
|
118
118
|
}),
|
|
119
119
|
],
|
|
120
120
|
},
|
|
@@ -124,8 +124,8 @@ export const chipRootVariants = cva(
|
|
|
124
124
|
className: [
|
|
125
125
|
'border-stroke-action',
|
|
126
126
|
Platform.select({
|
|
127
|
-
default: 'data-[active=true]:bg-surface-action-
|
|
128
|
-
web: 'data-[hover=true]:bg-surface-action-
|
|
127
|
+
default: 'data-[active=true]:bg-surface-action-subtle',
|
|
128
|
+
web: 'data-[hover=true]:bg-surface-action-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-action-subtle-active',
|
|
129
129
|
}),
|
|
130
130
|
],
|
|
131
131
|
},
|
|
@@ -135,8 +135,8 @@ export const chipRootVariants = cva(
|
|
|
135
135
|
className: [
|
|
136
136
|
'border-stroke-danger',
|
|
137
137
|
Platform.select({
|
|
138
|
-
default: 'data-[active=true]:bg-surface-danger-
|
|
139
|
-
web: 'data-[hover=true]:bg-surface-danger-
|
|
138
|
+
default: 'data-[active=true]:bg-surface-danger-subtle',
|
|
139
|
+
web: 'data-[hover=true]:bg-surface-danger-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-danger-subtle-active',
|
|
140
140
|
}),
|
|
141
141
|
],
|
|
142
142
|
},
|
|
@@ -146,8 +146,8 @@ export const chipRootVariants = cva(
|
|
|
146
146
|
className: [
|
|
147
147
|
'border-stroke-warning',
|
|
148
148
|
Platform.select({
|
|
149
|
-
default: 'data-[active=true]:bg-surface-warning-
|
|
150
|
-
web: 'data-[hover=true]:bg-surface-warning-
|
|
149
|
+
default: 'data-[active=true]:bg-surface-warning-subtle',
|
|
150
|
+
web: 'data-[hover=true]:bg-surface-warning-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-warning-subtle-active',
|
|
151
151
|
}),
|
|
152
152
|
],
|
|
153
153
|
},
|
|
@@ -157,8 +157,8 @@ export const chipRootVariants = cva(
|
|
|
157
157
|
className: [
|
|
158
158
|
'border-stroke-success',
|
|
159
159
|
Platform.select({
|
|
160
|
-
default: 'data-[active=true]:bg-surface-success-
|
|
161
|
-
web: 'data-[hover=true]:bg-surface-success-
|
|
160
|
+
default: 'data-[active=true]:bg-surface-success-subtle',
|
|
161
|
+
web: 'data-[hover=true]:bg-surface-success-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-success-subtle-active',
|
|
162
162
|
}),
|
|
163
163
|
],
|
|
164
164
|
},
|
|
@@ -168,15 +168,15 @@ export const chipRootVariants = cva(
|
|
|
168
168
|
className: [
|
|
169
169
|
'border-stroke-info',
|
|
170
170
|
Platform.select({
|
|
171
|
-
default: 'data-[active=true]:bg-surface-info-
|
|
172
|
-
web: 'data-[hover=true]:bg-surface-info-
|
|
171
|
+
default: 'data-[active=true]:bg-surface-info-subtle',
|
|
172
|
+
web: 'data-[hover=true]:bg-surface-info-subtle-hover data-[active=true]:data-[hover=true]:bg-surface-info-subtle-active',
|
|
173
173
|
}),
|
|
174
174
|
],
|
|
175
175
|
},
|
|
176
176
|
],
|
|
177
177
|
defaultVariants: {
|
|
178
|
-
variant: '
|
|
179
|
-
color: '
|
|
178
|
+
variant: 'subtle',
|
|
179
|
+
color: 'neutral',
|
|
180
180
|
size: 'default',
|
|
181
181
|
},
|
|
182
182
|
},
|
|
@@ -185,11 +185,11 @@ export const chipRootVariants = cva(
|
|
|
185
185
|
export const chipLabelVariants = cva(['font-sans-medium'], {
|
|
186
186
|
variants: {
|
|
187
187
|
variant: {
|
|
188
|
-
|
|
188
|
+
subtle: 'text-content-primary',
|
|
189
189
|
outline: 'text-content-primary',
|
|
190
190
|
},
|
|
191
191
|
color: {
|
|
192
|
-
|
|
192
|
+
neutral: [],
|
|
193
193
|
action: [],
|
|
194
194
|
danger: [],
|
|
195
195
|
warning: [],
|
|
@@ -210,8 +210,8 @@ export const chipLabelVariants = cva(['font-sans-medium'], {
|
|
|
210
210
|
{ variant: 'outline', color: 'info', className: 'text-content-info' },
|
|
211
211
|
],
|
|
212
212
|
defaultVariants: {
|
|
213
|
-
variant: '
|
|
214
|
-
color: '
|
|
213
|
+
variant: 'subtle',
|
|
214
|
+
color: 'neutral',
|
|
215
215
|
size: 'default',
|
|
216
216
|
},
|
|
217
217
|
});
|
|
@@ -224,7 +224,7 @@ export const chipIconVariants = cva(['shrink-0'], {
|
|
|
224
224
|
xsmall: 'size-2.5 data-[icon=inline-start]:-ms-px data-[icon=inline-end]:-me-px',
|
|
225
225
|
},
|
|
226
226
|
color: {
|
|
227
|
-
|
|
227
|
+
neutral: 'text-content-primary',
|
|
228
228
|
action: 'text-content-action',
|
|
229
229
|
danger: 'text-content-danger',
|
|
230
230
|
warning: 'text-content-warning',
|
|
@@ -234,7 +234,7 @@ export const chipIconVariants = cva(['shrink-0'], {
|
|
|
234
234
|
},
|
|
235
235
|
defaultVariants: {
|
|
236
236
|
size: 'default',
|
|
237
|
-
color: '
|
|
237
|
+
color: 'neutral',
|
|
238
238
|
},
|
|
239
239
|
});
|
|
240
240
|
|