@cdx-ui/components 0.0.1-beta.51 → 0.0.1-beta.53

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 (98) hide show
  1. package/lib/commonjs/components/AlertDialog/index.js +4 -3
  2. package/lib/commonjs/components/AlertDialog/index.js.map +1 -1
  3. package/lib/commonjs/components/Dialog/index.js +71 -16
  4. package/lib/commonjs/components/Dialog/index.js.map +1 -1
  5. package/lib/commonjs/components/Dialog/styles.js +60 -14
  6. package/lib/commonjs/components/Dialog/styles.js.map +1 -1
  7. package/lib/commonjs/figma/AlertDialog.Description.figma.js +20 -0
  8. package/lib/commonjs/figma/AlertDialog.Description.figma.js.map +1 -0
  9. package/lib/commonjs/figma/AlertDialog.Footer.figma.js +41 -0
  10. package/lib/commonjs/figma/AlertDialog.Footer.figma.js.map +1 -0
  11. package/lib/commonjs/figma/AlertDialog.Header.figma.js +28 -0
  12. package/lib/commonjs/figma/AlertDialog.Header.figma.js.map +1 -0
  13. package/lib/commonjs/figma/AlertDialog.Text.figma.js +20 -0
  14. package/lib/commonjs/figma/AlertDialog.Text.figma.js.map +1 -0
  15. package/lib/commonjs/figma/AlertDialog.Title.figma.js +27 -0
  16. package/lib/commonjs/figma/AlertDialog.Title.figma.js.map +1 -0
  17. package/lib/commonjs/figma/AlertDialog.figma.js +43 -0
  18. package/lib/commonjs/figma/AlertDialog.figma.js.map +1 -0
  19. package/lib/commonjs/figma/Dialog.Description.figma.js +20 -0
  20. package/lib/commonjs/figma/Dialog.Description.figma.js.map +1 -0
  21. package/lib/commonjs/figma/Dialog.Footer.figma.js +30 -0
  22. package/lib/commonjs/figma/Dialog.Footer.figma.js.map +1 -0
  23. package/lib/commonjs/figma/Dialog.Header.figma.js +29 -0
  24. package/lib/commonjs/figma/Dialog.Header.figma.js.map +1 -0
  25. package/lib/commonjs/figma/Dialog.Text.figma.js +20 -0
  26. package/lib/commonjs/figma/Dialog.Text.figma.js.map +1 -0
  27. package/lib/commonjs/figma/Dialog.Title.figma.js +27 -0
  28. package/lib/commonjs/figma/Dialog.Title.figma.js.map +1 -0
  29. package/lib/commonjs/figma/Dialog.figma.js +51 -0
  30. package/lib/commonjs/figma/Dialog.figma.js.map +1 -0
  31. package/lib/module/components/AlertDialog/index.js +4 -3
  32. package/lib/module/components/AlertDialog/index.js.map +1 -1
  33. package/lib/module/components/Dialog/index.js +74 -19
  34. package/lib/module/components/Dialog/index.js.map +1 -1
  35. package/lib/module/components/Dialog/styles.js +60 -14
  36. package/lib/module/components/Dialog/styles.js.map +1 -1
  37. package/lib/module/figma/AlertDialog.Description.figma.js +14 -0
  38. package/lib/module/figma/AlertDialog.Description.figma.js.map +1 -0
  39. package/lib/module/figma/AlertDialog.Footer.figma.js +35 -0
  40. package/lib/module/figma/AlertDialog.Footer.figma.js.map +1 -0
  41. package/lib/module/figma/AlertDialog.Header.figma.js +22 -0
  42. package/lib/module/figma/AlertDialog.Header.figma.js.map +1 -0
  43. package/lib/module/figma/AlertDialog.Text.figma.js +14 -0
  44. package/lib/module/figma/AlertDialog.Text.figma.js.map +1 -0
  45. package/lib/module/figma/AlertDialog.Title.figma.js +21 -0
  46. package/lib/module/figma/AlertDialog.Title.figma.js.map +1 -0
  47. package/lib/module/figma/AlertDialog.figma.js +37 -0
  48. package/lib/module/figma/AlertDialog.figma.js.map +1 -0
  49. package/lib/module/figma/Dialog.Description.figma.js +14 -0
  50. package/lib/module/figma/Dialog.Description.figma.js.map +1 -0
  51. package/lib/module/figma/Dialog.Footer.figma.js +24 -0
  52. package/lib/module/figma/Dialog.Footer.figma.js.map +1 -0
  53. package/lib/module/figma/Dialog.Header.figma.js +23 -0
  54. package/lib/module/figma/Dialog.Header.figma.js.map +1 -0
  55. package/lib/module/figma/Dialog.Text.figma.js +14 -0
  56. package/lib/module/figma/Dialog.Text.figma.js.map +1 -0
  57. package/lib/module/figma/Dialog.Title.figma.js +21 -0
  58. package/lib/module/figma/Dialog.Title.figma.js.map +1 -0
  59. package/lib/module/figma/Dialog.figma.js +45 -0
  60. package/lib/module/figma/Dialog.figma.js.map +1 -0
  61. package/lib/typescript/components/AlertDialog/index.d.ts +3 -2
  62. package/lib/typescript/components/AlertDialog/index.d.ts.map +1 -1
  63. package/lib/typescript/components/Avatar/styles.d.ts +4 -4
  64. package/lib/typescript/components/Dialog/index.d.ts +16 -10
  65. package/lib/typescript/components/Dialog/index.d.ts.map +1 -1
  66. package/lib/typescript/components/Dialog/styles.d.ts +16 -5
  67. package/lib/typescript/components/Dialog/styles.d.ts.map +1 -1
  68. package/lib/typescript/components/Heading/styles.d.ts +1 -1
  69. package/lib/typescript/components/Stack/styles.d.ts +2 -2
  70. package/lib/typescript/components/Text/styles.d.ts +1 -1
  71. package/lib/typescript/figma/AlertDialog.Description.figma.d.ts +8 -0
  72. package/lib/typescript/figma/AlertDialog.Description.figma.d.ts.map +1 -0
  73. package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts +8 -0
  74. package/lib/typescript/figma/AlertDialog.Footer.figma.d.ts.map +1 -0
  75. package/lib/typescript/figma/AlertDialog.Header.figma.d.ts +8 -0
  76. package/lib/typescript/figma/AlertDialog.Header.figma.d.ts.map +1 -0
  77. package/lib/typescript/figma/AlertDialog.Text.figma.d.ts +8 -0
  78. package/lib/typescript/figma/AlertDialog.Text.figma.d.ts.map +1 -0
  79. package/lib/typescript/figma/AlertDialog.Title.figma.d.ts +8 -0
  80. package/lib/typescript/figma/AlertDialog.Title.figma.d.ts.map +1 -0
  81. package/lib/typescript/figma/AlertDialog.figma.d.ts +8 -0
  82. package/lib/typescript/figma/AlertDialog.figma.d.ts.map +1 -0
  83. package/lib/typescript/figma/Dialog.Description.figma.d.ts +8 -0
  84. package/lib/typescript/figma/Dialog.Description.figma.d.ts.map +1 -0
  85. package/lib/typescript/figma/Dialog.Footer.figma.d.ts +8 -0
  86. package/lib/typescript/figma/Dialog.Footer.figma.d.ts.map +1 -0
  87. package/lib/typescript/figma/Dialog.Header.figma.d.ts +8 -0
  88. package/lib/typescript/figma/Dialog.Header.figma.d.ts.map +1 -0
  89. package/lib/typescript/figma/Dialog.Text.figma.d.ts +8 -0
  90. package/lib/typescript/figma/Dialog.Text.figma.d.ts.map +1 -0
  91. package/lib/typescript/figma/Dialog.Title.figma.d.ts +8 -0
  92. package/lib/typescript/figma/Dialog.Title.figma.d.ts.map +1 -0
  93. package/lib/typescript/figma/Dialog.figma.d.ts +8 -0
  94. package/lib/typescript/figma/Dialog.figma.d.ts.map +1 -0
  95. package/package.json +4 -4
  96. package/src/components/AlertDialog/index.tsx +7 -5
  97. package/src/components/Dialog/index.tsx +95 -29
  98. package/src/components/Dialog/styles.ts +72 -30
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=AlertDialog.Footer.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.Footer.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/AlertDialog.Footer.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAgC1B,wBASE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=AlertDialog.Header.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.Header.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/AlertDialog.Header.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAgB1B,wBAQE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=AlertDialog.Text.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/AlertDialog.Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAM1B,wBAIE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=AlertDialog.Title.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.Title.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/AlertDialog.Title.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAe1B,wBAIE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=AlertDialog.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertDialog.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/AlertDialog.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAyB1B,wBAYE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.Description.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.Description.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.Description.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAM1B,wBAIE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.Footer.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.Footer.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.Footer.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAgB1B,wBASE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.Header.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.Header.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.Header.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAgB1B,wBASE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.Text.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAM1B,wBAIE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.Title.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.Title.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.Title.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAe1B,wBAIE"}
@@ -0,0 +1,8 @@
1
+ import figma from 'figma';
2
+ declare const _default: {
3
+ id: string;
4
+ imports: string[];
5
+ example: figma.TemplateStringResult;
6
+ };
7
+ export default _default;
8
+ //# sourceMappingURL=Dialog.figma.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Dialog.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAiC1B,wBAYE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cdx-ui/components",
3
- "version": "0.0.1-beta.51",
3
+ "version": "0.0.1-beta.53",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "module": "lib/module/index.js",
6
6
  "react-native": "src/index.ts",
@@ -67,9 +67,9 @@
67
67
  "@gorhom/bottom-sheet": "^5.2.6",
68
68
  "class-variance-authority": "^0.7.1",
69
69
  "uniwind": "1.6.1",
70
- "@cdx-ui/primitives": "0.0.1-beta.51",
71
- "@cdx-ui/utils": "0.0.1-beta.51",
72
- "@cdx-ui/icons": "0.0.1-beta.51"
70
+ "@cdx-ui/primitives": "0.0.1-beta.53",
71
+ "@cdx-ui/utils": "0.0.1-beta.53",
72
+ "@cdx-ui/icons": "0.0.1-beta.53"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@react-navigation/bottom-tabs": "*",
@@ -85,7 +85,7 @@ const AlertDialogCancel = forwardRef<View, AlertDialogCancelProps>(
85
85
  }
86
86
 
87
87
  return (
88
- <Button ref={ref} variant="outline" onPress={handlePress} className={className} {...props}>
88
+ <Button ref={ref} variant="ghost" onPress={handlePress} className={className} {...props}>
89
89
  <Button.Label>{children}</Button.Label>
90
90
  </Button>
91
91
  );
@@ -99,11 +99,12 @@ AlertDialogCancel.displayName = 'AlertDialog.Cancel';
99
99
 
100
100
  type AlertDialogCompoundComponent = typeof AlertDialogRoot & {
101
101
  Trigger: typeof Dialog.Trigger;
102
- Content: typeof Dialog.Content;
102
+ Popup: typeof Dialog.Popup;
103
103
  Header: typeof Dialog.Header;
104
104
  Title: typeof Dialog.Title;
105
105
  Description: typeof Dialog.Description;
106
- Body: typeof Dialog.Body;
106
+ Content: typeof Dialog.Content;
107
+ Text: typeof Dialog.Text;
107
108
  Footer: typeof Dialog.Footer;
108
109
  Close: typeof Dialog.Close;
109
110
  Action: typeof AlertDialogAction;
@@ -112,11 +113,12 @@ type AlertDialogCompoundComponent = typeof AlertDialogRoot & {
112
113
 
113
114
  export const AlertDialog = Object.assign(AlertDialogRoot, {
114
115
  Trigger: Dialog.Trigger,
115
- Content: Dialog.Content,
116
+ Popup: Dialog.Popup,
116
117
  Header: Dialog.Header,
117
118
  Title: Dialog.Title,
118
119
  Description: Dialog.Description,
119
- Body: Dialog.Body,
120
+ Content: Dialog.Content,
121
+ Text: Dialog.Text,
120
122
  Footer: Dialog.Footer,
121
123
  Close: Dialog.Close,
122
124
  Action: AlertDialogAction,
@@ -1,14 +1,21 @@
1
1
  import { forwardRef, type ReactNode } from 'react';
2
- import { Pressable, Text, View, type PressableProps, type ViewProps } from 'react-native';
3
- import { Close as CloseIcon } from '@cdx-ui/icons';
2
+ import {
3
+ Pressable,
4
+ Text,
5
+ View,
6
+ type PressableProps,
7
+ type TextProps,
8
+ type ViewProps,
9
+ } from 'react-native';
10
+ import { CheckCircle, Close as CloseIcon, EmergencyHome, Warning } from '@cdx-ui/icons';
4
11
  import {
5
12
  createDialog,
6
- type IDialogBodyProps,
7
13
  type IDialogCloseProps,
8
14
  type IDialogContentProps,
9
15
  type IDialogDescriptionProps,
10
16
  type IDialogFooterProps,
11
17
  type IDialogHeaderProps,
18
+ type IDialogPopupProps,
12
19
  type IDialogRootProps,
13
20
  type IDialogTitleProps,
14
21
  type IDialogTriggerProps,
@@ -16,8 +23,8 @@ import {
16
23
  import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
17
24
  import { Icon } from '../Icon';
18
25
  import {
26
+ type DialogTitleVariantProps,
19
27
  type DialogVariantProps,
20
- dialogBodyVariants,
21
28
  dialogCloseIconVariants,
22
29
  dialogCloseVariants,
23
30
  dialogContentVariants,
@@ -25,6 +32,9 @@ import {
25
32
  dialogFooterVariants,
26
33
  dialogHeaderVariants,
27
34
  dialogOverlayVariants,
35
+ dialogPopupVariants,
36
+ dialogTextVariants,
37
+ dialogTitleIconVariants,
28
38
  dialogTitleVariants,
29
39
  } from './styles';
30
40
 
@@ -59,11 +69,11 @@ const DialogPrimitive = createDialog({
59
69
  Root,
60
70
  Trigger: Pressable,
61
71
  Overlay: StyledOverlay,
62
- Content: View,
72
+ Popup: View,
63
73
  Header: View,
64
74
  Title: Text,
65
75
  Description: Text,
66
- Body: View,
76
+ Content: View,
67
77
  Footer: View,
68
78
  Close: Pressable,
69
79
  });
@@ -78,8 +88,14 @@ export interface DialogRootProps
78
88
  }
79
89
 
80
90
  const DialogRoot = forwardRef<View, DialogRootProps>(
81
- ({ size = 'md', className, children, style, ...props }, ref) => (
82
- <DialogPrimitive ref={ref} className={className} style={style} context={{ size }} {...props}>
91
+ ({ size = 'md', fullBleed = false, className, children, style, ...props }, ref) => (
92
+ <DialogPrimitive
93
+ ref={ref}
94
+ className={className}
95
+ style={style}
96
+ context={{ size, fullBleed }}
97
+ {...props}
98
+ >
83
99
  {children}
84
100
  </DialogPrimitive>
85
101
  ),
@@ -107,29 +123,29 @@ const DialogTrigger = forwardRef<View, DialogTriggerProps>(
107
123
  DialogTrigger.displayName = 'Dialog.Trigger';
108
124
 
109
125
  // =============================================================================
110
- // STYLED CONTENT
126
+ // STYLED POPUP (wraps DialogPrimitive.Popup)
111
127
  // =============================================================================
112
128
 
113
- export interface DialogContentProps extends IDialogContentProps, DialogVariantProps {
129
+ export interface DialogPopupProps extends IDialogPopupProps, Pick<DialogVariantProps, 'size'> {
114
130
  className?: string;
115
131
  children?: ReactNode;
116
132
  }
117
133
 
118
- const DialogContent = forwardRef<View, DialogContentProps>(
134
+ const DialogPopup = forwardRef<View, DialogPopupProps>(
119
135
  ({ size: sizeProp, className, children, style, ...props }, ref) => {
120
136
  const { size: contextSize } = useDialogStyleContext();
121
137
  const size = sizeProp ?? contextSize;
122
- const computedClassName = cn(dialogContentVariants({ size }), className);
138
+ const computedClassName = cn(dialogPopupVariants({ size }), className);
123
139
 
124
140
  return (
125
- <DialogPrimitive.Content ref={ref} className={computedClassName} style={style} {...props}>
141
+ <DialogPrimitive.Popup ref={ref} className={computedClassName} style={style} {...props}>
126
142
  {children}
127
- </DialogPrimitive.Content>
143
+ </DialogPrimitive.Popup>
128
144
  );
129
145
  },
130
146
  );
131
147
 
132
- DialogContent.displayName = 'Dialog.Content';
148
+ DialogPopup.displayName = 'Dialog.Popup';
133
149
 
134
150
  // =============================================================================
135
151
  // STYLED HEADER
@@ -158,14 +174,35 @@ DialogHeader.displayName = 'Dialog.Header';
158
174
  // STYLED TITLE
159
175
  // =============================================================================
160
176
 
161
- export interface DialogTitleProps extends IDialogTitleProps {
177
+ const APPEARANCE_ICON_MAP = {
178
+ danger: EmergencyHome,
179
+ warning: Warning,
180
+ success: CheckCircle,
181
+ } as const;
182
+
183
+ export interface DialogTitleProps extends IDialogTitleProps, DialogTitleVariantProps {
162
184
  className?: string;
163
185
  children?: ReactNode;
164
186
  }
165
187
 
166
188
  const DialogTitle = forwardRef<Text, DialogTitleProps>(
167
- ({ className, children, style, ...props }, ref) => {
168
- const computedClassName = cn(dialogTitleVariants(), className);
189
+ ({ appearance = 'default', className, children, style, ...props }, ref) => {
190
+ const computedClassName = cn(dialogTitleVariants({ appearance }), className);
191
+ const IconComponent =
192
+ appearance && appearance in APPEARANCE_ICON_MAP
193
+ ? APPEARANCE_ICON_MAP[appearance as keyof typeof APPEARANCE_ICON_MAP]
194
+ : null;
195
+
196
+ if (IconComponent) {
197
+ return (
198
+ <View className="flex-row items-center gap-1">
199
+ <Icon as={IconComponent} className={dialogTitleIconVariants({ appearance })} />
200
+ <DialogPrimitive.Title ref={ref} className={computedClassName} style={style} {...props}>
201
+ {children}
202
+ </DialogPrimitive.Title>
203
+ </View>
204
+ );
205
+ }
169
206
 
170
207
  return (
171
208
  <DialogPrimitive.Title ref={ref} className={computedClassName} style={style} {...props}>
@@ -201,27 +238,54 @@ const DialogDescription = forwardRef<Text, DialogDescriptionProps>(
201
238
  DialogDescription.displayName = 'Dialog.Description';
202
239
 
203
240
  // =============================================================================
204
- // STYLED BODY
241
+ // STYLED CONTENT (wraps DialogPrimitive.Content)
242
+ // =============================================================================
243
+
244
+ export interface DialogContentProps extends IDialogContentProps {
245
+ className?: string;
246
+ children?: ReactNode;
247
+ }
248
+
249
+ const DialogContent = forwardRef<View, DialogContentProps>(
250
+ ({ className, children, style, ...props }, ref) => {
251
+ const { fullBleed } = useDialogStyleContext();
252
+ const computedClassName = cn(
253
+ dialogContentVariants({ fullBleed: fullBleed ?? false }),
254
+ className,
255
+ );
256
+
257
+ return (
258
+ <DialogPrimitive.Content ref={ref} className={computedClassName} style={style} {...props}>
259
+ {children}
260
+ </DialogPrimitive.Content>
261
+ );
262
+ },
263
+ );
264
+
265
+ DialogContent.displayName = 'Dialog.Content';
266
+
267
+ // =============================================================================
268
+ // STYLED TEXT
205
269
  // =============================================================================
206
270
 
207
- export interface DialogBodyProps extends IDialogBodyProps {
271
+ export interface DialogTextProps extends TextProps {
208
272
  className?: string;
209
273
  children?: ReactNode;
210
274
  }
211
275
 
212
- const DialogBody = forwardRef<View, DialogBodyProps>(
276
+ const DialogText = forwardRef<Text, DialogTextProps>(
213
277
  ({ className, children, style, ...props }, ref) => {
214
- const computedClassName = cn(dialogBodyVariants(), className);
278
+ const computedClassName = cn(dialogTextVariants(), className);
215
279
 
216
280
  return (
217
- <DialogPrimitive.Body ref={ref} className={computedClassName} style={style} {...props}>
281
+ <Text ref={ref} className={computedClassName} style={style} {...props}>
218
282
  {children}
219
- </DialogPrimitive.Body>
283
+ </Text>
220
284
  );
221
285
  },
222
286
  );
223
287
 
224
- DialogBody.displayName = 'Dialog.Body';
288
+ DialogText.displayName = 'Dialog.Text';
225
289
 
226
290
  // =============================================================================
227
291
  // STYLED FOOTER
@@ -283,22 +347,24 @@ DialogClose.displayName = 'Dialog.Close';
283
347
 
284
348
  type DialogCompoundComponent = typeof DialogRoot & {
285
349
  Trigger: typeof DialogTrigger;
286
- Content: typeof DialogContent;
350
+ Popup: typeof DialogPopup;
287
351
  Header: typeof DialogHeader;
288
352
  Title: typeof DialogTitle;
289
353
  Description: typeof DialogDescription;
290
- Body: typeof DialogBody;
354
+ Content: typeof DialogContent;
355
+ Text: typeof DialogText;
291
356
  Footer: typeof DialogFooter;
292
357
  Close: typeof DialogClose;
293
358
  };
294
359
 
295
360
  export const Dialog = Object.assign(DialogRoot, {
296
361
  Trigger: DialogTrigger,
297
- Content: DialogContent,
362
+ Popup: DialogPopup,
298
363
  Header: DialogHeader,
299
364
  Title: DialogTitle,
300
365
  Description: DialogDescription,
301
- Body: DialogBody,
366
+ Content: DialogContent,
367
+ Text: DialogText,
302
368
  Footer: DialogFooter,
303
369
  Close: DialogClose,
304
370
  }) as DialogCompoundComponent;
@@ -1,36 +1,28 @@
1
1
  import { Platform } from 'react-native';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
- import {
4
- COLOR_BG_INVERSE,
5
- COLOR_BG_PRIMARY,
6
- COLOR_BORDER_DEFAULT,
7
- COLOR_TEXT_PRIMARY,
8
- COLOR_TEXT_SECONDARY,
9
- RADIUS_MD,
10
- SHADOW_MD,
11
- TRANSITION_COLORS,
12
- } from '../../styles/primitives';
3
+ import { TRANSITION_COLORS } from '../../styles/primitives';
13
4
 
14
5
  // ── Overlay ─────────────────────────────────────────────────
15
6
 
16
- export const dialogOverlayVariants = cva(['absolute inset-0', COLOR_BG_INVERSE, 'opacity-50']);
7
+ export const dialogOverlayVariants = cva(['absolute inset-0', 'bg-surface-backdrop']);
17
8
 
18
- // ── Content ─────────────────────────────────────────────────
9
+ // ── Popup (renamed from dialogContentVariants) ──────────────
19
10
 
20
- export const dialogContentVariants = cva(
11
+ export const dialogPopupVariants = cva(
21
12
  [
22
- COLOR_BG_PRIMARY,
23
- `border ${COLOR_BORDER_DEFAULT}`,
24
- RADIUS_MD,
25
- Platform.select({ web: SHADOW_MD, default: '' }),
13
+ 'bg-surface-primary',
14
+ 'rounded-lg',
15
+ Platform.select({ web: 'shadow-lg', default: '' }),
26
16
  'max-h-[85vh] overflow-hidden',
27
17
  ],
28
18
  {
29
19
  variants: {
30
20
  size: {
21
+ xs: 'w-[90%] max-w-xs',
31
22
  sm: 'w-[90%] max-w-sm',
32
23
  md: 'w-[90%] max-w-md',
33
24
  lg: 'w-[90%] max-w-lg',
25
+ xl: 'w-[90%] max-w-xl',
34
26
  full: 'w-full mx-4',
35
27
  },
36
28
  },
@@ -43,46 +35,96 @@ export const dialogContentVariants = cva(
43
35
  // ── Header ──────────────────────────────────────────────────
44
36
 
45
37
  export const dialogHeaderVariants = cva([
46
- 'flex-row items-center justify-between shrink-0',
47
- 'px-6 pt-6 pb-2',
38
+ 'flex-col items-start justify-between shrink-0',
39
+ 'pl-6 pr-14 py-4',
48
40
  ]);
49
41
 
50
42
  // ── Title ───────────────────────────────────────────────────
51
43
 
52
- export const dialogTitleVariants = cva(['text-lg font-semibold', COLOR_TEXT_PRIMARY]);
44
+ export const dialogTitleVariants = cva(['heading-sm', 'text-content-primary'], {
45
+ variants: {
46
+ appearance: {
47
+ default: '',
48
+ danger: '',
49
+ warning: '',
50
+ success: '',
51
+ },
52
+ },
53
+ defaultVariants: {
54
+ appearance: 'default',
55
+ },
56
+ });
57
+
58
+ // ── Title Icon ──────────────────────────────────────────────
59
+
60
+ export const dialogTitleIconVariants = cva(['size-5'], {
61
+ variants: {
62
+ appearance: {
63
+ default: '',
64
+ danger: 'text-content-danger',
65
+ warning: 'text-content-warning',
66
+ success: 'text-content-success',
67
+ },
68
+ },
69
+ defaultVariants: {
70
+ appearance: 'default',
71
+ },
72
+ });
53
73
 
54
74
  // ── Description ─────────────────────────────────────────────
55
75
 
56
- export const dialogDescriptionVariants = cva(['text-sm mt-1', COLOR_TEXT_SECONDARY]);
76
+ export const dialogDescriptionVariants = cva(['body-sm mt-1', 'text-content-secondary']);
77
+
78
+ // ── Content (renamed from dialogBodyVariants) ───────────────
79
+
80
+ export const dialogContentVariants = cva(['px-6 py-0 gap-2 shrink min-h-0'], {
81
+ variants: {
82
+ fullBleed: {
83
+ true: 'px-0',
84
+ false: '',
85
+ },
86
+ },
87
+ defaultVariants: {
88
+ fullBleed: false,
89
+ },
90
+ });
57
91
 
58
- // ── Body ────────────────────────────────────────────────────
92
+ // ── Text ────────────────────────────────────────────────────
59
93
 
60
- export const dialogBodyVariants = cva(['px-6 py-4 shrink min-h-0']);
94
+ export const dialogTextVariants = cva(['body-md', 'text-content-primary']);
61
95
 
62
96
  // ── Footer ──────────────────────────────────────────────────
63
97
 
64
98
  export const dialogFooterVariants = cva([
65
99
  'flex-row items-center justify-end shrink-0',
66
- 'gap-3 px-6 pt-2 pb-6',
100
+ 'gap-2 px-6 pt-4 pb-6',
67
101
  ]);
68
102
 
69
103
  // ── Close ───────────────────────────────────────────────────
70
104
 
71
105
  export const dialogCloseVariants = cva([
72
- 'p-1 -m-1 rounded-full',
106
+ 'absolute right-[14px] top-[14px]',
107
+ 'min-w-[32px] min-h-[32px] items-center justify-center',
108
+ 'p-[6px] rounded-full',
73
109
  TRANSITION_COLORS,
74
110
  Platform.select({
75
111
  default: 'data-[active=true]:opacity-70',
76
112
  web: [
77
- 'data-[hover=true]:bg-slate-100',
78
- 'data-[active=true]:bg-slate-200',
79
- 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-slate-400/50 data-[focus-visible=true]:ring-offset-2',
113
+ 'data-[hover=true]:bg-surface-primary-hover',
114
+ 'data-[active=true]:bg-surface-primary-active',
115
+ 'data-[focus-visible=true]:ring-2 data-[focus-visible=true]:ring-stroke-focus data-[focus-visible=true]:ring-offset-2',
80
116
  ].join(' '),
81
117
  }),
82
118
  ]);
83
119
 
84
120
  // ── Close Icon ──────────────────────────────────────────────
85
121
 
86
- export const dialogCloseIconVariants = cva(['size-5 text-slate-500']);
122
+ export const dialogCloseIconVariants = cva(['size-5 text-content-tertiary']);
123
+
124
+ // ── Exported types ──────────────────────────────────────────
125
+
126
+ export type DialogVariantProps = VariantProps<typeof dialogPopupVariants> & {
127
+ fullBleed?: boolean;
128
+ };
87
129
 
88
- export type DialogVariantProps = VariantProps<typeof dialogContentVariants>;
130
+ export type DialogTitleVariantProps = VariantProps<typeof dialogTitleVariants>;