@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,84 +1,76 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Table,
|
|
5
|
-
TableBody,
|
|
6
|
-
TableCell,
|
|
7
|
-
TableHead,
|
|
8
|
-
TableRow,
|
|
9
|
-
} from "@mui/material";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material';
|
|
10
3
|
|
|
11
|
-
import TextField from
|
|
4
|
+
import TextField from '@/components/TextField/TextField';
|
|
12
5
|
|
|
13
|
-
import type { StoryFn, Meta } from
|
|
6
|
+
import type { StoryFn, Meta } from '@storybook/react-webpack5';
|
|
14
7
|
|
|
15
8
|
export default {
|
|
16
|
-
title:
|
|
9
|
+
title: 'Components/TextField',
|
|
17
10
|
component: TextField,
|
|
18
11
|
args: {
|
|
19
12
|
disabled: false,
|
|
20
|
-
size:
|
|
21
|
-
placeholder:
|
|
22
|
-
helperText:
|
|
13
|
+
size: 'small',
|
|
14
|
+
placeholder: 'Please typing...',
|
|
15
|
+
helperText: 'Helper Text',
|
|
23
16
|
multiline: true,
|
|
24
17
|
},
|
|
25
18
|
argTypes: {
|
|
26
19
|
disabled: {
|
|
27
|
-
control: { type:
|
|
20
|
+
control: { type: 'radio' },
|
|
28
21
|
options: [true, false],
|
|
29
|
-
description:
|
|
22
|
+
description: 'If true, the text field will be disabled.',
|
|
30
23
|
table: {
|
|
31
|
-
defaultValue: { summary:
|
|
32
|
-
type: { summary:
|
|
24
|
+
defaultValue: { summary: 'false' },
|
|
25
|
+
type: { summary: 'boolean' },
|
|
33
26
|
},
|
|
34
27
|
},
|
|
35
28
|
size: {
|
|
36
|
-
control: { type:
|
|
37
|
-
options: [
|
|
38
|
-
description:
|
|
29
|
+
control: { type: 'radio' },
|
|
30
|
+
options: ['small', 'medium', 'large'],
|
|
31
|
+
description: 'The size of the text field.',
|
|
39
32
|
table: {
|
|
40
|
-
defaultValue: { summary:
|
|
41
|
-
type: { summary:
|
|
33
|
+
defaultValue: { summary: 'small' },
|
|
34
|
+
type: { summary: 'string' },
|
|
42
35
|
},
|
|
43
36
|
},
|
|
44
37
|
rows: {
|
|
45
|
-
type:
|
|
38
|
+
type: 'number',
|
|
46
39
|
description: `The number of rows to display when multiline option is set to "true"
|
|
47
40
|
\n the rows default value is undefined.`,
|
|
48
41
|
table: {
|
|
49
|
-
defaultValue: { summary:
|
|
50
|
-
type: { summary:
|
|
42
|
+
defaultValue: { summary: 'undefined' },
|
|
43
|
+
type: { summary: 'number' },
|
|
51
44
|
},
|
|
52
45
|
},
|
|
53
46
|
placeholder: {
|
|
54
|
-
type:
|
|
55
|
-
description:
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'The placeholder content.',
|
|
56
49
|
table: {
|
|
57
|
-
defaultValue: { summary:
|
|
58
|
-
type: { summary:
|
|
50
|
+
defaultValue: { summary: 'undefined' },
|
|
51
|
+
type: { summary: 'string' },
|
|
59
52
|
},
|
|
60
53
|
},
|
|
61
54
|
helperText: {
|
|
62
|
-
type:
|
|
63
|
-
description:
|
|
64
|
-
'The helper text content, use "error" or "sub text" to display helper text.',
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: 'The helper text content, use "error" or "sub text" to display helper text.',
|
|
65
57
|
table: {
|
|
66
|
-
defaultValue: { summary:
|
|
67
|
-
type: { summary:
|
|
58
|
+
defaultValue: { summary: 'undefined' },
|
|
59
|
+
type: { summary: 'string' },
|
|
68
60
|
},
|
|
69
61
|
},
|
|
70
62
|
multiline: {
|
|
71
|
-
type:
|
|
72
|
-
description:
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
description: 'If true, a textarea element(multi line) will be rendered.',
|
|
73
65
|
table: {
|
|
74
|
-
defaultValue: { summary:
|
|
75
|
-
type: { summary:
|
|
66
|
+
defaultValue: { summary: 'false' },
|
|
67
|
+
type: { summary: 'boolean' },
|
|
76
68
|
},
|
|
77
69
|
},
|
|
78
70
|
},
|
|
79
71
|
parameters: {
|
|
80
72
|
controls: {
|
|
81
|
-
include: [
|
|
73
|
+
include: ['size', 'rows', 'disabled', 'helperText', 'placeholder'],
|
|
82
74
|
},
|
|
83
75
|
docs: {
|
|
84
76
|
description: {
|
|
@@ -95,21 +87,13 @@ const MultiTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
95
87
|
<Table>
|
|
96
88
|
<TableHead>
|
|
97
89
|
<TableRow>
|
|
98
|
-
<TableCell sx={{ typography:
|
|
99
|
-
|
|
100
|
-
</TableCell>
|
|
101
|
-
<TableCell sx={{ typography:
|
|
102
|
-
Error
|
|
103
|
-
</TableCell>
|
|
104
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
105
|
-
Focused
|
|
106
|
-
</TableCell>
|
|
107
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
90
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Default</TableCell>
|
|
91
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Error</TableCell>
|
|
92
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Focused</TableCell>
|
|
93
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>
|
|
108
94
|
Error Focused
|
|
109
95
|
</TableCell>
|
|
110
|
-
<TableCell sx={{ typography:
|
|
111
|
-
Disabled
|
|
112
|
-
</TableCell>
|
|
96
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Disabled</TableCell>
|
|
113
97
|
</TableRow>
|
|
114
98
|
</TableHead>
|
|
115
99
|
<TableBody>
|
|
@@ -136,5 +120,5 @@ const MultiTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
136
120
|
|
|
137
121
|
export const TextFieldWithMulti = {
|
|
138
122
|
render: MultiTemplate,
|
|
139
|
-
name:
|
|
123
|
+
name: 'Multi Line',
|
|
140
124
|
};
|
|
@@ -1,75 +1,67 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TableBody,
|
|
6
|
-
TableCell,
|
|
7
|
-
TableHead,
|
|
8
|
-
TableRow,
|
|
9
|
-
} from "@mui/material";
|
|
10
|
-
import { action } from "storybook/actions";
|
|
11
|
-
import { Bell } from "@lunit/design-system-icons";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Table, TableBody, TableCell, TableHead, TableRow } from '@mui/material';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
|
+
import { Bell } from '@lunit/design-system-icons';
|
|
12
5
|
|
|
13
|
-
import TextField from
|
|
6
|
+
import TextField from '@/components/TextField/TextField';
|
|
14
7
|
|
|
15
|
-
import type { StoryFn, Meta } from
|
|
8
|
+
import type { StoryFn, Meta } from '@storybook/react-webpack5';
|
|
16
9
|
|
|
17
10
|
export default {
|
|
18
|
-
title:
|
|
11
|
+
title: 'Components/TextField',
|
|
19
12
|
component: TextField,
|
|
20
13
|
args: {
|
|
21
14
|
disabled: false,
|
|
22
|
-
size:
|
|
23
|
-
placeholder:
|
|
24
|
-
helperText:
|
|
15
|
+
size: 'small',
|
|
16
|
+
placeholder: 'Please typing...',
|
|
17
|
+
helperText: 'Helper Text',
|
|
25
18
|
multiline: false,
|
|
26
19
|
},
|
|
27
20
|
argTypes: {
|
|
28
21
|
disabled: {
|
|
29
|
-
control: { type:
|
|
22
|
+
control: { type: 'radio' },
|
|
30
23
|
options: [true, false],
|
|
31
|
-
description:
|
|
24
|
+
description: 'If true, the text field will be disabled.',
|
|
32
25
|
table: {
|
|
33
|
-
defaultValue: { summary:
|
|
34
|
-
type: { summary:
|
|
26
|
+
defaultValue: { summary: 'false' },
|
|
27
|
+
type: { summary: 'boolean' },
|
|
35
28
|
},
|
|
36
29
|
},
|
|
37
30
|
size: {
|
|
38
|
-
control: { type:
|
|
39
|
-
options: [
|
|
40
|
-
description:
|
|
31
|
+
control: { type: 'radio' },
|
|
32
|
+
options: ['small', 'medium', 'large'],
|
|
33
|
+
description: 'The size of the text field.',
|
|
41
34
|
table: {
|
|
42
|
-
defaultValue: { summary:
|
|
43
|
-
type: { summary:
|
|
35
|
+
defaultValue: { summary: 'small' },
|
|
36
|
+
type: { summary: 'string' },
|
|
44
37
|
},
|
|
45
38
|
},
|
|
46
39
|
placeholder: {
|
|
47
|
-
type:
|
|
48
|
-
description:
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'The placeholder content.',
|
|
49
42
|
table: {
|
|
50
|
-
defaultValue: { summary:
|
|
51
|
-
type: { summary:
|
|
43
|
+
defaultValue: { summary: 'undefined' },
|
|
44
|
+
type: { summary: 'string' },
|
|
52
45
|
},
|
|
53
46
|
},
|
|
54
47
|
helperText: {
|
|
55
|
-
type:
|
|
56
|
-
description:
|
|
57
|
-
'The helper text content, use "error " or "sub text " to display helper text.',
|
|
48
|
+
type: 'string',
|
|
49
|
+
description: 'The helper text content, use "error " or "sub text " to display helper text.',
|
|
58
50
|
table: {
|
|
59
|
-
defaultValue: { summary:
|
|
60
|
-
type: { summary:
|
|
51
|
+
defaultValue: { summary: 'undefined' },
|
|
52
|
+
type: { summary: 'string' },
|
|
61
53
|
},
|
|
62
54
|
},
|
|
63
55
|
},
|
|
64
56
|
parameters: {
|
|
65
57
|
controls: {
|
|
66
58
|
include: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
59
|
+
'size',
|
|
60
|
+
'disabled',
|
|
61
|
+
'helperText',
|
|
62
|
+
'placeholder',
|
|
63
|
+
'onLeftIconClick',
|
|
64
|
+
'onRightIconClick',
|
|
73
65
|
],
|
|
74
66
|
},
|
|
75
67
|
docs: {
|
|
@@ -87,21 +79,13 @@ const SingleTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
87
79
|
<Table>
|
|
88
80
|
<TableHead>
|
|
89
81
|
<TableRow>
|
|
90
|
-
<TableCell sx={{ typography:
|
|
91
|
-
|
|
92
|
-
</TableCell>
|
|
93
|
-
<TableCell sx={{ typography:
|
|
94
|
-
Error
|
|
95
|
-
</TableCell>
|
|
96
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
97
|
-
Focused
|
|
98
|
-
</TableCell>
|
|
99
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
82
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Default</TableCell>
|
|
83
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Error</TableCell>
|
|
84
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Focused</TableCell>
|
|
85
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>
|
|
100
86
|
Error Focused
|
|
101
87
|
</TableCell>
|
|
102
|
-
<TableCell sx={{ typography:
|
|
103
|
-
Disabled
|
|
104
|
-
</TableCell>
|
|
88
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Disabled</TableCell>
|
|
105
89
|
</TableRow>
|
|
106
90
|
</TableHead>
|
|
107
91
|
<TableBody>
|
|
@@ -130,29 +114,19 @@ const SingleWithIconTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
130
114
|
<Table>
|
|
131
115
|
<TableHead>
|
|
132
116
|
<TableRow>
|
|
133
|
-
<TableCell
|
|
134
|
-
<TableCell sx={{ typography:
|
|
135
|
-
|
|
136
|
-
</TableCell>
|
|
137
|
-
<TableCell sx={{ typography:
|
|
138
|
-
Error
|
|
139
|
-
</TableCell>
|
|
140
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
141
|
-
focused
|
|
142
|
-
</TableCell>
|
|
143
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
117
|
+
<TableCell />
|
|
118
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Default</TableCell>
|
|
119
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Error</TableCell>
|
|
120
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>focused</TableCell>
|
|
121
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>
|
|
144
122
|
Error focused
|
|
145
123
|
</TableCell>
|
|
146
|
-
<TableCell sx={{ typography:
|
|
147
|
-
Disabled
|
|
148
|
-
</TableCell>
|
|
124
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Disabled</TableCell>
|
|
149
125
|
</TableRow>
|
|
150
126
|
</TableHead>
|
|
151
127
|
<TableBody>
|
|
152
128
|
<TableRow>
|
|
153
|
-
<TableCell sx={{ typography:
|
|
154
|
-
Left Icon
|
|
155
|
-
</TableCell>
|
|
129
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Left Icon</TableCell>
|
|
156
130
|
<TableCell>
|
|
157
131
|
<TextField {...args} leftIcon={<Bell />} />
|
|
158
132
|
</TableCell>
|
|
@@ -170,9 +144,7 @@ const SingleWithIconTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
170
144
|
</TableCell>
|
|
171
145
|
</TableRow>
|
|
172
146
|
<TableRow>
|
|
173
|
-
<TableCell sx={{ typography:
|
|
174
|
-
Right Icon
|
|
175
|
-
</TableCell>
|
|
147
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Right Icon</TableCell>
|
|
176
148
|
<TableCell>
|
|
177
149
|
<TextField {...args} rightIcon={<Bell />} />
|
|
178
150
|
</TableCell>
|
|
@@ -190,7 +162,7 @@ const SingleWithIconTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
190
162
|
</TableCell>
|
|
191
163
|
</TableRow>
|
|
192
164
|
<TableRow>
|
|
193
|
-
<TableCell sx={{ typography:
|
|
165
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>
|
|
194
166
|
Left Right Both Icon
|
|
195
167
|
</TableCell>
|
|
196
168
|
<TableCell>
|
|
@@ -200,29 +172,13 @@ const SingleWithIconTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
200
172
|
<TextField {...args} error leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
201
173
|
</TableCell>
|
|
202
174
|
<TableCell>
|
|
203
|
-
<TextField
|
|
204
|
-
{...args}
|
|
205
|
-
focused
|
|
206
|
-
leftIcon={<Bell />}
|
|
207
|
-
rightIcon={<Bell />}
|
|
208
|
-
/>
|
|
175
|
+
<TextField {...args} focused leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
209
176
|
</TableCell>
|
|
210
177
|
<TableCell>
|
|
211
|
-
<TextField
|
|
212
|
-
{...args}
|
|
213
|
-
error
|
|
214
|
-
focused
|
|
215
|
-
leftIcon={<Bell />}
|
|
216
|
-
rightIcon={<Bell />}
|
|
217
|
-
/>
|
|
178
|
+
<TextField {...args} error focused leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
218
179
|
</TableCell>
|
|
219
180
|
<TableCell>
|
|
220
|
-
<TextField
|
|
221
|
-
{...args}
|
|
222
|
-
disabled
|
|
223
|
-
leftIcon={<Bell />}
|
|
224
|
-
rightIcon={<Bell />}
|
|
225
|
-
/>
|
|
181
|
+
<TextField {...args} disabled leftIcon={<Bell />} rightIcon={<Bell />} />
|
|
226
182
|
</TableCell>
|
|
227
183
|
</TableRow>
|
|
228
184
|
</TableBody>
|
|
@@ -235,33 +191,33 @@ export const TextFieldWithSingle = {
|
|
|
235
191
|
argTypes: {
|
|
236
192
|
onLeftIconClick: {
|
|
237
193
|
control: false,
|
|
238
|
-
options: [
|
|
194
|
+
options: ['function', undefined],
|
|
239
195
|
mapping: {
|
|
240
|
-
function: action(
|
|
196
|
+
function: action('onLeftIconClick'),
|
|
241
197
|
undefined: undefined,
|
|
242
198
|
},
|
|
243
|
-
description:
|
|
199
|
+
description: 'The left icon click event call back function.',
|
|
244
200
|
table: {
|
|
245
|
-
defaultValue: { summary:
|
|
246
|
-
type: { summary:
|
|
201
|
+
defaultValue: { summary: 'undefined' },
|
|
202
|
+
type: { summary: 'function' },
|
|
247
203
|
},
|
|
248
204
|
},
|
|
249
205
|
onRightIconClick: {
|
|
250
206
|
control: false,
|
|
251
|
-
options: [
|
|
207
|
+
options: ['function', undefined],
|
|
252
208
|
mapping: {
|
|
253
|
-
function: action(
|
|
209
|
+
function: action('onRightIconClick'),
|
|
254
210
|
undefined: undefined,
|
|
255
211
|
},
|
|
256
|
-
description:
|
|
212
|
+
description: 'The right icon click event call back function.',
|
|
257
213
|
table: {
|
|
258
|
-
defaultValue: { summary:
|
|
259
|
-
type: { summary:
|
|
214
|
+
defaultValue: { summary: 'undefined' },
|
|
215
|
+
type: { summary: 'function' },
|
|
260
216
|
},
|
|
261
217
|
},
|
|
262
218
|
},
|
|
263
219
|
|
|
264
|
-
name:
|
|
220
|
+
name: 'Single Line',
|
|
265
221
|
};
|
|
266
222
|
|
|
267
223
|
export const TextFieldWithIcon = {
|
|
@@ -270,35 +226,35 @@ export const TextFieldWithIcon = {
|
|
|
270
226
|
argTypes: {
|
|
271
227
|
onLeftIconClick: {
|
|
272
228
|
control: {
|
|
273
|
-
type:
|
|
229
|
+
type: 'select',
|
|
274
230
|
},
|
|
275
|
-
options: [
|
|
231
|
+
options: ['function', undefined],
|
|
276
232
|
mapping: {
|
|
277
|
-
function: action(
|
|
233
|
+
function: action('onLeftIconClick'),
|
|
278
234
|
undefined: undefined,
|
|
279
235
|
},
|
|
280
|
-
description:
|
|
236
|
+
description: 'The left icon click event call back function.',
|
|
281
237
|
table: {
|
|
282
|
-
defaultValue: { summary:
|
|
283
|
-
type: { summary:
|
|
238
|
+
defaultValue: { summary: 'undefined' },
|
|
239
|
+
type: { summary: 'function' },
|
|
284
240
|
},
|
|
285
241
|
},
|
|
286
242
|
onRightIconClick: {
|
|
287
243
|
control: {
|
|
288
|
-
type:
|
|
244
|
+
type: 'select',
|
|
289
245
|
},
|
|
290
|
-
options: [
|
|
246
|
+
options: ['function', undefined],
|
|
291
247
|
mapping: {
|
|
292
|
-
function: action(
|
|
248
|
+
function: action('onRightIconClick'),
|
|
293
249
|
undefined: undefined,
|
|
294
250
|
},
|
|
295
|
-
description:
|
|
251
|
+
description: 'The right icon click event call back function.',
|
|
296
252
|
table: {
|
|
297
|
-
defaultValue: { summary:
|
|
298
|
-
type: { summary:
|
|
253
|
+
defaultValue: { summary: 'undefined' },
|
|
254
|
+
type: { summary: 'function' },
|
|
299
255
|
},
|
|
300
256
|
},
|
|
301
257
|
},
|
|
302
258
|
|
|
303
|
-
name:
|
|
259
|
+
name: 'With Icon(single-line only)',
|
|
304
260
|
};
|
|
@@ -1,66 +1,58 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
Box,
|
|
4
|
-
Table,
|
|
5
|
-
TableCell,
|
|
6
|
-
TableBody,
|
|
7
|
-
TableHead,
|
|
8
|
-
TableRow,
|
|
9
|
-
} from "@mui/material";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Table, TableCell, TableBody, TableHead, TableRow } from '@mui/material';
|
|
10
3
|
|
|
11
|
-
import TextField from
|
|
4
|
+
import TextField from '@/components/TextField/TextField';
|
|
12
5
|
|
|
13
|
-
import type { StoryFn, Meta } from
|
|
6
|
+
import type { StoryFn, Meta } from '@storybook/react-webpack5';
|
|
14
7
|
|
|
15
8
|
export default {
|
|
16
|
-
title:
|
|
9
|
+
title: 'Components/TextField',
|
|
17
10
|
component: TextField,
|
|
18
11
|
args: {
|
|
19
12
|
disabled: false,
|
|
20
|
-
size:
|
|
21
|
-
placeholder:
|
|
22
|
-
helperText:
|
|
13
|
+
size: 'small',
|
|
14
|
+
placeholder: 'Please typing...',
|
|
15
|
+
helperText: 'Helper Text',
|
|
23
16
|
},
|
|
24
17
|
argTypes: {
|
|
25
18
|
disabled: {
|
|
26
|
-
control: { type:
|
|
19
|
+
control: { type: 'radio' },
|
|
27
20
|
options: [true, false],
|
|
28
|
-
description:
|
|
21
|
+
description: 'If true, the text field will be disabled.',
|
|
29
22
|
table: {
|
|
30
|
-
defaultValue: { summary:
|
|
31
|
-
type: { summary:
|
|
23
|
+
defaultValue: { summary: 'false' },
|
|
24
|
+
type: { summary: 'boolean' },
|
|
32
25
|
},
|
|
33
26
|
},
|
|
34
27
|
size: {
|
|
35
|
-
control: { type:
|
|
36
|
-
options: [
|
|
37
|
-
description:
|
|
28
|
+
control: { type: 'radio' },
|
|
29
|
+
options: ['small', 'medium', 'large'],
|
|
30
|
+
description: 'The size of the text field.',
|
|
38
31
|
table: {
|
|
39
|
-
defaultValue: { summary:
|
|
40
|
-
type: { summary:
|
|
32
|
+
defaultValue: { summary: 'small' },
|
|
33
|
+
type: { summary: 'string' },
|
|
41
34
|
},
|
|
42
35
|
},
|
|
43
36
|
placeholder: {
|
|
44
|
-
type:
|
|
45
|
-
description:
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'The placeholder content.',
|
|
46
39
|
table: {
|
|
47
|
-
defaultValue: { summary:
|
|
48
|
-
type: { summary:
|
|
40
|
+
defaultValue: { summary: 'undefined' },
|
|
41
|
+
type: { summary: 'string' },
|
|
49
42
|
},
|
|
50
43
|
},
|
|
51
44
|
helperText: {
|
|
52
|
-
type:
|
|
53
|
-
description:
|
|
54
|
-
'The helper text content, use "error " or "sub text " to display helper text.',
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'The helper text content, use "error " or "sub text " to display helper text.',
|
|
55
47
|
table: {
|
|
56
|
-
defaultValue: { summary:
|
|
57
|
-
type: { summary:
|
|
48
|
+
defaultValue: { summary: 'undefined' },
|
|
49
|
+
type: { summary: 'string' },
|
|
58
50
|
},
|
|
59
51
|
},
|
|
60
52
|
},
|
|
61
53
|
parameters: {
|
|
62
54
|
controls: {
|
|
63
|
-
include: [
|
|
55
|
+
include: ['size', 'disabled', 'helperText', 'placeholder'],
|
|
64
56
|
},
|
|
65
57
|
docs: {
|
|
66
58
|
description: {
|
|
@@ -76,24 +68,15 @@ const TextFieldSizeWithTableTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
76
68
|
<Table>
|
|
77
69
|
<TableHead>
|
|
78
70
|
<TableRow>
|
|
79
|
-
<TableCell
|
|
80
|
-
<TableCell sx={{ typography:
|
|
81
|
-
|
|
82
|
-
</TableCell>
|
|
83
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
84
|
-
Medium
|
|
85
|
-
</TableCell>
|
|
86
|
-
<TableCell sx={{ typography: "body2_14_medium", color: "inherit" }}>
|
|
87
|
-
Large
|
|
88
|
-
</TableCell>
|
|
71
|
+
<TableCell />
|
|
72
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Small</TableCell>
|
|
73
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Medium</TableCell>
|
|
74
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }}>Large</TableCell>
|
|
89
75
|
</TableRow>
|
|
90
76
|
</TableHead>
|
|
91
77
|
<TableBody>
|
|
92
78
|
<TableRow>
|
|
93
|
-
<TableCell
|
|
94
|
-
sx={{ typography: "body2_14_medium", color: "inherit" }}
|
|
95
|
-
width={100}
|
|
96
|
-
>
|
|
79
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }} width={100}>
|
|
97
80
|
Single line
|
|
98
81
|
</TableCell>
|
|
99
82
|
<TableCell>
|
|
@@ -107,10 +90,7 @@ const TextFieldSizeWithTableTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
107
90
|
</TableCell>
|
|
108
91
|
</TableRow>
|
|
109
92
|
<TableRow>
|
|
110
|
-
<TableCell
|
|
111
|
-
sx={{ typography: "body2_14_medium", color: "inherit" }}
|
|
112
|
-
width={50}
|
|
113
|
-
>
|
|
93
|
+
<TableCell sx={{ typography: 'body2_14_medium', color: 'inherit' }} width={50}>
|
|
114
94
|
Multi line
|
|
115
95
|
</TableCell>
|
|
116
96
|
<TableCell>
|
|
@@ -129,11 +109,11 @@ const TextFieldSizeWithTableTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
129
109
|
|
|
130
110
|
export const TextFieldSize = {
|
|
131
111
|
render: TextFieldSizeWithTableTemplate,
|
|
132
|
-
name:
|
|
112
|
+
name: 'Size',
|
|
133
113
|
};
|
|
134
114
|
|
|
135
115
|
const TextFieldSizeTemplate: StoryFn<typeof TextField> = (args) => (
|
|
136
|
-
<Box sx={{ display:
|
|
116
|
+
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
|
|
137
117
|
<Box>
|
|
138
118
|
<TextField sx={{ mr: 4 }} {...args} />
|
|
139
119
|
<TextField sx={{ mr: 4 }} {...args} size="medium" />
|
|
@@ -149,7 +129,7 @@ const TextFieldSizeTemplate: StoryFn<typeof TextField> = (args) => (
|
|
|
149
129
|
|
|
150
130
|
export const TextFieldOnlySize = {
|
|
151
131
|
render: TextFieldSizeTemplate,
|
|
152
|
-
name:
|
|
132
|
+
name: 'Size Only',
|
|
153
133
|
parameters: {
|
|
154
134
|
chromatic: { disableSnapshot: true },
|
|
155
135
|
},
|