@skyscanner/backpack-web 42.5.2 → 42.6.0-dev-v24170567962.1
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-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Control.js +1 -1
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2HiddenInput.js +1 -1
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Label.js +1 -1
- package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Root.js +1 -1
- package/bpk-component-checkbox-card/src/BpkCheckboxCard.js +1 -1
- package/bpk-component-checkbox-card/src/BpkCheckboxCardRoot.js +1 -1
- package/bpk-component-drawer/src/BpkDrawer.d.ts +1 -1
- package/bpk-component-drawer/src/BpkDrawerContent.d.ts +1 -1
- package/bpk-component-layout/index.d.ts +2 -0
- package/bpk-component-layout/index.js +4 -1
- package/bpk-component-layout/src/BpkBox.js +18 -8
- package/bpk-component-layout/src/BpkFlex.js +11 -3
- package/bpk-component-layout/src/BpkGrid.js +11 -3
- package/bpk-component-layout/src/BpkGridItem.js +11 -3
- package/bpk-component-layout/src/BpkLayout.module.css +18 -0
- package/bpk-component-layout/src/BpkProvider.js +11 -7
- package/bpk-component-layout/src/BpkStack.js +46 -20
- package/bpk-component-layout/src/backgroundColors.d.ts +16 -0
- package/bpk-component-layout/src/backgroundColors.js +37 -0
- package/bpk-component-layout/src/commonProps.d.ts +4 -3
- package/bpk-component-layout/src/spacingMap.d.ts +21 -0
- package/bpk-component-layout/src/spacingMap.js +92 -0
- package/bpk-component-layout/src/theme.d.ts +0 -14
- package/bpk-component-layout/src/theme.js +138 -205
- package/bpk-component-layout/src/tokenUtils.js +1 -1
- package/bpk-component-layout/src/types.d.ts +4 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3CloseTrigger/BpkModalV3CloseTrigger.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content/BpkModalV3Content.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Description/BpkModalV3Description.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Portal/BpkModalV3Portal.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim/BpkModalV3Scrim.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Title/BpkModalV3Title.js +1 -1
- package/bpk-component-modal/src/BpkModalV3/BpkModalV3Trigger/BpkModalV3Trigger.js +1 -1
- package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.js +2 -1
- package/bpk-mixins/_borders.scss +20 -4
- package/bpk-mixins/_scroll-indicators.scss +5 -1
- package/package.json +2 -1
|
@@ -16,18 +16,35 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { defineConfig } from '@chakra-ui/react';
|
|
19
|
+
import { defineConfig } from '@chakra-ui/react/styled-system';
|
|
20
20
|
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
import
|
|
21
|
+
// Named imports from Backpack foundations — only the tokens actually used.
|
|
22
|
+
// This enables tree-shaking of the full foundations module.
|
|
23
|
+
import {
|
|
24
|
+
// Border sizes
|
|
25
|
+
borderSizeSm, borderSizeLg, borderSizeXl,
|
|
26
|
+
// Border radii
|
|
27
|
+
borderRadiusXs, borderRadiusSm, borderRadiusMd, borderRadiusLg, borderRadiusXl, borderRadiusFull,
|
|
28
|
+
// Box shadows
|
|
29
|
+
boxShadowSm, boxShadowLg, boxShadowXl,
|
|
30
|
+
// Font sizes
|
|
31
|
+
fontSizeXs, fontSizeSm, fontSizeBase, fontSizeLg, fontSizeXl, fontSizeXxl, fontSizeXxxl, fontSizeXxxxl, fontSizeXxxxxl, fontSize6Xl, fontSize7Xl, fontSize8Xl,
|
|
32
|
+
// Line heights
|
|
33
|
+
lineHeightXs, lineHeightSm, lineHeightBase, lineHeightBaseTight, lineHeightLg, lineHeightLgTight, lineHeightXl, lineHeightXlTight, lineHeightXxl, lineHeightXxxl, lineHeightXxxxl, lineHeightXxxxxl, lineHeight6Xl, lineHeight7Xl, lineHeight8Xl,
|
|
34
|
+
// Font weights
|
|
35
|
+
fontWeightBook, fontWeightBold, fontWeightBlack, fontWeightLight,
|
|
36
|
+
// Letter spacing
|
|
37
|
+
letterSpacingTight, letterSpacingHero,
|
|
38
|
+
// Font family
|
|
39
|
+
fontFamilyLarken } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
40
|
+
import { spacingMap } from "./spacingMap";
|
|
24
41
|
// NOTE:
|
|
25
42
|
// We intentionally do not use the raw breakpoint *values* from foundations here.
|
|
26
43
|
// Foundations exports breakpoint values such as `breakpointMobile = "32rem"` which
|
|
27
44
|
// are used primarily for max-width queries (e.g. `(max-width: 32rem)`).
|
|
28
45
|
//
|
|
29
46
|
// Backpack layout responsive values in this package are mobile-first and behave
|
|
30
|
-
// like Chakra breakpoints (min-width thresholds). To align with Backpack
|
|
47
|
+
// like Chakra breakpoints (min-width thresholds). To align with Backpack's
|
|
31
48
|
// intended breakpoint ranges we define lower-bound (min-width) thresholds:
|
|
32
49
|
//
|
|
33
50
|
// - small-mobile: 320px+
|
|
@@ -36,73 +53,14 @@ import * as bpkTokens from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
|
36
53
|
// - tablet: 769px+
|
|
37
54
|
// - desktop: 1025px+
|
|
38
55
|
|
|
39
|
-
// Note: Spacing tokens are defined as SCSS functions in Backpack foundations,
|
|
40
|
-
// not as direct values. We need to use the actual rem values from the SCSS functions.
|
|
41
|
-
// Based on @skyscanner/bpk-foundations-web/tokens/base.default.scss:
|
|
42
|
-
// - bpk-spacing-sm() returns .25rem
|
|
43
|
-
// - bpk-spacing-md() returns .5rem
|
|
44
|
-
// - bpk-spacing-lg() returns 1.5rem
|
|
45
|
-
// - bpk-spacing-xl() returns 2rem (needs verification)
|
|
46
|
-
// - bpk-spacing-xxl() returns 2.5rem
|
|
47
|
-
// - bpk-spacing-base() returns 1rem (standard base spacing)
|
|
48
|
-
// TODO: CLOV-1021 - will add spacing tokens to Backpack Foundations package and use them here after we ship the PoC
|
|
49
|
-
const spacingXs = '.125rem'; // 2px
|
|
50
|
-
const spacingSm = '.25rem';
|
|
51
|
-
const spacingBase = '1rem'; // Standard base spacing
|
|
52
|
-
const spacingMd = '.5rem';
|
|
53
|
-
const spacingLg = '1.5rem';
|
|
54
|
-
const spacingXl = '2rem';
|
|
55
|
-
const spacingXxl = '2.5rem';
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Backpack Theme Configuration for Chakra UI
|
|
59
|
-
*
|
|
60
|
-
* This theme maps Backpack design tokens from @skyscanner/bpk-foundations-web
|
|
61
|
-
* to Chakra UI's theme structure.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Maps Backpack spacing tokens to actual rem values.
|
|
66
|
-
* These come directly from @skyscanner/bpk-foundations-web.
|
|
67
|
-
*/
|
|
68
|
-
// Spacing tokens - directly imported from foundations
|
|
69
|
-
const spacingMap = {
|
|
70
|
-
'bpk-spacing-none': {
|
|
71
|
-
value: '0'
|
|
72
|
-
},
|
|
73
|
-
// Temporary: Foundations does not yet export a 2px spacing token. This will be
|
|
74
|
-
// replaced with a foundations value once available.
|
|
75
|
-
'bpk-spacing-xs': {
|
|
76
|
-
value: spacingXs
|
|
77
|
-
},
|
|
78
|
-
'bpk-spacing-sm': {
|
|
79
|
-
value: spacingSm
|
|
80
|
-
},
|
|
81
|
-
'bpk-spacing-base': {
|
|
82
|
-
value: spacingBase
|
|
83
|
-
},
|
|
84
|
-
'bpk-spacing-md': {
|
|
85
|
-
value: spacingMd
|
|
86
|
-
},
|
|
87
|
-
'bpk-spacing-lg': {
|
|
88
|
-
value: spacingLg
|
|
89
|
-
},
|
|
90
|
-
'bpk-spacing-xl': {
|
|
91
|
-
value: spacingXl
|
|
92
|
-
},
|
|
93
|
-
'bpk-spacing-xxl': {
|
|
94
|
-
value: spacingXxl
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
|
|
98
56
|
/**
|
|
99
57
|
* Maps Backpack border size tokens to actual border width values
|
|
100
58
|
* These come directly from @skyscanner/bpk-foundations-web
|
|
101
59
|
*/
|
|
102
60
|
const borderSizeMap = {
|
|
103
|
-
'bpk-border-size-sm':
|
|
104
|
-
'bpk-border-size-lg':
|
|
105
|
-
'bpk-border-size-xl':
|
|
61
|
+
'bpk-border-size-sm': borderSizeSm,
|
|
62
|
+
'bpk-border-size-lg': borderSizeLg,
|
|
63
|
+
'bpk-border-size-xl': borderSizeXl
|
|
106
64
|
};
|
|
107
65
|
|
|
108
66
|
/**
|
|
@@ -111,12 +69,12 @@ const borderSizeMap = {
|
|
|
111
69
|
*/
|
|
112
70
|
const borderRadiusMap = {
|
|
113
71
|
'bpk-border-radius-none': '0',
|
|
114
|
-
'bpk-border-radius-xs':
|
|
115
|
-
'bpk-border-radius-sm':
|
|
116
|
-
'bpk-border-radius-md':
|
|
117
|
-
'bpk-border-radius-lg':
|
|
118
|
-
'bpk-border-radius-xl':
|
|
119
|
-
'bpk-border-radius-full':
|
|
72
|
+
'bpk-border-radius-xs': borderRadiusXs,
|
|
73
|
+
'bpk-border-radius-sm': borderRadiusSm,
|
|
74
|
+
'bpk-border-radius-md': borderRadiusMd,
|
|
75
|
+
'bpk-border-radius-lg': borderRadiusLg,
|
|
76
|
+
'bpk-border-radius-xl': borderRadiusXl,
|
|
77
|
+
'bpk-border-radius-full': borderRadiusFull
|
|
120
78
|
};
|
|
121
79
|
|
|
122
80
|
/**
|
|
@@ -124,9 +82,9 @@ const borderRadiusMap = {
|
|
|
124
82
|
* These come directly from @skyscanner/bpk-foundations-web
|
|
125
83
|
*/
|
|
126
84
|
const shadowMap = {
|
|
127
|
-
'bpk-shadow-sm':
|
|
128
|
-
'bpk-shadow-lg':
|
|
129
|
-
'bpk-shadow-xl':
|
|
85
|
+
'bpk-shadow-sm': boxShadowSm,
|
|
86
|
+
'bpk-shadow-lg': boxShadowLg,
|
|
87
|
+
'bpk-shadow-xl': boxShadowXl
|
|
130
88
|
};
|
|
131
89
|
|
|
132
90
|
/**
|
|
@@ -155,31 +113,6 @@ const breakpointMap = {
|
|
|
155
113
|
'2xl': '64.0625rem' // 1025px
|
|
156
114
|
};
|
|
157
115
|
|
|
158
|
-
/**
|
|
159
|
-
* Exports spacing map for use in tokenUtils
|
|
160
|
-
* This allows tokenUtils to look up actual spacing values
|
|
161
|
-
*
|
|
162
|
-
* @returns {Record<string, string>} A map of spacing token names to values.
|
|
163
|
-
*/
|
|
164
|
-
export function getSpacingMap() {
|
|
165
|
-
// Return simple string values for backward compatibility with utilities
|
|
166
|
-
const simpleMap = {};
|
|
167
|
-
Object.entries(spacingMap).forEach(([key, obj]) => {
|
|
168
|
-
simpleMap[key] = obj.value;
|
|
169
|
-
});
|
|
170
|
-
return simpleMap;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Gets the actual spacing value for a Backpack spacing token
|
|
175
|
-
*
|
|
176
|
-
* @param {string} token - Backpack spacing token name.
|
|
177
|
-
* @returns {string | undefined} The actual spacing value.
|
|
178
|
-
*/
|
|
179
|
-
export function getSpacingValue(token) {
|
|
180
|
-
return spacingMap[token]?.value;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
116
|
/**
|
|
184
117
|
* Gets the actual border width value for a Backpack border size token
|
|
185
118
|
*
|
|
@@ -218,230 +151,230 @@ export function getShadowValue(token) {
|
|
|
218
151
|
const textStylesMap = {
|
|
219
152
|
xs: {
|
|
220
153
|
value: {
|
|
221
|
-
fontSize:
|
|
222
|
-
lineHeight:
|
|
223
|
-
fontWeight:
|
|
154
|
+
fontSize: fontSizeXs,
|
|
155
|
+
lineHeight: lineHeightXs,
|
|
156
|
+
fontWeight: fontWeightBook
|
|
224
157
|
}
|
|
225
158
|
},
|
|
226
159
|
sm: {
|
|
227
160
|
value: {
|
|
228
|
-
fontSize:
|
|
229
|
-
lineHeight:
|
|
230
|
-
fontWeight:
|
|
161
|
+
fontSize: fontSizeSm,
|
|
162
|
+
lineHeight: lineHeightSm,
|
|
163
|
+
fontWeight: fontWeightBook
|
|
231
164
|
}
|
|
232
165
|
},
|
|
233
166
|
base: {
|
|
234
167
|
value: {
|
|
235
|
-
fontSize:
|
|
236
|
-
lineHeight:
|
|
237
|
-
fontWeight:
|
|
168
|
+
fontSize: fontSizeBase,
|
|
169
|
+
lineHeight: lineHeightBase,
|
|
170
|
+
fontWeight: fontWeightBook
|
|
238
171
|
}
|
|
239
172
|
},
|
|
240
173
|
lg: {
|
|
241
174
|
value: {
|
|
242
|
-
fontSize:
|
|
243
|
-
lineHeight:
|
|
244
|
-
fontWeight:
|
|
175
|
+
fontSize: fontSizeLg,
|
|
176
|
+
lineHeight: lineHeightLg,
|
|
177
|
+
fontWeight: fontWeightBook
|
|
245
178
|
}
|
|
246
179
|
},
|
|
247
180
|
xl: {
|
|
248
181
|
value: {
|
|
249
|
-
fontSize:
|
|
250
|
-
lineHeight:
|
|
251
|
-
fontWeight:
|
|
182
|
+
fontSize: fontSizeXl,
|
|
183
|
+
lineHeight: lineHeightXl,
|
|
184
|
+
fontWeight: fontWeightBook
|
|
252
185
|
}
|
|
253
186
|
},
|
|
254
187
|
xxl: {
|
|
255
188
|
value: {
|
|
256
|
-
fontSize:
|
|
257
|
-
lineHeight:
|
|
258
|
-
fontWeight:
|
|
189
|
+
fontSize: fontSizeXxl,
|
|
190
|
+
lineHeight: lineHeightXxl,
|
|
191
|
+
fontWeight: fontWeightBold
|
|
259
192
|
}
|
|
260
193
|
},
|
|
261
194
|
xxxl: {
|
|
262
195
|
value: {
|
|
263
|
-
fontSize:
|
|
264
|
-
lineHeight:
|
|
265
|
-
fontWeight:
|
|
196
|
+
fontSize: fontSizeXxxl,
|
|
197
|
+
lineHeight: lineHeightXxxl,
|
|
198
|
+
fontWeight: fontWeightBold
|
|
266
199
|
}
|
|
267
200
|
},
|
|
268
201
|
xxxxl: {
|
|
269
202
|
value: {
|
|
270
|
-
fontSize:
|
|
271
|
-
lineHeight:
|
|
272
|
-
fontWeight:
|
|
273
|
-
letterSpacing:
|
|
203
|
+
fontSize: fontSizeXxxxl,
|
|
204
|
+
lineHeight: lineHeightXxxxl,
|
|
205
|
+
fontWeight: fontWeightBold,
|
|
206
|
+
letterSpacing: letterSpacingTight
|
|
274
207
|
}
|
|
275
208
|
},
|
|
276
209
|
xxxxxl: {
|
|
277
210
|
value: {
|
|
278
|
-
fontSize:
|
|
279
|
-
lineHeight:
|
|
280
|
-
fontWeight:
|
|
281
|
-
letterSpacing:
|
|
211
|
+
fontSize: fontSizeXxxxxl,
|
|
212
|
+
lineHeight: lineHeightXxxxxl,
|
|
213
|
+
fontWeight: fontWeightBold,
|
|
214
|
+
letterSpacing: letterSpacingTight
|
|
282
215
|
}
|
|
283
216
|
},
|
|
284
217
|
caption: {
|
|
285
218
|
value: {
|
|
286
|
-
fontSize:
|
|
287
|
-
lineHeight:
|
|
288
|
-
fontWeight:
|
|
219
|
+
fontSize: fontSizeXs,
|
|
220
|
+
lineHeight: lineHeightXs,
|
|
221
|
+
fontWeight: fontWeightBook
|
|
289
222
|
}
|
|
290
223
|
},
|
|
291
224
|
footnote: {
|
|
292
225
|
value: {
|
|
293
|
-
fontSize:
|
|
294
|
-
lineHeight:
|
|
295
|
-
fontWeight:
|
|
226
|
+
fontSize: fontSizeSm,
|
|
227
|
+
lineHeight: lineHeightSm,
|
|
228
|
+
fontWeight: fontWeightBook
|
|
296
229
|
}
|
|
297
230
|
},
|
|
298
231
|
'label-1': {
|
|
299
232
|
value: {
|
|
300
|
-
fontSize:
|
|
301
|
-
lineHeight:
|
|
302
|
-
fontWeight:
|
|
233
|
+
fontSize: fontSizeBase,
|
|
234
|
+
lineHeight: lineHeightBase,
|
|
235
|
+
fontWeight: fontWeightBold
|
|
303
236
|
}
|
|
304
237
|
},
|
|
305
238
|
'label-2': {
|
|
306
239
|
value: {
|
|
307
|
-
fontSize:
|
|
308
|
-
lineHeight:
|
|
309
|
-
fontWeight:
|
|
240
|
+
fontSize: fontSizeSm,
|
|
241
|
+
lineHeight: lineHeightSm,
|
|
242
|
+
fontWeight: fontWeightBold
|
|
310
243
|
}
|
|
311
244
|
},
|
|
312
245
|
'label-3': {
|
|
313
246
|
value: {
|
|
314
|
-
fontSize:
|
|
315
|
-
lineHeight:
|
|
316
|
-
fontWeight:
|
|
247
|
+
fontSize: fontSizeXs,
|
|
248
|
+
lineHeight: lineHeightXs,
|
|
249
|
+
fontWeight: fontWeightBold
|
|
317
250
|
}
|
|
318
251
|
},
|
|
319
252
|
'body-default': {
|
|
320
253
|
value: {
|
|
321
|
-
fontSize:
|
|
322
|
-
lineHeight:
|
|
323
|
-
fontWeight:
|
|
254
|
+
fontSize: fontSizeBase,
|
|
255
|
+
lineHeight: lineHeightBase,
|
|
256
|
+
fontWeight: fontWeightBook
|
|
324
257
|
}
|
|
325
258
|
},
|
|
326
259
|
'body-longform': {
|
|
327
260
|
value: {
|
|
328
|
-
fontSize:
|
|
329
|
-
lineHeight:
|
|
330
|
-
fontWeight:
|
|
261
|
+
fontSize: fontSizeLg,
|
|
262
|
+
lineHeight: lineHeightLg,
|
|
263
|
+
fontWeight: fontWeightBook
|
|
331
264
|
}
|
|
332
265
|
},
|
|
333
266
|
subheading: {
|
|
334
267
|
value: {
|
|
335
|
-
fontSize:
|
|
336
|
-
lineHeight:
|
|
337
|
-
fontWeight:
|
|
268
|
+
fontSize: fontSizeXl,
|
|
269
|
+
lineHeight: lineHeightXl,
|
|
270
|
+
fontWeight: fontWeightBook
|
|
338
271
|
}
|
|
339
272
|
},
|
|
340
273
|
'heading-1': {
|
|
341
274
|
value: {
|
|
342
|
-
fontSize:
|
|
343
|
-
lineHeight:
|
|
344
|
-
fontWeight:
|
|
275
|
+
fontSize: fontSizeXxxl,
|
|
276
|
+
lineHeight: lineHeightXxxl,
|
|
277
|
+
fontWeight: fontWeightBold
|
|
345
278
|
}
|
|
346
279
|
},
|
|
347
280
|
'heading-2': {
|
|
348
281
|
value: {
|
|
349
|
-
fontSize:
|
|
350
|
-
lineHeight:
|
|
351
|
-
fontWeight:
|
|
282
|
+
fontSize: fontSizeXxl,
|
|
283
|
+
lineHeight: lineHeightXxl,
|
|
284
|
+
fontWeight: fontWeightBold
|
|
352
285
|
}
|
|
353
286
|
},
|
|
354
287
|
'heading-3': {
|
|
355
288
|
value: {
|
|
356
|
-
fontSize:
|
|
357
|
-
lineHeight:
|
|
358
|
-
fontWeight:
|
|
289
|
+
fontSize: fontSizeXl,
|
|
290
|
+
lineHeight: lineHeightXlTight,
|
|
291
|
+
fontWeight: fontWeightBold
|
|
359
292
|
}
|
|
360
293
|
},
|
|
361
294
|
'heading-4': {
|
|
362
295
|
value: {
|
|
363
|
-
fontSize:
|
|
364
|
-
lineHeight:
|
|
365
|
-
fontWeight:
|
|
296
|
+
fontSize: fontSizeLg,
|
|
297
|
+
lineHeight: lineHeightLgTight,
|
|
298
|
+
fontWeight: fontWeightBold
|
|
366
299
|
}
|
|
367
300
|
},
|
|
368
301
|
'heading-5': {
|
|
369
302
|
value: {
|
|
370
|
-
fontSize:
|
|
371
|
-
lineHeight:
|
|
372
|
-
fontWeight:
|
|
303
|
+
fontSize: fontSizeBase,
|
|
304
|
+
lineHeight: lineHeightBaseTight,
|
|
305
|
+
fontWeight: fontWeightBold
|
|
373
306
|
}
|
|
374
307
|
},
|
|
375
308
|
'hero-1': {
|
|
376
309
|
value: {
|
|
377
|
-
fontSize:
|
|
378
|
-
lineHeight:
|
|
379
|
-
fontWeight:
|
|
380
|
-
letterSpacing:
|
|
310
|
+
fontSize: fontSize8Xl,
|
|
311
|
+
lineHeight: lineHeight8Xl,
|
|
312
|
+
fontWeight: fontWeightBlack,
|
|
313
|
+
letterSpacing: letterSpacingHero
|
|
381
314
|
}
|
|
382
315
|
},
|
|
383
316
|
'hero-2': {
|
|
384
317
|
value: {
|
|
385
|
-
fontSize:
|
|
386
|
-
lineHeight:
|
|
387
|
-
fontWeight:
|
|
388
|
-
letterSpacing:
|
|
318
|
+
fontSize: fontSize7Xl,
|
|
319
|
+
lineHeight: lineHeight7Xl,
|
|
320
|
+
fontWeight: fontWeightBlack,
|
|
321
|
+
letterSpacing: letterSpacingHero
|
|
389
322
|
}
|
|
390
323
|
},
|
|
391
324
|
'hero-3': {
|
|
392
325
|
value: {
|
|
393
|
-
fontSize:
|
|
394
|
-
lineHeight:
|
|
395
|
-
fontWeight:
|
|
396
|
-
letterSpacing:
|
|
326
|
+
fontSize: fontSize6Xl,
|
|
327
|
+
lineHeight: lineHeight6Xl,
|
|
328
|
+
fontWeight: fontWeightBlack,
|
|
329
|
+
letterSpacing: letterSpacingHero
|
|
397
330
|
}
|
|
398
331
|
},
|
|
399
332
|
'hero-4': {
|
|
400
333
|
value: {
|
|
401
|
-
fontSize:
|
|
402
|
-
lineHeight:
|
|
403
|
-
fontWeight:
|
|
404
|
-
letterSpacing:
|
|
334
|
+
fontSize: fontSizeXxxxxl,
|
|
335
|
+
lineHeight: lineHeightXxxxxl,
|
|
336
|
+
fontWeight: fontWeightBlack,
|
|
337
|
+
letterSpacing: letterSpacingHero
|
|
405
338
|
}
|
|
406
339
|
},
|
|
407
340
|
'hero-5': {
|
|
408
341
|
value: {
|
|
409
|
-
fontSize:
|
|
410
|
-
lineHeight:
|
|
411
|
-
fontWeight:
|
|
412
|
-
letterSpacing:
|
|
342
|
+
fontSize: fontSizeXxxxl,
|
|
343
|
+
lineHeight: lineHeightXxxl,
|
|
344
|
+
fontWeight: fontWeightBlack,
|
|
345
|
+
letterSpacing: letterSpacingHero
|
|
413
346
|
}
|
|
414
347
|
},
|
|
415
348
|
'hero-6': {
|
|
416
349
|
value: {
|
|
417
|
-
fontSize:
|
|
418
|
-
lineHeight:
|
|
419
|
-
fontWeight:
|
|
420
|
-
letterSpacing:
|
|
350
|
+
fontSize: fontSizeXxxl,
|
|
351
|
+
lineHeight: lineHeightXxl,
|
|
352
|
+
fontWeight: fontWeightBlack,
|
|
353
|
+
letterSpacing: letterSpacingHero
|
|
421
354
|
}
|
|
422
355
|
},
|
|
423
356
|
'editorial-1': {
|
|
424
357
|
value: {
|
|
425
|
-
fontFamily: `var(--bpk-larken-font-stack, ${
|
|
426
|
-
fontSize:
|
|
427
|
-
lineHeight:
|
|
428
|
-
fontWeight:
|
|
358
|
+
fontFamily: `var(--bpk-larken-font-stack, ${fontFamilyLarken})`,
|
|
359
|
+
fontSize: fontSizeXxxxl,
|
|
360
|
+
lineHeight: lineHeightXxxxl,
|
|
361
|
+
fontWeight: fontWeightLight
|
|
429
362
|
}
|
|
430
363
|
},
|
|
431
364
|
'editorial-2': {
|
|
432
365
|
value: {
|
|
433
|
-
fontFamily: `var(--bpk-larken-font-stack, ${
|
|
434
|
-
fontSize:
|
|
435
|
-
lineHeight:
|
|
436
|
-
fontWeight:
|
|
366
|
+
fontFamily: `var(--bpk-larken-font-stack, ${fontFamilyLarken})`,
|
|
367
|
+
fontSize: fontSizeXxl,
|
|
368
|
+
lineHeight: lineHeightXxl,
|
|
369
|
+
fontWeight: fontWeightLight
|
|
437
370
|
}
|
|
438
371
|
},
|
|
439
372
|
'editorial-3': {
|
|
440
373
|
value: {
|
|
441
|
-
fontFamily: `var(--bpk-larken-font-stack, ${
|
|
442
|
-
fontSize:
|
|
443
|
-
lineHeight:
|
|
444
|
-
fontWeight:
|
|
374
|
+
fontFamily: `var(--bpk-larken-font-stack, ${fontFamilyLarken})`,
|
|
375
|
+
fontSize: fontSizeLg,
|
|
376
|
+
lineHeight: lineHeightLg,
|
|
377
|
+
fontWeight: fontWeightBook
|
|
445
378
|
}
|
|
446
379
|
}
|
|
447
380
|
};
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import StackOptionKeys from "./BpkStack.constant";
|
|
20
|
-
import { getSpacingValue } from "./
|
|
20
|
+
import { getSpacingValue } from "./spacingMap";
|
|
21
21
|
import { BpkBreakpointToChakraKey, isValidSpacingValue, isValidSizeValue, isValidPositionValue, isPercentage } from "./tokens";
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -2,7 +2,10 @@ import type { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import type StackOptionKeys from './BpkStack.constant';
|
|
3
3
|
import type { BpkCommonLayoutProps } from './commonProps';
|
|
4
4
|
import type { BpkSpacingValue, BpkResponsiveValue, BpkBasisValue } from './tokens';
|
|
5
|
-
import type { BoxProps
|
|
5
|
+
import type { BoxProps } from '@chakra-ui/react/box';
|
|
6
|
+
import type { FlexProps } from '@chakra-ui/react/flex';
|
|
7
|
+
import type { GridProps, GridItemProps } from '@chakra-ui/react/grid';
|
|
8
|
+
import type { StackProps } from '@chakra-ui/react/stack';
|
|
6
9
|
/**
|
|
7
10
|
* Layout-level event props that should not be exposed on layout components.
|
|
8
11
|
* onClick is handled via BpkCommonLayoutProps; onFocus/onBlur are reintroduced
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
|
|
21
21
|
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
22
|
import BpkCloseButton from "../../../../bpk-component-close-button";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
import { cssModules, getDataComponentAttribute } from "../../../../bpk-react-utils";
|
|
21
21
|
import { useModalType } from "../BpkModalV3Context";
|
|
22
22
|
import STYLES from "./BpkModalV3Content.module.css";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
import { getDataComponentAttribute } from "../../../../bpk-react-utils";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const BpkModalV3Description = ({
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { useEffect, useState } from 'react';
|
|
20
|
-
import { Dialog } from '@ark-ui/react';
|
|
20
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
21
21
|
import { durationBase } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
22
22
|
import { getDataComponentAttribute, useBodyLock } from "../../../../bpk-react-utils";
|
|
23
23
|
import { ModalTypeProvider } from "../BpkModalV3Context";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
import { cssModules, getDataComponentAttribute } from "../../../../bpk-react-utils";
|
|
21
21
|
import { useModalType } from "../BpkModalV3Context";
|
|
22
22
|
import STYLES from "./BpkModalV3Scrim.module.css";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
import { cssModules, getDataComponentAttribute } from "../../../../bpk-react-utils";
|
|
21
21
|
import STYLES from "./BpkModalV3Title.module.css";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
import { Dialog } from '@ark-ui/react';
|
|
19
|
+
import { Dialog } from '@ark-ui/react/dialog';
|
|
20
20
|
import { getDataComponentAttribute } from "../../../../bpk-react-utils";
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
const BpkModalV3Trigger = ({
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import { useRef } from 'react';
|
|
20
|
-
import {
|
|
20
|
+
import { useLocaleContext } from '@ark-ui/react/locale';
|
|
21
|
+
import { SegmentGroup } from '@ark-ui/react/segment-group';
|
|
21
22
|
import { cssModules, getDataComponentAttribute } from "../../../bpk-react-utils";
|
|
22
23
|
import { SEGMENT_TYPES_V2 } from "./common-types";
|
|
23
24
|
import STYLES from "./BpkSegmentedControlV2.module.css";
|