@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.
Files changed (38) hide show
  1. package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Control.js +1 -1
  2. package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2HiddenInput.js +1 -1
  3. package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Label.js +1 -1
  4. package/bpk-component-checkbox/src/BpkCheckboxV2/BpkCheckboxV2Root.js +1 -1
  5. package/bpk-component-checkbox-card/src/BpkCheckboxCard.js +1 -1
  6. package/bpk-component-checkbox-card/src/BpkCheckboxCardRoot.js +1 -1
  7. package/bpk-component-drawer/src/BpkDrawer.d.ts +1 -1
  8. package/bpk-component-drawer/src/BpkDrawerContent.d.ts +1 -1
  9. package/bpk-component-layout/index.d.ts +2 -0
  10. package/bpk-component-layout/index.js +4 -1
  11. package/bpk-component-layout/src/BpkBox.js +18 -8
  12. package/bpk-component-layout/src/BpkFlex.js +11 -3
  13. package/bpk-component-layout/src/BpkGrid.js +11 -3
  14. package/bpk-component-layout/src/BpkGridItem.js +11 -3
  15. package/bpk-component-layout/src/BpkLayout.module.css +18 -0
  16. package/bpk-component-layout/src/BpkProvider.js +11 -7
  17. package/bpk-component-layout/src/BpkStack.js +46 -20
  18. package/bpk-component-layout/src/backgroundColors.d.ts +16 -0
  19. package/bpk-component-layout/src/backgroundColors.js +37 -0
  20. package/bpk-component-layout/src/commonProps.d.ts +4 -3
  21. package/bpk-component-layout/src/spacingMap.d.ts +21 -0
  22. package/bpk-component-layout/src/spacingMap.js +92 -0
  23. package/bpk-component-layout/src/theme.d.ts +0 -14
  24. package/bpk-component-layout/src/theme.js +138 -205
  25. package/bpk-component-layout/src/tokenUtils.js +1 -1
  26. package/bpk-component-layout/src/types.d.ts +4 -1
  27. package/bpk-component-modal/src/BpkModalV3/BpkModalV3CloseTrigger/BpkModalV3CloseTrigger.js +1 -1
  28. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content/BpkModalV3Content.js +1 -1
  29. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Description/BpkModalV3Description.js +1 -1
  30. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Portal/BpkModalV3Portal.js +1 -1
  31. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.js +1 -1
  32. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim/BpkModalV3Scrim.js +1 -1
  33. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Title/BpkModalV3Title.js +1 -1
  34. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Trigger/BpkModalV3Trigger.js +1 -1
  35. package/bpk-component-segmented-control/src/BpkSegmentedControlV2/BpkSegmentedControlV2.js +2 -1
  36. package/bpk-mixins/_borders.scss +20 -4
  37. package/bpk-mixins/_scroll-indicators.scss +5 -1
  38. 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
- // Import tokens from Backpack foundations
22
- // Note: Some tokens may not be in TypeScript definitions but exist at runtime
23
- import * as bpkTokens from '@skyscanner/bpk-foundations-web/tokens/base.es6';
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 Backpacks
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': bpkTokens.borderSizeSm,
104
- 'bpk-border-size-lg': bpkTokens.borderSizeLg,
105
- 'bpk-border-size-xl': bpkTokens.borderSizeXl
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': bpkTokens.borderRadiusXs,
115
- 'bpk-border-radius-sm': bpkTokens.borderRadiusSm,
116
- 'bpk-border-radius-md': bpkTokens.borderRadiusMd,
117
- 'bpk-border-radius-lg': bpkTokens.borderRadiusLg,
118
- 'bpk-border-radius-xl': bpkTokens.borderRadiusXl,
119
- 'bpk-border-radius-full': bpkTokens.borderRadiusFull
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': bpkTokens.boxShadowSm,
128
- 'bpk-shadow-lg': bpkTokens.boxShadowLg,
129
- 'bpk-shadow-xl': bpkTokens.boxShadowXl
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: bpkTokens.fontSizeXs,
222
- lineHeight: bpkTokens.lineHeightXs,
223
- fontWeight: bpkTokens.fontWeightBook
154
+ fontSize: fontSizeXs,
155
+ lineHeight: lineHeightXs,
156
+ fontWeight: fontWeightBook
224
157
  }
225
158
  },
226
159
  sm: {
227
160
  value: {
228
- fontSize: bpkTokens.fontSizeSm,
229
- lineHeight: bpkTokens.lineHeightSm,
230
- fontWeight: bpkTokens.fontWeightBook
161
+ fontSize: fontSizeSm,
162
+ lineHeight: lineHeightSm,
163
+ fontWeight: fontWeightBook
231
164
  }
232
165
  },
233
166
  base: {
234
167
  value: {
235
- fontSize: bpkTokens.fontSizeBase,
236
- lineHeight: bpkTokens.lineHeightBase,
237
- fontWeight: bpkTokens.fontWeightBook
168
+ fontSize: fontSizeBase,
169
+ lineHeight: lineHeightBase,
170
+ fontWeight: fontWeightBook
238
171
  }
239
172
  },
240
173
  lg: {
241
174
  value: {
242
- fontSize: bpkTokens.fontSizeLg,
243
- lineHeight: bpkTokens.lineHeightLg,
244
- fontWeight: bpkTokens.fontWeightBook
175
+ fontSize: fontSizeLg,
176
+ lineHeight: lineHeightLg,
177
+ fontWeight: fontWeightBook
245
178
  }
246
179
  },
247
180
  xl: {
248
181
  value: {
249
- fontSize: bpkTokens.fontSizeXl,
250
- lineHeight: bpkTokens.lineHeightXl,
251
- fontWeight: bpkTokens.fontWeightBook
182
+ fontSize: fontSizeXl,
183
+ lineHeight: lineHeightXl,
184
+ fontWeight: fontWeightBook
252
185
  }
253
186
  },
254
187
  xxl: {
255
188
  value: {
256
- fontSize: bpkTokens.fontSizeXxl,
257
- lineHeight: bpkTokens.lineHeightXxl,
258
- fontWeight: bpkTokens.fontWeightBold
189
+ fontSize: fontSizeXxl,
190
+ lineHeight: lineHeightXxl,
191
+ fontWeight: fontWeightBold
259
192
  }
260
193
  },
261
194
  xxxl: {
262
195
  value: {
263
- fontSize: bpkTokens.fontSizeXxxl,
264
- lineHeight: bpkTokens.lineHeightXxxl,
265
- fontWeight: bpkTokens.fontWeightBold
196
+ fontSize: fontSizeXxxl,
197
+ lineHeight: lineHeightXxxl,
198
+ fontWeight: fontWeightBold
266
199
  }
267
200
  },
268
201
  xxxxl: {
269
202
  value: {
270
- fontSize: bpkTokens.fontSizeXxxxl,
271
- lineHeight: bpkTokens.lineHeightXxxxl,
272
- fontWeight: bpkTokens.fontWeightBold,
273
- letterSpacing: bpkTokens.letterSpacingTight
203
+ fontSize: fontSizeXxxxl,
204
+ lineHeight: lineHeightXxxxl,
205
+ fontWeight: fontWeightBold,
206
+ letterSpacing: letterSpacingTight
274
207
  }
275
208
  },
276
209
  xxxxxl: {
277
210
  value: {
278
- fontSize: bpkTokens.fontSizeXxxxxl,
279
- lineHeight: bpkTokens.lineHeightXxxxxl,
280
- fontWeight: bpkTokens.fontWeightBold,
281
- letterSpacing: bpkTokens.letterSpacingTight
211
+ fontSize: fontSizeXxxxxl,
212
+ lineHeight: lineHeightXxxxxl,
213
+ fontWeight: fontWeightBold,
214
+ letterSpacing: letterSpacingTight
282
215
  }
283
216
  },
284
217
  caption: {
285
218
  value: {
286
- fontSize: bpkTokens.fontSizeXs,
287
- lineHeight: bpkTokens.lineHeightXs,
288
- fontWeight: bpkTokens.fontWeightBook
219
+ fontSize: fontSizeXs,
220
+ lineHeight: lineHeightXs,
221
+ fontWeight: fontWeightBook
289
222
  }
290
223
  },
291
224
  footnote: {
292
225
  value: {
293
- fontSize: bpkTokens.fontSizeSm,
294
- lineHeight: bpkTokens.lineHeightSm,
295
- fontWeight: bpkTokens.fontWeightBook
226
+ fontSize: fontSizeSm,
227
+ lineHeight: lineHeightSm,
228
+ fontWeight: fontWeightBook
296
229
  }
297
230
  },
298
231
  'label-1': {
299
232
  value: {
300
- fontSize: bpkTokens.fontSizeBase,
301
- lineHeight: bpkTokens.lineHeightBase,
302
- fontWeight: bpkTokens.fontWeightBold
233
+ fontSize: fontSizeBase,
234
+ lineHeight: lineHeightBase,
235
+ fontWeight: fontWeightBold
303
236
  }
304
237
  },
305
238
  'label-2': {
306
239
  value: {
307
- fontSize: bpkTokens.fontSizeSm,
308
- lineHeight: bpkTokens.lineHeightSm,
309
- fontWeight: bpkTokens.fontWeightBold
240
+ fontSize: fontSizeSm,
241
+ lineHeight: lineHeightSm,
242
+ fontWeight: fontWeightBold
310
243
  }
311
244
  },
312
245
  'label-3': {
313
246
  value: {
314
- fontSize: bpkTokens.fontSizeXs,
315
- lineHeight: bpkTokens.lineHeightXs,
316
- fontWeight: bpkTokens.fontWeightBold
247
+ fontSize: fontSizeXs,
248
+ lineHeight: lineHeightXs,
249
+ fontWeight: fontWeightBold
317
250
  }
318
251
  },
319
252
  'body-default': {
320
253
  value: {
321
- fontSize: bpkTokens.fontSizeBase,
322
- lineHeight: bpkTokens.lineHeightBase,
323
- fontWeight: bpkTokens.fontWeightBook
254
+ fontSize: fontSizeBase,
255
+ lineHeight: lineHeightBase,
256
+ fontWeight: fontWeightBook
324
257
  }
325
258
  },
326
259
  'body-longform': {
327
260
  value: {
328
- fontSize: bpkTokens.fontSizeLg,
329
- lineHeight: bpkTokens.lineHeightLg,
330
- fontWeight: bpkTokens.fontWeightBook
261
+ fontSize: fontSizeLg,
262
+ lineHeight: lineHeightLg,
263
+ fontWeight: fontWeightBook
331
264
  }
332
265
  },
333
266
  subheading: {
334
267
  value: {
335
- fontSize: bpkTokens.fontSizeXl,
336
- lineHeight: bpkTokens.lineHeightXl,
337
- fontWeight: bpkTokens.fontWeightBook
268
+ fontSize: fontSizeXl,
269
+ lineHeight: lineHeightXl,
270
+ fontWeight: fontWeightBook
338
271
  }
339
272
  },
340
273
  'heading-1': {
341
274
  value: {
342
- fontSize: bpkTokens.fontSizeXxxl,
343
- lineHeight: bpkTokens.lineHeightXxxl,
344
- fontWeight: bpkTokens.fontWeightBold
275
+ fontSize: fontSizeXxxl,
276
+ lineHeight: lineHeightXxxl,
277
+ fontWeight: fontWeightBold
345
278
  }
346
279
  },
347
280
  'heading-2': {
348
281
  value: {
349
- fontSize: bpkTokens.fontSizeXxl,
350
- lineHeight: bpkTokens.lineHeightXxl,
351
- fontWeight: bpkTokens.fontWeightBold
282
+ fontSize: fontSizeXxl,
283
+ lineHeight: lineHeightXxl,
284
+ fontWeight: fontWeightBold
352
285
  }
353
286
  },
354
287
  'heading-3': {
355
288
  value: {
356
- fontSize: bpkTokens.fontSizeXl,
357
- lineHeight: bpkTokens.lineHeightXlTight,
358
- fontWeight: bpkTokens.fontWeightBold
289
+ fontSize: fontSizeXl,
290
+ lineHeight: lineHeightXlTight,
291
+ fontWeight: fontWeightBold
359
292
  }
360
293
  },
361
294
  'heading-4': {
362
295
  value: {
363
- fontSize: bpkTokens.fontSizeLg,
364
- lineHeight: bpkTokens.lineHeightLgTight,
365
- fontWeight: bpkTokens.fontWeightBold
296
+ fontSize: fontSizeLg,
297
+ lineHeight: lineHeightLgTight,
298
+ fontWeight: fontWeightBold
366
299
  }
367
300
  },
368
301
  'heading-5': {
369
302
  value: {
370
- fontSize: bpkTokens.fontSizeBase,
371
- lineHeight: bpkTokens.lineHeightBaseTight,
372
- fontWeight: bpkTokens.fontWeightBold
303
+ fontSize: fontSizeBase,
304
+ lineHeight: lineHeightBaseTight,
305
+ fontWeight: fontWeightBold
373
306
  }
374
307
  },
375
308
  'hero-1': {
376
309
  value: {
377
- fontSize: bpkTokens.fontSize8Xl,
378
- lineHeight: bpkTokens.lineHeight8Xl,
379
- fontWeight: bpkTokens.fontWeightBlack,
380
- letterSpacing: bpkTokens.letterSpacingHero
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: bpkTokens.fontSize7Xl,
386
- lineHeight: bpkTokens.lineHeight7Xl,
387
- fontWeight: bpkTokens.fontWeightBlack,
388
- letterSpacing: bpkTokens.letterSpacingHero
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: bpkTokens.fontSize6Xl,
394
- lineHeight: bpkTokens.lineHeight6Xl,
395
- fontWeight: bpkTokens.fontWeightBlack,
396
- letterSpacing: bpkTokens.letterSpacingHero
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: bpkTokens.fontSizeXxxxxl,
402
- lineHeight: bpkTokens.lineHeightXxxxxl,
403
- fontWeight: bpkTokens.fontWeightBlack,
404
- letterSpacing: bpkTokens.letterSpacingHero
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: bpkTokens.fontSizeXxxxl,
410
- lineHeight: bpkTokens.lineHeightXxxl,
411
- fontWeight: bpkTokens.fontWeightBlack,
412
- letterSpacing: bpkTokens.letterSpacingHero
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: bpkTokens.fontSizeXxxl,
418
- lineHeight: bpkTokens.lineHeightXxl,
419
- fontWeight: bpkTokens.fontWeightBlack,
420
- letterSpacing: bpkTokens.letterSpacingHero
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, ${bpkTokens.fontFamilyLarken})`,
426
- fontSize: bpkTokens.fontSizeXxxxl,
427
- lineHeight: bpkTokens.lineHeightXxxxl,
428
- fontWeight: bpkTokens.fontWeightLight
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, ${bpkTokens.fontFamilyLarken})`,
434
- fontSize: bpkTokens.fontSizeXxl,
435
- lineHeight: bpkTokens.lineHeightXxl,
436
- fontWeight: bpkTokens.fontWeightLight
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, ${bpkTokens.fontFamilyLarken})`,
442
- fontSize: bpkTokens.fontSizeLg,
443
- lineHeight: bpkTokens.lineHeightLg,
444
- fontWeight: bpkTokens.fontWeightBook
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 "./theme";
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, FlexProps, GridProps, GridItemProps, StackProps } from '@chakra-ui/react';
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 = ({
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { Portal } from '@ark-ui/react';
19
+ import { Portal } from '@ark-ui/react/portal';
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const BpkModalV3Portal = ({
22
22
  children
@@ -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 { SegmentGroup, useLocaleContext } from '@ark-ui/react';
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";