react-native-molecules 0.5.0-beta.1 → 0.5.0-beta.11

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 (165) hide show
  1. package/README.md +87 -0
  2. package/components/Accordion/index.tsx +1 -6
  3. package/components/Accordion/utils.ts +17 -14
  4. package/components/ActivityIndicator/ActivityIndicator.tsx +12 -20
  5. package/components/ActivityIndicator/index.tsx +1 -5
  6. package/components/Appbar/index.tsx +1 -4
  7. package/components/Appbar/utils.ts +33 -21
  8. package/components/Avatar/index.tsx +1 -5
  9. package/components/Avatar/utils.ts +2 -6
  10. package/components/Backdrop/Backdrop.tsx +2 -2
  11. package/components/Backdrop/index.tsx +1 -5
  12. package/components/Backdrop/utils.ts +5 -6
  13. package/components/Badge/index.tsx +1 -5
  14. package/components/Badge/utils.ts +2 -6
  15. package/components/Button/Button.tsx +211 -264
  16. package/components/Button/index.tsx +9 -7
  17. package/components/Button/types.ts +16 -2
  18. package/components/Button/utils.ts +231 -210
  19. package/components/Card/Card.tsx +8 -4
  20. package/components/Card/CardContent.tsx +5 -4
  21. package/components/Card/CardHeader.tsx +5 -3
  22. package/components/Card/CardMedia.tsx +5 -3
  23. package/components/Card/CardTypography.tsx +5 -3
  24. package/components/Card/index.tsx +1 -5
  25. package/components/Card/utils.ts +5 -6
  26. package/components/Checkbox/Checkbox.tsx +1 -0
  27. package/components/Checkbox/CheckboxBase.ios.tsx +1 -0
  28. package/components/Checkbox/CheckboxBase.tsx +24 -128
  29. package/components/Checkbox/index.tsx +1 -5
  30. package/components/Checkbox/utils.ts +6 -31
  31. package/components/Chip/Chip.tsx +40 -52
  32. package/components/Chip/index.tsx +1 -5
  33. package/components/Chip/utils.ts +5 -13
  34. package/components/DatePickerDocked/index.tsx +1 -5
  35. package/components/DatePickerDocked/utils.ts +21 -19
  36. package/components/DatePickerInline/index.tsx +1 -5
  37. package/components/DatePickerInline/utils.ts +41 -28
  38. package/components/DatePickerInput/DatePickerInput.tsx +4 -2
  39. package/components/DatePickerInput/DatePickerInputWithoutModal.tsx +0 -4
  40. package/components/DatePickerInput/index.tsx +1 -5
  41. package/components/DatePickerInput/types.ts +1 -3
  42. package/components/DatePickerInput/utils.ts +5 -6
  43. package/components/DatePickerModal/CalendarEdit.tsx +10 -9
  44. package/components/DatePickerModal/DatePickerModalHeader.tsx +1 -1
  45. package/components/DatePickerModal/index.tsx +1 -5
  46. package/components/DatePickerModal/utils.ts +17 -16
  47. package/components/DateTimePicker/index.tsx +1 -5
  48. package/components/DateTimePicker/utils.ts +5 -6
  49. package/components/Dialog/index.tsx +1 -5
  50. package/components/Dialog/utils.ts +22 -16
  51. package/components/Drawer/Collapsible/utils.ts +13 -13
  52. package/components/Drawer/Drawer.tsx +2 -3
  53. package/components/Drawer/DrawerContent.tsx +5 -3
  54. package/components/Drawer/DrawerFooter.tsx +5 -4
  55. package/components/Drawer/DrawerHeader.tsx +5 -4
  56. package/components/Drawer/DrawerItem.tsx +5 -3
  57. package/components/Drawer/DrawerItemGroup.tsx +5 -4
  58. package/components/Drawer/index.tsx +1 -5
  59. package/components/Drawer/utils.ts +7 -7
  60. package/components/ElementGroup/ElementGroup.tsx +16 -14
  61. package/components/ElementGroup/index.tsx +1 -5
  62. package/components/ElementGroup/utils.ts +5 -6
  63. package/components/FAB/index.tsx +1 -5
  64. package/components/FAB/utils.ts +2 -6
  65. package/components/FilePicker/FilePicker.tsx +47 -76
  66. package/components/FilePicker/index.tsx +1 -5
  67. package/components/FilePicker/utils.ts +5 -6
  68. package/components/HelperText/HelperText.tsx +0 -35
  69. package/components/HelperText/index.tsx +1 -5
  70. package/components/HelperText/utils.ts +5 -7
  71. package/components/HorizontalDivider/HorizontalDivider.tsx +5 -3
  72. package/components/HorizontalDivider/index.tsx +1 -5
  73. package/components/Icon/CrossFadeIcon.tsx +3 -5
  74. package/components/Icon/Icon.tsx +2 -4
  75. package/components/Icon/iconFactory.tsx +3 -3
  76. package/components/Icon/index.tsx +2 -6
  77. package/components/Icon/types.ts +17 -6
  78. package/components/IconButton/IconButton.tsx +45 -58
  79. package/components/IconButton/index.tsx +1 -5
  80. package/components/IconButton/utils.ts +153 -49
  81. package/components/If/index.tsx +1 -5
  82. package/components/InputAddon/index.tsx +1 -5
  83. package/components/InputAddon/utils.ts +5 -6
  84. package/components/Link/index.tsx +1 -5
  85. package/components/Link/utils.ts +2 -6
  86. package/components/ListItem/index.tsx +1 -5
  87. package/components/ListItem/utils.ts +13 -11
  88. package/components/LoadingIndicator/LoadingIndicator.tsx +253 -0
  89. package/components/LoadingIndicator/LoadingIndicator.web.tsx +136 -0
  90. package/components/LoadingIndicator/index.tsx +13 -0
  91. package/components/LoadingIndicator/utils.ts +117 -0
  92. package/components/Menu/index.tsx +1 -5
  93. package/components/Menu/utils.ts +6 -8
  94. package/components/Modal/index.tsx +1 -5
  95. package/components/Modal/utils.ts +2 -6
  96. package/components/NavigationRail/NavigationRailHeader.tsx +1 -1
  97. package/components/NavigationRail/index.tsx +1 -5
  98. package/components/NavigationRail/utils.ts +21 -17
  99. package/components/NavigationStack/index.tsx +1 -5
  100. package/components/NavigationStack/utils.tsx +7 -1
  101. package/components/Portal/index.tsx +1 -5
  102. package/components/RadioButton/index.ts +1 -5
  103. package/components/RadioButton/utils.ts +9 -8
  104. package/components/Rating/index.tsx +1 -5
  105. package/components/Rating/utils.ts +6 -8
  106. package/components/Select/Select.tsx +369 -507
  107. package/components/Select/index.ts +7 -14
  108. package/components/Select/types.ts +2 -4
  109. package/components/Select/utils.ts +215 -0
  110. package/components/Slot/Slot.tsx +244 -0
  111. package/components/Slot/compose-refs.tsx +60 -0
  112. package/components/Slot/index.tsx +8 -0
  113. package/components/StateLayer/index.tsx +1 -5
  114. package/components/StateLayer/utils.ts +5 -6
  115. package/components/Surface/Surface.android.tsx +34 -8
  116. package/components/Surface/Surface.ios.tsx +36 -29
  117. package/components/Surface/Surface.tsx +31 -4
  118. package/components/Surface/index.tsx +1 -5
  119. package/components/Surface/utils.ts +49 -36
  120. package/components/Switch/Switch.tsx +8 -2
  121. package/components/Switch/index.tsx +1 -5
  122. package/components/Switch/utils.ts +2 -6
  123. package/components/Tabs/TabItem.tsx +35 -58
  124. package/components/Tabs/TabLabel.tsx +5 -9
  125. package/components/Tabs/Tabs.tsx +154 -149
  126. package/components/Tabs/index.tsx +1 -5
  127. package/components/Tabs/utils.ts +25 -12
  128. package/components/Text/Text.tsx +2 -8
  129. package/components/TextInput/TextInput.tsx +655 -571
  130. package/components/TextInput/index.tsx +19 -7
  131. package/components/TextInput/types.ts +76 -27
  132. package/components/TextInput/utils.ts +232 -159
  133. package/components/TextInputWithMask/index.tsx +1 -5
  134. package/components/TimePicker/AmPmSwitcher.tsx +1 -1
  135. package/components/TimePicker/index.tsx +1 -5
  136. package/components/TimePicker/utils.ts +29 -21
  137. package/components/TimePickerField/TimePickerField.tsx +7 -5
  138. package/components/TimePickerField/index.tsx +1 -5
  139. package/components/TimePickerField/utils.ts +5 -6
  140. package/components/TimePickerModal/TimePickerModal.tsx +6 -2
  141. package/components/TimePickerModal/index.tsx +1 -5
  142. package/components/TimePickerModal/utils.ts +5 -6
  143. package/components/Tooltip/TooltipTrigger.tsx +25 -16
  144. package/components/Tooltip/index.tsx +1 -5
  145. package/components/Tooltip/utils.ts +5 -6
  146. package/components/TouchableRipple/TouchableRipple.native.tsx +50 -14
  147. package/components/TouchableRipple/TouchableRipple.tsx +137 -47
  148. package/components/TouchableRipple/index.tsx +1 -5
  149. package/components/TouchableRipple/utils.ts +5 -6
  150. package/components/VerticalDivider/VerticalDivider.tsx +9 -8
  151. package/components/VerticalDivider/index.tsx +1 -5
  152. package/core/componentsRegistry.ts +31 -19
  153. package/hocs/withPortal.tsx +1 -1
  154. package/hooks/index.tsx +0 -5
  155. package/hooks/useControlledValue.tsx +20 -4
  156. package/hooks/useSubcomponents.tsx +63 -31
  157. package/hooks/useWhatHasUpdated.tsx +48 -0
  158. package/package.json +12 -15
  159. package/shortcuts-manager/ShortcutsManager/ShortcutsManager.tsx +5 -2
  160. package/styles/shadow.ts +2 -1
  161. package/styles/themes/LightTheme.tsx +1 -1
  162. package/utils/extractPropertiesFromStyles.ts +25 -0
  163. package/utils/lodash.ts +77 -6
  164. package/utils/repository.ts +2 -52
  165. package/hooks/useSearchable.tsx +0 -74
@@ -1,11 +1,9 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
2
 
3
3
  import {
4
- getRegisteredMoleculesComponentStyles,
5
- registerComponentsStyles,
6
- registerComponentUtils,
7
- } from '../../core';
8
- import { getRegisteredComponentUtils } from './../../core/componentsRegistry';
4
+ getRegisteredComponentStylesWithFallback,
5
+ getRegisteredComponentUtilsWithFallback,
6
+ } from './../../core/componentsRegistry';
9
7
 
10
8
  export type States =
11
9
  | 'selectedAndDisabled'
@@ -24,11 +22,12 @@ const iconButtonSizeToIconSizeMapDefault = {
24
22
  const iconButtonStylesDefault = StyleSheet.create(theme => ({
25
23
  root: {
26
24
  borderColor: theme.colors.outline,
27
- color: theme.colors.onSurfaceVariant,
28
25
  borderRadius: theme.shapes.corner.full,
29
26
  overflow: 'hidden',
30
27
  borderWidth: 0,
31
28
  backgroundColor: 'transparent',
29
+ justifyContent: 'center',
30
+ alignItems: 'center',
32
31
 
33
32
  variants: {
34
33
  size: {
@@ -73,16 +72,13 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
73
72
 
74
73
  contained: {
75
74
  backgroundColor: theme.colors.surfaceVariant,
76
- color: theme.colors.primary,
77
75
  },
78
76
 
79
77
  'contained-tonal': {
80
78
  backgroundColor: theme.colors.surfaceVariant,
81
- color: theme.colors.onSurfaceVariant,
82
79
  },
83
80
 
84
81
  outlined: {
85
- color: theme.colors.onSurfaceVariant,
86
82
  borderWidth: 1,
87
83
  },
88
84
  },
@@ -92,30 +88,23 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
92
88
  {
93
89
  variant: 'default',
94
90
  state: 'selectedAndDisabled',
95
- styles: {
96
- color: theme.colors.primary,
97
- },
91
+ styles: {},
98
92
  },
99
93
  {
100
94
  variant: 'default',
101
95
  state: 'selected',
102
- styles: {
103
- color: theme.colors.primary,
104
- },
96
+ styles: {},
105
97
  },
106
98
  {
107
99
  variant: 'default',
108
100
  state: 'selectedAndHovered',
109
- styles: {
110
- color: theme.colors.primary,
111
- },
101
+ styles: {},
112
102
  },
113
103
  {
114
104
  variant: 'contained',
115
105
  state: 'selectedAndDisabled',
116
106
  styles: {
117
107
  backgroundColor: theme.colors.primary,
118
- color: theme.colors.onPrimary,
119
108
  },
120
109
  },
121
110
  {
@@ -130,14 +119,13 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
130
119
  state: 'selected',
131
120
  styles: {
132
121
  backgroundColor: theme.colors.primary,
133
- color: theme.colors.onPrimary,
134
122
  },
135
123
  },
136
124
  {
137
125
  variant: 'contained',
138
126
  state: 'selectedAndHovered',
139
127
  styles: {
140
- color: theme.colors.primary,
128
+ backgroundColor: theme.colors.primary,
141
129
  },
142
130
  },
143
131
  {
@@ -145,7 +133,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
145
133
  state: 'hovered',
146
134
  styles: {
147
135
  backgroundColor: theme.colors.primary,
148
- color: theme.colors.onPrimary,
149
136
  },
150
137
  },
151
138
  {
@@ -153,7 +140,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
153
140
  state: 'selectedAndDisabled',
154
141
  styles: {
155
142
  backgroundColor: theme.colors.secondaryContainer,
156
- color: theme.colors.onSecondaryContainer,
157
143
  },
158
144
  },
159
145
  {
@@ -168,7 +154,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
168
154
  state: 'selected',
169
155
  styles: {
170
156
  backgroundColor: theme.colors.secondaryContainer,
171
- color: theme.colors.onSecondaryContainer,
172
157
  },
173
158
  },
174
159
  {
@@ -176,7 +161,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
176
161
  state: 'selectedAndHovered',
177
162
  styles: {
178
163
  backgroundColor: theme.colors.secondaryContainer,
179
- color: theme.colors.onSecondaryContainer,
180
164
  },
181
165
  },
182
166
  {
@@ -184,7 +168,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
184
168
  state: 'selectedAndDisabled',
185
169
  styles: {
186
170
  backgroundColor: theme.colors.inverseSurface,
187
- color: theme.colors.inverseOnSurface,
188
171
  borderWidth: 0,
189
172
  },
190
173
  },
@@ -200,7 +183,6 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
200
183
  state: 'selected',
201
184
  styles: {
202
185
  backgroundColor: theme.colors.inverseSurface,
203
- color: theme.colors.inverseOnSurface,
204
186
  borderWidth: 0,
205
187
  },
206
188
  },
@@ -209,17 +191,12 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
209
191
  state: 'selectedAndHovered',
210
192
  styles: {
211
193
  backgroundColor: theme.colors.secondaryContainer,
212
- color: theme.colors.onSecondaryContainer,
213
194
  },
214
195
  },
215
196
  {
216
197
  variant: 'outlined',
217
198
  state: 'hovered',
218
- styles: {
219
- backgroundColor: theme.colors.inverseSurface,
220
- color: theme.colors.inverseOnSurface,
221
- borderWidth: 0,
222
- },
199
+ styles: {},
223
200
  },
224
201
  ],
225
202
  },
@@ -298,28 +275,155 @@ const iconButtonStylesDefault = StyleSheet.create(theme => ({
298
275
  variant: 'outlined',
299
276
  state: 'hovered',
300
277
  styles: {
301
- backgroundColor: theme.colors.stateLayer.hover.inverseOnSurface,
278
+ backgroundColor: theme.colors.stateLayer.hover.onSurfaceVariant,
302
279
  },
303
280
  },
304
281
  ],
305
282
  },
306
283
 
307
- innerContainer: {
308
- flexGrow: 1,
309
- justifyContent: 'center',
310
- alignItems: 'center',
284
+ icon: {
285
+ color: theme.colors.onSurfaceVariant,
286
+
287
+ variants: {
288
+ variant: {
289
+ default: {},
290
+
291
+ contained: {
292
+ color: theme.colors.primary,
293
+ },
294
+
295
+ 'contained-tonal': {
296
+ color: theme.colors.onSurfaceVariant,
297
+ },
298
+
299
+ outlined: {
300
+ color: theme.colors.onSurfaceVariant,
301
+ },
302
+ },
303
+ },
304
+
305
+ compoundVariants: [
306
+ {
307
+ variant: 'default',
308
+ state: 'selectedAndDisabled',
309
+ styles: {
310
+ color: theme.colors.primary,
311
+ },
312
+ },
313
+ {
314
+ variant: 'default',
315
+ state: 'selected',
316
+ styles: {
317
+ color: theme.colors.primary,
318
+ },
319
+ },
320
+ {
321
+ variant: 'default',
322
+ state: 'selectedAndHovered',
323
+ styles: {
324
+ color: theme.colors.primary,
325
+ },
326
+ },
327
+ {
328
+ variant: 'contained',
329
+ state: 'selectedAndDisabled',
330
+ styles: {
331
+ color: theme.colors.onPrimary,
332
+ },
333
+ },
334
+ {
335
+ variant: 'contained',
336
+ state: 'disabled',
337
+ styles: {},
338
+ },
339
+ {
340
+ variant: 'contained',
341
+ state: 'selected',
342
+ styles: {
343
+ color: theme.colors.onPrimary,
344
+ },
345
+ },
346
+ {
347
+ variant: 'contained',
348
+ state: 'selectedAndHovered',
349
+ styles: {
350
+ color: theme.colors.onPrimary,
351
+ },
352
+ },
353
+ {
354
+ variant: 'contained',
355
+ state: 'hovered',
356
+ styles: {
357
+ color: theme.colors.onPrimary,
358
+ },
359
+ },
360
+ {
361
+ variant: 'contained-tonal',
362
+ state: 'selectedAndDisabled',
363
+ styles: {
364
+ color: theme.colors.onSecondaryContainer,
365
+ },
366
+ },
367
+ {
368
+ variant: 'contained-tonal',
369
+ state: 'disabled',
370
+ styles: {},
371
+ },
372
+ {
373
+ variant: 'contained-tonal',
374
+ state: 'selected',
375
+ styles: {
376
+ color: theme.colors.onSecondaryContainer,
377
+ },
378
+ },
379
+ {
380
+ variant: 'contained-tonal',
381
+ state: 'selectedAndHovered',
382
+ styles: {
383
+ color: theme.colors.onSecondaryContainer,
384
+ },
385
+ },
386
+ {
387
+ variant: 'outlined',
388
+ state: 'selectedAndDisabled',
389
+ styles: {
390
+ color: theme.colors.inverseOnSurface,
391
+ },
392
+ },
393
+ {
394
+ variant: 'outlined',
395
+ state: 'disabled',
396
+ styles: {},
397
+ },
398
+ {
399
+ variant: 'outlined',
400
+ state: 'selected',
401
+ styles: {
402
+ color: theme.colors.inverseOnSurface,
403
+ },
404
+ },
405
+ {
406
+ variant: 'outlined',
407
+ state: 'selectedAndHovered',
408
+ styles: {
409
+ color: theme.colors.onSecondaryContainer,
410
+ },
411
+ },
412
+ {
413
+ variant: 'outlined',
414
+ state: 'hovered',
415
+ styles: {},
416
+ },
417
+ ],
311
418
  },
312
419
  }));
313
420
 
314
- registerComponentsStyles({
315
- IconButton: iconButtonStylesDefault,
316
- });
317
-
318
- registerComponentUtils('IconButton', {
421
+ export const defaultStyles = getRegisteredComponentStylesWithFallback(
422
+ 'IconButton',
423
+ iconButtonStylesDefault,
424
+ );
425
+ export const iconButtonSizeToIconSizeMap = getRegisteredComponentUtilsWithFallback(
426
+ 'IconButton',
319
427
  iconButtonSizeToIconSizeMapDefault,
320
- });
321
-
322
- export const defaultStyles = getRegisteredMoleculesComponentStyles('IconButton');
323
- export const iconButtonSizeToIconSizeMap =
324
- getRegisteredComponentUtils('IconButton')?.iconButtonSizeToIconSizeMapDefault ||
325
- iconButtonSizeToIconSizeMapDefault;
428
+ 'iconButtonSizeToIconSizeMap',
429
+ );
@@ -1,13 +1,9 @@
1
1
  import type { PropsWithChildren } from 'react';
2
2
 
3
- import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
3
+ import { getRegisteredComponentWithFallback } from '../../core';
4
4
 
5
5
  const IfDefault = (props: PropsWithChildren<{ shouldRender?: boolean }>) => {
6
6
  return <>{!!props.shouldRender && props.children}</>;
7
7
  };
8
8
 
9
- registerMoleculesComponents({
10
- If: IfDefault,
11
- });
12
-
13
9
  export const If = getRegisteredComponentWithFallback('If', IfDefault);
@@ -1,10 +1,6 @@
1
- import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
1
+ import { getRegisteredComponentWithFallback } from '../../core';
2
2
  import InputAddonDefault from './InputAddon';
3
3
 
4
- registerMoleculesComponents({
5
- InputAddon: InputAddonDefault,
6
- });
7
-
8
4
  export const InputAddon = getRegisteredComponentWithFallback('InputAddon', InputAddonDefault);
9
5
 
10
6
  export type { Props as InputAddonProps } from './InputAddon';
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
2
 
3
- import { getRegisteredMoleculesComponentStyles, registerComponentsStyles } from '../../core';
3
+ import { getRegisteredComponentStylesWithFallback } from '../../core';
4
4
 
5
5
  const inputAddonStylesDefault = StyleSheet.create(theme => ({
6
6
  root: {
@@ -26,8 +26,7 @@ const inputAddonStylesDefault = StyleSheet.create(theme => ({
26
26
  },
27
27
  }));
28
28
 
29
- registerComponentsStyles({
30
- InputAddon: inputAddonStylesDefault,
31
- });
32
-
33
- export const inputAddonStyles = getRegisteredMoleculesComponentStyles('InputAddon');
29
+ export const inputAddonStyles = getRegisteredComponentStylesWithFallback(
30
+ 'InputAddon',
31
+ inputAddonStylesDefault,
32
+ );
@@ -1,10 +1,6 @@
1
- import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
1
+ import { getRegisteredComponentWithFallback } from '../../core';
2
2
  import LinkDefault from './Link';
3
3
 
4
- registerMoleculesComponents({
5
- Link: LinkDefault,
6
- });
7
-
8
4
  export const Link = getRegisteredComponentWithFallback('Link', LinkDefault);
9
5
 
10
6
  export type { Props as LinkProps } from './Link';
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
2
 
3
- import { getRegisteredMoleculesComponentStyles, registerComponentsStyles } from '../../core';
3
+ import { getRegisteredComponentStylesWithFallback } from '../../core';
4
4
 
5
5
  // type States = 'disabled' | 'hovered';
6
6
 
@@ -32,8 +32,4 @@ const linkStylesDefault = StyleSheet.create(theme => ({
32
32
  },
33
33
  }));
34
34
 
35
- registerComponentsStyles({
36
- Link: linkStylesDefault,
37
- });
38
-
39
- export const linkStyles = getRegisteredMoleculesComponentStyles('Link');
35
+ export const linkStyles = getRegisteredComponentStylesWithFallback('Link', linkStylesDefault);
@@ -1,4 +1,4 @@
1
- import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
1
+ import { getRegisteredComponentWithFallback } from '../../core';
2
2
  import ListItemComponent from './ListItem';
3
3
  import ListItemDescription from './ListItemDescription';
4
4
  import ListItemTitle from './ListItemTitle';
@@ -8,10 +8,6 @@ const ListItemDefault = Object.assign(ListItemComponent, {
8
8
  Description: ListItemDescription,
9
9
  });
10
10
 
11
- registerMoleculesComponents({
12
- ListItem: ListItemDefault,
13
- });
14
-
15
11
  export const ListItem = getRegisteredComponentWithFallback('ListItem', ListItemDefault);
16
12
 
17
13
  export type { Props as ListItemProps } from './ListItem';
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
2
 
3
- import { getRegisteredMoleculesComponentStyles, registerComponentsStyles } from '../../core';
3
+ import { getRegisteredComponentStylesWithFallback } from '../../core';
4
4
 
5
5
  const listItemStylesDefault = StyleSheet.create(theme => ({
6
6
  root: {
@@ -101,13 +101,15 @@ const listItemDescriptionStylesDefault = StyleSheet.create(theme => ({
101
101
  },
102
102
  }));
103
103
 
104
- registerComponentsStyles({
105
- ListItem: listItemStylesDefault,
106
- ListItem_Title: listItemTitleStylesDefault,
107
- ListItem_Description: listItemDescriptionStylesDefault,
108
- });
109
-
110
- export const listItemStyles = getRegisteredMoleculesComponentStyles('ListItem');
111
- export const listItemTitleStyles = getRegisteredMoleculesComponentStyles('ListItem_Title');
112
- export const listItemDescriptionStyles =
113
- getRegisteredMoleculesComponentStyles('ListItem_Description');
104
+ export const listItemStyles = getRegisteredComponentStylesWithFallback(
105
+ 'ListItem',
106
+ listItemStylesDefault,
107
+ );
108
+ export const listItemTitleStyles = getRegisteredComponentStylesWithFallback(
109
+ 'ListItem_Title',
110
+ listItemTitleStylesDefault,
111
+ );
112
+ export const listItemDescriptionStyles = getRegisteredComponentStylesWithFallback(
113
+ 'ListItem_Description',
114
+ listItemDescriptionStylesDefault,
115
+ );