@fountain-ui/core 3.0.0-alpha.1 → 3.0.0-alpha.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/build/commonjs/Accordion/Accordion.js +4 -1
- package/build/commonjs/Accordion/Accordion.js.map +1 -1
- package/build/commonjs/Accordion/index.js +8 -0
- package/build/commonjs/Accordion/index.js.map +1 -1
- package/build/commonjs/Accordion/useVariantStyleMap.js +11 -10
- package/build/commonjs/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/AppBar/index.js +8 -0
- package/build/commonjs/AppBar/index.js.map +1 -1
- package/build/commonjs/Badge/index.js +26 -0
- package/build/commonjs/Badge/index.js.map +1 -1
- package/build/commonjs/Badge/useVariantStyleMap.js +2 -2
- package/build/commonjs/Badge/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js +1 -0
- package/build/commonjs/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/commonjs/Button/Button.js +15 -3
- package/build/commonjs/Button/Button.js.map +1 -1
- package/build/commonjs/Button/ButtonProps.js +7 -7
- package/build/commonjs/Button/ButtonProps.js.map +1 -1
- package/build/commonjs/Button/index.js +20 -0
- package/build/commonjs/Button/index.js.map +1 -1
- package/build/commonjs/Button/useVariantStyleMap.js +5 -7
- package/build/commonjs/Button/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Checkbox/Checkbox.js +5 -2
- package/build/commonjs/Checkbox/Checkbox.js.map +1 -1
- package/build/commonjs/Checkbox/index.js +8 -0
- package/build/commonjs/Checkbox/index.js.map +1 -1
- package/build/commonjs/Checkbox/useVariantStyleMap.js +6 -2
- package/build/commonjs/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Chip/index.js +14 -0
- package/build/commonjs/Chip/index.js.map +1 -1
- package/build/commonjs/Chip/useChipStyle.js +2 -18
- package/build/commonjs/Chip/useChipStyle.js.map +1 -1
- package/build/commonjs/Dialog/index.js +8 -0
- package/build/commonjs/Dialog/index.js.map +1 -1
- package/build/commonjs/DialogContent/DialogContent.js +1 -2
- package/build/commonjs/DialogContent/DialogContent.js.map +1 -1
- package/build/commonjs/Divider/Divider.js +1 -1
- package/build/commonjs/Divider/Divider.js.map +1 -1
- package/build/commonjs/Divider/DividerProps.js +3 -3
- package/build/commonjs/Divider/DividerProps.js.map +1 -1
- package/build/commonjs/Divider/index.js +14 -0
- package/build/commonjs/Divider/index.js.map +1 -1
- package/build/commonjs/Empty/Empty.js +1 -2
- package/build/commonjs/Empty/Empty.js.map +1 -1
- package/build/commonjs/Flexbox/Flexbox.js +2 -0
- package/build/commonjs/Flexbox/Flexbox.js.map +1 -1
- package/build/commonjs/Flexbox/FlexboxProps.js.map +1 -1
- package/build/commonjs/IconButton/index.js +8 -0
- package/build/commonjs/IconButton/index.js.map +1 -1
- package/build/commonjs/ListItem/ListItem.js +47 -25
- package/build/commonjs/ListItem/ListItem.js.map +1 -1
- package/build/commonjs/ListItem/ListItemProps.js.map +1 -1
- package/build/commonjs/ListItemIcon/ListItemIcon.js +1 -2
- package/build/commonjs/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/commonjs/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemText.js +20 -21
- package/build/commonjs/ListItemText/ListItemText.js.map +1 -1
- package/build/commonjs/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js +1 -1
- package/build/commonjs/ListSubheader/ListSubheader.js.map +1 -1
- package/build/commonjs/Pagination/NumberPagination.js +1 -1
- package/build/commonjs/Pagination/NumberPagination.js.map +1 -1
- package/build/commonjs/Pagination/index.js +8 -0
- package/build/commonjs/Pagination/index.js.map +1 -1
- package/build/commonjs/Radio/Radio.js +6 -2
- package/build/commonjs/Radio/Radio.js.map +1 -1
- package/build/commonjs/Section/Section.js +32 -0
- package/build/commonjs/Section/Section.js.map +1 -0
- package/build/commonjs/Section/SectionProps.js +2 -0
- package/build/commonjs/Section/SectionProps.js.map +1 -0
- package/build/commonjs/Section/index.js +16 -0
- package/build/commonjs/Section/index.js.map +1 -0
- package/build/commonjs/ShadowView/ShadowView.native.js +4 -0
- package/build/commonjs/ShadowView/ShadowView.native.js.map +1 -1
- package/build/commonjs/Snackbar/index.js +8 -0
- package/build/commonjs/Snackbar/index.js.map +1 -1
- package/build/commonjs/SnackbarContent/SnackbarContent.js +27 -12
- package/build/commonjs/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/commonjs/SvgIcon/index.js +14 -0
- package/build/commonjs/SvgIcon/index.js.map +1 -1
- package/build/commonjs/Tab/useVariantStyleMap.js +3 -3
- package/build/commonjs/Tab/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Tabs/Tabs.js +6 -1
- package/build/commonjs/Tabs/Tabs.js.map +1 -1
- package/build/commonjs/Tabs/index.js +14 -0
- package/build/commonjs/Tabs/index.js.map +1 -1
- package/build/commonjs/Tabs/useTabsStyle.js +39 -0
- package/build/commonjs/Tabs/useTabsStyle.js.map +1 -0
- package/build/commonjs/TextField/TextField.js +1 -1
- package/build/commonjs/TextField/TextField.js.map +1 -1
- package/build/commonjs/TextField/index.js +8 -0
- package/build/commonjs/TextField/index.js.map +1 -1
- package/build/commonjs/TextField/useVariantStyleMap.js +2 -2
- package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
- package/build/commonjs/Toolbar/index.js +8 -0
- package/build/commonjs/Toolbar/index.js.map +1 -1
- package/build/commonjs/Tooltip/Beaks/index.js +32 -0
- package/build/commonjs/Tooltip/Beaks/index.js.map +1 -1
- package/build/commonjs/Tooltip/Tooltip.js +11 -24
- package/build/commonjs/Tooltip/Tooltip.js.map +1 -1
- package/build/commonjs/Tooltip/index.js +39 -0
- package/build/commonjs/Tooltip/index.js.map +1 -1
- package/build/commonjs/Typography/Typography.js +9 -2
- package/build/commonjs/Typography/Typography.js.map +1 -1
- package/build/commonjs/Typography/TypographyProps.js.map +1 -1
- package/build/commonjs/Typography/index.js +8 -0
- package/build/commonjs/Typography/index.js.map +1 -1
- package/build/commonjs/hooks/useBreakpointUp.js +4 -1
- package/build/commonjs/hooks/useBreakpointUp.js.map +1 -1
- package/build/commonjs/hooks/useContentContainerStyle.js +21 -28
- package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
- package/build/commonjs/index.js +21 -0
- package/build/commonjs/index.js.map +1 -1
- package/build/module/Accordion/Accordion.js +4 -1
- package/build/module/Accordion/Accordion.js.map +1 -1
- package/build/module/Accordion/index.js +1 -0
- package/build/module/Accordion/index.js.map +1 -1
- package/build/module/Accordion/useVariantStyleMap.js +11 -10
- package/build/module/Accordion/useVariantStyleMap.js.map +1 -1
- package/build/module/AppBar/index.js +1 -0
- package/build/module/AppBar/index.js.map +1 -1
- package/build/module/Badge/index.js +1 -0
- package/build/module/Badge/index.js.map +1 -1
- package/build/module/Badge/useVariantStyleMap.js +2 -2
- package/build/module/Badge/useVariantStyleMap.js.map +1 -1
- package/build/module/BottomSheetTitle/BottomSheetTitle.js +1 -0
- package/build/module/BottomSheetTitle/BottomSheetTitle.js.map +1 -1
- package/build/module/Button/Button.js +16 -4
- package/build/module/Button/Button.js.map +1 -1
- package/build/module/Button/ButtonProps.js +3 -3
- package/build/module/Button/ButtonProps.js.map +1 -1
- package/build/module/Button/index.js +1 -0
- package/build/module/Button/index.js.map +1 -1
- package/build/module/Button/useVariantStyleMap.js +5 -7
- package/build/module/Button/useVariantStyleMap.js.map +1 -1
- package/build/module/Checkbox/Checkbox.js +5 -2
- package/build/module/Checkbox/Checkbox.js.map +1 -1
- package/build/module/Checkbox/index.js +1 -0
- package/build/module/Checkbox/index.js.map +1 -1
- package/build/module/Checkbox/useVariantStyleMap.js +6 -2
- package/build/module/Checkbox/useVariantStyleMap.js.map +1 -1
- package/build/module/Chip/index.js +1 -0
- package/build/module/Chip/index.js.map +1 -1
- package/build/module/Chip/useChipStyle.js +2 -17
- package/build/module/Chip/useChipStyle.js.map +1 -1
- package/build/module/Dialog/index.js +1 -0
- package/build/module/Dialog/index.js.map +1 -1
- package/build/module/DialogContent/DialogContent.js +1 -2
- package/build/module/DialogContent/DialogContent.js.map +1 -1
- package/build/module/Divider/Divider.js +1 -1
- package/build/module/Divider/Divider.js.map +1 -1
- package/build/module/Divider/DividerProps.js +1 -1
- package/build/module/Divider/DividerProps.js.map +1 -1
- package/build/module/Divider/index.js +1 -0
- package/build/module/Divider/index.js.map +1 -1
- package/build/module/Empty/Empty.js +1 -2
- package/build/module/Empty/Empty.js.map +1 -1
- package/build/module/Flexbox/Flexbox.js +2 -0
- package/build/module/Flexbox/Flexbox.js.map +1 -1
- package/build/module/Flexbox/FlexboxProps.js.map +1 -1
- package/build/module/IconButton/index.js +1 -0
- package/build/module/IconButton/index.js.map +1 -1
- package/build/module/ListItem/ListItem.js +45 -27
- package/build/module/ListItem/ListItem.js.map +1 -1
- package/build/module/ListItem/ListItemProps.js.map +1 -1
- package/build/module/ListItemIcon/ListItemIcon.js +1 -2
- package/build/module/ListItemIcon/ListItemIcon.js.map +1 -1
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -0
- package/build/module/ListItemSecondaryAction/ListItemSecondaryAction.js.map +1 -1
- package/build/module/ListItemText/ListItemText.js +17 -19
- package/build/module/ListItemText/ListItemText.js.map +1 -1
- package/build/module/ListItemText/ListItemTextProps.js.map +1 -1
- package/build/module/ListSubheader/ListSubheader.js +1 -1
- package/build/module/ListSubheader/ListSubheader.js.map +1 -1
- package/build/module/Pagination/NumberPagination.js +1 -1
- package/build/module/Pagination/NumberPagination.js.map +1 -1
- package/build/module/Pagination/index.js +1 -0
- package/build/module/Pagination/index.js.map +1 -1
- package/build/module/Radio/Radio.js +5 -2
- package/build/module/Radio/Radio.js.map +1 -1
- package/build/module/Section/Section.js +19 -0
- package/build/module/Section/Section.js.map +1 -0
- package/build/module/Section/SectionProps.js +2 -0
- package/build/module/Section/SectionProps.js.map +1 -0
- package/build/module/Section/index.js +2 -0
- package/build/module/Section/index.js.map +1 -0
- package/build/module/ShadowView/ShadowView.native.js +4 -0
- package/build/module/ShadowView/ShadowView.native.js.map +1 -1
- package/build/module/Snackbar/index.js +1 -0
- package/build/module/Snackbar/index.js.map +1 -1
- package/build/module/SnackbarContent/SnackbarContent.js +27 -12
- package/build/module/SnackbarContent/SnackbarContent.js.map +1 -1
- package/build/module/SvgIcon/index.js +1 -0
- package/build/module/SvgIcon/index.js.map +1 -1
- package/build/module/Tab/useVariantStyleMap.js +3 -3
- package/build/module/Tab/useVariantStyleMap.js.map +1 -1
- package/build/module/Tabs/Tabs.js +5 -1
- package/build/module/Tabs/Tabs.js.map +1 -1
- package/build/module/Tabs/index.js +1 -0
- package/build/module/Tabs/index.js.map +1 -1
- package/build/module/Tabs/useTabsStyle.js +30 -0
- package/build/module/Tabs/useTabsStyle.js.map +1 -0
- package/build/module/TextField/TextField.js +1 -1
- package/build/module/TextField/TextField.js.map +1 -1
- package/build/module/TextField/index.js +1 -0
- package/build/module/TextField/index.js.map +1 -1
- package/build/module/TextField/useVariantStyleMap.js +2 -2
- package/build/module/TextField/useVariantStyleMap.js.map +1 -1
- package/build/module/Toolbar/index.js +1 -0
- package/build/module/Toolbar/index.js.map +1 -1
- package/build/module/Tooltip/Beaks/index.js +4 -0
- package/build/module/Tooltip/Beaks/index.js.map +1 -1
- package/build/module/Tooltip/Tooltip.js +4 -16
- package/build/module/Tooltip/Tooltip.js.map +1 -1
- package/build/module/Tooltip/index.js +2 -0
- package/build/module/Tooltip/index.js.map +1 -1
- package/build/module/Typography/Typography.js +9 -2
- package/build/module/Typography/Typography.js.map +1 -1
- package/build/module/Typography/TypographyProps.js.map +1 -1
- package/build/module/Typography/index.js +1 -0
- package/build/module/Typography/index.js.map +1 -1
- package/build/module/hooks/useBreakpointUp.js +4 -1
- package/build/module/hooks/useBreakpointUp.js.map +1 -1
- package/build/module/hooks/useContentContainerStyle.js +23 -26
- package/build/module/hooks/useContentContainerStyle.js.map +1 -1
- package/build/module/index.js +2 -0
- package/build/module/index.js.map +1 -1
- package/build/typescript/Accordion/index.d.ts +1 -0
- package/build/typescript/Accordion/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/AppBar/index.d.ts +1 -0
- package/build/typescript/Badge/index.d.ts +2 -1
- package/build/typescript/Button/ButtonProps.d.ts +11 -6
- package/build/typescript/Button/index.d.ts +1 -0
- package/build/typescript/Checkbox/index.d.ts +1 -0
- package/build/typescript/Checkbox/useVariantStyleMap.d.ts +1 -0
- package/build/typescript/Chip/index.d.ts +1 -0
- package/build/typescript/Dialog/index.d.ts +1 -0
- package/build/typescript/Divider/DividerProps.d.ts +3 -3
- package/build/typescript/Divider/index.d.ts +1 -0
- package/build/typescript/Flexbox/FlexboxProps.d.ts +4 -0
- package/build/typescript/IconButton/index.d.ts +1 -0
- package/build/typescript/ListItem/ListItem.d.ts +1 -1
- package/build/typescript/ListItem/ListItemProps.d.ts +4 -0
- package/build/typescript/ListItemText/ListItemTextProps.d.ts +2 -9
- package/build/typescript/Pagination/index.d.ts +1 -0
- package/build/typescript/Section/Section.d.ts +3 -0
- package/build/typescript/Section/SectionProps.d.ts +6 -0
- package/build/typescript/Section/index.d.ts +2 -0
- package/build/typescript/Snackbar/index.d.ts +1 -0
- package/build/typescript/SvgIcon/index.d.ts +1 -0
- package/build/typescript/Tabs/index.d.ts +1 -0
- package/build/typescript/Tabs/useTabsStyle.d.ts +7 -0
- package/build/typescript/TextField/index.d.ts +1 -0
- package/build/typescript/Toolbar/index.d.ts +1 -0
- package/build/typescript/Tooltip/Beaks/index.d.ts +4 -0
- package/build/typescript/Tooltip/index.d.ts +3 -1
- package/build/typescript/Typography/TypographyProps.d.ts +4 -0
- package/build/typescript/Typography/index.d.ts +1 -0
- package/build/typescript/hooks/useContentContainerStyle.d.ts +4 -8
- package/build/typescript/index.d.ts +2 -0
- package/package.json +3 -3
- package/src/Accordion/Accordion.tsx +4 -1
- package/src/Accordion/index.ts +1 -0
- package/src/Accordion/useVariantStyleMap.ts +12 -10
- package/src/AppBar/index.ts +1 -0
- package/src/Badge/index.ts +12 -1
- package/src/Badge/useVariantStyleMap.ts +2 -2
- package/src/BottomSheetTitle/BottomSheetTitle.tsx +1 -0
- package/src/Button/Button.tsx +19 -4
- package/src/Button/ButtonProps.ts +12 -6
- package/src/Button/index.ts +1 -0
- package/src/Button/useVariantStyleMap.ts +3 -7
- package/src/Checkbox/Checkbox.tsx +12 -9
- package/src/Checkbox/index.ts +1 -0
- package/src/Checkbox/useVariantStyleMap.ts +6 -1
- package/src/Chip/index.ts +1 -0
- package/src/Chip/useChipStyle.ts +2 -17
- package/src/Dialog/index.ts +1 -0
- package/src/DialogContent/DialogContent.tsx +1 -2
- package/src/Divider/Divider.tsx +1 -1
- package/src/Divider/DividerProps.ts +3 -3
- package/src/Divider/index.ts +1 -0
- package/src/Empty/Empty.tsx +1 -2
- package/src/Flexbox/Flexbox.tsx +2 -0
- package/src/Flexbox/FlexboxProps.ts +5 -0
- package/src/IconButton/index.ts +1 -0
- package/src/ListItem/ListItem.tsx +69 -28
- package/src/ListItem/ListItemProps.ts +5 -0
- package/src/ListItemIcon/ListItemIcon.tsx +1 -2
- package/src/ListItemSecondaryAction/ListItemSecondaryAction.tsx +2 -0
- package/src/ListItemText/ListItemText.tsx +20 -28
- package/src/ListItemText/ListItemTextProps.ts +2 -10
- package/src/ListSubheader/ListSubheader.tsx +1 -1
- package/src/Pagination/NumberPagination.tsx +1 -1
- package/src/Pagination/index.ts +1 -0
- package/src/Radio/Radio.tsx +8 -2
- package/src/Section/Section.tsx +26 -0
- package/src/Section/SectionProps.ts +6 -0
- package/src/Section/index.ts +2 -0
- package/src/ShadowView/ShadowView.native.tsx +4 -0
- package/src/Snackbar/index.ts +1 -0
- package/src/SnackbarContent/SnackbarContent.tsx +37 -18
- package/src/SvgIcon/index.ts +1 -0
- package/src/Tab/useVariantStyleMap.ts +3 -3
- package/src/Tabs/Tabs.tsx +4 -0
- package/src/Tabs/index.ts +1 -0
- package/src/Tabs/useTabsStyle.ts +35 -0
- package/src/TextField/TextField.tsx +1 -1
- package/src/TextField/index.tsx +1 -0
- package/src/TextField/useVariantStyleMap.ts +2 -2
- package/src/Toolbar/index.ts +1 -0
- package/src/Tooltip/Beaks/index.ts +4 -0
- package/src/Tooltip/Tooltip.tsx +5 -16
- package/src/Tooltip/index.ts +3 -1
- package/src/Typography/Typography.tsx +3 -1
- package/src/Typography/TypographyProps.ts +5 -0
- package/src/Typography/index.ts +1 -0
- package/src/hooks/useBreakpointUp.ts +3 -1
- package/src/hooks/useContentContainerStyle.ts +26 -34
- package/src/index.ts +3 -0
- package/build/commonjs/TextField/InputLabel.js +0 -163
- package/build/commonjs/TextField/InputLabel.js.map +0 -1
- package/build/module/TextField/InputLabel.js +0 -149
- package/build/module/TextField/InputLabel.js.map +0 -1
- package/build/typescript/TextField/InputLabel.d.ts +0 -33
- package/src/TextField/InputLabel.tsx +0 -234
|
@@ -11,11 +11,9 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
|
|
12
12
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
13
13
|
|
|
14
|
-
var _styles = require("@fountain-ui/styles");
|
|
15
|
-
|
|
16
14
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _styles = require("../styles");
|
|
19
17
|
|
|
20
18
|
var _Beaks = _interopRequireDefault(require("./Beaks"));
|
|
21
19
|
|
|
@@ -57,7 +55,7 @@ const getFlexDirection = placement => {
|
|
|
57
55
|
};
|
|
58
56
|
|
|
59
57
|
const useStyles = function () {
|
|
60
|
-
const theme = (0,
|
|
58
|
+
const theme = (0, _styles.useTheme)();
|
|
61
59
|
return {
|
|
62
60
|
root: {
|
|
63
61
|
position: 'absolute',
|
|
@@ -70,14 +68,14 @@ const useStyles = function () {
|
|
|
70
68
|
},
|
|
71
69
|
small: {
|
|
72
70
|
borderRadius: theme.shape.radius.sm,
|
|
71
|
+
paddingBottom: theme.spacing(1.75),
|
|
73
72
|
paddingHorizontal: theme.spacing(2),
|
|
74
|
-
|
|
73
|
+
paddingTop: theme.spacing(1.5)
|
|
75
74
|
},
|
|
76
75
|
large: {
|
|
77
76
|
borderRadius: 5,
|
|
78
|
-
paddingBottom: theme.spacing(2.5),
|
|
79
77
|
paddingHorizontal: theme.spacing(4),
|
|
80
|
-
|
|
78
|
+
paddingVertical: theme.spacing(2)
|
|
81
79
|
}
|
|
82
80
|
};
|
|
83
81
|
};
|
|
@@ -103,7 +101,7 @@ function Tooltip(props) {
|
|
|
103
101
|
offset: beakOffset,
|
|
104
102
|
placement: beakPlacement
|
|
105
103
|
} = beakLayout;
|
|
106
|
-
const theme = (0,
|
|
104
|
+
const theme = (0, _styles.useTheme)();
|
|
107
105
|
const styles = useStyles();
|
|
108
106
|
const [layout, setLayout] = (0, _react.useState)(initialLayout);
|
|
109
107
|
const scale = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
@@ -130,7 +128,7 @@ function Tooltip(props) {
|
|
|
130
128
|
}),
|
|
131
129
|
[placement]: totalOffset
|
|
132
130
|
};
|
|
133
|
-
const contentStyle = (0,
|
|
131
|
+
const contentStyle = (0, _styles.css)([styles.content, styles[size], isVerticalPlacement ? {
|
|
134
132
|
width: '100%'
|
|
135
133
|
} : {
|
|
136
134
|
flexGrow: 1,
|
|
@@ -140,25 +138,14 @@ function Tooltip(props) {
|
|
|
140
138
|
const nextScaleValue = visible ? 1 : 0;
|
|
141
139
|
scale.value = (0, _reactNativeReanimated.withTiming)(nextScaleValue, ANIMATION_CONFIG);
|
|
142
140
|
}, [visible]);
|
|
143
|
-
const fontStyle = (0,
|
|
144
|
-
selector: typo => size === 'large' ?
|
|
145
|
-
fontSize: 13,
|
|
146
|
-
lineHeight: 19.5,
|
|
147
|
-
fontFamily: 'Pretendard-Regular',
|
|
148
|
-
letterSpacing: 0
|
|
149
|
-
}) // TODO: change caption2.
|
|
150
|
-
: (0, _styles.typographyOf)({
|
|
151
|
-
fontSize: 11,
|
|
152
|
-
lineHeight: 15.4,
|
|
153
|
-
fontFamily: 'Pretendard-Regular',
|
|
154
|
-
letterSpacing: 0
|
|
155
|
-
}),
|
|
141
|
+
const fontStyle = (0, _styles.createFontStyle)(theme, {
|
|
142
|
+
selector: typo => size === 'large' ? typo.body3.regular : typo.caption2.regular,
|
|
156
143
|
color: theme.palette.text.strongInverse
|
|
157
144
|
});
|
|
158
|
-
const textStyle = (0,
|
|
145
|
+
const textStyle = (0, _styles.css)([fontStyle, {
|
|
159
146
|
flexShrink: 1
|
|
160
147
|
}]);
|
|
161
|
-
const beakStyle = (0,
|
|
148
|
+
const beakStyle = (0, _styles.css)({
|
|
162
149
|
transform: [isVerticalPlacement ? {
|
|
163
150
|
translateX: beakOffset
|
|
164
151
|
} : {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_BEAK_LAYOUT","offset","placement","INITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","getFlexDirection","useStyles","theme","useTheme","root","position","zIndex","tooltip","content","backgroundColor","palette","fill","base","paddingHorizontal","spacing","paddingVertical","small","borderRadius","shape","radius","sm","large","paddingBottom","paddingTop","Tooltip","props","beakLayout","children","initialLayout","left","onClose","right","numberOfTitleLines","size","style","title","tooltipStyle","verticalOffset","visible","beakOffset","beakPlacement","styles","layout","setLayout","useState","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","value","flexDirection","isVerticalPlacement","totalOffset","tooltipLayoutStyle","alignItems","undefined","overflow","Platform","select","web","display","default","contentStyle","css","flexGrow","flexShrink","useEffect","nextScaleValue","withTiming","fontStyle","createFontStyle","selector","typo","typographyOf","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","textStyle","beakStyle","translateX","translateY","buttonElem","beakElem","event","nativeEvent"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type TooltipProps from './TooltipProps';\nimport type { TooltipBeakLayout, TooltipPlacement, TooltipSize } from './TooltipProps';\nimport Beak from './Beaks';\n\nconst DEFAULT_BEAK_LAYOUT: TooltipBeakLayout = {\n offset: 0,\n placement: 'middle',\n};\n\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\ntype FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';\n\nconst getFlexDirection = (placement: TooltipPlacement): FlexDirection => {\n switch (placement) {\n case 'right':\n return 'row-reverse';\n case 'bottom':\n return 'column-reverse';\n case 'left':\n return 'row';\n case 'top':\n default:\n return 'column';\n }\n};\n\ntype TooltipStyles = NamedStylesStringUnion<'root' | 'content' | 'small' | 'large'>;\n\nconst useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {\n const theme = useTheme();\n\n return {\n root: {\n position: 'absolute',\n zIndex: theme.zIndex.tooltip,\n },\n content: {\n backgroundColor: theme.palette.fill.base,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n small: {\n borderRadius: theme.shape.radius.sm,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n large: {\n borderRadius: 5,\n paddingBottom: theme.spacing(2.5),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n };\n};\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n beakLayout = DEFAULT_BEAK_LAYOUT,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top' as TooltipPlacement,\n right,\n numberOfTitleLines = 1,\n size = 'small' as TooltipSize,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const {\n offset: beakOffset,\n placement: beakPlacement,\n } = beakLayout;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const flexDirection = getFlexDirection(placement);\n\n const isVerticalPlacement = placement === 'top' || placement === 'bottom';\n\n const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: beakPlacement === 'start'\n ? 'flex-start'\n : beakPlacement === 'end'\n ? 'flex-end'\n : 'center',\n flexDirection,\n left,\n right,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n [placement]: totalOffset,\n };\n\n const contentStyle = css([\n styles.content,\n styles[size],\n isVerticalPlacement\n ? { width: '100%' }\n : { flexGrow: 1, flexShrink: 1 },\n ]);\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'large'\n ? typographyOf({\n fontSize: 13,\n lineHeight: 19.5,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n })\n // TODO: change caption2.\n : typographyOf({\n fontSize: 11,\n lineHeight: 15.4,\n fontFamily: 'Pretendard-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const textStyle = css([\n fontStyle,\n { flexShrink: 1 },\n ]);\n\n const beakStyle = css({\n transform: [isVerticalPlacement ? { translateX: beakOffset } : { translateY: beakOffset }],\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n style={contentStyle}\n >\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n </ButtonBase>\n );\n\n const beakElem = (\n <View style={beakStyle}>\n <Beak\n fill={theme.palette.fill.base}\n placement={placement}\n size={size}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n styles.root,\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {buttonElem}\n\n {beakElem}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AAGA;;;;;;;;AAEA,MAAMA,mBAAsC,GAAG;EAC3CC,MAAM,EAAE,CADmC;EAE3CC,SAAS,EAAE;AAFgC,CAA/C;AAKA,MAAMC,cAAc,GAAG;EAAEC,KAAK,EAAE,CAAT;EAAYC,MAAM,EAAE,CAApB;EAAuBC,CAAC,EAAE,CAA1B;EAA6BC,CAAC,EAAE;AAAhC,CAAvB;AAEA,MAAMC,gBAA4C,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAArD;;AAIA,MAAMC,gBAAgB,GAAIR,SAAD,IAAgD;EACrE,QAAQA,SAAR;IACI,KAAK,OAAL;MACI,OAAO,aAAP;;IACJ,KAAK,QAAL;MACI,OAAO,gBAAP;;IACJ,KAAK,MAAL;MACI,OAAO,KAAP;;IACJ,KAAK,KAAL;IACA;MACI,OAAO,QAAP;EATR;AAWH,CAZD;;AAgBA,MAAMS,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,iBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,QAAQ,EAAE,UADR;MAEFC,MAAM,EAAEJ,KAAK,CAACI,MAA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EAAEkD;EAHX,GAKK/C,KALL,CALJ,CADJ;;EAgBA,MAAMoD,QAAQ,gBACV,6BAAC,iBAAD;IAAM,KAAK,EAAEJ;EAAb,gBACI,6BAAC,cAAD;IACI,IAAI,EAAEjF,KAAK,CAACQ,OAAN,CAAcC,IAAd,CAAmBC,IAD7B;IAEI,SAAS,EAAEpB,SAFf;IAGI,IAAI,EAAEyC;EAHV,EADJ,CADJ;;EAUA,oBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEC;EAAb,GACKP,QADL,eAGI,6BAAC,8BAAD,CAAU,IAAV;IACI,QAAQ,EAAG6D,KAAD,IAAW;MACjB,IAAIA,KAAK,CAACC,WAAN,CAAkB/C,MAAlB,CAAyB/C,MAAzB,KAAoC,CAAxC,EAA2C;QACvC;MACH;;MAEDgD,SAAS,CAAC6C,KAAK,CAACC,WAAN,CAAkB/C,MAAnB,CAAT;IACH,CAPL;IAQI,KAAK,EAAE,CACHD,MAAM,CAACrC,IADJ,EAEH2C,aAFG,EAGHO,kBAHG,EAIHlB,YAJG;EARX,GAeKkD,UAfL,EAiBKC,QAjBL,CAHJ,CADJ;AAyBH;;AAAA"}
|
|
1
|
+
{"version":3,"names":["DEFAULT_BEAK_LAYOUT","offset","placement","INITIAL_LAYOUT","width","height","x","y","ANIMATION_CONFIG","duration","getFlexDirection","useStyles","theme","useTheme","root","position","zIndex","tooltip","content","backgroundColor","palette","fill","base","paddingHorizontal","spacing","paddingVertical","small","borderRadius","shape","radius","sm","paddingBottom","paddingTop","large","Tooltip","props","beakLayout","children","initialLayout","left","onClose","right","numberOfTitleLines","size","style","title","tooltipStyle","verticalOffset","visible","beakOffset","beakPlacement","styles","layout","setLayout","useState","scale","useSharedValue","animatedStyle","useAnimatedStyle","transform","value","flexDirection","isVerticalPlacement","totalOffset","tooltipLayoutStyle","alignItems","undefined","overflow","Platform","select","web","display","default","contentStyle","css","flexGrow","flexShrink","useEffect","nextScaleValue","withTiming","fontStyle","createFontStyle","selector","typo","body3","regular","caption2","color","text","strongInverse","textStyle","beakStyle","translateX","translateY","buttonElem","beakElem","event","nativeEvent"],"sources":["Tooltip.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Platform, Text, View, ViewProps } from 'react-native';\nimport type { WithTimingConfig } from 'react-native-reanimated';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type TooltipProps from './TooltipProps';\nimport type { TooltipBeakLayout, TooltipPlacement, TooltipSize } from './TooltipProps';\nimport Beak from './Beaks';\n\nconst DEFAULT_BEAK_LAYOUT: TooltipBeakLayout = {\n offset: 0,\n placement: 'middle',\n};\n\nconst INITIAL_LAYOUT = { width: 0, height: 0, x: 0, y: 0 };\n\nconst ANIMATION_CONFIG: Readonly<WithTimingConfig> = { duration: 150 };\n\ntype FlexDirection = 'row' | 'column' | 'row-reverse' | 'column-reverse';\n\nconst getFlexDirection = (placement: TooltipPlacement): FlexDirection => {\n switch (placement) {\n case 'right':\n return 'row-reverse';\n case 'bottom':\n return 'column-reverse';\n case 'left':\n return 'row';\n case 'top':\n default:\n return 'column';\n }\n};\n\ntype TooltipStyles = NamedStylesStringUnion<'root' | 'content' | 'small' | 'large'>;\n\nconst useStyles: UseStyles<TooltipStyles> = function (): TooltipStyles {\n const theme = useTheme();\n\n return {\n root: {\n position: 'absolute',\n zIndex: theme.zIndex.tooltip,\n },\n content: {\n backgroundColor: theme.palette.fill.base,\n paddingHorizontal: theme.spacing(2),\n paddingVertical: theme.spacing(1.5),\n },\n small: {\n borderRadius: theme.shape.radius.sm,\n paddingBottom: theme.spacing(1.75),\n paddingHorizontal: theme.spacing(2),\n paddingTop: theme.spacing(1.5),\n },\n large: {\n borderRadius: 5,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(2),\n },\n };\n};\n\nexport default function Tooltip(props: TooltipProps) {\n const {\n beakLayout = DEFAULT_BEAK_LAYOUT,\n children,\n initialLayout = INITIAL_LAYOUT,\n left,\n onClose,\n placement = 'top' as TooltipPlacement,\n right,\n numberOfTitleLines = 1,\n size = 'small' as TooltipSize,\n style,\n title,\n tooltipStyle,\n verticalOffset = 4,\n visible = false,\n } = props;\n\n const {\n offset: beakOffset,\n placement: beakPlacement,\n } = beakLayout;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const [layout, setLayout] = useState(initialLayout);\n\n const scale = useSharedValue(0);\n\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ scale: scale.value }],\n }), []);\n\n const flexDirection = getFlexDirection(placement);\n\n const isVerticalPlacement = placement === 'top' || placement === 'bottom';\n\n const totalOffset = -((isVerticalPlacement ? layout.height : layout.width) + verticalOffset);\n const tooltipLayoutStyle: ViewProps['style'] = {\n alignItems: beakPlacement === 'start'\n ? 'flex-start'\n : beakPlacement === 'end'\n ? 'flex-end'\n : 'center',\n flexDirection,\n left,\n right,\n height: visible ? undefined : 0,\n overflow: visible ? undefined : 'hidden',\n ...Platform.select({\n web: {\n display: visible ? 'flex' : 'none',\n },\n default: {},\n }),\n [placement]: totalOffset,\n };\n\n const contentStyle = css([\n styles.content,\n styles[size],\n isVerticalPlacement\n ? { width: '100%' }\n : { flexGrow: 1, flexShrink: 1 },\n ]);\n\n useEffect(() => {\n const nextScaleValue = visible ? 1 : 0;\n\n scale.value = withTiming(nextScaleValue, ANIMATION_CONFIG);\n }, [visible]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typo) => size === 'large'\n ? typo.body3.regular\n : typo.caption2.regular,\n color: theme.palette.text.strongInverse,\n });\n\n const textStyle = css([\n fontStyle,\n { flexShrink: 1 },\n ]);\n\n const beakStyle = css({\n transform: [isVerticalPlacement ? { translateX: beakOffset } : { translateY: beakOffset }],\n });\n\n const buttonElem = (\n <ButtonBase\n pressEffect={'none'}\n onPress={onClose}\n style={contentStyle}\n >\n <Text\n // TODO: Should we provide text prop customization?\n numberOfLines={numberOfTitleLines}\n style={textStyle}\n >\n {title}\n </Text>\n </ButtonBase>\n );\n\n const beakElem = (\n <View style={beakStyle}>\n <Beak\n fill={theme.palette.fill.base}\n placement={placement}\n size={size}\n />\n </View>\n );\n\n return (\n <View style={style}>\n {children}\n\n <Animated.View\n onLayout={(event) => {\n if (event.nativeEvent.layout.height === 0) {\n return;\n }\n\n setLayout(event.nativeEvent.layout);\n }}\n style={[\n styles.root,\n animatedStyle,\n tooltipLayoutStyle,\n tooltipStyle,\n ]}\n >\n {buttonElem}\n\n {beakElem}\n </Animated.View>\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAGA;;AACA;;AAGA;;;;;;;;AAEA,MAAMA,mBAAsC,GAAG;EAC3CC,MAAM,EAAE,CADmC;EAE3CC,SAAS,EAAE;AAFgC,CAA/C;AAKA,MAAMC,cAAc,GAAG;EAAEC,KAAK,EAAE,CAAT;EAAYC,MAAM,EAAE,CAApB;EAAuBC,CAAC,EAAE,CAA1B;EAA6BC,CAAC,EAAE;AAAhC,CAAvB;AAEA,MAAMC,gBAA4C,GAAG;EAAEC,QAAQ,EAAE;AAAZ,CAArD;;AAIA,MAAMC,gBAAgB,GAAIR,SAAD,IAAgD;EACrE,QAAQA,SAAR;IACI,KAAK,OAAL;MACI,OAAO,aAAP;;IACJ,KAAK,QAAL;MACI,OAAO,gBAAP;;IACJ,KAAK,MAAL;MACI,OAAO,KAAP;;IACJ,KAAK,KAAL;IACA;MACI,OAAO,QAAP;EATR;AAWH,CAZD;;AAgBA,MAAMS,SAAmC,GAAG,YAA2B;EACnE,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,OAAO;IACHC,IAAI,EAAE;MACFC,QAAQ,EAAE,UADR;MAEFC,MAAM,EAAEJ,KAAK,CAACI,MAAN,CAAaC;IAFnB,CADH;IAKHC,OAAO,EAAE;MACLC,eAAe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A,oBACI,6BAAC,iBAAD;IAAM,KAAK,EAAEC;EAAb,GACKP,QADL,eAGI,6BAAC,8BAAD,CAAU,IAAV;IACI,QAAQ,EAAG2D,KAAD,IAAW;MACjB,IAAIA,KAAK,CAACC,WAAN,CAAkB7C,MAAlB,CAAyB/C,MAAzB,KAAoC,CAAxC,EAA2C;QACvC;MACH;;MAEDgD,SAAS,CAAC2C,KAAK,CAACC,WAAN,CAAkB7C,MAAnB,CAAT;IACH,CAPL;IAQI,KAAK,EAAE,CACHD,MAAM,CAACrC,IADJ,EAEH2C,aAFG,EAGHO,kBAHG,EAIHlB,YAJG;EARX,GAeKgD,UAfL,EAiBKC,QAjBL,CAHJ,CADJ;AAyBH;;AAAA"}
|
|
@@ -3,14 +3,53 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
tooltipBeakPlacements: true,
|
|
8
|
+
tooltipPlacements: true,
|
|
9
|
+
tooltipSizes: true
|
|
10
|
+
};
|
|
6
11
|
Object.defineProperty(exports, "default", {
|
|
7
12
|
enumerable: true,
|
|
8
13
|
get: function () {
|
|
9
14
|
return _Tooltip.default;
|
|
10
15
|
}
|
|
11
16
|
});
|
|
17
|
+
Object.defineProperty(exports, "tooltipBeakPlacements", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return _TooltipProps.tooltipBeakPlacements;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "tooltipPlacements", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () {
|
|
26
|
+
return _TooltipProps.tooltipPlacements;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "tooltipSizes", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return _TooltipProps.tooltipSizes;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
12
35
|
|
|
13
36
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
14
37
|
|
|
38
|
+
var _TooltipProps = require("./TooltipProps");
|
|
39
|
+
|
|
40
|
+
var _Beaks = require("./Beaks");
|
|
41
|
+
|
|
42
|
+
Object.keys(_Beaks).forEach(function (key) {
|
|
43
|
+
if (key === "default" || key === "__esModule") return;
|
|
44
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
45
|
+
if (key in exports && exports[key] === _Beaks[key]) return;
|
|
46
|
+
Object.defineProperty(exports, key, {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return _Beaks[key];
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
15
54
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tooltip';\nexport type { default as TooltipProps } from './TooltipProps';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Tooltip';\nexport type { default as TooltipProps, TooltipBeakLayout, TooltipBeakPlacement } from './TooltipProps';\nexport { tooltipBeakPlacements, tooltipPlacements, tooltipSizes } from './TooltipProps';\nexport * from './Beaks';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -55,6 +55,7 @@ const Typography = /*#__PURE__*/_react.default.forwardRef(function Typography(pr
|
|
|
55
55
|
color: colorProp = 'inherit',
|
|
56
56
|
ellipsizeMode = 'tail',
|
|
57
57
|
href,
|
|
58
|
+
lineHeight,
|
|
58
59
|
numberOfLines,
|
|
59
60
|
onPress,
|
|
60
61
|
selectable,
|
|
@@ -66,7 +67,11 @@ const Typography = /*#__PURE__*/_react.default.forwardRef(function Typography(pr
|
|
|
66
67
|
} = props;
|
|
67
68
|
const theme = (0, _styles.useTheme)();
|
|
68
69
|
const fontStyle = (0, _styles.createFontStyle)(theme, {
|
|
69
|
-
selector: typography =>
|
|
70
|
+
selector: typography => {
|
|
71
|
+
var _typography$variant;
|
|
72
|
+
|
|
73
|
+
return (_typography$variant = typography[variant]) === null || _typography$variant === void 0 ? void 0 : _typography$variant[weight];
|
|
74
|
+
},
|
|
70
75
|
color: selectColor(theme, colorProp)
|
|
71
76
|
}); // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.
|
|
72
77
|
|
|
@@ -75,7 +80,9 @@ const Typography = /*#__PURE__*/_react.default.forwardRef(function Typography(pr
|
|
|
75
80
|
} : {};
|
|
76
81
|
const textStyle = (0, _styles.css)([styles.root, {
|
|
77
82
|
textAlign: align === 'inherit' ? 'auto' : align
|
|
78
|
-
}, textWrapStyle, fontStyle,
|
|
83
|
+
}, textWrapStyle, fontStyle, lineHeight ? {
|
|
84
|
+
lineHeight
|
|
85
|
+
} : undefined, style]);
|
|
79
86
|
const accessibility = accessibilityMap[variant];
|
|
80
87
|
const variantRole = href !== undefined ? 'link' : accessibility === null || accessibility === void 0 ? void 0 : accessibility.accessibilityRole;
|
|
81
88
|
const variantLevel = accessibility === null || accessibility === void 0 ? void 0 : accessibility['area-level'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["accessibilityMap","selectColor","theme","colorProp","Platform","OS","undefined","palette","text","styles","StyleSheet","create","root","flexShrink","maxWidth","Typography","React","forwardRef","props","ref","accessibilityRole","align","ariaLevel","disableFontScaling","children","color","ellipsizeMode","href","numberOfLines","onPress","selectable","style","variant","weight","onLayout","onTextLayout","useTheme","fontStyle","createFontStyle","selector","typography","textWrapStyle","wordWrap","textStyle","css","textAlign","accessibility","variantRole","variantLevel","memo"],"sources":["Typography.tsx"],"sourcesContent":["import React from 'react';\nimport type { TextProps, TextStyle } from 'react-native';\nimport { Platform, Text } from 'react-native';\nimport type { FontVariant, FontWeight, Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type TypographyProps from './TypographyProps';\nimport type { AccessibilityMap, TypographyAlign, TypographyColor } from './TypographyProps';\n\nconst accessibilityMap: AccessibilityMap = {\n // TODO: set accessibilityRole.\n // h1: { accessibilityRole: 'header', 'aria-level': 1 },\n // h2: { accessibilityRole: 'header', 'aria-level': 2 },\n // h3: { accessibilityRole: 'header', 'aria-level': 3 },\n // subtitle1: { accessibilityRole: 'header', 'aria-level': 6 },\n // subtitle2: { accessibilityRole: 'header', 'aria-level': 6 },\n // body1: { accessibilityRole: 'text' },\n // body2: { accessibilityRole: 'text' },\n // caption1: { accessibilityRole: 'text' },\n // caption2: { accessibilityRole: 'text' },\n // flag: { accessibilityRole: 'text' },\n};\n\nfunction selectColor(theme: Theme, colorProp: TypographyColor): string | undefined {\n switch (colorProp) {\n case 'inherit':\n return Platform.OS === 'web' ? 'inherit' : undefined;\n default:\n return theme.palette.text[colorProp];\n }\n}\n\nconst styles = StyleSheet.create({\n root: {\n flexShrink: 1,\n ...(Platform.OS === 'web' ? { maxWidth: '100%' } : {}),\n },\n});\n\nconst Typography = React.forwardRef<Text, TypographyProps>(function Typography(props, ref) {\n const {\n accessibilityRole,\n align = 'inherit' as TypographyAlign,\n ariaLevel,\n disableFontScaling = false,\n children,\n color: colorProp = 'inherit' as TypographyColor,\n ellipsizeMode = 'tail' as TextProps['ellipsizeMode'],\n href,\n numberOfLines,\n onPress,\n selectable,\n style,\n variant = 'body1' as FontVariant,\n weight = 'medium' as FontWeight,\n onLayout,\n onTextLayout,\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography[variant][weight],\n color: selectColor(theme, colorProp),\n });\n\n // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.\n const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? { wordWrap: 'normal' } : {};\n\n const textStyle = css([\n styles.root,\n { textAlign: align === 'inherit' ? 'auto' : align },\n textWrapStyle as TextStyle,\n fontStyle,\n style,\n ]);\n\n const accessibility = accessibilityMap[variant];\n const variantRole = href !== undefined ? 'link' : accessibility?.accessibilityRole;\n const variantLevel = accessibility?.['area-level'];\n\n return (\n <Text\n ref={ref}\n accessibilityRole={accessibilityRole || variantRole}\n allowFontScaling={!disableFontScaling}\n aria-level={ariaLevel || variantLevel}\n children={children}\n ellipsizeMode={ellipsizeMode}\n // @ts-ignore\n href={href}\n numberOfLines={numberOfLines}\n onPress={onPress}\n selectable={selectable}\n style={textStyle}\n onLayout={onLayout}\n onTextLayout={onTextLayout}\n />\n );\n});\n\nexport default React.memo(Typography);\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;AAIA,MAAMA,gBAAkC,GAAG,CACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAXuC,CAA3C;;AAcA,SAASC,WAAT,CAAqBC,KAArB,EAAmCC,SAAnC,EAAmF;EAC/E,QAAQA,SAAR;IACI,KAAK,SAAL;MACI,OAAOC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB,SAAxB,GAAoCC,SAA3C;;IACJ;MACI,OAAOJ,KAAK,CAACK,OAAN,CAAcC,IAAd,CAAmBL,SAAnB,CAAP;EAJR;AAMH;;AAED,MAAMM,MAAM,GAAGC,kBAAA,CAAWC,MAAX,CAAkB;EAC7BC,IAAI,EAAE;IACFC,UAAU,EAAE,CADV;IAEF,IAAIT,qBAAA,CAASC,EAAT,KAAgB,KAAhB,GAAwB;MAAES,QAAQ,EAAE;IAAZ,CAAxB,GAA+C,EAAnD;EAFE;AADuB,CAAlB,CAAf;;AAOA,MAAMC,UAAU,gBAAGC,cAAA,CAAMC,UAAN,CAAwC,SAASF,UAAT,CAAoBG,KAApB,EAA2BC,GAA3B,EAAgC;EACvF,MAAM;IACFC,iBADE;IAEFC,KAAK,GAAG,SAFN;IAGFC,SAHE;IAIFC,kBAAkB,GAAG,KAJnB;IAKFC,QALE;IAMFC,KAAK,EAAEtB,SAAS,GAAG,SANjB;IAOFuB,aAAa,GAAG,MAPd;IAQFC,IARE;IASFC,
|
|
1
|
+
{"version":3,"names":["accessibilityMap","selectColor","theme","colorProp","Platform","OS","undefined","palette","text","styles","StyleSheet","create","root","flexShrink","maxWidth","Typography","React","forwardRef","props","ref","accessibilityRole","align","ariaLevel","disableFontScaling","children","color","ellipsizeMode","href","lineHeight","numberOfLines","onPress","selectable","style","variant","weight","onLayout","onTextLayout","useTheme","fontStyle","createFontStyle","selector","typography","textWrapStyle","wordWrap","textStyle","css","textAlign","accessibility","variantRole","variantLevel","memo"],"sources":["Typography.tsx"],"sourcesContent":["import React from 'react';\nimport type { TextProps, TextStyle } from 'react-native';\nimport { Platform, Text } from 'react-native';\nimport type { FontVariant, FontWeight, Theme } from '@fountain-ui/styles';\nimport { createFontStyle, css, StyleSheet, useTheme } from '../styles';\nimport type TypographyProps from './TypographyProps';\nimport type { AccessibilityMap, TypographyAlign, TypographyColor } from './TypographyProps';\n\nconst accessibilityMap: AccessibilityMap = {\n // TODO: set accessibilityRole.\n // h1: { accessibilityRole: 'header', 'aria-level': 1 },\n // h2: { accessibilityRole: 'header', 'aria-level': 2 },\n // h3: { accessibilityRole: 'header', 'aria-level': 3 },\n // subtitle1: { accessibilityRole: 'header', 'aria-level': 6 },\n // subtitle2: { accessibilityRole: 'header', 'aria-level': 6 },\n // body1: { accessibilityRole: 'text' },\n // body2: { accessibilityRole: 'text' },\n // caption1: { accessibilityRole: 'text' },\n // caption2: { accessibilityRole: 'text' },\n // flag: { accessibilityRole: 'text' },\n};\n\nfunction selectColor(theme: Theme, colorProp: TypographyColor): string | undefined {\n switch (colorProp) {\n case 'inherit':\n return Platform.OS === 'web' ? 'inherit' : undefined;\n default:\n return theme.palette.text[colorProp];\n }\n}\n\nconst styles = StyleSheet.create({\n root: {\n flexShrink: 1,\n ...(Platform.OS === 'web' ? { maxWidth: '100%' } : {}),\n },\n});\n\nconst Typography = React.forwardRef<Text, TypographyProps>(function Typography(props, ref) {\n const {\n accessibilityRole,\n align = 'inherit' as TypographyAlign,\n ariaLevel,\n disableFontScaling = false,\n children,\n color: colorProp = 'inherit' as TypographyColor,\n ellipsizeMode = 'tail' as TextProps['ellipsizeMode'],\n href,\n lineHeight,\n numberOfLines,\n onPress,\n selectable,\n style,\n variant = 'body1' as FontVariant,\n weight = 'medium' as FontWeight,\n onLayout,\n onTextLayout,\n } = props;\n\n const theme = useTheme();\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography[variant]?.[weight],\n color: selectColor(theme, colorProp),\n });\n\n // To prevent white-space: pre, word-wrap:break-word style conflicting issue at safari browser.\n const textWrapStyle = numberOfLines && numberOfLines > 0 && Platform.OS === 'web' ? { wordWrap: 'normal' } : {};\n\n const textStyle = css([\n styles.root,\n { textAlign: align === 'inherit' ? 'auto' : align },\n textWrapStyle as TextStyle,\n fontStyle,\n lineHeight ? { lineHeight } : undefined,\n style,\n ]);\n\n const accessibility = accessibilityMap[variant];\n const variantRole = href !== undefined ? 'link' : accessibility?.accessibilityRole;\n const variantLevel = accessibility?.['area-level'];\n\n return (\n <Text\n ref={ref}\n accessibilityRole={accessibilityRole || variantRole}\n allowFontScaling={!disableFontScaling}\n aria-level={ariaLevel || variantLevel}\n children={children}\n ellipsizeMode={ellipsizeMode}\n // @ts-ignore\n href={href}\n numberOfLines={numberOfLines}\n onPress={onPress}\n selectable={selectable}\n style={textStyle}\n onLayout={onLayout}\n onTextLayout={onTextLayout}\n />\n );\n});\n\nexport default React.memo(Typography);\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;AAIA,MAAMA,gBAAkC,GAAG,CACvC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AAXuC,CAA3C;;AAcA,SAASC,WAAT,C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typographyColors"],"sources":["TypographyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { AccessibilityProps, TextProps, TextStyle } from 'react-native';\nimport type { FontVariant, FontWeight } from '@fountain-ui/styles';\nimport type { ComponentProps } from '../types';\n\nexport type TypographyAlign = 'inherit' | TextStyle['textAlign'];\n\nexport const typographyColors = [\n 'inherit',\n 'accent',\n 'accentAlt',\n 'strong',\n 'strongInverse',\n 'base',\n 'baseInverse',\n 'baseOpacity',\n 'baseOpacityInverse',\n 'weak',\n 'weakOpacity',\n 'weakInverse',\n 'weakOpacityInverse',\n] as const;\n\nexport type TypographyColor = typeof typographyColors[number];\n\nexport interface Accessibility {\n accessibilityRole: AccessibilityProps['accessibilityRole'];\n 'area-level'?: number;\n}\n\nexport type AccessibilityMap = Partial<Record<FontVariant, Accessibility>>;\n\nexport default interface TypographyProps extends ComponentProps<{\n /**\n * Applies HTML tag at web and communicates purpose of component at app\n */\n accessibilityRole?: AccessibilityProps['accessibilityRole'];\n\n /**\n * Set the text-align on the component.\n * The value 'justify' is not supported on Android and fallbacks to left.\n * @default 'inherit'\n */\n align?: TypographyAlign;\n\n /**\n * Applies HTML heading level\n */\n ariaLevel?: number;\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings.\n * @default false\n */\n disableFontScaling?: boolean;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'inherit'\n */\n color?: TypographyColor;\n\n /**\n * The text ellipsis mode.\n * @default 'tail'\n */\n ellipsizeMode?: TextProps['ellipsizeMode'];\n\n /**\n * Internal use only. The hyperlink of the text.\n */\n href?: string;\n\n /**\n * Used to truncate the text with an ellipsis after computing the text\n * layout, including line wrapping, such that the total number of lines\n * does not exceed this number.\n */\n numberOfLines?: TextProps['numberOfLines'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n onPress?: TextProps['onPress'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n selectable?: boolean;\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant?: FontVariant;\n\n /**\n * Determines the font weight.\n * @default 'medium'\n */\n weight?: FontWeight;\n\n /**\n * Callback that is called when the text layout has been calculated.\n */\n onTextLayout?: TextProps['onTextLayout'];\n\n /**\n * Callback that is called when the layout of the Text component changes.\n */\n onLayout?: TextProps['onLayout'];\n}> {}\n"],"mappings":";;;;;;AAOO,MAAMA,gBAAgB,GAAG,CAC5B,SAD4B,EAE5B,QAF4B,EAG5B,WAH4B,EAI5B,QAJ4B,EAK5B,eAL4B,EAM5B,MAN4B,EAO5B,aAP4B,EAQ5B,aAR4B,EAS5B,oBAT4B,EAU5B,MAV4B,EAW5B,aAX4B,EAY5B,aAZ4B,EAa5B,oBAb4B,CAAzB"}
|
|
1
|
+
{"version":3,"names":["typographyColors"],"sources":["TypographyProps.ts"],"sourcesContent":["import React from 'react';\nimport type { AccessibilityProps, TextProps, TextStyle } from 'react-native';\nimport type { FontVariant, FontWeight } from '@fountain-ui/styles';\nimport type { ComponentProps } from '../types';\n\nexport type TypographyAlign = 'inherit' | TextStyle['textAlign'];\n\nexport const typographyColors = [\n 'inherit',\n 'accent',\n 'accentAlt',\n 'strong',\n 'strongInverse',\n 'base',\n 'baseInverse',\n 'baseOpacity',\n 'baseOpacityInverse',\n 'weak',\n 'weakOpacity',\n 'weakInverse',\n 'weakOpacityInverse',\n] as const;\n\nexport type TypographyColor = typeof typographyColors[number];\n\nexport interface Accessibility {\n accessibilityRole: AccessibilityProps['accessibilityRole'];\n 'area-level'?: number;\n}\n\nexport type AccessibilityMap = Partial<Record<FontVariant, Accessibility>>;\n\nexport default interface TypographyProps extends ComponentProps<{\n /**\n * Applies HTML tag at web and communicates purpose of component at app\n */\n accessibilityRole?: AccessibilityProps['accessibilityRole'];\n\n /**\n * Set the text-align on the component.\n * The value 'justify' is not supported on Android and fallbacks to left.\n * @default 'inherit'\n */\n align?: TypographyAlign;\n\n /**\n * Applies HTML heading level\n */\n ariaLevel?: number;\n\n /**\n * Specifies whether fonts should scale to respect Text Size accessibility settings.\n * @default false\n */\n disableFontScaling?: boolean;\n\n /**\n * The content of the component.\n */\n children?: React.ReactNode;\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'inherit'\n */\n color?: TypographyColor;\n\n /**\n * The text ellipsis mode.\n * @default 'tail'\n */\n ellipsizeMode?: TextProps['ellipsizeMode'];\n\n /**\n * Internal use only. The hyperlink of the text.\n */\n href?: string;\n\n /**\n * Defines the vertical spacing between lines of text.\n */\n lineHeight?: TextStyle['lineHeight'];\n\n /**\n * Used to truncate the text with an ellipsis after computing the text\n * layout, including line wrapping, such that the total number of lines\n * does not exceed this number.\n */\n numberOfLines?: TextProps['numberOfLines'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n onPress?: TextProps['onPress'];\n\n /**\n * Lets the user select text, to use the native copy and paste functionality.\n */\n selectable?: boolean;\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant?: FontVariant;\n\n /**\n * Determines the font weight.\n * @default 'medium'\n */\n weight?: FontWeight;\n\n /**\n * Callback that is called when the text layout has been calculated.\n */\n onTextLayout?: TextProps['onTextLayout'];\n\n /**\n * Callback that is called when the layout of the Text component changes.\n */\n onLayout?: TextProps['onLayout'];\n}> {}\n"],"mappings":";;;;;;AAOO,MAAMA,gBAAgB,GAAG,CAC5B,SAD4B,EAE5B,QAF4B,EAG5B,WAH4B,EAI5B,QAJ4B,EAK5B,eAL4B,EAM5B,MAN4B,EAO5B,aAP4B,EAQ5B,aAR4B,EAS5B,oBAT4B,EAU5B,MAV4B,EAW5B,aAX4B,EAY5B,aAZ4B,EAa5B,oBAb4B,CAAzB"}
|
|
@@ -9,8 +9,16 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _Typography.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "typographyColors", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _TypographyProps.typographyColors;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
|
|
13
19
|
var _Typography = _interopRequireDefault(require("./Typography"));
|
|
14
20
|
|
|
21
|
+
var _TypographyProps = require("./TypographyProps");
|
|
22
|
+
|
|
15
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Typography';\nexport type { default as TypographyProps } from './TypographyProps';\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { default } from './Typography';\nexport type { default as TypographyProps } from './TypographyProps';\nexport { typographyColors } from './TypographyProps';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AAEA"}
|
|
@@ -15,9 +15,12 @@ function useBreakpointUp(target, yes, no) {
|
|
|
15
15
|
|
|
16
16
|
const isUp = (0, _react.useMemo)(() => {
|
|
17
17
|
switch (target) {
|
|
18
|
-
case '
|
|
18
|
+
case 'xxs':
|
|
19
19
|
return true;
|
|
20
20
|
|
|
21
|
+
case 'xs':
|
|
22
|
+
return current === 'xs' || current === 'sm' || current === 'md' || current === 'lg';
|
|
23
|
+
|
|
21
24
|
case 'sm':
|
|
22
25
|
return current === 'sm' || current === 'md' || current === 'lg';
|
|
23
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useBreakpointUp","target","yes","no","theme","useTheme","current","breakpoints","isUp","useMemo"],"sources":["useBreakpointUp.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { Theme } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\n\ntype Breakpoint = keyof Theme['breakpoints']['values'];\n\nexport default function useBreakpointUp<R>(target: Breakpoint, yes: R, no: R): R {\n const theme = useTheme();\n\n const current = theme.breakpoints.current;\n\n // TODO: Needs to refactor\n const isUp = useMemo<boolean>(() => {\n switch (target) {\n case '
|
|
1
|
+
{"version":3,"names":["useBreakpointUp","target","yes","no","theme","useTheme","current","breakpoints","isUp","useMemo"],"sources":["useBreakpointUp.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { Theme } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\n\ntype Breakpoint = keyof Theme['breakpoints']['values'];\n\nexport default function useBreakpointUp<R>(target: Breakpoint, yes: R, no: R): R {\n const theme = useTheme();\n\n const current = theme.breakpoints.current;\n\n // TODO: Needs to refactor\n const isUp = useMemo<boolean>(() => {\n switch (target) {\n case 'xxs':\n return true;\n case 'xs':\n return current === 'xs' || current === 'sm' || current === 'md' || current === 'lg';\n case 'sm':\n return current === 'sm' || current === 'md' || current === 'lg';\n case 'md':\n return current === 'md' || current === 'lg';\n case 'lg':\n return current === 'lg';\n }\n }, [target, current]);\n\n return isUp ? yes : no;\n};\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAIe,SAASA,eAAT,CAA4BC,MAA5B,EAAgDC,GAAhD,EAAwDC,EAAxD,EAAkE;EAC7E,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EAEA,MAAMC,OAAO,GAAGF,KAAK,CAACG,WAAN,CAAkBD,OAAlC,CAH6E,CAK7E;;EACA,MAAME,IAAI,GAAG,IAAAC,cAAA,EAAiB,MAAM;IAChC,QAAQR,MAAR;MACI,KAAK,KAAL;QACI,OAAO,IAAP;;MACJ,KAAK,IAAL;QACI,OAAOK,OAAO,KAAK,IAAZ,IAAoBA,OAAO,KAAK,IAAhC,IAAwCA,OAAO,KAAK,IAApD,IAA4DA,OAAO,KAAK,IAA/E;;MACJ,KAAK,IAAL;QACI,OAAOA,OAAO,KAAK,IAAZ,IAAoBA,OAAO,KAAK,IAAhC,IAAwCA,OAAO,KAAK,IAA3D;;MACJ,KAAK,IAAL;QACI,OAAOA,OAAO,KAAK,IAAZ,IAAoBA,OAAO,KAAK,IAAvC;;MACJ,KAAK,IAAL;QACI,OAAOA,OAAO,KAAK,IAAnB;IAVR;EAYH,CAbY,EAaV,CAACL,MAAD,EAASK,OAAT,CAbU,CAAb;EAeA,OAAOE,IAAI,GAAGN,GAAH,GAASC,EAApB;AACH;;AAAA"}
|
|
@@ -7,49 +7,42 @@ exports.default = useContentContainerStyle;
|
|
|
7
7
|
|
|
8
8
|
var _styles = require("../styles");
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
function getMaxWidth(theme, breakpoint, customMaxWidth) {
|
|
11
|
+
switch (breakpoint) {
|
|
12
|
+
case 'lg':
|
|
13
|
+
case 'md':
|
|
14
|
+
return customMaxWidth ?? theme.breakpoints.values[breakpoint];
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}; // TODO: Needs to refactor
|
|
16
|
+
default:
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
function
|
|
21
|
+
function getPaddingHorizontal(theme, breakpoint) {
|
|
21
22
|
switch (breakpoint) {
|
|
22
|
-
case 'xs':
|
|
23
|
-
return theme.breakpoints.values['sm'];
|
|
24
|
-
|
|
25
23
|
case 'sm':
|
|
26
|
-
return theme.
|
|
24
|
+
return theme.spacing(6);
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
return theme.
|
|
30
|
-
|
|
31
|
-
case 'lg':
|
|
32
|
-
return 'none';
|
|
26
|
+
default:
|
|
27
|
+
return theme.spacing(4);
|
|
33
28
|
}
|
|
34
29
|
}
|
|
35
30
|
|
|
36
31
|
function useContentContainerStyle() {
|
|
37
|
-
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
32
|
+
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
38
33
|
const {
|
|
39
|
-
|
|
40
|
-
maxWidth,
|
|
34
|
+
maxWidth: customMaxWidth,
|
|
41
35
|
styleProvider
|
|
42
|
-
} =
|
|
43
|
-
...config
|
|
44
|
-
};
|
|
36
|
+
} = config;
|
|
45
37
|
const theme = (0, _styles.useTheme)();
|
|
38
|
+
const currentBreakpoint = theme.breakpoints.current;
|
|
46
39
|
const additionalStyle = styleProvider === null || styleProvider === void 0 ? void 0 : styleProvider(theme);
|
|
47
|
-
|
|
40
|
+
return (0, _styles.css)([{
|
|
48
41
|
alignSelf: 'center',
|
|
49
|
-
maxWidth: getMaxWidth(theme,
|
|
42
|
+
maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),
|
|
43
|
+
paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint),
|
|
50
44
|
width: '100%'
|
|
51
|
-
}, additionalStyle];
|
|
52
|
-
return (0, _useBreakpointUp.default)(breakpoint, yesStyle, additionalStyle);
|
|
45
|
+
}, additionalStyle]);
|
|
53
46
|
}
|
|
54
47
|
|
|
55
48
|
;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getMaxWidth","theme","breakpoint","customMaxWidth","breakpoints","values","undefined","getPaddingHorizontal","spacing","useContentContainerStyle","config","maxWidth","styleProvider","useTheme","currentBreakpoint","current","additionalStyle","css","alignSelf","paddingHorizontal","width"],"sources":["useContentContainerStyle.ts"],"sourcesContent":["import type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type { Theme } from '../types';\n\ntype Breakpoint = keyof Theme['breakpoints']['values'];\n\nexport interface Config {\n maxWidth?: number;\n styleProvider?: (theme: Theme) => FountainUiStyle;\n}\n\nfunction getMaxWidth(theme: Theme, breakpoint: Breakpoint, customMaxWidth?: number): number | undefined {\n switch (breakpoint) {\n case 'lg':\n case 'md':\n return customMaxWidth ?? theme.breakpoints.values[breakpoint];\n default:\n return undefined;\n }\n}\n\nfunction getPaddingHorizontal(theme: Theme, breakpoint: Breakpoint): number {\n switch (breakpoint) {\n case 'sm':\n return theme.spacing(6);\n default:\n return theme.spacing(4);\n }\n}\n\nexport default function useContentContainerStyle(config: Config = {}): FountainUiStyle {\n const {\n maxWidth: customMaxWidth,\n styleProvider,\n } = config;\n\n const theme = useTheme();\n\n const currentBreakpoint = theme.breakpoints.current;\n\n const additionalStyle = styleProvider?.(theme);\n\n return css([\n {\n alignSelf: 'center',\n maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),\n paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint),\n width: '100%',\n },\n additionalStyle,\n ]);\n};\n"],"mappings":";;;;;;;AACA;;AAUA,SAASA,WAAT,CAAqBC,KAArB,EAAmCC,UAAnC,EAA2DC,cAA3D,EAAwG;EACpG,QAAQD,UAAR;IACI,KAAK,IAAL;IACA,KAAK,IAAL;MACI,OAAOC,cAAc,IAAIF,KAAK,CAACG,WAAN,CAAkBC,MAAlB,CAAyBH,UAAzB,CAAzB;;IACJ;MACI,OAAOI,SAAP;EALR;AAOH;;AAED,SAASC,oBAAT,CAA8BN,KAA9B,EAA4CC,UAA5C,EAA4E;EACxE,QAAQA,UAAR;IACI,KAAK,IAAL;MACI,OAAOD,KAAK,CAACO,OAAN,CAAc,CAAd,CAAP;;IACJ;MACI,OAAOP,KAAK,CAACO,OAAN,CAAc,CAAd,CAAP;EAJR;AAMH;;AAEc,SAASC,wBAAT,GAAwE;EAAA,IAAtCC,MAAsC,uEAArB,EAAqB;EACnF,MAAM;IACFC,QAAQ,EAAER,cADR;IAEFS;EAFE,IAGFF,MAHJ;EAKA,MAAMT,KAAK,GAAG,IAAAY,gBAAA,GAAd;EAEA,MAAMC,iBAAiB,GAAGb,KAAK,CAACG,WAAN,CAAkBW,OAA5C;EAEA,MAAMC,eAAe,GAAGJ,aAAH,aAAGA,aAAH,uBAAGA,aAAa,CAAGX,KAAH,CAArC;EAEA,OAAO,IAAAgB,WAAA,EAAI,CACP;IACIC,SAAS,EAAE,QADf;IAEIP,QAAQ,EAAEX,WAAW,CAACC,KAAD,EAAQa,iBAAR,EAA2BX,cAA3B,CAFzB;IAGIgB,iBAAiB,EAAEZ,oBAAoB,CAACN,KAAD,EAAQa,iBAAR,CAH3C;IAIIM,KAAK,EAAE;EAJX,CADO,EAOPJ,eAPO,CAAJ,CAAP;AASH;;AAAA"}
|
package/build/commonjs/index.js
CHANGED
|
@@ -51,6 +51,7 @@ var _exportNames = {
|
|
|
51
51
|
Radio: true,
|
|
52
52
|
RadioGroup: true,
|
|
53
53
|
Row: true,
|
|
54
|
+
Section: true,
|
|
54
55
|
ShadowView: true,
|
|
55
56
|
Slide: true,
|
|
56
57
|
Slider: true,
|
|
@@ -344,6 +345,12 @@ Object.defineProperty(exports, "Row", {
|
|
|
344
345
|
return _Row.default;
|
|
345
346
|
}
|
|
346
347
|
});
|
|
348
|
+
Object.defineProperty(exports, "Section", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function () {
|
|
351
|
+
return _Section.default;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
347
354
|
Object.defineProperty(exports, "ShadowView", {
|
|
348
355
|
enumerable: true,
|
|
349
356
|
get: function () {
|
|
@@ -1175,6 +1182,20 @@ Object.keys(_Row).forEach(function (key) {
|
|
|
1175
1182
|
});
|
|
1176
1183
|
});
|
|
1177
1184
|
|
|
1185
|
+
var _Section = _interopRequireWildcard(require("./Section"));
|
|
1186
|
+
|
|
1187
|
+
Object.keys(_Section).forEach(function (key) {
|
|
1188
|
+
if (key === "default" || key === "__esModule") return;
|
|
1189
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1190
|
+
if (key in exports && exports[key] === _Section[key]) return;
|
|
1191
|
+
Object.defineProperty(exports, key, {
|
|
1192
|
+
enumerable: true,
|
|
1193
|
+
get: function () {
|
|
1194
|
+
return _Section[key];
|
|
1195
|
+
}
|
|
1196
|
+
});
|
|
1197
|
+
});
|
|
1198
|
+
|
|
1178
1199
|
var _ShadowView = _interopRequireWildcard(require("./ShadowView"));
|
|
1179
1200
|
|
|
1180
1201
|
Object.keys(_ShadowView).forEach(function (key) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './styles';\n\nexport * from './types';\n\nexport * from './hooks';\n\nexport * from './utils';\n\nexport * from './store';\n\nexport { default as Accordion } from './Accordion';\nexport * from './Accordion';\n\nexport { default as AppBar } from './AppBar';\nexport * from './AppBar';\n\nexport { default as AspectRatio } from './AspectRatio';\nexport * from './AspectRatio';\n\nexport { default as Avatar } from './Avatar';\nexport * from './Avatar';\n\nexport { default as Badge } from './Badge';\nexport * from './Badge';\n\nexport { default as BottomSheetActions } from './BottomSheetActions';\nexport * from './BottomSheetActions';\n\nexport { default as BottomSheetContent } from './BottomSheetContent';\nexport * from './BottomSheetContent';\n\nexport { default as BottomSheetTitle } from './BottomSheetTitle';\nexport * from './BottomSheetTitle';\n\nexport { default as Button } from './Button';\nexport * from './Button';\n\nexport { default as ButtonBase } from './ButtonBase';\nexport * from './ButtonBase';\n\nexport { default as ButtonSet } from './ButtonSet';\nexport * from './ButtonSet';\n\nexport { default as Card } from './Card';\nexport * from './Card';\n\nexport { default as CardActions } from './CardActions';\nexport * from './CardActions';\n\nexport { default as CardContent } from './CardContent';\nexport * from './CardContent';\n\nexport { default as CardMedia } from './CardMedia';\nexport * from './CardMedia';\n\nexport { default as Checkbox } from './Checkbox';\nexport * from './Checkbox';\n\nexport { default as Chip } from './Chip';\nexport * from './Chip';\n\nexport { default as CircularProgress } from './CircularProgress';\nexport * from './CircularProgress';\n\nexport { default as Column } from './Column';\nexport * from './Column';\n\nexport { default as Dialog } from './Dialog';\nexport * from './Dialog';\n\nexport { default as DialogActions } from './DialogActions';\nexport * from './DialogActions';\n\nexport { default as DialogContent } from './DialogContent';\nexport * from './DialogContent';\n\nexport { default as DialogMedia } from './DialogMedia';\nexport * from './DialogMedia';\n\nexport { default as DialogTitle } from './DialogTitle';\nexport * from './DialogTitle';\n\nexport { default as Divider } from './Divider';\nexport * from './Divider';\n\nexport { default as Empty } from './Empty';\nexport * from './Empty';\n\nexport { default as Fab } from './Fab';\nexport * from './Fab';\n\nexport { default as IconButton } from './IconButton';\nexport * from './IconButton';\n\nexport { default as Image } from './Image';\nexport * from './Image';\n\nexport * from './ImageCore';\n\nexport { default as Link } from './Link';\nexport * from './Link';\n\nexport { default as List } from './List';\nexport * from './List';\n\nexport { default as ListItem } from './ListItem';\nexport * from './ListItem';\n\nexport { default as ListItemIcon } from './ListItemIcon';\nexport * from './ListItemIcon';\n\nexport { default as ListItemSecondaryAction } from './ListItemSecondaryAction';\nexport * from './ListItemSecondaryAction';\n\nexport { default as ListItemText } from './ListItemText';\nexport * from './ListItemText';\n\nexport { default as ListSubheader } from './ListSubheader';\nexport * from './ListSubheader';\n\nexport { default as Menu } from './Menu';\nexport * from './Menu';\n\nexport { default as MenuItem } from './MenuItem';\nexport * from './MenuItem';\n\nexport { default as Modal, createModalCloseEvent } from './Modal';\nexport type { ModalCloseEvent } from './Modal';\nexport * from './Modal';\n\nexport { default as Pagination } from './Pagination';\nexport * from './Pagination';\n\nexport { default as PaginationItem } from './PaginationItem';\nexport * from './PaginationItem';\n\nexport { default as Paper } from './Paper';\nexport * from './Paper';\n\nexport { default as Portal } from './Portal';\nexport * from './Portal';\n\nexport { default as Radio } from './Radio';\nexport * from './Radio';\n\nexport { default as RadioGroup } from './RadioGroup';\nexport * from './RadioGroup';\n\nexport { default as Row } from './Row';\nexport * from './Row';\n\nexport { default as ShadowView } from './ShadowView';\nexport * from './ShadowView';\n\nexport { default as Slide } from './Slide';\nexport * from './Slide';\n\nexport { default as Slider } from './Slider';\nexport * from './Slider';\n\nexport { default as Snackbar } from './Snackbar';\nexport * from './Snackbar';\n\nexport { default as SnackbarContent } from './SnackbarContent';\nexport * from './SnackbarContent';\n\nexport { default as Spacer } from './Spacer';\nexport * from './Spacer';\n\nexport { default as SvgIcon } from './SvgIcon';\nexport * from './SvgIcon';\n\nexport { default as Switch } from './Switch';\nexport * from './Switch';\n\nexport { default as Tab } from './Tab';\nexport * from './Tab';\n\nexport { default as TabBase } from './TabBase';\nexport * from './TabBase';\n\nexport { default as Tabs } from './Tabs';\nexport * from './Tabs';\n\nexport { default as TextField } from './TextField';\nexport * from './TextField';\n\nexport { default as Toggle } from './Toggle';\nexport * from './Toggle';\n\nexport { default as Toolbar } from './Toolbar';\nexport * from './Toolbar';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as Typography } from './Typography';\nexport * from './Typography';\n\nexport * from './animated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA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A;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './styles';\n\nexport * from './types';\n\nexport * from './hooks';\n\nexport * from './utils';\n\nexport * from './store';\n\nexport { default as Accordion } from './Accordion';\nexport * from './Accordion';\n\nexport { default as AppBar } from './AppBar';\nexport * from './AppBar';\n\nexport { default as AspectRatio } from './AspectRatio';\nexport * from './AspectRatio';\n\nexport { default as Avatar } from './Avatar';\nexport * from './Avatar';\n\nexport { default as Badge } from './Badge';\nexport * from './Badge';\n\nexport { default as BottomSheetActions } from './BottomSheetActions';\nexport * from './BottomSheetActions';\n\nexport { default as BottomSheetContent } from './BottomSheetContent';\nexport * from './BottomSheetContent';\n\nexport { default as BottomSheetTitle } from './BottomSheetTitle';\nexport * from './BottomSheetTitle';\n\nexport { default as Button } from './Button';\nexport * from './Button';\n\nexport { default as ButtonBase } from './ButtonBase';\nexport * from './ButtonBase';\n\nexport { default as ButtonSet } from './ButtonSet';\nexport * from './ButtonSet';\n\nexport { default as Card } from './Card';\nexport * from './Card';\n\nexport { default as CardActions } from './CardActions';\nexport * from './CardActions';\n\nexport { default as CardContent } from './CardContent';\nexport * from './CardContent';\n\nexport { default as CardMedia } from './CardMedia';\nexport * from './CardMedia';\n\nexport { default as Checkbox } from './Checkbox';\nexport * from './Checkbox';\n\nexport { default as Chip } from './Chip';\nexport * from './Chip';\n\nexport { default as CircularProgress } from './CircularProgress';\nexport * from './CircularProgress';\n\nexport { default as Column } from './Column';\nexport * from './Column';\n\nexport { default as Dialog } from './Dialog';\nexport * from './Dialog';\n\nexport { default as DialogActions } from './DialogActions';\nexport * from './DialogActions';\n\nexport { default as DialogContent } from './DialogContent';\nexport * from './DialogContent';\n\nexport { default as DialogMedia } from './DialogMedia';\nexport * from './DialogMedia';\n\nexport { default as DialogTitle } from './DialogTitle';\nexport * from './DialogTitle';\n\nexport { default as Divider } from './Divider';\nexport * from './Divider';\n\nexport { default as Empty } from './Empty';\nexport * from './Empty';\n\nexport { default as Fab } from './Fab';\nexport * from './Fab';\n\nexport { default as IconButton } from './IconButton';\nexport * from './IconButton';\n\nexport { default as Image } from './Image';\nexport * from './Image';\n\nexport * from './ImageCore';\n\nexport { default as Link } from './Link';\nexport * from './Link';\n\nexport { default as List } from './List';\nexport * from './List';\n\nexport { default as ListItem } from './ListItem';\nexport * from './ListItem';\n\nexport { default as ListItemIcon } from './ListItemIcon';\nexport * from './ListItemIcon';\n\nexport { default as ListItemSecondaryAction } from './ListItemSecondaryAction';\nexport * from './ListItemSecondaryAction';\n\nexport { default as ListItemText } from './ListItemText';\nexport * from './ListItemText';\n\nexport { default as ListSubheader } from './ListSubheader';\nexport * from './ListSubheader';\n\nexport { default as Menu } from './Menu';\nexport * from './Menu';\n\nexport { default as MenuItem } from './MenuItem';\nexport * from './MenuItem';\n\nexport { default as Modal, createModalCloseEvent } from './Modal';\nexport type { ModalCloseEvent } from './Modal';\nexport * from './Modal';\n\nexport { default as Pagination } from './Pagination';\nexport * from './Pagination';\n\nexport { default as PaginationItem } from './PaginationItem';\nexport * from './PaginationItem';\n\nexport { default as Paper } from './Paper';\nexport * from './Paper';\n\nexport { default as Portal } from './Portal';\nexport * from './Portal';\n\nexport { default as Radio } from './Radio';\nexport * from './Radio';\n\nexport { default as RadioGroup } from './RadioGroup';\nexport * from './RadioGroup';\n\nexport { default as Row } from './Row';\nexport * from './Row';\n\nexport { default as Section } from './Section';\nexport * from './Section';\n\nexport { default as ShadowView } from './ShadowView';\nexport * from './ShadowView';\n\nexport { default as Slide } from './Slide';\nexport * from './Slide';\n\nexport { default as Slider } from './Slider';\nexport * from './Slider';\n\nexport { default as Snackbar } from './Snackbar';\nexport * from './Snackbar';\n\nexport { default as SnackbarContent } from './SnackbarContent';\nexport * from './SnackbarContent';\n\nexport { default as Spacer } from './Spacer';\nexport * from './Spacer';\n\nexport { default as SvgIcon } from './SvgIcon';\nexport * from './SvgIcon';\n\nexport { default as Switch } from './Switch';\nexport * from './Switch';\n\nexport { default as Tab } from './Tab';\nexport * from './Tab';\n\nexport { default as TabBase } from './TabBase';\nexport * from './TabBase';\n\nexport { default as Tabs } from './Tabs';\nexport * from './Tabs';\n\nexport { default as TextField } from './TextField';\nexport * from './TextField';\n\nexport { default as Toggle } from './Toggle';\nexport * from './Toggle';\n\nexport { default as Toolbar } from './Toolbar';\nexport * from './Toolbar';\n\nexport { default as Tooltip } from './Tooltip';\nexport * from './Tooltip';\n\nexport { default as Typography } from './Typography';\nexport * from './Typography';\n\nexport * from './animated';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA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A;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|
|
@@ -51,6 +51,7 @@ export default function Accordion(props) {
|
|
|
51
51
|
container: containerStyle,
|
|
52
52
|
content: contentStyle,
|
|
53
53
|
contentFont: contentFontStyle,
|
|
54
|
+
iconContainer: iconContainerStyle,
|
|
54
55
|
subTitleFont: subTitleFontStyle,
|
|
55
56
|
title: titleStyle,
|
|
56
57
|
titleFont: titleFontStyle
|
|
@@ -102,7 +103,9 @@ export default function Accordion(props) {
|
|
|
102
103
|
flexShrink: 1
|
|
103
104
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
104
105
|
alignItems: 'center'
|
|
105
|
-
}, LeftComponent ? /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
106
|
+
}, LeftComponent ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
107
|
+
style: iconContainerStyle
|
|
108
|
+
}, LeftComponent), /*#__PURE__*/React.createElement(Spacer, {
|
|
106
109
|
size: 1.5
|
|
107
110
|
})) : null, /*#__PURE__*/React.createElement(Text, {
|
|
108
111
|
allowFontScaling: false,
|