@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,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import Success from
|
|
3
|
-
import Error from
|
|
4
|
-
import Warning from
|
|
5
|
-
import Information from
|
|
6
|
-
import Close from
|
|
7
|
-
import { Typography } from
|
|
8
|
-
import { forwardRef } from
|
|
9
|
-
import Button from
|
|
10
|
-
import { StyledToast } from
|
|
2
|
+
import Success from '@lunit/design-system-icons/Success16';
|
|
3
|
+
import Error from '@lunit/design-system-icons/Error16';
|
|
4
|
+
import Warning from '@lunit/design-system-icons/Warning16';
|
|
5
|
+
import Information from '@lunit/design-system-icons/Information16';
|
|
6
|
+
import Close from '@lunit/design-system-icons/Close';
|
|
7
|
+
import { Typography } from '@mui/material';
|
|
8
|
+
import { forwardRef } from 'react';
|
|
9
|
+
import Button from '../Button';
|
|
10
|
+
import { StyledToast } from './Toast.styled';
|
|
11
11
|
const MAPPED_ICON = {
|
|
12
12
|
success: _jsx(Success, { variant: "filled" }),
|
|
13
13
|
info: _jsx(Information, { variant: "filled" }),
|
|
@@ -16,10 +16,10 @@ const MAPPED_ICON = {
|
|
|
16
16
|
};
|
|
17
17
|
// this forwardRef is required for using with Snackbar component
|
|
18
18
|
const Toast = forwardRef((props, ref) => {
|
|
19
|
-
const { severity =
|
|
20
|
-
const iconConfig = severity ===
|
|
21
|
-
return (_jsx(StyledToast, { ref: ref, iconMapping: MAPPED_ICON, action: _jsxs(_Fragment, { children: [action, onClose &&
|
|
22
|
-
whiteSpace:
|
|
19
|
+
const { severity = 'normal', children, action, onClose, ...rest } = props;
|
|
20
|
+
const iconConfig = severity === 'normal' ? { icon: false } : { severity };
|
|
21
|
+
return (_jsx(StyledToast, { ref: ref, iconMapping: MAPPED_ICON, action: _jsxs(_Fragment, { children: [action, onClose && _jsx(Button, { icon: _jsx(Close, {}), kind: "ghost", size: "medium", onClick: onClose })] }), ...iconConfig, ...rest, children: _jsx(Typography, { className: "Toast-message", variant: "body2_14_regular", sx: {
|
|
22
|
+
whiteSpace: 'pre-line',
|
|
23
23
|
}, children: children }) }));
|
|
24
24
|
});
|
|
25
25
|
export default Toast;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.js","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";AAAA,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,KAAK,MAAM,oCAAoC,CAAC;AACvD,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAC3D,OAAO,WAAW,MAAM,0CAA0C,CAAC;AACnE,OAAO,KAAK,MAAM,kCAAkC,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,KAAC,OAAO,IAAC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AO,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC1E,MAAM,UAAU,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC;IAE1E,OAAO,CACL,KAAC,WAAW,IACV,GAAG,EAAE,GAAG,EACR,WAAW,EAAE,WAAW,EACxB,MAAM,EACJ,8BACG,MAAM,EACN,OAAO,IAAI,KAAC,MAAM,IAAC,IAAI,EAAE,KAAC,KAAK,KAAG,EAAE,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,IACnF,KAED,UAAU,KACV,IAAI,YAER,KAAC,UAAU,IACT,SAAS,EAAC,eAAe,EACzB,OAAO,EAAC,kBAAkB,EAC1B,EAAE,EAAE;gBACF,UAAU,EAAE,UAAU;aACvB,YAEA,QAAQ,GACE,GACD,CACf,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Alert, styled } from
|
|
2
|
-
import { getIconColor } from
|
|
1
|
+
import { Alert, styled } from '@mui/material';
|
|
2
|
+
import { getIconColor } from './Toast.utils';
|
|
3
3
|
export const StyledToast = styled(Alert)(({ theme, severity }) => {
|
|
4
4
|
return {
|
|
5
5
|
'div[class*="MuiAlert"]': {
|
|
6
|
-
display:
|
|
7
|
-
alignItems:
|
|
6
|
+
display: 'flex',
|
|
7
|
+
alignItems: 'center',
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
padding:
|
|
9
|
+
'&.MuiAlert-root': {
|
|
10
|
+
padding: '8px 16px 8px 16px',
|
|
11
11
|
margin: 0,
|
|
12
12
|
color: theme.palette.lunit_token.core.text_normal,
|
|
13
13
|
backgroundColor: theme.palette.lunit_token.core.bg_03,
|
|
14
|
-
borderRadius:
|
|
14
|
+
borderRadius: '8px',
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
height:
|
|
18
|
-
marginRight:
|
|
16
|
+
'& .MuiAlert-icon': {
|
|
17
|
+
height: '36px',
|
|
18
|
+
marginRight: '16px',
|
|
19
19
|
fontSize: 20,
|
|
20
20
|
color: `${getIconColor(theme, severity)}`,
|
|
21
|
-
|
|
22
|
-
height:
|
|
23
|
-
width:
|
|
21
|
+
'& .MuiSvgIcon-root': {
|
|
22
|
+
height: '16px',
|
|
23
|
+
width: '16px',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
'& .MuiAlert-message': {
|
|
27
27
|
// max length of toast message is 400px
|
|
28
|
-
maxWidth:
|
|
29
|
-
minHeight:
|
|
30
|
-
padding:
|
|
28
|
+
maxWidth: '400px',
|
|
29
|
+
minHeight: '28px',
|
|
30
|
+
padding: '8px 0 8px 0',
|
|
31
31
|
fontWeight: 400,
|
|
32
|
-
fontSize:
|
|
33
|
-
lineHeight:
|
|
34
|
-
|
|
35
|
-
display:
|
|
32
|
+
fontSize: '14px',
|
|
33
|
+
lineHeight: '20px',
|
|
34
|
+
'& .Toast-message': {
|
|
35
|
+
display: 'block',
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
alignSelf:
|
|
40
|
-
minHeight:
|
|
41
|
-
marginRight:
|
|
38
|
+
'& .MuiAlert-action': {
|
|
39
|
+
alignSelf: 'flex-start',
|
|
40
|
+
minHeight: '36px',
|
|
41
|
+
marginRight: '0px',
|
|
42
42
|
padding: 0,
|
|
43
|
-
|
|
43
|
+
'& .MuiSvgIcon-root': {
|
|
44
44
|
color: theme.palette.lunit_token.core.text_normal,
|
|
45
45
|
},
|
|
46
46
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export const getIconColor = (theme, severity) => {
|
|
2
2
|
switch (severity) {
|
|
3
|
-
case
|
|
3
|
+
case 'info':
|
|
4
4
|
return theme.palette.lunit_token.core.icon_info_02;
|
|
5
|
-
case
|
|
5
|
+
case 'warning':
|
|
6
6
|
return theme.palette.lunit_token.core.icon_warning_02;
|
|
7
|
-
case
|
|
7
|
+
case 'error':
|
|
8
8
|
return theme.palette.lunit_token.core.icon_error_02;
|
|
9
9
|
default:
|
|
10
10
|
return theme.palette.lunit_token.core.icon_success_02;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.utils.js","sourceRoot":"","sources":["../../../src/components/Toast/Toast.utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"Toast.utils.js","sourceRoot":"","sources":["../../../src/components/Toast/Toast.utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAY,EAAE,QAAgC,EAAE,EAAE;IAC7E,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC;QACrD,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC;QACxD,KAAK,OAAO;YACV,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC;QACtD;YACE,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC;IAC1D,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Toast';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { CommonToggle, CommonIndeterminateToggle } from
|
|
2
|
+
import { CommonToggle, CommonIndeterminateToggle } from './Toggle.styled';
|
|
3
3
|
const Toggle = (props) => {
|
|
4
|
-
const { size =
|
|
4
|
+
const { size = 'small', indeterminate = false, disableRipple, ...switchProps } = props;
|
|
5
5
|
if (indeterminate) {
|
|
6
|
-
const { checked: _, ...restProps } = switchProps;
|
|
7
6
|
// can't use checked props with indeterminate
|
|
8
|
-
return (_jsx(CommonIndeterminateToggle, { toggleSize: size, checked: true, focusRipple: false, disableRipple: disableRipple, ...
|
|
7
|
+
return (_jsx(CommonIndeterminateToggle, { toggleSize: size, checked: true, focusRipple: false, disableRipple: disableRipple, ...switchProps }));
|
|
9
8
|
}
|
|
10
9
|
return (_jsx(CommonToggle, { toggleSize: size, focusRipple: false, disableRipple: disableRipple, ...switchProps }));
|
|
11
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../src/components/Toggle/Toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG1E,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IACpC,MAAM,
|
|
1
|
+
{"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../../src/components/Toggle/Toggle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG1E,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAE,EAAE;IACpC,MAAM,EAAE,IAAI,GAAG,OAAO,EAAE,aAAa,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK,CAAC;IAEvF,IAAI,aAAa,EAAE,CAAC;QAClB,6CAA6C;QAC7C,OAAO,CACL,KAAC,yBAAyB,IACxB,UAAU,EAAE,IAAI,EAChB,OAAO,QACP,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,aAAa,KACxB,WAAW,GACf,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,YAAY,IACX,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,KAAK,EAClB,aAAa,EAAE,aAAa,KACxB,WAAW,GACf,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styled, Switch as MuiSwitch } from
|
|
1
|
+
import { styled, Switch as MuiSwitch } from '@mui/material';
|
|
2
2
|
const toggleStyles = {
|
|
3
3
|
small: {
|
|
4
4
|
root: {
|
|
@@ -12,10 +12,10 @@ const toggleStyles = {
|
|
|
12
12
|
borderRadius: 12,
|
|
13
13
|
},
|
|
14
14
|
switch: {
|
|
15
|
-
transition:
|
|
15
|
+
transition: 'all 100ms ease-in-out',
|
|
16
16
|
},
|
|
17
17
|
switchChecked: {
|
|
18
|
-
transform:
|
|
18
|
+
transform: 'translateX(10px)',
|
|
19
19
|
},
|
|
20
20
|
thumb: {
|
|
21
21
|
width: 14,
|
|
@@ -34,10 +34,10 @@ const toggleStyles = {
|
|
|
34
34
|
borderRadius: 14,
|
|
35
35
|
},
|
|
36
36
|
switch: {
|
|
37
|
-
transition:
|
|
37
|
+
transition: 'all 150ms ease-in-out',
|
|
38
38
|
},
|
|
39
39
|
switchChecked: {
|
|
40
|
-
transform:
|
|
40
|
+
transform: 'translateX(20px)',
|
|
41
41
|
},
|
|
42
42
|
thumb: {
|
|
43
43
|
width: 20,
|
|
@@ -76,7 +76,7 @@ const indeterminateStyles = {
|
|
|
76
76
|
},
|
|
77
77
|
};
|
|
78
78
|
export const CommonToggle = styled(MuiSwitch, {
|
|
79
|
-
shouldForwardProp: (props) => props !==
|
|
79
|
+
shouldForwardProp: (props) => props !== 'toggleSize',
|
|
80
80
|
})(({ theme, toggleSize, disabled }) => {
|
|
81
81
|
const checkedColor = theme.palette.lunit_token.component.selectcontrol_on;
|
|
82
82
|
const uncheckedColor = theme.palette.lunit_token.component.selectcontrol_off;
|
|
@@ -86,68 +86,68 @@ export const CommonToggle = styled(MuiSwitch, {
|
|
|
86
86
|
return {
|
|
87
87
|
...toggleStyle.root,
|
|
88
88
|
padding: 0,
|
|
89
|
-
overflow:
|
|
90
|
-
backgroundColor:
|
|
89
|
+
overflow: 'visible',
|
|
90
|
+
backgroundColor: 'transparent',
|
|
91
91
|
opacity: toggleOpacity,
|
|
92
|
-
|
|
92
|
+
'& .Mui-focusVisible': {
|
|
93
93
|
// clear default focus style
|
|
94
|
-
boxShadow:
|
|
95
|
-
background:
|
|
96
|
-
borderColor:
|
|
97
|
-
outline:
|
|
98
|
-
|
|
94
|
+
boxShadow: 'none',
|
|
95
|
+
background: 'transparent',
|
|
96
|
+
borderColor: 'transparent',
|
|
97
|
+
outline: 'none',
|
|
98
|
+
'& + .MuiSwitch-track::after': {
|
|
99
99
|
...toggleStyle.focus,
|
|
100
100
|
content: '""',
|
|
101
|
-
position:
|
|
101
|
+
position: 'absolute',
|
|
102
102
|
border: `1px solid ${checkedColor}`,
|
|
103
|
-
boxSizing:
|
|
104
|
-
top: -3,
|
|
103
|
+
boxSizing: 'border-box',
|
|
104
|
+
top: -3, // border 1px + offset 2px
|
|
105
105
|
left: -3, // border 1px + offset 2px
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
|
-
|
|
108
|
+
'& .MuiSwitch-track': {
|
|
109
109
|
opacity: 1,
|
|
110
110
|
borderRadius: 12,
|
|
111
111
|
backgroundColor: uncheckedColor,
|
|
112
112
|
},
|
|
113
|
-
|
|
113
|
+
'& .MuiSwitch-thumb': {
|
|
114
114
|
...toggleStyle.thumb,
|
|
115
|
-
boxShadow:
|
|
115
|
+
boxShadow: '0px 0px 1px rgba(0, 0, 0, 0.4)',
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
'& .MuiSwitch-switchBase': {
|
|
118
118
|
...toggleStyle.switch,
|
|
119
119
|
padding: 2,
|
|
120
120
|
opacity: 1,
|
|
121
|
-
|
|
121
|
+
'&.Mui-checked': {
|
|
122
122
|
...toggleStyle.switchChecked,
|
|
123
123
|
color: handlerColor,
|
|
124
|
-
|
|
124
|
+
'& + .MuiSwitch-track': {
|
|
125
125
|
opacity: 1,
|
|
126
126
|
backgroundColor: checkedColor,
|
|
127
127
|
},
|
|
128
128
|
},
|
|
129
129
|
},
|
|
130
|
-
|
|
130
|
+
'& .Mui-disabled + .MuiSwitch-track': {
|
|
131
131
|
opacity: 1,
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
});
|
|
135
135
|
export const CommonIndeterminateToggle = styled(CommonToggle, {
|
|
136
|
-
shouldForwardProp: (props) => props !==
|
|
136
|
+
shouldForwardProp: (props) => props !== 'toggleSize',
|
|
137
137
|
})(({ toggleSize }) => {
|
|
138
138
|
const indeterminateStyle = indeterminateStyles[toggleSize];
|
|
139
139
|
return {
|
|
140
140
|
padding: 0,
|
|
141
|
-
cursor:
|
|
142
|
-
|
|
141
|
+
cursor: 'pointer',
|
|
142
|
+
'& .MuiSwitch-switchBase.Mui-checked': {
|
|
143
143
|
...indeterminateStyle.switchChecked,
|
|
144
|
-
|
|
144
|
+
'& + .MuiSwitch-track': {
|
|
145
145
|
...indeterminateStyle.track,
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
'& .MuiSwitch-thumb': {
|
|
149
149
|
...indeterminateStyle.thumb,
|
|
150
|
-
boxShadow:
|
|
150
|
+
boxShadow: 'none',
|
|
151
151
|
},
|
|
152
152
|
};
|
|
153
153
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toggle.styled.js","sourceRoot":"","sources":["../../../src/components/Toggle/Toggle.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAe,MAAM,eAAe,CAAC;AAKzE,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,CAAC;SAChB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EA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Ac,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE;IAClD,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC1E,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,iBAAiB,CAAC;IAC7E,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Toggle.styled.js","sourceRoot":"","sources":["../../../src/components/Toggle/Toggle.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,SAAS,EAAe,MAAM,eAAe,CAAC;AAKzE,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,CAAC;SAChB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;SACjB;QACD,MAAM,EAAE;YACN,UAAU,EAAE,uBAAuB;SACpC;QACD,aAAa,EAAE;YACb,SAAS,EAAE,kBAAkB;SAC9B;QACD,KAAK,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;SACX;KACF;IACD,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;SACjB;QACD,KAAK,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;YACV,YAAY,EAAE,EAAE;SACjB;QACD,MAAM,EAAE;YACN,UAAU,EAAE,uBAAuB;SACpC;QACD,aAAa,EAAE;YACb,SAAS,EAAE,kBAAkB;SAC9B;QACD,KAAK,EAAE;YACL,KAAK,EAAE,EAAE;YACT,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAG;I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CAAqC,EAAE;YACrC,GAAG,kBAAkB,CAAC,aAAa;YACnC,sBAAsB,EAAE;gBACtB,GAAG,kBAAkB,CAAC,KAAK;aAC5B;SACF;QACD,oBAAoB,EAAE;YACpB,GAAG,kBAAkB,CAAC,KAAK;YAC3B,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Toggle';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from
|
|
3
|
-
import { IconWrapper, CustomToggleButton, IconAndChildrenWrapper
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { IconWrapper, CustomToggleButton, IconAndChildrenWrapper } from './ToggleButton.styled';
|
|
4
4
|
const ToggleButton = forwardRef((props, ref) => {
|
|
5
|
-
const { kind =
|
|
5
|
+
const { kind = 'contained', size = 'small', color = 'primary', selectedColor = 'primary', className = '', icon, selected, children, ...buttonProps } = props;
|
|
6
6
|
const hasIconOnly = Boolean(icon && !children);
|
|
7
7
|
const excludeToggleGroupClass = className
|
|
8
|
-
.replace(
|
|
9
|
-
.replace(
|
|
10
|
-
return (_jsx(_Fragment, { children: kind ===
|
|
8
|
+
.replace('MuiToggleButtonGroup-grouped', '')
|
|
9
|
+
.replace('MuiToggleButtonGroup-groupedHorizontal', '');
|
|
10
|
+
return (_jsx(_Fragment, { children: kind === 'contained' || kind === 'ghost' ? (_jsx(CustomToggleButton, { ref: ref, className: `${kind} ${excludeToggleGroupClass}`, selected: selected, kind: kind, color: color, size: size, hasIconOnly: hasIconOnly, selectedColor: selectedColor, disableRipple: true, disableFocusRipple: true, ...buttonProps, children: !hasIconOnly ? (_jsx(_Fragment, { children: icon ? (_jsxs(IconAndChildrenWrapper, { children: [_jsx(IconWrapper, { size: size, hasIconOnly: hasIconOnly, children: icon }), children] })) : (children) })) : (_jsx(IconWrapper, { size: size, hasIconOnly: hasIconOnly, children: icon })) })) : (_jsx(CustomToggleButton, { ref: ref, className: `outlined ${excludeToggleGroupClass}`, selected: selected, kind: "outlined", color: "primary", size: size, hasIconOnly: hasIconOnly, selectedColor: selectedColor, disableRipple: true, disableFocusRipple: true, ...buttonProps, children: !hasIconOnly ? (_jsx(_Fragment, { children: icon ? (_jsxs(IconAndChildrenWrapper, { children: [_jsx(IconWrapper, { size: size, hasIconOnly: hasIconOnly, children: icon }), children] })) : (children) })) : (_jsx(IconWrapper, { size: size, hasIconOnly: hasIconOnly, children: icon })) })) }));
|
|
11
11
|
});
|
|
12
12
|
export default ToggleButton;
|
|
13
13
|
//# sourceMappingURL=ToggleButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGhG,MAAM,YAAY,GAAG,UAAU,CAAuC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACnF,MAAM,EACJ,IAAI,GAAG,WAAW,EAClB,IAAI,GAAG,OAAO,EACd,KAAK,GAAG,SAAS,EACjB,aAAa,GAAG,SAAS,EACzB,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,GAAG,WAAW,EACf,GAAG,KAAK,CAAC;IAEV,MAAM,WAAW,GAAG,OAAO,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AC,CAAC,CAAC,CACN,MAAC,sBAAsB,eACrB,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,YAC9C,IAAI,GACO,EACb,QAAQ,IACc,CAC1B,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACA,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,YAC9C,IAAI,GACO,CACf,GACkB,CACtB,GACA,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { styled } from
|
|
2
|
-
import { ToggleButton as MuiToggleButton } from
|
|
3
|
-
import { commonStyle, sizeStyle, kindStyle } from
|
|
1
|
+
import { styled } from '@mui/material/styles';
|
|
2
|
+
import { ToggleButton as MuiToggleButton } from '@mui/material';
|
|
3
|
+
import { commonStyle, sizeStyle, kindStyle } from '../Button/Button.styled';
|
|
4
4
|
export const CustomToggleButton = styled(MuiToggleButton, {
|
|
5
5
|
shouldForwardProp: (prop) => {
|
|
6
|
-
return ![
|
|
6
|
+
return !['icon', 'kind', 'selectedColor', 'hasIconOnly'].includes(prop);
|
|
7
7
|
},
|
|
8
8
|
})(({ theme: { typography, palette: { lunit_token }, }, kind, size, color, selectedColor, hasIconOnly, selected, }) => {
|
|
9
9
|
return {
|
|
10
|
-
border:
|
|
10
|
+
border: 'none',
|
|
11
11
|
...commonStyle({ lunit_token }),
|
|
12
12
|
...sizeStyle({ size, kind, hasIconOnly, selected, typography }),
|
|
13
13
|
...kindStyle({ kind, color, lunit_token }),
|
|
14
|
-
...(selectedColor ===
|
|
15
|
-
|
|
16
|
-
border:
|
|
14
|
+
...(selectedColor === 'primary' && {
|
|
15
|
+
'&.Mui-selected, &.Mui-selected:hover': {
|
|
16
|
+
border: 'none',
|
|
17
17
|
backgroundColor: lunit_token.component.btn_selected_primary_bg,
|
|
18
18
|
color: lunit_token.component.btn_selected_primary_text,
|
|
19
19
|
},
|
|
20
20
|
}),
|
|
21
|
-
...(selectedColor ===
|
|
22
|
-
|
|
23
|
-
border:
|
|
21
|
+
...(selectedColor === 'secondary' && {
|
|
22
|
+
'&.Mui-selected, &.Mui-selected:hover': {
|
|
23
|
+
border: 'none',
|
|
24
24
|
backgroundColor: lunit_token.component.btn_secondary_bg,
|
|
25
25
|
color: lunit_token.component.btn_selected_secondary_text,
|
|
26
26
|
},
|
|
27
27
|
}),
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
|
-
export const IconAndChildrenWrapper = styled(
|
|
31
|
-
display:
|
|
32
|
-
alignItems:
|
|
30
|
+
export const IconAndChildrenWrapper = styled('div')({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'center',
|
|
33
33
|
});
|
|
34
|
-
export const IconWrapper = styled(
|
|
35
|
-
width:
|
|
36
|
-
height:
|
|
37
|
-
marginRight: hasIconOnly ?
|
|
38
|
-
|
|
39
|
-
fontSize:
|
|
34
|
+
export const IconWrapper = styled('div')(({ hasIconOnly, size }) => ({
|
|
35
|
+
width: '20px',
|
|
36
|
+
height: '20px',
|
|
37
|
+
marginRight: hasIconOnly ? '0px' : size === 'large' ? '8px' : '4px',
|
|
38
|
+
'*:nth-of-type(1)': {
|
|
39
|
+
fontSize: '20px',
|
|
40
40
|
},
|
|
41
41
|
}));
|
|
42
42
|
//# sourceMappingURL=ToggleButton.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.styled.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/ToggleButton.styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAI5E,MAAM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,sCAAsC,EAAE;gBACtC,MAAM,EAAE,MAAM;gBACd,eAAe,EAAE,WAAW,CAAC,SAAS,CAAC,uBAAuB;gBAC9D,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,yBAAyB;aACvD;SACF,CAAC;QACF,GAAG,CAAC,aAAa,KAAK,WAAW,IAAI;YACnC,sCAAsC,EAAE;gBACtC,MAAM,EAAE,MAAM;gBACd,eAAe,EAAE,WAAW,CAAC,SAAS,CAAC,gBAAgB;gBACvD,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,2BAA2B;aACzD;SACF,CAAC;KACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAClD,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;CACrB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAGrC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;IAEnE,kBAAkB,EAAE;QAClB,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './ToggleButton';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import MuiToggleButtonGroup from
|
|
3
|
-
const ToggleButtonGroup = ({ size =
|
|
2
|
+
import MuiToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
3
|
+
const ToggleButtonGroup = ({ size = 'small', ...props }) => {
|
|
4
4
|
return _jsx(MuiToggleButtonGroup, { size: size, ...props });
|
|
5
5
|
};
|
|
6
6
|
export default ToggleButtonGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButtonGroup.js","sourceRoot":"","sources":["../../../src/components/ToggleButtonGroup/ToggleButtonGroup.tsx"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.js","sourceRoot":"","sources":["../../../src/components/ToggleButtonGroup/ToggleButtonGroup.tsx"],"names":[],"mappings":";AACA,OAAO,oBAAgD,MAAM,iCAAiC,CAAC;AAE/F,MAAM,iBAAiB,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,EAAE,GAAG,KAAK,EAA0B,EAAE,EAAE;IACjF,OAAO,KAAC,oBAAoB,IAAC,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAAC;AACzD,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './ToggleButtonGroup';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Tooltip';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../src/components/Typography/Typography.tsx"],"names":[],"mappings":";AACA,OAAO,aAAa,MAAM,0BAA0B,CAAC;AASrD,MAAM,UAAU,GAAG,CAA8B,KAA4C,EAAE,EAAE;IAC/F,OAAO,KAAC,aAAa,OAAK,KAAK,GAAI,CAAC;AACtC,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './Typography';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import paletteOptions from
|
|
2
|
-
import { createCSSVarNames, createCSSVars } from
|
|
1
|
+
import paletteOptions from '../colors';
|
|
2
|
+
import { createCSSVarNames, createCSSVars } from './utils';
|
|
3
3
|
export const shadows = {
|
|
4
4
|
shadow1: `0px 4px 8px ${paletteOptions.lunit_token.core.shadow_01}`,
|
|
5
5
|
shadow2: `0px 3px 12px ${paletteOptions.lunit_token.core.shadow_02}`,
|
|
@@ -8,7 +8,7 @@ export const shadows = {
|
|
|
8
8
|
};
|
|
9
9
|
const shadowVars = createCSSVarNames(shadows);
|
|
10
10
|
export const elevations = {
|
|
11
|
-
elevation_00:
|
|
11
|
+
elevation_00: 'none',
|
|
12
12
|
elevation_01: `${shadowVars.shadow1}, ${shadowVars.shadow2}`,
|
|
13
13
|
elevation_02: `${shadowVars.shadow3}, ${shadowVars.shadow4}`,
|
|
14
14
|
};
|
|
@@ -19,47 +19,47 @@ export const elevationOptions = {
|
|
|
19
19
|
export const createElevationCssBaseline = () => {
|
|
20
20
|
return {
|
|
21
21
|
// :root에 모든 theme이 정의되어 있지 않으므로 surface*에서 찾아야 함
|
|
22
|
-
|
|
22
|
+
'.light1, .light2, .dark1, .dark2': {
|
|
23
23
|
...createCSSVars(shadows),
|
|
24
24
|
...createCSSVars(elevations),
|
|
25
25
|
// `--elevation-shadow`가 정의되지 않아도 `box-shadow: var(--elevation-shadow)` 구문을 해석하려면 필요함
|
|
26
|
-
|
|
26
|
+
'--elevation-shadow': 'none',
|
|
27
27
|
},
|
|
28
28
|
// Default component styles
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
'.MuiPaper-root': {
|
|
30
|
+
'--elevation-shadow': elevationOptions.elevation_02,
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
'.MuiDialog-paper': {
|
|
33
|
+
'--elevation-shadow': elevationOptions.elevation_02,
|
|
34
34
|
},
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
'.MuiPopover-paper': {
|
|
36
|
+
'--elevation-shadow': elevationOptions.elevation_02,
|
|
37
37
|
},
|
|
38
38
|
// Date Range Picker, Select 등의 Menu element는 MuiMenu-paper에서 상속
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
'.MuiMenu-paper': {
|
|
40
|
+
'--elevation-shadow': elevationOptions.elevation_01,
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
'.MuiTooltip-tooltip': {
|
|
43
|
+
'--elevation-shadow': elevationOptions.elevation_01,
|
|
44
44
|
},
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
'.MuiAlert-root': {
|
|
46
|
+
'--elevation-shadow': elevationOptions.elevation_02,
|
|
47
47
|
},
|
|
48
48
|
// Alternative to Paper `elevation` prop
|
|
49
|
-
|
|
50
|
-
boxShadow:
|
|
49
|
+
'.elevation0, .elevation1, .elevation2': {
|
|
50
|
+
boxShadow: 'var(--elevation-shadow)',
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
boxShadow:
|
|
52
|
+
'.elevation3, .elevation4, .elevation5, .elevation6, .elevation7, .elevation8, .elevation9, .elevation10, .elevation11, .elevation12, .elevation13, .elevation14, .elevation15, .elevation16, .elevation17, .elevation18, .elevation19, .elevation20, .elevation21, .elevation22, .elevation23, .elevation24': {
|
|
53
|
+
boxShadow: 'none',
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
'.elevation0': {
|
|
56
|
+
'--elevation-shadow': elevationOptions.elevation_00,
|
|
57
57
|
},
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
'.elevation1': {
|
|
59
|
+
'--elevation-shadow': elevationOptions.elevation_01,
|
|
60
60
|
},
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
'.elevation2': {
|
|
62
|
+
'--elevation-shadow': elevationOptions.elevation_02,
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
};
|
|
@@ -2,7 +2,7 @@ export const createCSSVars = (tokens) => Object.entries(tokens).reduce((vars, [n
|
|
|
2
2
|
vars[`--${name}`] = value;
|
|
3
3
|
return vars;
|
|
4
4
|
}, {});
|
|
5
|
-
export const createCSSVarNames = (tokens) => Object.entries(tokens).reduce((vars, [name
|
|
5
|
+
export const createCSSVarNames = (tokens) => Object.entries(tokens).reduce((vars, [name]) => {
|
|
6
6
|
vars[name] = `var(--${name})`;
|
|
7
7
|
return vars;
|
|
8
8
|
}, {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/foundation/Elevation/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAmC,MAAS,EAAE,EAAE,CAC3E,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/foundation/Elevation/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAmC,MAAS,EAAE,EAAE,CAC3E,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAC3B,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;IACtB,IAAI,CAAC,KAAK,IAAI,EAAa,CAAC,GAAG,KAAK,CAAC;IACrC,OAAO,IAAI,CAAC;AACd,CAAC,EACD,EAA6B,CAC9B,CAAC;AAEJ,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAmC,MAAS,EAAE,EAAE,CAC/E,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAC3B,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;IACf,IAAI,CAAC,IAAe,CAAC,GAAG,SAAS,IAAI,GAAG,CAAC;IACzC,OAAO,IAAI,CAAC;AACd,CAAC,EACD,EAA6B,CAC9B,CAAC"}
|