@lunit/design-system 2.1.0 → 2.2.3
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/.babelrc.json +1 -1
- package/README.md +22 -21
- package/dist/cjs/components/Alert/index.js +1 -1
- package/dist/cjs/components/Alert/index.js.map +1 -1
- package/dist/cjs/components/Button/index.js +1 -1
- package/dist/cjs/components/Button/index.js.map +1 -1
- package/dist/cjs/components/Checkbox/index.js +1 -1
- package/dist/cjs/components/Checkbox/index.js.map +1 -1
- package/dist/cjs/components/Chip/index.js +1 -1
- package/dist/cjs/components/Chip/index.js.map +1 -1
- package/dist/cjs/components/DataTable/index.js.map +1 -1
- package/dist/cjs/components/DatePicker/index.js.map +1 -1
- package/dist/cjs/components/Dialog/index.js +1 -1
- package/dist/cjs/components/Dialog/index.js.map +1 -1
- package/dist/cjs/components/Dropdown/index.js +1 -1
- package/dist/cjs/components/Dropdown/index.js.map +1 -1
- package/dist/cjs/components/FormLabel/index.js +1 -1
- package/dist/cjs/components/FormLabel/index.js.map +1 -1
- package/dist/cjs/components/Radio/index.js +1 -1
- package/dist/cjs/components/Radio/index.js.map +1 -1
- package/dist/cjs/components/RadioGroup/index.js.map +1 -1
- package/dist/cjs/components/TextField/index.js +1 -1
- package/dist/cjs/components/TextField/index.js.map +1 -1
- package/dist/cjs/components/Toggle/index.js +1 -1
- package/dist/cjs/components/Toggle/index.js.map +1 -1
- package/dist/cjs/components/ToggleButton/index.js +1 -1
- package/dist/cjs/components/ToggleButton/index.js.map +1 -1
- package/dist/cjs/components/Tooltip/index.js.map +1 -1
- package/dist/cjs/components/Typography/index.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/components/Alert/Alert.js +8 -8
- package/dist/components/Alert/Alert.js.map +1 -1
- package/dist/components/Alert/Alert.styled.js +26 -26
- package/dist/components/Alert/Alert.styled.js.map +1 -1
- package/dist/components/Alert/Alert.utils.js +9 -9
- package/dist/components/Alert/Alert.utils.js.map +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Button/Button.js +23 -17
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.styled.js +88 -88
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +9 -9
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -1
- package/dist/components/Button/utils/getHoverStyle.js +1 -1
- package/dist/components/Button/utils/getHoverStyle.js.map +1 -1
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +6 -12
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +9 -9
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Chip/Chip.js +29 -26
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +52 -52
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/Chip/consts.js +5 -5
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/DataTable/DataTable.js +1 -1
- package/dist/components/DataTable/index.js +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/Dialog/Dialog.js +18 -18
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.styled.js +90 -90
- package/dist/components/Dialog/Dialog.styled.js.map +1 -1
- package/dist/components/Dialog/components/DialogAction.js +6 -6
- package/dist/components/Dialog/index.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +23 -21
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.styled.js +85 -86
- package/dist/components/Dropdown/Dropdown.styled.js.map +1 -1
- package/dist/components/Dropdown/DropdownItem.js +14 -14
- package/dist/components/Dropdown/DropdownItem.js.map +1 -1
- package/dist/components/Dropdown/index.js +2 -2
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/FormLabel/FormLabel.js +1 -1
- package/dist/components/FormLabel/FormLabel.styled.js +2 -2
- package/dist/components/FormLabel/FormLabel.styled.js.map +1 -1
- package/dist/components/FormLabel/index.js +1 -1
- package/dist/components/Radio/Radio.js +8 -8
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/RadioGroup/index.js +1 -1
- package/dist/components/TextField/TextField.js +8 -8
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +112 -112
- package/dist/components/TextField/TextField.style.js.map +1 -1
- package/dist/components/TextField/TextFieldIcon.js +2 -2
- package/dist/components/TextField/TextFieldIcon.js.map +1 -1
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/Toast/Toast.js +13 -13
- package/dist/components/Toast/Toast.js.map +1 -1
- package/dist/components/Toast/Toast.styled.js +26 -26
- package/dist/components/Toast/Toast.utils.js +3 -3
- package/dist/components/Toast/Toast.utils.js.map +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/Toggle/Toggle.js +3 -4
- package/dist/components/Toggle/Toggle.js.map +1 -1
- package/dist/components/Toggle/Toggle.styled.js +30 -30
- package/dist/components/Toggle/Toggle.styled.js.map +1 -1
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +6 -6
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.styled.js +20 -20
- package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -1
- package/dist/components/ToggleButton/index.js +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +2 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -1
- package/dist/components/ToggleButtonGroup/index.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.js.map +1 -1
- package/dist/components/Typography/index.js +1 -1
- package/dist/foundation/Elevation/index.js +27 -27
- package/dist/foundation/Elevation/utils.js +1 -1
- package/dist/foundation/Elevation/utils.js.map +1 -1
- package/dist/foundation/Typography/index.js +35 -35
- package/dist/foundation/Typography/index.js.map +1 -1
- package/dist/foundation/Typography/tokens.js +136 -136
- package/dist/foundation/Typography/tokens.js.map +1 -1
- package/dist/foundation/colors/base/blue.js +12 -12
- package/dist/foundation/colors/base/green.js +12 -12
- package/dist/foundation/colors/base/grey.js +28 -28
- package/dist/foundation/colors/base/index.js +11 -11
- package/dist/foundation/colors/base/lunitGreen.js +11 -11
- package/dist/foundation/colors/base/lunitTeal.js +12 -12
- package/dist/foundation/colors/base/magenta.js +12 -12
- package/dist/foundation/colors/base/opacity.js +4 -4
- package/dist/foundation/colors/base/orange.js +12 -12
- package/dist/foundation/colors/base/purple.js +12 -12
- package/dist/foundation/colors/base/red.js +12 -12
- package/dist/foundation/colors/base/yellow.js +12 -12
- package/dist/foundation/colors/index.js +119 -121
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +184 -212
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/foundation/colors/token/core.js +112 -133
- package/dist/foundation/colors/token/core.js.map +1 -1
- package/dist/foundation/colors/token/index.js +2 -2
- package/dist/foundation/index.js +5 -5
- package/dist/index.js +20 -20
- package/dist/theme.js +6 -6
- package/dist/types/components/Alert/Alert.d.ts +2 -2
- package/dist/types/components/Alert/Alert.styled.d.ts +1 -2
- package/dist/types/components/Alert/Alert.types.d.ts +2 -2
- package/dist/types/components/Alert/Alert.utils.d.ts +1 -1
- package/dist/types/components/Alert/index.d.ts +1 -1
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +249 -265
- package/dist/types/components/Button/Button.types.d.ts +16 -16
- package/dist/types/components/Button/index.d.ts +1 -1
- package/dist/types/components/Button/utils/getButtonPaddingBySizeAndKind.d.ts +4 -4
- package/dist/types/components/Button/utils/getHoverStyle.d.ts +2 -1
- package/dist/types/components/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +4 -4
- package/dist/types/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -1
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Chip/Chip.styled.d.ts +6 -79
- package/dist/types/components/Chip/Chip.types.d.ts +15 -14
- package/dist/types/components/Chip/index.d.ts +1 -1
- package/dist/types/components/DataTable/index.d.ts +1 -1
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Dialog/Dialog.d.ts +11 -11
- package/dist/types/components/Dialog/Dialog.styled.d.ts +3 -4
- package/dist/types/components/Dialog/components/DialogAction.d.ts +2 -2
- package/dist/types/components/Dialog/index.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.styled.d.ts +4 -39
- package/dist/types/components/Dropdown/Dropdown.types.d.ts +5 -5
- package/dist/types/components/Dropdown/DropdownItem.d.ts +3 -3
- package/dist/types/components/Dropdown/index.d.ts +3 -3
- package/dist/types/components/FormLabel/FormLabel.d.ts +1 -1
- package/dist/types/components/FormLabel/index.d.ts +1 -1
- package/dist/types/components/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Radio/index.d.ts +1 -1
- package/dist/types/components/RadioGroup/index.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +2 -2
- package/dist/types/components/TextField/TextField.style.d.ts +3 -4
- package/dist/types/components/TextField/TextField.types.d.ts +6 -6
- package/dist/types/components/TextField/TextFieldIcon.d.ts +2 -2
- package/dist/types/components/TextField/index.d.ts +2 -2
- package/dist/types/components/Toast/Toast.d.ts +2 -2
- package/dist/types/components/Toast/Toast.types.d.ts +3 -3
- package/dist/types/components/Toast/Toast.utils.d.ts +1 -1
- package/dist/types/components/Toast/index.d.ts +2 -2
- package/dist/types/components/Toggle/Toggle.d.ts +1 -1
- package/dist/types/components/Toggle/Toggle.styled.d.ts +2 -2
- package/dist/types/components/Toggle/Toggle.types.d.ts +3 -3
- package/dist/types/components/Toggle/index.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -34
- package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +10 -10
- package/dist/types/components/ToggleButton/index.d.ts +1 -1
- package/dist/types/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/dist/types/components/ToggleButtonGroup/index.d.ts +1 -1
- package/dist/types/components/Tooltip/index.d.ts +1 -1
- package/dist/types/components/Typography/Typography.d.ts +6 -6
- package/dist/types/components/Typography/index.d.ts +1 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/foundation/Elevation/index.d.ts +22 -22
- package/dist/types/foundation/Typography/index.d.ts +78 -78
- package/dist/types/foundation/Typography/tokens.d.ts +69 -69
- package/dist/types/foundation/colors/base/index.d.ts +11 -11
- package/dist/types/foundation/colors/index.d.ts +13 -20
- package/dist/types/foundation/colors/token/component.d.ts +1 -1
- package/dist/types/foundation/colors/token/core.d.ts +1 -1
- package/dist/types/foundation/colors/token/index.d.ts +2 -2
- package/dist/types/foundation/colors/types.d.ts +0 -7
- package/dist/types/foundation/index.d.ts +4 -11
- package/dist/types/foundation/spacing.d.ts +1 -1
- package/dist/types/index.d.ts +20 -20
- package/dist/types/theme.d.ts +1 -1
- package/package.json +22 -26
- package/src/components/Alert/Alert.styled.ts +39 -49
- package/src/components/Alert/Alert.tsx +10 -16
- package/src/components/Alert/Alert.types.ts +2 -2
- package/src/components/Alert/Alert.utils.ts +13 -22
- package/src/components/Alert/index.ts +1 -1
- package/src/components/Button/Button.styled.ts +98 -101
- package/src/components/Button/Button.tsx +71 -69
- package/src/components/Button/Button.types.ts +19 -21
- package/src/components/Button/index.ts +1 -1
- package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +13 -13
- package/src/components/Button/utils/getHoverStyle.ts +4 -2
- package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +10 -19
- package/src/components/Checkbox/Checkbox.tsx +13 -25
- package/src/components/Checkbox/index.ts +1 -1
- package/src/components/Chip/Chip.styled.ts +69 -72
- package/src/components/Chip/Chip.tsx +33 -55
- package/src/components/Chip/Chip.types.ts +18 -24
- package/src/components/Chip/consts.ts +5 -5
- package/src/components/Chip/index.ts +1 -1
- package/src/components/DataTable/DataTable.tsx +2 -2
- package/src/components/DataTable/index.ts +1 -1
- package/src/components/DatePicker/DatePicker.tsx +2 -2
- package/src/components/DatePicker/index.ts +1 -1
- package/src/components/Dialog/Dialog.styled.ts +112 -114
- package/src/components/Dialog/Dialog.tsx +41 -46
- package/src/components/Dialog/components/DialogAction.tsx +8 -8
- package/src/components/Dialog/index.ts +3 -3
- package/src/components/Dropdown/Dropdown.styled.tsx +88 -89
- package/src/components/Dropdown/Dropdown.tsx +29 -30
- package/src/components/Dropdown/Dropdown.types.ts +6 -5
- package/src/components/Dropdown/DropdownItem.tsx +18 -29
- package/src/components/Dropdown/index.ts +3 -7
- package/src/components/FormLabel/FormLabel.styled.ts +3 -3
- package/src/components/FormLabel/FormLabel.tsx +3 -3
- package/src/components/FormLabel/index.ts +1 -1
- package/src/components/Radio/Radio.tsx +12 -29
- package/src/components/Radio/index.ts +1 -1
- package/src/components/RadioGroup/index.ts +1 -1
- package/src/components/TextField/TextField.style.ts +123 -132
- package/src/components/TextField/TextField.tsx +50 -62
- package/src/components/TextField/TextField.types.ts +7 -8
- package/src/components/TextField/TextFieldIcon.tsx +4 -7
- package/src/components/TextField/index.ts +2 -2
- package/src/components/Toast/Toast.styled.ts +26 -26
- package/src/components/Toast/Toast.tsx +14 -28
- package/src/components/Toast/Toast.types.ts +3 -8
- package/src/components/Toast/Toast.utils.ts +5 -8
- package/src/components/Toast/index.tsx +2 -2
- package/src/components/Toggle/Toggle.styled.ts +31 -32
- package/src/components/Toggle/Toggle.tsx +5 -11
- package/src/components/Toggle/Toggle.types.ts +3 -3
- package/src/components/Toggle/index.ts +1 -1
- package/src/components/ToggleButton/ToggleButton.styled.ts +47 -49
- package/src/components/ToggleButton/ToggleButton.tsx +91 -97
- package/src/components/ToggleButton/ToggleButton.types.ts +10 -10
- package/src/components/ToggleButton/index.ts +1 -1
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +3 -8
- package/src/components/ToggleButtonGroup/index.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/index.ts +1 -1
- package/src/components/Typography/Typography.tsx +7 -10
- package/src/components/Typography/index.ts +1 -1
- package/src/components/index.ts +2 -2
- package/src/foundation/Elevation/index.ts +27 -27
- package/src/foundation/Elevation/utils.ts +14 -8
- package/src/foundation/Typography/index.ts +58 -57
- package/src/foundation/Typography/tokens.ts +138 -138
- package/src/foundation/colors/base/blue.ts +12 -12
- package/src/foundation/colors/base/green.ts +12 -12
- package/src/foundation/colors/base/grey.ts +28 -28
- package/src/foundation/colors/base/index.ts +11 -11
- package/src/foundation/colors/base/lunitGreen.ts +11 -11
- package/src/foundation/colors/base/lunitTeal.ts +12 -12
- package/src/foundation/colors/base/magenta.ts +12 -12
- package/src/foundation/colors/base/opacity.ts +4 -4
- package/src/foundation/colors/base/orange.ts +12 -12
- package/src/foundation/colors/base/purple.ts +12 -12
- package/src/foundation/colors/base/red.ts +12 -12
- package/src/foundation/colors/base/yellow.ts +12 -12
- package/src/foundation/colors/index.ts +119 -120
- package/src/foundation/colors/token/component.ts +185 -213
- package/src/foundation/colors/token/core.ts +113 -134
- package/src/foundation/colors/token/index.ts +2 -2
- package/src/foundation/colors/types.ts +0 -7
- package/src/foundation/index.ts +8 -8
- package/src/foundation/spacing.ts +1 -1
- package/src/index.ts +20 -20
- package/src/stories/GettingStarted.mdx +9 -15
- package/src/stories/components/Alert/Alert.stories.tsx +39 -46
- package/src/stories/components/Button/BasicButton.stories.tsx +68 -59
- package/src/stories/components/Button/ButtonDocs.mdx +17 -41
- package/src/stories/components/Button/Color.stories.tsx +28 -51
- package/src/stories/components/Button/IconButton.stories.tsx +40 -47
- package/src/stories/components/Button/Kind.stories.tsx +100 -213
- package/src/stories/components/CheckBox/BasicCheckbox.stories.tsx +52 -71
- package/src/stories/components/CheckBox/CheckboxDocs.mdx +6 -6
- package/src/stories/components/Chip/Chip.stories.tsx +75 -75
- package/src/stories/components/Chip/ChipDocs.mdx +12 -13
- package/src/stories/components/DataTable/DataTable.stories.tsx +4 -4
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +4 -4
- package/src/stories/components/Dialog/Dialog.stories.tsx +103 -124
- package/src/stories/components/Dialog/DialogDocs.mdx +7 -13
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +96 -82
- package/src/stories/components/Dropdown/DropdownDocs.mdx +275 -0
- package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +40 -47
- package/src/stories/components/Dropdown/DropdownItem.stories.tsx +113 -98
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +17 -30
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +16 -23
- package/src/stories/components/SelectControl/Toggle.stories.tsx +33 -78
- package/src/stories/components/TextField/BasicTextField.stories.tsx +44 -60
- package/src/stories/components/TextField/TextFieldDocs.mdx +8 -12
- package/src/stories/components/TextField/TextFieldMulti.stories.tsx +39 -58
- package/src/stories/components/TextField/TextFieldSingle.stories.tsx +74 -121
- package/src/stories/components/TextField/TextFieldSize.stories.tsx +35 -56
- package/src/stories/components/Toast/Toast.stories.tsx +39 -49
- package/src/stories/components/ToggleButton/Basic.stories.tsx +237 -235
- package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +10 -14
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +144 -203
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +87 -107
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +4 -4
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +48 -73
- package/src/stories/foundation/Elevation/styled.ts +3 -3
- package/src/stories/foundation/Typography/Typography.mdx +9 -13
- package/src/stories/foundation/Typography/Typography.stories.tsx +25 -41
- package/src/stories/foundation/Typography/TypographyGroup.tsx +14 -25
- package/src/stories/foundation/Typography/const.ts +13 -19
- package/src/stories/foundation/colors/ColorSystem.tsx +42 -40
- package/src/stories/foundation/colors/Colors.stories.tsx +40 -41
- package/src/stories/foundation/colors/Docs.mdx +73 -77
- package/src/stories/foundation/colors/Mui.stories.tsx +6 -8
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +81 -71
- package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +7 -7
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +23 -49
- package/src/stories/foundation/colors/styled.ts +26 -26
- package/src/theme.ts +6 -6
- package/src/types.d.ts +1 -1
- package/tsconfig.build.json +1 -5
- package/tsconfig.json +0 -1
- package/src/stories/components/ToggleButton/Group.stories.tsx +0 -221
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useState } from
|
|
2
|
-
import { StoryFn, Meta } from
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { StoryFn, Meta } from '@storybook/react-webpack5';
|
|
3
3
|
import {
|
|
4
4
|
Alert,
|
|
5
5
|
Box,
|
|
@@ -10,13 +10,9 @@ import {
|
|
|
10
10
|
MenuItem,
|
|
11
11
|
Paper,
|
|
12
12
|
Select,
|
|
13
|
-
TextField,
|
|
14
13
|
Tooltip,
|
|
15
|
-
} from
|
|
16
|
-
import {
|
|
17
|
-
import { AdapterDayjs } from "@mui/x-date-pickers/AdapterDayjs";
|
|
18
|
-
import { Dayjs } from "dayjs";
|
|
19
|
-
import { Container, Title } from "./styled";
|
|
14
|
+
} from '@mui/material';
|
|
15
|
+
import { Container, Title } from './styled';
|
|
20
16
|
|
|
21
17
|
interface ElevationProps {
|
|
22
18
|
surface: string;
|
|
@@ -34,8 +30,6 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
34
30
|
setOpen(true);
|
|
35
31
|
};
|
|
36
32
|
|
|
37
|
-
const [value, setValue] = React.useState<Dayjs | null>(null);
|
|
38
|
-
|
|
39
33
|
if (isBase) {
|
|
40
34
|
return (
|
|
41
35
|
<Box
|
|
@@ -47,9 +41,9 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
47
41
|
<Container>
|
|
48
42
|
<Box
|
|
49
43
|
sx={{
|
|
50
|
-
width:
|
|
51
|
-
height:
|
|
52
|
-
overflow:
|
|
44
|
+
width: '300px',
|
|
45
|
+
height: '100px',
|
|
46
|
+
overflow: 'hidden',
|
|
53
47
|
p: 3,
|
|
54
48
|
}}
|
|
55
49
|
className="elevation1"
|
|
@@ -58,9 +52,9 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
58
52
|
</Box>
|
|
59
53
|
<Box
|
|
60
54
|
sx={{
|
|
61
|
-
width:
|
|
62
|
-
height:
|
|
63
|
-
overflow:
|
|
55
|
+
width: '300px',
|
|
56
|
+
height: '100px',
|
|
57
|
+
overflow: 'hidden',
|
|
64
58
|
p: 3,
|
|
65
59
|
}}
|
|
66
60
|
className="elevation2"
|
|
@@ -68,19 +62,17 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
68
62
|
Level 2
|
|
69
63
|
</Box>
|
|
70
64
|
</Container>
|
|
71
|
-
|
|
72
65
|
<Title>Paper</Title>
|
|
73
66
|
<Container>
|
|
74
67
|
<Paper
|
|
75
68
|
sx={{
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
78
|
-
overflow:
|
|
69
|
+
width: '300px',
|
|
70
|
+
height: '100px',
|
|
71
|
+
overflow: 'hidden',
|
|
79
72
|
p: 3,
|
|
80
73
|
}}
|
|
81
74
|
/>
|
|
82
75
|
</Container>
|
|
83
|
-
|
|
84
76
|
<Title>Dropdown</Title>
|
|
85
77
|
<Container>
|
|
86
78
|
<Select
|
|
@@ -95,58 +87,41 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
95
87
|
<MenuItem value="option3">Option 3</MenuItem>
|
|
96
88
|
</Select>
|
|
97
89
|
</Container>
|
|
98
|
-
|
|
99
|
-
<Title>Date Picker</Title>
|
|
100
|
-
<Container>
|
|
101
|
-
<LocalizationProvider dateAdapter={AdapterDayjs}>
|
|
102
|
-
<DatePicker
|
|
103
|
-
label="Basic example"
|
|
104
|
-
value={value}
|
|
105
|
-
onChange={(newValue) => {
|
|
106
|
-
setValue(newValue);
|
|
107
|
-
}}
|
|
108
|
-
renderInput={(params) => <TextField {...params} />}
|
|
109
|
-
PaperProps={{
|
|
110
|
-
className: surface,
|
|
111
|
-
}}
|
|
112
|
-
/>
|
|
113
|
-
</LocalizationProvider>
|
|
114
|
-
</Container>
|
|
115
|
-
|
|
116
90
|
<Title>Alert</Title>
|
|
117
91
|
<Container>
|
|
118
92
|
<Alert sx={{ flex: 1 }}>
|
|
119
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
neque gravida in fermentum.{" "}
|
|
93
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
94
|
+
incididunt ut labore et dolore magna aliqua. A diam sollicitudin tempor id eu nisl nunc
|
|
95
|
+
mi. Auctor augue mauris augue neque gravida in fermentum.{' '}
|
|
123
96
|
</Alert>
|
|
124
97
|
</Container>
|
|
125
|
-
|
|
126
98
|
<Title>Modal & Popper</Title>
|
|
127
99
|
<Container>
|
|
128
100
|
<Button variant="contained" onClick={handleClickOpen}>
|
|
129
101
|
Open Dialog
|
|
130
102
|
</Button>
|
|
131
103
|
<Dialog
|
|
132
|
-
PaperProps={{
|
|
133
|
-
className: surface,
|
|
134
|
-
}}
|
|
135
104
|
onClose={handleClose}
|
|
136
105
|
open={open}
|
|
106
|
+
slotProps={{
|
|
107
|
+
paper: {
|
|
108
|
+
className: surface,
|
|
109
|
+
},
|
|
110
|
+
}}
|
|
137
111
|
>
|
|
138
112
|
<DialogTitle>Title area</DialogTitle>
|
|
139
113
|
<DialogContent>
|
|
140
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
neque gravida in fermentum.
|
|
114
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
115
|
+
incididunt ut labore et dolore magna aliqua. A diam sollicitudin tempor id eu nisl
|
|
116
|
+
nunc mi. Auctor augue mauris augue neque gravida in fermentum.
|
|
144
117
|
</DialogContent>
|
|
145
118
|
</Dialog>
|
|
146
119
|
<Tooltip
|
|
147
120
|
title="Tooltip"
|
|
148
|
-
PopperProps={{ className: surface }}
|
|
149
121
|
placement="right"
|
|
122
|
+
slotProps={{
|
|
123
|
+
popper: { className: surface },
|
|
124
|
+
}}
|
|
150
125
|
>
|
|
151
126
|
<Button variant="contained">Open Tooltip</Button>
|
|
152
127
|
</Tooltip>
|
|
@@ -155,22 +130,24 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
155
130
|
);
|
|
156
131
|
}
|
|
157
132
|
return (
|
|
158
|
-
<Box sx={{ height:
|
|
133
|
+
<Box sx={{ height: '100vh' }}>
|
|
159
134
|
<Button onClick={handleClickOpen}>Open Dialog</Button>
|
|
160
135
|
<Dialog
|
|
161
136
|
sx={{
|
|
162
|
-
overflow:
|
|
137
|
+
overflow: 'hidden',
|
|
163
138
|
p: 3,
|
|
164
139
|
}}
|
|
165
|
-
PaperProps={{
|
|
166
|
-
className: surface,
|
|
167
|
-
}}
|
|
168
140
|
onClose={handleClose}
|
|
169
141
|
open={open}
|
|
142
|
+
slotProps={{
|
|
143
|
+
paper: {
|
|
144
|
+
className: surface,
|
|
145
|
+
},
|
|
146
|
+
}}
|
|
170
147
|
>
|
|
171
148
|
<DialogTitle>Title area</DialogTitle>
|
|
172
149
|
<DialogContent>
|
|
173
|
-
{
|
|
150
|
+
{' '}
|
|
174
151
|
<Select
|
|
175
152
|
label="Select option"
|
|
176
153
|
value="option1"
|
|
@@ -189,12 +166,12 @@ const Elevation = ({ surface, isBase = false }: ElevationProps) => {
|
|
|
189
166
|
};
|
|
190
167
|
|
|
191
168
|
export default {
|
|
192
|
-
title:
|
|
169
|
+
title: 'Foundation/Elevation',
|
|
193
170
|
component: Elevation,
|
|
194
171
|
argTypes: {
|
|
195
172
|
Paper: {
|
|
196
173
|
table: {
|
|
197
|
-
defaultValue: { summary:
|
|
174
|
+
defaultValue: { summary: 'Elevation 2' },
|
|
198
175
|
},
|
|
199
176
|
control: {
|
|
200
177
|
type: null,
|
|
@@ -202,7 +179,7 @@ export default {
|
|
|
202
179
|
},
|
|
203
180
|
Dropdown: {
|
|
204
181
|
table: {
|
|
205
|
-
defaultValue: { summary:
|
|
182
|
+
defaultValue: { summary: 'Elevation 1' },
|
|
206
183
|
},
|
|
207
184
|
control: {
|
|
208
185
|
type: null,
|
|
@@ -210,7 +187,7 @@ export default {
|
|
|
210
187
|
},
|
|
211
188
|
DatePicker: {
|
|
212
189
|
table: {
|
|
213
|
-
defaultValue: { summary:
|
|
190
|
+
defaultValue: { summary: 'Elevation 2' },
|
|
214
191
|
},
|
|
215
192
|
control: {
|
|
216
193
|
type: null,
|
|
@@ -218,7 +195,7 @@ export default {
|
|
|
218
195
|
},
|
|
219
196
|
Alert: {
|
|
220
197
|
table: {
|
|
221
|
-
defaultValue: { summary:
|
|
198
|
+
defaultValue: { summary: 'Elevation 2' },
|
|
222
199
|
},
|
|
223
200
|
control: {
|
|
224
201
|
type: null,
|
|
@@ -226,7 +203,7 @@ export default {
|
|
|
226
203
|
},
|
|
227
204
|
Dialog: {
|
|
228
205
|
table: {
|
|
229
|
-
defaultValue: { summary:
|
|
206
|
+
defaultValue: { summary: 'Elevation 2' },
|
|
230
207
|
},
|
|
231
208
|
control: {
|
|
232
209
|
type: null,
|
|
@@ -234,7 +211,7 @@ export default {
|
|
|
234
211
|
},
|
|
235
212
|
Tooltip: {
|
|
236
213
|
table: {
|
|
237
|
-
defaultValue: { summary:
|
|
214
|
+
defaultValue: { summary: 'Elevation 1' },
|
|
238
215
|
},
|
|
239
216
|
control: {
|
|
240
217
|
type: null,
|
|
@@ -250,15 +227,13 @@ export default {
|
|
|
250
227
|
},
|
|
251
228
|
} as Meta<typeof Elevation>;
|
|
252
229
|
|
|
253
|
-
const ElevationBase: StoryFn<typeof Elevation> = (
|
|
254
|
-
args
|
|
255
|
-
|
|
256
|
-
) => <Elevation {...args} surface={theme} isBase />;
|
|
230
|
+
const ElevationBase: StoryFn<typeof Elevation> = (args, { globals: { theme } }) => (
|
|
231
|
+
<Elevation {...args} surface={theme} isBase />
|
|
232
|
+
);
|
|
257
233
|
|
|
258
|
-
const ElevationNesed: StoryFn<typeof Elevation> = (
|
|
259
|
-
args
|
|
260
|
-
|
|
261
|
-
) => <Elevation {...args} surface={theme} />;
|
|
234
|
+
const ElevationNesed: StoryFn<typeof Elevation> = (args, { globals: { theme } }) => (
|
|
235
|
+
<Elevation {...args} surface={theme} />
|
|
236
|
+
);
|
|
262
237
|
|
|
263
238
|
export const Base = {
|
|
264
239
|
render: ElevationBase,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { styled, Typography } from '@mui/material';
|
|
2
2
|
|
|
3
|
-
export const Container = styled(
|
|
3
|
+
export const Container = styled('div')(({ theme }) => ({
|
|
4
4
|
marginBottom: theme.spacing(10),
|
|
5
|
-
display:
|
|
5
|
+
display: 'flex',
|
|
6
6
|
gap: theme.spacing(8),
|
|
7
7
|
}));
|
|
8
8
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Meta, Canvas, Story } from
|
|
2
|
-
import * as TypographyStories from
|
|
1
|
+
import { Meta, Canvas, Story } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as TypographyStories from './Typography.stories';
|
|
3
3
|
|
|
4
|
-
import Typography from
|
|
4
|
+
import Typography from '@/components/Typography';
|
|
5
5
|
|
|
6
|
-
import { variants } from
|
|
6
|
+
import { variants } from './const';
|
|
7
7
|
|
|
8
|
-
import TypographyGroup from
|
|
8
|
+
import TypographyGroup from './TypographyGroup';
|
|
9
9
|
|
|
10
10
|
<Meta name="Typography Docs" of={TypographyStories} />
|
|
11
11
|
|
|
@@ -15,25 +15,23 @@ export const Template = (args) => <Typography {...args} />;
|
|
|
15
15
|
|
|
16
16
|
Use typography to present your design and content as clearly and efficiently as possible.
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
## Usage
|
|
20
19
|
|
|
21
20
|
### Basic Typography
|
|
22
21
|
|
|
23
22
|
```tsx
|
|
24
|
-
import { Typography } from
|
|
23
|
+
import { Typography } from '@lunit/design-system';
|
|
25
24
|
// or
|
|
26
|
-
import Typography from
|
|
25
|
+
import Typography from '@lunit/design-system/Typography';
|
|
27
26
|
|
|
28
27
|
<Typography>AI will be the new standard of care. 123456789</Typography>;
|
|
29
28
|
```
|
|
29
|
+
|
|
30
30
|
### Variant
|
|
31
31
|
|
|
32
32
|
The typography component comes with variants below:
|
|
33
33
|
|
|
34
|
-
<Canvas
|
|
35
|
-
of={TypographyStories.AllVariants}
|
|
36
|
-
sourceState="none" />
|
|
34
|
+
<Canvas of={TypographyStories.AllVariants} sourceState="none" />
|
|
37
35
|
|
|
38
36
|
### With styled utility
|
|
39
37
|
|
|
@@ -41,14 +39,12 @@ In some situations you might not be able to use the Typography component. Hopefu
|
|
|
41
39
|
|
|
42
40
|
<Canvas of={TypographyStories.Styled} />
|
|
43
41
|
|
|
44
|
-
|
|
45
42
|
### With the sx props
|
|
46
43
|
|
|
47
44
|
You can use all the variants with [the `sx` props](https://mui.com/system/getting-started/the-sx-prop/#typography).
|
|
48
45
|
|
|
49
46
|
<Canvas of={TypographyStories.SXProps} />
|
|
50
47
|
|
|
51
|
-
|
|
52
48
|
## Reference
|
|
53
49
|
|
|
54
50
|
- [Material-UI Typography](https://mui.com/material-ui/react-typography/)
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import { StoryFn } from
|
|
4
|
-
import { Box } from
|
|
5
|
-
import { styled } from
|
|
3
|
+
import { StoryFn } from '@storybook/react-webpack5';
|
|
4
|
+
import { Box } from '@mui/material';
|
|
5
|
+
import { styled } from '@mui/material/styles';
|
|
6
6
|
|
|
7
|
-
import Typography from
|
|
7
|
+
import Typography from '@/components/Typography';
|
|
8
8
|
|
|
9
|
-
import { variantArray, variants } from
|
|
10
|
-
import TypographyGroup from
|
|
9
|
+
import { variantArray, variants } from './const';
|
|
10
|
+
import TypographyGroup from './TypographyGroup';
|
|
11
11
|
|
|
12
12
|
export const AllVariants = () => (
|
|
13
13
|
<>
|
|
14
|
-
<TypographyGroup
|
|
15
|
-
heading="Headline"
|
|
16
|
-
dummy="Headline 123456789"
|
|
17
|
-
variants={variants.headline}
|
|
18
|
-
/>
|
|
14
|
+
<TypographyGroup heading="Headline" dummy="Headline 123456789" variants={variants.headline} />
|
|
19
15
|
<TypographyGroup
|
|
20
16
|
heading="Body"
|
|
21
17
|
dummy={
|
|
@@ -42,20 +38,16 @@ export const AllVariants = () => (
|
|
|
42
38
|
}
|
|
43
39
|
variants={variants.smallBody}
|
|
44
40
|
/>
|
|
45
|
-
<TypographyGroup
|
|
46
|
-
heading="etc"
|
|
47
|
-
dummy="NEWS & UPDATE 71456"
|
|
48
|
-
variants={variants.etc}
|
|
49
|
-
/>
|
|
41
|
+
<TypographyGroup heading="etc" dummy="NEWS & UPDATE 71456" variants={variants.etc} />
|
|
50
42
|
</>
|
|
51
43
|
);
|
|
52
44
|
|
|
53
45
|
export default {
|
|
54
|
-
title:
|
|
46
|
+
title: 'Foundation/Typography',
|
|
55
47
|
component: Typography,
|
|
56
48
|
argTypes: {
|
|
57
49
|
variant: {
|
|
58
|
-
control:
|
|
50
|
+
control: 'select',
|
|
59
51
|
options: variantArray,
|
|
60
52
|
},
|
|
61
53
|
},
|
|
@@ -64,7 +56,7 @@ export default {
|
|
|
64
56
|
const TypographyTemplate: StoryFn<typeof Typography> = (args) => {
|
|
65
57
|
const { variant, children } = args;
|
|
66
58
|
return (
|
|
67
|
-
<Typography variant={variant} sx={{ whiteSpace:
|
|
59
|
+
<Typography variant={variant} sx={{ whiteSpace: 'pre-line' }}>
|
|
68
60
|
{children}
|
|
69
61
|
</Typography>
|
|
70
62
|
);
|
|
@@ -74,43 +66,35 @@ export const TypographyComponent = {
|
|
|
74
66
|
render: TypographyTemplate,
|
|
75
67
|
|
|
76
68
|
args: {
|
|
77
|
-
variant:
|
|
69
|
+
variant: 'body1_16_regular',
|
|
78
70
|
children:
|
|
79
|
-
|
|
71
|
+
'AI will be the new standard of care. 123456789\nBy Lunit. With AI, we aim to make data-driven medicine\nthe new standard of care.',
|
|
80
72
|
},
|
|
81
73
|
};
|
|
82
74
|
|
|
83
75
|
const SXTemplate: StoryFn<typeof Typography> = (args) => {
|
|
84
76
|
const { variant, children } = args;
|
|
85
|
-
return
|
|
86
|
-
<Box sx={{ typography: variant, whiteSpace: "pre-line" }}>{children}</Box>
|
|
87
|
-
);
|
|
77
|
+
return <Box sx={{ typography: variant, whiteSpace: 'pre-line' }}>{children}</Box>;
|
|
88
78
|
};
|
|
89
79
|
|
|
90
80
|
export const SXProps = {
|
|
91
81
|
render: SXTemplate,
|
|
92
82
|
|
|
93
83
|
args: {
|
|
94
|
-
variant:
|
|
84
|
+
variant: 'body1_16_regular',
|
|
95
85
|
children:
|
|
96
|
-
|
|
86
|
+
'AI will be the new standard of care. 123456789\nBy Lunit. With AI, we aim to make data-driven medicine\nthe new standard of care.',
|
|
97
87
|
},
|
|
98
88
|
};
|
|
99
89
|
|
|
100
|
-
const StyledBox = styled(
|
|
101
|
-
shouldForwardProp: (prop) => ![
|
|
90
|
+
const StyledBox = styled('div', {
|
|
91
|
+
shouldForwardProp: (prop) => !['variant'].includes(prop.toString()),
|
|
102
92
|
})<{ variant: (typeof variantArray)[number] }>(({ theme, variant }) => ({
|
|
103
93
|
...theme.typography[variant],
|
|
104
|
-
whiteSpace:
|
|
94
|
+
whiteSpace: 'pre-line',
|
|
105
95
|
}));
|
|
106
96
|
|
|
107
97
|
const StyledTemplate: StoryFn<typeof StyledBox> = (args) => {
|
|
108
|
-
/**
|
|
109
|
-
const StyledBox = styled(Box)(({ theme }) => ({
|
|
110
|
-
...theme.typography.body1_16_regular,
|
|
111
|
-
whiteSpace: "pre-line",
|
|
112
|
-
}));
|
|
113
|
-
*/
|
|
114
98
|
const { variant, children } = args;
|
|
115
99
|
return <StyledBox variant={variant}>{children}</StyledBox>;
|
|
116
100
|
};
|
|
@@ -119,16 +103,16 @@ export const Styled = {
|
|
|
119
103
|
render: StyledTemplate,
|
|
120
104
|
|
|
121
105
|
args: {
|
|
122
|
-
variant:
|
|
106
|
+
variant: 'body1_16_regular',
|
|
123
107
|
children:
|
|
124
|
-
|
|
108
|
+
'AI will be the new standard of care. 123456789\nBy Lunit. With AI, we aim to make data-driven medicine\nthe new standard of care.',
|
|
125
109
|
},
|
|
126
110
|
|
|
127
111
|
parameters: {
|
|
128
112
|
docs: {
|
|
129
113
|
source: {
|
|
130
114
|
code: `
|
|
131
|
-
const StyledBox = styled(
|
|
115
|
+
const StyledBox = styled("div")(({ theme }) => ({
|
|
132
116
|
...theme.typography.body1_16_regular,
|
|
133
117
|
whiteSpace: "pre-line",
|
|
134
118
|
}));
|
|
@@ -137,8 +121,8 @@ export const Styled = {
|
|
|
137
121
|
<StyledBox>AI will be the new standard of care. 123456789\nBy Lunit. With AI, we aim to make data-driven medicine\nthe new standard of care.</StyledBox>
|
|
138
122
|
);
|
|
139
123
|
`,
|
|
140
|
-
language:
|
|
141
|
-
type:
|
|
124
|
+
language: 'tsx',
|
|
125
|
+
type: 'code',
|
|
142
126
|
},
|
|
143
127
|
},
|
|
144
128
|
},
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { styled, TypographyProps } from '@mui/material';
|
|
4
4
|
|
|
5
|
-
import Typography from
|
|
5
|
+
import Typography from '@/components/Typography';
|
|
6
6
|
|
|
7
|
-
export const TypographyContent = styled(
|
|
8
|
-
display:
|
|
9
|
-
flexDirection:
|
|
10
|
-
width:
|
|
7
|
+
export const TypographyContent = styled('div')({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
width: '100%',
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
export const TypographyItem = styled(
|
|
14
|
-
display:
|
|
15
|
-
flexWrap:
|
|
16
|
-
marginBottom:
|
|
13
|
+
export const TypographyItem = styled('div')({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexWrap: 'wrap',
|
|
16
|
+
marginBottom: '24px',
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
export const TypographyTitle = styled(Typography)(({ theme }) => ({
|
|
@@ -30,17 +30,10 @@ type ReadableArray<T> = Array<T> | ReadonlyArray<T>;
|
|
|
30
30
|
interface TypographyGroupProps {
|
|
31
31
|
heading: React.ReactNode;
|
|
32
32
|
dummy: React.ReactNode;
|
|
33
|
-
variants: ReadableArray<
|
|
34
|
-
Exclude<TypographyProps["variant"], "inherit" | undefined>
|
|
35
|
-
>;
|
|
33
|
+
variants: ReadableArray<Exclude<TypographyProps['variant'], 'inherit' | undefined>>;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
const TypographyGroup = ({
|
|
39
|
-
heading,
|
|
40
|
-
dummy,
|
|
41
|
-
variants,
|
|
42
|
-
}: TypographyGroupProps) => {
|
|
43
|
-
const theme = useTheme();
|
|
36
|
+
const TypographyGroup = ({ heading, dummy, variants }: TypographyGroupProps) => {
|
|
44
37
|
return (
|
|
45
38
|
<>
|
|
46
39
|
<Typography variant="h4" component="h2" sx={{ mb: 5 }}>
|
|
@@ -48,13 +41,9 @@ const TypographyGroup = ({
|
|
|
48
41
|
</Typography>
|
|
49
42
|
<TypographyContent>
|
|
50
43
|
{variants.map((variant) => {
|
|
51
|
-
const { fontWeight, fontSize, lineHeight } =
|
|
52
|
-
theme.typography[variant] ?? {};
|
|
53
44
|
return (
|
|
54
45
|
<TypographyItem key={variant}>
|
|
55
|
-
<TypographyTitle variant="body1_16_semibold">
|
|
56
|
-
{variant}
|
|
57
|
-
</TypographyTitle>
|
|
46
|
+
<TypographyTitle variant="body1_16_semibold">{variant}</TypographyTitle>
|
|
58
47
|
<TypographyDummy variant={variant}>{dummy}</TypographyDummy>
|
|
59
48
|
</TypographyItem>
|
|
60
49
|
);
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
const headline = [
|
|
2
|
-
"headline1",
|
|
3
|
-
"headline2",
|
|
4
|
-
"headline3",
|
|
5
|
-
"headline4",
|
|
6
|
-
"headline5",
|
|
7
|
-
] as const;
|
|
1
|
+
const headline = ['headline1', 'headline2', 'headline3', 'headline4', 'headline5'] as const;
|
|
8
2
|
const body = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
'body1_16_semibold',
|
|
4
|
+
'body1_16_regular',
|
|
5
|
+
'body2_14_bold',
|
|
6
|
+
'body2_14_medium',
|
|
7
|
+
'body2_14_regular',
|
|
8
|
+
'body3_12_semibold',
|
|
9
|
+
'body3_12_regular',
|
|
10
|
+
'body_m2',
|
|
11
|
+
'body_reg6',
|
|
12
|
+
'body_reg8',
|
|
19
13
|
] as const;
|
|
20
|
-
const smallBody = [
|
|
21
|
-
const etc = [
|
|
14
|
+
const smallBody = ['small_body_sb1', 'small_body_m2'] as const;
|
|
15
|
+
const etc = ['button1', 'button2', 'caption', 'overline'] as const;
|
|
22
16
|
|
|
23
17
|
export const variants = {
|
|
24
18
|
headline,
|