pds-dev-kit-web 2.2.161 → 2.2.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +1 -1
- package/dist/src/common/styles/colorSet/UIColor.json +7 -3
- package/dist/src/common/styles/colorSet/index.d.ts +132 -128
- package/dist/src/common/styles/colorSet/index.js +2 -2
- package/dist/src/common/styles/colorSet/ui-type.d.ts +6 -2
- package/dist/src/desktop/components/Checkbox/Checkbox.d.ts +3 -1
- package/dist/src/desktop/components/Checkbox/Checkbox.js +17 -3
- package/dist/src/mobile/components/Checkbox/Checkbox.d.ts +3 -1
- package/dist/src/mobile/components/Checkbox/Checkbox.js +17 -3
- package/package.json +1 -1
- package/release-note.md +2 -2
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
"ui_cpnt_card_icon_background_03": "sys_widget_success_01",
|
|
309
309
|
"ui_cpnt_bannerslide_gradient_1": "sys_component_base_05",
|
|
310
310
|
"ui_cpnt_bannerslide_gradient_2": "sys_component_base_05_opacity00",
|
|
311
|
-
"
|
|
311
|
+
"ui_cpnt_modal_gradient_1": "sys_component_base_black_opacity00",
|
|
312
312
|
"ui_cpnt_modal_gradient_2": "sys_component_base_black",
|
|
313
313
|
"ui_cpnt_list_icon_04": "sys_widget_white",
|
|
314
314
|
"ui_cpnt_list_thumbnail_border": "sys_border_line_01",
|
|
@@ -316,6 +316,7 @@
|
|
|
316
316
|
"ui_cpnt_list_thumbnail_gradient_2": "sys_component_base_black_opacity00",
|
|
317
317
|
"ui_cpnt_list_base_area_active": "sys_component_base_01",
|
|
318
318
|
"ui_cpnt_contextmenu_base": "sys_component_base_02",
|
|
319
|
+
"ui_cpnt_videoplayer_gradient_1": "sys_component_base_black_opacity50",
|
|
319
320
|
"ui_cpnt_videoplayer_gradient_2": "sys_component_base_black_opacity00",
|
|
320
321
|
"ui_cpnt_videoplayer_overlay": "sys_component_base_black_opacity50",
|
|
321
322
|
"ui_globalmenucontainer_background": "sys_container_background_01",
|
|
@@ -888,10 +889,13 @@
|
|
|
888
889
|
"ui_135": "sys_widget_grey_01",
|
|
889
890
|
"ui_136": "sys_component_base_18",
|
|
890
891
|
"ui_137": "sys_component_base_50",
|
|
891
|
-
"ui_cpnt_modal_gradient_1": "sys_component_base_black_opacity00",
|
|
892
892
|
"ui_138": "sys_cpnt_sheet_base_12",
|
|
893
893
|
"ui_139": "sys_dimmed_01",
|
|
894
894
|
"ui_cpnt_sheet_base_29": "sys_cpnt_sheet_base_51",
|
|
895
895
|
"ui_cpnt_sheet_base_30": "sys_cpnt_sheet_base_52",
|
|
896
|
-
"ui_cpnt_sheet_base_31": "sys_cpnt_sheet_base_53"
|
|
896
|
+
"ui_cpnt_sheet_base_31": "sys_cpnt_sheet_base_53",
|
|
897
|
+
"ui_cpnt_selcontrols_icon_white": "sys_widget_white",
|
|
898
|
+
"ui_cpnt_selcontrols_text_white": "sys_text_white",
|
|
899
|
+
"ui_cpnt_selcontrols_icon_grey_01": "sys_widget_grey_01",
|
|
900
|
+
"ui_cpnt_selcontrols_text_grey_01": "sys_text_grey_01"
|
|
897
901
|
}
|
|
@@ -1,129 +1,5 @@
|
|
|
1
1
|
declare const colorSet: {
|
|
2
|
-
readonly
|
|
3
|
-
blue500: string;
|
|
4
|
-
blue700: string;
|
|
5
|
-
blue300: string;
|
|
6
|
-
green700: string;
|
|
7
|
-
green500: string;
|
|
8
|
-
green300: string;
|
|
9
|
-
red500: string;
|
|
10
|
-
grey900: string;
|
|
11
|
-
grey500: string;
|
|
12
|
-
grey400: string;
|
|
13
|
-
grey100: string;
|
|
14
|
-
grey50: string;
|
|
15
|
-
white: string;
|
|
16
|
-
black: string;
|
|
17
|
-
darkblue500: string;
|
|
18
|
-
grey950: string;
|
|
19
|
-
darkgrey900: string;
|
|
20
|
-
darkgrey500: string;
|
|
21
|
-
darkgrey400: string;
|
|
22
|
-
darkgrey100: string;
|
|
23
|
-
darkgrey50: string;
|
|
24
|
-
darkred500: string;
|
|
25
|
-
darkgreen700: string;
|
|
26
|
-
orange500: string;
|
|
27
|
-
darkorange500: string;
|
|
28
|
-
opacity00: string;
|
|
29
|
-
opacity20: string;
|
|
30
|
-
opacity30: string;
|
|
31
|
-
opacity65: string;
|
|
32
|
-
darkgreen500: string;
|
|
33
|
-
grey70: string;
|
|
34
|
-
navy500: string;
|
|
35
|
-
lightgreen500: string;
|
|
36
|
-
pink500: string;
|
|
37
|
-
darkgrey70: string;
|
|
38
|
-
darknavy500: string;
|
|
39
|
-
darkpink500: string;
|
|
40
|
-
darklightgreen500: string;
|
|
41
|
-
opacity10: string;
|
|
42
|
-
grey600: string;
|
|
43
|
-
darkgrey600: string;
|
|
44
|
-
skyblue500: string;
|
|
45
|
-
skyblue300: string;
|
|
46
|
-
pink300: string;
|
|
47
|
-
lightpink500: string;
|
|
48
|
-
darkblue300: string;
|
|
49
|
-
darkblue700: string;
|
|
50
|
-
darkgreen300: string;
|
|
51
|
-
darkskyblue500: string;
|
|
52
|
-
navy100: string;
|
|
53
|
-
darknavy100: string;
|
|
54
|
-
opacity80: string;
|
|
55
|
-
opacity50: string;
|
|
56
|
-
grey30: string;
|
|
57
|
-
opacity95: string;
|
|
58
|
-
darkgrey30: string;
|
|
59
|
-
opacity40: string;
|
|
60
|
-
kakaoyellow: string;
|
|
61
|
-
pastelblue500: string;
|
|
62
|
-
pastelpink500: string;
|
|
63
|
-
pastelorange500: string;
|
|
64
|
-
pastelgreen500: string;
|
|
65
|
-
pastelpurple500: string;
|
|
66
|
-
darkpastelblue500: string;
|
|
67
|
-
darkpastelpink500: string;
|
|
68
|
-
darkpastelorange500: string;
|
|
69
|
-
darkpastelgreen500: string;
|
|
70
|
-
darkpastelpurple500: string;
|
|
71
|
-
green30: string;
|
|
72
|
-
darkgreen30: string;
|
|
73
|
-
orange50: string;
|
|
74
|
-
darkorange50: string;
|
|
75
|
-
orange30: string;
|
|
76
|
-
darkorange30: string;
|
|
77
|
-
green50: string;
|
|
78
|
-
darkgreen50: string;
|
|
79
|
-
opacity90: string;
|
|
80
|
-
facebookblue: string;
|
|
81
|
-
opacity05: string;
|
|
82
|
-
opacity15: string;
|
|
83
|
-
grey80: string;
|
|
84
|
-
grey200: string;
|
|
85
|
-
darkgrey80: string;
|
|
86
|
-
darkgrey200: string;
|
|
87
|
-
opacity70: string;
|
|
88
|
-
opacity60: string;
|
|
89
|
-
skyblue100: string;
|
|
90
|
-
green100: string;
|
|
91
|
-
darkgreen100: string;
|
|
92
|
-
darkskyblue100: string;
|
|
93
|
-
opacity25: string;
|
|
94
|
-
opacity35: string;
|
|
95
|
-
grey10: string;
|
|
96
|
-
darkgrey10: string;
|
|
97
|
-
blue50: string;
|
|
98
|
-
darkblue50: string;
|
|
99
|
-
blue10: string;
|
|
100
|
-
red10: string;
|
|
101
|
-
green10: string;
|
|
102
|
-
blue30: string;
|
|
103
|
-
red30: string;
|
|
104
|
-
orange300: string;
|
|
105
|
-
darkorange300: string;
|
|
106
|
-
darkpink300: string;
|
|
107
|
-
pastelblue300: string;
|
|
108
|
-
darkpastelblue300: string;
|
|
109
|
-
softpurple500: string;
|
|
110
|
-
darksoftpurple500: string;
|
|
111
|
-
coolpink500: string;
|
|
112
|
-
darkcoolpink500: string;
|
|
113
|
-
brown500: string;
|
|
114
|
-
darkbrown500: string;
|
|
115
|
-
yellow300: string;
|
|
116
|
-
darkyellow300: string;
|
|
117
|
-
grey20: string;
|
|
118
|
-
darkgrey20: string;
|
|
119
|
-
grey300: string;
|
|
120
|
-
darkgrey300: string;
|
|
121
|
-
yellow500: string;
|
|
122
|
-
darkyellow500: string;
|
|
123
|
-
grey450: string;
|
|
124
|
-
darkgrey450: string;
|
|
125
|
-
};
|
|
126
|
-
readonly PaletteColor_Dark: {
|
|
2
|
+
readonly PaletteColor_light: {
|
|
127
3
|
sys_container_background_01: string;
|
|
128
4
|
sys_container_background_02: string;
|
|
129
5
|
sys_container_background_03: string;
|
|
@@ -500,7 +376,131 @@ declare const colorSet: {
|
|
|
500
376
|
sys_cpnt_sheet_base_52: string;
|
|
501
377
|
sys_cpnt_sheet_base_53: string;
|
|
502
378
|
};
|
|
503
|
-
readonly
|
|
379
|
+
readonly SemanticColor: {
|
|
380
|
+
blue500: string;
|
|
381
|
+
blue700: string;
|
|
382
|
+
blue300: string;
|
|
383
|
+
green700: string;
|
|
384
|
+
green500: string;
|
|
385
|
+
green300: string;
|
|
386
|
+
red500: string;
|
|
387
|
+
grey900: string;
|
|
388
|
+
grey500: string;
|
|
389
|
+
grey400: string;
|
|
390
|
+
grey100: string;
|
|
391
|
+
grey50: string;
|
|
392
|
+
white: string;
|
|
393
|
+
black: string;
|
|
394
|
+
darkblue500: string;
|
|
395
|
+
grey950: string;
|
|
396
|
+
darkgrey900: string;
|
|
397
|
+
darkgrey500: string;
|
|
398
|
+
darkgrey400: string;
|
|
399
|
+
darkgrey100: string;
|
|
400
|
+
darkgrey50: string;
|
|
401
|
+
darkred500: string;
|
|
402
|
+
darkgreen700: string;
|
|
403
|
+
orange500: string;
|
|
404
|
+
darkorange500: string;
|
|
405
|
+
opacity00: string;
|
|
406
|
+
opacity20: string;
|
|
407
|
+
opacity30: string;
|
|
408
|
+
opacity65: string;
|
|
409
|
+
darkgreen500: string;
|
|
410
|
+
grey70: string;
|
|
411
|
+
navy500: string;
|
|
412
|
+
lightgreen500: string;
|
|
413
|
+
pink500: string;
|
|
414
|
+
darkgrey70: string;
|
|
415
|
+
darknavy500: string;
|
|
416
|
+
darkpink500: string;
|
|
417
|
+
darklightgreen500: string;
|
|
418
|
+
opacity10: string;
|
|
419
|
+
grey600: string;
|
|
420
|
+
darkgrey600: string;
|
|
421
|
+
skyblue500: string;
|
|
422
|
+
skyblue300: string;
|
|
423
|
+
pink300: string;
|
|
424
|
+
lightpink500: string;
|
|
425
|
+
darkblue300: string;
|
|
426
|
+
darkblue700: string;
|
|
427
|
+
darkgreen300: string;
|
|
428
|
+
darkskyblue500: string;
|
|
429
|
+
navy100: string;
|
|
430
|
+
darknavy100: string;
|
|
431
|
+
opacity80: string;
|
|
432
|
+
opacity50: string;
|
|
433
|
+
grey30: string;
|
|
434
|
+
opacity95: string;
|
|
435
|
+
darkgrey30: string;
|
|
436
|
+
opacity40: string;
|
|
437
|
+
kakaoyellow: string;
|
|
438
|
+
pastelblue500: string;
|
|
439
|
+
pastelpink500: string;
|
|
440
|
+
pastelorange500: string;
|
|
441
|
+
pastelgreen500: string;
|
|
442
|
+
pastelpurple500: string;
|
|
443
|
+
darkpastelblue500: string;
|
|
444
|
+
darkpastelpink500: string;
|
|
445
|
+
darkpastelorange500: string;
|
|
446
|
+
darkpastelgreen500: string;
|
|
447
|
+
darkpastelpurple500: string;
|
|
448
|
+
green30: string;
|
|
449
|
+
darkgreen30: string;
|
|
450
|
+
orange50: string;
|
|
451
|
+
darkorange50: string;
|
|
452
|
+
orange30: string;
|
|
453
|
+
darkorange30: string;
|
|
454
|
+
green50: string;
|
|
455
|
+
darkgreen50: string;
|
|
456
|
+
opacity90: string;
|
|
457
|
+
facebookblue: string;
|
|
458
|
+
opacity05: string;
|
|
459
|
+
opacity15: string;
|
|
460
|
+
grey80: string;
|
|
461
|
+
grey200: string;
|
|
462
|
+
darkgrey80: string;
|
|
463
|
+
darkgrey200: string;
|
|
464
|
+
opacity70: string;
|
|
465
|
+
opacity60: string;
|
|
466
|
+
skyblue100: string;
|
|
467
|
+
green100: string;
|
|
468
|
+
darkgreen100: string;
|
|
469
|
+
darkskyblue100: string;
|
|
470
|
+
opacity25: string;
|
|
471
|
+
opacity35: string;
|
|
472
|
+
grey10: string;
|
|
473
|
+
darkgrey10: string;
|
|
474
|
+
blue50: string;
|
|
475
|
+
darkblue50: string;
|
|
476
|
+
blue10: string;
|
|
477
|
+
red10: string;
|
|
478
|
+
green10: string;
|
|
479
|
+
blue30: string;
|
|
480
|
+
red30: string;
|
|
481
|
+
orange300: string;
|
|
482
|
+
darkorange300: string;
|
|
483
|
+
darkpink300: string;
|
|
484
|
+
pastelblue300: string;
|
|
485
|
+
darkpastelblue300: string;
|
|
486
|
+
softpurple500: string;
|
|
487
|
+
darksoftpurple500: string;
|
|
488
|
+
coolpink500: string;
|
|
489
|
+
darkcoolpink500: string;
|
|
490
|
+
brown500: string;
|
|
491
|
+
darkbrown500: string;
|
|
492
|
+
yellow300: string;
|
|
493
|
+
darkyellow300: string;
|
|
494
|
+
grey20: string;
|
|
495
|
+
darkgrey20: string;
|
|
496
|
+
grey300: string;
|
|
497
|
+
darkgrey300: string;
|
|
498
|
+
yellow500: string;
|
|
499
|
+
darkyellow500: string;
|
|
500
|
+
grey450: string;
|
|
501
|
+
darkgrey450: string;
|
|
502
|
+
};
|
|
503
|
+
readonly PaletteColor_Dark: {
|
|
504
504
|
sys_container_background_01: string;
|
|
505
505
|
sys_container_background_02: string;
|
|
506
506
|
sys_container_background_03: string;
|
|
@@ -1187,7 +1187,7 @@ declare const colorSet: {
|
|
|
1187
1187
|
ui_cpnt_card_icon_background_03: string;
|
|
1188
1188
|
ui_cpnt_bannerslide_gradient_1: string;
|
|
1189
1189
|
ui_cpnt_bannerslide_gradient_2: string;
|
|
1190
|
-
|
|
1190
|
+
ui_cpnt_modal_gradient_1: string;
|
|
1191
1191
|
ui_cpnt_modal_gradient_2: string;
|
|
1192
1192
|
ui_cpnt_list_icon_04: string;
|
|
1193
1193
|
ui_cpnt_list_thumbnail_border: string;
|
|
@@ -1195,6 +1195,7 @@ declare const colorSet: {
|
|
|
1195
1195
|
ui_cpnt_list_thumbnail_gradient_2: string;
|
|
1196
1196
|
ui_cpnt_list_base_area_active: string;
|
|
1197
1197
|
ui_cpnt_contextmenu_base: string;
|
|
1198
|
+
ui_cpnt_videoplayer_gradient_1: string;
|
|
1198
1199
|
ui_cpnt_videoplayer_gradient_2: string;
|
|
1199
1200
|
ui_cpnt_videoplayer_overlay: string;
|
|
1200
1201
|
ui_globalmenucontainer_background: string;
|
|
@@ -1767,12 +1768,15 @@ declare const colorSet: {
|
|
|
1767
1768
|
ui_135: string;
|
|
1768
1769
|
ui_136: string;
|
|
1769
1770
|
ui_137: string;
|
|
1770
|
-
ui_cpnt_modal_gradient_1: string;
|
|
1771
1771
|
ui_138: string;
|
|
1772
1772
|
ui_139: string;
|
|
1773
1773
|
ui_cpnt_sheet_base_29: string;
|
|
1774
1774
|
ui_cpnt_sheet_base_30: string;
|
|
1775
1775
|
ui_cpnt_sheet_base_31: string;
|
|
1776
|
+
ui_cpnt_selcontrols_icon_white: string;
|
|
1777
|
+
ui_cpnt_selcontrols_text_white: string;
|
|
1778
|
+
ui_cpnt_selcontrols_icon_grey_01: string;
|
|
1779
|
+
ui_cpnt_selcontrols_text_grey_01: string;
|
|
1776
1780
|
};
|
|
1777
1781
|
};
|
|
1778
1782
|
export default colorSet;
|
|
@@ -4,14 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
/* eslint-disable import/order */
|
|
7
|
+
var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
|
|
7
8
|
var SemanticColor_json_1 = __importDefault(require("./SemanticColor.json"));
|
|
8
9
|
var PaletteColor_Dark_json_1 = __importDefault(require("./PaletteColor_Dark.json"));
|
|
9
|
-
var PaletteColor_light_json_1 = __importDefault(require("./PaletteColor_light.json"));
|
|
10
10
|
var UIColor_json_1 = __importDefault(require("./UIColor.json"));
|
|
11
11
|
var colorSet = {
|
|
12
|
+
PaletteColor_light: PaletteColor_light_json_1.default,
|
|
12
13
|
SemanticColor: SemanticColor_json_1.default,
|
|
13
14
|
PaletteColor_Dark: PaletteColor_Dark_json_1.default,
|
|
14
|
-
PaletteColor_light: PaletteColor_light_json_1.default,
|
|
15
15
|
UIColor: UIColor_json_1.default
|
|
16
16
|
};
|
|
17
17
|
exports.default = colorSet;
|
|
@@ -308,7 +308,7 @@ export interface UITheme {
|
|
|
308
308
|
ui_cpnt_card_icon_background_03: string;
|
|
309
309
|
ui_cpnt_bannerslide_gradient_1: string;
|
|
310
310
|
ui_cpnt_bannerslide_gradient_2: string;
|
|
311
|
-
|
|
311
|
+
ui_cpnt_modal_gradient_1: string;
|
|
312
312
|
ui_cpnt_modal_gradient_2: string;
|
|
313
313
|
ui_cpnt_list_icon_04: string;
|
|
314
314
|
ui_cpnt_list_thumbnail_border: string;
|
|
@@ -316,6 +316,7 @@ export interface UITheme {
|
|
|
316
316
|
ui_cpnt_list_thumbnail_gradient_2: string;
|
|
317
317
|
ui_cpnt_list_base_area_active: string;
|
|
318
318
|
ui_cpnt_contextmenu_base: string;
|
|
319
|
+
ui_cpnt_videoplayer_gradient_1: string;
|
|
319
320
|
ui_cpnt_videoplayer_gradient_2: string;
|
|
320
321
|
ui_cpnt_videoplayer_overlay: string;
|
|
321
322
|
ui_globalmenucontainer_background: string;
|
|
@@ -888,10 +889,13 @@ export interface UITheme {
|
|
|
888
889
|
ui_135: string;
|
|
889
890
|
ui_136: string;
|
|
890
891
|
ui_137: string;
|
|
891
|
-
ui_cpnt_modal_gradient_1: string;
|
|
892
892
|
ui_138: string;
|
|
893
893
|
ui_139: string;
|
|
894
894
|
ui_cpnt_sheet_base_29: string;
|
|
895
895
|
ui_cpnt_sheet_base_30: string;
|
|
896
896
|
ui_cpnt_sheet_base_31: string;
|
|
897
|
+
ui_cpnt_selcontrols_icon_white: string;
|
|
898
|
+
ui_cpnt_selcontrols_text_white: string;
|
|
899
|
+
ui_cpnt_selcontrols_icon_grey_01: string;
|
|
900
|
+
ui_cpnt_selcontrols_text_grey_01: string;
|
|
897
901
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Path } from 'react-hook-form';
|
|
3
3
|
import type { IFormValues, PDSTextType } from '../../../common';
|
|
4
|
+
type ColorTheme = 'none' | 'white' | 'grey1';
|
|
4
5
|
type CheckboxProps = {
|
|
5
6
|
text?: PDSTextType;
|
|
6
7
|
fontWeight?: 'bold' | 'regular';
|
|
7
8
|
state?: 'normal' | 'disabled';
|
|
8
9
|
name: Path<IFormValues>;
|
|
10
|
+
colorTheme?: ColorTheme;
|
|
9
11
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
};
|
|
11
|
-
declare function Checkbox({ text, fontWeight, state, name, onChange }: CheckboxProps): JSX.Element;
|
|
13
|
+
declare function Checkbox({ text, fontWeight, state, name, colorTheme, onChange }: CheckboxProps): JSX.Element;
|
|
12
14
|
export default Checkbox;
|
|
@@ -24,7 +24,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
24
24
|
var hybrid_1 = require("../../../hybrid");
|
|
25
25
|
var TextLabel_1 = require("../TextLabel");
|
|
26
26
|
function Checkbox(_a) {
|
|
27
|
-
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, onChange = _a.onChange;
|
|
27
|
+
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d, onChange = _a.onChange;
|
|
28
28
|
var register = (0, react_hook_form_1.useFormContext)().register;
|
|
29
29
|
var checkboxFormRegister = register(name);
|
|
30
30
|
var isChecked = (0, react_hook_form_1.useWatch)({ name: name });
|
|
@@ -34,10 +34,24 @@ function Checkbox(_a) {
|
|
|
34
34
|
onChange(e);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
var colorThemeSet = {
|
|
38
|
+
none: {
|
|
39
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_default',
|
|
40
|
+
textColorKey: 'ui_cpnt_selcontrols_text_default'
|
|
41
|
+
},
|
|
42
|
+
white: {
|
|
43
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_white',
|
|
44
|
+
textColorKey: 'ui_cpnt_selcontrols_text_white'
|
|
45
|
+
},
|
|
46
|
+
grey1: {
|
|
47
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_grey_01',
|
|
48
|
+
textColorKey: 'ui_cpnt_selcontrols_text_grey_01'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
37
51
|
var icon = function () {
|
|
38
52
|
switch (state) {
|
|
39
53
|
case 'normal': {
|
|
40
|
-
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey:
|
|
54
|
+
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: colorThemeSet[colorTheme].iconColorkey }));
|
|
41
55
|
}
|
|
42
56
|
case 'disabled': {
|
|
43
57
|
return isChecked ? ((0, jsx_runtime_1.jsxs)(S_OverrideIconWrapper, { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" }) }), (0, jsx_runtime_1.jsx)(S_OverrideIcon, { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_on_base_hover" }) })] })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_disabled" }));
|
|
@@ -45,7 +59,7 @@ function Checkbox(_a) {
|
|
|
45
59
|
}
|
|
46
60
|
};
|
|
47
61
|
return ((0, jsx_runtime_1.jsx)(S_Checkbox, __assign({ "x-pds-name": "Checkbox", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: (0, jsx_runtime_1.jsxs)(S_Label, __assign({ htmlFor: name, isDisabled: state === 'disabled' }, { children: [icon(), text && ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: fontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorOverride: state === 'normal'
|
|
48
|
-
?
|
|
62
|
+
? colorThemeSet[colorTheme].textColorKey
|
|
49
63
|
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", __assign({ hidden: true, type: "checkbox" }, checkboxFormRegister, { id: name, disabled: state === 'disabled', onChange: handleChange }))] })) })));
|
|
50
64
|
}
|
|
51
65
|
var S_Checkbox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 24px;\n"], ["\n align-items: center;\n display: flex;\n height: 24px;\n"])));
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Path } from 'react-hook-form';
|
|
3
3
|
import type { IFormValues, PDSTextType } from '../../../common';
|
|
4
|
+
type ColorTheme = 'none' | 'white' | 'grey1';
|
|
4
5
|
type CheckboxProps = {
|
|
5
6
|
text?: PDSTextType;
|
|
6
7
|
fontWeight?: 'bold' | 'regular';
|
|
7
8
|
state?: 'normal' | 'disabled';
|
|
8
9
|
name: Path<IFormValues>;
|
|
10
|
+
colorTheme?: ColorTheme;
|
|
9
11
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
};
|
|
11
|
-
declare function Checkbox({ text, fontWeight, state, name, onChange }: CheckboxProps): JSX.Element;
|
|
13
|
+
declare function Checkbox({ text, fontWeight, state, name, colorTheme, onChange }: CheckboxProps): JSX.Element;
|
|
12
14
|
export default Checkbox;
|
|
@@ -24,7 +24,7 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
24
24
|
var hybrid_1 = require("../../../hybrid");
|
|
25
25
|
var TextLabel_1 = require("../TextLabel");
|
|
26
26
|
function Checkbox(_a) {
|
|
27
|
-
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, onChange = _a.onChange;
|
|
27
|
+
var text = _a.text, _b = _a.fontWeight, fontWeight = _b === void 0 ? 'regular' : _b, _c = _a.state, state = _c === void 0 ? 'normal' : _c, name = _a.name, _d = _a.colorTheme, colorTheme = _d === void 0 ? 'none' : _d, onChange = _a.onChange;
|
|
28
28
|
var register = (0, react_hook_form_1.useFormContext)().register;
|
|
29
29
|
var checkboxFormRegister = register(name);
|
|
30
30
|
var isChecked = (0, react_hook_form_1.useWatch)({ name: name });
|
|
@@ -34,10 +34,24 @@ function Checkbox(_a) {
|
|
|
34
34
|
onChange(e);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
var colorThemeSet = {
|
|
38
|
+
none: {
|
|
39
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_default',
|
|
40
|
+
textColorKey: 'ui_cpnt_selcontrols_text_default'
|
|
41
|
+
},
|
|
42
|
+
white: {
|
|
43
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_white',
|
|
44
|
+
textColorKey: 'ui_cpnt_selcontrols_text_white'
|
|
45
|
+
},
|
|
46
|
+
grey1: {
|
|
47
|
+
iconColorkey: 'ui_cpnt_selcontrols_icon_grey_01',
|
|
48
|
+
textColorKey: 'ui_cpnt_selcontrols_text_grey_01'
|
|
49
|
+
}
|
|
50
|
+
};
|
|
37
51
|
var icon = function () {
|
|
38
52
|
switch (state) {
|
|
39
53
|
case 'normal': {
|
|
40
|
-
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey:
|
|
54
|
+
return isChecked ? ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: colorThemeSet[colorTheme].iconColorkey }));
|
|
41
55
|
}
|
|
42
56
|
case 'disabled': {
|
|
43
57
|
return isChecked ? ((0, jsx_runtime_1.jsxs)(S_OverrideIconWrapper, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" }), (0, jsx_runtime_1.jsx)(S_OverrideIcon, { children: (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_on_base_hover" }) })] })) : ((0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_disabled" }));
|
|
@@ -45,7 +59,7 @@ function Checkbox(_a) {
|
|
|
45
59
|
}
|
|
46
60
|
};
|
|
47
61
|
return ((0, jsx_runtime_1.jsx)(S_Checkbox, __assign({ "x-pds-name": "Checkbox", "x-pds-element-type": "component", "x-pds-device-type": "mobile" }, { children: (0, jsx_runtime_1.jsxs)(S_Label, __assign({ htmlFor: name }, { children: [icon(), text && ((0, jsx_runtime_1.jsx)(S_TextWrapper, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: text, styleTheme: fontWeight === 'regular' ? 'body2Regular' : 'body2Bold', colorOverride: state === 'normal'
|
|
48
|
-
?
|
|
62
|
+
? colorThemeSet[colorTheme].textColorKey
|
|
49
63
|
: 'ui_cpnt_selcontrols_text_disabled' }) })), (0, jsx_runtime_1.jsx)("input", __assign({ hidden: true, type: "checkbox" }, checkboxFormRegister, { id: name, disabled: state === 'disabled', onChange: handleChange }))] })) })));
|
|
50
64
|
}
|
|
51
65
|
var S_Checkbox = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 24px;\n"], ["\n align-items: center;\n display: flex;\n height: 24px;\n"])));
|
package/package.json
CHANGED
package/release-note.md
CHANGED