@lunit/design-system 2.2.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.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 +226 -227
- 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 -7
- 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 +3 -4
- 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 -3
- 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 +9 -11
- 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 +17 -25
- 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 +5 -6
- 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 +6 -9
- 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 +6 -6
- package/src/stories/components/Alert/Alert.stories.tsx +38 -45
- 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 -135
- 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 -53
- package/src/stories/components/TextField/TextFieldDocs.mdx +8 -12
- package/src/stories/components/TextField/TextFieldMulti.stories.tsx +39 -55
- package/src/stories/components/TextField/TextFieldSingle.stories.tsx +74 -118
- package/src/stories/components/TextField/TextFieldSize.stories.tsx +35 -55
- package/src/stories/components/Toast/Toast.stories.tsx +35 -50
- package/src/stories/components/ToggleButton/Basic.stories.tsx +115 -152
- package/src/stories/components/ToggleButton/ToggleButtonDocs.mdx +10 -14
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +141 -200
- 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 -54
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColorTokenValueBySurface } from
|
|
1
|
+
import { ColorTokenValueBySurface } from './types';
|
|
2
2
|
|
|
3
3
|
export interface TokenCoreColorValue {
|
|
4
4
|
[token: string]: ColorTokenValueBySurface;
|
|
@@ -6,193 +6,172 @@ export interface TokenCoreColorValue {
|
|
|
6
6
|
|
|
7
7
|
export const tokenCoreColor: TokenCoreColorValue = {
|
|
8
8
|
bg_01: {
|
|
9
|
-
light1:
|
|
10
|
-
light2:
|
|
11
|
-
dark1:
|
|
12
|
-
dark2:
|
|
9
|
+
light1: '--grey_0',
|
|
10
|
+
light2: '--grey_10',
|
|
11
|
+
dark1: '--grey_90',
|
|
12
|
+
dark2: '--grey_75',
|
|
13
13
|
},
|
|
14
14
|
bg_02: {
|
|
15
|
-
light1:
|
|
16
|
-
light2:
|
|
17
|
-
dark1:
|
|
18
|
-
dark2:
|
|
15
|
+
light1: '--grey_0',
|
|
16
|
+
light2: '--grey_0',
|
|
17
|
+
dark1: '--grey_70',
|
|
18
|
+
dark2: '--grey_70',
|
|
19
19
|
},
|
|
20
20
|
bg_03: {
|
|
21
|
-
light1:
|
|
22
|
-
light2:
|
|
23
|
-
dark1:
|
|
24
|
-
dark2:
|
|
21
|
+
light1: '--grey_0',
|
|
22
|
+
light2: '--grey_0',
|
|
23
|
+
dark1: '--grey_85',
|
|
24
|
+
dark2: '--grey_85',
|
|
25
25
|
},
|
|
26
26
|
layer_01: {
|
|
27
|
-
light1:
|
|
28
|
-
light2:
|
|
29
|
-
dark1:
|
|
30
|
-
dark2:
|
|
27
|
+
light1: '--grey_5',
|
|
28
|
+
light2: '--grey_5',
|
|
29
|
+
dark1: '--grey_80',
|
|
30
|
+
dark2: '--grey_80',
|
|
31
31
|
},
|
|
32
32
|
text_primary: {
|
|
33
|
-
light1:
|
|
34
|
-
light2:
|
|
35
|
-
dark1:
|
|
36
|
-
dark2:
|
|
33
|
+
light1: '--lunit_teal_50',
|
|
34
|
+
light2: '--lunit_teal_50',
|
|
35
|
+
dark1: '--lunit_teal_40',
|
|
36
|
+
dark2: '--lunit_teal_40',
|
|
37
37
|
},
|
|
38
38
|
text_normal: {
|
|
39
|
-
light1:
|
|
40
|
-
light2:
|
|
41
|
-
dark1:
|
|
42
|
-
dark2:
|
|
39
|
+
light1: '--grey_95',
|
|
40
|
+
light2: '--grey_95',
|
|
41
|
+
dark1: '--grey_5',
|
|
42
|
+
dark2: '--grey_5',
|
|
43
43
|
},
|
|
44
44
|
text_medium: {
|
|
45
|
-
light1:
|
|
46
|
-
light2:
|
|
47
|
-
dark1:
|
|
48
|
-
dark2:
|
|
45
|
+
light1: '--grey_60',
|
|
46
|
+
light2: '--grey_60',
|
|
47
|
+
dark1: '--grey_30',
|
|
48
|
+
dark2: '--grey_30',
|
|
49
49
|
},
|
|
50
50
|
text_light: {
|
|
51
|
-
light1:
|
|
52
|
-
light2:
|
|
53
|
-
dark1:
|
|
54
|
-
dark2:
|
|
51
|
+
light1: '--grey_40',
|
|
52
|
+
light2: '--grey_40',
|
|
53
|
+
dark1: '--grey_50',
|
|
54
|
+
dark2: '--grey_50',
|
|
55
55
|
},
|
|
56
56
|
text_error: {
|
|
57
|
-
light1:
|
|
58
|
-
light2:
|
|
59
|
-
dark1:
|
|
60
|
-
dark2:
|
|
57
|
+
light1: '--red_40',
|
|
58
|
+
light2: '--red_40',
|
|
59
|
+
dark1: '--red_40',
|
|
60
|
+
dark2: '--red_30',
|
|
61
61
|
},
|
|
62
62
|
text_success: {
|
|
63
|
-
light1:
|
|
64
|
-
light2:
|
|
65
|
-
dark1:
|
|
66
|
-
dark2:
|
|
63
|
+
light1: '--green_40',
|
|
64
|
+
light2: '--green_40',
|
|
65
|
+
dark1: '--green_40',
|
|
66
|
+
dark2: '--green_30',
|
|
67
67
|
},
|
|
68
68
|
text_warning: {
|
|
69
|
-
light1:
|
|
70
|
-
light2:
|
|
71
|
-
dark1:
|
|
72
|
-
dark2:
|
|
69
|
+
light1: '--orange_40',
|
|
70
|
+
light2: '--orange_40',
|
|
71
|
+
dark1: '--orange_40',
|
|
72
|
+
dark2: '--orange_30',
|
|
73
73
|
},
|
|
74
74
|
text_info: {
|
|
75
|
-
light1:
|
|
76
|
-
light2:
|
|
77
|
-
dark1:
|
|
78
|
-
dark2:
|
|
75
|
+
light1: '--blue_40',
|
|
76
|
+
light2: '--blue_40',
|
|
77
|
+
dark1: '--blue_40',
|
|
78
|
+
dark2: '--blue_30',
|
|
79
79
|
},
|
|
80
80
|
link_primary: {
|
|
81
|
-
light1:
|
|
82
|
-
light2:
|
|
83
|
-
dark1:
|
|
84
|
-
dark2:
|
|
81
|
+
light1: '--blue_40',
|
|
82
|
+
light2: '--blue_40',
|
|
83
|
+
dark1: '--blue_30',
|
|
84
|
+
dark2: '--blue_30',
|
|
85
85
|
},
|
|
86
86
|
link_hover: {
|
|
87
|
-
light1:
|
|
88
|
-
light2:
|
|
89
|
-
dark1:
|
|
90
|
-
dark2:
|
|
87
|
+
light1: '--blue_50',
|
|
88
|
+
light2: '--blue_50',
|
|
89
|
+
dark1: '--blue_40',
|
|
90
|
+
dark2: '--blue_40',
|
|
91
91
|
},
|
|
92
92
|
link_visited: {
|
|
93
|
-
light1:
|
|
94
|
-
light2:
|
|
95
|
-
dark1:
|
|
96
|
-
dark2:
|
|
93
|
+
light1: '--purple_50',
|
|
94
|
+
light2: '--purple_50',
|
|
95
|
+
dark1: '--purple_40',
|
|
96
|
+
dark2: '--purple_40',
|
|
97
97
|
},
|
|
98
98
|
icon_error_02: {
|
|
99
|
-
light1:
|
|
100
|
-
light2:
|
|
101
|
-
dark1:
|
|
102
|
-
dark2:
|
|
99
|
+
light1: '--red_40',
|
|
100
|
+
light2: '--red_40',
|
|
101
|
+
dark1: '--red_30',
|
|
102
|
+
dark2: '--red_30',
|
|
103
103
|
},
|
|
104
104
|
icon_success_02: {
|
|
105
|
-
light1:
|
|
106
|
-
light2:
|
|
107
|
-
dark1:
|
|
108
|
-
dark2:
|
|
105
|
+
light1: '--green_40',
|
|
106
|
+
light2: '--green_40',
|
|
107
|
+
dark1: '--green_30',
|
|
108
|
+
dark2: '--green_30',
|
|
109
109
|
},
|
|
110
110
|
icon_warning_02: {
|
|
111
|
-
light1:
|
|
112
|
-
light2:
|
|
113
|
-
dark1:
|
|
114
|
-
dark2:
|
|
111
|
+
light1: '--orange_40',
|
|
112
|
+
light2: '--orange_40',
|
|
113
|
+
dark1: '--orange_30',
|
|
114
|
+
dark2: '--orange_30',
|
|
115
115
|
},
|
|
116
116
|
icon_info_02: {
|
|
117
|
-
light1:
|
|
118
|
-
light2:
|
|
119
|
-
dark1:
|
|
120
|
-
dark2:
|
|
121
|
-
},
|
|
122
|
-
hover: {
|
|
123
|
-
// Deprecated. Please use core.status_hover instead.
|
|
124
|
-
light1: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
125
|
-
light2: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
126
|
-
dark1: "rgba(255, 255, 255, 0.12)", // "--grey_0 12%",
|
|
127
|
-
dark2: "rgba(255, 255, 255, 0.12)", // "--grey_0 12%",
|
|
117
|
+
light1: '--blue_40',
|
|
118
|
+
light2: '--blue_40',
|
|
119
|
+
dark1: '--blue_30',
|
|
120
|
+
dark2: '--blue_30',
|
|
128
121
|
},
|
|
129
122
|
status_hover: {
|
|
130
123
|
// TODO: 알파값 적용 코드는 일단 하드코딩. 나중에 수정할것
|
|
131
|
-
light1:
|
|
132
|
-
light2:
|
|
133
|
-
dark1:
|
|
134
|
-
dark2:
|
|
135
|
-
},
|
|
136
|
-
focused: {
|
|
137
|
-
// Deprecated. Please use core.status_focused instead.
|
|
138
|
-
light1: "--lunit_teal_40",
|
|
139
|
-
light2: "--lunit_teal_40",
|
|
140
|
-
dark1: "--lunit_teal_40",
|
|
141
|
-
dark2: "--lunit_teal_40",
|
|
124
|
+
light1: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
125
|
+
light2: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
126
|
+
dark1: 'rgba(255, 255, 255, 0.12)', // "--grey_0 12%",
|
|
127
|
+
dark2: 'rgba(255, 255, 255, 0.12)', // "--grey_0 12%",
|
|
142
128
|
},
|
|
143
129
|
status_focused: {
|
|
144
|
-
light1:
|
|
145
|
-
light2:
|
|
146
|
-
dark1:
|
|
147
|
-
dark2:
|
|
148
|
-
},
|
|
149
|
-
selected: {
|
|
150
|
-
// Deprecated. Please use core.status_selected instead.
|
|
151
|
-
light1: "--lunit_teal_10",
|
|
152
|
-
light2: "--lunit_teal_10",
|
|
153
|
-
dark1: "--lunit_teal_80",
|
|
154
|
-
dark2: "--lunit_teal_80",
|
|
130
|
+
light1: '--lunit_teal_40',
|
|
131
|
+
light2: '--lunit_teal_40',
|
|
132
|
+
dark1: '--lunit_teal_40',
|
|
133
|
+
dark2: '--lunit_teal_40',
|
|
155
134
|
},
|
|
156
135
|
status_selected: {
|
|
157
|
-
light1:
|
|
158
|
-
light2:
|
|
159
|
-
dark1:
|
|
160
|
-
dark2:
|
|
136
|
+
light1: '--lunit_teal_10',
|
|
137
|
+
light2: '--lunit_teal_10',
|
|
138
|
+
dark1: '--lunit_teal_80',
|
|
139
|
+
dark2: '--lunit_teal_80',
|
|
161
140
|
},
|
|
162
141
|
shadow_01: {
|
|
163
|
-
light1:
|
|
164
|
-
light2:
|
|
165
|
-
dark1:
|
|
166
|
-
dark2:
|
|
142
|
+
light1: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
143
|
+
light2: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
144
|
+
dark1: 'rgba(0, 0, 0, 0.32)', // "--grey_100 32%",
|
|
145
|
+
dark2: 'rgba(0, 0, 0, 0.32)', // "--grey_100 32%",
|
|
167
146
|
},
|
|
168
147
|
shadow_02: {
|
|
169
|
-
light1:
|
|
170
|
-
light2:
|
|
171
|
-
dark1:
|
|
172
|
-
dark2:
|
|
148
|
+
light1: 'rgba(0, 0, 0, 0.18)', // "--grey_100 18%",
|
|
149
|
+
light2: 'rgba(0, 0, 0, 0.18)', // "--grey_100 18%",
|
|
150
|
+
dark1: 'rgba(0, 0, 0, 0.4)', // "--grey_100 40%",
|
|
151
|
+
dark2: 'rgba(0, 0, 0, 0.4)', // "--grey_100 40%",
|
|
173
152
|
},
|
|
174
153
|
shadow_03: {
|
|
175
|
-
light1:
|
|
176
|
-
light2:
|
|
177
|
-
dark1:
|
|
178
|
-
dark2:
|
|
154
|
+
light1: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
155
|
+
light2: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
156
|
+
dark1: 'rgba(0, 0, 0, 0.36)', // "--grey_100 36%",
|
|
157
|
+
dark2: 'rgba(0, 0, 0, 0.36)', // "--grey_100 36%",
|
|
179
158
|
},
|
|
180
159
|
shadow_04: {
|
|
181
|
-
light1:
|
|
182
|
-
light2:
|
|
183
|
-
dark1:
|
|
184
|
-
dark2:
|
|
160
|
+
light1: 'rgba(0, 0, 0, 0.18)', // "--grey_100 18%",
|
|
161
|
+
light2: 'rgba(0, 0, 0, 0.18)', // "--grey_100 18%",
|
|
162
|
+
dark1: 'rgba(0, 0, 0, 0.48)', // "--grey_100 48%",
|
|
163
|
+
dark2: 'rgba(0, 0, 0, 0.48)', // "--grey_100 48%",
|
|
185
164
|
},
|
|
186
165
|
border_light: {
|
|
187
|
-
light1:
|
|
188
|
-
light2:
|
|
189
|
-
dark1:
|
|
190
|
-
dark2:
|
|
166
|
+
light1: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
167
|
+
light2: 'rgba(0, 0, 0, 0.12)', // "--grey_100 12%",
|
|
168
|
+
dark1: 'rgba(255, 255, 255, 0.12)', // "--grey_0 12%",
|
|
169
|
+
dark2: 'rgba(255, 255, 255, 0.12)', // "--grey_0 12%",
|
|
191
170
|
},
|
|
192
171
|
border_medium: {
|
|
193
|
-
light1:
|
|
194
|
-
light2:
|
|
195
|
-
dark1:
|
|
196
|
-
dark2:
|
|
172
|
+
light1: 'rgba(0, 0, 0, 0.24)', // "--grey_100 24%",
|
|
173
|
+
light2: 'rgba(0, 0, 0, 0.24)', // "--grey_100 24%",
|
|
174
|
+
dark1: 'rgba(255, 255, 255, 0.24)', // "--grey_0 24%",
|
|
175
|
+
dark2: 'rgba(255, 255, 255, 0.24)', // "--grey_0 24%",
|
|
197
176
|
},
|
|
198
177
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './component';
|
|
2
|
+
export * from './core';
|
|
@@ -19,11 +19,8 @@ export interface ColorToken {
|
|
|
19
19
|
icon_success_02: string;
|
|
20
20
|
icon_warning_02: string;
|
|
21
21
|
icon_info_02: string;
|
|
22
|
-
hover: string;
|
|
23
22
|
status_hover: string;
|
|
24
|
-
focused: string;
|
|
25
23
|
status_focused: string;
|
|
26
|
-
selected: string;
|
|
27
24
|
status_selected: string;
|
|
28
25
|
shadow_01: string;
|
|
29
26
|
shadow_02: string;
|
|
@@ -37,14 +34,12 @@ export interface ColorToken {
|
|
|
37
34
|
btn_secondary_bg: string;
|
|
38
35
|
btn_error_bg: string;
|
|
39
36
|
btn_primary_border: string;
|
|
40
|
-
btn_secondary_border: string;
|
|
41
37
|
btn_primary_text_1: string;
|
|
42
38
|
btn_primary_text_2: string;
|
|
43
39
|
btn_secondary_text: string;
|
|
44
40
|
btn_error_text: string;
|
|
45
41
|
btn_selected_primary_bg: string;
|
|
46
42
|
btn_selected_primary_text: string;
|
|
47
|
-
btn_selected_secondary_bg: string;
|
|
48
43
|
btn_selected_secondary_text: string;
|
|
49
44
|
btn_selected_tertiary_bg: string;
|
|
50
45
|
btn_selected_tertiary_text: string;
|
|
@@ -55,8 +50,6 @@ export interface ColorToken {
|
|
|
55
50
|
textfield_bg: string;
|
|
56
51
|
textfield_border_error: string;
|
|
57
52
|
dropdown_divider_border: string;
|
|
58
|
-
datatable_border_01: string;
|
|
59
|
-
datatable_border_02: string;
|
|
60
53
|
datatable_zebra: string;
|
|
61
54
|
scrollbars_bg: string;
|
|
62
55
|
scrollbars_hover: string;
|
package/src/foundation/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Components, Theme } from
|
|
2
|
-
import { deepmerge } from
|
|
3
|
-
import paletteOptions, { createColorCssBaseline } from
|
|
1
|
+
import { Components, Theme } from '@mui/material';
|
|
2
|
+
import { deepmerge } from '@mui/utils';
|
|
3
|
+
import paletteOptions, { createColorCssBaseline } from './colors';
|
|
4
4
|
import typographyOptions, {
|
|
5
5
|
createTypographyCssBaseline,
|
|
6
6
|
typographyDefaultProps,
|
|
7
|
-
} from
|
|
8
|
-
import { createElevationCssBaseline, elevationOptions } from
|
|
7
|
+
} from './Typography';
|
|
8
|
+
import { createElevationCssBaseline, elevationOptions } from './Elevation';
|
|
9
9
|
|
|
10
|
-
export const foundationCssBaseline: Components<Theme>[
|
|
10
|
+
export const foundationCssBaseline: Components<Theme>['MuiCssBaseline'] = {
|
|
11
11
|
styleOverrides: deepmerge(
|
|
12
12
|
deepmerge(createColorCssBaseline(), createTypographyCssBaseline()),
|
|
13
|
-
createElevationCssBaseline()
|
|
13
|
+
createElevationCssBaseline(),
|
|
14
14
|
),
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -22,4 +22,4 @@ export const palette = paletteOptions;
|
|
|
22
22
|
|
|
23
23
|
export const elevation = elevationOptions;
|
|
24
24
|
|
|
25
|
-
export { spacing } from
|
|
25
|
+
export { spacing } from './spacing';
|
package/src/index.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export { default as theme, themeOptions } from
|
|
2
|
-
export { base as baseColors } from
|
|
1
|
+
export { default as theme, themeOptions } from './theme';
|
|
2
|
+
export { base as baseColors } from './foundation/colors';
|
|
3
3
|
|
|
4
|
-
export { default as Alert } from
|
|
5
|
-
export { default as Button } from
|
|
6
|
-
export { default as Chip } from
|
|
7
|
-
export { default as Checkbox } from
|
|
8
|
-
export { default as Dialog } from
|
|
9
|
-
export { default as DataTable } from
|
|
10
|
-
export { default as DatePicker } from
|
|
4
|
+
export { default as Alert } from './components/Alert';
|
|
5
|
+
export { default as Button } from './components/Button';
|
|
6
|
+
export { default as Chip } from './components/Chip';
|
|
7
|
+
export { default as Checkbox } from './components/Checkbox';
|
|
8
|
+
export { default as Dialog } from './components/Dialog';
|
|
9
|
+
export { default as DataTable } from './components/DataTable';
|
|
10
|
+
export { default as DatePicker } from './components/DatePicker';
|
|
11
11
|
export {
|
|
12
12
|
default as Dropdown,
|
|
13
13
|
DropdownItem,
|
|
14
14
|
DropdownDivider,
|
|
15
15
|
DropdownSubtitle,
|
|
16
|
-
} from
|
|
17
|
-
export { default as FormLabel } from
|
|
18
|
-
export { default as Radio } from
|
|
19
|
-
export { default as RadioGroup } from
|
|
20
|
-
export { default as TextField } from
|
|
21
|
-
export { default as Toast } from
|
|
22
|
-
export { default as Toggle } from
|
|
23
|
-
export { default as ToggleButton } from
|
|
24
|
-
export { default as ToggleButtonGroup } from
|
|
25
|
-
export { default as Tooltip } from
|
|
26
|
-
export { default as Typography } from
|
|
16
|
+
} from './components/Dropdown';
|
|
17
|
+
export { default as FormLabel } from './components/FormLabel';
|
|
18
|
+
export { default as Radio } from './components/Radio';
|
|
19
|
+
export { default as RadioGroup } from './components/RadioGroup';
|
|
20
|
+
export { default as TextField } from './components/TextField';
|
|
21
|
+
export { default as Toast } from './components/Toast';
|
|
22
|
+
export { default as Toggle } from './components/Toggle';
|
|
23
|
+
export { default as ToggleButton } from './components/ToggleButton';
|
|
24
|
+
export { default as ToggleButtonGroup } from './components/ToggleButtonGroup';
|
|
25
|
+
export { default as Tooltip } from './components/Tooltip';
|
|
26
|
+
export { default as Typography } from './components/Typography';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta } from
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
|
|
3
3
|
<Meta title="Getting Started/Overview" />
|
|
4
4
|
|
|
@@ -30,9 +30,9 @@ Material UI is peer dependency of Lunit Design System Library. You need to insta
|
|
|
30
30
|
This library is based on Material UI's themes feature, so it imports themes and puts them into the provider. We also recommend using the `CssBaseline` component.
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import { createTheme, ThemeProvider } from
|
|
34
|
-
import CssBaseline from
|
|
35
|
-
import { themeOptions } from
|
|
33
|
+
import { createTheme, ThemeProvider } from '@mui/material/styles';
|
|
34
|
+
import CssBaseline from '@mui/material/CssBaseline';
|
|
35
|
+
import { themeOptions } from '@lunit/design-system';
|
|
36
36
|
|
|
37
37
|
const theme = createTheme(themeOptions);
|
|
38
38
|
|
|
@@ -58,9 +58,9 @@ This library uses the `Pretendard` font-family by default. The [Pretendard font]
|
|
|
58
58
|
const theme = createTheme(
|
|
59
59
|
deepmerge(themeOptions, {
|
|
60
60
|
typography: {
|
|
61
|
-
fontFamily: [
|
|
61
|
+
fontFamily: ['Pretendard Variable', 'sans-serif'],
|
|
62
62
|
},
|
|
63
|
-
})
|
|
63
|
+
}),
|
|
64
64
|
);
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Box, Typography } from
|
|
3
|
-
import { StoryFn, Meta } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Typography } from '@mui/material';
|
|
3
|
+
import { StoryFn, Meta } from '@storybook/react-webpack5';
|
|
4
4
|
|
|
5
|
-
import Alert from
|
|
6
|
-
import Button from
|
|
7
|
-
import theme from
|
|
8
|
-
import { action } from
|
|
5
|
+
import Alert from '@/components/Alert';
|
|
6
|
+
import Button from '@/components/Button';
|
|
7
|
+
import theme from '@/theme';
|
|
8
|
+
import { action } from 'storybook/actions';
|
|
9
9
|
|
|
10
10
|
export default {
|
|
11
|
-
title:
|
|
11
|
+
title: 'Components/Alert',
|
|
12
12
|
component: Alert,
|
|
13
13
|
argTypes: {
|
|
14
14
|
title: {
|
|
15
|
-
control:
|
|
16
|
-
description:
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Used to represent the title of the alert.',
|
|
17
17
|
},
|
|
18
18
|
severity: {
|
|
19
|
-
control:
|
|
19
|
+
control: 'radio',
|
|
20
20
|
table: {
|
|
21
|
-
defaultValue: { summary:
|
|
21
|
+
defaultValue: { summary: 'success' },
|
|
22
22
|
},
|
|
23
|
-
options: [
|
|
23
|
+
options: ['success', 'info', 'warning', 'error', undefined],
|
|
24
24
|
description: `\`success\`, \`info\`, \`warning\`, \`error\`, \`undefined\``,
|
|
25
25
|
},
|
|
26
26
|
onClose: {
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
},
|
|
32
32
|
parameters: {
|
|
33
33
|
controls: {
|
|
34
|
-
include: [
|
|
34
|
+
include: ['title', 'severity', 'onClose'],
|
|
35
35
|
},
|
|
36
36
|
docs: {
|
|
37
37
|
description: {
|
|
@@ -45,10 +45,10 @@ export default {
|
|
|
45
45
|
(Story) => (
|
|
46
46
|
<Box
|
|
47
47
|
sx={{
|
|
48
|
-
display:
|
|
49
|
-
flexDirection:
|
|
50
|
-
padding:
|
|
51
|
-
gap:
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
padding: '3em',
|
|
51
|
+
gap: '1em',
|
|
52
52
|
}}
|
|
53
53
|
>
|
|
54
54
|
{Story()}
|
|
@@ -60,13 +60,10 @@ export default {
|
|
|
60
60
|
const AlertChildrenContentLong = () => {
|
|
61
61
|
return (
|
|
62
62
|
<Typography variant="body2_14_regular">
|
|
63
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</u>{" "}
|
|
68
|
-
magna aliqua. A diam sollicitudin tempor id eu nisl nunc mi. Auctor augue
|
|
69
|
-
mauris augue neque gravida in fermentum.
|
|
63
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut{' '}
|
|
64
|
+
<u style={{ color: theme.palette.lunit_token.core.link_primary }}>labore et dolore</u> magna
|
|
65
|
+
aliqua. A diam sollicitudin tempor id eu nisl nunc mi. Auctor augue mauris augue neque gravida
|
|
66
|
+
in fermentum.
|
|
70
67
|
</Typography>
|
|
71
68
|
);
|
|
72
69
|
};
|
|
@@ -81,7 +78,7 @@ const AlertChildrenContentShort = () => {
|
|
|
81
78
|
|
|
82
79
|
const AlertBottomAction = () => {
|
|
83
80
|
return (
|
|
84
|
-
<Box sx={{ display:
|
|
81
|
+
<Box sx={{ display: 'flex', columnGap: '8px' }}>
|
|
85
82
|
<Button color="primary" kind="contained">
|
|
86
83
|
Button
|
|
87
84
|
</Button>
|
|
@@ -93,34 +90,30 @@ const AlertBottomAction = () => {
|
|
|
93
90
|
};
|
|
94
91
|
|
|
95
92
|
const Template: StoryFn<typeof Alert> = (args) => (
|
|
96
|
-
<Alert sx={{ width:
|
|
93
|
+
<Alert sx={{ width: '620px' }} {...args}>
|
|
97
94
|
<AlertChildrenContentLong />
|
|
98
95
|
</Alert>
|
|
99
96
|
);
|
|
100
97
|
|
|
101
98
|
const Template2: StoryFn<typeof Alert> = (args) => (
|
|
102
99
|
<>
|
|
103
|
-
<Alert sx={{ width:
|
|
100
|
+
<Alert sx={{ width: '504px' }} {...args}>
|
|
104
101
|
<AlertChildrenContentLong />
|
|
105
102
|
</Alert>
|
|
106
|
-
<Alert sx={{ width:
|
|
103
|
+
<Alert sx={{ width: '620px' }} severity={args.severity} onClose={() => {}}>
|
|
107
104
|
<AlertChildrenContentLong />
|
|
108
105
|
</Alert>
|
|
109
|
-
<Alert sx={{ width:
|
|
106
|
+
<Alert sx={{ width: '620px' }} severity={args.severity} onClose={() => {}}>
|
|
110
107
|
<AlertChildrenContentShort />
|
|
111
108
|
</Alert>
|
|
112
|
-
<Alert sx={{ width:
|
|
109
|
+
<Alert sx={{ width: '620px' }} severity={args.severity}>
|
|
113
110
|
<AlertChildrenContentShort />
|
|
114
111
|
</Alert>
|
|
115
112
|
</>
|
|
116
113
|
);
|
|
117
114
|
const Template3: StoryFn<typeof Alert> = (args) => (
|
|
118
115
|
<>
|
|
119
|
-
<Alert
|
|
120
|
-
sx={{ width: "504px" }}
|
|
121
|
-
bottomAction={<AlertBottomAction />}
|
|
122
|
-
{...args}
|
|
123
|
-
>
|
|
116
|
+
<Alert sx={{ width: '504px' }} bottomAction={<AlertBottomAction />} {...args}>
|
|
124
117
|
<AlertChildrenContentLong />
|
|
125
118
|
</Alert>
|
|
126
119
|
</>
|
|
@@ -130,9 +123,9 @@ export const AlertBase = {
|
|
|
130
123
|
render: Template,
|
|
131
124
|
|
|
132
125
|
args: {
|
|
133
|
-
title:
|
|
134
|
-
severity:
|
|
135
|
-
onClose: action(
|
|
126
|
+
title: 'Alert title',
|
|
127
|
+
severity: 'success',
|
|
128
|
+
onClose: action('Close Button is clicked'),
|
|
136
129
|
},
|
|
137
130
|
};
|
|
138
131
|
|
|
@@ -140,9 +133,9 @@ export const AlertVariant = {
|
|
|
140
133
|
render: Template2,
|
|
141
134
|
|
|
142
135
|
args: {
|
|
143
|
-
title:
|
|
144
|
-
severity:
|
|
145
|
-
onClose: action(
|
|
136
|
+
title: 'Alert title',
|
|
137
|
+
severity: 'success',
|
|
138
|
+
onClose: action('Close Button is clicked'),
|
|
146
139
|
},
|
|
147
140
|
};
|
|
148
141
|
|
|
@@ -150,8 +143,8 @@ export const AlertWithBottomAction = {
|
|
|
150
143
|
render: Template3,
|
|
151
144
|
|
|
152
145
|
args: {
|
|
153
|
-
title:
|
|
154
|
-
severity:
|
|
155
|
-
onClose: action(
|
|
146
|
+
title: 'Alert title',
|
|
147
|
+
severity: 'success',
|
|
148
|
+
onClose: action('Close Button is clicked'),
|
|
156
149
|
},
|
|
157
150
|
};
|