@lunit/design-system 1.0.0-a.2 → 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 +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/Chip/index.js +1 -1
- package/dist/cjs/components/Chip/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/ToggleButton/index.js +1 -1
- package/dist/cjs/components/ToggleButton/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 +16 -4
- package/dist/components/Alert/Alert.js.map +1 -1
- 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/Button/Button.js +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.styled.js +31 -21
- package/dist/components/Button/Button.styled.js.map +1 -1
- package/dist/components/Button/utils/getHoverStyle.js +7 -0
- package/dist/components/Button/utils/getHoverStyle.js.map +1 -0
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +2 -3
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/TextField/TextField.js +15 -3
- package/dist/components/TextField/TextField.js.map +1 -1
- 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/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/foundation/colors/base/grey.js +16 -0
- package/dist/foundation/colors/base/grey.js.map +1 -1
- package/dist/foundation/colors/base/lunitGreen.js +2 -2
- package/dist/foundation/colors/base/lunitGreen.js.map +1 -1
- package/dist/foundation/colors/base/lunitTeal.js +5 -5
- package/dist/foundation/colors/base/lunitTeal.js.map +1 -1
- package/dist/foundation/colors/base/red.js +2 -2
- package/dist/foundation/colors/index.js +24 -4
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +265 -291
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/foundation/colors/token/core.js +132 -125
- package/dist/foundation/colors/token/core.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/theme.js +5 -0
- package/dist/theme.js.map +1 -1
- package/dist/types/components/Alert/Alert.d.ts +3 -1
- 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 +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +26 -2
- package/dist/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 +9 -9
- package/dist/types/components/Chip/Chip.types.d.ts +1 -1
- package/dist/types/components/TextField/TextField.d.ts +2 -1
- 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 +1 -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/types/components/ToggleButton/ToggleButton.styled.d.ts +1 -1
- package/dist/types/components/ToggleButton/ToggleButton.types.d.ts +4 -4
- package/dist/types/foundation/colors/base/grey.d.ts +16 -0
- package/dist/types/foundation/colors/base/lunitGreen.d.ts +2 -2
- package/dist/types/foundation/colors/base/lunitTeal.d.ts +2 -2
- package/dist/types/foundation/colors/index.d.ts +42 -9
- package/dist/types/foundation/colors/types.d.ts +1 -3
- package/dist/types/foundation/index.d.ts +37 -5
- package/dist/types/index.d.ts +1 -0
- package/package.json +21 -16
- package/src/components/Alert/Alert.styled.ts +60 -0
- package/src/components/Alert/Alert.tsx +49 -5
- package/src/components/Alert/Alert.types.ts +10 -0
- package/src/components/Alert/Alert.utils..ts +41 -0
- package/src/components/Button/Button.styled.ts +33 -21
- package/src/components/Button/Button.tsx +1 -5
- package/src/components/Button/Button.types.ts +4 -4
- package/src/components/Button/utils/getHoverStyle.ts +7 -0
- package/src/components/Chip/Chip.styled.ts +6 -4
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/Chip/Chip.types.ts +2 -2
- package/src/components/TextField/TextField.style.ts +316 -0
- package/src/components/TextField/TextField.tsx +75 -3
- package/src/components/TextField/TextField.types.ts +38 -0
- package/src/components/TextField/TextFieldIcon.tsx +24 -0
- package/src/components/TextField/index.ts +6 -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/ToggleButton/ToggleButton.types.ts +4 -7
- package/src/foundation/colors/base/grey.ts +17 -0
- package/src/foundation/colors/base/lunitGreen.ts +2 -2
- package/src/foundation/colors/base/lunitTeal.ts +5 -5
- package/src/foundation/colors/base/red.ts +2 -2
- package/src/foundation/colors/index.ts +29 -8
- package/src/foundation/colors/token/component.ts +300 -326
- package/src/foundation/colors/token/core.ts +152 -145
- package/src/foundation/colors/types.ts +1 -3
- package/src/index.ts +1 -0
- package/src/stories/components/Alert/Alert.stories.tsx +148 -4
- package/src/stories/components/Button/BasicButton.stories.tsx +19 -28
- package/src/stories/components/Button/IconButton.stories.tsx +39 -28
- package/src/stories/components/Button/Kind.stories.tsx +83 -57
- package/src/stories/components/Chip/Chip.stories.tsx +94 -82
- package/src/stories/components/DataTable/DataTable.stories.tsx +6 -4
- package/src/stories/components/DatePicker/DatePicker.stories.tsx +6 -4
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +12 -6
- package/src/stories/components/Modal/Modal.stories.tsx +6 -4
- package/src/stories/components/SelectControl/Checkbox.stories.tsx +31 -23
- package/src/stories/components/SelectControl/RadioGroup.stories.tsx +6 -5
- package/src/stories/components/SelectControl/RadioStatus.stories.tsx +6 -4
- package/src/stories/components/SelectControl/Toggle.stories.tsx +33 -19
- 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 +35 -31
- package/src/stories/components/ToggleButton/Group.stories.tsx +21 -21
- package/src/stories/components/ToggleButton/ToggleButtonKind.stories.tsx +53 -43
- package/src/stories/components/ToggleButton/WithIcon.stories.tsx +35 -36
- package/src/stories/components/Tooltip/Tooltip.stories.tsx +6 -4
- package/src/stories/foundation/Elevation/Elevation.stories.tsx +10 -6
- package/src/stories/foundation/Typography/{Typography.stories.mdx → Typography.mdx} +10 -5
- package/src/stories/foundation/Typography/Typography.stories.tsx +46 -36
- package/src/stories/foundation/Typography/TypographyExamples.stories.tsx +44 -0
- package/src/stories/foundation/colors/Colors.stories.tsx +7 -5
- package/src/stories/foundation/colors/Mui.stories.tsx +18 -0
- package/src/stories/foundation/colors/Token.inComponent.stories.tsx +2 -2
- package/src/stories/foundation/colors/TokenPaletteTable.stories.tsx +28 -0
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +127 -0
- package/src/theme.ts +5 -0
- package/src/stories/components/TextField/TextField.stories.tsx +0 -13
- package/src/stories/foundation/colors/Token.stories.tsx +0 -190
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ComponentStory, ComponentMeta } from "@storybook/react";
|
|
3
|
-
import {
|
|
4
|
-
useTheme,
|
|
5
|
-
Box,
|
|
6
|
-
Table,
|
|
7
|
-
TableHead,
|
|
8
|
-
TableRow,
|
|
9
|
-
TableBody,
|
|
10
|
-
TableContainer,
|
|
11
|
-
TableCell,
|
|
12
|
-
} from "@mui/material";
|
|
13
|
-
import { StyledTypography } from "./styled";
|
|
14
|
-
import { tokenCoreColor } from "@/foundation/colors/token/core";
|
|
15
|
-
import type { ColorToken } from "@/foundation/colors/types";
|
|
16
|
-
|
|
17
|
-
const CoreTokenColors = () => {
|
|
18
|
-
const theme = useTheme();
|
|
19
|
-
|
|
20
|
-
const colorBoxStyle = {
|
|
21
|
-
borderTop: "1px solid",
|
|
22
|
-
borderBottom: "1px solid",
|
|
23
|
-
borderColor: "rgba(0, 0, 0, 0.12)",
|
|
24
|
-
height: "12px",
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<TableContainer>
|
|
29
|
-
<Table stickyHeader>
|
|
30
|
-
<TableHead>
|
|
31
|
-
<TableRow>
|
|
32
|
-
<TableCell colSpan={2}> </TableCell>
|
|
33
|
-
<TableCell colSpan={2}>Light</TableCell>
|
|
34
|
-
<TableCell colSpan={4}>Dark</TableCell>
|
|
35
|
-
</TableRow>
|
|
36
|
-
<TableRow>
|
|
37
|
-
<TableCell>Token name</TableCell>
|
|
38
|
-
<TableCell>Light 1</TableCell>
|
|
39
|
-
<TableCell>Light 2</TableCell>
|
|
40
|
-
<TableCell>Dark 1</TableCell>
|
|
41
|
-
<TableCell>Dark 2</TableCell>
|
|
42
|
-
<TableCell>Dark 3</TableCell>
|
|
43
|
-
<TableCell>Dark 4</TableCell>
|
|
44
|
-
</TableRow>
|
|
45
|
-
</TableHead>
|
|
46
|
-
<TableBody>
|
|
47
|
-
{Object.entries(theme.palette.token.core).map(
|
|
48
|
-
([paletteKey, _colorVariable]) => (
|
|
49
|
-
<TableRow key={paletteKey}>
|
|
50
|
-
<TableCell sx={{ height: "72px" }}>
|
|
51
|
-
<StyledTypography>core.{paletteKey}</StyledTypography>
|
|
52
|
-
</TableCell>
|
|
53
|
-
<TableCell
|
|
54
|
-
className="light1"
|
|
55
|
-
sx={{
|
|
56
|
-
background: "var(--grey-0)",
|
|
57
|
-
padding: 0,
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
<Box
|
|
61
|
-
sx={{
|
|
62
|
-
background:
|
|
63
|
-
theme.palette.token.core[
|
|
64
|
-
paletteKey as keyof ColorToken["core"]
|
|
65
|
-
],
|
|
66
|
-
borderLeft: "1px solid",
|
|
67
|
-
...colorBoxStyle,
|
|
68
|
-
}}
|
|
69
|
-
></Box>
|
|
70
|
-
<StyledTypography>
|
|
71
|
-
{tokenCoreColor[paletteKey]["light1"]}
|
|
72
|
-
</StyledTypography>
|
|
73
|
-
</TableCell>
|
|
74
|
-
<TableCell
|
|
75
|
-
className="light2"
|
|
76
|
-
sx={{ background: "var(--grey-10)", padding: 0 }}
|
|
77
|
-
>
|
|
78
|
-
<Box
|
|
79
|
-
sx={{
|
|
80
|
-
background:
|
|
81
|
-
theme.palette.token.core[
|
|
82
|
-
paletteKey as keyof ColorToken["core"]
|
|
83
|
-
],
|
|
84
|
-
...colorBoxStyle,
|
|
85
|
-
}}
|
|
86
|
-
></Box>
|
|
87
|
-
<StyledTypography>
|
|
88
|
-
{tokenCoreColor[paletteKey]["light2"]}
|
|
89
|
-
</StyledTypography>
|
|
90
|
-
</TableCell>
|
|
91
|
-
<TableCell
|
|
92
|
-
className="dark1"
|
|
93
|
-
sx={{
|
|
94
|
-
background: "var(--grey-90)",
|
|
95
|
-
padding: 0,
|
|
96
|
-
}}
|
|
97
|
-
>
|
|
98
|
-
<Box
|
|
99
|
-
sx={{
|
|
100
|
-
background:
|
|
101
|
-
theme.palette.token.core[
|
|
102
|
-
paletteKey as keyof ColorToken["core"]
|
|
103
|
-
],
|
|
104
|
-
...colorBoxStyle,
|
|
105
|
-
}}
|
|
106
|
-
></Box>
|
|
107
|
-
<StyledTypography>
|
|
108
|
-
{tokenCoreColor[paletteKey]["dark1"]}
|
|
109
|
-
</StyledTypography>
|
|
110
|
-
</TableCell>
|
|
111
|
-
<TableCell
|
|
112
|
-
className="dark2"
|
|
113
|
-
sx={{
|
|
114
|
-
background: "var(--grey-85)",
|
|
115
|
-
padding: 0,
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<Box
|
|
119
|
-
sx={{
|
|
120
|
-
background:
|
|
121
|
-
theme.palette.token.core[
|
|
122
|
-
paletteKey as keyof ColorToken["core"]
|
|
123
|
-
],
|
|
124
|
-
...colorBoxStyle,
|
|
125
|
-
}}
|
|
126
|
-
></Box>
|
|
127
|
-
|
|
128
|
-
<StyledTypography>
|
|
129
|
-
{tokenCoreColor[paletteKey]["dark2"]}
|
|
130
|
-
</StyledTypography>
|
|
131
|
-
</TableCell>
|
|
132
|
-
<TableCell
|
|
133
|
-
className="dark3"
|
|
134
|
-
sx={{
|
|
135
|
-
background: "var(--grey-80)",
|
|
136
|
-
padding: 0,
|
|
137
|
-
}}
|
|
138
|
-
>
|
|
139
|
-
<Box
|
|
140
|
-
sx={{
|
|
141
|
-
background:
|
|
142
|
-
theme.palette.token.core[
|
|
143
|
-
paletteKey as keyof ColorToken["core"]
|
|
144
|
-
],
|
|
145
|
-
...colorBoxStyle,
|
|
146
|
-
}}
|
|
147
|
-
></Box>
|
|
148
|
-
<StyledTypography>
|
|
149
|
-
{tokenCoreColor[paletteKey]["dark3"]}
|
|
150
|
-
</StyledTypography>
|
|
151
|
-
</TableCell>
|
|
152
|
-
<TableCell
|
|
153
|
-
className="dark4"
|
|
154
|
-
sx={{
|
|
155
|
-
background: "var(--grey-70)",
|
|
156
|
-
padding: 0,
|
|
157
|
-
}}
|
|
158
|
-
>
|
|
159
|
-
<Box
|
|
160
|
-
sx={{
|
|
161
|
-
background:
|
|
162
|
-
theme.palette.token.core[
|
|
163
|
-
paletteKey as keyof ColorToken["core"]
|
|
164
|
-
],
|
|
165
|
-
...colorBoxStyle,
|
|
166
|
-
}}
|
|
167
|
-
></Box>
|
|
168
|
-
<StyledTypography>
|
|
169
|
-
{tokenCoreColor[paletteKey]["dark4"]}
|
|
170
|
-
</StyledTypography>
|
|
171
|
-
</TableCell>
|
|
172
|
-
</TableRow>
|
|
173
|
-
)
|
|
174
|
-
)}
|
|
175
|
-
</TableBody>
|
|
176
|
-
</Table>
|
|
177
|
-
</TableContainer>
|
|
178
|
-
);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export default {
|
|
182
|
-
title: "Foundation/Colors/ColorToken",
|
|
183
|
-
component: CoreTokenColors,
|
|
184
|
-
} as ComponentMeta<typeof CoreTokenColors>;
|
|
185
|
-
|
|
186
|
-
const Template: ComponentStory<typeof CoreTokenColors> = () => (
|
|
187
|
-
<CoreTokenColors />
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
export const CoreTokens = Template.bind({});
|