@lunit/design-system 1.0.0-a.1 → 1.0.0-a.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 +16 -0
- 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 +19 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/Alert/Alert.styled.js +48 -0
- package/dist/components/Alert/Alert.styled.js.map +1 -0
- package/dist/components/Alert/Alert.types.js +2 -0
- package/dist/components/Alert/Alert.types.js.map +1 -0
- package/dist/components/Alert/Alert.utils..js +38 -0
- package/dist/components/Alert/Alert.utils..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 +180 -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/getHoverStyle.js +7 -0
- package/dist/components/Button/utils/getHoverStyle.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 +142 -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 +19 -0
- package/dist/components/TextField/TextField.js.map +1 -0
- package/dist/components/TextField/TextField.style.js +245 -0
- package/dist/components/TextField/TextField.style.js.map +1 -0
- package/dist/components/TextField/TextField.types.js +2 -0
- package/dist/components/TextField/TextField.types.js.map +1 -0
- package/dist/components/TextField/TextFieldIcon.js +7 -0
- package/dist/components/TextField/TextFieldIcon.js.map +1 -0
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/TextField/index.js.map +1 -1
- package/dist/components/Toast/Toast.js +26 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/Toast.styled.js +49 -0
- package/dist/components/Toast/Toast.styled.js.map +1 -0
- package/dist/components/Toast/Toast.types.js +2 -0
- package/dist/components/Toast/Toast.types.js.map +1 -0
- package/dist/components/Toast/Toast.utils.js +14 -0
- package/dist/components/Toast/Toast.utils.js.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- 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 +52 -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 +208 -0
- package/dist/foundation/colors/index.js.map +1 -0
- package/dist/foundation/colors/token/component.js +423 -0
- package/dist/foundation/colors/token/component.js.map +1 -0
- package/dist/foundation/colors/token/core.js +206 -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 +17 -1
- package/dist/index.js.map +1 -1
- package/dist/theme.js +39 -0
- package/dist/theme.js.map +1 -0
- package/dist/types/components/Alert/Alert.d.ts +4 -0
- package/dist/types/components/Alert/Alert.styled.d.ts +6 -0
- package/dist/types/components/Alert/Alert.types.d.ts +9 -0
- package/dist/types/components/Alert/Alert.utils..d.ts +4 -0
- package/dist/types/components/Button/Button.d.ts +3 -0
- package/dist/{components → types/components}/Button/Button.styled.d.ts +26 -2
- package/dist/{components → types/components}/Button/Button.types.d.ts +4 -4
- package/dist/types/components/Button/utils/getHoverStyle.d.ts +6 -0
- package/dist/types/components/Chip/Chip.styled.d.ts +79 -0
- package/dist/{components → types/components}/Chip/Chip.types.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +3 -0
- package/dist/types/components/TextField/TextField.style.d.ts +9 -0
- package/dist/types/components/TextField/TextField.types.d.ts +29 -0
- package/dist/types/components/TextField/TextFieldIcon.d.ts +8 -0
- package/dist/types/components/TextField/index.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +4 -0
- package/dist/types/components/Toast/Toast.styled.d.ts +1 -0
- package/dist/types/components/Toast/Toast.types.d.ts +4 -0
- package/dist/types/components/Toast/Toast.utils.d.ts +2 -0
- package/dist/types/components/Toast/index.d.ts +1 -0
- package/dist/{components → types/components}/ToggleButton/ToggleButton.styled.d.ts +1 -1
- package/dist/{components → types/components}/ToggleButton/ToggleButton.types.d.ts +4 -4
- package/dist/{foundation → types/foundation}/colors/base/grey.d.ts +16 -0
- package/dist/{foundation → types/foundation}/colors/base/lunitGreen.d.ts +2 -2
- package/dist/{foundation → types/foundation}/colors/base/lunitTeal.d.ts +2 -2
- package/dist/{foundation → types/foundation}/colors/index.d.ts +42 -9
- package/dist/{foundation → types/foundation}/colors/types.d.ts +1 -3
- package/dist/{foundation → types/foundation}/index.d.ts +37 -5
- package/dist/{index.d.ts → types/index.d.ts} +1 -0
- package/package.json +37 -23
- package/src/components/Alert/Alert.styled.ts +60 -0
- package/src/components/Alert/Alert.tsx +53 -0
- package/src/components/Alert/Alert.types.ts +10 -0
- package/src/components/Alert/Alert.utils..ts +41 -0
- package/src/components/Alert/index.ts +1 -0
- package/src/components/Button/Button.styled.ts +232 -0
- package/src/components/Button/Button.tsx +50 -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/getHoverStyle.ts +7 -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 +164 -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.style.ts +316 -0
- package/src/components/TextField/TextField.tsx +80 -0
- package/src/components/TextField/TextField.types.ts +38 -0
- package/src/components/TextField/TextFieldIcon.tsx +24 -0
- package/src/components/TextField/index.ts +7 -0
- package/src/components/Toast/Toast.styled.ts +49 -0
- package/src/components/Toast/Toast.tsx +66 -0
- package/src/components/Toast/Toast.types.ts +14 -0
- package/src/components/Toast/Toast.utils.ts +15 -0
- package/src/components/Toast/index.tsx +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 +25 -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 +53 -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 +256 -0
- package/src/foundation/colors/token/component.ts +430 -0
- package/src/foundation/colors/token/core.ts +211 -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 +83 -0
- package/src/foundation/index.ts +25 -0
- package/src/foundation/spacing.ts +3 -0
- package/src/index.ts +18 -0
- package/src/stories/components/Alert/Alert.stories.tsx +157 -0
- package/src/stories/components/Button/BasicButton.stories.tsx +168 -0
- package/src/stories/components/Button/IconButton.stories.tsx +139 -0
- package/src/stories/components/Button/Kind.stories.tsx +540 -0
- package/src/stories/components/Chip/Chip.stories.tsx +208 -0
- package/src/stories/components/DataTable/DataTable.stories.tsx +15 -0
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +15 -0
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +21 -0
- package/src/stories/components/Modal/Modal.stories.tsx +15 -0
- package/src/stories/components/SelectControl/Checkbox.stories.tsx +256 -0
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +68 -0
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +93 -0
- package/src/stories/components/SelectControl/Toggle.stories.tsx +443 -0
- package/src/stories/components/TextField/TextFieldMulti.stories.tsx +137 -0
- package/src/stories/components/TextField/TextFieldSingle.stories.tsx +283 -0
- package/src/stories/components/TextField/TextFieldSize.stories.tsx +134 -0
- package/src/stories/components/Toast/Toast.stories.tsx +152 -0
- package/src/stories/components/ToggleButton/Basic.stories.tsx +346 -0
- package/src/stories/components/ToggleButton/Group.stories.tsx +221 -0
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +708 -0
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +292 -0
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +15 -0
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +268 -0
- package/src/stories/foundation/Elevation/styled.ts +12 -0
- package/src/stories/foundation/Typography/Typography.mdx +76 -0
- package/src/stories/foundation/Typography/Typography.stories.tsx +101 -0
- package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +44 -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 +66 -0
- package/src/stories/foundation/colors/Mui.stories.tsx +18 -0
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +167 -0
- package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +28 -0
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +127 -0
- package/src/stories/foundation/colors/styled.ts +39 -0
- package/src/theme.ts +46 -0
- package/src/types.d.ts +4 -0
- package/tsconfig.build.json +2 -0
- package/dist/components/Alert/Alert.d.ts +0 -2
- package/dist/components/Button/Button.d.ts +0 -3
- package/dist/components/Chip/Chip.styled.d.ts +0 -41
- package/dist/components/HelloWorld/HelloWorld.d.ts +0 -28
- package/dist/components/TextField/TextField.d.ts +0 -2
- package/dist/components/TextField/index.d.ts +0 -1
- package/webpack.config.js +0 -51
- /package/dist/{components → types/components}/Alert/index.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/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}/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/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/index.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/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}/spacing.d.ts +0 -0
- /package/dist/{theme.d.ts → types/theme.d.ts} +0 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Table,
|
|
5
|
+
TableBody,
|
|
6
|
+
TableCell,
|
|
7
|
+
TableHead,
|
|
8
|
+
TableRow,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
import { action } from "@storybook/addon-actions";
|
|
11
|
+
import { Bell } from "@lunit/design-system-icons";
|
|
12
|
+
|
|
13
|
+
import TextField from "@/components/TextField/TextField";
|
|
14
|
+
|
|
15
|
+
import type { StoryFn, Meta } from "@storybook/react";
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: "Components/TextField",
|
|
19
|
+
component: TextField,
|
|
20
|
+
args: {
|
|
21
|
+
disabled: false,
|
|
22
|
+
size: "small",
|
|
23
|
+
placeholder: "Please typing...",
|
|
24
|
+
helperText: "Helper Text",
|
|
25
|
+
multiline: false,
|
|
26
|
+
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
disabled: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "radio",
|
|
31
|
+
},
|
|
32
|
+
options: [true, false],
|
|
33
|
+
description: "If true, the text field will be disabled.",
|
|
34
|
+
table: {
|
|
35
|
+
defaultValue: { summary: false },
|
|
36
|
+
type: { summary: [true, false] },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
size: {
|
|
40
|
+
control: {
|
|
41
|
+
type: "radio",
|
|
42
|
+
},
|
|
43
|
+
description: "The size of the text field.",
|
|
44
|
+
table: {
|
|
45
|
+
defaultValue: { summary: "small" },
|
|
46
|
+
type: { summary: ["small", "medium", "large"] },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
placeholder: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "The placeholder content.",
|
|
52
|
+
table: {
|
|
53
|
+
defaultValue: { summary: "undefined" },
|
|
54
|
+
type: { summary: "string" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
helperText: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description:
|
|
60
|
+
'The helper text content, use "error " or "sub text " to display helper text.',
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: { summary: "undefined" },
|
|
63
|
+
type: { summary: "string" },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
parameters: {
|
|
68
|
+
controls: {
|
|
69
|
+
include: [
|
|
70
|
+
"size",
|
|
71
|
+
"disabled",
|
|
72
|
+
"helperText",
|
|
73
|
+
"placeholder",
|
|
74
|
+
"onLeftIconClick",
|
|
75
|
+
"onRightIconClick",
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
docs: {
|
|
79
|
+
description: {
|
|
80
|
+
component: `It is a text field that allows users to enter and edit text.
|
|
81
|
+
\n It is usually used in forms. It can be used as a single line or multi-line text field.
|
|
82
|
+
\n It can be used with an icon on the left or right side.`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
decorators: [(Story) => <Box className="base00">{Story()}</Box>],
|
|
87
|
+
} as Meta<typeof TextField>;
|
|
88
|
+
|
|
89
|
+
const SingleTemplate: StoryFn<typeof TextField> = (args) => (
|
|
90
|
+
<Table>
|
|
91
|
+
<TableHead>
|
|
92
|
+
<TableRow>
|
|
93
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
94
|
+
Default
|
|
95
|
+
</TableCell>
|
|
96
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
97
|
+
Error
|
|
98
|
+
</TableCell>
|
|
99
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
100
|
+
Focused
|
|
101
|
+
</TableCell>
|
|
102
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
103
|
+
Disabled
|
|
104
|
+
</TableCell>
|
|
105
|
+
</TableRow>
|
|
106
|
+
</TableHead>
|
|
107
|
+
<TableBody>
|
|
108
|
+
<TableRow>
|
|
109
|
+
<TableCell>
|
|
110
|
+
<TextField {...args} />
|
|
111
|
+
</TableCell>
|
|
112
|
+
<TableCell>
|
|
113
|
+
<TextField {...args} error />
|
|
114
|
+
</TableCell>
|
|
115
|
+
<TableCell>
|
|
116
|
+
<TextField {...args} focused />
|
|
117
|
+
</TableCell>
|
|
118
|
+
<TableCell>
|
|
119
|
+
<TextField {...args} disabled />
|
|
120
|
+
</TableCell>
|
|
121
|
+
</TableRow>
|
|
122
|
+
</TableBody>
|
|
123
|
+
</Table>
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
const SingleWithIconTemplate: StoryFn<typeof TextField> = (args) => (
|
|
127
|
+
<Table>
|
|
128
|
+
<TableHead>
|
|
129
|
+
<TableRow>
|
|
130
|
+
<TableCell></TableCell>
|
|
131
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
132
|
+
Default
|
|
133
|
+
</TableCell>
|
|
134
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
135
|
+
Error
|
|
136
|
+
</TableCell>
|
|
137
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
138
|
+
focused
|
|
139
|
+
</TableCell>
|
|
140
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
141
|
+
Disabled
|
|
142
|
+
</TableCell>
|
|
143
|
+
</TableRow>
|
|
144
|
+
</TableHead>
|
|
145
|
+
<TableBody>
|
|
146
|
+
<TableRow>
|
|
147
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
148
|
+
Left Icon
|
|
149
|
+
</TableCell>
|
|
150
|
+
<TableCell>
|
|
151
|
+
<TextField {...args} leftIcon={<Bell />} />
|
|
152
|
+
</TableCell>
|
|
153
|
+
<TableCell>
|
|
154
|
+
<TextField {...args} error leftIcon={<Bell />} />
|
|
155
|
+
</TableCell>
|
|
156
|
+
<TableCell>
|
|
157
|
+
<TextField {...args} focused leftIcon={<Bell />} />
|
|
158
|
+
</TableCell>
|
|
159
|
+
<TableCell>
|
|
160
|
+
<TextField {...args} disabled leftIcon={<Bell />} />
|
|
161
|
+
</TableCell>
|
|
162
|
+
</TableRow>
|
|
163
|
+
<TableRow>
|
|
164
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
165
|
+
Right Icon
|
|
166
|
+
</TableCell>
|
|
167
|
+
<TableCell>
|
|
168
|
+
<TextField {...args} rightIcon={<Bell />} />
|
|
169
|
+
</TableCell>
|
|
170
|
+
<TableCell>
|
|
171
|
+
<TextField {...args} error rightIcon={<Bell />} />
|
|
172
|
+
</TableCell>
|
|
173
|
+
<TableCell>
|
|
174
|
+
<TextField {...args} focused rightIcon={<Bell />} />
|
|
175
|
+
</TableCell>
|
|
176
|
+
<TableCell>
|
|
177
|
+
<TextField {...args} disabled rightIcon={<Bell />} />
|
|
178
|
+
</TableCell>
|
|
179
|
+
</TableRow>
|
|
180
|
+
<TableRow>
|
|
181
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
182
|
+
Left Right Both Icon
|
|
183
|
+
</TableCell>
|
|
184
|
+
<TableCell>
|
|
185
|
+
<TextField {...args} leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
186
|
+
</TableCell>
|
|
187
|
+
<TableCell>
|
|
188
|
+
<TextField {...args} error leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
189
|
+
</TableCell>
|
|
190
|
+
<TableCell>
|
|
191
|
+
<TextField
|
|
192
|
+
{...args}
|
|
193
|
+
focused
|
|
194
|
+
leftIcon={<Bell />}
|
|
195
|
+
rightIcon={<Bell />}
|
|
196
|
+
/>
|
|
197
|
+
</TableCell>
|
|
198
|
+
<TableCell>
|
|
199
|
+
<TextField
|
|
200
|
+
{...args}
|
|
201
|
+
disabled
|
|
202
|
+
leftIcon={<Bell />}
|
|
203
|
+
rightIcon={<Bell />}
|
|
204
|
+
/>
|
|
205
|
+
</TableCell>
|
|
206
|
+
</TableRow>
|
|
207
|
+
</TableBody>
|
|
208
|
+
</Table>
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
export const TextFieldWithSingle = {
|
|
212
|
+
render: SingleTemplate,
|
|
213
|
+
|
|
214
|
+
argTypes: {
|
|
215
|
+
onLeftIconClick: {
|
|
216
|
+
control: false,
|
|
217
|
+
options: ["function", undefined],
|
|
218
|
+
mapping: {
|
|
219
|
+
function: action("onLeftIconClick"),
|
|
220
|
+
undefined: undefined,
|
|
221
|
+
},
|
|
222
|
+
description: "The left icon click event call back function.",
|
|
223
|
+
table: {
|
|
224
|
+
defaultValue: { summary: "undefined" },
|
|
225
|
+
type: { summary: "function" },
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
onRightIconClick: {
|
|
229
|
+
control: false,
|
|
230
|
+
options: ["function", undefined],
|
|
231
|
+
mapping: {
|
|
232
|
+
function: action("onRightIconClick"),
|
|
233
|
+
undefined: undefined,
|
|
234
|
+
},
|
|
235
|
+
description: "The right icon click event call back function.",
|
|
236
|
+
table: {
|
|
237
|
+
defaultValue: { summary: "undefined" },
|
|
238
|
+
type: { summary: "function" },
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
name: "Single Line",
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export const TextFieldWithIcon = {
|
|
247
|
+
render: SingleWithIconTemplate,
|
|
248
|
+
|
|
249
|
+
argTypes: {
|
|
250
|
+
onLeftIconClick: {
|
|
251
|
+
control: {
|
|
252
|
+
type: "select",
|
|
253
|
+
},
|
|
254
|
+
options: ["function", undefined],
|
|
255
|
+
mapping: {
|
|
256
|
+
function: action("onLeftIconClick"),
|
|
257
|
+
undefined: undefined,
|
|
258
|
+
},
|
|
259
|
+
description: "The left icon click event call back function.",
|
|
260
|
+
table: {
|
|
261
|
+
defaultValue: { summary: "undefined" },
|
|
262
|
+
type: { summary: "function" },
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
onRightIconClick: {
|
|
266
|
+
control: {
|
|
267
|
+
type: "select",
|
|
268
|
+
},
|
|
269
|
+
options: ["function", undefined],
|
|
270
|
+
mapping: {
|
|
271
|
+
function: action("onRightIconClick"),
|
|
272
|
+
undefined: undefined,
|
|
273
|
+
},
|
|
274
|
+
description: "The right icon click event call back function.",
|
|
275
|
+
table: {
|
|
276
|
+
defaultValue: { summary: "undefined" },
|
|
277
|
+
type: { summary: "function" },
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
name: "With Icon(single-line only)",
|
|
283
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Table,
|
|
5
|
+
TableBody,
|
|
6
|
+
TableCell,
|
|
7
|
+
TableHead,
|
|
8
|
+
TableRow,
|
|
9
|
+
} from "@mui/material";
|
|
10
|
+
|
|
11
|
+
import TextField from "@/components/TextField/TextField";
|
|
12
|
+
|
|
13
|
+
import type { StoryFn, Meta } from "@storybook/react";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/TextField",
|
|
17
|
+
component: TextField,
|
|
18
|
+
args: {
|
|
19
|
+
disabled: false,
|
|
20
|
+
size: "small",
|
|
21
|
+
placeholder: "Please typing...",
|
|
22
|
+
helperText: "Helper Text",
|
|
23
|
+
},
|
|
24
|
+
argTypes: {
|
|
25
|
+
disabled: {
|
|
26
|
+
control: {
|
|
27
|
+
type: "radio",
|
|
28
|
+
},
|
|
29
|
+
options: [true, false],
|
|
30
|
+
description: "If true, the text field will be disabled.",
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: false },
|
|
33
|
+
type: { summary: [true, false] },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
size: {
|
|
37
|
+
control: false,
|
|
38
|
+
description: "The size of the text field.",
|
|
39
|
+
table: {
|
|
40
|
+
defaultValue: { summary: "small" },
|
|
41
|
+
type: { summary: ["small", "medium", "large"] },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
placeholder: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The placeholder content.",
|
|
47
|
+
table: {
|
|
48
|
+
defaultValue: { summary: "undefined" },
|
|
49
|
+
type: { summary: "string" },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
helperText: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description:
|
|
55
|
+
'The helper text content, use "error " or "sub text " to display helper text.',
|
|
56
|
+
table: {
|
|
57
|
+
defaultValue: { summary: "undefined" },
|
|
58
|
+
type: { summary: "string" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
parameters: {
|
|
63
|
+
controls: {
|
|
64
|
+
include: ["size", "disabled", "helperText", "placeholder"],
|
|
65
|
+
},
|
|
66
|
+
docs: {
|
|
67
|
+
description: {
|
|
68
|
+
component: `The size of the text field.
|
|
69
|
+
\n The default value is "small" and can be set to "medium" or "large".`,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
decorators: [(Story) => <Box className="base00">{Story()}</Box>],
|
|
74
|
+
} as Meta<typeof TextField>;
|
|
75
|
+
|
|
76
|
+
const TextFieldSizeTemplate: StoryFn<typeof TextField> = (args) => (
|
|
77
|
+
<Table>
|
|
78
|
+
<TableHead>
|
|
79
|
+
<TableRow>
|
|
80
|
+
<TableCell></TableCell>
|
|
81
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
82
|
+
Small
|
|
83
|
+
</TableCell>
|
|
84
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
85
|
+
Medium
|
|
86
|
+
</TableCell>
|
|
87
|
+
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
88
|
+
Large
|
|
89
|
+
</TableCell>
|
|
90
|
+
</TableRow>
|
|
91
|
+
</TableHead>
|
|
92
|
+
<TableBody>
|
|
93
|
+
<TableRow>
|
|
94
|
+
<TableCell
|
|
95
|
+
sx={{ typography: "body2_14_medium", color: "inherit" }}
|
|
96
|
+
width={100}
|
|
97
|
+
>
|
|
98
|
+
Single line
|
|
99
|
+
</TableCell>
|
|
100
|
+
<TableCell>
|
|
101
|
+
<TextField {...args} />
|
|
102
|
+
</TableCell>
|
|
103
|
+
<TableCell>
|
|
104
|
+
<TextField {...args} size="medium" />
|
|
105
|
+
</TableCell>
|
|
106
|
+
<TableCell>
|
|
107
|
+
<TextField {...args} size="large" />
|
|
108
|
+
</TableCell>
|
|
109
|
+
</TableRow>
|
|
110
|
+
<TableRow>
|
|
111
|
+
<TableCell
|
|
112
|
+
sx={{ typography: "body2_14_medium", color: "inherit" }}
|
|
113
|
+
width={50}
|
|
114
|
+
>
|
|
115
|
+
Multi line
|
|
116
|
+
</TableCell>
|
|
117
|
+
<TableCell>
|
|
118
|
+
<TextField {...args} multiline />
|
|
119
|
+
</TableCell>
|
|
120
|
+
<TableCell>
|
|
121
|
+
<TextField {...args} size="medium" multiline />
|
|
122
|
+
</TableCell>
|
|
123
|
+
<TableCell>
|
|
124
|
+
<TextField {...args} size="large" multiline />
|
|
125
|
+
</TableCell>
|
|
126
|
+
</TableRow>
|
|
127
|
+
</TableBody>
|
|
128
|
+
</Table>
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
export const TextFieldSize = {
|
|
132
|
+
render: TextFieldSizeTemplate,
|
|
133
|
+
name: "Size",
|
|
134
|
+
};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryFn, Meta } from "@storybook/react";
|
|
3
|
+
import { Box } from "@mui/material";
|
|
4
|
+
|
|
5
|
+
import Toast from "@/components/Toast/Toast";
|
|
6
|
+
import { action } from "@storybook/addon-actions";
|
|
7
|
+
import Button from "@/components/Button";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: "Components/Toast",
|
|
11
|
+
component: Toast,
|
|
12
|
+
argTypes: {
|
|
13
|
+
severity: {
|
|
14
|
+
control: "radio",
|
|
15
|
+
options: ["success", "info", "warning", "error", undefined],
|
|
16
|
+
description: `\`success\`, \`info\`, \`warning\`, \`error\`, \`undefined\``,
|
|
17
|
+
},
|
|
18
|
+
action: {
|
|
19
|
+
control: {
|
|
20
|
+
type: "select",
|
|
21
|
+
},
|
|
22
|
+
options: ["Button", undefined],
|
|
23
|
+
mapping: {
|
|
24
|
+
Button: <Button kind="ghost">Button</Button>,
|
|
25
|
+
undefined: undefined,
|
|
26
|
+
},
|
|
27
|
+
default: undefined,
|
|
28
|
+
},
|
|
29
|
+
onClose: {
|
|
30
|
+
control: {
|
|
31
|
+
type: "select",
|
|
32
|
+
},
|
|
33
|
+
defaultValue: "function",
|
|
34
|
+
options: ["function", undefined],
|
|
35
|
+
mapping: {
|
|
36
|
+
function: action("onClose"),
|
|
37
|
+
undefined: undefined,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
parameters: {
|
|
42
|
+
controls: {
|
|
43
|
+
include: ["severity", "action", "onClose"],
|
|
44
|
+
},
|
|
45
|
+
docs: {
|
|
46
|
+
description: {
|
|
47
|
+
component: `Toast provide brief notifications. But have to use with \`Snackbar\` component.`,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
decorators: [
|
|
52
|
+
(Story) => (
|
|
53
|
+
<Box
|
|
54
|
+
className="base10"
|
|
55
|
+
bgcolor={"lunit.grey.00.main"}
|
|
56
|
+
sx={{
|
|
57
|
+
padding: 8,
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
{Story()}
|
|
61
|
+
</Box>
|
|
62
|
+
),
|
|
63
|
+
],
|
|
64
|
+
} as Meta<typeof Toast>;
|
|
65
|
+
|
|
66
|
+
const Template: StoryFn<typeof Toast> = (args) => <Toast {...args}>Test</Toast>;
|
|
67
|
+
|
|
68
|
+
const Template2: StoryFn<typeof Toast> = () => (
|
|
69
|
+
<Box sx={{ display: "grid", gap: "40px" }}>
|
|
70
|
+
<Toast
|
|
71
|
+
severity="normal"
|
|
72
|
+
sx={{
|
|
73
|
+
width: "212px",
|
|
74
|
+
"& .Toast-message": {
|
|
75
|
+
width: "180px",
|
|
76
|
+
},
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
79
|
+
Lorem ipsum dol
|
|
80
|
+
</Toast>
|
|
81
|
+
|
|
82
|
+
<Toast
|
|
83
|
+
severity="normal"
|
|
84
|
+
sx={{
|
|
85
|
+
width: "317px",
|
|
86
|
+
"& .Toast-message": {
|
|
87
|
+
width: "165px",
|
|
88
|
+
},
|
|
89
|
+
}}
|
|
90
|
+
onClose={() => {}}
|
|
91
|
+
>
|
|
92
|
+
Lorem ipsum dol
|
|
93
|
+
</Toast>
|
|
94
|
+
|
|
95
|
+
<Toast
|
|
96
|
+
severity="normal"
|
|
97
|
+
onClose={() => {}}
|
|
98
|
+
sx={{
|
|
99
|
+
width: "484px",
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
Lorem ipsum dolor sit amet consectetur. Velit urna donec tortor egestas
|
|
103
|
+
donec laoreet porttitor phasellus imperdiet. Egestas leo pretium tempus
|
|
104
|
+
purus laoreet egestas habitant scelerisque non imperdiet.
|
|
105
|
+
</Toast>
|
|
106
|
+
<Toast
|
|
107
|
+
severity="success"
|
|
108
|
+
sx={{
|
|
109
|
+
width: "464px",
|
|
110
|
+
}}
|
|
111
|
+
>
|
|
112
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Augue lorem in
|
|
113
|
+
dictum vitae ut massa.
|
|
114
|
+
</Toast>
|
|
115
|
+
|
|
116
|
+
<Toast
|
|
117
|
+
severity="info"
|
|
118
|
+
action={
|
|
119
|
+
<Button size="medium" kind="outlined" sx={{ width: "64px" }}>
|
|
120
|
+
Button
|
|
121
|
+
</Button>
|
|
122
|
+
}
|
|
123
|
+
sx={{
|
|
124
|
+
width: "548px",
|
|
125
|
+
}}
|
|
126
|
+
>
|
|
127
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Augue lorem in
|
|
128
|
+
dictum vitae ut massa.
|
|
129
|
+
</Toast>
|
|
130
|
+
<Toast
|
|
131
|
+
severity="error"
|
|
132
|
+
action={
|
|
133
|
+
<Button size="medium" kind="ghost" color="error" sx={{ width: "64px" }}>
|
|
134
|
+
Button
|
|
135
|
+
</Button>
|
|
136
|
+
}
|
|
137
|
+
onClose={() => {}}
|
|
138
|
+
sx={{
|
|
139
|
+
width: "584px",
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
142
|
+
Lorem ipsum dolor sit amet consectetur. Velit urna donec tortor.
|
|
143
|
+
</Toast>
|
|
144
|
+
</Box>
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
export const ToastBase = {
|
|
148
|
+
render: Template,
|
|
149
|
+
};
|
|
150
|
+
export const ToastVariant = {
|
|
151
|
+
render: Template2,
|
|
152
|
+
};
|