@lunit/design-system 2.0.2 → 2.1.0
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/README.md +107 -7
- package/dist/cjs/components/Chip/index.js +1 -1
- package/dist/cjs/components/Chip/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/TextField/index.js +1 -1
- package/dist/cjs/components/TextField/index.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/components/Chip/Chip.styled.js +9 -16
- package/dist/components/Chip/Chip.styled.js.map +1 -1
- package/dist/components/Dialog/Dialog.js +0 -6
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +37 -4
- package/dist/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/components/Dropdown/Dropdown.styled.js +161 -0
- package/dist/components/Dropdown/Dropdown.styled.js.map +1 -0
- package/dist/components/Dropdown/Dropdown.types.js +2 -0
- package/dist/components/Dropdown/Dropdown.types.js.map +1 -0
- package/dist/components/Dropdown/DropdownItem.js +36 -0
- package/dist/components/Dropdown/DropdownItem.js.map +1 -0
- package/dist/components/Dropdown/index.js +1 -0
- package/dist/components/Dropdown/index.js.map +1 -1
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.style.js +27 -3
- package/dist/components/TextField/TextField.style.js.map +1 -1
- package/dist/foundation/Typography/index.js +5 -0
- package/dist/foundation/Typography/index.js.map +1 -1
- package/dist/foundation/Typography/tokens.js +44 -0
- package/dist/foundation/Typography/tokens.js.map +1 -1
- package/dist/foundation/colors/base/blue.js +12 -10
- package/dist/foundation/colors/base/blue.js.map +1 -1
- package/dist/foundation/colors/base/green.js +11 -9
- package/dist/foundation/colors/base/green.js.map +1 -1
- package/dist/foundation/colors/base/grey.js +30 -15
- package/dist/foundation/colors/base/grey.js.map +1 -1
- package/dist/foundation/colors/base/lunitTeal.js +2 -0
- package/dist/foundation/colors/base/lunitTeal.js.map +1 -1
- package/dist/foundation/colors/base/magenta.js +3 -1
- package/dist/foundation/colors/base/magenta.js.map +1 -1
- package/dist/foundation/colors/base/orange.js +11 -9
- package/dist/foundation/colors/base/orange.js.map +1 -1
- package/dist/foundation/colors/base/purple.js +3 -1
- package/dist/foundation/colors/base/purple.js.map +1 -1
- package/dist/foundation/colors/base/red.js +5 -3
- package/dist/foundation/colors/base/red.js.map +1 -1
- package/dist/foundation/colors/base/yellow.js +12 -10
- package/dist/foundation/colors/base/yellow.js.map +1 -1
- package/dist/foundation/colors/index.js +3 -0
- package/dist/foundation/colors/index.js.map +1 -1
- package/dist/foundation/colors/token/component.js +26 -22
- package/dist/foundation/colors/token/component.js.map +1 -1
- package/dist/foundation/colors/token/core.js +21 -0
- package/dist/foundation/colors/token/core.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/components/Button/Button.styled.d.ts +3 -3
- package/dist/types/components/Chip/Chip.styled.d.ts +12 -12
- package/dist/types/components/Dialog/Dialog.d.ts +0 -3
- package/dist/types/components/Dropdown/Dropdown.d.ts +3 -1
- package/dist/types/components/Dropdown/Dropdown.styled.d.ts +41 -0
- package/dist/types/components/Dropdown/Dropdown.types.d.ts +11 -0
- package/dist/types/components/Dropdown/DropdownItem.d.ts +13 -0
- package/dist/types/components/Dropdown/index.d.ts +2 -0
- package/dist/types/components/ToggleButton/ToggleButton.styled.d.ts +2 -2
- package/dist/types/foundation/Typography/index.d.ts +21 -1
- package/dist/types/foundation/Typography/tokens.d.ts +15 -0
- package/dist/types/foundation/colors/base/blue.d.ts +2 -0
- package/dist/types/foundation/colors/base/green.d.ts +2 -0
- package/dist/types/foundation/colors/base/grey.d.ts +15 -0
- package/dist/types/foundation/colors/base/lunitTeal.d.ts +2 -0
- package/dist/types/foundation/colors/base/magenta.d.ts +2 -0
- package/dist/types/foundation/colors/base/orange.d.ts +2 -0
- package/dist/types/foundation/colors/base/purple.d.ts +2 -0
- package/dist/types/foundation/colors/base/red.d.ts +2 -0
- package/dist/types/foundation/colors/base/yellow.d.ts +2 -0
- package/dist/types/foundation/colors/index.d.ts +3 -0
- package/dist/types/foundation/colors/types.d.ts +3 -0
- package/dist/types/foundation/index.d.ts +3 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/Chip/Chip.styled.ts +9 -16
- package/src/components/Dialog/Dialog.tsx +0 -8
- package/src/components/Dropdown/Dropdown.styled.tsx +170 -0
- package/src/components/Dropdown/Dropdown.tsx +59 -8
- package/src/components/Dropdown/Dropdown.types.ts +15 -0
- package/src/components/Dropdown/DropdownItem.tsx +107 -0
- package/src/components/Dropdown/index.ts +6 -0
- package/src/components/TextField/TextField.style.ts +28 -3
- package/src/components/TextField/TextField.tsx +1 -7
- package/src/foundation/Typography/index.ts +10 -0
- package/src/foundation/Typography/tokens.ts +45 -0
- package/src/foundation/colors/base/blue.ts +12 -10
- package/src/foundation/colors/base/green.ts +11 -9
- package/src/foundation/colors/base/grey.ts +30 -15
- package/src/foundation/colors/base/lunitTeal.ts +2 -0
- package/src/foundation/colors/base/magenta.ts +3 -1
- package/src/foundation/colors/base/orange.ts +11 -9
- package/src/foundation/colors/base/purple.ts +3 -1
- package/src/foundation/colors/base/red.ts +5 -3
- package/src/foundation/colors/base/yellow.ts +12 -10
- package/src/foundation/colors/index.ts +3 -0
- package/src/foundation/colors/token/component.ts +26 -22
- package/src/foundation/colors/token/core.ts +21 -0
- package/src/foundation/colors/types.ts +3 -0
- package/src/index.ts +6 -1
- package/src/stories/components/Chip/Chip.stories.tsx +18 -0
- package/src/stories/components/Chip/ChipDocs.mdx +20 -0
- package/src/stories/components/Dialog/DialogDocs.mdx +2 -10
- package/src/stories/components/Dropdown/Dropdown.stories.tsx +299 -10
- package/src/stories/components/Dropdown/DropdownExamples.stories.tsx +221 -0
- package/src/stories/components/Dropdown/DropdownItem.stories.tsx +360 -0
- package/src/stories/components/TextField/BasicTextField.stories.tsx +28 -0
- package/src/stories/components/TextField/TextFieldDocs.mdx +12 -0
- package/src/stories/foundation/Typography/Typography.stories.tsx +13 -0
- package/src/stories/foundation/Typography/const.ts +6 -1
- package/src/stories/foundation/colors/TokenPaletteTable.tsx +19 -1
- package/dist/cjs/components/Modal/index.js +0 -2
- package/dist/cjs/components/Modal/index.js.map +0 -1
- package/dist/components/Modal/Modal.js +0 -7
- package/dist/components/Modal/Modal.js.map +0 -1
- package/dist/components/Modal/index.js +0 -2
- package/dist/components/Modal/index.js.map +0 -1
- package/dist/types/components/Modal/Modal.d.ts +0 -2
- package/dist/types/components/Modal/index.d.ts +0 -1
|
@@ -2,7 +2,8 @@ import { grey } from "./grey";
|
|
|
2
2
|
|
|
3
3
|
export const magenta = {
|
|
4
4
|
5: "#FFF0F7",
|
|
5
|
-
10: "#
|
|
5
|
+
10: "#FFE3F0",
|
|
6
|
+
15: "#FDCDE3",
|
|
6
7
|
20: "#FAB2D3",
|
|
7
8
|
30: "#F681B7",
|
|
8
9
|
40: "#FF50A0",
|
|
@@ -16,6 +17,7 @@ export const magenta = {
|
|
|
16
17
|
export const magentaText = {
|
|
17
18
|
5: grey[95],
|
|
18
19
|
10: grey[95],
|
|
20
|
+
15: grey[95],
|
|
19
21
|
20: grey[95],
|
|
20
22
|
30: grey[95],
|
|
21
23
|
40: grey[95],
|
|
@@ -2,20 +2,22 @@ import { grey } from "./grey";
|
|
|
2
2
|
|
|
3
3
|
export const orange = {
|
|
4
4
|
5: "#FFF2E8",
|
|
5
|
-
10: "#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
10: "#FFE4CD",
|
|
6
|
+
15: "#FFCEA6",
|
|
7
|
+
20: "#FFB375",
|
|
8
|
+
30: "#FF9945",
|
|
9
|
+
40: "#FF811A",
|
|
10
|
+
50: "#D35F00",
|
|
11
|
+
60: "#AB4D00",
|
|
12
|
+
70: "#733400",
|
|
13
|
+
80: "#472000",
|
|
14
|
+
90: "#2B1400",
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export const orangeText = {
|
|
17
18
|
5: grey[95],
|
|
18
19
|
10: grey[95],
|
|
20
|
+
15: grey[95],
|
|
19
21
|
20: grey[95],
|
|
20
22
|
30: grey[95],
|
|
21
23
|
40: grey[95],
|
|
@@ -2,7 +2,8 @@ import { grey } from "./grey";
|
|
|
2
2
|
|
|
3
3
|
export const purple = {
|
|
4
4
|
5: "#F6F2FF",
|
|
5
|
-
10: "#
|
|
5
|
+
10: "#ECE1FF",
|
|
6
|
+
15: "#E1CEFF",
|
|
6
7
|
20: "#D4BBFF",
|
|
7
8
|
30: "#BE95FF",
|
|
8
9
|
40: "#9E6BF0",
|
|
@@ -16,6 +17,7 @@ export const purple = {
|
|
|
16
17
|
export const purpleText = {
|
|
17
18
|
5: grey[95],
|
|
18
19
|
10: grey[95],
|
|
20
|
+
15: grey[95],
|
|
19
21
|
20: grey[95],
|
|
20
22
|
30: grey[95],
|
|
21
23
|
40: grey[95],
|
|
@@ -2,20 +2,22 @@ import { grey } from "./grey";
|
|
|
2
2
|
|
|
3
3
|
export const red = {
|
|
4
4
|
5: "#FFF1F1",
|
|
5
|
-
10: "#
|
|
6
|
-
|
|
5
|
+
10: "#FFE3E4",
|
|
6
|
+
15: "#FFC9CC",
|
|
7
|
+
20: "#FFA1A7",
|
|
7
8
|
30: "#FF7077",
|
|
8
9
|
40: "#FA464F",
|
|
9
10
|
50: "#DA1E28",
|
|
10
11
|
60: "#A2191F",
|
|
11
12
|
70: "#750E13",
|
|
12
13
|
80: "#520408",
|
|
13
|
-
90: "#
|
|
14
|
+
90: "#2E0905",
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export const redText = {
|
|
17
18
|
5: grey[95],
|
|
18
19
|
10: grey[95],
|
|
20
|
+
15: grey[95],
|
|
19
21
|
20: grey[95],
|
|
20
22
|
30: grey[95],
|
|
21
23
|
40: grey[95],
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { grey } from "./grey";
|
|
2
2
|
|
|
3
3
|
export const yellow = {
|
|
4
|
-
5: "#
|
|
5
|
-
10: "#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
5: "#FFFEE9",
|
|
5
|
+
10: "#FFFDC6",
|
|
6
|
+
15: "#FFFC9C",
|
|
7
|
+
20: "#FFF870",
|
|
8
|
+
30: "#FEF71C",
|
|
9
|
+
40: "#FFE81B",
|
|
10
|
+
50: "#EACC37",
|
|
11
|
+
60: "#BBA11F",
|
|
12
|
+
70: "#736A03",
|
|
13
|
+
80: "#4C4800",
|
|
14
|
+
90: "#3C3900",
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export const yellowText = {
|
|
17
18
|
5: grey[95],
|
|
18
19
|
10: grey[95],
|
|
20
|
+
15: grey[95],
|
|
19
21
|
20: grey[95],
|
|
20
22
|
30: grey[95],
|
|
21
23
|
40: grey[95],
|
|
@@ -193,8 +193,11 @@ const paletteOptions = {
|
|
|
193
193
|
icon_warning_02: "var(--icon_warning_02)",
|
|
194
194
|
icon_info_02: "var(--icon_info_02)",
|
|
195
195
|
hover: "var(--hover)",
|
|
196
|
+
status_hover: "var(--status_hover)",
|
|
196
197
|
focused: "var(--focused)",
|
|
198
|
+
status_focused: "var(--status_focused)",
|
|
197
199
|
selected: "var(--selected)",
|
|
200
|
+
status_selected: "var(--status_selected)",
|
|
198
201
|
shadow_01: "var(--shadow_01)",
|
|
199
202
|
shadow_02: "var(--shadow_02)",
|
|
200
203
|
shadow_03: "var(--shadow_03)",
|
|
@@ -33,10 +33,11 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
33
33
|
dark2: "--lunit_teal_40",
|
|
34
34
|
},
|
|
35
35
|
btn_secondary_border: {
|
|
36
|
+
// Deprecated. Please use core.border_medium instead.
|
|
36
37
|
light1: "--grey_15",
|
|
37
38
|
light2: "--grey_15",
|
|
38
|
-
dark1: "--
|
|
39
|
-
dark2: "--
|
|
39
|
+
dark1: "--grey_60",
|
|
40
|
+
dark2: "--grey_60",
|
|
40
41
|
},
|
|
41
42
|
btn_primary_text_1: {
|
|
42
43
|
light1: "--lunit_teal_50",
|
|
@@ -75,6 +76,7 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
75
76
|
dark2: "--lunit_teal_80",
|
|
76
77
|
},
|
|
77
78
|
btn_selected_secondary_bg: {
|
|
79
|
+
// Deprecated. Please use btn_secondary_bg instead.
|
|
78
80
|
light1: "--lunit_teal_10",
|
|
79
81
|
light2: "--lunit_teal_10",
|
|
80
82
|
dark1: "--grey_80",
|
|
@@ -149,12 +151,14 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
149
151
|
},
|
|
150
152
|
dataTable: {
|
|
151
153
|
datatable_border_01: {
|
|
154
|
+
// Deprecated. Please use core.border_medium instead.
|
|
152
155
|
light1: "--grey_20",
|
|
153
156
|
light2: "--grey_30",
|
|
154
157
|
dark1: "--grey_50",
|
|
155
158
|
dark2: "--grey_40",
|
|
156
159
|
},
|
|
157
160
|
datatable_border_02: {
|
|
161
|
+
// Deprecated. Please use core.border_light instead.
|
|
158
162
|
light1: "--grey_10",
|
|
159
163
|
light2: "--grey_15",
|
|
160
164
|
dark1: "--grey_80",
|
|
@@ -189,10 +193,10 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
189
193
|
},
|
|
190
194
|
modal: {
|
|
191
195
|
modal_overlay: {
|
|
192
|
-
light1: "rgba(
|
|
193
|
-
light2: "rgba(
|
|
194
|
-
dark1: "rgba(
|
|
195
|
-
dark2: "rgba(
|
|
196
|
+
light1: "rgba(15, 15, 18, 0.7)", // "--grey_95 70%", = #0F0F12 70%
|
|
197
|
+
light2: "rgba(15, 15, 18, 0.7)", // "--grey_95 70%",
|
|
198
|
+
dark1: "rgba(15, 15, 18, 0.7)", // "--grey_95 70%",
|
|
199
|
+
dark2: "rgba(15, 15, 18, 0.7)", // "--grey_95 70%",
|
|
196
200
|
},
|
|
197
201
|
},
|
|
198
202
|
tooltip: {
|
|
@@ -217,10 +221,10 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
217
221
|
},
|
|
218
222
|
alert: {
|
|
219
223
|
alert_error_bg: {
|
|
220
|
-
light1: "rgba(250,
|
|
221
|
-
light2: "rgba(250,
|
|
222
|
-
dark1: "rgba(255,
|
|
223
|
-
dark2: "rgba(255,
|
|
224
|
+
light1: "rgba(250, 70, 79, 0.16)", // "--red_40 16%",
|
|
225
|
+
light2: "rgba(250, 70, 79, 0.16)", // "--red_40 16%",
|
|
226
|
+
dark1: "rgba(255, 112, 119, 0.32)", // "--red_30 32%",
|
|
227
|
+
dark2: "rgba(255, 112, 119, 0.32)", // "--red_30 32%",
|
|
224
228
|
},
|
|
225
229
|
alert_error_border: {
|
|
226
230
|
light1: "--red_40",
|
|
@@ -229,10 +233,10 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
229
233
|
dark2: "--red_30",
|
|
230
234
|
},
|
|
231
235
|
alert_success_bg: {
|
|
232
|
-
light1: "rgba(
|
|
233
|
-
light2: "rgba(
|
|
234
|
-
dark1: "rgba(
|
|
235
|
-
dark2: "rgba(
|
|
236
|
+
light1: "rgba(26, 159, 63, 0.16)", // "--green_40 16%",
|
|
237
|
+
light2: "rgba(26, 159, 63, 0.16)", // "--green_40 16%",
|
|
238
|
+
dark1: "rgba(68, 190, 103, 0.32)", // "--green_30 32%",
|
|
239
|
+
dark2: "rgba(68, 190, 103, 0.32)", // "--green_30 32%",
|
|
236
240
|
},
|
|
237
241
|
alert_success_border: {
|
|
238
242
|
light1: "--green_30",
|
|
@@ -241,10 +245,10 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
241
245
|
dark2: "--green_30",
|
|
242
246
|
},
|
|
243
247
|
alert_info_bg: {
|
|
244
|
-
light1: "rgba(
|
|
245
|
-
light2: "rgba(
|
|
246
|
-
dark1: "rgba(
|
|
247
|
-
dark2: "rgba(
|
|
248
|
+
light1: "rgba(61, 136, 250, 0.16)", // "--blue_40 16%",
|
|
249
|
+
light2: "rgba(61, 136, 250, 0.16)", // "--blue_40 16%",
|
|
250
|
+
dark1: "rgba(113, 169, 250, 0.32)", // "--blue_30 32%",
|
|
251
|
+
dark2: "rgba(113, 169, 250, 0.32)", // "--blue_30 32%",
|
|
248
252
|
},
|
|
249
253
|
alert_info_border: {
|
|
250
254
|
light1: "--blue_40",
|
|
@@ -253,10 +257,10 @@ export const tokenComponentColor: TokenComponentColorValue = {
|
|
|
253
257
|
dark2: "--blue_30",
|
|
254
258
|
},
|
|
255
259
|
alert_warning_bg: {
|
|
256
|
-
light1: "rgba(
|
|
257
|
-
light2: "rgba(
|
|
258
|
-
dark1: "rgba(255,
|
|
259
|
-
dark2: "rgba(255,
|
|
260
|
+
light1: "rgba(255, 129, 26, 0.16)", // "--orange_40 16%",
|
|
261
|
+
light2: "rgba(255, 129, 26, 0.16)", // "--orange_40 16%",
|
|
262
|
+
dark1: "rgba(255, 153, 69, 0.32)", // "--orange_30 32%",
|
|
263
|
+
dark2: "rgba(255, 153, 69, 0.32)", // "--orange_30 32%",
|
|
260
264
|
},
|
|
261
265
|
alert_warning_border: {
|
|
262
266
|
light1: "--orange_40",
|
|
@@ -120,6 +120,13 @@ export const tokenCoreColor: TokenCoreColorValue = {
|
|
|
120
120
|
dark2: "--blue_30",
|
|
121
121
|
},
|
|
122
122
|
hover: {
|
|
123
|
+
// Deprecated. Please use core.status_hover instead.
|
|
124
|
+
light1: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
125
|
+
light2: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
126
|
+
dark1: "rgba(255, 255, 255, 0.12)", // "--grey_0 12%",
|
|
127
|
+
dark2: "rgba(255, 255, 255, 0.12)", // "--grey_0 12%",
|
|
128
|
+
},
|
|
129
|
+
status_hover: {
|
|
123
130
|
// TODO: 알파값 적용 코드는 일단 하드코딩. 나중에 수정할것
|
|
124
131
|
light1: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
125
132
|
light2: "rgba(0, 0, 0, 0.12)", // "--grey_100 12%",
|
|
@@ -127,12 +134,26 @@ export const tokenCoreColor: TokenCoreColorValue = {
|
|
|
127
134
|
dark2: "rgba(255, 255, 255, 0.12)", // "--grey_0 12%",
|
|
128
135
|
},
|
|
129
136
|
focused: {
|
|
137
|
+
// Deprecated. Please use core.status_focused instead.
|
|
138
|
+
light1: "--lunit_teal_40",
|
|
139
|
+
light2: "--lunit_teal_40",
|
|
140
|
+
dark1: "--lunit_teal_40",
|
|
141
|
+
dark2: "--lunit_teal_40",
|
|
142
|
+
},
|
|
143
|
+
status_focused: {
|
|
130
144
|
light1: "--lunit_teal_40",
|
|
131
145
|
light2: "--lunit_teal_40",
|
|
132
146
|
dark1: "--lunit_teal_40",
|
|
133
147
|
dark2: "--lunit_teal_40",
|
|
134
148
|
},
|
|
135
149
|
selected: {
|
|
150
|
+
// Deprecated. Please use core.status_selected instead.
|
|
151
|
+
light1: "--lunit_teal_10",
|
|
152
|
+
light2: "--lunit_teal_10",
|
|
153
|
+
dark1: "--lunit_teal_80",
|
|
154
|
+
dark2: "--lunit_teal_80",
|
|
155
|
+
},
|
|
156
|
+
status_selected: {
|
|
136
157
|
light1: "--lunit_teal_10",
|
|
137
158
|
light2: "--lunit_teal_10",
|
|
138
159
|
dark1: "--lunit_teal_80",
|
|
@@ -20,8 +20,11 @@ export interface ColorToken {
|
|
|
20
20
|
icon_warning_02: string;
|
|
21
21
|
icon_info_02: string;
|
|
22
22
|
hover: string;
|
|
23
|
+
status_hover: string;
|
|
23
24
|
focused: string;
|
|
25
|
+
status_focused: string;
|
|
24
26
|
selected: string;
|
|
27
|
+
status_selected: string;
|
|
25
28
|
shadow_01: string;
|
|
26
29
|
shadow_02: string;
|
|
27
30
|
shadow_03: string;
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,12 @@ export { default as Checkbox } from "./components/Checkbox";
|
|
|
8
8
|
export { default as Dialog } from "./components/Dialog";
|
|
9
9
|
export { default as DataTable } from "./components/DataTable";
|
|
10
10
|
export { default as DatePicker } from "./components/DatePicker";
|
|
11
|
-
export {
|
|
11
|
+
export {
|
|
12
|
+
default as Dropdown,
|
|
13
|
+
DropdownItem,
|
|
14
|
+
DropdownDivider,
|
|
15
|
+
DropdownSubtitle,
|
|
16
|
+
} from "./components/Dropdown";
|
|
12
17
|
export { default as FormLabel } from "./components/FormLabel";
|
|
13
18
|
export { default as Radio } from "./components/Radio";
|
|
14
19
|
export { default as RadioGroup } from "./components/RadioGroup";
|
|
@@ -281,3 +281,21 @@ export const ContainedWithDeleteAndThumbnail = {
|
|
|
281
281
|
|
|
282
282
|
name: "Kind(Variant): Contained with Thumbnail and Deletable",
|
|
283
283
|
};
|
|
284
|
+
|
|
285
|
+
export const Multiline = {
|
|
286
|
+
render: () => (
|
|
287
|
+
<Box sx={{ width: 100 }}>
|
|
288
|
+
<Chip
|
|
289
|
+
sx={{
|
|
290
|
+
height: "auto",
|
|
291
|
+
"& .MuiChip-label": {
|
|
292
|
+
display: "block",
|
|
293
|
+
whiteSpace: "normal",
|
|
294
|
+
},
|
|
295
|
+
}}
|
|
296
|
+
label="This is a chip that has multiple lines."
|
|
297
|
+
/>
|
|
298
|
+
<Chip label="This is a chip that has ellipsis." />
|
|
299
|
+
</Box>
|
|
300
|
+
),
|
|
301
|
+
};
|
|
@@ -120,6 +120,26 @@ The hover/pressed effects are only applied to the delete icon. <br />
|
|
|
120
120
|
<Chip label="label@lunit.io" onDelete={() => console.log("onDelete")} thumbnail="W as initial" />
|
|
121
121
|
````
|
|
122
122
|
|
|
123
|
+
### Multiline
|
|
124
|
+
By default, Chips displays labels only in a single line. To have them support multiline content, use the `sx` prop to add `height:auto` to the Chip component, and `whiteSpace: normal` to the `label` styles.
|
|
125
|
+
|
|
126
|
+
<Canvas of={ChipStories.Multiline} />
|
|
127
|
+
```tsx
|
|
128
|
+
<Chip
|
|
129
|
+
sx={{
|
|
130
|
+
height: "auto",
|
|
131
|
+
"& .MuiChip-label": {
|
|
132
|
+
display: "block",
|
|
133
|
+
whiteSpace: "normal",
|
|
134
|
+
},
|
|
135
|
+
}}
|
|
136
|
+
label="This is a chip that has multiple lines."
|
|
137
|
+
/>
|
|
138
|
+
<Chip label="This is a chip that has ellipsis." />
|
|
139
|
+
````
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
123
143
|
## Reference
|
|
124
144
|
|
|
125
145
|
- [Material-UI Chip](https://mui.com/material-ui/react-chip/)
|
|
@@ -41,24 +41,16 @@ If it is set to `false`, the Dialog will not be rendered in the DOM.
|
|
|
41
41
|
</Dialog>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
### Dismiss(onClose,
|
|
44
|
+
### Dismiss(onClose, enableBackdropClick)
|
|
45
45
|
|
|
46
46
|
The `onClose` prop is used to close the Dialog. You can pass a function to the prop to close the Dialog. <br />
|
|
47
|
-
If the `enableBackButtonClick` prop is set to `true`, the Dialog will be closed when the back button(escape/backspace key) is pressed. <br />
|
|
48
47
|
If the `enableBackdropClose` prop is set to `true`, the Dialog will be closed when the backdrop(outside of the dialog area) is clicked. <br />
|
|
49
|
-
|
|
50
|
-
<br />
|
|
51
|
-
The `enableBackButtonClick` is awalys `true` in Passive Modal, but it is optional
|
|
52
|
-
in Action Modal. <br />
|
|
53
|
-
The `enableBackdropClose` is awalys `true` only in Passive Modal.
|
|
48
|
+
The `enableBackdropClose` is always `true` only in Passive Modal.
|
|
54
49
|
|
|
55
50
|
```tsx
|
|
56
51
|
<Dialog isOpen={true} onClose={close} type="passive" title="Title area">
|
|
57
52
|
Lorem Ipsum is simply dummy text of the a printing and typesetting industry
|
|
58
53
|
</Dialog>
|
|
59
|
-
<Dialog isOpen={true} onClose={close} type="action" title="Title area" actions={actionsChildren} enableBackButtonClick>
|
|
60
|
-
Lorem Ipsum is simply dummy text of the a printing and typesetting industry
|
|
61
|
-
</Dialog>
|
|
62
54
|
```
|
|
63
55
|
|
|
64
56
|
### Type
|