@cdx-ui/components 0.0.1-alpha.14 → 0.0.1-alpha.15

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 (120) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/components/Box/Box.js +1 -0
  3. package/lib/commonjs/components/Box/Box.js.map +1 -1
  4. package/lib/commonjs/components/Button/index.js +28 -13
  5. package/lib/commonjs/components/Button/index.js.map +1 -1
  6. package/lib/commonjs/components/Button/styles.js +324 -140
  7. package/lib/commonjs/components/Button/styles.js.map +1 -1
  8. package/lib/commonjs/components/Checkbox/index.js +18 -11
  9. package/lib/commonjs/components/Checkbox/index.js.map +1 -1
  10. package/lib/commonjs/components/Checkbox/styles.js +17 -16
  11. package/lib/commonjs/components/Checkbox/styles.js.map +1 -1
  12. package/lib/commonjs/components/Heading/index.js.map +1 -1
  13. package/lib/commonjs/components/Heading/styles.js +3 -2
  14. package/lib/commonjs/components/Heading/styles.js.map +1 -1
  15. package/lib/commonjs/components/Icon/index.js +2 -1
  16. package/lib/commonjs/components/Icon/index.js.map +1 -1
  17. package/lib/commonjs/components/Input/index.js +10 -16
  18. package/lib/commonjs/components/Input/index.js.map +1 -1
  19. package/lib/commonjs/components/Input/styles.js +16 -30
  20. package/lib/commonjs/components/Input/styles.js.map +1 -1
  21. package/lib/commonjs/components/Link/styles.js +6 -1
  22. package/lib/commonjs/components/Link/styles.js.map +1 -1
  23. package/lib/commonjs/components/Select/index.js +11 -12
  24. package/lib/commonjs/components/Select/index.js.map +1 -1
  25. package/lib/commonjs/components/Select/styles.js +29 -53
  26. package/lib/commonjs/components/Select/styles.js.map +1 -1
  27. package/lib/commonjs/components/Stack/styles.js +2 -14
  28. package/lib/commonjs/components/Stack/styles.js.map +1 -1
  29. package/lib/commonjs/components/Text/index.js.map +1 -1
  30. package/lib/commonjs/components/Text/styles.js +3 -2
  31. package/lib/commonjs/components/Text/styles.js.map +1 -1
  32. package/lib/commonjs/styles/index.js +17 -0
  33. package/lib/commonjs/styles/index.js.map +1 -0
  34. package/lib/commonjs/styles/primitives.js +123 -0
  35. package/lib/commonjs/styles/primitives.js.map +1 -0
  36. package/lib/module/components/Box/Box.js +1 -0
  37. package/lib/module/components/Box/Box.js.map +1 -1
  38. package/lib/module/components/Button/index.js +29 -14
  39. package/lib/module/components/Button/index.js.map +1 -1
  40. package/lib/module/components/Button/styles.js +323 -139
  41. package/lib/module/components/Button/styles.js.map +1 -1
  42. package/lib/module/components/Checkbox/index.js +19 -12
  43. package/lib/module/components/Checkbox/index.js.map +1 -1
  44. package/lib/module/components/Checkbox/styles.js +17 -16
  45. package/lib/module/components/Checkbox/styles.js.map +1 -1
  46. package/lib/module/components/Heading/index.js.map +1 -1
  47. package/lib/module/components/Heading/styles.js +3 -2
  48. package/lib/module/components/Heading/styles.js.map +1 -1
  49. package/lib/module/components/Icon/index.js +2 -1
  50. package/lib/module/components/Icon/index.js.map +1 -1
  51. package/lib/module/components/Input/index.js +10 -16
  52. package/lib/module/components/Input/index.js.map +1 -1
  53. package/lib/module/components/Input/styles.js +16 -30
  54. package/lib/module/components/Input/styles.js.map +1 -1
  55. package/lib/module/components/Link/styles.js +6 -1
  56. package/lib/module/components/Link/styles.js.map +1 -1
  57. package/lib/module/components/Select/index.js +12 -13
  58. package/lib/module/components/Select/index.js.map +1 -1
  59. package/lib/module/components/Select/styles.js +29 -53
  60. package/lib/module/components/Select/styles.js.map +1 -1
  61. package/lib/module/components/Stack/styles.js +2 -14
  62. package/lib/module/components/Stack/styles.js.map +1 -1
  63. package/lib/module/components/Text/index.js.map +1 -1
  64. package/lib/module/components/Text/styles.js +3 -2
  65. package/lib/module/components/Text/styles.js.map +1 -1
  66. package/lib/module/styles/index.js +4 -0
  67. package/lib/module/styles/index.js.map +1 -0
  68. package/lib/module/styles/primitives.js +119 -0
  69. package/lib/module/styles/primitives.js.map +1 -0
  70. package/lib/typescript/components/Box/Box.d.ts +1 -0
  71. package/lib/typescript/components/Box/Box.d.ts.map +1 -1
  72. package/lib/typescript/components/Button/index.d.ts +6 -3
  73. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  74. package/lib/typescript/components/Button/styles.d.ts +14 -8
  75. package/lib/typescript/components/Button/styles.d.ts.map +1 -1
  76. package/lib/typescript/components/Checkbox/index.d.ts +6 -4
  77. package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
  78. package/lib/typescript/components/Checkbox/styles.d.ts +4 -4
  79. package/lib/typescript/components/Checkbox/styles.d.ts.map +1 -1
  80. package/lib/typescript/components/Heading/index.d.ts +6 -2
  81. package/lib/typescript/components/Heading/index.d.ts.map +1 -1
  82. package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
  83. package/lib/typescript/components/Icon/index.d.ts +1 -2
  84. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  85. package/lib/typescript/components/Input/index.d.ts +6 -4
  86. package/lib/typescript/components/Input/index.d.ts.map +1 -1
  87. package/lib/typescript/components/Input/styles.d.ts +5 -7
  88. package/lib/typescript/components/Input/styles.d.ts.map +1 -1
  89. package/lib/typescript/components/Link/styles.d.ts.map +1 -1
  90. package/lib/typescript/components/Select/index.d.ts +6 -3
  91. package/lib/typescript/components/Select/index.d.ts.map +1 -1
  92. package/lib/typescript/components/Select/styles.d.ts +6 -8
  93. package/lib/typescript/components/Select/styles.d.ts.map +1 -1
  94. package/lib/typescript/components/Stack/styles.d.ts.map +1 -1
  95. package/lib/typescript/components/Text/index.d.ts +6 -2
  96. package/lib/typescript/components/Text/index.d.ts.map +1 -1
  97. package/lib/typescript/components/Text/styles.d.ts.map +1 -1
  98. package/lib/typescript/styles/index.d.ts +2 -0
  99. package/lib/typescript/styles/index.d.ts.map +1 -0
  100. package/lib/typescript/styles/primitives.d.ts +85 -0
  101. package/lib/typescript/styles/primitives.d.ts.map +1 -0
  102. package/package.json +4 -4
  103. package/src/components/Box/Box.tsx +1 -0
  104. package/src/components/Button/index.tsx +23 -15
  105. package/src/components/Button/styles.ts +353 -149
  106. package/src/components/Checkbox/index.tsx +15 -21
  107. package/src/components/Checkbox/styles.ts +33 -24
  108. package/src/components/Heading/index.tsx +4 -1
  109. package/src/components/Heading/styles.tsx +3 -2
  110. package/src/components/Icon/index.tsx +7 -2
  111. package/src/components/Input/index.tsx +9 -20
  112. package/src/components/Input/styles.ts +42 -37
  113. package/src/components/Link/styles.ts +10 -1
  114. package/src/components/Select/index.tsx +12 -11
  115. package/src/components/Select/styles.ts +63 -74
  116. package/src/components/Stack/styles.ts +2 -14
  117. package/src/components/Text/index.tsx +2 -1
  118. package/src/components/Text/styles.tsx +3 -2
  119. package/src/styles/index.ts +1 -0
  120. package/src/styles/primitives.ts +107 -0
@@ -1,5 +1,13 @@
1
1
  import { Platform } from 'react-native';
2
2
  import { cva, type VariantProps } from 'class-variance-authority';
3
+ import {
4
+ COLOR_BORDER_DEFAULT,
5
+ DISABLED_CURSOR,
6
+ DISABLED_OPACITY,
7
+ RADIUS_SM,
8
+ SEMANTIC_COLORS,
9
+ TRANSITION_COLORS,
10
+ } from '../../styles/primitives';
3
11
 
4
12
  // TODO: Split into 2 files
5
13
  // TODO: Create cva wrapper
@@ -7,38 +15,43 @@ import { cva, type VariantProps } from 'class-variance-authority';
7
15
  export const buttonRootVariants = cva(
8
16
  [
9
17
  'flex-row items-center justify-center',
10
- 'rounded-md',
18
+ RADIUS_SM,
11
19
  'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
12
- 'transition-colors duration-150', // TODO: Transition not working on mobile
13
- 'data-[disabled=true]:opacity-60 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none',
14
- 'web:data-[focus-visible=true]:ring-3',
20
+ TRANSITION_COLORS,
21
+ DISABLED_OPACITY,
22
+ DISABLED_CURSOR,
23
+ 'web:data-[focus-visible=true]:ring-2 web:data-[focus-visible=true]:ring-slate-400/50 web:data-[focus-visible=true]:ring-offset-2',
15
24
  ],
16
25
  {
17
26
  variants: {
18
27
  variant: {
19
- solid: [],
20
- subtle: [],
28
+ strong: [],
21
29
  outline: [
22
- 'bg-transparent border border-neutral-border-strong',
23
- 'data-[hover=true]:bg-neutral-background',
24
- 'data-[active=true]:bg-neutral-border',
30
+ 'bg-transparent',
31
+ `border ${COLOR_BORDER_DEFAULT}`,
32
+ 'data-[hover=true]:bg-slate-50',
33
+ 'data-[active=true]:bg-slate-100',
25
34
  ],
26
35
  ghost: [
27
36
  'bg-transparent',
28
- 'data-[hover=true]:bg-neutral-background',
29
- 'data-[active=true]:bg-neutral-border',
37
+ 'data-[hover=true]:bg-slate-50',
38
+ 'data-[active=true]:bg-slate-100',
30
39
  ],
31
40
  },
32
41
  color: {
33
- primary: 'web:data-[focus-visible=true]:ring-blue-300/50',
34
- secondary: 'web:data-[focus-visible=true]:ring-amber-300/50',
35
- success: 'web:data-[focus-visible=true]:ring-green-300/50',
36
- danger: 'web:data-[focus-visible=true]:ring-red-300/50',
42
+ action: [],
43
+ danger: [],
44
+ warning: [],
45
+ success: [],
46
+ info: [],
37
47
  },
38
48
  size: {
39
- sm: 'h-8 px-3 gap-1.5',
40
- md: 'h-10 px-4 gap-2',
41
- lg: 'h-12 px-6 gap-2.5',
49
+ default: 'h-10 px-4 gap-2',
50
+ small: 'h-8 px-3 gap-1.5',
51
+ },
52
+ mode: {
53
+ light: [],
54
+ dark: [],
42
55
  },
43
56
  fullWidth: {
44
57
  true: 'w-full',
@@ -46,22 +59,34 @@ export const buttonRootVariants = cva(
46
59
  },
47
60
  },
48
61
  compoundVariants: [
62
+ // --- strong × color (light mode) ---
49
63
  {
50
- variant: 'solid',
51
- color: 'primary',
64
+ variant: 'strong',
65
+ color: 'action',
52
66
  className: [
53
- 'bg-blue-500',
67
+ SEMANTIC_COLORS.action.bg,
54
68
  Platform.select({
55
- default: 'data-[active=true]:bg-blue-700',
56
- web: 'data-[hover=true]:bg-blue-600 data-[active=true]:data-[hover=true]:bg-blue-700',
69
+ default: 'data-[active=true]:bg-slate-700',
70
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700',
57
71
  }),
58
72
  ],
59
73
  },
60
74
  {
61
- variant: 'solid',
62
- color: 'secondary',
75
+ variant: 'strong',
76
+ color: 'danger',
63
77
  className: [
64
- 'bg-amber-500',
78
+ SEMANTIC_COLORS.danger.bg,
79
+ Platform.select({
80
+ default: 'data-[active=true]:bg-red-800',
81
+ web: 'data-[hover=true]:bg-red-700 data-[active=true]:data-[hover=true]:bg-red-800',
82
+ }),
83
+ ],
84
+ },
85
+ {
86
+ variant: 'strong',
87
+ color: 'warning',
88
+ className: [
89
+ SEMANTIC_COLORS.warning.bg,
65
90
  Platform.select({
66
91
  default: 'data-[active=true]:bg-amber-700',
67
92
  web: 'data-[hover=true]:bg-amber-600 data-[active=true]:data-[hover=true]:bg-amber-700',
@@ -69,135 +94,177 @@ export const buttonRootVariants = cva(
69
94
  ],
70
95
  },
71
96
  {
72
- variant: 'solid',
97
+ variant: 'strong',
73
98
  color: 'success',
74
99
  className: [
75
- 'bg-green-500',
100
+ SEMANTIC_COLORS.success.bg,
76
101
  Platform.select({
77
- default: 'data-[active=true]:bg-green-700',
78
- web: 'data-[hover=true]:bg-green-600 data-[active=true]:data-[hover=true]:bg-green-700',
102
+ default: 'data-[active=true]:bg-green-800',
103
+ web: 'data-[hover=true]:bg-green-700 data-[active=true]:data-[hover=true]:bg-green-800',
79
104
  }),
80
105
  ],
81
106
  },
82
107
  {
83
- variant: 'solid',
84
- color: 'danger',
108
+ variant: 'strong',
109
+ color: 'info',
110
+ className: [
111
+ SEMANTIC_COLORS.info.bg,
112
+ Platform.select({
113
+ default: 'data-[active=true]:bg-sky-700',
114
+ web: 'data-[hover=true]:bg-sky-600 data-[active=true]:data-[hover=true]:bg-sky-700',
115
+ }),
116
+ ],
117
+ },
118
+
119
+ // --- strong × action × mode: dark ---
120
+ {
121
+ variant: 'strong',
122
+ color: 'action',
123
+ mode: 'dark',
124
+ className: [
125
+ 'bg-slate-200',
126
+ Platform.select({
127
+ default: 'data-[active=true]:bg-slate-400',
128
+ web: 'data-[hover=true]:bg-slate-300 data-[active=true]:data-[hover=true]:bg-slate-400',
129
+ }),
130
+ ],
131
+ },
132
+
133
+ // --- outline × color (light mode) ---
134
+ {
135
+ variant: 'outline',
136
+ color: 'action',
85
137
  className: [
86
- 'bg-red-500',
138
+ 'border-slate-300',
87
139
  Platform.select({
88
- default: 'data-[active=true]:bg-red-700',
89
- web: 'data-[hover=true]:bg-red-600 data-[active=true]:data-[hover=true]:bg-red-700',
140
+ default: 'data-[active=true]:border-slate-500 data-[active=true]:bg-slate-100',
141
+ web: 'data-[hover=true]:border-slate-400 data-[hover=true]:bg-slate-50 data-[active=true]:data-[hover=true]:border-slate-500 data-[active=true]:data-[hover=true]:bg-slate-100',
90
142
  }),
91
143
  ],
92
144
  },
93
145
  {
94
- variant: 'subtle',
95
- color: 'primary',
146
+ variant: 'outline',
147
+ color: 'danger',
96
148
  className: [
97
- 'bg-blue-100',
149
+ 'border-red-600',
98
150
  Platform.select({
99
- default: 'data-[active=true]:bg-blue-200',
100
- web: 'data-[hover=true]:bg-blue-200 data-[active=true]:data-[hover=true]:bg-blue-300',
151
+ default: 'data-[active=true]:border-red-800 data-[active=true]:bg-red-100',
152
+ web: 'data-[hover=true]:border-red-700 data-[hover=true]:bg-red-50 data-[active=true]:data-[hover=true]:border-red-800 data-[active=true]:data-[hover=true]:bg-red-100',
101
153
  }),
102
154
  ],
103
155
  },
104
156
  {
105
- variant: 'subtle',
106
- color: 'secondary',
157
+ variant: 'outline',
158
+ color: 'warning',
107
159
  className: [
108
- 'bg-amber-200',
160
+ 'border-amber-500',
109
161
  Platform.select({
110
- default: 'data-[active=true]:bg-amber-300',
111
- web: 'data-[hover=true]:bg-amber-300 data-[active=true]:data-[hover=true]:bg-amber-400',
162
+ default: 'data-[active=true]:border-amber-700 data-[active=true]:bg-amber-50',
163
+ web: 'data-[hover=true]:border-amber-600 data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:border-amber-700 data-[active=true]:data-[hover=true]:bg-amber-100',
112
164
  }),
113
165
  ],
114
166
  },
115
167
  {
116
- variant: 'subtle',
168
+ variant: 'outline',
117
169
  color: 'success',
118
170
  className: [
119
- 'bg-green-200',
171
+ 'border-green-600',
120
172
  Platform.select({
121
- default: 'data-[active=true]:bg-green-300',
122
- web: 'data-[hover=true]:bg-green-300 data-[active=true]:data-[hover=true]:bg-green-400',
173
+ default: 'data-[active=true]:border-green-800 data-[active=true]:bg-green-100',
174
+ web: 'data-[hover=true]:border-green-700 data-[hover=true]:bg-green-50 data-[active=true]:data-[hover=true]:border-green-800 data-[active=true]:data-[hover=true]:bg-green-100',
123
175
  }),
124
176
  ],
125
177
  },
126
178
  {
127
- variant: 'subtle',
128
- color: 'danger',
179
+ variant: 'outline',
180
+ color: 'info',
129
181
  className: [
130
- 'bg-red-200',
182
+ 'border-sky-500',
131
183
  Platform.select({
132
- default: 'data-[active=true]:bg-red-300',
133
- web: 'data-[hover=true]:bg-red-300 data-[active=true]:data-[hover=true]:bg-red-400',
184
+ default: 'data-[active=true]:border-sky-700 data-[active=true]:bg-sky-100',
185
+ web: 'data-[hover=true]:border-sky-600 data-[hover=true]:bg-sky-50 data-[active=true]:data-[hover=true]:border-sky-700 data-[active=true]:data-[hover=true]:bg-sky-100',
134
186
  }),
135
187
  ],
136
188
  },
189
+
190
+ // --- outline × action × mode: dark ---
137
191
  {
138
192
  variant: 'outline',
139
- color: 'primary',
193
+ color: 'action',
194
+ mode: 'dark',
140
195
  className: [
141
- 'border-blue-500',
142
- 'data-[focus-visible=true]:border-blue-500',
196
+ 'bg-transparent border-slate-700',
143
197
  Platform.select({
144
- default: 'data-[active=true]:border-blue-700 data-[active=true]:bg-blue-100',
145
- web: 'data-[hover=true]:border-blue-600 data-[hover=true]:bg-blue-100 data-[active=true]:data-[hover=true]:border-blue-700 data-[active=true]:data-[hover=true]:bg-blue-200',
198
+ default: 'data-[active=true]:bg-slate-700',
199
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700',
146
200
  }),
147
201
  ],
148
202
  },
203
+ // --- outline × semantic colors × mode: dark ---
149
204
  {
150
205
  variant: 'outline',
151
- color: 'secondary',
206
+ color: 'danger',
207
+ mode: 'dark',
152
208
  className: [
153
- 'border-amber-500',
154
- 'data-[focus-visible=true]:border-amber-500',
209
+ 'bg-transparent border-red-500',
155
210
  Platform.select({
156
- default: 'data-[active=true]:border-amber-700 data-[active=true]:bg-amber-50',
157
- web: 'data-[hover=true]:border-amber-600 data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:border-amber-700 data-[active=true]:data-[hover=true]:bg-amber-100',
211
+ default: 'data-[active=true]:bg-red-950',
212
+ web: 'data-[hover=true]:bg-red-950/50 data-[active=true]:data-[hover=true]:bg-red-950',
213
+ }),
214
+ ],
215
+ },
216
+ {
217
+ variant: 'outline',
218
+ color: 'warning',
219
+ mode: 'dark',
220
+ className: [
221
+ 'bg-transparent border-amber-500',
222
+ Platform.select({
223
+ default: 'data-[active=true]:bg-amber-950',
224
+ web: 'data-[hover=true]:bg-amber-950/50 data-[active=true]:data-[hover=true]:bg-amber-950',
158
225
  }),
159
226
  ],
160
227
  },
161
228
  {
162
229
  variant: 'outline',
163
230
  color: 'success',
231
+ mode: 'dark',
164
232
  className: [
165
- 'border-green-500',
166
- 'data-[focus-visible=true]:border-green-500',
233
+ 'bg-transparent border-green-500',
167
234
  Platform.select({
168
- default: 'data-[active=true]:border-green-700 data-[active=true]:bg-green-100',
169
- web: 'data-[hover=true]:border-green-600 data-[hover=true]:bg-green-100 data-[active=true]:data-[hover=true]:border-green-700 data-[active=true]:data-[hover=true]:bg-green-200',
235
+ default: 'data-[active=true]:bg-green-950',
236
+ web: 'data-[hover=true]:bg-green-950/50 data-[active=true]:data-[hover=true]:bg-green-950',
170
237
  }),
171
238
  ],
172
239
  },
173
240
  {
174
241
  variant: 'outline',
175
- color: 'danger',
242
+ color: 'info',
243
+ mode: 'dark',
176
244
  className: [
177
- 'border-red-500',
178
- 'data-[focus-visible=true]:border-red-500',
245
+ 'bg-transparent border-sky-500',
179
246
  Platform.select({
180
- default: 'data-[active=true]:border-red-700 data-[active=true]:bg-red-100',
181
- web: 'data-[hover=true]:border-red-600 data-[hover=true]:bg-red-100 data-[active=true]:data-[hover=true]:border-red-700 data-[active=true]:data-[hover=true]:bg-red-200',
247
+ default: 'data-[active=true]:bg-sky-950',
248
+ web: 'data-[hover=true]:bg-sky-950/50 data-[active=true]:data-[hover=true]:bg-sky-950',
182
249
  }),
183
250
  ],
184
251
  },
252
+
253
+ // --- ghost × color (light mode, non-action) ---
185
254
  {
186
255
  variant: 'ghost',
187
- color: 'primary',
256
+ color: 'danger',
188
257
  className: [
189
- 'bg-transparent',
190
258
  Platform.select({
191
- default: 'data-[active=true]:bg-blue-100',
192
- web: 'data-[hover=true]:bg-blue-50 data-[active=true]:data-[hover=true]:bg-blue-100',
259
+ default: 'data-[active=true]:bg-red-100',
260
+ web: 'data-[hover=true]:bg-red-50 data-[active=true]:data-[hover=true]:bg-red-100',
193
261
  }),
194
262
  ],
195
263
  },
196
264
  {
197
265
  variant: 'ghost',
198
- color: 'secondary',
266
+ color: 'warning',
199
267
  className: [
200
- 'bg-transparent',
201
268
  Platform.select({
202
269
  default: 'data-[active=true]:bg-amber-100',
203
270
  web: 'data-[hover=true]:bg-amber-50 data-[active=true]:data-[hover=true]:bg-amber-100',
@@ -208,29 +275,86 @@ export const buttonRootVariants = cva(
208
275
  variant: 'ghost',
209
276
  color: 'success',
210
277
  className: [
211
- 'bg-transparent',
212
278
  Platform.select({
213
279
  default: 'data-[active=true]:bg-green-100',
214
280
  web: 'data-[hover=true]:bg-green-50 data-[active=true]:data-[hover=true]:bg-green-100',
215
281
  }),
216
282
  ],
217
283
  },
284
+ {
285
+ variant: 'ghost',
286
+ color: 'info',
287
+ className: [
288
+ Platform.select({
289
+ default: 'data-[active=true]:bg-sky-100',
290
+ web: 'data-[hover=true]:bg-sky-50 data-[active=true]:data-[hover=true]:bg-sky-100',
291
+ }),
292
+ ],
293
+ },
294
+
295
+ // --- ghost × action × mode: dark ---
296
+ {
297
+ variant: 'ghost',
298
+ color: 'action',
299
+ mode: 'dark',
300
+ className: [
301
+ Platform.select({
302
+ default: 'data-[active=true]:bg-slate-700',
303
+ web: 'data-[hover=true]:bg-slate-800 data-[active=true]:data-[hover=true]:bg-slate-700',
304
+ }),
305
+ ],
306
+ },
307
+ // --- ghost × semantic colors × mode: dark ---
218
308
  {
219
309
  variant: 'ghost',
220
310
  color: 'danger',
311
+ mode: 'dark',
221
312
  className: [
222
- 'bg-transparent',
223
313
  Platform.select({
224
- default: 'data-[active=true]:bg-red-100',
225
- web: 'data-[hover=true]:bg-red-50 data-[active=true]:data-[hover=true]:bg-red-100',
314
+ default: 'data-[active=true]:bg-red-950',
315
+ web: 'data-[hover=true]:bg-red-950/50 data-[active=true]:data-[hover=true]:bg-red-950',
316
+ }),
317
+ ],
318
+ },
319
+ {
320
+ variant: 'ghost',
321
+ color: 'warning',
322
+ mode: 'dark',
323
+ className: [
324
+ Platform.select({
325
+ default: 'data-[active=true]:bg-amber-950',
326
+ web: 'data-[hover=true]:bg-amber-950/50 data-[active=true]:data-[hover=true]:bg-amber-950',
327
+ }),
328
+ ],
329
+ },
330
+ {
331
+ variant: 'ghost',
332
+ color: 'success',
333
+ mode: 'dark',
334
+ className: [
335
+ Platform.select({
336
+ default: 'data-[active=true]:bg-green-950',
337
+ web: 'data-[hover=true]:bg-green-950/50 data-[active=true]:data-[hover=true]:bg-green-950',
338
+ }),
339
+ ],
340
+ },
341
+ {
342
+ variant: 'ghost',
343
+ color: 'info',
344
+ mode: 'dark',
345
+ className: [
346
+ Platform.select({
347
+ default: 'data-[active=true]:bg-sky-950',
348
+ web: 'data-[hover=true]:bg-sky-950/50 data-[active=true]:data-[hover=true]:bg-sky-950',
226
349
  }),
227
350
  ],
228
351
  },
229
352
  ],
230
353
  defaultVariants: {
231
- variant: 'solid',
232
- color: 'primary',
233
- size: 'md',
354
+ variant: 'strong',
355
+ color: 'action',
356
+ size: 'default',
357
+ mode: 'light',
234
358
  fullWidth: false,
235
359
  },
236
360
  },
@@ -239,58 +363,63 @@ export const buttonRootVariants = cva(
239
363
  export const buttonTextVariants = cva(['font-medium', 'text-center'], {
240
364
  variants: {
241
365
  variant: {
242
- solid: 'text-white',
243
- subtle: [],
366
+ strong: [],
244
367
  outline: [],
245
368
  ghost: [],
246
369
  },
247
370
  color: {
248
- primary: [],
249
- secondary: [],
250
- success: [],
371
+ action: [],
251
372
  danger: [],
373
+ warning: [],
374
+ success: [],
375
+ info: [],
252
376
  },
253
377
  size: {
254
- sm: 'text-sm',
255
- md: 'text-base',
256
- lg: 'text-lg',
378
+ default: 'text-base',
379
+ small: 'text-sm',
380
+ },
381
+ mode: {
382
+ light: [],
383
+ dark: [],
257
384
  },
258
385
  },
259
386
  compoundVariants: [
387
+ // --- strong × color (light mode) — always white text ---
388
+ { variant: 'strong', color: 'action', className: 'text-white' },
389
+ { variant: 'strong', color: 'danger', className: 'text-white' },
390
+ { variant: 'strong', color: 'warning', className: 'text-white' },
391
+ { variant: 'strong', color: 'success', className: 'text-white' },
392
+ { variant: 'strong', color: 'info', className: 'text-white' },
393
+
394
+ // --- strong × action × mode: dark ---
395
+ { variant: 'strong', color: 'action', mode: 'dark', className: 'text-slate-900' },
396
+
397
+ // --- outline/ghost × color (light mode text) ---
260
398
  {
261
- variant: 'subtle',
262
- color: 'primary',
263
- className: 'text-blue-950',
264
- },
265
- {
266
- variant: 'subtle',
267
- color: 'secondary',
268
- className: 'text-amber-950',
269
- },
270
- {
271
- variant: 'subtle',
272
- color: 'success',
273
- className: 'text-green-950',
274
- },
275
- {
276
- variant: 'subtle',
277
- color: 'danger',
278
- className: 'text-red-950',
399
+ variant: ['outline', 'ghost'],
400
+ color: 'action',
401
+ className: [
402
+ 'text-slate-900',
403
+ Platform.select({
404
+ default: 'data-[active=true]:text-slate-700',
405
+ web: 'data-[hover=true]:text-slate-800 data-[active=true]:data-[hover=true]:text-slate-700',
406
+ }),
407
+ ],
279
408
  },
280
409
  {
281
410
  variant: ['outline', 'ghost'],
282
- color: 'primary',
411
+ color: 'danger',
283
412
  className: [
284
- 'text-blue-500',
413
+ 'text-red-600',
285
414
  Platform.select({
286
- default: 'data-[active=true]:text-blue-700',
287
- web: 'data-[hover=true]:text-blue-600 data-[active=true]:data-[hover=true]:text-blue-700',
415
+ default: 'data-[active=true]:text-red-800',
416
+ web: 'data-[hover=true]:text-red-700 data-[active=true]:data-[hover=true]:text-red-800',
288
417
  }),
289
418
  ],
290
419
  },
291
420
  {
292
421
  variant: ['outline', 'ghost'],
293
- color: 'secondary',
422
+ color: 'warning',
294
423
  className: [
295
424
  'text-amber-600',
296
425
  Platform.select({
@@ -312,83 +441,146 @@ export const buttonTextVariants = cva(['font-medium', 'text-center'], {
312
441
  },
313
442
  {
314
443
  variant: ['outline', 'ghost'],
315
- color: 'danger',
444
+ color: 'info',
316
445
  className: [
317
- 'text-red-500',
446
+ 'text-sky-600',
318
447
  Platform.select({
319
- default: 'data-[active=true]:text-red-700',
320
- web: 'data-[hover=true]:text-red-600 data-[active=true]:data-[hover=true]:text-red-700',
448
+ default: 'data-[active=true]:text-sky-800',
449
+ web: 'data-[hover=true]:text-sky-700 data-[active=true]:data-[hover=true]:text-sky-800',
321
450
  }),
322
451
  ],
323
452
  },
453
+
454
+ // --- outline/ghost × action × mode: dark ---
455
+ {
456
+ variant: ['outline', 'ghost'],
457
+ color: 'action',
458
+ mode: 'dark',
459
+ className: [
460
+ 'text-white',
461
+ Platform.select({
462
+ default: 'data-[active=true]:text-white',
463
+ web: 'data-[hover=true]:text-white data-[active=true]:data-[hover=true]:text-white',
464
+ }),
465
+ ],
466
+ },
467
+ // --- outline/ghost × semantic colors × mode: dark ---
468
+ {
469
+ variant: ['outline', 'ghost'],
470
+ color: 'danger',
471
+ mode: 'dark',
472
+ className: 'text-red-400',
473
+ },
474
+ {
475
+ variant: ['outline', 'ghost'],
476
+ color: 'warning',
477
+ mode: 'dark',
478
+ className: 'text-amber-400',
479
+ },
480
+ {
481
+ variant: ['outline', 'ghost'],
482
+ color: 'success',
483
+ mode: 'dark',
484
+ className: 'text-green-400',
485
+ },
486
+ {
487
+ variant: ['outline', 'ghost'],
488
+ color: 'info',
489
+ mode: 'dark',
490
+ className: 'text-sky-400',
491
+ },
324
492
  ],
325
493
  defaultVariants: {
326
- variant: 'solid',
327
- color: 'primary',
328
- size: 'md',
494
+ variant: 'strong',
495
+ color: 'action',
496
+ size: 'default',
497
+ mode: 'light',
329
498
  },
330
499
  });
331
500
 
332
501
  export const buttonSpinnerVariants = cva([], {
333
502
  variants: {
334
503
  variant: {
335
- solid: 'accent-white',
336
- subtle: [],
504
+ strong: 'accent-white',
337
505
  outline: [],
338
506
  ghost: [],
339
507
  },
340
508
  color: {
341
- primary: [],
342
- secondary: [],
343
- success: [],
509
+ action: [],
344
510
  danger: [],
511
+ warning: [],
512
+ success: [],
513
+ info: [],
514
+ },
515
+ mode: {
516
+ light: [],
517
+ dark: [],
345
518
  },
346
519
  },
347
520
  compoundVariants: [
521
+ // --- outline/ghost × color (light mode) ---
522
+ {
523
+ variant: ['outline', 'ghost'],
524
+ color: 'action',
525
+ className: 'accent-slate-900',
526
+ },
348
527
  {
349
- variant: 'subtle',
350
- color: 'primary',
351
- className: 'accent-blue-950',
528
+ variant: ['outline', 'ghost'],
529
+ color: 'danger',
530
+ className: 'accent-red-600',
352
531
  },
353
532
  {
354
- variant: 'subtle',
355
- color: 'secondary',
356
- className: 'accent-amber-950',
533
+ variant: ['outline', 'ghost'],
534
+ color: 'warning',
535
+ className: 'accent-amber-600',
357
536
  },
358
537
  {
359
- variant: 'subtle',
538
+ variant: ['outline', 'ghost'],
360
539
  color: 'success',
361
- className: 'accent-green-950',
540
+ className: 'accent-green-600',
362
541
  },
363
542
  {
364
- variant: 'subtle',
365
- color: 'danger',
366
- className: 'accent-red-950',
543
+ variant: ['outline', 'ghost'],
544
+ color: 'info',
545
+ className: 'accent-sky-600',
546
+ },
547
+
548
+ // --- outline/ghost × color × mode: dark ---
549
+ {
550
+ variant: ['outline', 'ghost'],
551
+ color: 'action',
552
+ mode: 'dark',
553
+ className: 'accent-white',
367
554
  },
368
555
  {
369
556
  variant: ['outline', 'ghost'],
370
- color: 'primary',
371
- className: 'accent-blue-500',
557
+ color: 'danger',
558
+ mode: 'dark',
559
+ className: 'accent-red-300',
372
560
  },
373
561
  {
374
562
  variant: ['outline', 'ghost'],
375
- color: 'secondary',
376
- className: 'accent-amber-600',
563
+ color: 'warning',
564
+ mode: 'dark',
565
+ className: 'accent-amber-300',
377
566
  },
378
567
  {
379
568
  variant: ['outline', 'ghost'],
380
569
  color: 'success',
381
- className: 'accent-green-600',
570
+ mode: 'dark',
571
+ className: 'accent-green-300',
382
572
  },
383
573
  {
384
574
  variant: ['outline', 'ghost'],
385
- color: 'danger',
386
- className: 'accent-red-500',
575
+ color: 'info',
576
+ mode: 'dark',
577
+ className: 'accent-sky-300',
387
578
  },
388
579
  ],
389
580
  defaultVariants: {
390
- variant: 'solid',
391
- color: 'primary',
581
+ variant: 'strong',
582
+ color: 'action',
583
+ mode: 'light',
392
584
  },
393
585
  });
394
586
 
@@ -411,5 +603,17 @@ export const buttonGroupVariants = cva([], {
411
603
  },
412
604
  });
413
605
 
606
+ export const buttonIconVariants = cva([], {
607
+ variants: {
608
+ size: {
609
+ default: 'size-5',
610
+ small: 'size-4',
611
+ },
612
+ },
613
+ defaultVariants: {
614
+ size: 'default',
615
+ },
616
+ });
617
+
414
618
  export type ButtonVariantProps = VariantProps<typeof buttonRootVariants>;
415
619
  export type ButtonGroupVariantProps = VariantProps<typeof buttonGroupVariants>;