@cdx-ui/components 0.0.1-beta.116 → 0.0.1-beta.118

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.
Files changed (89) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/components/AlertDialog/index.js +1 -2
  3. package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
  4. package/lib/commonjs/components/Chip/index.js +22 -2
  5. package/lib/commonjs/components/Chip/index.js.map +1 -1
  6. package/lib/commonjs/components/Chip/styles.js +49 -49
  7. package/lib/commonjs/components/Chip/styles.js.map +1 -1
  8. package/lib/commonjs/components/Dialog/index.js +25 -6
  9. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  10. package/lib/commonjs/components/Dialog/styles.js +6 -6
  11. package/lib/commonjs/components/Dialog/styles.js.map +1 -1
  12. package/lib/commonjs/components/IconButton/index.js +11 -1
  13. package/lib/commonjs/components/IconButton/index.js.map +1 -1
  14. package/lib/commonjs/components/IconButton/styles.js +22 -22
  15. package/lib/commonjs/components/IconButton/styles.js.map +1 -1
  16. package/lib/commonjs/components/Toast/hooks.js +1 -0
  17. package/lib/commonjs/components/Toast/hooks.js.map +1 -1
  18. package/lib/commonjs/components/Toast/index.js +17 -2
  19. package/lib/commonjs/components/Toast/index.js.map +1 -1
  20. package/lib/commonjs/components/Toast/styles.js +8 -8
  21. package/lib/commonjs/components/Toast/styles.js.map +1 -1
  22. package/lib/commonjs/figma/AlertDialog.Title.figma.js +3 -3
  23. package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -1
  24. package/lib/commonjs/figma/Chip.figma.js +2 -2
  25. package/lib/commonjs/figma/Chip.figma.js.map +1 -1
  26. package/lib/commonjs/figma/Dialog.Title.figma.js +3 -3
  27. package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -1
  28. package/lib/commonjs/figma/IconButton.figma.js +1 -1
  29. package/lib/commonjs/figma/IconButton.figma.js.map +1 -1
  30. package/lib/commonjs/providers/toast/provider.js +1 -1
  31. package/lib/module/components/AlertDialog/index.js +1 -1
  32. package/lib/module/components/AlertDialog/index.js.map +1 -1
  33. package/lib/module/components/Chip/index.js +23 -3
  34. package/lib/module/components/Chip/index.js.map +1 -1
  35. package/lib/module/components/Chip/styles.js +49 -49
  36. package/lib/module/components/Chip/styles.js.map +1 -1
  37. package/lib/module/components/Dialog/index.js +25 -6
  38. package/lib/module/components/Dialog/index.js.map +1 -1
  39. package/lib/module/components/Dialog/styles.js +6 -6
  40. package/lib/module/components/Dialog/styles.js.map +1 -1
  41. package/lib/module/components/IconButton/index.js +12 -2
  42. package/lib/module/components/IconButton/index.js.map +1 -1
  43. package/lib/module/components/IconButton/styles.js +22 -22
  44. package/lib/module/components/IconButton/styles.js.map +1 -1
  45. package/lib/module/components/Toast/hooks.js +1 -0
  46. package/lib/module/components/Toast/hooks.js.map +1 -1
  47. package/lib/module/components/Toast/index.js +17 -2
  48. package/lib/module/components/Toast/index.js.map +1 -1
  49. package/lib/module/components/Toast/styles.js +8 -8
  50. package/lib/module/components/Toast/styles.js.map +1 -1
  51. package/lib/module/figma/AlertDialog.Title.figma.js +3 -3
  52. package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -1
  53. package/lib/module/figma/Chip.figma.js +2 -2
  54. package/lib/module/figma/Chip.figma.js.map +1 -1
  55. package/lib/module/figma/Dialog.Title.figma.js +3 -3
  56. package/lib/module/figma/Dialog.Title.figma.js.map +1 -1
  57. package/lib/module/figma/IconButton.figma.js +1 -1
  58. package/lib/module/figma/IconButton.figma.js.map +1 -1
  59. package/lib/module/providers/toast/provider.js +1 -1
  60. package/lib/typescript/components/AlertDialog/index.d.ts +4 -5
  61. package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
  62. package/lib/typescript/components/Chip/index.d.ts +21 -1
  63. package/lib/typescript/components/Chip/index.d.ts.map +1 -1
  64. package/lib/typescript/components/Chip/styles.d.ts +5 -5
  65. package/lib/typescript/components/Dialog/index.d.ts +15 -1
  66. package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
  67. package/lib/typescript/components/Dialog/styles.d.ts +2 -2
  68. package/lib/typescript/components/IconButton/index.d.ts +11 -1
  69. package/lib/typescript/components/IconButton/index.d.ts.map +1 -1
  70. package/lib/typescript/components/IconButton/styles.d.ts +2 -2
  71. package/lib/typescript/components/Toast/hooks.d.ts +2 -2
  72. package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
  73. package/lib/typescript/components/Toast/index.d.ts.map +1 -1
  74. package/lib/typescript/components/Toast/styles.d.ts +4 -4
  75. package/lib/typescript/components/Toast/types.d.ts +11 -6
  76. package/lib/typescript/components/Toast/types.d.ts.map +1 -1
  77. package/package.json +4 -4
  78. package/src/components/AlertDialog/index.tsx +1 -1
  79. package/src/components/Chip/index.tsx +61 -3
  80. package/src/components/Chip/styles.ts +49 -49
  81. package/src/components/Dialog/index.tsx +50 -8
  82. package/src/components/Dialog/styles.ts +6 -6
  83. package/src/components/IconButton/index.tsx +30 -3
  84. package/src/components/IconButton/styles.ts +22 -22
  85. package/src/components/Toast/hooks.ts +3 -2
  86. package/src/components/Toast/index.tsx +33 -2
  87. package/src/components/Toast/styles.ts +8 -8
  88. package/src/components/Toast/types.ts +12 -6
  89. package/src/providers/toast/provider.tsx +1 -1
@@ -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,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,UAAU,GACX,EAAE;IACD,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,wDAkBA;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
+ {"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,EAIjB,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,eAAe,EAChB,MAAM,SAAS,CAAC;AAuBjB,QAAA,MAAM,SAAS,6FAwNb,CAAC;AAIH,QAAA,MAAM,UAAU,kGAoBd,CAAC;AAIH,QAAA,MAAM,gBAAgB,wGAiBpB,CAAC;AAIH,QAAA,MAAM,SAAS;kDAAiD,cAAc;;CA4B7E,CAAC;AAMF,QAAA,MAAM,WAA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AU,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" | "default" | null | undefined;
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" | "default" | null | undefined;
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" | "default" | null | undefined;
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" | "default" | null | undefined;
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
- * Toast color types
12
+ * Internal (normalized) toast color values used by CVA and context.
13
13
  */
14
- export type ToastColor = ToastColorProps['color'];
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 '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?: ToastColor;
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 '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,EAA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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.116",
3
+ "version": "0.0.1-beta.118",
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.116",
80
- "@cdx-ui/utils": "0.0.1-beta.116",
81
- "@cdx-ui/icons": "0.0.1-beta.116"
79
+ "@cdx-ui/primitives": "0.0.1-beta.118",
80
+ "@cdx-ui/utils": "0.0.1-beta.118",
81
+ "@cdx-ui/icons": "0.0.1-beta.118"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@react-navigation/bottom-tabs": "*",
@@ -1,4 +1,4 @@
1
- import React, { forwardRef } from 'react';
1
+ import { forwardRef } from 'react';
2
2
  import { View } from 'react-native';
3
3
  import { Slot, useDialog } from '@cdx-ui/primitives';
4
4
  import { composeEventHandlers } from '@cdx-ui/utils';
@@ -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 interface ChipProps extends IChipProps, ChipVariantProps {
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
- { children, variant = 'tint', size = 'default', color = 'default', className, style, ...props },
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
- tint: [],
23
+ subtle: [],
24
24
  outline: ['bg-transparent', 'border'],
25
25
  },
26
26
  color: {
27
- default: [],
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
- // ── tint × color ────────────────────────────────────────────────────
41
+ // ── subtle × color ────────────────────────────────────────────────────
42
42
  {
43
- variant: 'tint',
44
- color: 'default',
43
+ variant: 'subtle',
44
+ color: 'neutral',
45
45
  className: [
46
- 'bg-surface-neutral-tint',
46
+ 'bg-surface-neutral-subtle',
47
47
  Platform.select({
48
- default: 'data-[active=true]:bg-surface-neutral-tint-active',
49
- web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
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: 'tint',
54
+ variant: 'subtle',
55
55
  color: 'action',
56
56
  className: [
57
- 'bg-surface-action-tint',
57
+ 'bg-surface-action-subtle',
58
58
  Platform.select({
59
- default: 'data-[active=true]:bg-surface-action-tint-active',
60
- web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
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: 'tint',
65
+ variant: 'subtle',
66
66
  color: 'danger',
67
67
  className: [
68
- 'bg-surface-danger-tint',
68
+ 'bg-surface-danger-subtle',
69
69
  Platform.select({
70
- default: 'data-[active=true]:bg-surface-danger-tint-active',
71
- web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
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: 'tint',
76
+ variant: 'subtle',
77
77
  color: 'warning',
78
78
  className: [
79
- 'bg-surface-warning-tint',
79
+ 'bg-surface-warning-subtle',
80
80
  Platform.select({
81
- default: 'data-[active=true]:bg-surface-warning-tint-active',
82
- web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
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: 'tint',
87
+ variant: 'subtle',
88
88
  color: 'success',
89
89
  className: [
90
- 'bg-surface-success-tint',
90
+ 'bg-surface-success-subtle',
91
91
  Platform.select({
92
- default: 'data-[active=true]:bg-surface-success-tint-active',
93
- web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
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: 'tint',
98
+ variant: 'subtle',
99
99
  color: 'info',
100
100
  className: [
101
- 'bg-surface-info-tint',
101
+ 'bg-surface-info-subtle',
102
102
  Platform.select({
103
- default: 'data-[active=true]:bg-surface-info-tint-active',
104
- web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
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: 'default',
112
+ color: 'neutral',
113
113
  className: [
114
114
  'border-stroke-primary',
115
115
  Platform.select({
116
- default: 'data-[active=true]:bg-surface-neutral-tint',
117
- web: 'data-[hover=true]:bg-surface-neutral-tint-hover data-[active=true]:data-[hover=true]:bg-surface-neutral-tint-active',
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-tint',
128
- web: 'data-[hover=true]:bg-surface-action-tint-hover data-[active=true]:data-[hover=true]:bg-surface-action-tint-active',
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-tint',
139
- web: 'data-[hover=true]:bg-surface-danger-tint-hover data-[active=true]:data-[hover=true]:bg-surface-danger-tint-active',
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-tint',
150
- web: 'data-[hover=true]:bg-surface-warning-tint-hover data-[active=true]:data-[hover=true]:bg-surface-warning-tint-active',
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-tint',
161
- web: 'data-[hover=true]:bg-surface-success-tint-hover data-[active=true]:data-[hover=true]:bg-surface-success-tint-active',
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-tint',
172
- web: 'data-[hover=true]:bg-surface-info-tint-hover data-[active=true]:data-[hover=true]:bg-surface-info-tint-active',
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: 'tint',
179
- color: 'default',
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
- tint: 'text-content-primary',
188
+ subtle: 'text-content-primary',
189
189
  outline: 'text-content-primary',
190
190
  },
191
191
  color: {
192
- default: [],
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: 'tint',
214
- color: 'default',
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
- default: 'text-content-primary',
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: 'default',
237
+ color: 'neutral',
238
238
  },
239
239
  });
240
240
 
@@ -453,27 +453,69 @@ const DialogHeader = forwardRef<View, DialogHeaderProps>(
453
453
  DialogHeader.displayName = 'Dialog.Header';
454
454
 
455
455
  // =============================================================================
456
- // STYLED TITLE (styled-only sub-slot with appearance variants)
456
+ // STYLED TITLE (styled-only sub-slot with severity variants)
457
457
  // =============================================================================
458
458
 
459
- const APPEARANCE_ICON_MAP = {
459
+ export type DialogTitleSeverity = 'neutral' | 'danger' | 'warning' | 'success';
460
+
461
+ /** @deprecated Use `severity` prop instead of `appearance`. */
462
+ export type DialogTitleAppearance = 'default' | 'danger' | 'warning' | 'success';
463
+
464
+ let hasWarnedDialogAppearanceProp = false;
465
+ let hasWarnedDialogDefaultSeverity = false;
466
+
467
+ const SEVERITY_ICON_MAP = {
460
468
  danger: EmergencyHome,
461
469
  warning: Warning,
462
470
  success: CheckCircle,
463
471
  } as const;
464
472
 
465
- export interface DialogTitleProps extends TextProps, DialogTitleVariantProps {
473
+ export interface DialogTitleProps extends TextProps, Omit<DialogTitleVariantProps, 'severity'> {
466
474
  asChild?: boolean;
475
+ /**
476
+ * Severity level that controls the status icon and color treatment.
477
+ * @default 'neutral'
478
+ */
479
+ severity?:
480
+ | DialogTitleSeverity
481
+ /** @deprecated Use `'neutral'` instead. */
482
+ | 'default';
483
+ /**
484
+ * @deprecated Use `severity` prop instead.
485
+ */
486
+ appearance?: DialogTitleAppearance;
467
487
  className?: string;
468
488
  children?: ReactNode;
469
489
  }
470
490
 
471
491
  const DialogTitle = forwardRef<Text, DialogTitleProps>(
472
- ({ asChild, appearance = 'default', className, children, style, ...props }, ref) => {
473
- const computedClassName = cn(dialogTitleVariants({ appearance }), className);
492
+ ({ asChild, severity: severityProp, appearance, className, children, style, ...props }, ref) => {
493
+ useEffect(() => {
494
+ if (__DEV__ && appearance !== undefined && !hasWarnedDialogAppearanceProp) {
495
+ hasWarnedDialogAppearanceProp = true;
496
+ console.warn(
497
+ '[Dialog.Title] The `appearance` prop is deprecated and will be removed in a future major release. Use `severity` instead.',
498
+ );
499
+ }
500
+ }, [appearance]);
501
+
502
+ const rawSeverity = severityProp ?? appearance ?? 'neutral';
503
+
504
+ useEffect(() => {
505
+ if (__DEV__ && rawSeverity === 'default' && !hasWarnedDialogDefaultSeverity) {
506
+ hasWarnedDialogDefaultSeverity = true;
507
+ console.warn(
508
+ '[Dialog.Title] The `default` severity value is deprecated and will be removed in a future major release. Use `neutral` instead.',
509
+ );
510
+ }
511
+ }, [rawSeverity]);
512
+
513
+ const severity: DialogTitleSeverity = rawSeverity === 'default' ? 'neutral' : rawSeverity;
514
+
515
+ const computedClassName = cn(dialogTitleVariants({ severity }), className);
474
516
  const IconComponent =
475
- appearance && appearance in APPEARANCE_ICON_MAP
476
- ? APPEARANCE_ICON_MAP[appearance as keyof typeof APPEARANCE_ICON_MAP]
517
+ severity && severity in SEVERITY_ICON_MAP
518
+ ? SEVERITY_ICON_MAP[severity as keyof typeof SEVERITY_ICON_MAP]
477
519
  : null;
478
520
  const Comp = asChild ? Slot : Text;
479
521
 
@@ -492,7 +534,7 @@ const DialogTitle = forwardRef<Text, DialogTitleProps>(
492
534
  if (IconComponent) {
493
535
  return (
494
536
  <View className="flex-row items-center gap-1">
495
- <Icon as={IconComponent} className={dialogTitleIconVariants({ appearance })} />
537
+ <Icon as={IconComponent} className={dialogTitleIconVariants({ severity })} />
496
538
  {titleElement}
497
539
  </View>
498
540
  );
@@ -64,15 +64,15 @@ export const dialogHeaderVariants = cva([
64
64
 
65
65
  export const dialogTitleVariants = cva(['heading-sm', 'text-content-primary'], {
66
66
  variants: {
67
- appearance: {
68
- default: '',
67
+ severity: {
68
+ neutral: '',
69
69
  danger: '',
70
70
  warning: '',
71
71
  success: '',
72
72
  },
73
73
  },
74
74
  defaultVariants: {
75
- appearance: 'default',
75
+ severity: 'neutral',
76
76
  },
77
77
  });
78
78
 
@@ -80,15 +80,15 @@ export const dialogTitleVariants = cva(['heading-sm', 'text-content-primary'], {
80
80
 
81
81
  export const dialogTitleIconVariants = cva(['size-5'], {
82
82
  variants: {
83
- appearance: {
84
- default: '',
83
+ severity: {
84
+ neutral: '',
85
85
  danger: 'text-content-danger',
86
86
  warning: 'text-content-warning',
87
87
  success: 'text-content-success',
88
88
  },
89
89
  },
90
90
  defaultVariants: {
91
- appearance: 'default',
91
+ severity: 'neutral',
92
92
  },
93
93
  });
94
94
 
@@ -1,4 +1,4 @@
1
- import { forwardRef } from 'react';
1
+ import { forwardRef, useEffect } from 'react';
2
2
  import { View, type PressableProps } from 'react-native';
3
3
  import {
4
4
  ButtonRoot,
@@ -16,7 +16,23 @@ import {
16
16
  iconButtonRootVariants,
17
17
  } from './styles';
18
18
 
19
- export interface IconButtonProps extends PressableProps, IButtonProps, IconButtonVariantProps {
19
+ export type IconButtonVariant = 'solid' | 'subtle' | 'ghost';
20
+
21
+ /** @deprecated Use {@link IconButtonVariant} (`'subtle'`) instead. */
22
+ export type IconButtonVariantTint = 'tint';
23
+
24
+ let hasWarnedIconButtonTintVariant = false;
25
+
26
+ export interface IconButtonProps
27
+ extends PressableProps, IButtonProps, Omit<IconButtonVariantProps, 'variant'> {
28
+ /**
29
+ * Visual style variant.
30
+ * @default 'solid'
31
+ */
32
+ variant?:
33
+ | IconButtonVariant
34
+ /** @deprecated Use `'subtle'` instead. */
35
+ | 'tint';
20
36
  className?: string;
21
37
  /** Forge icon component to render (icon-only control). */
22
38
  as: ForgeIcon;
@@ -27,7 +43,7 @@ export interface IconButtonProps extends PressableProps, IButtonProps, IconButto
27
43
  const IconButtonRoot = forwardRef<View, IconButtonProps>(
28
44
  (
29
45
  {
30
- variant = 'solid',
46
+ variant: variantProp = 'solid',
31
47
  color = 'neutral',
32
48
  size = 'default',
33
49
  className,
@@ -39,6 +55,17 @@ const IconButtonRoot = forwardRef<View, IconButtonProps>(
39
55
  },
40
56
  ref,
41
57
  ) => {
58
+ useEffect(() => {
59
+ if (__DEV__ && variantProp === 'tint' && !hasWarnedIconButtonTintVariant) {
60
+ hasWarnedIconButtonTintVariant = true;
61
+ console.warn(
62
+ '[IconButton] The `tint` variant is deprecated and will be removed in a future major release. Use `subtle` instead.',
63
+ );
64
+ }
65
+ }, [variantProp]);
66
+
67
+ const variant = variantProp === 'tint' ? 'subtle' : variantProp;
68
+
42
69
  const rootClassName = cn(iconButtonRootVariants({ variant, color, size }), className);
43
70
 
44
71
  const glyphClassName = cn(