react-native-molecules 0.5.0-beta.0 → 0.5.0-beta.10
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.
- package/README.md +87 -0
- package/components/Accordion/AccordionItem.tsx +3 -2
- package/components/Accordion/AccordionItemContent.tsx +1 -0
- package/components/Accordion/AccordionItemHeader.tsx +6 -5
- package/components/Accordion/index.tsx +8 -14
- package/components/Accordion/utils.ts +17 -14
- package/components/ActivityIndicator/ActivityIndicator.tsx +12 -20
- package/components/ActivityIndicator/index.tsx +1 -5
- package/components/Appbar/index.tsx +1 -4
- package/components/Appbar/utils.ts +33 -21
- package/components/Avatar/index.tsx +1 -5
- package/components/Avatar/utils.ts +2 -6
- package/components/Backdrop/Backdrop.tsx +2 -2
- package/components/Backdrop/index.tsx +1 -5
- package/components/Backdrop/utils.ts +5 -6
- package/components/Badge/index.tsx +1 -5
- package/components/Badge/utils.ts +2 -6
- package/components/Button/Button.tsx +211 -264
- package/components/Button/index.tsx +9 -7
- package/components/Button/types.ts +16 -2
- package/components/Button/utils.ts +231 -212
- package/components/Card/Card.tsx +8 -4
- package/components/Card/CardContent.tsx +5 -4
- package/components/Card/CardHeader.tsx +5 -3
- package/components/Card/CardMedia.tsx +5 -3
- package/components/Card/CardTypography.tsx +5 -3
- package/components/Card/index.tsx +1 -5
- package/components/Card/utils.ts +5 -6
- package/components/Checkbox/Checkbox.tsx +1 -0
- package/components/Checkbox/CheckboxBase.ios.tsx +1 -0
- package/components/Checkbox/CheckboxBase.tsx +1 -0
- package/components/Checkbox/index.tsx +1 -5
- package/components/Checkbox/utils.ts +6 -6
- package/components/Chip/Chip.tsx +40 -52
- package/components/Chip/index.tsx +1 -5
- package/components/Chip/utils.ts +5 -13
- package/components/DatePickerDocked/index.tsx +1 -5
- package/components/DatePickerDocked/utils.ts +21 -19
- package/components/DatePickerInline/index.tsx +1 -5
- package/components/DatePickerInline/utils.ts +41 -28
- package/components/DatePickerInput/index.tsx +2 -6
- package/components/DatePickerInput/utils.ts +5 -6
- package/components/DatePickerModal/DatePickerModalHeader.tsx +1 -1
- package/components/DatePickerModal/index.tsx +1 -5
- package/components/DatePickerModal/utils.ts +17 -16
- package/components/DateTimePicker/index.tsx +1 -5
- package/components/DateTimePicker/utils.ts +5 -6
- package/components/Dialog/index.tsx +1 -5
- package/components/Dialog/utils.ts +22 -16
- package/components/Drawer/Collapsible/utils.ts +13 -13
- package/components/Drawer/Drawer.tsx +2 -3
- package/components/Drawer/DrawerContent.tsx +5 -3
- package/components/Drawer/DrawerFooter.tsx +5 -4
- package/components/Drawer/DrawerHeader.tsx +5 -4
- package/components/Drawer/DrawerItem.tsx +5 -3
- package/components/Drawer/DrawerItemGroup.tsx +5 -4
- package/components/Drawer/index.tsx +1 -5
- package/components/Drawer/utils.ts +7 -7
- package/components/ElementGroup/ElementGroup.tsx +16 -14
- package/components/ElementGroup/index.tsx +1 -5
- package/components/ElementGroup/utils.ts +5 -6
- package/components/FAB/index.tsx +1 -5
- package/components/FAB/utils.ts +3 -7
- package/components/FilePicker/index.tsx +1 -5
- package/components/FilePicker/utils.ts +5 -6
- package/components/HelperText/index.tsx +1 -5
- package/components/HelperText/utils.ts +5 -7
- package/components/HorizontalDivider/HorizontalDivider.tsx +5 -3
- package/components/HorizontalDivider/index.tsx +1 -5
- package/components/Icon/CrossFadeIcon.tsx +3 -5
- package/components/Icon/Icon.tsx +3 -14
- package/components/Icon/iconFactory.tsx +3 -3
- package/components/Icon/index.tsx +2 -6
- package/components/Icon/types.ts +17 -6
- package/components/IconButton/IconButton.tsx +45 -58
- package/components/IconButton/index.tsx +1 -5
- package/components/IconButton/utils.ts +15 -26
- package/components/If/index.tsx +1 -5
- package/components/InputAddon/index.tsx +1 -5
- package/components/InputAddon/utils.ts +5 -6
- package/components/Link/index.tsx +1 -5
- package/components/Link/utils.ts +7 -9
- package/components/ListItem/index.tsx +1 -5
- package/components/ListItem/utils.ts +13 -11
- package/components/LoadingIndicator/LoadingIndicator.tsx +253 -0
- package/components/LoadingIndicator/LoadingIndicator.web.tsx +136 -0
- package/components/LoadingIndicator/index.tsx +13 -0
- package/components/LoadingIndicator/utils.ts +117 -0
- package/components/Menu/index.tsx +1 -5
- package/components/Menu/utils.ts +6 -8
- package/components/Modal/index.tsx +1 -5
- package/components/Modal/utils.ts +2 -6
- package/components/NavigationRail/NavigationRailHeader.tsx +1 -1
- package/components/NavigationRail/NavigationRailItem.tsx +2 -1
- package/components/NavigationRail/index.tsx +1 -5
- package/components/NavigationRail/utils.ts +21 -17
- package/components/NavigationStack/index.tsx +1 -5
- package/components/NavigationStack/utils.tsx +7 -1
- package/components/Portal/index.tsx +1 -5
- package/components/RadioButton/index.ts +5 -10
- package/components/RadioButton/utils.ts +9 -8
- package/components/Rating/RatingItem.tsx +2 -1
- package/components/Rating/index.tsx +1 -5
- package/components/Rating/utils.ts +6 -8
- package/components/Select/Select.tsx +360 -501
- package/components/Select/index.ts +7 -14
- package/components/Select/types.ts +2 -4
- package/components/Select/utils.ts +215 -0
- package/components/Slot/Slot.tsx +244 -0
- package/components/Slot/compose-refs.tsx +60 -0
- package/components/Slot/index.tsx +8 -0
- package/components/StateLayer/index.tsx +1 -5
- package/components/StateLayer/utils.ts +5 -6
- package/components/Surface/Surface.android.tsx +34 -8
- package/components/Surface/Surface.ios.tsx +36 -29
- package/components/Surface/Surface.tsx +31 -4
- package/components/Surface/index.tsx +1 -5
- package/components/Surface/utils.ts +49 -36
- package/components/Switch/Switch.tsx +8 -2
- package/components/Switch/index.tsx +1 -5
- package/components/Switch/utils.ts +2 -6
- package/components/Tabs/Tabs.tsx +14 -13
- package/components/Tabs/index.tsx +1 -5
- package/components/Tabs/utils.ts +10 -10
- package/components/Text/Text.tsx +2 -8
- package/components/TextInput/TextInput.tsx +5 -4
- package/components/TextInput/index.tsx +1 -5
- package/components/TextInput/utils.ts +8 -15
- package/components/TextInputWithMask/index.tsx +1 -5
- package/components/TimePicker/AmPmSwitcher.tsx +1 -1
- package/components/TimePicker/index.tsx +1 -5
- package/components/TimePicker/utils.ts +29 -21
- package/components/TimePickerField/index.tsx +1 -5
- package/components/TimePickerField/utils.ts +5 -6
- package/components/TimePickerModal/TimePickerModal.tsx +6 -2
- package/components/TimePickerModal/index.tsx +1 -5
- package/components/TimePickerModal/utils.ts +5 -6
- package/components/Tooltip/TooltipTrigger.tsx +25 -16
- package/components/Tooltip/index.tsx +5 -9
- package/components/Tooltip/utils.ts +5 -6
- package/components/TouchableRipple/TouchableRipple.native.tsx +49 -13
- package/components/TouchableRipple/TouchableRipple.tsx +136 -46
- package/components/TouchableRipple/index.tsx +1 -5
- package/components/TouchableRipple/utils.ts +5 -6
- package/components/VerticalDivider/VerticalDivider.tsx +9 -8
- package/components/VerticalDivider/index.tsx +1 -5
- package/core/componentsRegistry.ts +31 -19
- package/hocs/withPortal.tsx +1 -1
- package/hooks/index.tsx +0 -1
- package/hooks/useControlledValue.tsx +20 -4
- package/hooks/useSubcomponents.tsx +56 -22
- package/hooks/useWhatHasUpdated.tsx +48 -0
- package/package.json +10 -13
- package/shortcuts-manager/ShortcutsManager/ShortcutsManager.tsx +5 -2
- package/shortcuts-manager/ShortcutsManager/utils.tsx +3 -2
- package/shortcuts-manager/useShortcut/index.tsx +1 -1
- package/shortcuts-manager/useShortcut/useShortcut.tsx +1 -1
- package/styles/shadow.ts +2 -1
- package/styles/themes/LightTheme.tsx +1 -1
- package/utils/extractPropertiesFromStyles.ts +25 -0
- package/utils/lodash.ts +77 -6
- package/utils/repository.ts +2 -52
- package/utils/tokenStylesParser.ts +3 -1
- package/hooks/useBreakpoints.tsx +0 -7
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import CheckboxComponent from './Checkbox';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
Checkbox: CheckboxComponent,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const Checkbox = getRegisteredComponentWithFallback('Checkbox', CheckboxComponent);
|
|
9
5
|
|
|
10
6
|
export type { Props as CheckboxProps } from './Checkbox';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const PADDING = 6;
|
|
6
6
|
|
|
@@ -13,6 +13,10 @@ export const iconSizeMap = {
|
|
|
13
13
|
const checkboxStylesDefault = StyleSheet.create(theme => ({
|
|
14
14
|
root: {
|
|
15
15
|
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
android: {},
|
|
18
|
+
ios: {},
|
|
19
|
+
},
|
|
16
20
|
size: {
|
|
17
21
|
sm: {
|
|
18
22
|
padding: PADDING,
|
|
@@ -203,8 +207,4 @@ const checkboxStylesDefault = StyleSheet.create(theme => ({
|
|
|
203
207
|
// },
|
|
204
208
|
}));
|
|
205
209
|
|
|
206
|
-
|
|
207
|
-
Checkbox: checkboxStylesDefault,
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
export const styles = getRegisteredMoleculesComponentStyles('Checkbox') ?? checkboxStylesDefault;
|
|
210
|
+
export const styles = getRegisteredComponentStylesWithFallback('Checkbox', checkboxStylesDefault);
|
package/components/Chip/Chip.tsx
CHANGED
|
@@ -97,10 +97,6 @@ export type Props = Omit<TouchableRippleProps, 'children'> &
|
|
|
97
97
|
* Whether to show the ActivityIndicator or not
|
|
98
98
|
*/
|
|
99
99
|
loading?: boolean;
|
|
100
|
-
/**
|
|
101
|
-
* container style
|
|
102
|
-
*/
|
|
103
|
-
containerStyle?: ViewStyle;
|
|
104
100
|
/**
|
|
105
101
|
* left element container style
|
|
106
102
|
*/
|
|
@@ -132,7 +128,6 @@ export type Props = Omit<TouchableRippleProps, 'children'> &
|
|
|
132
128
|
const Chip = (
|
|
133
129
|
{
|
|
134
130
|
style,
|
|
135
|
-
containerStyle: containerStyleProp,
|
|
136
131
|
label: _label,
|
|
137
132
|
labelCharacterLimit = 20,
|
|
138
133
|
variant = 'outlined',
|
|
@@ -158,11 +153,13 @@ const Chip = (
|
|
|
158
153
|
leftElementIconProps,
|
|
159
154
|
invertLabelColor,
|
|
160
155
|
backgroundColor,
|
|
156
|
+
onPress,
|
|
161
157
|
...rest
|
|
162
158
|
}: Props,
|
|
163
159
|
ref: any,
|
|
164
160
|
) => {
|
|
165
161
|
const { hovered, actionsRef } = useActionState({ ref, actionsToListen: ['hover'] });
|
|
162
|
+
const Wrapper = onPress ? TouchableRipple : View;
|
|
166
163
|
|
|
167
164
|
const state = resolveStateVariant({
|
|
168
165
|
disabled: !!disabled,
|
|
@@ -192,47 +189,39 @@ const Chip = (
|
|
|
192
189
|
// selectedColorProp ? { selectedColor: selectedColorProp } : {},
|
|
193
190
|
// ]);
|
|
194
191
|
|
|
195
|
-
const {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
styles.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
stateLayerProps?.style,
|
|
229
|
-
style,
|
|
230
|
-
containerStyleProp,
|
|
231
|
-
labelStyleProp,
|
|
232
|
-
state,
|
|
233
|
-
size,
|
|
234
|
-
variant,
|
|
235
|
-
]);
|
|
192
|
+
const { containerStyle, leftElementStyle, rightElementStyle, labelStyle, stateLayerStyle } =
|
|
193
|
+
useMemo(() => {
|
|
194
|
+
return {
|
|
195
|
+
containerStyle: [
|
|
196
|
+
styles.container,
|
|
197
|
+
selected && selectionBackgroundColor
|
|
198
|
+
? { backgroundColor: selectionBackgroundColor }
|
|
199
|
+
: {},
|
|
200
|
+
style,
|
|
201
|
+
],
|
|
202
|
+
leftElementStyle: [styles.leftElement, leftElementContainerStyle],
|
|
203
|
+
rightElementStyle: [styles.rightElement, rightElementContainerStyle],
|
|
204
|
+
labelStyle: [
|
|
205
|
+
styles.label,
|
|
206
|
+
selected && selectedColor ? { color: selectedColor } : {},
|
|
207
|
+
labelStyleProp,
|
|
208
|
+
],
|
|
209
|
+
stateLayerStyle: [styles.stateLayer, stateLayerProps?.style],
|
|
210
|
+
};
|
|
211
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
212
|
+
}, [
|
|
213
|
+
leftElementContainerStyle,
|
|
214
|
+
rightElementContainerStyle,
|
|
215
|
+
selected,
|
|
216
|
+
selectedColor,
|
|
217
|
+
selectionBackgroundColor,
|
|
218
|
+
stateLayerProps?.style,
|
|
219
|
+
style,
|
|
220
|
+
labelStyleProp,
|
|
221
|
+
state,
|
|
222
|
+
size,
|
|
223
|
+
variant,
|
|
224
|
+
]);
|
|
236
225
|
|
|
237
226
|
const { accessibilityState, elevation } = useMemo(
|
|
238
227
|
() => ({
|
|
@@ -251,14 +240,13 @@ const Chip = (
|
|
|
251
240
|
{...containerProps}
|
|
252
241
|
elevation={elevation}
|
|
253
242
|
style={containerStyle}
|
|
254
|
-
backgroundColor={backgroundColor}
|
|
255
|
-
|
|
243
|
+
backgroundColor={backgroundColor}
|
|
244
|
+
asChild>
|
|
245
|
+
<Wrapper
|
|
256
246
|
borderless
|
|
257
247
|
{...rest}
|
|
258
248
|
disabled={disabled}
|
|
259
|
-
style={touchableRippleStyle}
|
|
260
249
|
accessibilityLabel={accessibilityLabel}
|
|
261
|
-
accessibilityRole="button"
|
|
262
250
|
accessibilityState={accessibilityState}
|
|
263
251
|
ref={actionsRef}
|
|
264
252
|
testID={testID}>
|
|
@@ -297,7 +285,7 @@ const Chip = (
|
|
|
297
285
|
style={stateLayerStyle}
|
|
298
286
|
/>
|
|
299
287
|
</>
|
|
300
|
-
</
|
|
288
|
+
</Wrapper>
|
|
301
289
|
</Surface>
|
|
302
290
|
);
|
|
303
291
|
};
|
|
@@ -362,7 +350,7 @@ const RightElement = memo(
|
|
|
362
350
|
{onClose ? (
|
|
363
351
|
<IconButtonWithContrastColor
|
|
364
352
|
name="close"
|
|
365
|
-
size={
|
|
353
|
+
size={14}
|
|
366
354
|
accessibilityLabel="Close"
|
|
367
355
|
disabled={disabled}
|
|
368
356
|
onPress={onClose}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
|
|
3
|
-
import { getRegisteredComponentWithFallback
|
|
3
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
4
4
|
import { default as ChipComponent, type Props as ChipProps } from './Chip';
|
|
5
5
|
|
|
6
6
|
export const ChipDefault = Object.assign(
|
|
@@ -40,10 +40,6 @@ export const ChipDefault = Object.assign(
|
|
|
40
40
|
},
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
registerMoleculesComponents({
|
|
44
|
-
Chip: ChipDefault,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
43
|
export const Chip = getRegisteredComponentWithFallback('Chip', ChipDefault);
|
|
48
44
|
|
|
49
45
|
export type { Props as ChipProps } from './Chip';
|
package/components/Chip/utils.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const chipStylesDefault = StyleSheet.create(theme => ({
|
|
6
6
|
container: {
|
|
7
7
|
borderRadius: theme.shapes.corner.small,
|
|
8
8
|
backgroundColor: theme.colors.surface,
|
|
9
|
+
paddingHorizontal: theme.spacings['2'],
|
|
10
|
+
flexDirection: 'row',
|
|
11
|
+
alignItems: 'center',
|
|
9
12
|
|
|
10
13
|
variants: {
|
|
11
14
|
variant: {
|
|
@@ -47,13 +50,6 @@ const chipStylesDefault = StyleSheet.create(theme => ({
|
|
|
47
50
|
},
|
|
48
51
|
},
|
|
49
52
|
},
|
|
50
|
-
touchableRippleContainer: {
|
|
51
|
-
flex: 1,
|
|
52
|
-
paddingHorizontal: theme.spacings['2'],
|
|
53
|
-
borderRadius: theme.shapes.corner.small,
|
|
54
|
-
flexDirection: 'row',
|
|
55
|
-
alignItems: 'center',
|
|
56
|
-
},
|
|
57
53
|
label: {
|
|
58
54
|
display: 'flex',
|
|
59
55
|
color: theme.colors.onSurfaceVariant,
|
|
@@ -91,10 +87,6 @@ const chipStylesDefault = StyleSheet.create(theme => ({
|
|
|
91
87
|
},
|
|
92
88
|
}));
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
Chip: chipStylesDefault,
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export const styles = getRegisteredMoleculesComponentStyles('Chip');
|
|
90
|
+
export const styles = getRegisteredComponentStylesWithFallback('Chip', chipStylesDefault);
|
|
99
91
|
|
|
100
92
|
export type States = 'hovered' | 'selectedAndHovered' | 'selected' | 'disabled';
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DatePickerDockedDefault from './DatePickerDocked';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
DatePickerDocked: DatePickerDockedDefault,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const DatePickerDocked = getRegisteredComponentWithFallback(
|
|
9
5
|
'DatePickerDocked',
|
|
10
6
|
DatePickerDockedDefault,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const datePickerDockedStylesDefault = StyleSheet.create(theme => ({
|
|
6
6
|
root: {
|
|
@@ -131,25 +131,27 @@ const datePickerDockedMonthStylesDefault = StyleSheet.create(theme => ({
|
|
|
131
131
|
},
|
|
132
132
|
}));
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
DatePickerDocked
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
export const
|
|
147
|
-
getRegisteredMoleculesComponentStyles('DatePicker_HeaderItem');
|
|
148
|
-
export const datePickerMonthPickerStyles = getRegisteredMoleculesComponentStyles(
|
|
134
|
+
export const datePickerDockedStyles = getRegisteredComponentStylesWithFallback(
|
|
135
|
+
'DatePickerDocked',
|
|
136
|
+
datePickerDockedStylesDefault,
|
|
137
|
+
);
|
|
138
|
+
export const datePickerDockedHeaderStyles = getRegisteredComponentStylesWithFallback(
|
|
139
|
+
'DatePickerDocked_Header',
|
|
140
|
+
datePickerDockedHeaderStylesDefault,
|
|
141
|
+
);
|
|
142
|
+
export const datePickerHeaderItemStyles = getRegisteredComponentStylesWithFallback(
|
|
143
|
+
'DatePicker_HeaderItem',
|
|
144
|
+
datePickerHeaderItemStylesDefault,
|
|
145
|
+
);
|
|
146
|
+
export const datePickerMonthPickerStyles = getRegisteredComponentStylesWithFallback(
|
|
149
147
|
'DatePickerDocked_MonthPicker',
|
|
148
|
+
datePickerMonthPickerStylesDefault,
|
|
150
149
|
);
|
|
151
|
-
export const datePickerDockedMonthItemStyles =
|
|
150
|
+
export const datePickerDockedMonthItemStyles = getRegisteredComponentStylesWithFallback(
|
|
152
151
|
'DatePickerDocked_MonthItem',
|
|
152
|
+
datePickerDockedMonthItemStylesDefault,
|
|
153
|
+
);
|
|
154
|
+
export const datePickerDockedMonthStyles = getRegisteredComponentStylesWithFallback(
|
|
155
|
+
'DatePickerDocked_Month',
|
|
156
|
+
datePickerDockedMonthStylesDefault,
|
|
153
157
|
);
|
|
154
|
-
export const datePickerDockedMonthStyles =
|
|
155
|
-
getRegisteredMoleculesComponentStyles('DatePickerDocked_Month');
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DatePickerInlineDefault from './DatePickerInline';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
DatePickerInline: DatePickerInlineDefault,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const DatePickerInline = getRegisteredComponentWithFallback(
|
|
9
5
|
'DatePickerInline',
|
|
10
6
|
DatePickerInlineDefault,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
import { daySize } from './dateUtils';
|
|
5
5
|
|
|
6
6
|
export const dayNamesHeight = 44;
|
|
@@ -338,30 +338,43 @@ const datePickerYearItemStylesDefault = StyleSheet.create(theme => ({
|
|
|
338
338
|
},
|
|
339
339
|
}));
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
DatePickerInline
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
export const datePickerWeekStyles =
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
341
|
+
export const datePickerStyles = getRegisteredComponentStylesWithFallback(
|
|
342
|
+
'DatePickerInline',
|
|
343
|
+
datePickerStylesDefault,
|
|
344
|
+
);
|
|
345
|
+
export const datePickerMonthStyles = getRegisteredComponentStylesWithFallback(
|
|
346
|
+
'DatePicker_Month',
|
|
347
|
+
datePickerMonthStylesDefault,
|
|
348
|
+
);
|
|
349
|
+
export const datePickerYearPickerStyles = getRegisteredComponentStylesWithFallback(
|
|
350
|
+
'DatePicker_YearPicker',
|
|
351
|
+
datePickerYearPickerStylesDefault,
|
|
352
|
+
);
|
|
353
|
+
export const datePickerDayStyles = getRegisteredComponentStylesWithFallback(
|
|
354
|
+
'DatePicker_Day',
|
|
355
|
+
datePickerDayStylesDefault,
|
|
356
|
+
);
|
|
357
|
+
export const datePickerDayEmptyStyles = getRegisteredComponentStylesWithFallback(
|
|
358
|
+
'DatePicker_DayEmpty',
|
|
359
|
+
datePickerDayEmptyStylesDefault,
|
|
360
|
+
);
|
|
361
|
+
export const datePickerWeekStyles = getRegisteredComponentStylesWithFallback(
|
|
362
|
+
'DatePicker_Week',
|
|
363
|
+
datePickerWeekStylesDefault,
|
|
364
|
+
);
|
|
365
|
+
export const datePickerHeaderStyles = getRegisteredComponentStylesWithFallback(
|
|
366
|
+
'DatePicker_Header',
|
|
367
|
+
datePickerHeaderStylesDefault,
|
|
368
|
+
);
|
|
369
|
+
export const dateDayNameStyles = getRegisteredComponentStylesWithFallback(
|
|
370
|
+
'DatePicker_DayName',
|
|
371
|
+
dateDayNameStylesDefault,
|
|
372
|
+
);
|
|
373
|
+
export const datePickerDayRangeStyles = getRegisteredComponentStylesWithFallback(
|
|
374
|
+
'DatePicker_DayRange',
|
|
375
|
+
datePickerDayRangeStylesDefault,
|
|
376
|
+
);
|
|
377
|
+
export const datePickerYearItemStyles = getRegisteredComponentStylesWithFallback(
|
|
378
|
+
'DatePicker_YearItem',
|
|
379
|
+
datePickerYearItemStylesDefault,
|
|
380
|
+
);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DatePickerInputDefault from './DatePickerInput';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
DatePickerInput: DatePickerInputDefault,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const DatePickerInput = getRegisteredComponentWithFallback(
|
|
9
5
|
'DatePickerInput',
|
|
10
6
|
DatePickerInputDefault,
|
|
11
7
|
);
|
|
12
8
|
|
|
13
|
-
export { DatePickerInputProps } from './types';
|
|
9
|
+
export type { DatePickerInputProps } from './types';
|
|
14
10
|
export { datePickerInputStyles } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const datePickerInputStylesDefault = StyleSheet.create({
|
|
6
6
|
root: {
|
|
@@ -9,8 +9,7 @@ const datePickerInputStylesDefault = StyleSheet.create({
|
|
|
9
9
|
},
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
DatePickerInput
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export const datePickerInputStyles = getRegisteredMoleculesComponentStyles('DatePickerInput');
|
|
12
|
+
export const datePickerInputStyles = getRegisteredComponentStylesWithFallback(
|
|
13
|
+
'DatePickerInput',
|
|
14
|
+
datePickerInputStylesDefault,
|
|
15
|
+
);
|
|
@@ -64,7 +64,7 @@ export default function DatePickerModalHeader(props: DatePickerModalHeaderProps)
|
|
|
64
64
|
onPress={props.onSave}
|
|
65
65
|
disabled={props.saveLabelDisabled || false}
|
|
66
66
|
testID="dates-save">
|
|
67
|
-
{saveLabel}
|
|
67
|
+
<Button.Text>{saveLabel}</Button.Text>
|
|
68
68
|
</Button>
|
|
69
69
|
</View>
|
|
70
70
|
</SafeAreaView>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DatePickerModalDefault from './DatePickerModal';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
DatePickerModal: DatePickerModalDefault,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const DatePickerModal = getRegisteredComponentWithFallback(
|
|
9
5
|
'DatePickerModal',
|
|
10
6
|
DatePickerModalDefault,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const datePickerModalStylesDefault = StyleSheet.create(theme => ({
|
|
6
6
|
header: {
|
|
@@ -100,22 +100,23 @@ const datePickerModalEditStylesDefault = StyleSheet.create(theme => ({
|
|
|
100
100
|
separator: { width: 12 },
|
|
101
101
|
}));
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
DatePickerModal
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export const
|
|
112
|
-
export const datePickerModalHeaderStyles =
|
|
113
|
-
getRegisteredMoleculesComponentStyles('DatePickerModal_Header');
|
|
114
|
-
export const datePickerModalContentHeaderStyles = getRegisteredMoleculesComponentStyles(
|
|
103
|
+
export const datePickerModalStyles = getRegisteredComponentStylesWithFallback(
|
|
104
|
+
'DatePickerModal',
|
|
105
|
+
datePickerModalStylesDefault,
|
|
106
|
+
);
|
|
107
|
+
export const datePickerModalHeaderStyles = getRegisteredComponentStylesWithFallback(
|
|
108
|
+
'DatePickerModal_Header',
|
|
109
|
+
datePickerModalHeaderStylesDefault,
|
|
110
|
+
);
|
|
111
|
+
export const datePickerModalContentHeaderStyles = getRegisteredComponentStylesWithFallback(
|
|
115
112
|
'DatePickerModal_ContentHeader',
|
|
113
|
+
datePickerModalContentHeaderStylesDefault,
|
|
116
114
|
);
|
|
117
|
-
export const datePickerModalHeaderBackgroundStyles =
|
|
115
|
+
export const datePickerModalHeaderBackgroundStyles = getRegisteredComponentStylesWithFallback(
|
|
118
116
|
'DatePickerModal_HeaderBackground',
|
|
117
|
+
datePickerModalHeaderBackgroundStylesDefault,
|
|
118
|
+
);
|
|
119
|
+
export const datePickerModalEditStyles = getRegisteredComponentStylesWithFallback(
|
|
120
|
+
'DatePickerModal_Edit',
|
|
121
|
+
datePickerModalEditStylesDefault,
|
|
119
122
|
);
|
|
120
|
-
export const datePickerModalEditStyles =
|
|
121
|
-
getRegisteredMoleculesComponentStyles('DatePickerModal_Edit');
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DateTimePickerDefault from './DateTimePicker';
|
|
3
3
|
|
|
4
|
-
registerMoleculesComponents({
|
|
5
|
-
DateTimePicker: DateTimePickerDefault,
|
|
6
|
-
});
|
|
7
|
-
|
|
8
4
|
export const DateTimePicker = getRegisteredComponentWithFallback(
|
|
9
5
|
'DateTimePicker',
|
|
10
6
|
DateTimePickerDefault,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const dateTimePickerStylesDefault = StyleSheet.create({
|
|
6
6
|
container: {},
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
DateTimePicker
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export const dateTimePickerStyles = getRegisteredMoleculesComponentStyles('DateTimePicker');
|
|
9
|
+
export const dateTimePickerStyles = getRegisteredComponentStylesWithFallback(
|
|
10
|
+
'DateTimePicker',
|
|
11
|
+
dateTimePickerStylesDefault,
|
|
12
|
+
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRegisteredComponentWithFallback
|
|
1
|
+
import { getRegisteredComponentWithFallback } from '../../core';
|
|
2
2
|
import DialogComponent from './Dialog';
|
|
3
3
|
import DialogActions from './DialogActions';
|
|
4
4
|
import DialogContent from './DialogContent';
|
|
@@ -17,10 +17,6 @@ export const DialogDefault = Object.assign(
|
|
|
17
17
|
},
|
|
18
18
|
);
|
|
19
19
|
|
|
20
|
-
registerMoleculesComponents({
|
|
21
|
-
Dialog: DialogDefault,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
20
|
export const Dialog = getRegisteredComponentWithFallback('Dialog', DialogDefault);
|
|
25
21
|
|
|
26
22
|
export type { Props as DialogProps } from './Dialog';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native-unistyles';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { getRegisteredComponentStylesWithFallback } from '../../core';
|
|
4
4
|
|
|
5
5
|
const dialogStylesDefault = StyleSheet.create(theme => ({
|
|
6
6
|
root: {
|
|
@@ -63,18 +63,24 @@ const dialogActionsStylesDefault = StyleSheet.create(theme => ({
|
|
|
63
63
|
},
|
|
64
64
|
}));
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Dialog_Title
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
export const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export const dialogContentStyles =
|
|
80
|
-
|
|
66
|
+
export const dialogStyles = getRegisteredComponentStylesWithFallback('Dialog', dialogStylesDefault);
|
|
67
|
+
export const dialogTitleStyles = getRegisteredComponentStylesWithFallback(
|
|
68
|
+
'Dialog_Title',
|
|
69
|
+
dialogTitleStylesDefault,
|
|
70
|
+
);
|
|
71
|
+
export const dialogScrollAreaStyles = getRegisteredComponentStylesWithFallback(
|
|
72
|
+
'Dialog_ScrollArea',
|
|
73
|
+
dialogScrollAreaStylesDefault,
|
|
74
|
+
);
|
|
75
|
+
export const dialogIconStyles = getRegisteredComponentStylesWithFallback(
|
|
76
|
+
'Dialog_Icon',
|
|
77
|
+
dialogIconStylesDefault,
|
|
78
|
+
);
|
|
79
|
+
export const dialogContentStyles = getRegisteredComponentStylesWithFallback(
|
|
80
|
+
'Dialog_Content',
|
|
81
|
+
dialogContentStylesDefault,
|
|
82
|
+
);
|
|
83
|
+
export const dialogActionsStyles = getRegisteredComponentStylesWithFallback(
|
|
84
|
+
'Dialog_Actions',
|
|
85
|
+
dialogActionsStylesDefault,
|
|
86
|
+
);
|