@semcore/button 16.0.0-prerelease.9 → 16.0.1-prerelease.2
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/CHANGELOG.md +26 -2
- package/lib/cjs/component/AbstractButton/AbstractButton.js +3 -1
- package/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -1
- package/lib/cjs/component/AbstractButton/AbstractButton.type.js.map +1 -1
- package/lib/cjs/component/Button/Button.js +30 -28
- package/lib/cjs/component/Button/Button.js.map +1 -1
- package/lib/cjs/component/ButtonLink/ButtonLink.js +22 -20
- package/lib/cjs/component/ButtonLink/ButtonLink.js.map +1 -1
- package/lib/es6/component/AbstractButton/AbstractButton.js +3 -1
- package/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -1
- package/lib/es6/component/AbstractButton/AbstractButton.type.js.map +1 -1
- package/lib/es6/component/Button/Button.js +30 -28
- package/lib/es6/component/Button/Button.js.map +1 -1
- package/lib/es6/component/ButtonLink/ButtonLink.js +22 -20
- package/lib/es6/component/ButtonLink/ButtonLink.js.map +1 -1
- package/lib/esm/component/AbstractButton/AbstractButton.mjs +3 -1
- package/lib/esm/component/Button/Button.mjs +32 -29
- package/lib/esm/component/Button/button.shadow.css +398 -0
- package/lib/esm/component/ButtonLink/ButtonLink.mjs +24 -21
- package/lib/esm/component/ButtonLink/buttonLink.shadow.css +159 -0
- package/lib/types/component/AbstractButton/AbstractButton.type.d.ts +1 -2
- package/package.json +6 -6
- package/src/component/AbstractButton/AbstractButton.tsx +1 -1
- package/src/component/AbstractButton/AbstractButton.type.ts +1 -3
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
SButton {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
font-family: inherit;
|
|
10
|
+
line-height: normal;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
text-align: center;
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
border: 1px solid transparent;
|
|
15
|
+
box-shadow: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
overflow: visible;
|
|
19
|
+
user-select: none;
|
|
20
|
+
touch-action: manipulation;
|
|
21
|
+
-webkit-tap-highlight-color: transparent;
|
|
22
|
+
font-weight: var(--intergalactic-medium, 500);
|
|
23
|
+
color: var(--intergalactic-text-secondary, #6c6e79);
|
|
24
|
+
min-width: fit-content;
|
|
25
|
+
|
|
26
|
+
&::-moz-focus-inner {
|
|
27
|
+
padding: 0;
|
|
28
|
+
border: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:active,
|
|
32
|
+
&:hover {
|
|
33
|
+
text-decoration: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
SButton[disabled] {
|
|
38
|
+
opacity: var(--intergalactic-disabled-opacity, 0.3);
|
|
39
|
+
cursor: default;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
box-shadow: none;
|
|
42
|
+
z-index: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
SButton[size='s'] {
|
|
46
|
+
width: var(--intergalactic-form-control-s, 20px);
|
|
47
|
+
height: var(--intergalactic-form-control-s, 20px);
|
|
48
|
+
border-radius: var(--intergalactic-addon-rounded, 4px);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
SButton[size='m'] {
|
|
52
|
+
height: var(--intergalactic-form-control-m, 28px);
|
|
53
|
+
border-radius: var(--intergalactic-control-rounded, 6px);
|
|
54
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
SButton[size='l'] {
|
|
58
|
+
height: var(--intergalactic-form-control-l, 40px);
|
|
59
|
+
border-radius: var(--intergalactic-control-rounded, 6px);
|
|
60
|
+
font-size: var(--intergalactic-fs-300, 16px);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
SButton[theme='primary-info'] {
|
|
64
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
65
|
+
background-color: var(--intergalactic-control-primary-info, #008ff8);
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
69
|
+
background-color: var(--intergalactic-control-primary-info-hover, #006dca);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:active,
|
|
73
|
+
&[active] {
|
|
74
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
75
|
+
background-color: var(--intergalactic-control-primary-info-active, #044792);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
SButton[theme='primary-success'] {
|
|
80
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
81
|
+
background-color: var(--intergalactic-control-primary-success, #009f81);
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
85
|
+
background-color: var(--intergalactic-control-primary-success-hover, #007c65);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:active,
|
|
89
|
+
&[active] {
|
|
90
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
91
|
+
background-color: var(--intergalactic-control-primary-success-active, #055345);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
SButton[theme='primary-brand'] {
|
|
96
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
97
|
+
background-color: var(--intergalactic-control-primary-brand, #ff642d);
|
|
98
|
+
|
|
99
|
+
&:hover {
|
|
100
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
101
|
+
background-color: var(--intergalactic-control-primary-brand-hover, #c33909);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:active,
|
|
105
|
+
&[active] {
|
|
106
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
107
|
+
background-color: var(--intergalactic-control-primary-brand-active, #8b1500);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
SButton[theme='primary-warning'] {
|
|
112
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
113
|
+
background-color: var(--intergalactic-control-primary-brand, #ff642d);
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
117
|
+
background-color: var(--intergalactic-control-primary-brand-hover, #c33909);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:active,
|
|
121
|
+
&[active] {
|
|
122
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
123
|
+
background-color: var(--intergalactic-control-primary-brand-active, #8b1500);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
SButton[theme='primary-danger'] {
|
|
128
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
129
|
+
background-color: var(--intergalactic-control-primary-critical, #ff4953);
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
133
|
+
background-color: var(--intergalactic-control-primary-critical-hover, #d1002f);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:active,
|
|
137
|
+
&[active] {
|
|
138
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
139
|
+
background-color: var(--intergalactic-control-primary-critical-active, #8e0016);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
SButton[theme='primary-invert'] {
|
|
144
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
145
|
+
background-color: var(--intergalactic-control-primary-invert, #ffffff);
|
|
146
|
+
|
|
147
|
+
&:hover {
|
|
148
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
149
|
+
background-color: var(--intergalactic-control-primary-invert-hover, #f4f5f9);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:active,
|
|
153
|
+
&[active] {
|
|
154
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
155
|
+
background-color: var(--intergalactic-control-primary-invert-active, #e0e1e9);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
SButton[theme='secondary-muted'] {
|
|
160
|
+
color: var(--intergalactic-text-secondary, #6c6e79);
|
|
161
|
+
border-color: var(--intergalactic-border-primary, #c4c7cf);
|
|
162
|
+
background-color: var(--intergalactic-control-secondary-neutral, rgba(138, 142, 155, 0.1));
|
|
163
|
+
|
|
164
|
+
&:hover {
|
|
165
|
+
background-color: var(--intergalactic-control-secondary-neutral-hover,
|
|
166
|
+
rgba(138, 142, 155, 0.2));
|
|
167
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:active,
|
|
171
|
+
&[active] {
|
|
172
|
+
background-color: var(--intergalactic-control-secondary-neutral-active,
|
|
173
|
+
rgba(138, 142, 155, 0.3));
|
|
174
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
SButton[theme='secondary-info'] {
|
|
179
|
+
background-color: var(--intergalactic-control-secondary-info, rgba(0, 143, 248, 0.1));
|
|
180
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
181
|
+
border-color: var(--intergalactic-control-primary-info, #008ff8);
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
185
|
+
background-color: var(--intergalactic-control-secondary-info-hover, rgba(0, 143, 248, 0.2));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&:active,
|
|
189
|
+
&[active] {
|
|
190
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
191
|
+
background-color: var(--intergalactic-control-secondary-info-active, rgba(0, 143, 248, 0.3));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
SButton[theme='secondary-invert'] {
|
|
196
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
197
|
+
border-color: var(--intergalactic-border-primary-invert, #ffffff);
|
|
198
|
+
background-color: var(--intergalactic-control-secondary-invert, rgba(255, 255, 255, 0.05));
|
|
199
|
+
|
|
200
|
+
&:hover {
|
|
201
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
202
|
+
background-color: var(--intergalactic-control-secondary-invert-hover, rgba(255, 255, 255, 0.1));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
&:active,
|
|
206
|
+
&[active] {
|
|
207
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
208
|
+
background-color: var(--intergalactic-control-secondary-invert-active,
|
|
209
|
+
rgba(255, 255, 255, 0.3));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
SButton[theme='tertiary-info'] {
|
|
214
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
215
|
+
background-color: var(--intergalactic-control-tertiary-info, rgba(0, 143, 248, 0));
|
|
216
|
+
|
|
217
|
+
&:hover {
|
|
218
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
219
|
+
background-color: var(--intergalactic-control-tertiary-info-hover, rgba(0, 143, 248, 0.2));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&:active,
|
|
223
|
+
&[active] {
|
|
224
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
225
|
+
background-color: var(--intergalactic-control-tertiary-info-active, rgba(0, 143, 248, 0.3));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
SButton[theme='tertiary-muted'] {
|
|
230
|
+
color: var(--intergalactic-text-secondary, #6c6e79);
|
|
231
|
+
background-color: var(--intergalactic-control-tertiary-neutral, rgba(138, 142, 155, 0));
|
|
232
|
+
|
|
233
|
+
&:hover {
|
|
234
|
+
background-color: var(--intergalactic-control-tertiary-neutral-hover, rgba(138, 142, 155, 0.2));
|
|
235
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
&:active,
|
|
239
|
+
&[active] {
|
|
240
|
+
background-color: var(--intergalactic-control-tertiary-neutral-active,
|
|
241
|
+
rgba(138, 142, 155, 0.3));
|
|
242
|
+
color: var(--intergalactic-text-primary, #191b23);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
SButton[theme='tertiary-invert'] {
|
|
247
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
248
|
+
background-color: var(--intergalactic-control-tertiary-invert, rgba(255, 255, 255, 0));
|
|
249
|
+
|
|
250
|
+
&:hover {
|
|
251
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
252
|
+
background-color: var(--intergalactic-control-tertiary-invert-hover, rgba(255, 255, 255, 0.1));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&:active,
|
|
256
|
+
&[active] {
|
|
257
|
+
color: var(--intergalactic-text-primary-invert, #ffffff);
|
|
258
|
+
background-color: var(--intergalactic-control-tertiary-invert-active, rgba(255, 255, 255, 0.3));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
SButton[neighborLocation='right'] {
|
|
263
|
+
border-top-right-radius: 0;
|
|
264
|
+
border-bottom-right-radius: 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
SButton[neighborLocation='both'] {
|
|
268
|
+
border-radius: 0;
|
|
269
|
+
/* disable-tokens-validator */
|
|
270
|
+
margin-left: -1px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
SButton[neighborLocation='left'] {
|
|
274
|
+
border-top-left-radius: 0;
|
|
275
|
+
border-bottom-left-radius: 0;
|
|
276
|
+
/* disable-tokens-validator */
|
|
277
|
+
margin-left: -1px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
SButton[neighborLocation='both'],
|
|
281
|
+
SButton[neighborLocation='left'] {
|
|
282
|
+
position: relative;
|
|
283
|
+
|
|
284
|
+
&:after {
|
|
285
|
+
background-color: var(--intergalactic-border-primary-invert, #ffffff);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&[theme='secondary-muted'] {
|
|
289
|
+
&:after {
|
|
290
|
+
background-color: var(--intergalactic-border-primary, #c4c7cf);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
SButton+SButton[neighborLocation='both']:after,
|
|
296
|
+
SButton+SButton[neighborLocation='left']:after {
|
|
297
|
+
content: '';
|
|
298
|
+
position: absolute;
|
|
299
|
+
top: -1px;
|
|
300
|
+
left: -1px;
|
|
301
|
+
width: 1px;
|
|
302
|
+
height: calc(100% + 2px);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
SSpin {
|
|
306
|
+
position: absolute;
|
|
307
|
+
top: 0;
|
|
308
|
+
left: 0;
|
|
309
|
+
width: 100%;
|
|
310
|
+
height: 100%;
|
|
311
|
+
display: flex;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
SInner {
|
|
315
|
+
display: inline-flex;
|
|
316
|
+
align-items: center;
|
|
317
|
+
justify-content: center;
|
|
318
|
+
height: 100%;
|
|
319
|
+
width: 100%;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
SInner[loading] {
|
|
323
|
+
visibility: hidden;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
SText {
|
|
327
|
+
display: inline-flex;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
SText[size='m'] {
|
|
331
|
+
margin-left: var(--intergalactic-spacing-2x, 8px);
|
|
332
|
+
margin-right: var(--intergalactic-spacing-2x, 8px);
|
|
333
|
+
line-height: var(--intergalactic-lh-200, 142%);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
SText[size='l'] {
|
|
337
|
+
margin-left: var(--intergalactic-spacing-2x, 8px);
|
|
338
|
+
margin-right: var(--intergalactic-spacing-2x, 8px);
|
|
339
|
+
line-height: var(--intergalactic-lh-300, 150%);
|
|
340
|
+
|
|
341
|
+
&:only-child {
|
|
342
|
+
margin-left: var(--intergalactic-spacing-3x, 12px);
|
|
343
|
+
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
&:first-child {
|
|
347
|
+
margin-left: var(--intergalactic-spacing-3x, 12px);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&:last-child {
|
|
351
|
+
margin-right: var(--intergalactic-spacing-3x, 12px);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
SAddon {
|
|
356
|
+
display: inline-flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
justify-content: center;
|
|
359
|
+
pointer-events: none;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
SAddon[size='m'] {
|
|
363
|
+
&:not(:only-child):first-child {
|
|
364
|
+
margin-left: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
|
|
365
|
+
/* -1px - for border width */
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
&:not(:only-child):last-child {
|
|
369
|
+
margin-right: calc(var(--intergalactic-spacing-2x, 8px) - 1px);
|
|
370
|
+
/* -1px - for border width */
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
&:only-child {
|
|
374
|
+
margin-left: calc(1.5 * var(--intergalactic-spacing-1x, 4px) - 1px);
|
|
375
|
+
/* -1px - for border width */
|
|
376
|
+
margin-right: calc(1.5 * var(--intergalactic-spacing-1x, 4px) - 1px);
|
|
377
|
+
/* -1px - for border width */
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
SAddon[size='l'] {
|
|
382
|
+
&:not(:only-child):first-child {
|
|
383
|
+
margin-left: calc(var(--intergalactic-spacing-3x, 12px) - 1px);
|
|
384
|
+
/* -1px - for border width */
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
&:not(:only-child):last-child {
|
|
388
|
+
margin-right: calc(var(--intergalactic-spacing-3x, 12px) - 1px);
|
|
389
|
+
/* -1px - for border width */
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&:only-child {
|
|
393
|
+
margin-left: calc(3 * var(--intergalactic-spacing-1x, 4px) - 1px);
|
|
394
|
+
/* -1px - for border width */
|
|
395
|
+
margin-right: calc(3 * var(--intergalactic-spacing-1x, 4px) - 1px);
|
|
396
|
+
/* -1px - for border width */
|
|
397
|
+
}
|
|
398
|
+
}
|
|
@@ -9,31 +9,34 @@ import React from "react";
|
|
|
9
9
|
import { Box } from "@semcore/flex-box";
|
|
10
10
|
import { AbstractButton } from "../AbstractButton/AbstractButton.mjs";
|
|
11
11
|
import resolveColorEnhance from "@semcore/core/lib/utils/enhances/resolveColorEnhance";
|
|
12
|
+
/*!__reshadow-styles__:"./buttonLink.shadow.css"*/
|
|
12
13
|
var style = (
|
|
13
14
|
/*__reshadow_css_start__*/
|
|
14
15
|
(sstyled.insert(
|
|
15
16
|
/*__inner_css_start__*/
|
|
16
|
-
".
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
17
|
+
".___SButton_wqc87_gg_{display:inline-flex;font-family:inherit;font-size:var(--intergalactic-fs-200, 14px);color:var(--intergalactic-text-link, #006dca);line-height:normal;position:relative;cursor:pointer;border:0;padding:0;margin:0;box-shadow:none;-webkit-tap-highlight-color:transparent;background:0 0;transition:color .15s ease-in-out}.___SButton_wqc87_gg_,.___SButton_wqc87_gg_:active{-webkit-text-decoration:none;text-decoration:none}@media (hover:hover){.___SButton_wqc87_gg_:hover{-webkit-text-decoration:none;text-decoration:none}}.___SButton_wqc87_gg_::-moz-focus-inner{border:0;padding:0}.___SButton_wqc87_gg_.__active_wqc87_gg_,.___SButton_wqc87_gg_:active{color:var(--intergalactic-text-link-hover-active, #044792)}@media (hover:hover){.___SButton_wqc87_gg_:hover{color:var(--intergalactic-text-link-hover-active, #044792)}}.___SButton_wqc87_gg_.__active_wqc87_gg_ .___SText_wqc87_gg_,.___SButton_wqc87_gg_:active .___SText_wqc87_gg_{border-color:currentColor}@media (hover:hover){.___SButton_wqc87_gg_:hover .___SText_wqc87_gg_{border-color:currentColor}}.___SButton_wqc87_gg_.__enableVisited_wqc87_gg_:visited{color:var(--intergalactic-text-link-visited, #8649e1)}@media (hover:hover){.___SButton_wqc87_gg_.__enableVisited_wqc87_gg_:visited:hover{color:var(--intergalactic-text-link-visited, #8649e1)}}.___SButton_wqc87_gg_ .___SText_wqc87_gg_{border-bottom-width:1px;border-bottom-style:solid;border-color:transparent;transition:border-bottom-color .15s ease-in-out}.___SButton_wqc87_gg_.__disabled_wqc87_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SButton_wqc87_gg_._use_secondary_wqc87_gg_{color:var(--intergalactic-text-hint, #6c6e79)}.___SButton_wqc87_gg_._use_secondary_wqc87_gg_.__active_wqc87_gg_,.___SButton_wqc87_gg_._use_secondary_wqc87_gg_:active{color:var(--intergalactic-text-hint-hover-active, #484a54)}@media (hover:hover){.___SButton_wqc87_gg_._use_secondary_wqc87_gg_:hover{color:var(--intergalactic-text-hint-hover-active, #484a54)}}.___SButton_wqc87_gg_._use_secondary_wqc87_gg_ .___SText_wqc87_gg_{border-bottom-width:1px;border-bottom-style:dashed;border-color:currentColor}.___SAddon_wqc87_gg_,.___SInner_wqc87_gg_{display:inline-flex;justify-content:center;align-items:center}.___SInner_wqc87_gg_{height:100%;width:100%}.___SAddon_wqc87_gg_{vertical-align:middle;pointer-events:none}.___SButton_wqc87_gg_ .___SAddon_wqc87_gg_:not(:only-child):first-child{margin-right:var(--intergalactic-spacing-1x, 4px)}.___SButton_wqc87_gg_ .___SAddon_wqc87_gg_:not(:only-child):last-child{margin-left:var(--intergalactic-spacing-1x, 4px)}.___SButton_wqc87_gg_.__text-color_wqc87_gg_{color:var(--text-color_wqc87)}.___SButton_wqc87_gg_.__text-color_wqc87_gg_.__active_wqc87_gg_,.___SButton_wqc87_gg_.__text-color_wqc87_gg_:active{color:var(--text-color_wqc87);filter:brightness(.8)}@media (hover:hover){.___SButton_wqc87_gg_.__text-color_wqc87_gg_:hover{color:var(--text-color_wqc87);filter:brightness(.8)}}.___SButton_wqc87_gg_._size_100_wqc87_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%)}.___SButton_wqc87_gg_._size_200_wqc87_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SButton_wqc87_gg_._size_300_wqc87_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SButton_wqc87_gg_._size_400_wqc87_gg_{font-size:var(--intergalactic-fs-400, 20px);line-height:var(--intergalactic-lh-400, 120%)}.___SButton_wqc87_gg_._size_500_wqc87_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%)}.___SButton_wqc87_gg_._size_600_wqc87_gg_{font-size:var(--intergalactic-fs-600, 32px);line-height:var(--intergalactic-lh-600, 125%)}.___SButton_wqc87_gg_._size_700_wqc87_gg_{font-size:var(--intergalactic-fs-700, 36px);line-height:var(--intergalactic-lh-700, 110%)}.___SButton_wqc87_gg_._size_800_wqc87_gg_{font-size:var(--intergalactic-fs-800, 48px);line-height:var(--intergalactic-lh-800, 117%)}@media (prefers-reduced-motion){.___SButton_wqc87_gg_,.___SText_wqc87_gg_{transition:none}}",
|
|
18
|
+
/*__inner_css_end__*/
|
|
19
|
+
"wqc87_gg_"
|
|
20
|
+
), /*__reshadow_css_end__*/
|
|
21
|
+
{
|
|
22
|
+
"__SButton": "___SButton_wqc87_gg_",
|
|
23
|
+
"_disabled": "__disabled_wqc87_gg_",
|
|
24
|
+
"__SInner": "___SInner_wqc87_gg_",
|
|
25
|
+
"__SAddon": "___SAddon_wqc87_gg_",
|
|
26
|
+
"_size_100": "_size_100_wqc87_gg_",
|
|
27
|
+
"_size_200": "_size_200_wqc87_gg_",
|
|
28
|
+
"_size_300": "_size_300_wqc87_gg_",
|
|
29
|
+
"_size_400": "_size_400_wqc87_gg_",
|
|
30
|
+
"_size_500": "_size_500_wqc87_gg_",
|
|
31
|
+
"_size_600": "_size_600_wqc87_gg_",
|
|
32
|
+
"_size_700": "_size_700_wqc87_gg_",
|
|
33
|
+
"_size_800": "_size_800_wqc87_gg_",
|
|
34
|
+
"__SText": "___SText_wqc87_gg_",
|
|
35
|
+
"_active": "__active_wqc87_gg_",
|
|
36
|
+
"_enableVisited": "__enableVisited_wqc87_gg_",
|
|
37
|
+
"_use_secondary": "_use_secondary_wqc87_gg_",
|
|
38
|
+
"_text-color": "__text-color_wqc87_gg_",
|
|
39
|
+
"--text-color": "--text-color_wqc87"
|
|
37
40
|
})
|
|
38
41
|
);
|
|
39
42
|
var enhance = {
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
SButton {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
font-family: inherit;
|
|
4
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
5
|
+
color: var(--intergalactic-text-link, #006dca);
|
|
6
|
+
line-height: normal;
|
|
7
|
+
position: relative;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
text-decoration: none;
|
|
10
|
+
border: none;
|
|
11
|
+
padding: 0;
|
|
12
|
+
margin: 0;
|
|
13
|
+
box-shadow: none;
|
|
14
|
+
-webkit-tap-highlight-color: transparent;
|
|
15
|
+
background: none;
|
|
16
|
+
transition: color 0.15s ease-in-out;
|
|
17
|
+
|
|
18
|
+
&:active,
|
|
19
|
+
&:hover {
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::-moz-focus-inner {
|
|
24
|
+
border: none;
|
|
25
|
+
padding: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&[active],
|
|
29
|
+
&:hover,
|
|
30
|
+
&:active {
|
|
31
|
+
color: var(--intergalactic-text-link-hover-active, #044792);
|
|
32
|
+
|
|
33
|
+
& SText {
|
|
34
|
+
border-color: currentColor;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&[enableVisited]:visited,
|
|
39
|
+
&[enableVisited]:visited:hover {
|
|
40
|
+
color: var(--intergalactic-text-link-visited, #8649e1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
SText {
|
|
44
|
+
border-bottom-width: 1px;
|
|
45
|
+
border-bottom-style: solid;
|
|
46
|
+
border-color: transparent;
|
|
47
|
+
transition: border-bottom-color 0.15s ease-in-out;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
SButton[disabled] {
|
|
52
|
+
opacity: var(--intergalactic-disabled-opacity, 0.3);
|
|
53
|
+
cursor: default;
|
|
54
|
+
/* Disable link interactions */
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
SButton[use='secondary'] {
|
|
59
|
+
color: var(--intergalactic-text-hint, #6c6e79);
|
|
60
|
+
|
|
61
|
+
&[active],
|
|
62
|
+
&:active,
|
|
63
|
+
&:hover {
|
|
64
|
+
color: var(--intergalactic-text-hint-hover-active, #484a54);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
SText {
|
|
68
|
+
border-bottom-width: 1px;
|
|
69
|
+
border-bottom-style: dashed;
|
|
70
|
+
border-color: currentColor;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
SInner {
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
height: 100%;
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
SAddon {
|
|
83
|
+
display: inline-flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
vertical-align: middle;
|
|
87
|
+
pointer-events: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
SButton SAddon {
|
|
91
|
+
&:not(:only-child):first-child {
|
|
92
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:not(:only-child):last-child {
|
|
96
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
SButton[text-color] {
|
|
101
|
+
color: var(--text-color);
|
|
102
|
+
|
|
103
|
+
&[active],
|
|
104
|
+
&:hover,
|
|
105
|
+
&:active {
|
|
106
|
+
color: var(--text-color);
|
|
107
|
+
filter: brightness(0.8);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
SButton[size='100'] {
|
|
112
|
+
font-size: var(--intergalactic-fs-100, 12px);
|
|
113
|
+
line-height: var(--intergalactic-lh-100, 133%);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
SButton[size='200'] {
|
|
117
|
+
font-size: var(--intergalactic-fs-200, 14px);
|
|
118
|
+
line-height: var(--intergalactic-lh-200, 142%);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
SButton[size='300'] {
|
|
122
|
+
font-size: var(--intergalactic-fs-300, 16px);
|
|
123
|
+
line-height: var(--intergalactic-lh-300, 150%);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
SButton[size='400'] {
|
|
127
|
+
font-size: var(--intergalactic-fs-400, 20px);
|
|
128
|
+
line-height: var(--intergalactic-lh-400, 120%);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
SButton[size='500'] {
|
|
132
|
+
font-size: var(--intergalactic-fs-500, 24px);
|
|
133
|
+
line-height: var(--intergalactic-lh-500, 117%);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
SButton[size='600'] {
|
|
137
|
+
font-size: var(--intergalactic-fs-600, 32px);
|
|
138
|
+
line-height: var(--intergalactic-lh-600, 125%);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
SButton[size='700'] {
|
|
142
|
+
font-size: var(--intergalactic-fs-700, 36px);
|
|
143
|
+
line-height: var(--intergalactic-lh-700, 110%);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
SButton[size='800'] {
|
|
147
|
+
font-size: var(--intergalactic-fs-800, 48px);
|
|
148
|
+
line-height: var(--intergalactic-lh-800, 117%);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@media (prefers-reduced-motion) {
|
|
152
|
+
SButton {
|
|
153
|
+
transition: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
SText {
|
|
157
|
+
transition: none;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropGetterFn } from '@semcore/core';
|
|
3
|
-
import { KeyboardFocusProps } from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';
|
|
4
3
|
import { BoxProps } from '@semcore/flex-box';
|
|
5
4
|
import { NeighborItemProps } from '@semcore/neighbor-location';
|
|
6
5
|
import { TooltipHintProps } from '@semcore/tooltip';
|
|
7
|
-
export type AbstractButtonProps<S, U, T> = BoxProps & NeighborItemProps &
|
|
6
|
+
export type AbstractButtonProps<S, U, T> = BoxProps & NeighborItemProps & {
|
|
8
7
|
/** Button activity state */
|
|
9
8
|
active?: boolean;
|
|
10
9
|
/** Disabled button state */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/button",
|
|
3
3
|
"description": "Semrush Button Component",
|
|
4
|
-
"version": "16.0.
|
|
4
|
+
"version": "16.0.1-prerelease.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/flex-box": "16.0.
|
|
18
|
-
"@semcore/neighbor-location": "16.0.
|
|
19
|
-
"@semcore/spin": "16.0.
|
|
20
|
-
"@semcore/tooltip": "16.0.
|
|
17
|
+
"@semcore/flex-box": "16.0.1-prerelease.2",
|
|
18
|
+
"@semcore/neighbor-location": "16.0.1-prerelease.2",
|
|
19
|
+
"@semcore/spin": "16.0.1-prerelease.2",
|
|
20
|
+
"@semcore/tooltip": "16.0.1-prerelease.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@semcore/base-components": "^16.0.
|
|
23
|
+
"@semcore/base-components": "^16.0.1-prerelease.2"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -85,7 +85,7 @@ export abstract class AbstractButton extends Component<Props, {}, {}> {
|
|
|
85
85
|
const SButton = Root;
|
|
86
86
|
|
|
87
87
|
return sstyled(styles)(
|
|
88
|
-
<SButton render={Hint} {...buttonProps} {...hintProps}>
|
|
88
|
+
<SButton render={Hint} {...buttonProps} {...hintProps} ignorePortalsStacking>
|
|
89
89
|
{children}
|
|
90
90
|
</SButton>,
|
|
91
91
|
);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PropGetterFn } from '@semcore/core';
|
|
3
|
-
import { KeyboardFocusProps } from '@semcore/core/lib/utils/enhances/keyboardFocusEnhance';
|
|
4
3
|
import { BoxProps } from '@semcore/flex-box';
|
|
5
4
|
import { NeighborItemProps } from '@semcore/neighbor-location';
|
|
6
5
|
import { TooltipHintProps } from '@semcore/tooltip';
|
|
7
6
|
|
|
8
7
|
export type AbstractButtonProps<S, U, T> = BoxProps &
|
|
9
|
-
NeighborItemProps &
|
|
10
|
-
KeyboardFocusProps & {
|
|
8
|
+
NeighborItemProps & {
|
|
11
9
|
/** Button activity state */
|
|
12
10
|
active?: boolean;
|
|
13
11
|
/** Disabled button state */
|