@skyscanner/backpack-web 41.17.0 → 41.19.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.
- package/bpk-component-badge/index.d.ts +2 -2
- package/bpk-component-badge/index.js +2 -2
- package/bpk-component-badge/src/BpkBadge.module.css +1 -1
- package/bpk-component-badge/src/themeAttributes.d.ts +25 -2
- package/bpk-component-badge/src/themeAttributes.js +27 -1
- package/bpk-component-button/index.d.ts +2 -2
- package/bpk-component-button/index.js +1 -1
- package/bpk-component-button/src/BpkButtonV2/BpkButton.d.ts +1 -1
- package/bpk-component-button/src/BpkButtonV2/BpkButton.js +38 -6
- package/bpk-component-button/src/BpkButtonV2/BpkButton.module.css +1 -1
- package/bpk-component-button/src/BpkButtonV2/common-types.d.ts +2 -0
- package/bpk-component-button/src/themeAttributes.d.ts +1 -0
- package/bpk-component-button/src/themeAttributes.js +3 -2
- package/bpk-component-chat-notification/index.d.ts +2 -0
- package/bpk-component-chat-notification/index.js +19 -0
- package/bpk-component-chat-notification/src/BpkChatNotification.d.ts +9 -0
- package/bpk-component-chat-notification/src/BpkChatNotification.js +43 -0
- package/bpk-component-chat-notification/src/BpkChatNotification.module.css +18 -0
- package/bpk-component-chat-thought-bubble/index.d.ts +3 -0
- package/bpk-component-chat-thought-bubble/index.js +20 -0
- package/bpk-component-chat-thought-bubble/src/BpkChatThoughtBubble.d.ts +8 -0
- package/bpk-component-chat-thought-bubble/src/BpkChatThoughtBubble.js +46 -0
- package/bpk-component-chat-thought-bubble/src/BpkChatThoughtBubble.module.css +18 -0
- package/bpk-component-chip/index.d.ts +2 -2
- package/bpk-component-chip/index.js +2 -2
- package/bpk-component-chip/src/BpkSelectableChip.module.css +1 -1
- package/bpk-component-chip/src/themeAttributes.d.ts +4 -0
- package/bpk-component-chip/src/themeAttributes.js +7 -1
- package/bpk-component-pagination/src/BpkPaginationPage.module.css +1 -1
- package/bpk-component-scrollable-calendar/src/utils.d.ts +1 -1
- package/bpk-component-segmented-control/index.d.ts +2 -0
- package/bpk-component-segmented-control/index.js +2 -1
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.d.ts +19 -0
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.js +81 -0
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.module.css +18 -0
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/common-types.d.ts +57 -0
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/common-types.js +24 -0
- package/bpk-component-table/index.d.ts +13 -0
- package/bpk-component-table/index.js +3 -1
- package/bpk-component-table/src/BpkTable.d.ts +8 -0
- package/bpk-component-table/src/BpkTable.js +7 -14
- package/bpk-component-table/src/BpkTableBody.d.ts +7 -0
- package/bpk-component-table/src/BpkTableBody.js +3 -5
- package/bpk-component-table/src/BpkTableCell.d.ts +9 -0
- package/bpk-component-table/src/BpkTableCell.js +7 -15
- package/bpk-component-table/src/BpkTableHead.d.ts +7 -0
- package/bpk-component-table/src/BpkTableHead.js +3 -5
- package/bpk-component-table/src/BpkTableHeadCell.d.ts +9 -0
- package/bpk-component-table/src/BpkTableHeadCell.js +2 -6
- package/bpk-component-table/src/BpkTableRow.d.ts +7 -0
- package/bpk-component-table/src/BpkTableRow.js +3 -5
- package/bpk-component-thumb-button/index.d.ts +3 -0
- package/bpk-component-thumb-button/index.js +20 -0
- package/bpk-component-thumb-button/src/BpkThumbButton.d.ts +21 -0
- package/bpk-component-thumb-button/src/BpkThumbButton.js +52 -0
- package/bpk-component-thumb-button/src/BpkThumbButton.module.css +18 -0
- package/bpk-mixins/_badges.scss +147 -25
- package/bpk-mixins/_buttons.scss +173 -79
- package/bpk-mixins/_chips.scss +104 -18
- package/bpk-mixins/_index.scss +1 -0
- package/bpk-mixins/_segmented-control.scss +263 -0
- package/package.json +2 -1
package/bpk-mixins/_badges.scss
CHANGED
|
@@ -39,9 +39,28 @@
|
|
|
39
39
|
padding: tokens.bpk-spacing-sm() tokens.bpk-spacing-md();
|
|
40
40
|
align-items: center;
|
|
41
41
|
|
|
42
|
-
@include
|
|
42
|
+
@include utils.bpk-themeable-property(
|
|
43
|
+
border-radius,
|
|
44
|
+
--bpk-badge-border-radius,
|
|
45
|
+
tokens.$bpk-border-radius-xs
|
|
46
|
+
);
|
|
43
47
|
@include typography.bpk-text;
|
|
44
48
|
@include typography.bpk-footnote;
|
|
49
|
+
@include utils.bpk-themeable-property(
|
|
50
|
+
font-size,
|
|
51
|
+
--bpk-badge-font-size,
|
|
52
|
+
tokens.$bpk-font-size-sm
|
|
53
|
+
);
|
|
54
|
+
@include utils.bpk-themeable-property(
|
|
55
|
+
font-weight,
|
|
56
|
+
--bpk-badge-font-weight,
|
|
57
|
+
tokens.$bpk-font-weight-book
|
|
58
|
+
);
|
|
59
|
+
@include utils.bpk-themeable-property(
|
|
60
|
+
line-height,
|
|
61
|
+
--bpk-badge-line-height,
|
|
62
|
+
tokens.$bpk-line-height-sm
|
|
63
|
+
);
|
|
45
64
|
}
|
|
46
65
|
|
|
47
66
|
/// Centered badge. Modifies the bpk-badge mixin.
|
|
@@ -121,9 +140,21 @@
|
|
|
121
140
|
/// }
|
|
122
141
|
|
|
123
142
|
@mixin bpk-badge--normal {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
143
|
+
@include utils.bpk-themeable-property(
|
|
144
|
+
background-color,
|
|
145
|
+
--bpk-badge-normal-background-color,
|
|
146
|
+
tokens.$bpk-private-badge-background-normal-day
|
|
147
|
+
);
|
|
148
|
+
@include utils.bpk-themeable-property(
|
|
149
|
+
color,
|
|
150
|
+
--bpk-badge-normal-text-color,
|
|
151
|
+
tokens.$bpk-text-primary-day
|
|
152
|
+
);
|
|
153
|
+
@include utils.bpk-themeable-property(
|
|
154
|
+
fill,
|
|
155
|
+
--bpk-badge-normal-icon-color,
|
|
156
|
+
tokens.$bpk-text-primary-day
|
|
157
|
+
);
|
|
127
158
|
}
|
|
128
159
|
|
|
129
160
|
/// Warning badge. Modifies the bpk-badge mixin.
|
|
@@ -137,9 +168,21 @@
|
|
|
137
168
|
/// }
|
|
138
169
|
|
|
139
170
|
@mixin bpk-badge--warning {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
171
|
+
@include utils.bpk-themeable-property(
|
|
172
|
+
background-color,
|
|
173
|
+
--bpk-badge-warning-background-color,
|
|
174
|
+
tokens.$bpk-private-badge-background-normal-day
|
|
175
|
+
);
|
|
176
|
+
@include utils.bpk-themeable-property(
|
|
177
|
+
color,
|
|
178
|
+
--bpk-badge-warning-text-color,
|
|
179
|
+
tokens.$bpk-text-on-light-day
|
|
180
|
+
);
|
|
181
|
+
@include utils.bpk-themeable-property(
|
|
182
|
+
fill,
|
|
183
|
+
--bpk-badge-warning-icon-color,
|
|
184
|
+
tokens.$bpk-status-warning-spot-day
|
|
185
|
+
);
|
|
143
186
|
}
|
|
144
187
|
|
|
145
188
|
/// Success badge. Modifies the bpk-badge mixin.
|
|
@@ -153,9 +196,21 @@
|
|
|
153
196
|
/// }
|
|
154
197
|
|
|
155
198
|
@mixin bpk-badge--success {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
199
|
+
@include utils.bpk-themeable-property(
|
|
200
|
+
background-color,
|
|
201
|
+
--bpk-badge-success-background-color,
|
|
202
|
+
tokens.$bpk-private-badge-background-normal-day
|
|
203
|
+
);
|
|
204
|
+
@include utils.bpk-themeable-property(
|
|
205
|
+
color,
|
|
206
|
+
--bpk-badge-success-text-color,
|
|
207
|
+
tokens.$bpk-text-on-light-day
|
|
208
|
+
);
|
|
209
|
+
@include utils.bpk-themeable-property(
|
|
210
|
+
fill,
|
|
211
|
+
--bpk-badge-success-icon-color,
|
|
212
|
+
tokens.$bpk-status-success-spot-day
|
|
213
|
+
);
|
|
159
214
|
}
|
|
160
215
|
|
|
161
216
|
/// Critical badge. Modifies the bpk-badge mixin.
|
|
@@ -169,9 +224,21 @@
|
|
|
169
224
|
/// }
|
|
170
225
|
|
|
171
226
|
@mixin bpk-badge--critical {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
227
|
+
@include utils.bpk-themeable-property(
|
|
228
|
+
background-color,
|
|
229
|
+
--bpk-badge-critical-background-color,
|
|
230
|
+
tokens.$bpk-private-badge-background-normal-day
|
|
231
|
+
);
|
|
232
|
+
@include utils.bpk-themeable-property(
|
|
233
|
+
color,
|
|
234
|
+
--bpk-badge-critical-text-color,
|
|
235
|
+
tokens.$bpk-text-on-light-day
|
|
236
|
+
);
|
|
237
|
+
@include utils.bpk-themeable-property(
|
|
238
|
+
fill,
|
|
239
|
+
--bpk-badge-critical-icon-color,
|
|
240
|
+
tokens.$bpk-status-danger-spot-day
|
|
241
|
+
);
|
|
175
242
|
}
|
|
176
243
|
|
|
177
244
|
/// Inverse badge. Modifies the bpk-badge mixin.
|
|
@@ -185,9 +252,21 @@
|
|
|
185
252
|
/// }
|
|
186
253
|
|
|
187
254
|
@mixin bpk-badge--inverse {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
255
|
+
@include utils.bpk-themeable-property(
|
|
256
|
+
background-color,
|
|
257
|
+
--bpk-badge-inverse-background-color,
|
|
258
|
+
tokens.$bpk-surface-default-day
|
|
259
|
+
);
|
|
260
|
+
@include utils.bpk-themeable-property(
|
|
261
|
+
color,
|
|
262
|
+
--bpk-badge-inverse-text-color,
|
|
263
|
+
tokens.$bpk-text-primary-day
|
|
264
|
+
);
|
|
265
|
+
@include utils.bpk-themeable-property(
|
|
266
|
+
fill,
|
|
267
|
+
--bpk-badge-inverse-icon-color,
|
|
268
|
+
tokens.$bpk-text-primary-day
|
|
269
|
+
);
|
|
191
270
|
}
|
|
192
271
|
|
|
193
272
|
/// Outline badge. Modifies the bpk-badge mixin.
|
|
@@ -201,11 +280,30 @@
|
|
|
201
280
|
/// }
|
|
202
281
|
|
|
203
282
|
@mixin bpk-badge--outline {
|
|
204
|
-
|
|
205
|
-
|
|
283
|
+
// The inset border intentionally shares --bpk-badge-outline-text-color with the text colour.
|
|
284
|
+
// This means badgeOutlineTextColor controls both the text and the visible border simultaneously.
|
|
285
|
+
// There is no separate badgeOutlineBorderColor attribute by design — if independent colours are
|
|
286
|
+
// ever needed, a dedicated CSS variable and theme attribute should be introduced at that point.
|
|
206
287
|
box-shadow: inset 0 0 0 tokens.$bpk-border-size-sm
|
|
207
288
|
tokens.$bpk-text-on-dark-day;
|
|
208
|
-
|
|
289
|
+
box-shadow: inset 0 0 0 tokens.$bpk-border-size-sm
|
|
290
|
+
var(--bpk-badge-outline-text-color, tokens.$bpk-text-on-dark-day);
|
|
291
|
+
|
|
292
|
+
@include utils.bpk-themeable-property(
|
|
293
|
+
background-color,
|
|
294
|
+
--bpk-badge-outline-background-color,
|
|
295
|
+
transparent
|
|
296
|
+
);
|
|
297
|
+
@include utils.bpk-themeable-property(
|
|
298
|
+
color,
|
|
299
|
+
--bpk-badge-outline-text-color,
|
|
300
|
+
tokens.$bpk-text-on-dark-day
|
|
301
|
+
);
|
|
302
|
+
@include utils.bpk-themeable-property(
|
|
303
|
+
fill,
|
|
304
|
+
--bpk-badge-outline-icon-color,
|
|
305
|
+
tokens.$bpk-text-on-dark-day
|
|
306
|
+
);
|
|
209
307
|
}
|
|
210
308
|
|
|
211
309
|
/// Strong badge. Modifies the bpk-badge mixin.
|
|
@@ -219,9 +317,21 @@
|
|
|
219
317
|
/// }
|
|
220
318
|
|
|
221
319
|
@mixin bpk-badge--strong {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
320
|
+
@include utils.bpk-themeable-property(
|
|
321
|
+
background-color,
|
|
322
|
+
--bpk-badge-strong-background-color,
|
|
323
|
+
tokens.$bpk-core-primary-day
|
|
324
|
+
);
|
|
325
|
+
@include utils.bpk-themeable-property(
|
|
326
|
+
color,
|
|
327
|
+
--bpk-badge-strong-text-color,
|
|
328
|
+
tokens.$bpk-text-on-dark-day
|
|
329
|
+
);
|
|
330
|
+
@include utils.bpk-themeable-property(
|
|
331
|
+
fill,
|
|
332
|
+
--bpk-badge-strong-icon-color,
|
|
333
|
+
tokens.$bpk-text-on-dark-day
|
|
334
|
+
);
|
|
225
335
|
}
|
|
226
336
|
|
|
227
337
|
/// Brand badge. Modifies the bpk-badge mixin.
|
|
@@ -235,7 +345,19 @@
|
|
|
235
345
|
/// }
|
|
236
346
|
|
|
237
347
|
@mixin bpk-badge--brand {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
348
|
+
@include utils.bpk-themeable-property(
|
|
349
|
+
background-color,
|
|
350
|
+
--bpk-badge-brand-background-color,
|
|
351
|
+
tokens.$bpk-core-accent-day
|
|
352
|
+
);
|
|
353
|
+
@include utils.bpk-themeable-property(
|
|
354
|
+
color,
|
|
355
|
+
--bpk-badge-brand-text-color,
|
|
356
|
+
tokens.$bpk-text-primary-inverse-day
|
|
357
|
+
);
|
|
358
|
+
@include utils.bpk-themeable-property(
|
|
359
|
+
fill,
|
|
360
|
+
--bpk-badge-brand-icon-color,
|
|
361
|
+
tokens.$bpk-text-primary-inverse-day
|
|
362
|
+
);
|
|
241
363
|
}
|
package/bpk-mixins/_buttons.scss
CHANGED
|
@@ -26,6 +26,112 @@
|
|
|
26
26
|
/// @group buttons
|
|
27
27
|
////
|
|
28
28
|
|
|
29
|
+
// --- Private: pressed/hover colour declarations ---
|
|
30
|
+
// These mixins centralise pressed/hover token references.
|
|
31
|
+
// hover and loading can include the same mixin — token values
|
|
32
|
+
// are defined exactly once.
|
|
33
|
+
|
|
34
|
+
@mixin _bpk-button-primary-hover {
|
|
35
|
+
@include utils.bpk-themeable-property(
|
|
36
|
+
background-color,
|
|
37
|
+
--bpk-button-primary-hover-background-color,
|
|
38
|
+
tokens.$bpk-private-button-primary-pressed-background-day
|
|
39
|
+
);
|
|
40
|
+
@include utils.bpk-themeable-property(
|
|
41
|
+
color,
|
|
42
|
+
--bpk-button-primary-hover-text-color,
|
|
43
|
+
tokens.$bpk-text-on-dark-day
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin _bpk-button-primary-on-dark-hover {
|
|
48
|
+
@include utils.bpk-themeable-property(
|
|
49
|
+
background-color,
|
|
50
|
+
--bpk-button-primary-on-dark-hover-background-color,
|
|
51
|
+
tokens.$bpk-private-button-primary-on-dark-pressed-background-day
|
|
52
|
+
);
|
|
53
|
+
@include utils.bpk-themeable-property(
|
|
54
|
+
color,
|
|
55
|
+
--bpk-button-primary-on-dark-hover-text-color,
|
|
56
|
+
tokens.$bpk-text-on-light-day
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin _bpk-button-primary-on-light-hover {
|
|
61
|
+
@include utils.bpk-themeable-property(
|
|
62
|
+
background-color,
|
|
63
|
+
--bpk-button-primary-on-light-hover-background-color,
|
|
64
|
+
tokens.$bpk-private-button-primary-on-light-pressed-background-day
|
|
65
|
+
);
|
|
66
|
+
@include utils.bpk-themeable-property(
|
|
67
|
+
color,
|
|
68
|
+
--bpk-button-primary-on-light-hover-text-color,
|
|
69
|
+
tokens.$bpk-text-on-dark-night
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin _bpk-button-secondary-hover {
|
|
74
|
+
@include utils.bpk-themeable-property(
|
|
75
|
+
background-color,
|
|
76
|
+
--bpk-button-secondary-hover-background-color,
|
|
77
|
+
tokens.$bpk-private-button-secondary-pressed-background-day
|
|
78
|
+
);
|
|
79
|
+
@include utils.bpk-themeable-property(
|
|
80
|
+
color,
|
|
81
|
+
--bpk-button-secondary-hover-text-color,
|
|
82
|
+
tokens.$bpk-text-primary-day
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@mixin _bpk-button-secondary-on-dark-hover {
|
|
87
|
+
@include utils.bpk-themeable-property(
|
|
88
|
+
background-color,
|
|
89
|
+
--bpk-button-secondary-on-dark-hover-background-color,
|
|
90
|
+
tokens.$bpk-private-button-secondary-on-dark-pressed-background-day
|
|
91
|
+
);
|
|
92
|
+
@include utils.bpk-themeable-property(
|
|
93
|
+
color,
|
|
94
|
+
--bpk-button-secondary-on-dark-hover-text-color,
|
|
95
|
+
tokens.$bpk-text-on-dark-day
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@mixin _bpk-button-destructive-hover {
|
|
100
|
+
@include utils.bpk-themeable-property(
|
|
101
|
+
background-color,
|
|
102
|
+
--bpk-button-destructive-hover-background-color,
|
|
103
|
+
tokens.$bpk-private-button-destructive-pressed-background-day
|
|
104
|
+
);
|
|
105
|
+
@include utils.bpk-themeable-property(
|
|
106
|
+
color,
|
|
107
|
+
--bpk-button-destructive-hover-text-color,
|
|
108
|
+
tokens.$bpk-text-primary-inverse-day
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@mixin _bpk-button-featured-hover {
|
|
113
|
+
@include utils.bpk-themeable-property(
|
|
114
|
+
background-color,
|
|
115
|
+
--bpk-button-featured-hover-background-color,
|
|
116
|
+
tokens.$bpk-private-button-featured-pressed-background-day
|
|
117
|
+
);
|
|
118
|
+
@include utils.bpk-themeable-property(
|
|
119
|
+
color,
|
|
120
|
+
--bpk-button-featured-hover-text-color,
|
|
121
|
+
tokens.$bpk-text-primary-inverse-day
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@mixin _bpk-button-link-on-dark-hover {
|
|
126
|
+
@include utils.bpk-themeable-property(
|
|
127
|
+
color,
|
|
128
|
+
--bpk-button-link-on-dark-hover-text-color,
|
|
129
|
+
tokens.$bpk-private-button-link-on-dark-pressed-foreground-day
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// --- End private mixins ---
|
|
134
|
+
|
|
29
135
|
/// Standard button.
|
|
30
136
|
///
|
|
31
137
|
/// @example scss
|
|
@@ -39,13 +145,17 @@
|
|
|
39
145
|
margin: 0;
|
|
40
146
|
padding: (6 * tokens.$bpk-one-pixel-rem) tokens.bpk-spacing-base();
|
|
41
147
|
border: 0;
|
|
42
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
43
148
|
text-align: center;
|
|
44
149
|
text-decoration: none;
|
|
45
150
|
cursor: pointer;
|
|
46
151
|
vertical-align: middle;
|
|
47
152
|
user-select: none;
|
|
48
153
|
|
|
154
|
+
@include utils.bpk-themeable-property(
|
|
155
|
+
border-radius,
|
|
156
|
+
--bpk-button-border-radius,
|
|
157
|
+
tokens.$bpk-button-border-radius
|
|
158
|
+
);
|
|
49
159
|
@include typography.bpk-label-1;
|
|
50
160
|
@include utils.bpk-themeable-property(
|
|
51
161
|
color,
|
|
@@ -59,16 +169,7 @@
|
|
|
59
169
|
);
|
|
60
170
|
|
|
61
171
|
@include utils.bpk-hover {
|
|
62
|
-
@include
|
|
63
|
-
color,
|
|
64
|
-
--bpk-button-primary-hover-text-color,
|
|
65
|
-
tokens.$bpk-text-on-dark-day
|
|
66
|
-
);
|
|
67
|
-
@include utils.bpk-themeable-property(
|
|
68
|
-
background-color,
|
|
69
|
-
--bpk-button-primary-hover-background-color,
|
|
70
|
-
tokens.$bpk-private-button-primary-pressed-background-day
|
|
71
|
-
);
|
|
172
|
+
@include _bpk-button-primary-hover;
|
|
72
173
|
}
|
|
73
174
|
|
|
74
175
|
&:active {
|
|
@@ -89,6 +190,11 @@
|
|
|
89
190
|
color: tokens.$bpk-text-disabled-day;
|
|
90
191
|
cursor: not-allowed;
|
|
91
192
|
}
|
|
193
|
+
|
|
194
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
195
|
+
&.bpk-button--loading:disabled {
|
|
196
|
+
@include _bpk-button-primary-hover;
|
|
197
|
+
}
|
|
92
198
|
}
|
|
93
199
|
|
|
94
200
|
/// Large button. Modifies the bpk-button mixin.
|
|
@@ -129,16 +235,7 @@
|
|
|
129
235
|
);
|
|
130
236
|
|
|
131
237
|
@include utils.bpk-hover {
|
|
132
|
-
@include
|
|
133
|
-
color,
|
|
134
|
-
--bpk-button-primary-on-dark-hover-text-color,
|
|
135
|
-
tokens.$bpk-text-on-light-day
|
|
136
|
-
);
|
|
137
|
-
@include utils.bpk-themeable-property(
|
|
138
|
-
background-color,
|
|
139
|
-
--bpk-button-primary-on-dark-hover-background-color,
|
|
140
|
-
tokens.$bpk-private-button-primary-on-dark-pressed-background-day
|
|
141
|
-
);
|
|
238
|
+
@include _bpk-button-primary-on-dark-hover;
|
|
142
239
|
}
|
|
143
240
|
|
|
144
241
|
&:active {
|
|
@@ -158,6 +255,11 @@
|
|
|
158
255
|
background-color: tokens.$bpk-private-button-primary-on-dark-disabled-background-day;
|
|
159
256
|
color: tokens.$bpk-private-button-primary-on-dark-disabled-foreground-day;
|
|
160
257
|
}
|
|
258
|
+
|
|
259
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
260
|
+
&.bpk-button--loading:disabled {
|
|
261
|
+
@include _bpk-button-primary-on-dark-hover;
|
|
262
|
+
}
|
|
161
263
|
}
|
|
162
264
|
|
|
163
265
|
/// PrimaryOnLight button. Modifies the bpk-button mixin.
|
|
@@ -183,16 +285,7 @@
|
|
|
183
285
|
);
|
|
184
286
|
|
|
185
287
|
@include utils.bpk-hover {
|
|
186
|
-
@include
|
|
187
|
-
color,
|
|
188
|
-
--bpk-button-primary-on-light-hover-text-color,
|
|
189
|
-
tokens.$bpk-text-on-dark-night
|
|
190
|
-
);
|
|
191
|
-
@include utils.bpk-themeable-property(
|
|
192
|
-
background-color,
|
|
193
|
-
--bpk-button-primary-on-light-hover-background-color,
|
|
194
|
-
tokens.$bpk-private-button-primary-on-light-pressed-background-day
|
|
195
|
-
);
|
|
288
|
+
@include _bpk-button-primary-on-light-hover;
|
|
196
289
|
}
|
|
197
290
|
|
|
198
291
|
&:active {
|
|
@@ -212,6 +305,11 @@
|
|
|
212
305
|
background-color: tokens.$bpk-private-button-primary-on-light-disabled-background-day;
|
|
213
306
|
color: tokens.$bpk-private-button-primary-on-light-disabled-foreground-day;
|
|
214
307
|
}
|
|
308
|
+
|
|
309
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
310
|
+
&.bpk-button--loading:disabled {
|
|
311
|
+
@include _bpk-button-primary-on-light-hover;
|
|
312
|
+
}
|
|
215
313
|
}
|
|
216
314
|
|
|
217
315
|
/// Secondary button. Modifies the bpk-button mixin.
|
|
@@ -237,16 +335,7 @@
|
|
|
237
335
|
);
|
|
238
336
|
|
|
239
337
|
@include utils.bpk-hover {
|
|
240
|
-
@include
|
|
241
|
-
color,
|
|
242
|
-
--bpk-button-secondary-hover-text-color,
|
|
243
|
-
tokens.$bpk-text-primary-day
|
|
244
|
-
);
|
|
245
|
-
@include utils.bpk-themeable-property(
|
|
246
|
-
background-color,
|
|
247
|
-
--bpk-button-secondary-hover-background-color,
|
|
248
|
-
tokens.$bpk-private-button-secondary-pressed-background-day
|
|
249
|
-
);
|
|
338
|
+
@include _bpk-button-secondary-hover;
|
|
250
339
|
}
|
|
251
340
|
|
|
252
341
|
&:active {
|
|
@@ -266,6 +355,11 @@
|
|
|
266
355
|
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
267
356
|
color: tokens.$bpk-text-disabled-day;
|
|
268
357
|
}
|
|
358
|
+
|
|
359
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
360
|
+
&.bpk-button--loading:disabled {
|
|
361
|
+
@include _bpk-button-secondary-hover;
|
|
362
|
+
}
|
|
269
363
|
}
|
|
270
364
|
|
|
271
365
|
/// Secondary on dark button. Modifies the bpk-button mixin.
|
|
@@ -291,16 +385,7 @@
|
|
|
291
385
|
);
|
|
292
386
|
|
|
293
387
|
@include utils.bpk-hover {
|
|
294
|
-
@include
|
|
295
|
-
color,
|
|
296
|
-
--bpk-button-secondary-on-dark-hover-text-color,
|
|
297
|
-
tokens.$bpk-text-on-dark-day
|
|
298
|
-
);
|
|
299
|
-
@include utils.bpk-themeable-property(
|
|
300
|
-
background-color,
|
|
301
|
-
--bpk-button-secondary-on-dark-hover-background-color,
|
|
302
|
-
tokens.$bpk-private-button-secondary-on-dark-pressed-background-day
|
|
303
|
-
);
|
|
388
|
+
@include _bpk-button-secondary-on-dark-hover;
|
|
304
389
|
}
|
|
305
390
|
|
|
306
391
|
&:active {
|
|
@@ -320,6 +405,11 @@
|
|
|
320
405
|
background-color: tokens.$bpk-private-button-secondary-on-dark-disabled-background-day;
|
|
321
406
|
color: tokens.$bpk-private-button-secondary-on-dark-disabled-foreground-day;
|
|
322
407
|
}
|
|
408
|
+
|
|
409
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
410
|
+
&.bpk-button--loading:disabled {
|
|
411
|
+
@include _bpk-button-secondary-on-dark-hover;
|
|
412
|
+
}
|
|
323
413
|
}
|
|
324
414
|
|
|
325
415
|
/// Destructive button. Modifies the bpk-button & bpk-button--secondary lib.
|
|
@@ -347,16 +437,7 @@
|
|
|
347
437
|
);
|
|
348
438
|
|
|
349
439
|
@include utils.bpk-hover {
|
|
350
|
-
@include
|
|
351
|
-
color,
|
|
352
|
-
--bpk-button-destructive-hover-text-color,
|
|
353
|
-
tokens.$bpk-text-primary-inverse-day
|
|
354
|
-
);
|
|
355
|
-
@include utils.bpk-themeable-property(
|
|
356
|
-
background-color,
|
|
357
|
-
--bpk-button-destructive-hover-background-color,
|
|
358
|
-
tokens.$bpk-private-button-destructive-pressed-background-day
|
|
359
|
-
);
|
|
440
|
+
@include _bpk-button-destructive-hover;
|
|
360
441
|
}
|
|
361
442
|
|
|
362
443
|
&:active {
|
|
@@ -376,6 +457,11 @@
|
|
|
376
457
|
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
377
458
|
color: tokens.$bpk-text-disabled-day;
|
|
378
459
|
}
|
|
460
|
+
|
|
461
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
462
|
+
&.bpk-button--loading:disabled {
|
|
463
|
+
@include _bpk-button-destructive-hover;
|
|
464
|
+
}
|
|
379
465
|
}
|
|
380
466
|
|
|
381
467
|
/// Link-style button. Modifies the bpk-button mixin.
|
|
@@ -425,6 +511,18 @@
|
|
|
425
511
|
text-decoration: none;
|
|
426
512
|
}
|
|
427
513
|
|
|
514
|
+
// Loading state override: restore pressed appearance while disabled.
|
|
515
|
+
&.bpk-button--loading:disabled,
|
|
516
|
+
&.bpk-button--loading:disabled:active {
|
|
517
|
+
background: none;
|
|
518
|
+
|
|
519
|
+
@include utils.bpk-themeable-property(
|
|
520
|
+
color,
|
|
521
|
+
--bpk-button-link-loading-color,
|
|
522
|
+
tokens.$bpk-text-primary-day
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
428
526
|
&-large {
|
|
429
527
|
padding: $vertical-padding-large 0;
|
|
430
528
|
}
|
|
@@ -433,7 +531,7 @@
|
|
|
433
531
|
/// Link on dark button. Modifies the bpk-button & bpk-button--link lib.
|
|
434
532
|
///
|
|
435
533
|
/// @require {mixin} bpk-button
|
|
436
|
-
|
|
534
|
+
///
|
|
437
535
|
/// @example scss
|
|
438
536
|
/// .selector {
|
|
439
537
|
/// @include bpk-button();
|
|
@@ -449,11 +547,7 @@
|
|
|
449
547
|
);
|
|
450
548
|
|
|
451
549
|
@include utils.bpk-hover {
|
|
452
|
-
@include
|
|
453
|
-
color,
|
|
454
|
-
--bpk-button-link-on-dark-hover-text-color,
|
|
455
|
-
tokens.$bpk-private-button-link-on-dark-pressed-foreground-day
|
|
456
|
-
);
|
|
550
|
+
@include _bpk-button-link-on-dark-hover;
|
|
457
551
|
}
|
|
458
552
|
|
|
459
553
|
&:active {
|
|
@@ -480,6 +574,12 @@
|
|
|
480
574
|
tokens.$bpk-private-button-link-on-dark-disabled-foreground-day
|
|
481
575
|
);
|
|
482
576
|
}
|
|
577
|
+
|
|
578
|
+
// Loading state override: restore pressed/hover appearance while disabled.
|
|
579
|
+
&.bpk-button--loading:disabled,
|
|
580
|
+
&.bpk-button--loading:disabled:active {
|
|
581
|
+
@include _bpk-button-link-on-dark-hover;
|
|
582
|
+
}
|
|
483
583
|
}
|
|
484
584
|
|
|
485
585
|
/// Button link icon only aligned. Modifies the bpk-button mixin.
|
|
@@ -532,7 +632,6 @@
|
|
|
532
632
|
|
|
533
633
|
padding-right: $horizontal-padding;
|
|
534
634
|
padding-left: $horizontal-padding;
|
|
535
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
536
635
|
}
|
|
537
636
|
|
|
538
637
|
/// Large icon-only button. Modifies the bpk-button & bpk-button--large lib.
|
|
@@ -555,7 +654,6 @@
|
|
|
555
654
|
|
|
556
655
|
padding-right: $horizontal-padding;
|
|
557
656
|
padding-left: $horizontal-padding;
|
|
558
|
-
border-radius: tokens.$bpk-button-border-radius;
|
|
559
657
|
}
|
|
560
658
|
|
|
561
659
|
/// Featured button. Modifies the bpk-button
|
|
@@ -582,16 +680,7 @@
|
|
|
582
680
|
);
|
|
583
681
|
|
|
584
682
|
@include utils.bpk-hover {
|
|
585
|
-
@include
|
|
586
|
-
color,
|
|
587
|
-
--bpk-button-featured-hover-text-color,
|
|
588
|
-
tokens.$bpk-text-primary-inverse-day
|
|
589
|
-
);
|
|
590
|
-
@include utils.bpk-themeable-property(
|
|
591
|
-
background-color,
|
|
592
|
-
--bpk-button-featured-hover-background-color,
|
|
593
|
-
tokens.$bpk-private-button-featured-pressed-background-day
|
|
594
|
-
);
|
|
683
|
+
@include _bpk-button-featured-hover;
|
|
595
684
|
}
|
|
596
685
|
|
|
597
686
|
&:active {
|
|
@@ -611,6 +700,11 @@
|
|
|
611
700
|
background-color: tokens.$bpk-private-button-disabled-background-day;
|
|
612
701
|
color: tokens.$bpk-text-disabled-day;
|
|
613
702
|
}
|
|
703
|
+
|
|
704
|
+
// Loading state override: restore hover/pressed appearance while disabled.
|
|
705
|
+
&.bpk-button--loading:disabled {
|
|
706
|
+
@include _bpk-button-featured-hover;
|
|
707
|
+
}
|
|
614
708
|
}
|
|
615
709
|
|
|
616
710
|
/// Full width button. Modifies the bpk-button to horizontally fill its container
|