@teamturing/react-kit 2.41.2 → 2.42.1
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.
|
@@ -9,10 +9,16 @@ type Props = {
|
|
|
9
9
|
* 반응형 디자인이 적용됩니다.
|
|
10
10
|
*/
|
|
11
11
|
size?: ResponsiveValue<'l' | 'm' | 's'>;
|
|
12
|
+
/**
|
|
13
|
+
* 모양을 정의합니다.
|
|
14
|
+
* 반응형 디자인이 적용됩니다.
|
|
15
|
+
*/
|
|
16
|
+
shape?: 'circle' | 'rounded';
|
|
12
17
|
/**
|
|
13
18
|
* 색을 정의합니다.
|
|
19
|
+
* 반응형 디자인이 적용됩니다.
|
|
14
20
|
*/
|
|
15
|
-
variant?: 'primary' | 'plain' | 'plain-neutral';
|
|
21
|
+
variant?: 'primary' | 'plain' | 'blue' | 'plain-neutral';
|
|
16
22
|
/**
|
|
17
23
|
* 활성화 상태를 정의합니다.
|
|
18
24
|
* `true`일 경우, 활성화된 상태를 그립니다.
|
|
@@ -30,10 +36,16 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
30
36
|
* 반응형 디자인이 적용됩니다.
|
|
31
37
|
*/
|
|
32
38
|
size?: ResponsiveValue<"m" | "s" | "l"> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* 모양을 정의합니다.
|
|
41
|
+
* 반응형 디자인이 적용됩니다.
|
|
42
|
+
*/
|
|
43
|
+
shape?: "circle" | "rounded" | undefined;
|
|
33
44
|
/**
|
|
34
45
|
* 색을 정의합니다.
|
|
46
|
+
* 반응형 디자인이 적용됩니다.
|
|
35
47
|
*/
|
|
36
|
-
variant?: "primary" | "plain" | "plain-neutral" | undefined;
|
|
48
|
+
variant?: "blue" | "primary" | "plain" | "plain-neutral" | undefined;
|
|
37
49
|
/**
|
|
38
50
|
* 활성화 상태를 정의합니다.
|
|
39
51
|
* `true`일 경우, 활성화된 상태를 그립니다.
|
package/dist/index.js
CHANGED
|
@@ -20406,8 +20406,10 @@ const Overlay = ({
|
|
|
20406
20406
|
React.useEffect(() => {
|
|
20407
20407
|
if (isOpen) {
|
|
20408
20408
|
document.addEventListener('click', handleOutsideClick);
|
|
20409
|
+
document.addEventListener('touchstart', handleOutsideClick);
|
|
20409
20410
|
return () => {
|
|
20410
20411
|
document.removeEventListener('click', handleOutsideClick);
|
|
20412
|
+
document.removeEventListener('touchstart', handleOutsideClick);
|
|
20411
20413
|
};
|
|
20412
20414
|
}
|
|
20413
20415
|
}, [isOpen, handleOutsideClick]);
|
|
@@ -37360,6 +37362,7 @@ const GradientText = styled__default.default(Text)`
|
|
|
37360
37362
|
const IconToggleButton = ({
|
|
37361
37363
|
icon: Icon,
|
|
37362
37364
|
size = 'm',
|
|
37365
|
+
shape = 'circle',
|
|
37363
37366
|
variant = 'primary',
|
|
37364
37367
|
selected = false,
|
|
37365
37368
|
disabled = false,
|
|
@@ -37369,6 +37372,7 @@ const IconToggleButton = ({
|
|
|
37369
37372
|
ref: ref,
|
|
37370
37373
|
icon: Icon,
|
|
37371
37374
|
size: size,
|
|
37375
|
+
shape: shape,
|
|
37372
37376
|
variant: variant,
|
|
37373
37377
|
selected: selected,
|
|
37374
37378
|
type: 'button',
|
|
@@ -37383,7 +37387,6 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37383
37387
|
theme
|
|
37384
37388
|
}) => ({
|
|
37385
37389
|
'position': 'relative',
|
|
37386
|
-
'borderRadius': theme.radii.full,
|
|
37387
37390
|
'transition': 'background-color 100ms, color 100ms',
|
|
37388
37391
|
'& svg': {
|
|
37389
37392
|
display: 'block'
|
|
@@ -37420,6 +37423,18 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37420
37423
|
}
|
|
37421
37424
|
}
|
|
37422
37425
|
}
|
|
37426
|
+
}), ({
|
|
37427
|
+
theme
|
|
37428
|
+
}) => variant({
|
|
37429
|
+
prop: 'shape',
|
|
37430
|
+
variants: {
|
|
37431
|
+
circle: {
|
|
37432
|
+
borderRadius: theme.radii.full
|
|
37433
|
+
},
|
|
37434
|
+
rounded: {
|
|
37435
|
+
borderRadius: theme.radii.xs
|
|
37436
|
+
}
|
|
37437
|
+
}
|
|
37423
37438
|
}), ({
|
|
37424
37439
|
selected,
|
|
37425
37440
|
$disabled,
|
|
@@ -37452,6 +37467,19 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37452
37467
|
color: theme.colors['icon/disabled/subtler']
|
|
37453
37468
|
} : {})
|
|
37454
37469
|
},
|
|
37470
|
+
'blue': {
|
|
37471
|
+
...(selected ? {
|
|
37472
|
+
backgroundColor: theme.colors['bg/accent/blue/subtlest'],
|
|
37473
|
+
color: theme.colors['icon/accent/blue']
|
|
37474
|
+
} : {
|
|
37475
|
+
backgroundColor: theme.colors['bg/neutral'],
|
|
37476
|
+
color: theme.colors['icon/neutral']
|
|
37477
|
+
}),
|
|
37478
|
+
...($disabled ? {
|
|
37479
|
+
backgroundColor: theme.colors['bg/disabled'],
|
|
37480
|
+
color: theme.colors['icon/disabled']
|
|
37481
|
+
} : {})
|
|
37482
|
+
},
|
|
37455
37483
|
'plain-neutral': {
|
|
37456
37484
|
backgroundColor: theme.colors['bg/neutral/subtler'],
|
|
37457
37485
|
...(selected ? {
|
|
@@ -9,6 +9,7 @@ import { variant } from '../../node_modules/@styled-system/variant/dist/index.es
|
|
|
9
9
|
const IconToggleButton = ({
|
|
10
10
|
icon: Icon,
|
|
11
11
|
size = 'm',
|
|
12
|
+
shape = 'circle',
|
|
12
13
|
variant = 'primary',
|
|
13
14
|
selected = false,
|
|
14
15
|
disabled = false,
|
|
@@ -18,6 +19,7 @@ const IconToggleButton = ({
|
|
|
18
19
|
ref: ref,
|
|
19
20
|
icon: Icon,
|
|
20
21
|
size: size,
|
|
22
|
+
shape: shape,
|
|
21
23
|
variant: variant,
|
|
22
24
|
selected: selected,
|
|
23
25
|
type: 'button',
|
|
@@ -32,7 +34,6 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
|
|
|
32
34
|
theme
|
|
33
35
|
}) => ({
|
|
34
36
|
'position': 'relative',
|
|
35
|
-
'borderRadius': theme.radii.full,
|
|
36
37
|
'transition': 'background-color 100ms, color 100ms',
|
|
37
38
|
'& svg': {
|
|
38
39
|
display: 'block'
|
|
@@ -69,6 +70,18 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
73
|
+
}), ({
|
|
74
|
+
theme
|
|
75
|
+
}) => variant({
|
|
76
|
+
prop: 'shape',
|
|
77
|
+
variants: {
|
|
78
|
+
circle: {
|
|
79
|
+
borderRadius: theme.radii.full
|
|
80
|
+
},
|
|
81
|
+
rounded: {
|
|
82
|
+
borderRadius: theme.radii.xs
|
|
83
|
+
}
|
|
84
|
+
}
|
|
72
85
|
}), ({
|
|
73
86
|
selected,
|
|
74
87
|
$disabled,
|
|
@@ -101,6 +114,19 @@ const BaseIconToggleButton = styled(UnstyledButton)(({
|
|
|
101
114
|
color: theme.colors['icon/disabled/subtler']
|
|
102
115
|
} : {})
|
|
103
116
|
},
|
|
117
|
+
'blue': {
|
|
118
|
+
...(selected ? {
|
|
119
|
+
backgroundColor: theme.colors['bg/accent/blue/subtlest'],
|
|
120
|
+
color: theme.colors['icon/accent/blue']
|
|
121
|
+
} : {
|
|
122
|
+
backgroundColor: theme.colors['bg/neutral'],
|
|
123
|
+
color: theme.colors['icon/neutral']
|
|
124
|
+
}),
|
|
125
|
+
...($disabled ? {
|
|
126
|
+
backgroundColor: theme.colors['bg/disabled'],
|
|
127
|
+
color: theme.colors['icon/disabled']
|
|
128
|
+
} : {})
|
|
129
|
+
},
|
|
104
130
|
'plain-neutral': {
|
|
105
131
|
backgroundColor: theme.colors['bg/neutral/subtler'],
|
|
106
132
|
...(selected ? {
|
|
@@ -57,8 +57,10 @@ const Overlay = ({
|
|
|
57
57
|
useEffect(() => {
|
|
58
58
|
if (isOpen) {
|
|
59
59
|
document.addEventListener('click', handleOutsideClick);
|
|
60
|
+
document.addEventListener('touchstart', handleOutsideClick);
|
|
60
61
|
return () => {
|
|
61
62
|
document.removeEventListener('click', handleOutsideClick);
|
|
63
|
+
document.removeEventListener('touchstart', handleOutsideClick);
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
66
|
}, [isOpen, handleOutsideClick]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.1",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "c8efab2beaf98b2cdcb79ba45eaebfc50f985dfe"
|
|
70
70
|
}
|