@teamturing/react-kit 2.21.5 → 2.21.7
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/index.js +1305 -1179
- package/esm/core/Button/index.js +63 -63
- package/esm/core/Chip/index.js +53 -51
- package/esm/core/Dialog/index.js +8 -7
- package/esm/core/Grid/index.js +8 -6
- package/esm/core/IconButton/index.js +56 -57
- package/esm/core/IconToggleButton/index.js +17 -18
- package/esm/core/OverlayPopper/index.js +3 -3
- package/esm/core/Spinner/index.js +4 -4
- package/esm/core/Stack/index.js +8 -6
- package/esm/core/Tab/TabItem.js +12 -11
- package/esm/core/Tab/index.js +6 -7
- package/esm/core/Text/index.js +128 -27
- package/esm/core/TextInput/index.js +6 -7
- package/esm/packages/token-studio/esm/token/elevation/index.js +1 -5
- package/esm/packages/token-studio/esm/token/typography/index.js +3 -3
- package/package.json +2 -2
package/esm/core/Button/index.js
CHANGED
|
@@ -131,88 +131,88 @@ const BaseButton = styled(UnstyledButton)(({
|
|
|
131
131
|
prop: 'variant',
|
|
132
132
|
variants: {
|
|
133
133
|
primary: {
|
|
134
|
-
'backgroundColor': theme.
|
|
135
|
-
'color': theme.
|
|
134
|
+
'backgroundColor': theme.colors['bg/primary'],
|
|
135
|
+
'color': theme.colors['text/inverse'],
|
|
136
136
|
'& svg': {
|
|
137
|
-
color: theme.
|
|
137
|
+
color: theme.colors['icon/inverse']
|
|
138
138
|
},
|
|
139
139
|
'&:hover:not(:disabled)': {
|
|
140
|
-
backgroundColor: theme.
|
|
140
|
+
backgroundColor: theme.colors['bg/primary/hovered']
|
|
141
141
|
},
|
|
142
142
|
'&:active:not(:disabled)': {
|
|
143
|
-
backgroundColor: theme.
|
|
143
|
+
backgroundColor: theme.colors['bg/primary/pressed']
|
|
144
144
|
},
|
|
145
145
|
'&:focus-visible': {
|
|
146
|
-
outlineColor: theme.
|
|
146
|
+
outlineColor: theme.colors['border/focused'],
|
|
147
147
|
outlineStyle: 'solid',
|
|
148
148
|
outlineWidth: 2,
|
|
149
149
|
outlineOffset: 2
|
|
150
150
|
},
|
|
151
151
|
...($disabled ? {
|
|
152
|
-
'backgroundColor': theme.
|
|
153
|
-
'color': theme.
|
|
152
|
+
'backgroundColor': theme.colors['bg/disabled'],
|
|
153
|
+
'color': theme.colors['text/disabled'],
|
|
154
154
|
'& svg': {
|
|
155
|
-
color: theme.
|
|
155
|
+
color: theme.colors['icon/disabled']
|
|
156
156
|
}
|
|
157
157
|
} : {})
|
|
158
158
|
},
|
|
159
159
|
secondary: {
|
|
160
|
-
'backgroundColor': theme.
|
|
161
|
-
'color': theme.
|
|
160
|
+
'backgroundColor': theme.colors['bg/secondary'],
|
|
161
|
+
'color': theme.colors['text/primary'],
|
|
162
162
|
'& svg': {
|
|
163
|
-
color: theme.
|
|
163
|
+
color: theme.colors['icon/primary']
|
|
164
164
|
},
|
|
165
165
|
'&:hover:not(:disabled)': {
|
|
166
|
-
backgroundColor: theme.
|
|
166
|
+
backgroundColor: theme.colors['bg/secondary/hovered']
|
|
167
167
|
},
|
|
168
168
|
'&:active:not(:disabled)': {
|
|
169
|
-
backgroundColor: theme.
|
|
169
|
+
backgroundColor: theme.colors['bg/secondary/pressed']
|
|
170
170
|
},
|
|
171
171
|
'&:focus-visible': {
|
|
172
|
-
outlineColor: theme.
|
|
172
|
+
outlineColor: theme.colors['border/focused'],
|
|
173
173
|
outlineStyle: 'solid',
|
|
174
174
|
outlineWidth: 2,
|
|
175
175
|
outlineOffset: 2
|
|
176
176
|
},
|
|
177
177
|
...($disabled ? {
|
|
178
|
-
'backgroundColor': theme.
|
|
179
|
-
'color': theme.
|
|
178
|
+
'backgroundColor': theme.colors['bg/disabled'],
|
|
179
|
+
'color': theme.colors['text/disabled'],
|
|
180
180
|
'& svg': {
|
|
181
|
-
color: theme.
|
|
181
|
+
color: theme.colors['icon/disabled']
|
|
182
182
|
}
|
|
183
183
|
} : {})
|
|
184
184
|
},
|
|
185
185
|
neutral: {
|
|
186
|
-
'backgroundColor': theme.
|
|
187
|
-
'color': theme.
|
|
186
|
+
'backgroundColor': theme.colors['bg/neutral'],
|
|
187
|
+
'color': theme.colors['text/neutral'],
|
|
188
188
|
'& svg': {
|
|
189
|
-
color: theme.
|
|
189
|
+
color: theme.colors['icon/accent/gray']
|
|
190
190
|
},
|
|
191
191
|
'&:hover:not(:disabled)': {
|
|
192
|
-
backgroundColor: theme.
|
|
192
|
+
backgroundColor: theme.colors['bg/neutral/hovered']
|
|
193
193
|
},
|
|
194
194
|
'&:active:not(:disabled)': {
|
|
195
|
-
backgroundColor: theme.
|
|
195
|
+
backgroundColor: theme.colors['bg/neutral/pressed']
|
|
196
196
|
},
|
|
197
197
|
'&:focus-visible': {
|
|
198
|
-
outlineColor: theme.
|
|
198
|
+
outlineColor: theme.colors['border/focused'],
|
|
199
199
|
outlineStyle: 'solid',
|
|
200
200
|
outlineWidth: 2,
|
|
201
201
|
outlineOffset: 2
|
|
202
202
|
},
|
|
203
203
|
...($disabled ? {
|
|
204
|
-
'backgroundColor': theme.
|
|
205
|
-
'color': theme.
|
|
204
|
+
'backgroundColor': theme.colors['bg/disabled'],
|
|
205
|
+
'color': theme.colors['text/disabled'],
|
|
206
206
|
'& svg': {
|
|
207
|
-
color: theme.
|
|
207
|
+
color: theme.colors['icon/disabled']
|
|
208
208
|
}
|
|
209
209
|
} : {})
|
|
210
210
|
},
|
|
211
211
|
outlined: {
|
|
212
|
-
'backgroundColor': theme.
|
|
213
|
-
'color': theme.
|
|
212
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
213
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
214
214
|
'& svg': {
|
|
215
|
-
color: theme.
|
|
215
|
+
color: theme.colors['icon/neutral/bolder']
|
|
216
216
|
},
|
|
217
217
|
'&:after': {
|
|
218
218
|
content: '""',
|
|
@@ -223,27 +223,27 @@ const BaseButton = styled(UnstyledButton)(({
|
|
|
223
223
|
left: 0,
|
|
224
224
|
borderWidth: 1,
|
|
225
225
|
borderStyle: 'solid',
|
|
226
|
-
borderColor: theme.
|
|
226
|
+
borderColor: theme.colors['border/neutral/bolder'],
|
|
227
227
|
borderRadius: theme.radii.full,
|
|
228
228
|
boxSizing: 'border-box'
|
|
229
229
|
},
|
|
230
230
|
'&:hover:not(:disabled)': {
|
|
231
|
-
backgroundColor: theme.
|
|
231
|
+
backgroundColor: theme.colors['bg/neutral/subtler/hovered']
|
|
232
232
|
},
|
|
233
233
|
'&:active:not(:disabled)': {
|
|
234
|
-
backgroundColor: theme.
|
|
234
|
+
backgroundColor: theme.colors['bg/neutral/subtler/pressed']
|
|
235
235
|
},
|
|
236
236
|
'&:focus-visible': {
|
|
237
|
-
outlineColor: theme.
|
|
237
|
+
outlineColor: theme.colors['border/focused'],
|
|
238
238
|
outlineStyle: 'solid',
|
|
239
239
|
outlineWidth: 2,
|
|
240
240
|
outlineOffset: 2
|
|
241
241
|
},
|
|
242
242
|
...($disabled ? {
|
|
243
|
-
'backgroundColor': theme.
|
|
244
|
-
'color': theme.
|
|
243
|
+
'backgroundColor': theme.colors['bg/disabled'],
|
|
244
|
+
'color': theme.colors['text/disabled'],
|
|
245
245
|
'& svg': {
|
|
246
|
-
color: theme.
|
|
246
|
+
color: theme.colors['icon/disabled']
|
|
247
247
|
},
|
|
248
248
|
'&:after': {
|
|
249
249
|
display: 'none'
|
|
@@ -251,60 +251,60 @@ const BaseButton = styled(UnstyledButton)(({
|
|
|
251
251
|
} : {})
|
|
252
252
|
},
|
|
253
253
|
plain: {
|
|
254
|
-
'backgroundColor': theme.
|
|
255
|
-
'color': theme.
|
|
254
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
255
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
256
256
|
'& svg': {
|
|
257
|
-
color: theme.
|
|
257
|
+
color: theme.colors['icon/neutral/bolder']
|
|
258
258
|
},
|
|
259
259
|
'&:hover:not(:disabled)': {
|
|
260
|
-
'color': theme.
|
|
260
|
+
'color': theme.colors['text/neutral'],
|
|
261
261
|
'& svg': {
|
|
262
|
-
color: theme.
|
|
262
|
+
color: theme.colors['icon/accent/gray']
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
265
|
'&:active:not(:disabled)': {
|
|
266
|
-
'color': theme.
|
|
266
|
+
'color': theme.colors['text/neutral'],
|
|
267
267
|
'& svg': {
|
|
268
|
-
color: theme.
|
|
268
|
+
color: theme.colors['icon/accent/gray']
|
|
269
269
|
}
|
|
270
270
|
},
|
|
271
271
|
'&:focus-visible': {
|
|
272
|
-
outlineColor: theme.
|
|
272
|
+
outlineColor: theme.colors['border/focused'],
|
|
273
273
|
outlineStyle: 'solid',
|
|
274
274
|
outlineWidth: 2,
|
|
275
275
|
outlineOffset: 2
|
|
276
276
|
},
|
|
277
277
|
...($disabled ? {
|
|
278
|
-
'backgroundColor': theme.
|
|
279
|
-
'color': theme.
|
|
278
|
+
'backgroundColor': theme.colors['bg/disabled/subtlest'],
|
|
279
|
+
'color': theme.colors['text/disabled'],
|
|
280
280
|
'& svg': {
|
|
281
|
-
color: theme.
|
|
281
|
+
color: theme.colors['icon/disabled']
|
|
282
282
|
}
|
|
283
283
|
} : {})
|
|
284
284
|
},
|
|
285
285
|
danger: {
|
|
286
|
-
'backgroundColor': theme.
|
|
287
|
-
'color': theme.
|
|
286
|
+
'backgroundColor': theme.colors['bg/danger/bold'],
|
|
287
|
+
'color': theme.colors['text/inverse'],
|
|
288
288
|
'& svg': {
|
|
289
|
-
color: theme.
|
|
289
|
+
color: theme.colors['icon/inverse']
|
|
290
290
|
},
|
|
291
291
|
'&:hover:not(:disabled)': {
|
|
292
|
-
backgroundColor: theme.
|
|
292
|
+
backgroundColor: theme.colors['bg/danger/bold/hovered']
|
|
293
293
|
},
|
|
294
294
|
'&:active:not(:disabled)': {
|
|
295
|
-
backgroundColor: theme.
|
|
295
|
+
backgroundColor: theme.colors['bg/danger/bold/pressed']
|
|
296
296
|
},
|
|
297
297
|
'&:focus-visible': {
|
|
298
|
-
outlineColor: theme.
|
|
298
|
+
outlineColor: theme.colors['border/focused'],
|
|
299
299
|
outlineStyle: 'solid',
|
|
300
300
|
outlineWidth: 2,
|
|
301
301
|
outlineOffset: 2
|
|
302
302
|
},
|
|
303
303
|
...($disabled ? {
|
|
304
|
-
'backgroundColor': theme.
|
|
305
|
-
'color': theme.
|
|
304
|
+
'backgroundColor': theme.colors['bg/disabled'],
|
|
305
|
+
'color': theme.colors['text/disabled'],
|
|
306
306
|
'& svg': {
|
|
307
|
-
color: theme.
|
|
307
|
+
color: theme.colors['icon/disabled']
|
|
308
308
|
}
|
|
309
309
|
} : {})
|
|
310
310
|
}
|
|
@@ -332,22 +332,22 @@ const BaseSpinner = styled(Spinner)(variant({
|
|
|
332
332
|
prop: 'variant',
|
|
333
333
|
variants: {
|
|
334
334
|
primary: {
|
|
335
|
-
color: theme.
|
|
335
|
+
color: theme.colors['icon/inverse']
|
|
336
336
|
},
|
|
337
337
|
secondary: {
|
|
338
|
-
color: theme.
|
|
338
|
+
color: theme.colors['icon/primary']
|
|
339
339
|
},
|
|
340
340
|
neutral: {
|
|
341
|
-
color: theme.
|
|
341
|
+
color: theme.colors['icon/accent/gray']
|
|
342
342
|
},
|
|
343
343
|
outlined: {
|
|
344
|
-
color: theme.
|
|
344
|
+
color: theme.colors['icon/neutral/bolder']
|
|
345
345
|
},
|
|
346
346
|
plain: {
|
|
347
|
-
color: theme.
|
|
347
|
+
color: theme.colors['icon/neutral/bolder']
|
|
348
348
|
},
|
|
349
349
|
danger: {
|
|
350
|
-
color: theme.
|
|
350
|
+
color: theme.colors['icon/inverse']
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
}));
|
package/esm/core/Chip/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import color from '../../packages/token-studio/esm/token/color/index.js';
|
|
2
|
-
import radii from '../../packages/token-studio/esm/token/radii/index.js';
|
|
3
|
-
import typography from '../../packages/token-studio/esm/token/typography/index.js';
|
|
4
1
|
import styled from 'styled-components';
|
|
5
2
|
import '../../node_modules/styled-system/dist/index.esm.js';
|
|
6
3
|
import { sx } from '../../utils/styled-system/index.js';
|
|
@@ -22,17 +19,20 @@ const Chip = ({
|
|
|
22
19
|
trailingIcon: TrailingIcon,
|
|
23
20
|
children: [LeadingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(LeadingIcon, {}) : null, children, TrailingIcon ? /*#__PURE__*/jsxRuntimeExports.jsx(TrailingIcon, {}) : null]
|
|
24
21
|
});
|
|
25
|
-
const BaseChip = styled.span({
|
|
22
|
+
const BaseChip = styled.span(({
|
|
23
|
+
theme
|
|
24
|
+
}) => ({
|
|
26
25
|
position: 'relative',
|
|
27
26
|
width: 'fit-content',
|
|
28
|
-
borderRadius: radii.full,
|
|
27
|
+
borderRadius: theme.radii.full,
|
|
29
28
|
outline: 'none',
|
|
30
29
|
display: 'flex',
|
|
31
30
|
flexDirection: 'row',
|
|
32
31
|
alignItems: 'center'
|
|
33
|
-
}, ({
|
|
32
|
+
}), ({
|
|
34
33
|
leadingIcon,
|
|
35
|
-
trailingIcon
|
|
34
|
+
trailingIcon,
|
|
35
|
+
theme
|
|
36
36
|
}) => variant({
|
|
37
37
|
prop: 'size',
|
|
38
38
|
variants: {
|
|
@@ -40,9 +40,9 @@ const BaseChip = styled.span({
|
|
|
40
40
|
'pl': leadingIcon ? 2 : 3,
|
|
41
41
|
'pr': trailingIcon ? 2 : 3,
|
|
42
42
|
'py': 1,
|
|
43
|
-
'fontSize':
|
|
44
|
-
'fontWeight':
|
|
45
|
-
'lineHeight':
|
|
43
|
+
'fontSize': theme.fontSizes.s,
|
|
44
|
+
'fontWeight': theme.fontWeights.medium,
|
|
45
|
+
'lineHeight': theme.lineHeights[2],
|
|
46
46
|
'columnGap': 1,
|
|
47
47
|
'& svg': {
|
|
48
48
|
width: 16,
|
|
@@ -53,9 +53,9 @@ const BaseChip = styled.span({
|
|
|
53
53
|
'pl': leadingIcon ? 2 : 3,
|
|
54
54
|
'pr': trailingIcon ? 2 : 3,
|
|
55
55
|
'py': 1,
|
|
56
|
-
'fontSize':
|
|
57
|
-
'fontWeight':
|
|
58
|
-
'lineHeight':
|
|
56
|
+
'fontSize': theme.fontSizes.xs,
|
|
57
|
+
'fontWeight': theme.fontWeights.medium,
|
|
58
|
+
'lineHeight': theme.lineHeights[2],
|
|
59
59
|
'columnGap': 0.5,
|
|
60
60
|
'& svg': {
|
|
61
61
|
width: 16,
|
|
@@ -66,9 +66,9 @@ const BaseChip = styled.span({
|
|
|
66
66
|
'pl': !leadingIcon && trailingIcon ? 3 : 2,
|
|
67
67
|
'pr': leadingIcon && !trailingIcon ? 3 : 2,
|
|
68
68
|
'py': 0.5,
|
|
69
|
-
'fontSize':
|
|
70
|
-
'fontWeight':
|
|
71
|
-
'lineHeight':
|
|
69
|
+
'fontSize': theme.fontSizes.xxs,
|
|
70
|
+
'fontWeight': theme.fontWeights.medium,
|
|
71
|
+
'lineHeight': theme.lineHeights[2],
|
|
72
72
|
'columnGap': 0.5,
|
|
73
73
|
'& svg': {
|
|
74
74
|
width: 12,
|
|
@@ -76,28 +76,30 @@ const BaseChip = styled.span({
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
}),
|
|
79
|
+
}), ({
|
|
80
|
+
theme
|
|
81
|
+
}) => variant({
|
|
80
82
|
prop: 'variant',
|
|
81
83
|
variants: {
|
|
82
84
|
'primary': {
|
|
83
|
-
'backgroundColor':
|
|
84
|
-
'color':
|
|
85
|
+
'backgroundColor': theme.colors['bg/primary'],
|
|
86
|
+
'color': theme.colors['text/inverse'],
|
|
85
87
|
'& svg': {
|
|
86
|
-
color:
|
|
88
|
+
color: theme.colors['icon/inverse']
|
|
87
89
|
}
|
|
88
90
|
},
|
|
89
91
|
'secondary': {
|
|
90
|
-
'backgroundColor':
|
|
91
|
-
'color':
|
|
92
|
+
'backgroundColor': theme.colors['bg/secondary'],
|
|
93
|
+
'color': theme.colors['text/primary'],
|
|
92
94
|
'& svg': {
|
|
93
|
-
color:
|
|
95
|
+
color: theme.colors['icon/primary']
|
|
94
96
|
}
|
|
95
97
|
},
|
|
96
98
|
'outlined-primary': {
|
|
97
|
-
'backgroundColor':
|
|
98
|
-
'color':
|
|
99
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
100
|
+
'color': theme.colors['text/primary'],
|
|
99
101
|
'& svg': {
|
|
100
|
-
color:
|
|
102
|
+
color: theme.colors['icon/primary']
|
|
101
103
|
},
|
|
102
104
|
'&:after': {
|
|
103
105
|
content: '""',
|
|
@@ -108,16 +110,16 @@ const BaseChip = styled.span({
|
|
|
108
110
|
left: 0,
|
|
109
111
|
borderWidth: 1,
|
|
110
112
|
borderStyle: 'solid',
|
|
111
|
-
borderColor:
|
|
112
|
-
borderRadius: radii.full,
|
|
113
|
+
borderColor: theme.colors['border/primary'],
|
|
114
|
+
borderRadius: theme.radii.full,
|
|
113
115
|
boxSizing: 'border-box'
|
|
114
116
|
}
|
|
115
117
|
},
|
|
116
118
|
'outlined-neutral': {
|
|
117
|
-
'backgroundColor':
|
|
118
|
-
'color':
|
|
119
|
+
'backgroundColor': theme.colors['bg/neutral/subtler'],
|
|
120
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
119
121
|
'& svg': {
|
|
120
|
-
color:
|
|
122
|
+
color: theme.colors['icon/neutral/bolder']
|
|
121
123
|
},
|
|
122
124
|
'&:after': {
|
|
123
125
|
content: '""',
|
|
@@ -128,51 +130,51 @@ const BaseChip = styled.span({
|
|
|
128
130
|
left: 0,
|
|
129
131
|
borderWidth: 1,
|
|
130
132
|
borderStyle: 'solid',
|
|
131
|
-
borderColor:
|
|
132
|
-
borderRadius: radii.full,
|
|
133
|
+
borderColor: theme.colors['border/neutral/bolder'],
|
|
134
|
+
borderRadius: theme.radii.full,
|
|
133
135
|
boxSizing: 'border-box'
|
|
134
136
|
}
|
|
135
137
|
},
|
|
136
138
|
'neutral': {
|
|
137
|
-
'backgroundColor':
|
|
138
|
-
'color':
|
|
139
|
+
'backgroundColor': theme.colors['bg/neutral'],
|
|
140
|
+
'color': theme.colors['text/neutral/subtle'],
|
|
139
141
|
'& svg': {
|
|
140
|
-
color:
|
|
142
|
+
color: theme.colors['icon/neutral/bolder']
|
|
141
143
|
}
|
|
142
144
|
},
|
|
143
145
|
'red': {
|
|
144
|
-
'backgroundColor':
|
|
145
|
-
'color':
|
|
146
|
+
'backgroundColor': theme.colors['bg/accent/red/subtlest'],
|
|
147
|
+
'color': theme.colors['text/accent/red'],
|
|
146
148
|
'& svg': {
|
|
147
|
-
color:
|
|
149
|
+
color: theme.colors['icon/accent/red']
|
|
148
150
|
}
|
|
149
151
|
},
|
|
150
152
|
'red-accent': {
|
|
151
|
-
'backgroundColor':
|
|
152
|
-
'color':
|
|
153
|
+
'backgroundColor': theme.colors['bg/accent/red'],
|
|
154
|
+
'color': theme.colors['text/inverse'],
|
|
153
155
|
'& svg': {
|
|
154
|
-
color:
|
|
156
|
+
color: theme.colors['icon/inverse']
|
|
155
157
|
}
|
|
156
158
|
},
|
|
157
159
|
'yellow': {
|
|
158
|
-
'backgroundColor':
|
|
159
|
-
'color':
|
|
160
|
+
'backgroundColor': theme.colors['bg/accent/yellow/subtlest'],
|
|
161
|
+
'color': theme.colors['text/accent/yellow'],
|
|
160
162
|
'& svg': {
|
|
161
|
-
color:
|
|
163
|
+
color: theme.colors['icon/accent/yellow']
|
|
162
164
|
}
|
|
163
165
|
},
|
|
164
166
|
'green': {
|
|
165
|
-
'backgroundColor':
|
|
166
|
-
'color':
|
|
167
|
+
'backgroundColor': theme.colors['bg/accent/green/subtlest'],
|
|
168
|
+
'color': theme.colors['text/accent/green'],
|
|
167
169
|
'& svg': {
|
|
168
|
-
color:
|
|
170
|
+
color: theme.colors['icon/accent/green']
|
|
169
171
|
}
|
|
170
172
|
},
|
|
171
173
|
'dim': {
|
|
172
|
-
'backgroundColor':
|
|
173
|
-
'color':
|
|
174
|
+
'backgroundColor': theme.colors['dim'],
|
|
175
|
+
'color': theme.colors['text/inverse'],
|
|
174
176
|
'& svg': {
|
|
175
|
-
color:
|
|
177
|
+
color: theme.colors['icon/inverse']
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
180
|
}
|
package/esm/core/Dialog/index.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { forwardRef, useCallback, useRef, useImperativeHandle, useEffect } from 'react';
|
|
2
2
|
import SvgClose from '../../packages/icons/esm/Close.js';
|
|
3
|
-
import color from '../../packages/token-studio/esm/token/color/index.js';
|
|
4
|
-
import elevation from '../../packages/token-studio/esm/token/elevation/index.js';
|
|
5
|
-
import '../../packages/token-studio/esm/token/typography/index.js';
|
|
6
3
|
import styled from 'styled-components';
|
|
7
4
|
import IconButton from '../IconButton/index.js';
|
|
8
5
|
import View from '../View/index.js';
|
|
@@ -135,15 +132,19 @@ const Blanket = styled.span`
|
|
|
135
132
|
display: block;
|
|
136
133
|
cursor: default;
|
|
137
134
|
content: '';
|
|
138
|
-
background: ${
|
|
135
|
+
background: ${({
|
|
136
|
+
theme
|
|
137
|
+
}) => theme.colors.dim};
|
|
139
138
|
}
|
|
140
139
|
`;
|
|
141
|
-
const BaseDialog = styled.div((
|
|
140
|
+
const BaseDialog = styled.div(({
|
|
141
|
+
theme
|
|
142
|
+
}) => ({
|
|
142
143
|
display: 'flex',
|
|
143
144
|
flexDirection: 'column',
|
|
144
145
|
position: 'relative',
|
|
145
|
-
boxShadow:
|
|
146
|
-
backgroundColor:
|
|
146
|
+
boxShadow: theme.shadows['shadow/overlay'],
|
|
147
|
+
backgroundColor: theme.colors['surface/overlay'],
|
|
147
148
|
outline: 'none',
|
|
148
149
|
overflow: 'hidden',
|
|
149
150
|
margin: 'auto'
|
package/esm/core/Grid/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import space from '../../packages/token-studio/esm/token/space/index.js';
|
|
2
|
-
import '../../packages/token-studio/esm/token/typography/index.js';
|
|
3
1
|
import { forcePixelValue } from '../../packages/utils/esm/forcePixelValue.js';
|
|
4
2
|
import { isArray } from '../../packages/utils/esm/isArray.js';
|
|
5
3
|
import { isNullable } from '../../packages/utils/esm/isNullable.js';
|
|
@@ -32,9 +30,11 @@ const Grid = /*#__PURE__*/forwardRef(({
|
|
|
32
30
|
const BaseGrid = styled(View)({
|
|
33
31
|
display: 'flex',
|
|
34
32
|
flexDirection: 'row'
|
|
35
|
-
},
|
|
33
|
+
}, ({
|
|
34
|
+
theme
|
|
35
|
+
}) => variant({
|
|
36
36
|
prop: 'gapX',
|
|
37
|
-
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
37
|
+
variants: Object.fromEntries(Object.entries(theme.space).map(([key, value]) => {
|
|
38
38
|
const styleValue = {
|
|
39
39
|
'& > *': {
|
|
40
40
|
px: forcePixelValue(value / 2)
|
|
@@ -43,9 +43,11 @@ const BaseGrid = styled(View)({
|
|
|
43
43
|
};
|
|
44
44
|
return [key, styleValue];
|
|
45
45
|
}))
|
|
46
|
-
}),
|
|
46
|
+
}), ({
|
|
47
|
+
theme
|
|
48
|
+
}) => variant({
|
|
47
49
|
prop: 'gapY',
|
|
48
|
-
variants: Object.fromEntries(Object.entries(space).map(([key, value]) => {
|
|
50
|
+
variants: Object.fromEntries(Object.entries(theme.space).map(([key, value]) => {
|
|
49
51
|
const styleValue = {
|
|
50
52
|
'& > *': {
|
|
51
53
|
mt: forcePixelValue(value)
|