@lunit/design-system 1.0.0-a.1 → 1.0.0-a.2
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/dist/cjs/components/Alert/index.js +2 -0
- package/dist/cjs/components/Alert/index.js.map +1 -0
- package/dist/cjs/components/Button/index.js +2 -0
- package/dist/cjs/components/Button/index.js.map +1 -0
- package/dist/cjs/components/Checkbox/index.js +2 -0
- package/dist/cjs/components/Checkbox/index.js.map +1 -0
- package/dist/cjs/components/Chip/index.js +2 -0
- package/dist/cjs/components/Chip/index.js.map +1 -0
- package/dist/cjs/components/DataTable/index.js +2 -0
- package/dist/cjs/components/DataTable/index.js.map +1 -0
- package/dist/cjs/components/DatePicker/index.js +2 -0
- package/dist/cjs/components/DatePicker/index.js.map +1 -0
- package/dist/cjs/components/Dropdown/index.js +2 -0
- package/dist/cjs/components/Dropdown/index.js.map +1 -0
- package/dist/cjs/components/FormLabel/index.js +2 -0
- package/dist/cjs/components/FormLabel/index.js.map +1 -0
- package/dist/cjs/components/Modal/index.js +2 -0
- package/dist/cjs/components/Modal/index.js.map +1 -0
- package/dist/cjs/components/Radio/index.js +2 -0
- package/dist/cjs/components/Radio/index.js.map +1 -0
- package/dist/cjs/components/RadioGroup/index.js +2 -0
- package/dist/cjs/components/RadioGroup/index.js.map +1 -0
- package/dist/cjs/components/TextField/index.js +2 -0
- package/dist/cjs/components/TextField/index.js.map +1 -0
- package/dist/cjs/components/Toggle/index.js +2 -0
- package/dist/cjs/components/Toggle/index.js.map +1 -0
- package/dist/cjs/components/ToggleButton/index.js +2 -0
- package/dist/cjs/components/ToggleButton/index.js.map +1 -0
- package/dist/cjs/components/Tooltip/index.js +2 -0
- package/dist/cjs/components/Tooltip/index.js.map +1 -0
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/Alert/Alert.js +7 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Alert/index.js.map +1 -1
- package/dist/components/Button/Button.js +9 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.styled.js +170 -0
- package/dist/components/Button/Button.styled.js.map +1 -0
- package/dist/components/Button/Button.types.js +2 -0
- package/dist/components/Button/Button.types.js.map +1 -0
- package/dist/components/Button/const.js +3 -0
- package/dist/components/Button/const.js.map +1 -0
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js +23 -0
- package/dist/components/Button/utils/getButtonPaddingBySizeAndKind.js.map +1 -0
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js +23 -0
- package/dist/components/Button/utils/getIconButtonPaddingBySizeAndKind.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.js +49 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Chip/Chip.js +70 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/Chip.styled.js +143 -0
- package/dist/components/Chip/Chip.styled.js.map +1 -0
- package/dist/components/Chip/Chip.types.js +2 -0
- package/dist/components/Chip/Chip.types.js.map +1 -0
- package/dist/components/Chip/consts.js +8 -0
- package/dist/components/Chip/consts.js.map +1 -0
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/Chip/index.js.map +1 -1
- package/dist/components/DataTable/DataTable.js +7 -0
- package/dist/components/DataTable/DataTable.js.map +1 -0
- package/dist/components/DataTable/index.js +1 -1
- package/dist/components/DataTable/index.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +7 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/DatePicker/index.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +7 -0
- package/dist/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/FormLabel/FormLabel.js +7 -0
- package/dist/components/FormLabel/FormLabel.js.map +1 -0
- package/dist/components/FormLabel/FormLabel.styled.js +8 -0
- package/dist/components/FormLabel/FormLabel.styled.js.map +1 -0
- package/dist/components/FormLabel/index.js +1 -1
- package/dist/components/FormLabel/index.js.map +1 -1
- package/dist/components/Modal/Modal.js +7 -0
- package/dist/components/Modal/Modal.js.map +1 -0
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Radio/Radio.js +43 -0
- package/dist/components/Radio/Radio.js.map +1 -0
- package/dist/components/Radio/index.js +1 -1
- package/dist/components/Radio/index.js.map +1 -1
- package/dist/components/RadioGroup/index.js +2 -1
- package/dist/components/RadioGroup/index.js.map +1 -1
- package/dist/components/TextField/TextField.js +7 -0
- package/dist/components/TextField/TextField.js.map +1 -0
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/TextField/index.js.map +1 -1
- package/dist/components/Toggle/Toggle.js +13 -0
- package/dist/components/Toggle/Toggle.js.map +1 -0
- package/dist/components/Toggle/Toggle.styled.js +155 -0
- package/dist/components/Toggle/Toggle.styled.js.map +1 -0
- package/dist/components/Toggle/Toggle.types.js +2 -0
- package/dist/components/Toggle/Toggle.types.js.map +1 -0
- package/dist/components/Toggle/index.js +1 -1
- package/dist/components/Toggle/index.js.map +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +12 -0
- package/dist/components/ToggleButton/ToggleButton.js.map +1 -0
- package/dist/components/ToggleButton/ToggleButton.styled.js +35 -0
- package/dist/components/ToggleButton/ToggleButton.styled.js.map +1 -0
- package/dist/components/ToggleButton/ToggleButton.types.js +2 -0
- package/dist/components/ToggleButton/ToggleButton.types.js.map +1 -0
- package/dist/components/ToggleButton/index.js +1 -1
- package/dist/components/ToggleButton/index.js.map +1 -1
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js +7 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.js.map +1 -0
- package/dist/components/ToggleButtonGroup/index.js +2 -0
- package/dist/components/ToggleButtonGroup/index.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.js +7 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/index.js +1 -1
- package/dist/components/Tooltip/index.js.map +1 -1
- package/dist/components/index.js +7 -0
- package/dist/components/index.js.map +1 -0
- package/dist/foundation/Elevation/index.js +66 -0
- package/dist/foundation/Elevation/index.js.map +1 -0
- package/dist/foundation/Elevation/utils.js +9 -0
- package/dist/foundation/Elevation/utils.js.map +1 -0
- package/dist/foundation/Typography/index.js +62 -0
- package/dist/foundation/Typography/index.js.map +1 -0
- package/dist/foundation/Typography/tokens.js +155 -0
- package/dist/foundation/Typography/tokens.js.map +1 -0
- package/dist/foundation/colors/base/blue.js +26 -0
- package/dist/foundation/colors/base/blue.js.map +1 -0
- package/dist/foundation/colors/base/green.js +26 -0
- package/dist/foundation/colors/base/green.js.map +1 -0
- package/dist/foundation/colors/base/grey.js +36 -0
- package/dist/foundation/colors/base/grey.js.map +1 -0
- package/dist/foundation/colors/base/index.js +12 -0
- package/dist/foundation/colors/base/index.js.map +1 -0
- package/dist/foundation/colors/base/lunitGreen.js +26 -0
- package/dist/foundation/colors/base/lunitGreen.js.map +1 -0
- package/dist/foundation/colors/base/lunitTeal.js +26 -0
- package/dist/foundation/colors/base/lunitTeal.js.map +1 -0
- package/dist/foundation/colors/base/magenta.js +26 -0
- package/dist/foundation/colors/base/magenta.js.map +1 -0
- package/dist/foundation/colors/base/opacity.js +7 -0
- package/dist/foundation/colors/base/opacity.js.map +1 -0
- package/dist/foundation/colors/base/orange.js +26 -0
- package/dist/foundation/colors/base/orange.js.map +1 -0
- package/dist/foundation/colors/base/purple.js +26 -0
- package/dist/foundation/colors/base/purple.js.map +1 -0
- package/dist/foundation/colors/base/red.js +26 -0
- package/dist/foundation/colors/base/red.js.map +1 -0
- package/dist/foundation/colors/base/yellow.js +26 -0
- package/dist/foundation/colors/base/yellow.js.map +1 -0
- package/dist/foundation/colors/index.js +188 -0
- package/dist/foundation/colors/index.js.map +1 -0
- package/dist/foundation/colors/token/component.js +449 -0
- package/dist/foundation/colors/token/component.js.map +1 -0
- package/dist/foundation/colors/token/core.js +199 -0
- package/dist/foundation/colors/token/core.js.map +1 -0
- package/dist/foundation/colors/token/index.js +3 -0
- package/dist/foundation/colors/token/index.js.map +1 -0
- package/dist/foundation/colors/token/types.js +2 -0
- package/dist/foundation/colors/token/types.js.map +1 -0
- package/dist/foundation/colors/types.js +2 -0
- package/dist/foundation/colors/types.js.map +1 -0
- package/dist/foundation/index.js +13 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/foundation/spacing.js +2 -0
- package/dist/foundation/spacing.js.map +1 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/theme.js +34 -0
- package/dist/theme.js.map +1 -0
- package/dist/types/components/Chip/Chip.styled.d.ts +79 -0
- package/package.json +19 -10
- package/src/components/Alert/Alert.tsx +9 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Button/Button.styled.ts +220 -0
- package/src/components/Button/Button.tsx +54 -0
- package/src/components/Button/Button.types.ts +25 -0
- package/src/components/Button/const.ts +2 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Button/utils/getButtonPaddingBySizeAndKind.ts +35 -0
- package/src/components/Button/utils/getIconButtonPaddingBySizeAndKind.ts +38 -0
- package/src/components/Checkbox/Checkbox.tsx +67 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/Chip.styled.ts +162 -0
- package/src/components/Chip/Chip.tsx +132 -0
- package/src/components/Chip/Chip.types.ts +56 -0
- package/src/components/Chip/consts.ts +7 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/DataTable/DataTable.tsx +8 -0
- package/src/components/DataTable/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.tsx +8 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/Dropdown/Dropdown.tsx +11 -0
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/FormLabel/FormLabel.styled.ts +8 -0
- package/src/components/FormLabel/FormLabel.tsx +9 -0
- package/src/components/FormLabel/index.ts +1 -0
- package/src/components/Modal/Modal.tsx +8 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/Radio/Radio.tsx +58 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/RadioGroup/index.ts +2 -0
- package/src/components/TextField/TextField.tsx +8 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/Toggle/Toggle.styled.ts +162 -0
- package/src/components/Toggle/Toggle.tsx +18 -0
- package/src/components/Toggle/Toggle.types.ts +14 -0
- package/src/components/Toggle/index.ts +1 -0
- package/src/components/ToggleButton/ToggleButton.styled.ts +58 -0
- package/src/components/ToggleButton/ToggleButton.tsx +89 -0
- package/src/components/ToggleButton/ToggleButton.types.ts +28 -0
- package/src/components/ToggleButton/index.ts +1 -0
- package/src/components/ToggleButtonGroup/ToggleButtonGroup.tsx +13 -0
- package/src/components/ToggleButtonGroup/index.tsx +1 -0
- package/src/components/Tooltip/Tooltip.tsx +9 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/index.ts +9 -0
- package/src/foundation/Elevation/index.ts +72 -0
- package/src/foundation/Elevation/utils.ts +11 -0
- package/src/foundation/Typography/index.ts +96 -0
- package/src/foundation/Typography/tokens.ts +162 -0
- package/src/foundation/colors/base/blue.ts +27 -0
- package/src/foundation/colors/base/green.ts +27 -0
- package/src/foundation/colors/base/grey.ts +36 -0
- package/src/foundation/colors/base/index.ts +11 -0
- package/src/foundation/colors/base/lunitGreen.ts +27 -0
- package/src/foundation/colors/base/lunitTeal.ts +27 -0
- package/src/foundation/colors/base/magenta.ts +27 -0
- package/src/foundation/colors/base/opacity.ts +6 -0
- package/src/foundation/colors/base/orange.ts +27 -0
- package/src/foundation/colors/base/purple.ts +27 -0
- package/src/foundation/colors/base/red.ts +27 -0
- package/src/foundation/colors/base/yellow.ts +27 -0
- package/src/foundation/colors/index.ts +235 -0
- package/src/foundation/colors/token/component.ts +456 -0
- package/src/foundation/colors/token/core.ts +204 -0
- package/src/foundation/colors/token/index.ts +2 -0
- package/src/foundation/colors/token/types.ts +8 -0
- package/src/foundation/colors/types.ts +85 -0
- package/src/foundation/index.ts +25 -0
- package/src/foundation/spacing.ts +3 -0
- package/src/index.ts +17 -0
- package/src/stories/components/Alert/Alert.stories.tsx +13 -0
- package/src/stories/components/Button/BasicButton.stories.tsx +177 -0
- package/src/stories/components/Button/IconButton.stories.tsx +128 -0
- package/src/stories/components/Button/Kind.stories.tsx +514 -0
- package/src/stories/components/Chip/Chip.stories.tsx +196 -0
- package/src/stories/components/DataTable/DataTable.stories.tsx +13 -0
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +13 -0
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +15 -0
- package/src/stories/components/Modal/Modal.stories.tsx +13 -0
- package/src/stories/components/SelectControl/Checkbox.stories.tsx +248 -0
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +67 -0
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +91 -0
- package/src/stories/components/SelectControl/Toggle.stories.tsx +429 -0
- package/src/stories/components/TextField/TextField.stories.tsx +13 -0
- package/src/stories/components/ToggleButton/Basic.stories.tsx +342 -0
- package/src/stories/components/ToggleButton/Group.stories.tsx +221 -0
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +698 -0
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +293 -0
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +13 -0
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +264 -0
- package/src/stories/foundation/Elevation/styled.ts +12 -0
- package/src/stories/foundation/Typography/Typography.stories.mdx +71 -0
- package/src/stories/foundation/Typography/Typography.stories.tsx +91 -0
- package/src/stories/foundation/Typography/TypographyGroup.tsx +71 -0
- package/src/stories/foundation/Typography/const.ts +25 -0
- package/src/stories/foundation/colors/Colors.stories.tsx +64 -0
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +167 -0
- package/src/stories/foundation/colors/Token.stories.tsx +190 -0
- package/src/stories/foundation/colors/styled.ts +39 -0
- package/src/theme.ts +41 -0
- package/src/types.d.ts +4 -0
- package/tsconfig.build.json +2 -0
- package/dist/components/Chip/Chip.styled.d.ts +0 -41
- package/dist/components/HelloWorld/HelloWorld.d.ts +0 -28
- package/webpack.config.js +0 -51
- /package/dist/{components → types/components}/Alert/Alert.d.ts +0 -0
- /package/dist/{components → types/components}/Alert/index.d.ts +0 -0
- /package/dist/{components → types/components}/Button/Button.d.ts +0 -0
- /package/dist/{components → types/components}/Button/Button.styled.d.ts +0 -0
- /package/dist/{components → types/components}/Button/Button.types.d.ts +0 -0
- /package/dist/{components → types/components}/Button/const.d.ts +0 -0
- /package/dist/{components → types/components}/Button/index.d.ts +0 -0
- /package/dist/{components → types/components}/Button/utils/getButtonPaddingBySizeAndKind.d.ts +0 -0
- /package/dist/{components → types/components}/Button/utils/getIconButtonPaddingBySizeAndKind.d.ts +0 -0
- /package/dist/{components → types/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{components → types/components}/Checkbox/index.d.ts +0 -0
- /package/dist/{components → types/components}/Chip/Chip.d.ts +0 -0
- /package/dist/{components → types/components}/Chip/Chip.types.d.ts +0 -0
- /package/dist/{components → types/components}/Chip/consts.d.ts +0 -0
- /package/dist/{components → types/components}/Chip/index.d.ts +0 -0
- /package/dist/{components → types/components}/DataTable/DataTable.d.ts +0 -0
- /package/dist/{components → types/components}/DataTable/index.d.ts +0 -0
- /package/dist/{components → types/components}/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{components → types/components}/DatePicker/index.d.ts +0 -0
- /package/dist/{components → types/components}/Dropdown/Dropdown.d.ts +0 -0
- /package/dist/{components → types/components}/Dropdown/index.d.ts +0 -0
- /package/dist/{components → types/components}/FormLabel/FormLabel.d.ts +0 -0
- /package/dist/{components → types/components}/FormLabel/FormLabel.styled.d.ts +0 -0
- /package/dist/{components → types/components}/FormLabel/index.d.ts +0 -0
- /package/dist/{components → types/components}/Modal/Modal.d.ts +0 -0
- /package/dist/{components → types/components}/Modal/index.d.ts +0 -0
- /package/dist/{components → types/components}/Radio/Radio.d.ts +0 -0
- /package/dist/{components → types/components}/Radio/index.d.ts +0 -0
- /package/dist/{components → types/components}/RadioGroup/index.d.ts +0 -0
- /package/dist/{components → types/components}/TextField/TextField.d.ts +0 -0
- /package/dist/{components → types/components}/TextField/index.d.ts +0 -0
- /package/dist/{components → types/components}/Toggle/Toggle.d.ts +0 -0
- /package/dist/{components → types/components}/Toggle/Toggle.styled.d.ts +0 -0
- /package/dist/{components → types/components}/Toggle/Toggle.types.d.ts +0 -0
- /package/dist/{components → types/components}/Toggle/index.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButton/ToggleButton.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButton/ToggleButton.styled.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButton/ToggleButton.types.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButton/index.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButtonGroup/ToggleButtonGroup.d.ts +0 -0
- /package/dist/{components → types/components}/ToggleButtonGroup/index.d.ts +0 -0
- /package/dist/{components → types/components}/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{components → types/components}/Tooltip/index.d.ts +0 -0
- /package/dist/{components → types/components}/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/Elevation/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/Elevation/utils.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/Typography/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/Typography/tokens.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/blue.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/green.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/grey.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/lunitGreen.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/lunitTeal.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/magenta.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/opacity.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/orange.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/purple.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/red.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/base/yellow.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/token/component.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/token/core.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/token/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/token/types.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/colors/types.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/index.d.ts +0 -0
- /package/dist/{foundation → types/foundation}/spacing.d.ts +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{theme.d.ts → types/theme.d.ts} +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
type CSSPropertyColor = React.CSSProperties["color"];
|
|
2
|
+
|
|
3
|
+
export interface ColorToken {
|
|
4
|
+
core: {
|
|
5
|
+
bg_01: CSSPropertyColor;
|
|
6
|
+
bg_02: CSSPropertyColor;
|
|
7
|
+
bg_03: CSSPropertyColor;
|
|
8
|
+
text_primary: CSSPropertyColor;
|
|
9
|
+
text_normal: CSSPropertyColor;
|
|
10
|
+
text_medium: CSSPropertyColor;
|
|
11
|
+
text_light: CSSPropertyColor;
|
|
12
|
+
text_error: CSSPropertyColor;
|
|
13
|
+
text_success: CSSPropertyColor;
|
|
14
|
+
text_warning: CSSPropertyColor;
|
|
15
|
+
text_info: CSSPropertyColor;
|
|
16
|
+
link_primary: CSSPropertyColor;
|
|
17
|
+
link_hover: CSSPropertyColor;
|
|
18
|
+
link_visited: CSSPropertyColor;
|
|
19
|
+
icon_error_02: CSSPropertyColor;
|
|
20
|
+
icon_success_02: CSSPropertyColor;
|
|
21
|
+
icon_warning_02: CSSPropertyColor;
|
|
22
|
+
icon_info_02: CSSPropertyColor;
|
|
23
|
+
hover: CSSPropertyColor;
|
|
24
|
+
focused: CSSPropertyColor;
|
|
25
|
+
shadow_01: CSSPropertyColor;
|
|
26
|
+
shadow_02: CSSPropertyColor;
|
|
27
|
+
shadow_03: CSSPropertyColor;
|
|
28
|
+
shadow_04: CSSPropertyColor;
|
|
29
|
+
};
|
|
30
|
+
component: {
|
|
31
|
+
btn_contained_primary_bg: CSSPropertyColor;
|
|
32
|
+
btn_contained_primary_text: CSSPropertyColor;
|
|
33
|
+
btn_contained_secondary_bg: CSSPropertyColor;
|
|
34
|
+
btn_contained_secondary_text: CSSPropertyColor;
|
|
35
|
+
btn_contained_error_bg: CSSPropertyColor;
|
|
36
|
+
btn_contained_error_text: CSSPropertyColor;
|
|
37
|
+
btn_outlined_primary_border: CSSPropertyColor;
|
|
38
|
+
btn_outlined_primary_text: CSSPropertyColor;
|
|
39
|
+
btn_ghost_primary_text: CSSPropertyColor;
|
|
40
|
+
btn_ghost_secondary_text: CSSPropertyColor;
|
|
41
|
+
btn_ghost_error_text: CSSPropertyColor;
|
|
42
|
+
btn_selected_primary_bg: CSSPropertyColor;
|
|
43
|
+
btn_selected_primary_text: CSSPropertyColor;
|
|
44
|
+
btn_selected_secondary_bg: CSSPropertyColor;
|
|
45
|
+
btn_selected_secondary_text: CSSPropertyColor;
|
|
46
|
+
selectcontrol_on: CSSPropertyColor;
|
|
47
|
+
selectcontrol_off: CSSPropertyColor;
|
|
48
|
+
selectcontrol_handler: CSSPropertyColor;
|
|
49
|
+
selectcontrol_handler_shadow: CSSPropertyColor;
|
|
50
|
+
textfield_bg: CSSPropertyColor;
|
|
51
|
+
textfield_border_error: CSSPropertyColor;
|
|
52
|
+
dropdown_option_selected: CSSPropertyColor;
|
|
53
|
+
dropdown_divider_border: CSSPropertyColor;
|
|
54
|
+
dropdown_option_activatied: CSSPropertyColor;
|
|
55
|
+
datatable_cell_selected: CSSPropertyColor;
|
|
56
|
+
datatable_border_01: CSSPropertyColor;
|
|
57
|
+
datatable_border_02: CSSPropertyColor;
|
|
58
|
+
datatable_zebra: CSSPropertyColor;
|
|
59
|
+
scrollbars_bg: CSSPropertyColor;
|
|
60
|
+
scrollbars_hover: CSSPropertyColor;
|
|
61
|
+
scrollbars_pressed: CSSPropertyColor;
|
|
62
|
+
modal_overlay: CSSPropertyColor;
|
|
63
|
+
tooltip_bg: CSSPropertyColor;
|
|
64
|
+
tooltip_text_normal: CSSPropertyColor;
|
|
65
|
+
tooltip_text_medium: CSSPropertyColor;
|
|
66
|
+
alert_error_bg: CSSPropertyColor;
|
|
67
|
+
alert_error_border: CSSPropertyColor;
|
|
68
|
+
alert_success_bg: CSSPropertyColor;
|
|
69
|
+
alert_success_border: CSSPropertyColor;
|
|
70
|
+
alert_info_bg: CSSPropertyColor;
|
|
71
|
+
alert_info_border: CSSPropertyColor;
|
|
72
|
+
alert_warning_bg: CSSPropertyColor;
|
|
73
|
+
alert_warning_border: CSSPropertyColor;
|
|
74
|
+
chip_primary_bg: CSSPropertyColor;
|
|
75
|
+
chip_primary_text: CSSPropertyColor;
|
|
76
|
+
chip_secondary_bg: CSSPropertyColor;
|
|
77
|
+
chip_secondary_text: CSSPropertyColor;
|
|
78
|
+
chip_error_bg: CSSPropertyColor;
|
|
79
|
+
chip_error_text: CSSPropertyColor;
|
|
80
|
+
chip_warning_bg: CSSPropertyColor;
|
|
81
|
+
chip_warning_text: CSSPropertyColor;
|
|
82
|
+
chip_success_bg: CSSPropertyColor;
|
|
83
|
+
chip_success_text: CSSPropertyColor;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Components, Theme } from "@mui/material";
|
|
2
|
+
import { deepmerge } from "@mui/utils";
|
|
3
|
+
import paletteOptions, { createColorCssBaseline } from "./colors";
|
|
4
|
+
import typographyOptions, {
|
|
5
|
+
createTypographyCssBaseline,
|
|
6
|
+
typographyDefaultProps,
|
|
7
|
+
} from "./Typography";
|
|
8
|
+
import { createElevationCssBaseline, elevationOptions } from "./Elevation";
|
|
9
|
+
|
|
10
|
+
export const foundationCssBaseline: Components<Theme>["MuiCssBaseline"] = {
|
|
11
|
+
styleOverrides: deepmerge(
|
|
12
|
+
deepmerge(createTypographyCssBaseline(), createColorCssBaseline()),
|
|
13
|
+
createElevationCssBaseline()
|
|
14
|
+
),
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const typography = typographyOptions;
|
|
18
|
+
|
|
19
|
+
export { typographyDefaultProps };
|
|
20
|
+
|
|
21
|
+
export const palette = paletteOptions;
|
|
22
|
+
|
|
23
|
+
export const elevation = elevationOptions;
|
|
24
|
+
|
|
25
|
+
export { spacing } from "./spacing";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as theme } from "./theme";
|
|
2
|
+
|
|
3
|
+
export { default as Alert } from "./components/Alert";
|
|
4
|
+
export { default as Button } from "./components/Button";
|
|
5
|
+
export { default as Chip } from "./components/Chip";
|
|
6
|
+
export { default as DataTable } from "./components/DataTable";
|
|
7
|
+
export { default as DatePicker } from "./components/DatePicker";
|
|
8
|
+
export { default as Dropdown } from "./components/Dropdown";
|
|
9
|
+
export { default as FormLabel } from "./components/FormLabel";
|
|
10
|
+
export { default as Modal } from "./components/Modal";
|
|
11
|
+
export { default as Radio } from "./components/Radio";
|
|
12
|
+
export { default as RadioGroup } from "./components/RadioGroup";
|
|
13
|
+
export { default as TextField } from "./components/TextField";
|
|
14
|
+
export { default as Toggle } from "./components/Toggle";
|
|
15
|
+
export { default as ToggleButton } from "./components/ToggleButton";
|
|
16
|
+
export { default as ToggleButtonGroup } from "./components/ToggleButtonGroup";
|
|
17
|
+
export { default as Tooltip } from "./components/Tooltip";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
+
|
|
4
|
+
import Alert from "@/components/Alert";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Alert",
|
|
8
|
+
component: Alert,
|
|
9
|
+
} as ComponentMeta<typeof Alert>;
|
|
10
|
+
|
|
11
|
+
const Template: ComponentStory<typeof Alert> = () => <Alert />;
|
|
12
|
+
|
|
13
|
+
export const LunitAlert = Template.bind({});
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { action } from "@storybook/addon-actions";
|
|
3
|
+
import {
|
|
4
|
+
Table,
|
|
5
|
+
TableHead,
|
|
6
|
+
TableRow,
|
|
7
|
+
TableBody,
|
|
8
|
+
TableCell,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import { Bell } from "@lunit/design-system-icons";
|
|
11
|
+
|
|
12
|
+
import Button from "@/components/Button";
|
|
13
|
+
|
|
14
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
15
|
+
import type { ButtonProps } from "@/components/Button/Button.types";
|
|
16
|
+
|
|
17
|
+
type Size = Pick<ButtonProps, "size">;
|
|
18
|
+
type SizeValues = Size[keyof Size];
|
|
19
|
+
const sizeList: SizeValues[] = ["small", "medium", "large"];
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: "Components/Button",
|
|
23
|
+
component: Button,
|
|
24
|
+
argTypes: {
|
|
25
|
+
icon: {
|
|
26
|
+
control: false,
|
|
27
|
+
description: `Use this prop when you want to add icon.
|
|
28
|
+
\n It is added to the left of the text criteria,
|
|
29
|
+
\n and only Icon can be checked when used with hasIconOnly.`,
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: { summary: "undefined" },
|
|
32
|
+
type: { summary: "React.ReactNode" },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
hasIconOnly: {
|
|
36
|
+
control: {
|
|
37
|
+
type: "boolean",
|
|
38
|
+
},
|
|
39
|
+
description: `Option to handle so that only icons can be inserted
|
|
40
|
+
\n If set to false, you can add Text.`,
|
|
41
|
+
defaultValue: false,
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: { summary: "false" },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
children: {
|
|
47
|
+
type: "string",
|
|
48
|
+
defaultValue: "Text",
|
|
49
|
+
},
|
|
50
|
+
kind: {
|
|
51
|
+
control: {
|
|
52
|
+
type: "radio",
|
|
53
|
+
},
|
|
54
|
+
options: ["contained", "outlined", "ghost"],
|
|
55
|
+
description: "Button has three Kinds Contained, Outlined, Ghost",
|
|
56
|
+
defaultValue: "contained",
|
|
57
|
+
table: {
|
|
58
|
+
defaultValue: { summary: "contained" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
color: {
|
|
62
|
+
control: {
|
|
63
|
+
type: "radio",
|
|
64
|
+
},
|
|
65
|
+
options: ["primary", "secondary", "error"],
|
|
66
|
+
defaultValue: "primary",
|
|
67
|
+
table: {
|
|
68
|
+
defaultValue: { summary: "primary" },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
disabled: {
|
|
72
|
+
control: {
|
|
73
|
+
type: "boolean",
|
|
74
|
+
},
|
|
75
|
+
defaultValue: false,
|
|
76
|
+
table: {
|
|
77
|
+
defaultValue: { summary: "false" },
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
size: {
|
|
81
|
+
control: {
|
|
82
|
+
type: "radio",
|
|
83
|
+
},
|
|
84
|
+
options: ["small", "medium", "large"],
|
|
85
|
+
defaultValue: "small",
|
|
86
|
+
table: {
|
|
87
|
+
defaultValue: { summary: "small" },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
onClick: {
|
|
91
|
+
type: "function",
|
|
92
|
+
control: {
|
|
93
|
+
type: "radio",
|
|
94
|
+
},
|
|
95
|
+
options: ["function", undefined],
|
|
96
|
+
mapping: {
|
|
97
|
+
function: action("onClick"),
|
|
98
|
+
undefined: undefined,
|
|
99
|
+
},
|
|
100
|
+
defaultValue: "function",
|
|
101
|
+
description:
|
|
102
|
+
"It is a callback function that is called when the button is clicked.",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
parameters: {
|
|
106
|
+
controls: {
|
|
107
|
+
include: [
|
|
108
|
+
"onClick",
|
|
109
|
+
"children",
|
|
110
|
+
"disabled",
|
|
111
|
+
"size",
|
|
112
|
+
"kind",
|
|
113
|
+
"color",
|
|
114
|
+
"icon",
|
|
115
|
+
"hasIconOnly",
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
docs: {
|
|
119
|
+
description: {
|
|
120
|
+
component: `It is a Clickable default Button. For more details, please
|
|
121
|
+
see [Material-UI Button](https://mui.com/material-ui/react-button/).`,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
} as ComponentMeta<typeof Button>;
|
|
126
|
+
|
|
127
|
+
export const BasicButton: ComponentStory<typeof Button> = (args) => (
|
|
128
|
+
<Button {...args}>{args.children}</Button>
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
const SizeButtonTemplate: ComponentStory<typeof Button> = (args) => {
|
|
132
|
+
return (
|
|
133
|
+
<Table sx={{ width: 900 }}>
|
|
134
|
+
<TableHead>
|
|
135
|
+
<TableRow>
|
|
136
|
+
<TableCell
|
|
137
|
+
colSpan={3}
|
|
138
|
+
sx={{
|
|
139
|
+
typography: "body1_16_semibold",
|
|
140
|
+
color: "inherit",
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
Size
|
|
144
|
+
</TableCell>
|
|
145
|
+
</TableRow>
|
|
146
|
+
<TableRow>
|
|
147
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
148
|
+
Small
|
|
149
|
+
</TableCell>
|
|
150
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
151
|
+
Medium
|
|
152
|
+
</TableCell>
|
|
153
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
154
|
+
Large
|
|
155
|
+
</TableCell>
|
|
156
|
+
</TableRow>
|
|
157
|
+
</TableHead>
|
|
158
|
+
<TableBody>
|
|
159
|
+
<TableRow>
|
|
160
|
+
{sizeList.map((size) => (
|
|
161
|
+
<TableCell key={size} sx={{ "& button": { marginRight: "10px" } }}>
|
|
162
|
+
<Button {...args} icon={<Bell />} size={size} />
|
|
163
|
+
<Button {...args} size={size}>
|
|
164
|
+
{args.children}
|
|
165
|
+
</Button>
|
|
166
|
+
<Button {...args} icon={<Bell />} size={size}>
|
|
167
|
+
{args.children}
|
|
168
|
+
</Button>
|
|
169
|
+
</TableCell>
|
|
170
|
+
))}
|
|
171
|
+
</TableRow>
|
|
172
|
+
</TableBody>
|
|
173
|
+
</Table>
|
|
174
|
+
);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export const Size = SizeButtonTemplate.bind({});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Bell } from "@lunit/design-system-icons";
|
|
3
|
+
import { action } from "@storybook/addon-actions";
|
|
4
|
+
|
|
5
|
+
import Button from "@/components/Button";
|
|
6
|
+
|
|
7
|
+
import type { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Components/Button",
|
|
11
|
+
component: Button,
|
|
12
|
+
argTypes: {
|
|
13
|
+
icon: {
|
|
14
|
+
control: false,
|
|
15
|
+
description: `Use this prop when you want to add icon.
|
|
16
|
+
\n It is added to the left of the text criteria,
|
|
17
|
+
\n and only Icon can be checked when used with hasIconOnly.`,
|
|
18
|
+
table: {
|
|
19
|
+
defaultValue: { summary: "undefined" },
|
|
20
|
+
type: { summary: "React.ReactNode" },
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
kind: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "radio",
|
|
26
|
+
},
|
|
27
|
+
options: ["contained", "outlined", "ghost"],
|
|
28
|
+
description: "Button has three Kinds Contained, Outlined, Ghost",
|
|
29
|
+
defaultValue: "contained",
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: { summary: "contained" },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
color: {
|
|
35
|
+
control: {
|
|
36
|
+
type: "radio",
|
|
37
|
+
},
|
|
38
|
+
options: ["primary", "secondary", "error"],
|
|
39
|
+
defaultValue: "primary",
|
|
40
|
+
table: {
|
|
41
|
+
defaultValue: { summary: "primary" },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
disabled: {
|
|
45
|
+
control: {
|
|
46
|
+
type: "boolean",
|
|
47
|
+
},
|
|
48
|
+
defaultValue: false,
|
|
49
|
+
table: {
|
|
50
|
+
defaultValue: { summary: "false" },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
size: {
|
|
54
|
+
control: {
|
|
55
|
+
type: "radio",
|
|
56
|
+
},
|
|
57
|
+
options: ["small", "medium", "large"],
|
|
58
|
+
defaultValue: "small",
|
|
59
|
+
table: {
|
|
60
|
+
defaultValue: { summary: "small" },
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
onClick: {
|
|
64
|
+
type: "function",
|
|
65
|
+
control: {
|
|
66
|
+
type: "radio",
|
|
67
|
+
},
|
|
68
|
+
options: ["function", undefined],
|
|
69
|
+
mapping: {
|
|
70
|
+
function: action("onClick"),
|
|
71
|
+
undefined: undefined,
|
|
72
|
+
},
|
|
73
|
+
defaultValue: "function",
|
|
74
|
+
description:
|
|
75
|
+
"It is a callback function that is called when the button is clicked.",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
parameters: {
|
|
79
|
+
controls: {
|
|
80
|
+
include: [
|
|
81
|
+
"children",
|
|
82
|
+
"icon",
|
|
83
|
+
"onClick",
|
|
84
|
+
"hasIconOnly",
|
|
85
|
+
"disabled",
|
|
86
|
+
"size",
|
|
87
|
+
"kind",
|
|
88
|
+
"color",
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
docs: {
|
|
92
|
+
description: {
|
|
93
|
+
component: `It is a Clickable Icon Button. For more details, please
|
|
94
|
+
see [Material-UI Button](https://mui.com/material-ui/react-button/).`,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
} as ComponentMeta<typeof Button>;
|
|
99
|
+
|
|
100
|
+
const IconButtonTemplate: ComponentStory<typeof Button> = (args) => (
|
|
101
|
+
<Button icon={<Bell />} {...args}>
|
|
102
|
+
{args.children}
|
|
103
|
+
</Button>
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
export const IconOnlyButton = IconButtonTemplate.bind({});
|
|
107
|
+
IconOnlyButton.argTypes = {
|
|
108
|
+
children: {
|
|
109
|
+
control: false,
|
|
110
|
+
type: "string",
|
|
111
|
+
table: {
|
|
112
|
+
defaultValue: { summary: "undefined" },
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
IconOnlyButton.storyName = "Icon only";
|
|
117
|
+
|
|
118
|
+
export const IconWithTextButton = IconButtonTemplate.bind({});
|
|
119
|
+
IconWithTextButton.argTypes = {
|
|
120
|
+
children: {
|
|
121
|
+
type: "string",
|
|
122
|
+
defaultValue: "Text",
|
|
123
|
+
table: {
|
|
124
|
+
defaultValue: { summary: "undefined" },
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
IconWithTextButton.storyName = "Icon";
|