@teamturing/react-kit 2.19.23 → 2.19.25
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/core/Pill/index.d.ts +2 -2
- package/dist/index.js +47 -30
- package/esm/core/Pill/index.js +47 -30
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentType, ElementType, HTMLAttributes, ReactNode, SVGProps, MouseEvent as ReactMouseEvent, KeyboardEvent as ReactKeyboardEvent } from 'react';
|
|
2
2
|
import { ResponsiveValue } from 'styled-system';
|
|
3
3
|
import { SxProp } from '../../utils/styled-system';
|
|
4
|
-
type PillSizeType = 'm';
|
|
4
|
+
type PillSizeType = 's' | 'm';
|
|
5
5
|
type PillVariantType = 'outlined' | 'secondary';
|
|
6
6
|
type Props = {
|
|
7
7
|
/**
|
|
@@ -40,7 +40,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
40
40
|
* 크기를 정의합니다.
|
|
41
41
|
* 반응형 디자인이 적용됩니다.
|
|
42
42
|
*/
|
|
43
|
-
size?: ResponsiveValue<
|
|
43
|
+
size?: ResponsiveValue<PillSizeType> | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* 색을 정의합니다.
|
|
46
46
|
* hover, active, focused, disabled, loading 등의 모든 상황에 관여합니다.
|
package/dist/index.js
CHANGED
|
@@ -22542,9 +22542,6 @@ const Pill = ({
|
|
|
22542
22542
|
const BasePill = styled__default.default(UnstyledButton)`
|
|
22543
22543
|
display: inline-flex;
|
|
22544
22544
|
align-items: center;
|
|
22545
|
-
border-radius: ${({
|
|
22546
|
-
theme
|
|
22547
|
-
}) => forcePixelValue(theme.radii.xs)};
|
|
22548
22545
|
column-gap: ${({
|
|
22549
22546
|
theme
|
|
22550
22547
|
}) => forcePixelValue(theme.space[2])};
|
|
@@ -22593,10 +22590,28 @@ const BasePill = styled__default.default(UnstyledButton)`
|
|
|
22593
22590
|
}) => variant({
|
|
22594
22591
|
prop: 'size',
|
|
22595
22592
|
variants: {
|
|
22593
|
+
s: {
|
|
22594
|
+
'pl': 2,
|
|
22595
|
+
'pr': !hasRemoveButton ? 2 : 0.25,
|
|
22596
|
+
'height': forcePixelValue(20),
|
|
22597
|
+
'borderRadius': 'xxs',
|
|
22598
|
+
'fontSize': theme.fontSizes.xxs,
|
|
22599
|
+
'fontWeight': theme.fontWeights.medium,
|
|
22600
|
+
'lineHeight': theme.lineHeights[2],
|
|
22601
|
+
'columnGap': 0.25,
|
|
22602
|
+
'& svg': {
|
|
22603
|
+
minWidth: 12,
|
|
22604
|
+
height: 12
|
|
22605
|
+
},
|
|
22606
|
+
'& > div': {
|
|
22607
|
+
p: 1
|
|
22608
|
+
}
|
|
22609
|
+
},
|
|
22596
22610
|
m: {
|
|
22597
22611
|
'pl': 3,
|
|
22598
22612
|
'pr': !hasRemoveButton ? 3 : 1,
|
|
22599
22613
|
'height': forcePixelValue(32),
|
|
22614
|
+
'borderRadius': 'xs',
|
|
22600
22615
|
'fontSize': theme.fontSizes.xxs,
|
|
22601
22616
|
'fontWeight': theme.fontWeights.medium,
|
|
22602
22617
|
'lineHeight': theme.lineHeights[2],
|
|
@@ -22618,20 +22633,9 @@ const BasePill = styled__default.default(UnstyledButton)`
|
|
|
22618
22633
|
prop: 'variant',
|
|
22619
22634
|
variants: {
|
|
22620
22635
|
outlined: {
|
|
22621
|
-
|
|
22622
|
-
'
|
|
22623
|
-
|
|
22624
|
-
'borderColor': theme.colors['border/neutral'],
|
|
22625
|
-
'color': 'text/neutral/subtle',
|
|
22626
|
-
'& svg': {
|
|
22627
|
-
color: theme.colors['icon/neutral/bolder']
|
|
22628
|
-
},
|
|
22629
|
-
'&:hover': {
|
|
22630
|
-
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
22631
|
-
},
|
|
22632
|
-
'&:active': {
|
|
22633
|
-
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
22634
|
-
},
|
|
22636
|
+
borderWidth: 1,
|
|
22637
|
+
borderStyle: 'solid',
|
|
22638
|
+
borderColor: theme.colors['border/neutral'],
|
|
22635
22639
|
...(disabled ? {
|
|
22636
22640
|
'cursor': 'not-allowed',
|
|
22637
22641
|
'backgroundColor': theme.colors['bg/disabled'],
|
|
@@ -22639,20 +22643,21 @@ const BasePill = styled__default.default(UnstyledButton)`
|
|
|
22639
22643
|
'& svg': {
|
|
22640
22644
|
color: theme.colors['icon/disabled']
|
|
22641
22645
|
}
|
|
22642
|
-
} : {
|
|
22646
|
+
} : {
|
|
22647
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
22648
|
+
'color': 'text/neutral/subtle',
|
|
22649
|
+
'& svg': {
|
|
22650
|
+
color: theme.colors['icon/neutral/bolder']
|
|
22651
|
+
},
|
|
22652
|
+
'&:hover': {
|
|
22653
|
+
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
22654
|
+
},
|
|
22655
|
+
'&:active': {
|
|
22656
|
+
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
22657
|
+
}
|
|
22658
|
+
})
|
|
22643
22659
|
},
|
|
22644
22660
|
secondary: {
|
|
22645
|
-
'backgroundColor': theme.colors['bg/secondary'],
|
|
22646
|
-
'color': theme.colors['text/primary'],
|
|
22647
|
-
'& svg': {
|
|
22648
|
-
color: theme.colors['icon/primary']
|
|
22649
|
-
},
|
|
22650
|
-
'&:hover': {
|
|
22651
|
-
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
22652
|
-
},
|
|
22653
|
-
'&:active': {
|
|
22654
|
-
backgroundColor: theme.colors['bg/secondary/pressed']
|
|
22655
|
-
},
|
|
22656
22661
|
...(disabled ? {
|
|
22657
22662
|
'cursor': 'not-allowed',
|
|
22658
22663
|
'backgroundColor': theme.colors['bg/disabled'],
|
|
@@ -22660,7 +22665,19 @@ const BasePill = styled__default.default(UnstyledButton)`
|
|
|
22660
22665
|
'& svg': {
|
|
22661
22666
|
color: theme.colors['icon/disabled']
|
|
22662
22667
|
}
|
|
22663
|
-
} : {
|
|
22668
|
+
} : {
|
|
22669
|
+
'backgroundColor': theme.colors['bg/secondary'],
|
|
22670
|
+
'color': theme.colors['text/primary'],
|
|
22671
|
+
'& svg': {
|
|
22672
|
+
color: theme.colors['icon/primary']
|
|
22673
|
+
},
|
|
22674
|
+
'&:hover': {
|
|
22675
|
+
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
22676
|
+
},
|
|
22677
|
+
'&:active': {
|
|
22678
|
+
backgroundColor: theme.colors['bg/secondary/pressed']
|
|
22679
|
+
}
|
|
22680
|
+
})
|
|
22664
22681
|
}
|
|
22665
22682
|
}
|
|
22666
22683
|
})}
|
package/esm/core/Pill/index.js
CHANGED
|
@@ -71,9 +71,6 @@ const Pill = ({
|
|
|
71
71
|
const BasePill = styled(UnstyledButton)`
|
|
72
72
|
display: inline-flex;
|
|
73
73
|
align-items: center;
|
|
74
|
-
border-radius: ${({
|
|
75
|
-
theme
|
|
76
|
-
}) => forcePixelValue(theme.radii.xs)};
|
|
77
74
|
column-gap: ${({
|
|
78
75
|
theme
|
|
79
76
|
}) => forcePixelValue(theme.space[2])};
|
|
@@ -122,10 +119,28 @@ const BasePill = styled(UnstyledButton)`
|
|
|
122
119
|
}) => variant({
|
|
123
120
|
prop: 'size',
|
|
124
121
|
variants: {
|
|
122
|
+
s: {
|
|
123
|
+
'pl': 2,
|
|
124
|
+
'pr': !hasRemoveButton ? 2 : 0.25,
|
|
125
|
+
'height': forcePixelValue(20),
|
|
126
|
+
'borderRadius': 'xxs',
|
|
127
|
+
'fontSize': theme.fontSizes.xxs,
|
|
128
|
+
'fontWeight': theme.fontWeights.medium,
|
|
129
|
+
'lineHeight': theme.lineHeights[2],
|
|
130
|
+
'columnGap': 0.25,
|
|
131
|
+
'& svg': {
|
|
132
|
+
minWidth: 12,
|
|
133
|
+
height: 12
|
|
134
|
+
},
|
|
135
|
+
'& > div': {
|
|
136
|
+
p: 1
|
|
137
|
+
}
|
|
138
|
+
},
|
|
125
139
|
m: {
|
|
126
140
|
'pl': 3,
|
|
127
141
|
'pr': !hasRemoveButton ? 3 : 1,
|
|
128
142
|
'height': forcePixelValue(32),
|
|
143
|
+
'borderRadius': 'xs',
|
|
129
144
|
'fontSize': theme.fontSizes.xxs,
|
|
130
145
|
'fontWeight': theme.fontWeights.medium,
|
|
131
146
|
'lineHeight': theme.lineHeights[2],
|
|
@@ -147,20 +162,9 @@ const BasePill = styled(UnstyledButton)`
|
|
|
147
162
|
prop: 'variant',
|
|
148
163
|
variants: {
|
|
149
164
|
outlined: {
|
|
150
|
-
|
|
151
|
-
'
|
|
152
|
-
|
|
153
|
-
'borderColor': theme.colors['border/neutral'],
|
|
154
|
-
'color': 'text/neutral/subtle',
|
|
155
|
-
'& svg': {
|
|
156
|
-
color: theme.colors['icon/neutral/bolder']
|
|
157
|
-
},
|
|
158
|
-
'&:hover': {
|
|
159
|
-
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
160
|
-
},
|
|
161
|
-
'&:active': {
|
|
162
|
-
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
163
|
-
},
|
|
165
|
+
borderWidth: 1,
|
|
166
|
+
borderStyle: 'solid',
|
|
167
|
+
borderColor: theme.colors['border/neutral'],
|
|
164
168
|
...(disabled ? {
|
|
165
169
|
'cursor': 'not-allowed',
|
|
166
170
|
'backgroundColor': theme.colors['bg/disabled'],
|
|
@@ -168,20 +172,21 @@ const BasePill = styled(UnstyledButton)`
|
|
|
168
172
|
'& svg': {
|
|
169
173
|
color: theme.colors['icon/disabled']
|
|
170
174
|
}
|
|
171
|
-
} : {
|
|
175
|
+
} : {
|
|
176
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
177
|
+
'color': 'text/neutral/subtle',
|
|
178
|
+
'& svg': {
|
|
179
|
+
color: theme.colors['icon/neutral/bolder']
|
|
180
|
+
},
|
|
181
|
+
'&:hover': {
|
|
182
|
+
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
183
|
+
},
|
|
184
|
+
'&:active': {
|
|
185
|
+
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
186
|
+
}
|
|
187
|
+
})
|
|
172
188
|
},
|
|
173
189
|
secondary: {
|
|
174
|
-
'backgroundColor': theme.colors['bg/secondary'],
|
|
175
|
-
'color': theme.colors['text/primary'],
|
|
176
|
-
'& svg': {
|
|
177
|
-
color: theme.colors['icon/primary']
|
|
178
|
-
},
|
|
179
|
-
'&:hover': {
|
|
180
|
-
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
181
|
-
},
|
|
182
|
-
'&:active': {
|
|
183
|
-
backgroundColor: theme.colors['bg/secondary/pressed']
|
|
184
|
-
},
|
|
185
190
|
...(disabled ? {
|
|
186
191
|
'cursor': 'not-allowed',
|
|
187
192
|
'backgroundColor': theme.colors['bg/disabled'],
|
|
@@ -189,7 +194,19 @@ const BasePill = styled(UnstyledButton)`
|
|
|
189
194
|
'& svg': {
|
|
190
195
|
color: theme.colors['icon/disabled']
|
|
191
196
|
}
|
|
192
|
-
} : {
|
|
197
|
+
} : {
|
|
198
|
+
'backgroundColor': theme.colors['bg/secondary'],
|
|
199
|
+
'color': theme.colors['text/primary'],
|
|
200
|
+
'& svg': {
|
|
201
|
+
color: theme.colors['icon/primary']
|
|
202
|
+
},
|
|
203
|
+
'&:hover': {
|
|
204
|
+
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
205
|
+
},
|
|
206
|
+
'&:active': {
|
|
207
|
+
backgroundColor: theme.colors['bg/secondary/pressed']
|
|
208
|
+
}
|
|
209
|
+
})
|
|
193
210
|
}
|
|
194
211
|
}
|
|
195
212
|
})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.25",
|
|
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",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"react-is": "^18.2.0",
|
|
63
63
|
"styled-system": "^5.1.5"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "dcbb5dd19a560f537cad13a4798d9e036e7e6631"
|
|
66
66
|
}
|