@idealyst/components 1.1.6 → 1.1.8

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 (144) hide show
  1. package/package.json +8 -3
  2. package/src/Accordion/Accordion.native.tsx +22 -14
  3. package/src/Accordion/Accordion.styles.old.tsx +298 -0
  4. package/src/Accordion/Accordion.styles.tsx +139 -248
  5. package/src/Accordion/Accordion.web.tsx +12 -7
  6. package/src/ActivityIndicator/ActivityIndicator.native.tsx +3 -2
  7. package/src/ActivityIndicator/ActivityIndicator.styles.old.tsx +94 -0
  8. package/src/ActivityIndicator/ActivityIndicator.styles.tsx +43 -62
  9. package/src/ActivityIndicator/ActivityIndicator.web.tsx +2 -2
  10. package/src/Alert/Alert.native.tsx +26 -15
  11. package/src/Alert/Alert.styles.old.tsx +209 -0
  12. package/src/Alert/Alert.styles.tsx +108 -281
  13. package/src/Alert/Alert.web.tsx +6 -10
  14. package/src/Avatar/Avatar.native.tsx +5 -2
  15. package/src/Avatar/Avatar.styles.old.tsx +99 -0
  16. package/src/Avatar/Avatar.styles.tsx +47 -62
  17. package/src/Avatar/Avatar.web.tsx +2 -2
  18. package/src/Badge/Badge.native.tsx +2 -2
  19. package/src/Badge/Badge.styles.old.tsx +157 -0
  20. package/src/Badge/Badge.styles.tsx +69 -108
  21. package/src/Badge/Badge.web.tsx +6 -6
  22. package/src/Breadcrumb/Breadcrumb.native.tsx +12 -5
  23. package/src/Breadcrumb/Breadcrumb.styles.old.tsx +231 -0
  24. package/src/Breadcrumb/Breadcrumb.styles.tsx +93 -209
  25. package/src/Breadcrumb/Breadcrumb.web.tsx +39 -27
  26. package/src/Button/Button.native.tsx +39 -14
  27. package/src/Button/Button.styles.tsx +99 -253
  28. package/src/Button/Button.web.tsx +10 -8
  29. package/src/Card/Card.native.tsx +8 -4
  30. package/src/Card/Card.styles.old.tsx +160 -0
  31. package/src/Card/Card.styles.tsx +107 -142
  32. package/src/Card/Card.web.tsx +6 -4
  33. package/src/Checkbox/Checkbox.native.tsx +14 -6
  34. package/src/Checkbox/Checkbox.styles.old.tsx +271 -0
  35. package/src/Checkbox/Checkbox.styles.tsx +109 -197
  36. package/src/Checkbox/Checkbox.web.tsx +7 -7
  37. package/src/Chip/Chip.native.tsx +5 -5
  38. package/src/Chip/Chip.styles.old.tsx +184 -0
  39. package/src/Chip/Chip.styles.tsx +34 -22
  40. package/src/Chip/Chip.web.tsx +5 -5
  41. package/src/Dialog/Dialog.native.tsx +16 -7
  42. package/src/Dialog/Dialog.styles.old.tsx +202 -0
  43. package/src/Dialog/Dialog.styles.tsx +108 -132
  44. package/src/Dialog/Dialog.web.tsx +4 -4
  45. package/src/Divider/Divider.native.tsx +29 -42
  46. package/src/Divider/Divider.styles.old.tsx +172 -0
  47. package/src/Divider/Divider.styles.tsx +116 -242
  48. package/src/Divider/Divider.web.tsx +17 -14
  49. package/src/Icon/Icon.native.tsx +12 -4
  50. package/src/Icon/Icon.styles.old.tsx +81 -0
  51. package/src/Icon/Icon.styles.tsx +52 -60
  52. package/src/Icon/Icon.web.tsx +43 -7
  53. package/src/Icon/IconSvg/IconSvg.web.tsx +2 -0
  54. package/src/Image/Image.styles.old.tsx +69 -0
  55. package/src/Image/Image.styles.tsx +45 -43
  56. package/src/Input/Input.native.tsx +140 -56
  57. package/src/Input/Input.styles.old.tsx +289 -0
  58. package/src/Input/Input.styles.tsx +177 -228
  59. package/src/Input/Input.web.tsx +5 -8
  60. package/src/Link/Link.native.tsx +4 -1
  61. package/src/List/List.native.tsx +5 -2
  62. package/src/List/List.styles.old.tsx +242 -0
  63. package/src/List/List.styles.tsx +178 -240
  64. package/src/List/ListItem.native.tsx +16 -8
  65. package/src/List/ListItem.web.tsx +26 -15
  66. package/src/Menu/Menu.native.tsx +1 -1
  67. package/src/Menu/Menu.styles.old.tsx +197 -0
  68. package/src/Menu/Menu.styles.tsx +90 -156
  69. package/src/Menu/Menu.web.tsx +2 -2
  70. package/src/Menu/MenuItem.native.tsx +9 -5
  71. package/src/Menu/MenuItem.styles.old.tsx +114 -0
  72. package/src/Menu/MenuItem.styles.tsx +71 -104
  73. package/src/Menu/MenuItem.web.tsx +23 -5
  74. package/src/Popover/Popover.native.tsx +10 -4
  75. package/src/Popover/Popover.styles.old.tsx +135 -0
  76. package/src/Popover/Popover.styles.tsx +46 -96
  77. package/src/Popover/Popover.web.tsx +1 -1
  78. package/src/Pressable/Pressable.native.tsx +3 -1
  79. package/src/Pressable/Pressable.styles.old.tsx +27 -0
  80. package/src/Pressable/Pressable.styles.tsx +35 -20
  81. package/src/Pressable/Pressable.web.tsx +1 -1
  82. package/src/Progress/Progress.native.tsx +15 -6
  83. package/src/Progress/Progress.styles.old.tsx +200 -0
  84. package/src/Progress/Progress.styles.tsx +69 -118
  85. package/src/Progress/Progress.web.tsx +10 -9
  86. package/src/RadioButton/RadioButton.native.tsx +10 -4
  87. package/src/RadioButton/RadioButton.styles.old.tsx +175 -0
  88. package/src/RadioButton/RadioButton.styles.tsx +81 -145
  89. package/src/RadioButton/RadioButton.web.tsx +4 -4
  90. package/src/SVGImage/SVGImage.styles.old.tsx +86 -0
  91. package/src/SVGImage/SVGImage.styles.tsx +35 -66
  92. package/src/Screen/Screen.native.tsx +30 -27
  93. package/src/Screen/Screen.styles.old.tsx +87 -0
  94. package/src/Screen/Screen.styles.tsx +120 -71
  95. package/src/Screen/Screen.web.tsx +2 -2
  96. package/src/Select/Select.native.tsx +44 -29
  97. package/src/Select/Select.styles.old.tsx +353 -0
  98. package/src/Select/Select.styles.tsx +244 -293
  99. package/src/Select/Select.web.tsx +5 -5
  100. package/src/Skeleton/Skeleton.styles.old.tsx +67 -0
  101. package/src/Skeleton/Skeleton.styles.tsx +31 -43
  102. package/src/Slider/Slider.native.tsx +9 -5
  103. package/src/Slider/Slider.styles.old.tsx +259 -0
  104. package/src/Slider/Slider.styles.tsx +157 -227
  105. package/src/Slider/Slider.web.tsx +5 -5
  106. package/src/Switch/Switch.native.tsx +11 -5
  107. package/src/Switch/Switch.styles.old.tsx +203 -0
  108. package/src/Switch/Switch.styles.tsx +103 -149
  109. package/src/Switch/Switch.web.tsx +8 -8
  110. package/src/TabBar/TabBar.native.tsx +24 -31
  111. package/src/TabBar/TabBar.styles.old.tsx +343 -0
  112. package/src/TabBar/TabBar.styles.tsx +204 -494
  113. package/src/TabBar/TabBar.web.tsx +21 -33
  114. package/src/Table/Table.native.tsx +18 -9
  115. package/src/Table/Table.styles.old.tsx +311 -0
  116. package/src/Table/Table.styles.tsx +151 -278
  117. package/src/Table/Table.web.tsx +1 -1
  118. package/src/Text/Text.native.tsx +1 -4
  119. package/src/Text/Text.style.demo.tsx +16 -0
  120. package/src/Text/Text.styles.old.tsx +219 -0
  121. package/src/Text/Text.styles.tsx +94 -78
  122. package/src/Text/Text.web.tsx +2 -2
  123. package/src/Text/index.ts +1 -0
  124. package/src/TextArea/TextArea.styles.old.tsx +213 -0
  125. package/src/TextArea/TextArea.styles.tsx +101 -157
  126. package/src/Tooltip/Tooltip.native.tsx +2 -2
  127. package/src/Tooltip/Tooltip.styles.old.tsx +82 -0
  128. package/src/Tooltip/Tooltip.styles.tsx +38 -53
  129. package/src/Tooltip/Tooltip.web.tsx +2 -2
  130. package/src/Video/Video.styles.old.tsx +51 -0
  131. package/src/Video/Video.styles.tsx +32 -28
  132. package/src/View/View.native.tsx +12 -12
  133. package/src/View/View.styles.old.tsx +125 -0
  134. package/src/View/View.styles.tsx +84 -103
  135. package/src/View/View.web.tsx +14 -2
  136. package/src/examples/CardExamples.tsx +0 -6
  137. package/src/extensions/applyExtension.ts +210 -0
  138. package/src/extensions/extendComponent.ts +438 -0
  139. package/src/extensions/index.ts +102 -0
  140. package/src/extensions/types.ts +497 -0
  141. package/src/globals.ts +16 -0
  142. package/src/index.native.ts +4 -0
  143. package/src/index.ts +28 -0
  144. package/src/utils/deepMerge.ts +54 -2
@@ -1,310 +1,183 @@
1
+ /**
2
+ * Table styles using defineStyle with dynamic props.
3
+ */
1
4
  import { StyleSheet } from 'react-native-unistyles';
2
- import { Theme, StylesheetStyles, CompoundVariants, Size } from '@idealyst/theme';
3
- import { buildSizeVariants } from '../utils/buildSizeVariants';
4
- import {
5
- buildGapVariants,
6
- buildPaddingVariants,
7
- buildPaddingVerticalVariants,
8
- buildPaddingHorizontalVariants,
9
- buildMarginVariants,
10
- buildMarginVerticalVariants,
11
- buildMarginHorizontalVariants,
12
- } from '../utils/buildViewStyleVariants';
5
+ import { defineStyle, ThemeStyleWrapper } from '@idealyst/theme';
6
+ import type { Theme as BaseTheme, Size } from '@idealyst/theme';
7
+ import { ViewStyleSize } from '../utils/viewStyleProps';
8
+
9
+ // Required: Unistyles must see StyleSheet usage in original source to process this file
10
+ void StyleSheet;
13
11
 
14
- type TableType = 'default' | 'bordered' | 'striped';
12
+ // Wrap theme for $iterator support
13
+ type Theme = ThemeStyleWrapper<BaseTheme>;
14
+
15
+ type TableType = 'standard' | 'bordered' | 'striped';
16
+ type CellAlign = 'left' | 'center' | 'right';
17
+
18
+ export type TableDynamicProps = {
19
+ size?: Size;
20
+ type?: TableType;
21
+ clickable?: boolean;
22
+ sticky?: boolean;
23
+ align?: CellAlign;
24
+ gap?: ViewStyleSize;
25
+ padding?: ViewStyleSize;
26
+ paddingVertical?: ViewStyleSize;
27
+ paddingHorizontal?: ViewStyleSize;
28
+ margin?: ViewStyleSize;
29
+ marginVertical?: ViewStyleSize;
30
+ marginHorizontal?: ViewStyleSize;
31
+ };
15
32
 
16
- type TableRowVariants = {
17
- type: TableType;
18
- clickable: boolean;
19
- }
20
33
  /**
21
- * Create type variants for container
34
+ * Table styles with type/size handling.
22
35
  */
23
- function createContainerTypeVariants(theme: Theme) {
24
- return {
25
- standard: {
26
- borderWidth: 1,
27
- borderStyle: 'solid',
28
- borderColor: theme.colors.border.primary,
29
- borderRadius: 8,
30
- overflow: 'hidden',
31
- _web: {
32
- border: `1px solid ${theme.colors.border.primary}`,
36
+ export const tableStyles = defineStyle('Table', (theme: Theme) => ({
37
+ container: ({ type = 'standard' }: TableDynamicProps) => ({
38
+ width: '100%',
39
+ borderWidth: 1,
40
+ borderStyle: 'solid' as const,
41
+ borderColor: theme.colors.border.primary,
42
+ borderRadius: 8,
43
+ overflow: 'hidden' as const,
44
+ variants: {
45
+ gap: {
46
+ gap: theme.sizes.$view.padding,
33
47
  },
34
- },
35
- bordered: {
36
- borderWidth: 1,
37
- borderStyle: 'solid',
38
- borderColor: theme.colors.border.primary,
39
- borderRadius: 8,
40
- overflow: 'hidden',
41
- _web: {
42
- border: `1px solid ${theme.colors.border.primary}`,
48
+ padding: {
49
+ padding: theme.sizes.$view.padding,
43
50
  },
44
- },
45
- striped: {
46
- borderWidth: 1,
47
- borderStyle: 'solid',
48
- borderColor: theme.colors.border.primary,
49
- borderRadius: 8,
50
- overflow: 'hidden',
51
- _web: {
52
- border: `1px solid ${theme.colors.border.primary}`,
51
+ paddingVertical: {
52
+ paddingVertical: theme.sizes.$view.padding,
53
53
  },
54
- },
55
- } as const;
56
- }
57
-
58
- /**
59
- * Create type variants for row
60
- */
61
- function createRowTypeVariants(theme: Theme) {
62
- return {
63
- standard: {},
64
- bordered: {
65
- borderBottomWidth: 1,
66
- borderBottomStyle: 'solid',
67
- borderBottomColor: theme.colors.border.primary,
68
- _web: {
69
- borderBottom: `1px solid ${theme.colors.border.primary}`,
54
+ paddingHorizontal: {
55
+ paddingHorizontal: theme.sizes.$view.padding,
70
56
  },
71
- },
72
- striped: {
73
- borderBottomWidth: 1,
74
- borderBottomStyle: 'solid',
75
- borderBottomColor: theme.colors.border.primary,
76
- _web: {
77
- borderBottom: `1px solid ${theme.colors.border.primary}`,
78
- ':nth-child(even)': {
79
- backgroundColor: theme.colors.surface.secondary,
80
- },
57
+ margin: {
58
+ margin: theme.sizes.$view.padding,
81
59
  },
82
- },
83
- } as const;
84
- }
85
-
86
- /**
87
- * Create compound variants for row
88
- */
89
- function createRowCompoundVariants(theme: Theme): CompoundVariants<keyof TableRowVariants> {
90
- return [
91
- {
92
- type: 'striped',
93
- clickable: true,
94
- styles: {
95
- _web: {
96
- _hover: {
97
- backgroundColor: theme.colors.surface.tertiary,
98
- },
99
- },
60
+ marginVertical: {
61
+ marginVertical: theme.sizes.$view.padding,
100
62
  },
101
- },
102
- ] as const;
103
- }
104
-
105
- /**
106
- * Create size variants for header cell
107
- */
108
- function createHeaderCellSizeVariants(theme: Theme) {
109
- return buildSizeVariants(theme, 'table', (size) => ({
110
- padding: size.padding,
111
- fontSize: size.fontSize,
112
- lineHeight: size.lineHeight,
113
- }));
114
- }
115
-
116
- /**
117
- * Create type variants for header cell
118
- */
119
- function createHeaderCellTypeVariants(theme: Theme) {
120
- return {
121
- standard: {},
122
- bordered: {
123
- borderRightWidth: 1,
124
- borderRightStyle: 'solid',
125
- borderRightColor: theme.colors.border.primary,
126
- _web: {
127
- borderRight: `1px solid ${theme.colors.border.primary}`,
128
- ':last-child': {
129
- borderRight: 'none',
130
- },
63
+ marginHorizontal: {
64
+ marginHorizontal: theme.sizes.$view.padding,
131
65
  },
132
66
  },
133
- striped: {},
134
- } as const;
135
- }
136
-
137
- /**
138
- * Create size variants for cell
139
- */
140
- function createCellSizeVariants(theme: Theme) {
141
- return buildSizeVariants(theme, 'table', (size) => ({
142
- padding: size.padding,
143
- fontSize: size.fontSize,
144
- lineHeight: size.lineHeight,
145
- }));
146
- }
147
-
148
- /**
149
- * Create type variants for cell
150
- */
151
- function createCellTypeVariants(theme: Theme) {
152
- return {
153
- standard: {},
154
- bordered: {
155
- borderRightWidth: 1,
156
- borderRightStyle: 'solid',
157
- borderRightColor: theme.colors.border.primary,
158
- _web: {
159
- borderRight: `1px solid ${theme.colors.border.primary}`,
160
- ':last-child': {
161
- borderRight: 'none',
162
- },
163
- },
164
- },
165
- striped: {},
166
- } as const;
167
- }
168
-
169
- const createContainerStyles = (theme: Theme) => {
170
- return {
171
- width: '100%',
172
67
  _web: {
173
68
  overflow: 'auto',
69
+ border: `1px solid ${theme.colors.border.primary}`,
174
70
  },
175
- variants: {
176
- type: createContainerTypeVariants(theme),
177
- // Spacing variants from ContainerStyleProps
178
- gap: buildGapVariants(theme),
179
- padding: buildPaddingVariants(theme),
180
- paddingVertical: buildPaddingVerticalVariants(theme),
181
- paddingHorizontal: buildPaddingHorizontalVariants(theme),
182
- margin: buildMarginVariants(theme),
183
- marginVertical: buildMarginVerticalVariants(theme),
184
- marginHorizontal: buildMarginHorizontalVariants(theme),
185
- },
186
- } as const;
187
- }
71
+ }),
188
72
 
189
- const createTableStyles = (theme: Theme) => {
190
- return {
73
+ table: (_props: TableDynamicProps) => ({
191
74
  width: '100%',
192
75
  _web: {
193
76
  borderCollapse: 'collapse',
194
77
  },
195
- } as const;
196
- }
78
+ }),
197
79
 
198
- const createTheadStyles = (theme: Theme) => {
199
- return {
80
+ thead: ({ sticky = false }: TableDynamicProps) => ({
200
81
  backgroundColor: theme.colors.surface.secondary,
201
- variants: {
202
- sticky: {
203
- true: {
204
- _web: {
205
- position: 'sticky',
206
- top: 0,
207
- zIndex: 10,
208
- }
209
- },
210
- false: {},
211
- },
212
- },
213
- } as const;
214
- }
82
+ _web: sticky ? {
83
+ position: 'sticky' as const,
84
+ top: 0,
85
+ zIndex: 10,
86
+ } : {},
87
+ }),
215
88
 
216
- const createRowStyles = (theme: Theme) => {
217
- return {
218
- variants: {
219
- type: createRowTypeVariants(theme),
220
- clickable: {
221
- true: {
222
- _web: {
223
- cursor: 'pointer',
224
- _hover: {
225
- backgroundColor: theme.colors.surface.secondary,
226
- },
89
+ tbody: (_props: TableDynamicProps) => ({}),
90
+
91
+ row: ({ type = 'standard', clickable = false }: TableDynamicProps) => {
92
+ const typeStyles = type === 'bordered' || type === 'striped' ? {
93
+ borderBottomWidth: 1,
94
+ borderBottomColor: theme.colors.border.primary,
95
+ } : {};
96
+
97
+ return {
98
+ ...typeStyles,
99
+ _web: {
100
+ transition: 'background-color 0.2s ease',
101
+ borderBottom: (type === 'bordered' || type === 'striped')
102
+ ? `1px solid ${theme.colors.border.primary}`
103
+ : undefined,
104
+ cursor: clickable ? 'pointer' : undefined,
105
+ _hover: clickable ? { backgroundColor: theme.colors.surface.secondary } : {},
106
+ // Striped rows handled via CSS pseudo-selector
107
+ ...(type === 'striped' ? {
108
+ ':nth-child(even)': {
109
+ backgroundColor: theme.colors.surface.secondary,
227
110
  },
228
- },
229
- false: {},
111
+ } : {}),
230
112
  },
231
- },
232
- compoundVariants: createRowCompoundVariants(theme),
233
- _web: {
234
- transition: 'background-color 0.2s ease',
235
- },
236
- } as const;
237
- }
113
+ } as const;
114
+ },
238
115
 
239
- const createHeaderCellStyles = (theme: Theme) => {
240
- return {
241
- flexDirection: 'row',
242
- alignItems: 'center',
243
- textAlign: 'left',
244
- fontWeight: '600',
245
- color: theme.colors.text.primary,
246
- borderBottomWidth: 2,
247
- borderBottomStyle: 'solid',
248
- borderBottomColor: theme.colors.border.primary,
249
- _web: {
250
- borderBottom: `2px solid ${theme.colors.border.primary}`,
251
- },
252
- variants: {
253
- size: createHeaderCellSizeVariants(theme),
254
- align: {
255
- left: {
256
- textAlign: 'left',
257
- justifyContent: 'flex-start',
258
- },
259
- center: {
260
- textAlign: 'center',
261
- justifyContent: 'center',
262
- },
263
- right: {
264
- textAlign: 'right',
265
- justifyContent: 'flex-end',
116
+ headerCell: ({ type = 'standard', align = 'left' }: TableDynamicProps) => {
117
+ const alignStyles = {
118
+ left: { textAlign: 'left' as const, justifyContent: 'flex-start' as const },
119
+ center: { textAlign: 'center' as const, justifyContent: 'center' as const },
120
+ right: { textAlign: 'right' as const, justifyContent: 'flex-end' as const },
121
+ }[align];
122
+
123
+ const borderStyles = type === 'bordered' ? {
124
+ borderRightWidth: 1,
125
+ borderRightColor: theme.colors.border.primary,
126
+ } : {};
127
+
128
+ return {
129
+ flexDirection: 'row' as const,
130
+ alignItems: 'center' as const,
131
+ fontWeight: '600' as const,
132
+ color: theme.colors.text.primary,
133
+ borderBottomWidth: 2,
134
+ borderBottomColor: theme.colors.border.primary,
135
+ ...alignStyles,
136
+ ...borderStyles,
137
+ variants: {
138
+ size: {
139
+ padding: theme.sizes.$table.padding,
140
+ fontSize: theme.sizes.$table.fontSize,
141
+ lineHeight: theme.sizes.$table.lineHeight,
266
142
  },
267
143
  },
268
- type: createHeaderCellTypeVariants(theme),
269
- },
270
- } as const;
271
- }
144
+ _web: {
145
+ borderBottom: `2px solid ${theme.colors.border.primary}`,
146
+ borderRight: type === 'bordered' ? `1px solid ${theme.colors.border.primary}` : undefined,
147
+ ':last-child': type === 'bordered' ? { borderRight: 'none' } : {},
148
+ },
149
+ } as const;
150
+ },
272
151
 
273
- const createCellStyles = (theme: Theme) => {
274
- return {
275
- flexDirection: 'row',
276
- alignItems: 'center',
277
- textAlign: 'left',
278
- color: theme.colors.text.primary,
279
- variants: {
280
- size: createCellSizeVariants(theme),
281
- align: {
282
- left: {
283
- textAlign: 'left',
284
- justifyContent: 'flex-start',
285
- },
286
- center: {
287
- textAlign: 'center',
288
- justifyContent: 'center',
289
- },
290
- right: {
291
- textAlign: 'right',
292
- justifyContent: 'flex-end',
152
+ cell: ({ type = 'standard', align = 'left' }: TableDynamicProps) => {
153
+ const alignStyles = {
154
+ left: { textAlign: 'left' as const, justifyContent: 'flex-start' as const },
155
+ center: { textAlign: 'center' as const, justifyContent: 'center' as const },
156
+ right: { textAlign: 'right' as const, justifyContent: 'flex-end' as const },
157
+ }[align];
158
+
159
+ const borderStyles = type === 'bordered' ? {
160
+ borderRightWidth: 1,
161
+ borderRightColor: theme.colors.border.primary,
162
+ } : {};
163
+
164
+ return {
165
+ flexDirection: 'row' as const,
166
+ alignItems: 'center' as const,
167
+ color: theme.colors.text.primary,
168
+ ...alignStyles,
169
+ ...borderStyles,
170
+ variants: {
171
+ size: {
172
+ padding: theme.sizes.$table.padding,
173
+ fontSize: theme.sizes.$table.fontSize,
174
+ lineHeight: theme.sizes.$table.lineHeight,
293
175
  },
294
176
  },
295
- type: createCellTypeVariants(theme),
296
- },
297
- } as const;
298
- }
299
-
300
- export const tableStyles = StyleSheet.create((theme: Theme) => {
301
- return {
302
- container: createContainerStyles(theme),
303
- table: createTableStyles(theme),
304
- thead: createTheadStyles(theme),
305
- tbody: {},
306
- row: createRowStyles(theme),
307
- headerCell: createHeaderCellStyles(theme),
308
- cell: createCellStyles(theme),
309
- } as const;
310
- });
177
+ _web: {
178
+ borderRight: type === 'bordered' ? `1px solid ${theme.colors.border.primary}` : undefined,
179
+ ':last-child': type === 'bordered' ? { borderRight: 'none' } : {},
180
+ },
181
+ } as const;
182
+ },
183
+ }));
@@ -50,7 +50,7 @@ function Table<T = any>({
50
50
  marginHorizontal,
51
51
  });
52
52
 
53
- const containerProps = getWebProps([tableStyles.container, style as any]);
53
+ const containerProps = getWebProps([(tableStyles.container as any)({}), style as any]);
54
54
  const tableProps = getWebProps([tableStyles.table]);
55
55
 
56
56
  // Helper to get cell value
@@ -32,10 +32,7 @@ const Text = forwardRef<RNText, TextProps>(({
32
32
  <RNText
33
33
  ref={ref}
34
34
  nativeID={id}
35
- style={[
36
- textStyles.text({ color }),
37
- style,
38
- ]}
35
+ style={[textStyles.text({ color, typography, weight, align }), style]}
39
36
  testID={testID}
40
37
  >
41
38
  {children}
@@ -0,0 +1,16 @@
1
+ import { ThemeStyleWrapper } from '@idealyst/theme';
2
+ import type { Theme as BaseTheme } from '@idealyst/theme';
3
+
4
+ type Theme = ThemeStyleWrapper<BaseTheme>;
5
+
6
+ const defineStyle = {} as any
7
+ defineStyle('Text', (theme: Theme) => ({
8
+ text: {
9
+ margin: 0,
10
+ padding: 0,
11
+ color: theme.colors.text.primary,
12
+ variants: {
13
+ // Typography variants
14
+
15
+ }}
16
+ }))