@teamturing/react-kit 2.41.2 → 2.42.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.
|
@@ -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
|
@@ -37360,6 +37360,7 @@ const GradientText = styled__default.default(Text)`
|
|
|
37360
37360
|
const IconToggleButton = ({
|
|
37361
37361
|
icon: Icon,
|
|
37362
37362
|
size = 'm',
|
|
37363
|
+
shape = 'circle',
|
|
37363
37364
|
variant = 'primary',
|
|
37364
37365
|
selected = false,
|
|
37365
37366
|
disabled = false,
|
|
@@ -37369,6 +37370,7 @@ const IconToggleButton = ({
|
|
|
37369
37370
|
ref: ref,
|
|
37370
37371
|
icon: Icon,
|
|
37371
37372
|
size: size,
|
|
37373
|
+
shape: shape,
|
|
37372
37374
|
variant: variant,
|
|
37373
37375
|
selected: selected,
|
|
37374
37376
|
type: 'button',
|
|
@@ -37383,7 +37385,6 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37383
37385
|
theme
|
|
37384
37386
|
}) => ({
|
|
37385
37387
|
'position': 'relative',
|
|
37386
|
-
'borderRadius': theme.radii.full,
|
|
37387
37388
|
'transition': 'background-color 100ms, color 100ms',
|
|
37388
37389
|
'& svg': {
|
|
37389
37390
|
display: 'block'
|
|
@@ -37420,6 +37421,18 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37420
37421
|
}
|
|
37421
37422
|
}
|
|
37422
37423
|
}
|
|
37424
|
+
}), ({
|
|
37425
|
+
theme
|
|
37426
|
+
}) => variant({
|
|
37427
|
+
prop: 'shape',
|
|
37428
|
+
variants: {
|
|
37429
|
+
circle: {
|
|
37430
|
+
borderRadius: theme.radii.full
|
|
37431
|
+
},
|
|
37432
|
+
rounded: {
|
|
37433
|
+
borderRadius: theme.radii.xs
|
|
37434
|
+
}
|
|
37435
|
+
}
|
|
37423
37436
|
}), ({
|
|
37424
37437
|
selected,
|
|
37425
37438
|
$disabled,
|
|
@@ -37452,6 +37465,19 @@ const BaseIconToggleButton = styled__default.default(UnstyledButton)(({
|
|
|
37452
37465
|
color: theme.colors['icon/disabled/subtler']
|
|
37453
37466
|
} : {})
|
|
37454
37467
|
},
|
|
37468
|
+
'blue': {
|
|
37469
|
+
...(selected ? {
|
|
37470
|
+
backgroundColor: theme.colors['bg/accent/blue/subtlest'],
|
|
37471
|
+
color: theme.colors['icon/accent/blue']
|
|
37472
|
+
} : {
|
|
37473
|
+
backgroundColor: theme.colors['bg/neutral'],
|
|
37474
|
+
color: theme.colors['icon/neutral']
|
|
37475
|
+
}),
|
|
37476
|
+
...($disabled ? {
|
|
37477
|
+
backgroundColor: theme.colors['bg/disabled'],
|
|
37478
|
+
color: theme.colors['icon/disabled']
|
|
37479
|
+
} : {})
|
|
37480
|
+
},
|
|
37455
37481
|
'plain-neutral': {
|
|
37456
37482
|
backgroundColor: theme.colors['bg/neutral/subtler'],
|
|
37457
37483
|
...(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 ? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.0",
|
|
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": "94a3c71c241b43a1946205576082a33047abff02"
|
|
70
70
|
}
|