@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
|
@@ -1,44 +1,42 @@
|
|
|
1
1
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { Text } from 'react-native';
|
|
5
|
+
import { typographyOf } from '@fountain-ui/styles';
|
|
4
6
|
import Column from '../Column';
|
|
5
|
-
import
|
|
6
|
-
import { css, useTheme } from '../styles';
|
|
7
|
+
import { createFontStyle, css, useTheme } from '../styles';
|
|
7
8
|
|
|
8
9
|
const useStyles = function () {
|
|
9
|
-
const theme = useTheme();
|
|
10
10
|
return {
|
|
11
11
|
root: {
|
|
12
12
|
flexGrow: 1,
|
|
13
13
|
flexShrink: 1
|
|
14
|
-
},
|
|
15
|
-
multiline: {
|
|
16
|
-
marginBottom: theme.spacing(1)
|
|
17
14
|
}
|
|
18
15
|
};
|
|
19
16
|
};
|
|
20
17
|
|
|
21
18
|
export default function ListItemText(props) {
|
|
22
19
|
const {
|
|
23
|
-
|
|
24
|
-
secondary,
|
|
20
|
+
children,
|
|
25
21
|
style,
|
|
26
22
|
...otherProps
|
|
27
23
|
} = props;
|
|
24
|
+
const theme = useTheme();
|
|
28
25
|
const styles = useStyles();
|
|
29
|
-
const
|
|
26
|
+
const fontStyle = createFontStyle(theme, {
|
|
27
|
+
selector: _ => typographyOf({
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
lineHeight: 19.2,
|
|
30
|
+
fontFamily: 'PretendardStd-Medium',
|
|
31
|
+
letterSpacing: 0
|
|
32
|
+
}),
|
|
33
|
+
color: theme.palette.text.strong
|
|
34
|
+
});
|
|
30
35
|
return /*#__PURE__*/React.createElement(Column, _extends({
|
|
31
36
|
style: css([styles.root, style])
|
|
32
|
-
}, otherProps),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
variant: 'body3',
|
|
36
|
-
style: isMultiline ? styles.multiline : undefined
|
|
37
|
-
}) : null, secondary ? /*#__PURE__*/React.createElement(Typography, {
|
|
38
|
-
children: secondary,
|
|
39
|
-
color: 'strong',
|
|
40
|
-
variant: 'body3'
|
|
41
|
-
}) : null);
|
|
37
|
+
}, otherProps), /*#__PURE__*/React.createElement(Text, {
|
|
38
|
+
style: fontStyle
|
|
39
|
+
}, children));
|
|
42
40
|
}
|
|
43
41
|
;
|
|
44
42
|
//# sourceMappingURL=ListItemText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Column","
|
|
1
|
+
{"version":3,"names":["React","Text","typographyOf","Column","createFontStyle","css","useTheme","useStyles","root","flexGrow","flexShrink","ListItemText","props","children","style","otherProps","theme","styles","fontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","palette","text","strong"],"sources":["ListItemText.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport Column from '../Column';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport type ListItemTextProps from './ListItemTextProps';\n\ntype ListItemTextStyles = NamedStylesStringUnion<'root'>;\n\nconst useStyles: UseStyles<ListItemTextStyles> = function (): ListItemTextStyles {\n return {\n root: {\n flexGrow: 1,\n flexShrink: 1,\n },\n };\n};\n\nexport default function ListItemText(props: ListItemTextProps) {\n const {\n children,\n style,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const fontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'PretendardStd-Medium',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n });\n\n return (\n <Column\n style={css([\n styles.root,\n style,\n ])}\n {...otherProps}\n >\n <Text style={fontStyle}>\n {children}\n </Text>\n </Column>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;;AAKA,MAAMC,SAAwC,GAAG,YAAgC;EAC7E,OAAO;IACHC,IAAI,EAAE;MACFC,QAAQ,EAAE,CADR;MAEFC,UAAU,EAAE;IAFV;EADH,CAAP;AAMH,CAPD;;AASA,eAAe,SAASC,YAAT,CAAsBC,KAAtB,EAAgD;EAC3D,MAAM;IACFC,QADE;IAEFC,KAFE;IAGF,GAAGC;EAHD,IAIFH,KAJJ;EAMA,MAAMI,KAAK,GAAGV,QAAQ,EAAtB;EAEA,MAAMW,MAAM,GAAGV,SAAS,EAAxB;EAEA,MAAMW,SAAS,GAAGd,eAAe,CAACY,KAAD,EAAQ;IACrCG,QAAQ,EAAGC,CAAD,IAAOlB,YAAY,CAAC;MAC1BmB,QAAQ,EAAE,EADgB;MAE1BC,UAAU,EAAE,IAFc;MAG1BC,UAAU,EAAE,sBAHc;MAI1BC,aAAa,EAAE;IAJW,CAAD,CADQ;IAOrCC,KAAK,EAAET,KAAK,CAACU,OAAN,CAAcC,IAAd,CAAmBC;EAPW,CAAR,CAAjC;EAUA,oBACI,oBAAC,MAAD;IACI,KAAK,EAAEvB,GAAG,CAAC,CACPY,MAAM,CAACT,IADA,EAEPM,KAFO,CAAD;EADd,GAKQC,UALR,gBAOI,oBAAC,IAAD;IAAM,KAAK,EAAEG;EAAb,GACKL,QADL,CAPJ,CADJ;AAaH;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ListItemTextProps.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"names":[],"sources":["ListItemTextProps.ts"],"sourcesContent":["import type { OverridableComponentProps } from '../types';\nimport type { ColumnProps } from '../Column';\n\nexport default interface ListItemTextProps extends OverridableComponentProps<ColumnProps, {\n /**\n * The main content element.\n */\n children: string;\n}> {}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","Row","Typography","EdgeInsets","ListSubheader","props","children","disableTypography","otherProps","accessibilityRole","OS","undefined","horizontal"],"sources":["ListSubheader.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport Row from '../Row';\nimport Typography from '../Typography';\nimport { EdgeInsets } from '../styles';\nimport type ListSubheaderProps from './ListSubheaderProps';\n\nexport default function ListSubheader(props: ListSubheaderProps) {\n const {\n children,\n disableTypography = false,\n ...otherProps\n } = props;\n\n const accessibilityRole = Platform.OS === 'web' ? 'listitem' : undefined;\n\n return (\n <Row\n // @ts-ignore\n accessibilityRole={accessibilityRole}\n insets={EdgeInsets.horizontal(4)}\n {...otherProps}\n >\n {disableTypography ? (\n children\n ) : (\n <Typography\n children={children}\n color={'strong'}\n variant={'
|
|
1
|
+
{"version":3,"names":["React","Platform","Row","Typography","EdgeInsets","ListSubheader","props","children","disableTypography","otherProps","accessibilityRole","OS","undefined","horizontal"],"sources":["ListSubheader.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform } from 'react-native';\nimport Row from '../Row';\nimport Typography from '../Typography';\nimport { EdgeInsets } from '../styles';\nimport type ListSubheaderProps from './ListSubheaderProps';\n\nexport default function ListSubheader(props: ListSubheaderProps) {\n const {\n children,\n disableTypography = false,\n ...otherProps\n } = props;\n\n const accessibilityRole = Platform.OS === 'web' ? 'listitem' : undefined;\n\n return (\n <Row\n // @ts-ignore\n accessibilityRole={accessibilityRole}\n insets={EdgeInsets.horizontal(4)}\n {...otherProps}\n >\n {disableTypography ? (\n children\n ) : (\n <Typography\n children={children}\n color={'strong'}\n variant={'caption2'}\n />\n )}\n </Row>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,QAAT,QAAyB,cAAzB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,UAAT,QAA2B,WAA3B;AAGA,eAAe,SAASC,aAAT,CAAuBC,KAAvB,EAAkD;EAC7D,MAAM;IACFC,QADE;IAEFC,iBAAiB,GAAG,KAFlB;IAGF,GAAGC;EAHD,IAIFH,KAJJ;EAMA,MAAMI,iBAAiB,GAAGT,QAAQ,CAACU,EAAT,KAAgB,KAAhB,GAAwB,UAAxB,GAAqCC,SAA/D;EAEA,oBACI,oBAAC,GAAD,CACI;EADJ;IAEI,iBAAiB,EAAEF,iBAFvB;IAGI,MAAM,EAAEN,UAAU,CAACS,UAAX,CAAsB,CAAtB;EAHZ,GAIQJ,UAJR,GAMKD,iBAAiB,GACdD,QADc,gBAGd,oBAAC,UAAD;IACI,QAAQ,EAAEA,QADd;IAEI,KAAK,EAAE,QAFX;IAGI,OAAO,EAAE;EAHb,EATR,CADJ;AAkBH;AAAA"}
|
|
@@ -32,7 +32,7 @@ export default function NumberPagination(props) {
|
|
|
32
32
|
const typography = typographyOf({
|
|
33
33
|
fontSize: 9.5,
|
|
34
34
|
lineHeight: 11.4,
|
|
35
|
-
fontFamily: '
|
|
35
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
36
36
|
letterSpacing: -0.19
|
|
37
37
|
});
|
|
38
38
|
const currentFontStyle = createFontStyle(theme, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","commonColors","typographyOf","Divider","Row","createFontStyle","useTheme","useStyles","theme","root","backgroundColor","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: '
|
|
1
|
+
{"version":3,"names":["React","Text","commonColors","typographyOf","Divider","Row","createFontStyle","useTheme","useStyles","theme","root","backgroundColor","static","weakOpacity","borderRadius","shape","radius","full","paddingHorizontal","spacing","paddingVertical","divider","alignSelf","borderColor","weakOpacityInverse","height","NumberPagination","props","currentPage","maxPage","styles","typography","fontSize","lineHeight","fontFamily","letterSpacing","currentFontStyle","selector","_","color","strongInverse","countFontStyle","baseOpacityInverse"],"sources":["NumberPagination.tsx"],"sourcesContent":["import React from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { commonColors, typographyOf } from '@fountain-ui/styles';\nimport Divider from '../Divider';\nimport Row from '../Row';\nimport { createFontStyle, useTheme } from '../styles';\nimport type PaginationProps from './PaginationProps';\n\ntype NumberPaginationStyles = NamedStylesStringUnion<'root' | 'divider'>;\n\nconst useStyles: UseStyles<NumberPaginationStyles> = function (): NumberPaginationStyles {\n const theme = useTheme();\n\n return {\n root: {\n backgroundColor: commonColors.static.weakOpacity,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(1.25),\n paddingVertical: theme.spacing(0.5),\n },\n divider: {\n alignSelf: 'center',\n borderColor: commonColors.static.weakOpacityInverse,\n height: 6,\n },\n };\n};\n\ninterface NumberPaginationProps {\n currentPage: PaginationProps['page'];\n maxPage: PaginationProps['count'];\n}\n\nexport default function NumberPagination(props: NumberPaginationProps) {\n const {\n currentPage,\n maxPage,\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const typography = typographyOf({\n fontSize: 9.5,\n lineHeight: 11.4,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: -0.19,\n });\n\n const currentFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.strongInverse,\n });\n\n const countFontStyle = createFontStyle(theme, {\n selector: (_) => typography,\n color: commonColors.static.baseOpacityInverse,\n });\n\n return (\n <Row style={styles.root}>\n <Text style={currentFontStyle}>\n {currentPage + 1}\n </Text>\n\n <Divider\n style={styles.divider}\n vertical={true}\n />\n\n <Text style={countFontStyle}>\n {maxPage}\n </Text>\n </Row>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,YAAT,EAAuBC,YAAvB,QAA2C,qBAA3C;AACA,OAAOC,OAAP,MAAoB,YAApB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;;AAKA,MAAMC,SAA4C,GAAG,YAAoC;EACrF,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE;MACFC,eAAe,EAAET,YAAY,CAACU,MAAb,CAAoBC,WADnC;MAEFC,YAAY,EAAEL,KAAK,CAACM,KAAN,CAAYC,MAAZ,CAAmBC,IAF/B;MAGFC,iBAAiB,EAAET,KAAK,CAACU,OAAN,CAAc,IAAd,CAHjB;MAIFC,eAAe,EAAEX,KAAK,CAACU,OAAN,CAAc,GAAd;IAJf,CADH;IAOHE,OAAO,EAAE;MACLC,SAAS,EAAE,QADN;MAELC,WAAW,EAAErB,YAAY,CAACU,MAAb,CAAoBY,kBAF5B;MAGLC,MAAM,EAAE;IAHH;EAPN,CAAP;AAaH,CAhBD;;AAuBA,eAAe,SAASC,gBAAT,CAA0BC,KAA1B,EAAwD;EACnE,MAAM;IACFC,WADE;IAEFC;EAFE,IAGFF,KAHJ;EAKA,MAAMG,MAAM,GAAGtB,SAAS,EAAxB;EAEA,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMwB,UAAU,GAAG5B,YAAY,CAAC;IAC5B6B,QAAQ,EAAE,GADkB;IAE5BC,UAAU,EAAE,IAFgB;IAG5BC,UAAU,EAAE,wBAHgB;IAI5BC,aAAa,EAAE,CAAC;EAJY,CAAD,CAA/B;EAOA,MAAMC,gBAAgB,GAAG9B,eAAe,CAACG,KAAD,EAAQ;IAC5C4B,QAAQ,EAAGC,CAAD,IAAOP,UAD2B;IAE5CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB4B;EAFiB,CAAR,CAAxC;EAKA,MAAMC,cAAc,GAAGnC,eAAe,CAACG,KAAD,EAAQ;IAC1C4B,QAAQ,EAAGC,CAAD,IAAOP,UADyB;IAE1CQ,KAAK,EAAErC,YAAY,CAACU,MAAb,CAAoB8B;EAFe,CAAR,CAAtC;EAKA,oBACI,oBAAC,GAAD;IAAK,KAAK,EAAEZ,MAAM,CAACpB;EAAnB,gBACI,oBAAC,IAAD;IAAM,KAAK,EAAE0B;EAAb,GACKR,WAAW,GAAG,CADnB,CADJ,eAKI,oBAAC,OAAD;IACI,KAAK,EAAEE,MAAM,CAACT,OADlB;IAEI,QAAQ,EAAE;EAFd,EALJ,eAUI,oBAAC,IAAD;IAAM,KAAK,EAAEoB;EAAb,GACKZ,OADL,CAVJ,CADJ;AAgBH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Pagination';\nexport type { default as PaginationProps } from './PaginationProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,cAAxB"}
|
|
1
|
+
{"version":3,"names":["default","paginationVariants"],"sources":["index.ts"],"sourcesContent":["export { default } from './Pagination';\nexport type { default as PaginationProps } from './PaginationProps';\nexport { paginationVariants } from './PaginationProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,cAAxB;AAEA,SAASC,kBAAT,QAAmC,mBAAnC"}
|
|
@@ -8,6 +8,7 @@ import Row from '../Row';
|
|
|
8
8
|
import { createFontStyle, css, useTheme } from '../styles';
|
|
9
9
|
import { cloneElementSafely } from '../utils';
|
|
10
10
|
import { RadioContext } from '../RadioGroup/RadioContextProvider';
|
|
11
|
+
const DEFAULT_START_ICON_SIZE = 21;
|
|
11
12
|
|
|
12
13
|
const useStyles = function () {
|
|
13
14
|
const theme = useTheme();
|
|
@@ -56,11 +57,13 @@ export default function Radio(props) {
|
|
|
56
57
|
const checkedIcon = checkIconProp ?? defaultCheckedIcon;
|
|
57
58
|
const icon = isChecked ? checkedIcon : null;
|
|
58
59
|
const startIcon = cloneElementSafely(startIconProp, {
|
|
59
|
-
color: 'strong'
|
|
60
|
+
color: 'strong',
|
|
61
|
+
height: DEFAULT_START_ICON_SIZE,
|
|
62
|
+
width: DEFAULT_START_ICON_SIZE
|
|
60
63
|
});
|
|
61
64
|
const rootStyle = css([styles.root, style]);
|
|
62
65
|
const fontStyle = createFontStyle(theme, {
|
|
63
|
-
|
|
66
|
+
selector: typography => typography.body1.regular,
|
|
64
67
|
color: theme.palette.text.strong
|
|
65
68
|
});
|
|
66
69
|
return /*#__PURE__*/React.createElement(ButtonBase, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useContext","Text","ButtonBase","Check","CheckedIcon","Row","createFontStyle","css","useTheme","cloneElementSafely","RadioContext","useStyles","theme","root","alignItems","flexDirection","gap","spacing","justifyContent","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","handlePress","isChecked","defaultCheckedIcon","icon","color","rootStyle","fontStyle","palette","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: theme.spacing(8),\n justifyContent: 'space-between',\n },\n content: {\n gap: theme.spacing(2),\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, {
|
|
1
|
+
{"version":3,"names":["React","useContext","Text","ButtonBase","Check","CheckedIcon","Row","createFontStyle","css","useTheme","cloneElementSafely","RadioContext","DEFAULT_START_ICON_SIZE","useStyles","theme","root","alignItems","flexDirection","gap","spacing","justifyContent","content","minHeight","Radio","props","checked","children","checkedIcon","checkIconProp","disabled","onChange","onChangeProp","startIcon","startIconProp","style","value","otherProps","styles","context","handlePress","isChecked","defaultCheckedIcon","icon","color","height","width","rootStyle","fontStyle","selector","typography","body1","regular","palette","text","strong"],"sources":["Radio.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport { Text } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport ButtonBase from '../ButtonBase';\nimport { Check as CheckedIcon } from '../internal';\nimport Row from '../Row';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport { cloneElementSafely } from '../utils';\nimport { RadioContext } from '../RadioGroup/RadioContextProvider';\nimport type RadioProps from './RadioProps';\n\nconst DEFAULT_START_ICON_SIZE = 21;\n\ntype RadioStyles = NamedStylesStringUnion<'root' | 'content'>;\n\nconst useStyles: UseStyles<RadioStyles> = function (): RadioStyles {\n const theme = useTheme();\n\n return {\n root: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: theme.spacing(8),\n justifyContent: 'space-between',\n },\n content: {\n gap: theme.spacing(2),\n minHeight: 20,\n },\n };\n};\n\nexport default function Radio(props: RadioProps) {\n const {\n checked = false,\n children,\n checkedIcon: checkIconProp,\n disabled = false,\n onChange: onChangeProp,\n startIcon: startIconProp,\n style,\n value,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const styles = useStyles();\n\n const context = useContext(RadioContext);\n\n const handlePress = () => {\n const onChange = context?.onChange ?? onChangeProp;\n if (onChange) {\n onChange(value);\n }\n };\n\n const isChecked = context?.value === value ?? checked;\n\n const defaultCheckedIcon = (\n <CheckedIcon color={'accent'}/>\n );\n\n const checkedIcon = checkIconProp ?? defaultCheckedIcon;\n const icon = isChecked ? checkedIcon : null;\n\n const startIcon = cloneElementSafely(startIconProp, {\n color: 'strong',\n height: DEFAULT_START_ICON_SIZE,\n width: DEFAULT_START_ICON_SIZE,\n });\n\n const rootStyle = css([\n styles.root,\n style,\n ]);\n\n const fontStyle = createFontStyle(theme, {\n selector: (typography) => typography.body1.regular,\n color: theme.palette.text.strong,\n });\n\n return (\n <ButtonBase\n disabled={disabled}\n onPress={handlePress}\n style={rootStyle}\n {...otherProps}\n >\n <Row\n alignItems={'center'}\n style={styles.content}\n >\n {startIcon}\n\n <Text\n children={children}\n style={fontStyle}\n />\n </Row>\n\n {icon}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,UAAhB,QAAkC,OAAlC;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,OAAOC,UAAP,MAAuB,eAAvB;AACA,SAASC,KAAK,IAAIC,WAAlB,QAAqC,aAArC;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,SAASC,kBAAT,QAAmC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E;EAApB,EADJ;EAIA,MAAMd,WAAW,GAAGC,aAAa,IAAIa,kBAArC;EACA,MAAMC,IAAI,GAAGF,SAAS,GAAGb,WAAH,GAAiB,IAAvC;EAEA,MAAMK,SAAS,GAAGtB,kBAAkB,CAACuB,aAAD,EAAgB;IAChDU,KAAK,EAAE,QADyC;IAEhDC,MAAM,EAAEhC,uBAFwC;IAGhDiC,KAAK,EAAEjC;EAHyC,CAAhB,CAApC;EAMA,MAAMkC,SAAS,GAAGtC,GAAG,CAAC,CAClB6B,MAAM,CAACtB,IADW,EAElBmB,KAFkB,CAAD,CAArB;EAKA,MAAMa,SAAS,GAAGxC,eAAe,CAACO,KAAD,EAAQ;IACrCkC,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,KAAX,CAAiBC,OADN;IAErCR,KAAK,EAAE7B,KAAK,CAACsC,OAAN,CAAcC,IAAd,CAAmBC;EAFW,CAAR,CAAjC;EAKA,oBACI,oBAAC,UAAD;IACI,QAAQ,EAAEzB,QADd;IAEI,OAAO,EAAEU,WAFb;IAGI,KAAK,EAAEO;EAHX,GAIQV,UAJR,gBAMI,oBAAC,GAAD;IACI,UAAU,EAAE,QADhB;IAEI,KAAK,EAAEC,MAAM,CAAChB;EAFlB,GAIKW,SAJL,eAMI,oBAAC,IAAD;IACI,QAAQ,EAAEN,QADd;IAEI,KAAK,EAAEqB;EAFX,EANJ,CANJ,EAkBKL,IAlBL,CADJ;AAsBH;AAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useContentContainerStyle } from '../hooks';
|
|
4
|
+
import { css } from '../styles';
|
|
5
|
+
export default function Section(props) {
|
|
6
|
+
const {
|
|
7
|
+
children,
|
|
8
|
+
maxWidth,
|
|
9
|
+
style: styleProp
|
|
10
|
+
} = props;
|
|
11
|
+
const styles = useContentContainerStyle({
|
|
12
|
+
maxWidth
|
|
13
|
+
});
|
|
14
|
+
const rootStyle = css([styles, styleProp]);
|
|
15
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
16
|
+
style: rootStyle
|
|
17
|
+
}, children);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=Section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","useContentContainerStyle","css","Section","props","children","maxWidth","style","styleProp","styles","rootStyle"],"sources":["Section.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport { useContentContainerStyle } from '../hooks';\nimport { css } from '../styles';\nimport type SectionProps from './SectionProps';\n\nexport default function Section(props: SectionProps) {\n const {\n children,\n maxWidth,\n style: styleProp,\n } = props;\n\n const styles = useContentContainerStyle({ maxWidth });\n\n const rootStyle = css([\n styles,\n styleProp,\n ]);\n\n return (\n <View style={rootStyle}>\n {children}\n </View>\n );\n}\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AACA,SAASC,wBAAT,QAAyC,UAAzC;AACA,SAASC,GAAT,QAAoB,WAApB;AAGA,eAAe,SAASC,OAAT,CAAiBC,KAAjB,EAAsC;EACjD,MAAM;IACFC,QADE;IAEFC,QAFE;IAGFC,KAAK,EAAEC;EAHL,IAIFJ,KAJJ;EAMA,MAAMK,MAAM,GAAGR,wBAAwB,CAAC;IAAEK;EAAF,CAAD,CAAvC;EAEA,MAAMI,SAAS,GAAGR,GAAG,CAAC,CAClBO,MADkB,EAElBD,SAFkB,CAAD,CAArB;EAKA,oBACI,oBAAC,IAAD;IAAM,KAAK,EAAEE;EAAb,GACKL,QADL,CADJ;AAKH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["SectionProps.ts"],"sourcesContent":["import type { ViewProps } from 'react-native';\nimport type { OverridableComponentProps } from '../types';\n\nexport default interface SectionProps extends OverridableComponentProps<ViewProps, {\n maxWidth?: number;\n}> {}\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Section';\nexport type { default as SectionProps } from './SectionProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB"}
|
|
@@ -17,6 +17,8 @@ export default function ShadowView(props) {
|
|
|
17
17
|
const {
|
|
18
18
|
borderRadius,
|
|
19
19
|
height,
|
|
20
|
+
maxHeight,
|
|
21
|
+
maxWidth,
|
|
20
22
|
width
|
|
21
23
|
} = styleProp;
|
|
22
24
|
return nativeShadows.reduce((accumulator, nativeShadow) => {
|
|
@@ -25,6 +27,8 @@ export default function ShadowView(props) {
|
|
|
25
27
|
}, {
|
|
26
28
|
borderRadius: borderRadius ?? 0,
|
|
27
29
|
height,
|
|
30
|
+
maxHeight,
|
|
31
|
+
maxWidth,
|
|
28
32
|
width
|
|
29
33
|
}])
|
|
30
34
|
}, accumulator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","css","useTheme","ShadowView","props","children","style","styleProp","variant","otherProps","theme","nativeShadows","shadow","borderRadius","height","width","reduce","accumulator","nativeShadow"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AAGA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAGR,QAAQ,EAAtB;EAEA,MAAM;IAAES;EAAF,IAAoBD,KAAK,CAACE,MAAN,CAAaJ,OAAb,CAA1B;EAEA,MAAM;IACFK,YADE;IAEFC,MAFE;IAGFC;
|
|
1
|
+
{"version":3,"names":["React","View","css","useTheme","ShadowView","props","children","style","styleProp","variant","otherProps","theme","nativeShadows","shadow","borderRadius","height","maxHeight","maxWidth","width","reduce","accumulator","nativeShadow"],"sources":["ShadowView.native.tsx"],"sourcesContent":["import React from 'react';\nimport { View } from 'react-native';\nimport type { FountainUiStyle, ShadowVariant } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type ShadowViewProps from './ShadowViewProps';\n\nexport default function ShadowView(props: ShadowViewProps) {\n const {\n children,\n style: styleProp = {},\n variant = 100 as ShadowVariant,\n ...otherProps\n } = props;\n\n const theme = useTheme();\n\n const { nativeShadows } = theme.shadow[variant];\n\n const {\n borderRadius,\n height,\n maxHeight,\n maxWidth,\n width,\n } = styleProp as FountainUiStyle;\n\n return nativeShadows.reduce((accumulator, nativeShadow) => {\n return (\n <View\n style={css([\n { ...nativeShadow },\n {\n borderRadius: borderRadius ?? 0,\n height,\n maxHeight,\n maxWidth,\n width,\n },\n ])}\n >\n {accumulator}\n </View>\n );\n }, (\n <View\n style={styleProp}\n {...otherProps}\n >\n {children}\n </View>\n ));\n}\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,SAASC,GAAT,EAAcC,QAAd,QAA8B,WAA9B;AAGA,eAAe,SAASC,UAAT,CAAoBC,KAApB,EAA4C;EACvD,MAAM;IACFC,QADE;IAEFC,KAAK,EAAEC,SAAS,GAAG,EAFjB;IAGFC,OAAO,GAAG,GAHR;IAIF,GAAGC;EAJD,IAKFL,KALJ;EAOA,MAAMM,KAAK,GAAGR,QAAQ,EAAtB;EAEA,MAAM;IAAES;EAAF,IAAoBD,KAAK,CAACE,MAAN,CAAaJ,OAAb,CAA1B;EAEA,MAAM;IACFK,YADE;IAEFC,MAFE;IAGFC,SAHE;IAIFC,QAJE;IAKFC;EALE,IAMFV,SANJ;EAQA,OAAOI,aAAa,CAACO,MAAd,CAAqB,CAACC,WAAD,EAAcC,YAAd,KAA+B;IACvD,oBACI,oBAAC,IAAD;MACI,KAAK,EAAEnB,GAAG,CAAC,CACP,EAAE,GAAGmB;MAAL,CADO,EAEP;QACIP,YAAY,EAAEA,YAAY,IAAI,CADlC;QAEIC,MAFJ;QAGIC,SAHJ;QAIIC,QAJJ;QAKIC;MALJ,CAFO,CAAD;IADd,GAYKE,WAZL,CADJ;EAgBH,CAjBM,eAkBH,oBAAC,IAAD;IACI,KAAK,EAAEZ;EADX,GAEQE,UAFR,GAIKJ,QAJL,CAlBG,CAAP;AAyBH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,YAAxB"}
|
|
1
|
+
{"version":3,"names":["default","snackbarStatus"],"sources":["index.ts"],"sourcesContent":["export { default } from './Snackbar';\nexport type { default as SnackbarProps } from './SnackbarProps';\nexport { snackbarStatus } from './SnackbarProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,YAAxB;AAEA,SAASC,cAAT,QAA+B,iBAA/B"}
|
|
@@ -26,6 +26,14 @@ const useStyles = function () {
|
|
|
26
26
|
},
|
|
27
27
|
actionButton: {
|
|
28
28
|
marginLeft: theme.spacing(6)
|
|
29
|
+
},
|
|
30
|
+
actionLabel: {
|
|
31
|
+
paddingBottom: theme.spacing(1.5),
|
|
32
|
+
paddingTop: theme.spacing(1.25)
|
|
33
|
+
},
|
|
34
|
+
actionElement: {
|
|
35
|
+
paddingLeft: theme.spacing(2),
|
|
36
|
+
paddingVertical: theme.spacing(1.25)
|
|
29
37
|
}
|
|
30
38
|
};
|
|
31
39
|
};
|
|
@@ -45,18 +53,23 @@ export default function SnackbarContent(props) {
|
|
|
45
53
|
const theme = useTheme();
|
|
46
54
|
const titleFontStyle = createFontStyle(theme, {
|
|
47
55
|
selector: _ => typographyOf({
|
|
48
|
-
fontSize:
|
|
49
|
-
lineHeight:
|
|
50
|
-
fontFamily: '
|
|
56
|
+
fontSize: 15,
|
|
57
|
+
lineHeight: 19.5,
|
|
58
|
+
fontFamily: 'PretendardStd-SemiBold',
|
|
51
59
|
letterSpacing: 0
|
|
52
60
|
}),
|
|
53
61
|
color: theme.palette.text.strongInverse
|
|
54
62
|
});
|
|
55
63
|
const messageFontStyle = createFontStyle(theme, {
|
|
56
|
-
selector: _ => typographyOf({
|
|
57
|
-
fontSize:
|
|
58
|
-
lineHeight:
|
|
59
|
-
fontFamily: '
|
|
64
|
+
selector: _ => title ? typographyOf({
|
|
65
|
+
fontSize: 12,
|
|
66
|
+
lineHeight: 15.6,
|
|
67
|
+
fontFamily: 'PretendardStd-Regular',
|
|
68
|
+
letterSpacing: 0
|
|
69
|
+
}) : typographyOf({
|
|
70
|
+
fontSize: 14,
|
|
71
|
+
lineHeight: 18.2,
|
|
72
|
+
fontFamily: 'PretendardStd-Regular',
|
|
60
73
|
letterSpacing: 0
|
|
61
74
|
}),
|
|
62
75
|
color: theme.palette.text.strongInverse
|
|
@@ -68,9 +81,7 @@ export default function SnackbarContent(props) {
|
|
|
68
81
|
fontFamily: 'LexendDeca-SemiBold',
|
|
69
82
|
letterSpacing: -0.26
|
|
70
83
|
}),
|
|
71
|
-
color:
|
|
72
|
-
// color: theme.palette.text.accent,
|
|
73
|
-
|
|
84
|
+
color: theme.palette.text.accent
|
|
74
85
|
});
|
|
75
86
|
const hasActionButton = !!(actionContent && onPress);
|
|
76
87
|
const rootStyle = css([styles.root, startIcon ? {
|
|
@@ -98,10 +109,14 @@ export default function SnackbarContent(props) {
|
|
|
98
109
|
flex: 1
|
|
99
110
|
}), /*#__PURE__*/React.createElement(View, {
|
|
100
111
|
style: styles.actionButton
|
|
101
|
-
}, typeof actionContent === 'string' ? /*#__PURE__*/React.createElement(
|
|
112
|
+
}, typeof actionContent === 'string' ? /*#__PURE__*/React.createElement(View, {
|
|
113
|
+
style: styles.actionLabel
|
|
114
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
102
115
|
children: actionContent,
|
|
103
116
|
style: labelFontStyle
|
|
104
|
-
}) :
|
|
117
|
+
})) : /*#__PURE__*/React.createElement(View, {
|
|
118
|
+
style: styles.actionElement
|
|
119
|
+
}, actionContent))) : null);
|
|
105
120
|
}
|
|
106
121
|
;
|
|
107
122
|
//# sourceMappingURL=SnackbarContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","typographyOf","createFontStyle","css","useTheme","ButtonBase","Column","Spacer","Typography","StatusIcon","useStyles","theme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize:
|
|
1
|
+
{"version":3,"names":["React","Text","View","typographyOf","createFontStyle","css","useTheme","ButtonBase","Column","Spacer","Typography","StatusIcon","useStyles","theme","root","flexDirection","alignItems","alignSelf","backgroundColor","palette","surface","accent","borderRadius","maxWidth","paddingBottom","spacing","paddingHorizontal","paddingTop","actionButton","marginLeft","actionLabel","actionElement","paddingLeft","paddingVertical","SnackbarContent","props","actionContent","message","title","onPress","style","styleProp","status","startIcon","otherProps","styles","titleFontStyle","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","messageFontStyle","labelFontStyle","hasActionButton","rootStyle","shape","radius","xl","undefined","width"],"sources":["SnackbarContent.tsx"],"sourcesContent":["import React from 'react';\nimport { Text, View } from 'react-native';\nimport { typographyOf } from '@fountain-ui/styles';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport { createFontStyle, css, useTheme } from '../styles';\nimport ButtonBase from '../ButtonBase/ButtonBase';\nimport Column from '../Column';\nimport Spacer from '../Spacer';\nimport Typography from '../Typography';\nimport type SnackbarContentProps from './SnackbarContentProps';\nimport StatusIcon from './StatusIcon';\n\ntype SnackBarContentStyles = NamedStylesStringUnion<'root' | 'actionButton' | 'actionLabel' | 'actionElement'>;\n\nconst useStyles: UseStyles<SnackBarContentStyles> = function (): SnackBarContentStyles {\n const theme = useTheme();\n\n return {\n root: {\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: 'center',\n backgroundColor: theme.palette.surface.accent,\n borderRadius: 22,\n maxWidth: 400,\n paddingBottom: theme.spacing(2.25),\n paddingHorizontal: theme.spacing(4),\n paddingTop: theme.spacing(2),\n },\n actionButton: {\n marginLeft: theme.spacing(6),\n },\n actionLabel: {\n paddingBottom: theme.spacing(1.5),\n paddingTop: theme.spacing(1.25),\n },\n actionElement: {\n paddingLeft: theme.spacing(2),\n paddingVertical: theme.spacing(1.25),\n },\n };\n};\n\nexport default function SnackbarContent(props: SnackbarContentProps) {\n const {\n actionContent,\n message,\n title,\n onPress,\n style: styleProp,\n status = 'info',\n startIcon,\n ...otherProps\n } = props;\n\n const styles = useStyles();\n\n const theme = useTheme();\n\n const titleFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 19.5,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const messageFontStyle = createFontStyle(theme, {\n selector: (_) => title\n ? typographyOf({\n fontSize: 12,\n lineHeight: 15.6,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n })\n : typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: 'PretendardStd-Regular',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strongInverse,\n });\n\n const labelFontStyle = createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 13,\n lineHeight: 16.25,\n fontFamily: 'LexendDeca-SemiBold',\n letterSpacing: -0.26,\n }),\n color: theme.palette.text.accent,\n });\n\n const hasActionButton = !!(actionContent && onPress);\n\n const rootStyle = css([\n styles.root,\n startIcon ? { borderRadius: theme.shape.radius.xl } : undefined,\n hasActionButton ? { width: '100%' } : undefined,\n styleProp,\n ]);\n\n return (\n <ButtonBase\n disabled={!onPress}\n onPress={onPress}\n style={rootStyle}\n {...otherProps}\n >\n {startIcon ? (\n <React.Fragment>\n {startIcon}\n\n <Spacer size={3}/>\n </React.Fragment>\n ) : status !== 'info' ? (\n <React.Fragment>\n <StatusIcon status={status}/>\n\n <Spacer size={1.5}/>\n </React.Fragment>\n ) : null}\n\n <Column>\n {title ? (\n <Typography\n children={title}\n style={css([titleFontStyle])}\n />\n ) : null}\n\n <Text\n children={message}\n style={css([messageFontStyle])}\n />\n </Column>\n\n {actionContent ? (\n <React.Fragment>\n <Spacer flex={1}/>\n\n <View style={styles.actionButton}>\n {typeof actionContent === 'string' ? (\n <View style={styles.actionLabel}>\n <Text\n children={actionContent}\n style={labelFontStyle}\n />\n </View>\n ) : (\n <View style={styles.actionElement}>\n {actionContent}\n </View>\n )}\n </View>\n </React.Fragment>\n ) : null}\n </ButtonBase>\n );\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AACA,SAASC,YAAT,QAA6B,qBAA7B;AAEA,SAASC,eAAT,EAA0BC,GAA1B,EAA+BC,QAA/B,QAA+C,WAA/C;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAEA,OAAOC,UAAP,MAAuB,cAAvB;;AAIA,MAAMC,SAA2C,GAAG,YAAmC;EACnF,MAAMC,KAAK,GAAGP,QAAQ,EAAtB;EAEA,OAAO;IACHQ,IAAI,EAA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ACI,oBAAC,UAAD;IACI,QAAQ,EAAE,CAACF,OADf;IAEI,OAAO,EAAEA,OAFb;IAGI,KAAK,EAAEoB;EAHX,GAIQf,UAJR,GAMKD,SAAS,gBACN,oBAAC,KAAD,CAAO,QAAP,QACKA,SADL,eAGI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADM,GAMND,MAAM,KAAK,MAAX,gBACA,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,UAAD;IAAY,MAAM,EAAEA;EAApB,EADJ,eAGI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EAHJ,CADA,GAMA,IAlBR,eAoBI,oBAAC,MAAD,QACKJ,KAAK,gBACF,oBAAC,UAAD;IACI,QAAQ,EAAEA,KADd;IAEI,KAAK,EAAEjC,GAAG,CAAC,CAACyC,cAAD,CAAD;EAFd,EADE,GAKF,IANR,eAQI,oBAAC,IAAD;IACI,QAAQ,EAAET,OADd;IAEI,KAAK,EAAEhC,GAAG,CAAC,CAACmD,gBAAD,CAAD;EAFd,EARJ,CApBJ,EAkCKpB,aAAa,gBACV,oBAAC,KAAD,CAAO,QAAP,qBACI,oBAAC,MAAD;IAAQ,IAAI,EAAE;EAAd,EADJ,eAGI,oBAAC,IAAD;IAAM,KAAK,EAAES,MAAM,CAACjB;EAApB,GACK,OAAOQ,aAAP,KAAyB,QAAzB,gBACG,oBAAC,IAAD;IAAM,KAAK,EAAES,MAAM,CAACf;EAApB,gBACI,oBAAC,IAAD;IACI,QAAQ,EAAEM,aADd;IAEI,KAAK,EAAEqB;EAFX,EADJ,CADH,gBAQG,oBAAC,IAAD;IAAM,KAAK,EAAEZ,MAAM,CAACd;EAApB,GACKK,aADL,CATR,CAHJ,CADU,GAmBV,IArDR,CADJ;AAyDH;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export { default } from './SvgIcon';\nexport type { default as SvgIconProps } from './SvgIconProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB"}
|
|
1
|
+
{"version":3,"names":["default","svgIconColors","svgIconSizes"],"sources":["index.ts"],"sourcesContent":["export { default } from './SvgIcon';\nexport type { default as SvgIconProps } from './SvgIconProps';\nexport { svgIconColors, svgIconSizes } from './SvgIconProps';\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,WAAxB;AAEA,SAASC,aAAT,EAAwBC,YAAxB,QAA4C,gBAA5C"}
|
|
@@ -21,7 +21,7 @@ export default function useVariantStyleMap(variant, selected) {
|
|
|
21
21
|
selector: _ => typographyOf({
|
|
22
22
|
fontSize: 14,
|
|
23
23
|
lineHeight: 18.2,
|
|
24
|
-
fontFamily: '
|
|
24
|
+
fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
|
|
25
25
|
letterSpacing: 0
|
|
26
26
|
}),
|
|
27
27
|
color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong
|
|
@@ -41,7 +41,7 @@ export default function useVariantStyleMap(variant, selected) {
|
|
|
41
41
|
selector: _ => typographyOf({
|
|
42
42
|
fontSize: 10,
|
|
43
43
|
lineHeight: 10,
|
|
44
|
-
fontFamily: '
|
|
44
|
+
fontFamily: 'PretendardStd-Medium',
|
|
45
45
|
letterSpacing: -0.1
|
|
46
46
|
}),
|
|
47
47
|
color: selected ? theme.palette.text.strong : theme.palette.text.base
|
|
@@ -58,7 +58,7 @@ export default function useVariantStyleMap(variant, selected) {
|
|
|
58
58
|
selector: _ => typographyOf({
|
|
59
59
|
fontSize: 15,
|
|
60
60
|
lineHeight: 18.75,
|
|
61
|
-
fontFamily: '
|
|
61
|
+
fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',
|
|
62
62
|
letterSpacing: 0
|
|
63
63
|
}),
|
|
64
64
|
color: selected ? theme.palette.text.strong : theme.palette.text.base
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useVariantStyleMap","variant","selected","theme","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","label","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","strong","alignItems","height","justifyContent","paddingTop","width","padding"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TabVariant } from './TabProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n inner?: FountainUiStyle;\n label: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: TabVariant, selected: boolean): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n switch (variant) {\n case 'circular':\n return {\n container: {\n paddingHorizontal: theme.spacing(0.75),\n paddingVertical: theme.spacing(1),\n },\n inner: {\n backgroundColor: selected\n ? theme.palette.fill.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(1.75),\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: '
|
|
1
|
+
{"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useVariantStyleMap","variant","selected","theme","container","paddingHorizontal","spacing","paddingVertical","inner","backgroundColor","palette","fill","base","weaker","borderRadius","shape","radius","full","label","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","text","strongInverse","strong","alignItems","height","justifyContent","paddingTop","width","padding"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TabVariant } from './TabProps';\n\ninterface VariantStyle {\n container: FountainUiStyle;\n inner?: FountainUiStyle;\n label: TextStyle;\n}\n\nexport default function useVariantStyleMap(variant: TabVariant, selected: boolean): VariantStyle {\n const theme = useTheme();\n\n return useMemo<VariantStyle>(() => {\n switch (variant) {\n case 'circular':\n return {\n container: {\n paddingHorizontal: theme.spacing(0.75),\n paddingVertical: theme.spacing(1),\n },\n inner: {\n backgroundColor: selected\n ? theme.palette.fill.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n paddingHorizontal: theme.spacing(4),\n paddingVertical: theme.spacing(1.75),\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 14,\n lineHeight: 18.2,\n fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strongInverse\n : theme.palette.text.strong,\n }),\n };\n case 'bottom-navigation':\n return {\n container: {\n alignItems: 'center',\n height: 49,\n justifyContent: 'flex-start',\n paddingTop: theme.spacing(2.625),\n width: 48,\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 10,\n lineHeight: 10,\n fontFamily: 'PretendardStd-Medium',\n letterSpacing: -0.1,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n case 'default':\n default:\n return {\n container: {\n padding: theme.spacing(2.5),\n },\n label: createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 15,\n lineHeight: 18.75,\n fontFamily: selected ? 'PretendardStd-SemiBold' : 'PretendardStd-Medium',\n letterSpacing: 0,\n }),\n color: selected\n ? theme.palette.text.strong\n : theme.palette.text.base,\n }),\n };\n }\n }, [theme, variant, selected]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AASA,eAAe,SAASC,kBAAT,CAA4BC,OAA5B,EAAiDC,QAAjD,EAAkF;E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AAK,EAAEpB,eAAe,CAACK,KAAD,EAAQ;YAC1BgB,QAAQ,EAAGC,CAAD,IAAOvB,YAAY,CAAC;cAC1BwB,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,EAFc;cAG1BC,UAAU,EAAE,sBAHc;cAI1BC,aAAa,EAAE,CAAC;YAJU,CAAD,CADH;YAO1BC,KAAK,EAAEvB,QAAQ,GACTC,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBE,MADV,GAETzB,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBd;UATC,CAAR;QARnB,CAAP;;MAoBJ,KAAK,SAAL;MACA;QACI,OAAO;UACHR,SAAS,EAAE;YACP8B,OAAO,EAAE/B,KAAK,CAACG,OAAN,CAAc,GAAd;UADF,CADR;UAIHY,KAAK,EAAEpB,eAAe,CAACK,KAAD,EAAQ;YAC1BgB,QAAQ,EAAGC,CAAD,IAAOvB,YAAY,CAAC;cAC1BwB,QAAQ,EAAE,EADgB;cAE1BC,UAAU,EAAE,KAFc;cAG1BC,UAAU,EAAErB,QAAQ,GAAG,wBAAH,GAA8B,sBAHxB;cAI1BsB,aAAa,EAAE;YAJW,CAAD,CADH;YAO1BC,KAAK,EAAEvB,QAAQ,GACTC,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBE,MADV,GAETzB,KAAK,CAACO,OAAN,CAAcgB,IAAd,CAAmBd;UATC,CAAR;QAJnB,CAAP;IAlDR;EAmEH,CApEa,EAoEX,CAACT,KAAD,EAAQF,OAAR,EAAiBC,QAAjB,CApEW,CAAd;AAqEH"}
|
|
@@ -10,6 +10,7 @@ import useTabInnerContentsWidth from './useTabInnerContentsWidth';
|
|
|
10
10
|
import useIndexStore from './useIndexStore';
|
|
11
11
|
import InternalContext from './InternalContext';
|
|
12
12
|
import { isEveryTabCoordinatesDefined } from './utils';
|
|
13
|
+
import useTabsStyle from './useTabsStyle';
|
|
13
14
|
|
|
14
15
|
const useStyles = function () {
|
|
15
16
|
const theme = useTheme();
|
|
@@ -57,6 +58,9 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
|
|
|
57
58
|
const sharedIndex = UNSTABLE_sharedIndex ?? fallbackSharedIndex;
|
|
58
59
|
const realInitialIndex = sharedIndex.initialValue;
|
|
59
60
|
const currentIndexRef = useRef(initialIndex);
|
|
61
|
+
const {
|
|
62
|
+
container: containerStyle
|
|
63
|
+
} = useTabsStyle(variant);
|
|
60
64
|
|
|
61
65
|
const setTab = newIndex => {
|
|
62
66
|
const currentIndex = currentIndexRef.current;
|
|
@@ -171,7 +175,7 @@ const Tabs = /*#__PURE__*/forwardRef(function Tabs(props, ref) {
|
|
|
171
175
|
indexStore
|
|
172
176
|
}
|
|
173
177
|
}, /*#__PURE__*/React.createElement(View, {
|
|
174
|
-
style: css([styles.root, {
|
|
178
|
+
style: css([styles.root, containerStyle, {
|
|
175
179
|
backgroundColor: backgroundColorMap[color]
|
|
176
180
|
}, showDivider ? styles.bottomDivider : undefined, scrollable ? undefined : styles.fixedRoot, style])
|
|
177
181
|
}, scrollable ? /*#__PURE__*/React.createElement(ScrollableTabsView, {
|