react-native-molecules 0.5.0-beta.0
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/components/Accordion/Accordion.tsx +89 -0
- package/components/Accordion/AccordionItem.tsx +94 -0
- package/components/Accordion/AccordionItemContent.tsx +17 -0
- package/components/Accordion/AccordionItemHeader.tsx +122 -0
- package/components/Accordion/index.tsx +36 -0
- package/components/Accordion/utils.ts +62 -0
- package/components/ActivityIndicator/ActivityIndicator.ios.tsx +1 -0
- package/components/ActivityIndicator/ActivityIndicator.tsx +200 -0
- package/components/ActivityIndicator/AnimatedSpinner.tsx +121 -0
- package/components/ActivityIndicator/index.tsx +17 -0
- package/components/Appbar/AppbarActions.tsx +13 -0
- package/components/Appbar/AppbarBase.tsx +60 -0
- package/components/Appbar/AppbarCenterAligned.tsx +13 -0
- package/components/Appbar/AppbarLarge.tsx +13 -0
- package/components/Appbar/AppbarLeft.tsx +26 -0
- package/components/Appbar/AppbarMedium.tsx +13 -0
- package/components/Appbar/AppbarRight.tsx +40 -0
- package/components/Appbar/AppbarSmall.tsx +13 -0
- package/components/Appbar/AppbarTitle.tsx +49 -0
- package/components/Appbar/index.tsx +46 -0
- package/components/Appbar/types.ts +19 -0
- package/components/Appbar/utils.ts +127 -0
- package/components/Avatar/Avatar.tsx +189 -0
- package/components/Avatar/index.tsx +11 -0
- package/components/Avatar/utils.ts +35 -0
- package/components/Backdrop/Backdrop.tsx +18 -0
- package/components/Backdrop/index.tsx +11 -0
- package/components/Backdrop/types.ts +3 -0
- package/components/Backdrop/utils.ts +21 -0
- package/components/Badge/Badge.tsx +29 -0
- package/components/Badge/index.tsx +11 -0
- package/components/Badge/utils.ts +38 -0
- package/components/Button/Button.tsx +349 -0
- package/components/Button/index.tsx +11 -0
- package/components/Button/types.ts +5 -0
- package/components/Button/utils.ts +416 -0
- package/components/Card/Card.tsx +160 -0
- package/components/Card/CardActions.tsx +18 -0
- package/components/Card/CardContent.tsx +29 -0
- package/components/Card/CardHeader.tsx +31 -0
- package/components/Card/CardHeadline.tsx +15 -0
- package/components/Card/CardMedia.tsx +36 -0
- package/components/Card/CardSubhead.tsx +15 -0
- package/components/Card/CardText.tsx +13 -0
- package/components/Card/CardTypography.tsx +113 -0
- package/components/Card/index.tsx +38 -0
- package/components/Card/types.ts +1 -0
- package/components/Card/utils.ts +23 -0
- package/components/Checkbox/Checkbox.tsx +123 -0
- package/components/Checkbox/CheckboxBase.ios.tsx +86 -0
- package/components/Checkbox/CheckboxBase.tsx +216 -0
- package/components/Checkbox/index.tsx +11 -0
- package/components/Checkbox/types.ts +72 -0
- package/components/Checkbox/utils.ts +210 -0
- package/components/Chip/Chip.tsx +416 -0
- package/components/Chip/index.tsx +51 -0
- package/components/Chip/utils.ts +100 -0
- package/components/DatePickerDocked/DatePickerDocked.tsx +30 -0
- package/components/DatePickerDocked/DatePickerDockedHeader.tsx +129 -0
- package/components/DatePickerDocked/index.tsx +21 -0
- package/components/DatePickerDocked/types.ts +11 -0
- package/components/DatePickerDocked/utils.ts +155 -0
- package/components/DatePickerInline/AutoSizer.tsx +46 -0
- package/components/DatePickerInline/DatePickerContext.tsx +21 -0
- package/components/DatePickerInline/DatePickerInline.tsx +82 -0
- package/components/DatePickerInline/DatePickerInlineBase.tsx +181 -0
- package/components/DatePickerInline/DatePickerInlineHeader.tsx +108 -0
- package/components/DatePickerInline/Day.tsx +88 -0
- package/components/DatePickerInline/DayName.tsx +17 -0
- package/components/DatePickerInline/DayNames.tsx +32 -0
- package/components/DatePickerInline/DayRange.tsx +48 -0
- package/components/DatePickerInline/HeaderItem.tsx +111 -0
- package/components/DatePickerInline/Month.tsx +233 -0
- package/components/DatePickerInline/MonthPicker.tsx +174 -0
- package/components/DatePickerInline/Swiper.native.tsx +172 -0
- package/components/DatePickerInline/Swiper.tsx +172 -0
- package/components/DatePickerInline/SwiperUtils.ts +40 -0
- package/components/DatePickerInline/Week.tsx +67 -0
- package/components/DatePickerInline/YearPicker.tsx +139 -0
- package/components/DatePickerInline/dateUtils.tsx +334 -0
- package/components/DatePickerInline/index.tsx +41 -0
- package/components/DatePickerInline/types.ts +104 -0
- package/components/DatePickerInline/utils.ts +367 -0
- package/components/DatePickerInput/DatePickerInput.tsx +139 -0
- package/components/DatePickerInput/DatePickerInputModal.tsx +48 -0
- package/components/DatePickerInput/DatePickerInputWithoutModal.tsx +77 -0
- package/components/DatePickerInput/DateRangeInput.tsx +88 -0
- package/components/DatePickerInput/index.tsx +14 -0
- package/components/DatePickerInput/inputUtils.ts +138 -0
- package/components/DatePickerInput/types.ts +28 -0
- package/components/DatePickerInput/utils.ts +16 -0
- package/components/DatePickerModal/AnimatedCrossView.tsx +94 -0
- package/components/DatePickerModal/CalendarEdit.tsx +139 -0
- package/components/DatePickerModal/DatePickerModal.tsx +85 -0
- package/components/DatePickerModal/DatePickerModalContent.tsx +155 -0
- package/components/DatePickerModal/DatePickerModalContentHeader.tsx +213 -0
- package/components/DatePickerModal/DatePickerModalHeader.tsx +74 -0
- package/components/DatePickerModal/DatePickerModalHeaderBackground.tsx +13 -0
- package/components/DatePickerModal/index.tsx +20 -0
- package/components/DatePickerModal/types.ts +92 -0
- package/components/DatePickerModal/utils.ts +121 -0
- package/components/DateTimePicker/DateTimePicker.tsx +172 -0
- package/components/DateTimePicker/index.tsx +14 -0
- package/components/DateTimePicker/utils.ts +13 -0
- package/components/Dialog/Dialog.tsx +66 -0
- package/components/Dialog/DialogActions.tsx +89 -0
- package/components/Dialog/DialogContent.tsx +37 -0
- package/components/Dialog/DialogIcon.tsx +69 -0
- package/components/Dialog/DialogTitle.tsx +68 -0
- package/components/Dialog/index.tsx +37 -0
- package/components/Dialog/utils.ts +80 -0
- package/components/Drawer/Collapsible/DrawerCollapsible.tsx +22 -0
- package/components/Drawer/Collapsible/DrawerCollapsibleItem.tsx +38 -0
- package/components/Drawer/Collapsible/DrawerCollapsibleItemContent.tsx +16 -0
- package/components/Drawer/Collapsible/DrawerCollapsibleItemHeader.tsx +48 -0
- package/components/Drawer/Collapsible/index.tsx +23 -0
- package/components/Drawer/Collapsible/utils.ts +49 -0
- package/components/Drawer/Drawer.tsx +43 -0
- package/components/Drawer/DrawerContent.tsx +35 -0
- package/components/Drawer/DrawerFooter.tsx +27 -0
- package/components/Drawer/DrawerHeader.tsx +27 -0
- package/components/Drawer/DrawerItem.tsx +206 -0
- package/components/Drawer/DrawerItemGroup.tsx +82 -0
- package/components/Drawer/index.tsx +47 -0
- package/components/Drawer/types.ts +3 -0
- package/components/Drawer/utils.ts +8 -0
- package/components/ElementGroup/ElementGroup.tsx +139 -0
- package/components/ElementGroup/index.tsx +11 -0
- package/components/ElementGroup/utils.ts +25 -0
- package/components/FAB/FAB.tsx +176 -0
- package/components/FAB/index.tsx +12 -0
- package/components/FAB/types.ts +1 -0
- package/components/FAB/utils.ts +221 -0
- package/components/FilePicker/FilePicker.tsx +133 -0
- package/components/FilePicker/index.tsx +11 -0
- package/components/FilePicker/utils.ts +13 -0
- package/components/HelperText/HelperText.tsx +139 -0
- package/components/HelperText/index.tsx +11 -0
- package/components/HelperText/utils.ts +29 -0
- package/components/HorizontalDivider/HorizontalDivider.tsx +101 -0
- package/components/HorizontalDivider/index.tsx +13 -0
- package/components/Icon/CrossFadeIcon.tsx +116 -0
- package/components/Icon/Icon.tsx +41 -0
- package/components/Icon/iconFactory.tsx +23 -0
- package/components/Icon/index.tsx +11 -0
- package/components/Icon/types.ts +35 -0
- package/components/IconButton/IconButton.tsx +218 -0
- package/components/IconButton/index.tsx +11 -0
- package/components/IconButton/types.ts +1 -0
- package/components/IconButton/utils.ts +325 -0
- package/components/If/index.tsx +13 -0
- package/components/InputAddon/InputAddon.tsx +27 -0
- package/components/InputAddon/index.tsx +11 -0
- package/components/InputAddon/utils.ts +33 -0
- package/components/Link/Link.tsx +48 -0
- package/components/Link/index.tsx +11 -0
- package/components/Link/utils.ts +37 -0
- package/components/ListItem/ListItem.tsx +136 -0
- package/components/ListItem/ListItemDescription.tsx +25 -0
- package/components/ListItem/ListItemTitle.tsx +25 -0
- package/components/ListItem/index.tsx +18 -0
- package/components/ListItem/utils.ts +113 -0
- package/components/Menu/Menu.tsx +69 -0
- package/components/Menu/MenuDivider.tsx +13 -0
- package/components/Menu/MenuItem.tsx +128 -0
- package/components/Menu/index.tsx +19 -0
- package/components/Menu/utils.ts +92 -0
- package/components/Modal/Modal.tsx +261 -0
- package/components/Modal/index.tsx +11 -0
- package/components/Modal/utils.ts +45 -0
- package/components/NavigationRail/NavigationRail.tsx +32 -0
- package/components/NavigationRail/NavigationRailContent.tsx +25 -0
- package/components/NavigationRail/NavigationRailFooter.tsx +18 -0
- package/components/NavigationRail/NavigationRailHeader.tsx +18 -0
- package/components/NavigationRail/NavigationRailItem.tsx +226 -0
- package/components/NavigationRail/index.tsx +35 -0
- package/components/NavigationRail/utils.ts +170 -0
- package/components/NavigationStack/NavigationStack.tsx +85 -0
- package/components/NavigationStack/NavigationStackItem.tsx +60 -0
- package/components/NavigationStack/index.tsx +20 -0
- package/components/NavigationStack/utils.tsx +16 -0
- package/components/Popover/Popover.native.tsx +185 -0
- package/components/Popover/Popover.tsx +198 -0
- package/components/Popover/common.ts +459 -0
- package/components/Popover/index.ts +2 -0
- package/components/Portal/Portal.tsx +13 -0
- package/components/Portal/index.tsx +12 -0
- package/components/RadioButton/RadioButton.tsx +138 -0
- package/components/RadioButton/RadioButtonAndroid.tsx +188 -0
- package/components/RadioButton/RadioButtonGroup.tsx +98 -0
- package/components/RadioButton/RadioButtonIOS.tsx +106 -0
- package/components/RadioButton/RadioButtonItem.tsx +232 -0
- package/components/RadioButton/index.ts +27 -0
- package/components/RadioButton/utils.ts +164 -0
- package/components/Rating/Rating.tsx +149 -0
- package/components/Rating/RatingItem.tsx +125 -0
- package/components/Rating/index.tsx +13 -0
- package/components/Rating/utils.ts +38 -0
- package/components/Select/Select.tsx +1038 -0
- package/components/Select/index.ts +14 -0
- package/components/Select/types.ts +115 -0
- package/components/StateLayer/StateLayer.tsx +12 -0
- package/components/StateLayer/index.tsx +11 -0
- package/components/StateLayer/utils.ts +17 -0
- package/components/Surface/BackgroundContextWrapper.tsx +27 -0
- package/components/Surface/Surface.android.tsx +62 -0
- package/components/Surface/Surface.ios.tsx +123 -0
- package/components/Surface/Surface.tsx +48 -0
- package/components/Surface/index.tsx +12 -0
- package/components/Surface/utils.ts +106 -0
- package/components/Switch/Switch.ios.tsx +67 -0
- package/components/Switch/Switch.tsx +278 -0
- package/components/Switch/index.tsx +11 -0
- package/components/Switch/utils.ts +283 -0
- package/components/Tabs/TabItem.tsx +150 -0
- package/components/Tabs/TabLabel.tsx +84 -0
- package/components/Tabs/Tabs.tsx +398 -0
- package/components/Tabs/index.tsx +21 -0
- package/components/Tabs/utils.ts +126 -0
- package/components/Text/Text.tsx +23 -0
- package/components/Text/index.tsx +2 -0
- package/components/Text/textFactory.tsx +33 -0
- package/components/TextInput/InputLabel.tsx +181 -0
- package/components/TextInput/TextInput.tsx +693 -0
- package/components/TextInput/index.tsx +16 -0
- package/components/TextInput/types.ts +96 -0
- package/components/TextInput/utils.ts +544 -0
- package/components/TextInputWithMask/TextInputMask.tsx +57 -0
- package/components/TextInputWithMask/index.tsx +11 -0
- package/components/TextInputWithMask/utils.ts +56 -0
- package/components/TimePicker/AmPmSwitcher.tsx +99 -0
- package/components/TimePicker/AnalogClock.tsx +165 -0
- package/components/TimePicker/AnalogClockHours.tsx +163 -0
- package/components/TimePicker/AnalogClockMinutes.tsx +68 -0
- package/components/TimePicker/AnimatedClockSwitcher.tsx +72 -0
- package/components/TimePicker/DisplayModeContext.tsx +6 -0
- package/components/TimePicker/TimeInput.tsx +112 -0
- package/components/TimePicker/TimeInputs.tsx +148 -0
- package/components/TimePicker/TimePicker.tsx +130 -0
- package/components/TimePicker/index.tsx +19 -0
- package/components/TimePicker/timeUtils.ts +159 -0
- package/components/TimePicker/utils.ts +285 -0
- package/components/TimePickerField/TimePickerField.tsx +152 -0
- package/components/TimePickerField/index.tsx +14 -0
- package/components/TimePickerField/sanitizeTime.ts +85 -0
- package/components/TimePickerField/utils.ts +95 -0
- package/components/TimePickerModal/TimePickerModal.tsx +115 -0
- package/components/TimePickerModal/index.tsx +14 -0
- package/components/TimePickerModal/utils.ts +48 -0
- package/components/Tooltip/Tooltip.tsx +137 -0
- package/components/Tooltip/TooltipContent.tsx +12 -0
- package/components/Tooltip/TooltipTrigger.tsx +94 -0
- package/components/Tooltip/index.tsx +20 -0
- package/components/Tooltip/utils.ts +21 -0
- package/components/TouchableRipple/TouchableRipple.native.tsx +105 -0
- package/components/TouchableRipple/TouchableRipple.tsx +286 -0
- package/components/TouchableRipple/index.tsx +14 -0
- package/components/TouchableRipple/utils.ts +15 -0
- package/components/VerticalDivider/VerticalDivider.tsx +99 -0
- package/components/VerticalDivider/index.tsx +13 -0
- package/context-bridge/index.tsx +87 -0
- package/core/componentsRegistry.ts +164 -0
- package/core/index.tsx +2 -0
- package/fast-context/index.tsx +190 -0
- package/hocs/index.tsx +5 -0
- package/hocs/typedMemo.tsx +5 -0
- package/hocs/withKeyboardAccessibility.tsx +231 -0
- package/hocs/withPortal.tsx +16 -0
- package/hooks/createPsuedoHook.tsx +50 -0
- package/hooks/index.tsx +29 -0
- package/hooks/useActionState.native.tsx +22 -0
- package/hooks/useActionState.tsx +34 -0
- package/hooks/useActive.tsx +5 -0
- package/hooks/useBreakpoints.tsx +7 -0
- package/hooks/useColorMode.tsx +17 -0
- package/hooks/useContrastColor.ts +15 -0
- package/hooks/useControlledValue.tsx +68 -0
- package/hooks/useFilePicker.tsx +48 -0
- package/hooks/useFocus.tsx +5 -0
- package/hooks/useHandleNumberFormat.tsx +106 -0
- package/hooks/useHover.tsx +5 -0
- package/hooks/useKeyboardDismissable.ts +66 -0
- package/hooks/useLatest.tsx +9 -0
- package/hooks/useMediaQuery.tsx +64 -0
- package/hooks/useMergedRefs.ts +14 -0
- package/hooks/usePrevious.ts +13 -0
- package/hooks/useQueryFilter.tsx +35 -0
- package/hooks/useSearchable.tsx +74 -0
- package/hooks/useSubcomponents.tsx +59 -0
- package/hooks/useTheme.ts +3 -0
- package/hooks/useToggle.tsx +24 -0
- package/package.json +114 -0
- package/shortcuts-manager/EventsManager.tsx +121 -0
- package/shortcuts-manager/ShortcutsManager/ShortcutsManager.native.tsx +9 -0
- package/shortcuts-manager/ShortcutsManager/ShortcutsManager.tsx +58 -0
- package/shortcuts-manager/ShortcutsManager/index.tsx +2 -0
- package/shortcuts-manager/ShortcutsManager/utils.tsx +30 -0
- package/shortcuts-manager/index.tsx +6 -0
- package/shortcuts-manager/types.ts +24 -0
- package/shortcuts-manager/useIsKeyPressed/index.tsx +1 -0
- package/shortcuts-manager/useIsKeyPressed/useIsKeyPress.tsx +9 -0
- package/shortcuts-manager/useSetScopes/index.tsx +1 -0
- package/shortcuts-manager/useSetScopes/useSetScopes.native.tsx +9 -0
- package/shortcuts-manager/useSetScopes/useSetScopes.tsx +25 -0
- package/shortcuts-manager/useShortcut/index.tsx +2 -0
- package/shortcuts-manager/useShortcut/types.ts +3 -0
- package/shortcuts-manager/useShortcut/useShortcut.native.tsx +9 -0
- package/shortcuts-manager/useShortcut/useShortcut.tsx +61 -0
- package/shortcuts-manager/utils.ts +105 -0
- package/styles/index.ts +4 -0
- package/styles/overlay.ts +69 -0
- package/styles/shadow.ts +21 -0
- package/styles/themes/DarkTheme.tsx +98 -0
- package/styles/themes/LightTheme.tsx +212 -0
- package/styles/themes/tokens.ts +248 -0
- package/styles/utils.ts +11 -0
- package/types/index.ts +129 -0
- package/types/theme.ts +159 -0
- package/utils/DocumentPicker/documentPicker.native.ts +10 -0
- package/utils/DocumentPicker/documentPicker.ts +76 -0
- package/utils/DocumentPicker/index.ts +2 -0
- package/utils/DocumentPicker/types.ts +28 -0
- package/utils/addEventListener.tsx +51 -0
- package/utils/backgroundContext.ts +9 -0
- package/utils/color.ts +22 -0
- package/utils/compare/index.ts +54 -0
- package/utils/composeEventHandlers.ts +9 -0
- package/utils/createNumberMask/createNumberMask.ts +98 -0
- package/utils/createNumberMask/index.ts +5 -0
- package/utils/createSyntheticEvent.ts +31 -0
- package/utils/date-fns.ts +7 -0
- package/utils/dateTimePicker.ts +5 -0
- package/utils/escapeRegex.ts +9 -0
- package/utils/extractTextStyles.ts +52 -0
- package/utils/formatNumberWithMask/formatNumberWithMask.ts +26 -0
- package/utils/formatNumberWithMask/formatWithMask.ts +119 -0
- package/utils/formatNumberWithMask/index.ts +6 -0
- package/utils/getCursorStyle/getCursorStyle.native.ts +1 -0
- package/utils/getCursorStyle/getCursorStyle.ts +1 -0
- package/utils/getCursorStyle/index.ts +1 -0
- package/utils/getOS/getOS.native.ts +7 -0
- package/utils/getOS/getOS.ts +24 -0
- package/utils/getOS/index.ts +1 -0
- package/utils/getyearRange.ts +5 -0
- package/utils/index.ts +20 -0
- package/utils/lodash.ts +50 -0
- package/utils/mergeRefs.ts +13 -0
- package/utils/normalizeBorderRadiuses.ts +24 -0
- package/utils/normalizeSpacings.ts +110 -0
- package/utils/normalizeToNumberString/index.ts +4 -0
- package/utils/normalizeToNumberString/normalizeToNumberString.ts +48 -0
- package/utils/repository.ts +103 -0
- package/utils/resolveColorMode.ts +9 -0
- package/utils/resolveStateVariant.ts +26 -0
- package/utils/tokenStylesParser.ts +7 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react';
|
|
2
|
+
import { Animated, Easing, type ViewStyle } from 'react-native';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
|
|
5
|
+
import { tokenStylesParser } from '../../utils/tokenStylesParser';
|
|
6
|
+
|
|
7
|
+
const AnimatedSpinner = ({
|
|
8
|
+
index,
|
|
9
|
+
size,
|
|
10
|
+
color,
|
|
11
|
+
timer,
|
|
12
|
+
duration,
|
|
13
|
+
style,
|
|
14
|
+
}: {
|
|
15
|
+
index: number;
|
|
16
|
+
size: number;
|
|
17
|
+
timer: Animated.Value;
|
|
18
|
+
duration: number;
|
|
19
|
+
color: string | undefined;
|
|
20
|
+
style: ViewStyle;
|
|
21
|
+
}) => {
|
|
22
|
+
const { containerStyle, layer } = useMemo(
|
|
23
|
+
() => ({
|
|
24
|
+
containerStyle: {
|
|
25
|
+
width: size,
|
|
26
|
+
height: size / 2,
|
|
27
|
+
overflow: 'hidden' as const,
|
|
28
|
+
},
|
|
29
|
+
layer: {
|
|
30
|
+
...StyleSheet.absoluteFillObject,
|
|
31
|
+
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
} as ViewStyle,
|
|
35
|
+
}),
|
|
36
|
+
[size],
|
|
37
|
+
);
|
|
38
|
+
const offsetContainerStyles = useMemo(() => {
|
|
39
|
+
const offsetStyle = index ? { top: size / 2 } : null;
|
|
40
|
+
|
|
41
|
+
return [containerStyle, offsetStyle];
|
|
42
|
+
}, [containerStyle, index, size]);
|
|
43
|
+
|
|
44
|
+
const frames = (60 * duration) / 1000;
|
|
45
|
+
const easing = Easing.bezier(0.4, 0.0, 0.7, 1.0);
|
|
46
|
+
const inputRange = useMemo(
|
|
47
|
+
() => Array.from(new Array(frames), (_, frameIndex) => frameIndex / (frames - 1)),
|
|
48
|
+
[frames],
|
|
49
|
+
);
|
|
50
|
+
const outputRange = useMemo(
|
|
51
|
+
() =>
|
|
52
|
+
Array.from(new Array(frames), (_, frameIndex) => {
|
|
53
|
+
let progress = (2 * frameIndex) / (frames - 1);
|
|
54
|
+
const rotation = index ? +(360 - 15) : -(180 - 15);
|
|
55
|
+
|
|
56
|
+
if (progress > 1.0) {
|
|
57
|
+
progress = 2.0 - progress;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const direction = index ? -1 : +1;
|
|
61
|
+
|
|
62
|
+
return `${direction * (180 - 30) * easing(progress) + rotation}deg`;
|
|
63
|
+
}),
|
|
64
|
+
[easing, frames, index],
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
const layerStyle = {
|
|
68
|
+
width: size,
|
|
69
|
+
height: size,
|
|
70
|
+
transform: [
|
|
71
|
+
{
|
|
72
|
+
rotate: timer.interpolate({
|
|
73
|
+
inputRange: [0, 1],
|
|
74
|
+
outputRange: [`${0 + 30 + 15}deg`, `${2 * 360 + 30 + 15}deg`],
|
|
75
|
+
}),
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const viewportStyle = {
|
|
81
|
+
width: size,
|
|
82
|
+
height: size,
|
|
83
|
+
transform: [
|
|
84
|
+
{
|
|
85
|
+
translateY: index ? -size / 2 : 0,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
rotate: timer.interpolate({ inputRange, outputRange }),
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const lineStyle = {
|
|
94
|
+
width: size,
|
|
95
|
+
height: size,
|
|
96
|
+
borderWidth: size / 10,
|
|
97
|
+
borderRadius: size / 2,
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Animated.View style={layer}>
|
|
102
|
+
<Animated.View style={layerStyle}>
|
|
103
|
+
<Animated.View style={offsetContainerStyles} collapsable={false}>
|
|
104
|
+
<Animated.View style={viewportStyle}>
|
|
105
|
+
<Animated.View style={containerStyle} collapsable={false}>
|
|
106
|
+
<Animated.View
|
|
107
|
+
style={[
|
|
108
|
+
style,
|
|
109
|
+
tokenStylesParser.getColor(color, 'borderColor'),
|
|
110
|
+
lineStyle,
|
|
111
|
+
]}
|
|
112
|
+
/>
|
|
113
|
+
</Animated.View>
|
|
114
|
+
</Animated.View>
|
|
115
|
+
</Animated.View>
|
|
116
|
+
</Animated.View>
|
|
117
|
+
</Animated.View>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export default memo(AnimatedSpinner);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
|
|
2
|
+
import ActivityIndicatorDefault from './ActivityIndicator';
|
|
3
|
+
|
|
4
|
+
registerMoleculesComponents({
|
|
5
|
+
ActivityIndicator: ActivityIndicatorDefault,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export const ActivityIndicator = getRegisteredComponentWithFallback(
|
|
9
|
+
'ActivityIndicator',
|
|
10
|
+
ActivityIndicatorDefault,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
type Props as ActivityIndicatorProps,
|
|
15
|
+
activityIndicatorStyles,
|
|
16
|
+
activityIndicatorStylesDefault,
|
|
17
|
+
} from './ActivityIndicator';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { IconButton, type IconButtonProps } from '../IconButton';
|
|
4
|
+
|
|
5
|
+
export type Props = Omit<IconButtonProps, 'ref'> & {};
|
|
6
|
+
|
|
7
|
+
const AppbarActions = memo(({ size = 24, ...rest }: Props) => {
|
|
8
|
+
return <IconButton size={size} {...rest} />;
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
AppbarActions.displayName = 'Appbar_Actions';
|
|
12
|
+
|
|
13
|
+
export default AppbarActions;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { createContext, memo, useMemo } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { useSubcomponents } from '../../hooks';
|
|
5
|
+
import { Surface } from '../Surface';
|
|
6
|
+
import type { AppbarBaseProps, AppbarType } from './types';
|
|
7
|
+
import { appbarBaseStyles } from './utils';
|
|
8
|
+
|
|
9
|
+
const AppbarBase = ({
|
|
10
|
+
_type = 'center-aligned',
|
|
11
|
+
elevation = 0,
|
|
12
|
+
children,
|
|
13
|
+
style,
|
|
14
|
+
innerContainerStyle: innerContainerStyleProp,
|
|
15
|
+
scrolling = false,
|
|
16
|
+
...rest
|
|
17
|
+
}: AppbarBaseProps) => {
|
|
18
|
+
const { containerStyle, innerContainerStyle } = useMemo(() => {
|
|
19
|
+
return {
|
|
20
|
+
containerStyle: [
|
|
21
|
+
scrolling ? { backgroundColor: 'colors.surfaceVariant' } : {},
|
|
22
|
+
appbarBaseStyles.root,
|
|
23
|
+
style,
|
|
24
|
+
],
|
|
25
|
+
innerContainerStyle: [appbarBaseStyles.innerContainer, innerContainerStyleProp],
|
|
26
|
+
};
|
|
27
|
+
}, [innerContainerStyleProp, scrolling, style]);
|
|
28
|
+
|
|
29
|
+
const { Appbar_Left, Appbar_Right, Appbar_Title } = useSubcomponents({
|
|
30
|
+
children,
|
|
31
|
+
allowedChildren: ['Appbar_Left', 'Appbar_Right', 'Appbar_Title'],
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const contextValue = useMemo(() => ({ type: _type }), [_type]);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Surface elevation={elevation} style={containerStyle} {...rest}>
|
|
38
|
+
<AppbarContext.Provider value={contextValue}>
|
|
39
|
+
<View style={innerContainerStyle}>
|
|
40
|
+
{Appbar_Left[0]}
|
|
41
|
+
<>
|
|
42
|
+
{_type === 'center-aligned' || _type === 'small' ? (
|
|
43
|
+
Appbar_Title[0]
|
|
44
|
+
) : (
|
|
45
|
+
<View />
|
|
46
|
+
)}
|
|
47
|
+
</>
|
|
48
|
+
{Appbar_Right[0]}
|
|
49
|
+
</View>
|
|
50
|
+
<>{(_type === 'medium' || _type === 'large') && Appbar_Title[0]}</>
|
|
51
|
+
</AppbarContext.Provider>
|
|
52
|
+
</Surface>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const AppbarContext = createContext<{ type: AppbarType }>({
|
|
57
|
+
type: 'center-aligned',
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export default memo(AppbarBase);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { default as AppbarBase } from './AppbarBase';
|
|
4
|
+
import type { AppbarProps } from './types';
|
|
5
|
+
import { appbarCenterAlignedStyles } from './utils';
|
|
6
|
+
|
|
7
|
+
const AppbarCenterAligned = ({ style, ...rest }: AppbarProps) => {
|
|
8
|
+
const componentStyles = useMemo(() => [appbarCenterAlignedStyles.root, style], [style]);
|
|
9
|
+
|
|
10
|
+
return <AppbarBase _type="center-aligned" style={componentStyles} {...rest} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default memo(AppbarCenterAligned);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { default as AppbarBase } from './AppbarBase';
|
|
4
|
+
import type { AppbarProps } from './types';
|
|
5
|
+
import { appbarLargeStyles } from './utils';
|
|
6
|
+
|
|
7
|
+
const AppbarLarge = ({ style, ...rest }: AppbarProps) => {
|
|
8
|
+
const componentStyles = useMemo(() => [appbarLargeStyles.root, style], [style]);
|
|
9
|
+
|
|
10
|
+
return <AppbarBase _type="large" style={componentStyles} {...rest} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default memo(AppbarLarge);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { memo, type ReactElement, useContext } from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { AppbarContext } from './AppbarBase';
|
|
5
|
+
import { appbarLeft } from './utils';
|
|
6
|
+
|
|
7
|
+
export type Props = Omit<ViewProps, 'children'> & {
|
|
8
|
+
children: ReactElement;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const AppbarLeft = memo(({ children, style, ...rest }: Props) => {
|
|
12
|
+
const { type } = useContext(AppbarContext);
|
|
13
|
+
|
|
14
|
+
appbarLeft.useVariants({
|
|
15
|
+
size: type,
|
|
16
|
+
});
|
|
17
|
+
return (
|
|
18
|
+
<View {...rest} style={[appbarLeft.root, style]}>
|
|
19
|
+
{children}
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
AppbarLeft.displayName = 'Appbar_Left';
|
|
25
|
+
|
|
26
|
+
export default AppbarLeft;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { default as AppbarBase } from './AppbarBase';
|
|
4
|
+
import type { AppbarProps } from './types';
|
|
5
|
+
import { appbarMediumStyles } from './utils';
|
|
6
|
+
|
|
7
|
+
const AppbarMedium = ({ style, ...rest }: AppbarProps) => {
|
|
8
|
+
const componentStyles = useMemo(() => [appbarMediumStyles.root, style], [style]);
|
|
9
|
+
|
|
10
|
+
return <AppbarBase _type="medium" style={componentStyles} {...rest} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default memo(AppbarMedium);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Children, cloneElement, memo, type ReactElement, useMemo } from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { appbarRight } from './utils';
|
|
5
|
+
|
|
6
|
+
export type Props = Omit<ViewProps, 'children'> & {
|
|
7
|
+
children: ReactElement | ReactElement[];
|
|
8
|
+
/** number or design token
|
|
9
|
+
* */
|
|
10
|
+
spacing?: number | string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const AppbarRight = memo(({ children, spacing, style, ...rest }: Props) => {
|
|
14
|
+
const content = useMemo(
|
|
15
|
+
() =>
|
|
16
|
+
Children.map(children, child => {
|
|
17
|
+
return cloneElement(child, {
|
|
18
|
+
// @ts-expect-error // TODO: fix this
|
|
19
|
+
style: [
|
|
20
|
+
{
|
|
21
|
+
marginLeft: spacing,
|
|
22
|
+
},
|
|
23
|
+
// @ts-expect-error // TODO: fix this
|
|
24
|
+
child.props?.style,
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
[children, spacing],
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<View {...rest} style={[appbarRight.root, style]}>
|
|
33
|
+
{content}
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
AppbarRight.displayName = 'Appbar_Right';
|
|
39
|
+
|
|
40
|
+
export default AppbarRight;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo, useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { default as AppbarBase } from './AppbarBase';
|
|
4
|
+
import type { AppbarProps } from './types';
|
|
5
|
+
import { appbarSmallStyles } from './utils';
|
|
6
|
+
|
|
7
|
+
const AppbarSmall = ({ style, ...rest }: AppbarProps) => {
|
|
8
|
+
const componentStyles = useMemo(() => [appbarSmallStyles.root, style], [style]);
|
|
9
|
+
|
|
10
|
+
return <AppbarBase _type="small" style={componentStyles} {...rest} />;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default memo(AppbarSmall);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ComponentType, memo, useContext } from 'react';
|
|
2
|
+
import type { TextProps } from 'react-native';
|
|
3
|
+
import { StyleSheet, Text } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { AppbarContext } from './AppbarBase';
|
|
6
|
+
import { appbarTitle } from './utils';
|
|
7
|
+
|
|
8
|
+
export type Props = TextProps & {
|
|
9
|
+
size?: 'sm' | 'md' | 'lg';
|
|
10
|
+
Wrapper?: ComponentType<any>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const AppbarTitle = memo(({ style, children, Wrapper: WrapperProp, ...rest }: Props) => {
|
|
14
|
+
const Wrapper = WrapperProp ?? Text;
|
|
15
|
+
|
|
16
|
+
const { type } = useContext(AppbarContext);
|
|
17
|
+
|
|
18
|
+
appbarTitle.useVariants({
|
|
19
|
+
size: type === 'large' ? 'lg' : type === 'medium' ? 'md' : 'sm',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Wrapper
|
|
24
|
+
style={[styles[type], appbarTitle.root, style]}
|
|
25
|
+
accessibilityRole="header"
|
|
26
|
+
{...rest}>
|
|
27
|
+
{children}
|
|
28
|
+
</Wrapper>
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
'center-aligned': {
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
},
|
|
36
|
+
small: {
|
|
37
|
+
justifyContent: 'flex-start',
|
|
38
|
+
},
|
|
39
|
+
medium: {
|
|
40
|
+
alignItems: 'flex-end',
|
|
41
|
+
},
|
|
42
|
+
large: {
|
|
43
|
+
alignItems: 'flex-end',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
AppbarTitle.displayName = 'Appbar_Title';
|
|
48
|
+
|
|
49
|
+
export default AppbarTitle;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
import { getRegisteredComponentWithFallback, registerMoleculesComponents } from '../../core';
|
|
4
|
+
import AppbarActions from './AppbarActions';
|
|
5
|
+
import AppbarBase from './AppbarBase';
|
|
6
|
+
import AppbarCenterAligned from './AppbarCenterAligned';
|
|
7
|
+
import AppbarLarge from './AppbarLarge';
|
|
8
|
+
import AppbarLeft from './AppbarLeft';
|
|
9
|
+
import AppbarMedium from './AppbarMedium';
|
|
10
|
+
import AppbarRight from './AppbarRight';
|
|
11
|
+
import AppbarSmall from './AppbarSmall';
|
|
12
|
+
import AppbarTitle from './AppbarTitle';
|
|
13
|
+
import type { AppbarProps } from './types';
|
|
14
|
+
|
|
15
|
+
export const AppbarDefault = Object.assign(AppbarBase as ComponentType<AppbarProps>, {
|
|
16
|
+
Small: AppbarSmall,
|
|
17
|
+
CenterAligned: AppbarCenterAligned,
|
|
18
|
+
Medium: AppbarMedium,
|
|
19
|
+
Large: AppbarLarge,
|
|
20
|
+
|
|
21
|
+
Left: AppbarLeft,
|
|
22
|
+
Right: AppbarRight,
|
|
23
|
+
Title: AppbarTitle,
|
|
24
|
+
Actions: AppbarActions,
|
|
25
|
+
});
|
|
26
|
+
registerMoleculesComponents({
|
|
27
|
+
Appbar: AppbarDefault,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const Appbar = getRegisteredComponentWithFallback('Appbar', AppbarDefault);
|
|
31
|
+
|
|
32
|
+
export type { Props as AppbarActionsProps } from './AppbarActions';
|
|
33
|
+
export type { Props as AppbarLeftProps } from './AppbarLeft';
|
|
34
|
+
export type { Props as AppbarRightProps } from './AppbarRight';
|
|
35
|
+
export type { Props as AppbarTitleProps } from './AppbarTitle';
|
|
36
|
+
export type { AppbarProps } from './types';
|
|
37
|
+
export {
|
|
38
|
+
appbarBaseStyles,
|
|
39
|
+
appbarCenterAlignedStyles,
|
|
40
|
+
appbarLargeStyles,
|
|
41
|
+
appbarLeft,
|
|
42
|
+
appbarMediumStyles,
|
|
43
|
+
appbarRight,
|
|
44
|
+
appbarSmallStyles,
|
|
45
|
+
appbarTitle,
|
|
46
|
+
} from './utils';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { MD3Elevation } from '../../types/theme';
|
|
5
|
+
import type { SurfaceProps } from '../Surface';
|
|
6
|
+
|
|
7
|
+
export type AppbarType = 'center-aligned' | 'small' | 'medium' | 'large';
|
|
8
|
+
|
|
9
|
+
export type AppbarBaseProps = Omit<SurfaceProps, 'children' | 'elevation' | 'ref'> & {
|
|
10
|
+
_type?: AppbarType;
|
|
11
|
+
|
|
12
|
+
innerContainerStyle?: ViewStyle;
|
|
13
|
+
children: ReactElement | ReactElement[];
|
|
14
|
+
|
|
15
|
+
scrolling?: boolean;
|
|
16
|
+
elevation?: MD3Elevation;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type AppbarProps = Omit<AppbarBaseProps, '_type'>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
2
|
+
|
|
3
|
+
import { getRegisteredMoleculesComponentStyles, registerComponentsStyles } from '../../core';
|
|
4
|
+
|
|
5
|
+
const appbarBaseStylesDefault = StyleSheet.create(theme => ({
|
|
6
|
+
root: {
|
|
7
|
+
paddingHorizontal: theme.spacings['4'],
|
|
8
|
+
backgroundColor: theme.colors.surface,
|
|
9
|
+
flex: 1,
|
|
10
|
+
minHeight: 64,
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
innerContainer: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
flexDirection: 'row',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'space-between',
|
|
18
|
+
},
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
const appbarCenterAlignedStylesDefault = StyleSheet.create({
|
|
22
|
+
root: { minHeight: 64 },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const appbarSmallStylesDefault = StyleSheet.create({
|
|
26
|
+
root: { minHeight: 64 },
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const appbarMediumStylesDefault = StyleSheet.create(theme => ({
|
|
30
|
+
root: {
|
|
31
|
+
paddingHorizontal: theme.spacings['4'],
|
|
32
|
+
paddingVertical: theme.spacings['5'],
|
|
33
|
+
minHeight: 112,
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
innerContainer: {
|
|
37
|
+
marginBottom: theme.spacings['6'],
|
|
38
|
+
},
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
const appbarLargeStylesDefault = StyleSheet.create(theme => ({
|
|
42
|
+
root: {
|
|
43
|
+
paddingHorizontal: theme.spacings['4'],
|
|
44
|
+
paddingVertical: theme.spacings['5'],
|
|
45
|
+
minHeight: 152,
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
innerContainer: {
|
|
49
|
+
marginBottom: theme.spacings['6'],
|
|
50
|
+
},
|
|
51
|
+
}));
|
|
52
|
+
|
|
53
|
+
const appbarTitleDefault = StyleSheet.create(theme => ({
|
|
54
|
+
root: {
|
|
55
|
+
display: 'flex',
|
|
56
|
+
flex: 1,
|
|
57
|
+
color: theme.colors.onSurface,
|
|
58
|
+
|
|
59
|
+
variants: {
|
|
60
|
+
size: {
|
|
61
|
+
sm: {
|
|
62
|
+
lineHeight: theme.typescale.titleLarge.lineHeight,
|
|
63
|
+
fontSize: theme.typescale.titleLarge.fontSize,
|
|
64
|
+
fontWeight: theme.typescale.titleLarge.fontWeight,
|
|
65
|
+
},
|
|
66
|
+
md: {
|
|
67
|
+
lineHeight: theme.typescale.headlineSmall.lineHeight,
|
|
68
|
+
fontSize: theme.typescale.headlineSmall.fontSize,
|
|
69
|
+
fontWeight: theme.typescale.headlineSmall.fontWeight,
|
|
70
|
+
},
|
|
71
|
+
lg: {
|
|
72
|
+
lineHeight: theme.typescale.headlineMedium.lineHeight,
|
|
73
|
+
fontSize: theme.typescale.headlineMedium.fontSize,
|
|
74
|
+
fontWeight: theme.typescale.headlineMedium.fontWeight,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const appbarRightDefault = StyleSheet.create(theme => ({
|
|
82
|
+
root: {
|
|
83
|
+
spacing: theme.spacings['6'],
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
},
|
|
87
|
+
}));
|
|
88
|
+
|
|
89
|
+
const appbarLeftDefault = StyleSheet.create(theme => ({
|
|
90
|
+
root: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
marginRight: theme.spacings['6'],
|
|
94
|
+
|
|
95
|
+
variants: {
|
|
96
|
+
size: {
|
|
97
|
+
small: {
|
|
98
|
+
marginRight: theme.spacings['4'],
|
|
99
|
+
},
|
|
100
|
+
'center-aligned': {},
|
|
101
|
+
medium: {},
|
|
102
|
+
large: {},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
}));
|
|
107
|
+
|
|
108
|
+
registerComponentsStyles({
|
|
109
|
+
Appbar: appbarBaseStylesDefault,
|
|
110
|
+
Appbar_CenterAligned: appbarCenterAlignedStylesDefault,
|
|
111
|
+
Appbar_Small: appbarSmallStylesDefault,
|
|
112
|
+
Appbar_Medium: appbarMediumStylesDefault,
|
|
113
|
+
Appbar_Large: appbarLargeStylesDefault,
|
|
114
|
+
Appbar_Left: appbarLeftDefault,
|
|
115
|
+
Appbar_Right: appbarRightDefault,
|
|
116
|
+
Appbar_Title: appbarTitleDefault,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export const appbarBaseStyles = getRegisteredMoleculesComponentStyles('Appbar');
|
|
120
|
+
export const appbarCenterAlignedStyles =
|
|
121
|
+
getRegisteredMoleculesComponentStyles('Appbar_CenterAligned');
|
|
122
|
+
export const appbarSmallStyles = getRegisteredMoleculesComponentStyles('Appbar_Small');
|
|
123
|
+
export const appbarMediumStyles = getRegisteredMoleculesComponentStyles('Appbar_Medium');
|
|
124
|
+
export const appbarLargeStyles = getRegisteredMoleculesComponentStyles('Appbar_Large');
|
|
125
|
+
export const appbarTitle = getRegisteredMoleculesComponentStyles('Appbar_Title');
|
|
126
|
+
export const appbarRight = getRegisteredMoleculesComponentStyles('Appbar_Right');
|
|
127
|
+
export const appbarLeft = getRegisteredMoleculesComponentStyles('Appbar_Left');
|