@skyscanner/backpack-web 34.1.0 → 34.2.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-spinner/src/BpkExtraLargeSpinner.d.ts +3 -3
- package/bpk-component-spinner/src/BpkLargeSpinner.d.ts +3 -3
- package/bpk-component-spinner/src/BpkSpinner.d.ts +3 -3
- package/bpk-component-spinner/src/spinnerTypes.d.ts +6 -5
- package/bpk-component-spinner/src/spinnerTypes.js +5 -2
- package/bpk-component-text/src/BpkText.d.ts +3 -0
- package/bpk-component-text/src/BpkText.js +4 -1
- package/bpk-component-text/src/BpkText.module.css +1 -1
- package/bpk-mixins/_typography.scss +51 -0
- package/bpk-stylesheets/larken.css +18 -0
- package/bpk-stylesheets/larken.js +19 -0
- package/bpk-stylesheets/larken.scss +37 -0
- package/package.json +2 -2
- package/unstable__bpk-mixins/_typography.scss +51 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import type { SpinnerTypes } from './spinnerTypes';
|
|
4
4
|
type Props = {
|
|
5
|
-
type:
|
|
5
|
+
type: SpinnerTypes;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
8
|
declare const BpkExtraLargeSpinner: {
|
|
@@ -12,7 +12,7 @@ declare const BpkExtraLargeSpinner: {
|
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
};
|
|
14
14
|
defaultProps: {
|
|
15
|
-
type:
|
|
15
|
+
type: "dark";
|
|
16
16
|
className: null;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import type { SpinnerTypes } from './spinnerTypes';
|
|
4
4
|
type Props = {
|
|
5
|
-
type:
|
|
5
|
+
type: SpinnerTypes;
|
|
6
6
|
className?: string;
|
|
7
7
|
alignToButton: boolean;
|
|
8
8
|
};
|
|
@@ -14,7 +14,7 @@ declare const BpkLargeSpinner: {
|
|
|
14
14
|
alignToButton: PropTypes.Requireable<boolean>;
|
|
15
15
|
};
|
|
16
16
|
defaultProps: {
|
|
17
|
-
type:
|
|
17
|
+
type: "dark";
|
|
18
18
|
className: null;
|
|
19
19
|
alignToButton: boolean;
|
|
20
20
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
3
|
+
import type { SpinnerTypes } from './spinnerTypes';
|
|
4
4
|
type Props = {
|
|
5
|
-
type:
|
|
5
|
+
type: SpinnerTypes;
|
|
6
6
|
className?: string;
|
|
7
7
|
alignToButton: boolean;
|
|
8
8
|
};
|
|
@@ -14,7 +14,7 @@ declare const BpkSpinner: {
|
|
|
14
14
|
alignToButton: PropTypes.Requireable<boolean>;
|
|
15
15
|
};
|
|
16
16
|
defaultProps: {
|
|
17
|
-
type:
|
|
17
|
+
type: "dark";
|
|
18
18
|
className: null;
|
|
19
19
|
alignToButton: boolean;
|
|
20
20
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
primary:
|
|
3
|
-
light:
|
|
4
|
-
dark:
|
|
1
|
+
declare const SPINNER_TYPES: {
|
|
2
|
+
readonly primary: "primary";
|
|
3
|
+
readonly light: "light";
|
|
4
|
+
readonly dark: "dark";
|
|
5
5
|
};
|
|
6
|
-
export default
|
|
6
|
+
export default SPINNER_TYPES;
|
|
7
|
+
export type SpinnerTypes = (typeof SPINNER_TYPES)[keyof typeof SPINNER_TYPES];
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
|
-
*/
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
const SPINNER_TYPES = {
|
|
18
20
|
primary: 'primary',
|
|
19
21
|
light: 'light',
|
|
20
22
|
dark: 'dark'
|
|
21
|
-
};
|
|
23
|
+
};
|
|
24
|
+
export default SPINNER_TYPES;
|
|
@@ -27,6 +27,9 @@ export declare const TEXT_STYLES: {
|
|
|
27
27
|
readonly hero3: "hero-3";
|
|
28
28
|
readonly hero4: "hero-4";
|
|
29
29
|
readonly hero5: "hero-5";
|
|
30
|
+
readonly editorial1: "editorial-1";
|
|
31
|
+
readonly editorial2: "editorial-2";
|
|
32
|
+
readonly editorial3: "editorial-3";
|
|
30
33
|
};
|
|
31
34
|
export type TextStyle = (typeof TEXT_STYLES)[keyof typeof TEXT_STYLES];
|
|
32
35
|
export type Tag = 'span' | 'p' | 'text' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -47,7 +47,10 @@ export const TEXT_STYLES = {
|
|
|
47
47
|
hero2: 'hero-2',
|
|
48
48
|
hero3: 'hero-3',
|
|
49
49
|
hero4: 'hero-4',
|
|
50
|
-
hero5: 'hero-5'
|
|
50
|
+
hero5: 'hero-5',
|
|
51
|
+
editorial1: 'editorial-1',
|
|
52
|
+
editorial2: 'editorial-2',
|
|
53
|
+
editorial3: 'editorial-3'
|
|
51
54
|
};
|
|
52
55
|
const BpkText = ({
|
|
53
56
|
children,
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
.bpk-text{margin:0}.bpk-text--xs{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--sm{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--base{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--lg{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--xl{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--xxl{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--xxxl{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--xxxxl{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--xxxxxl{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--caption{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--footnote{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--label-1{font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-text--label-2{font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-text--label-3{font-size:.75rem;line-height:1rem;font-weight:700}.bpk-text--body-default{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--body-longform{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--subheading{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--heading-1{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--heading-2{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--heading-3{font-size:1.5rem;line-height:1.75rem;font-weight:700}.bpk-text--heading-4{font-size:1.25rem;line-height:1.5rem;font-weight:700}.bpk-text--heading-5{font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-text--hero-1{font-size:7.5rem;line-height:7.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-2{font-size:6rem;line-height:6rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-3{font-size:4.75rem;line-height:5.25rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-4{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-5{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}
|
|
18
|
+
.bpk-text{margin:0}.bpk-text--xs{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--sm{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--base{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--lg{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--xl{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--xxl{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--xxxl{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--xxxxl{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--xxxxxl{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--caption{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--footnote{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--label-1{font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-text--label-2{font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-text--label-3{font-size:.75rem;line-height:1rem;font-weight:700}.bpk-text--body-default{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--body-longform{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--subheading{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--heading-1{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--heading-2{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--heading-3{font-size:1.5rem;line-height:1.75rem;font-weight:700}.bpk-text--heading-4{font-size:1.25rem;line-height:1.5rem;font-weight:700}.bpk-text--heading-5{font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-text--hero-1{font-size:7.5rem;line-height:7.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-2{font-size:6rem;line-height:6rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-3{font-size:4.75rem;line-height:5.25rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-4{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-5{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--editorial-1{font-family:"Larken","Noto Sans","Noto Sans JP",sans-serif;font-size:3rem;line-height:3.5rem;font-weight:300}.bpk-text--editorial-2{font-family:"Larken","Noto Sans","Noto Sans JP",sans-serif;font-size:2rem;line-height:2.5rem;font-weight:300}.bpk-text--editorial-3{font-family:"Larken","Noto Sans","Noto Sans JP",sans-serif;font-size:1.25rem;line-height:1.75rem;font-weight:400}
|
|
@@ -498,6 +498,57 @@
|
|
|
498
498
|
);
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
/// Editorial 1 text style
|
|
502
|
+
///
|
|
503
|
+
/// @example scss
|
|
504
|
+
/// .selector {
|
|
505
|
+
/// @include bpk-editorial-1;
|
|
506
|
+
/// }
|
|
507
|
+
|
|
508
|
+
@mixin bpk-editorial-1 {
|
|
509
|
+
font-family: $bpk-font-family-larken;
|
|
510
|
+
|
|
511
|
+
@include _bpk-text-factory(
|
|
512
|
+
$bpk-font-size-xxxxl,
|
|
513
|
+
$bpk-line-height-xxxxl,
|
|
514
|
+
$bpk-font-weight-light
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/// Editorial 2 text style
|
|
519
|
+
///
|
|
520
|
+
/// @example scss
|
|
521
|
+
/// .selector {
|
|
522
|
+
/// @include bpk-editorial-2;
|
|
523
|
+
/// }
|
|
524
|
+
|
|
525
|
+
@mixin bpk-editorial-2 {
|
|
526
|
+
font-family: $bpk-font-family-larken;
|
|
527
|
+
|
|
528
|
+
@include _bpk-text-factory(
|
|
529
|
+
$bpk-font-size-xxl,
|
|
530
|
+
$bpk-line-height-xxl,
|
|
531
|
+
$bpk-font-weight-light
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/// Editorial 3 text style
|
|
536
|
+
///
|
|
537
|
+
/// @example scss
|
|
538
|
+
/// .selector {
|
|
539
|
+
/// @include bpk-editorial-3;
|
|
540
|
+
/// }
|
|
541
|
+
|
|
542
|
+
@mixin bpk-editorial-3 {
|
|
543
|
+
font-family: $bpk-font-family-larken;
|
|
544
|
+
|
|
545
|
+
@include _bpk-text-factory(
|
|
546
|
+
$bpk-font-size-lg,
|
|
547
|
+
$bpk-line-height-lg,
|
|
548
|
+
$bpk-font-weight-book
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
|
|
501
552
|
/// Hero 1 text style
|
|
502
553
|
///
|
|
503
554
|
/// @example scss
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
@font-face{font-family:Larken;font-style:normal;font-weight:300;src:url("https://js.skyscnr.com/sttc/bpk-fonts/Larken-Light-8371ea16.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/Larken-Light-39e53c9a.woff") format("woff")}@font-face{font-family:Larken;font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/Larken-Regular-3d9dfe29.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/Larken-Regular-626ee28c.woff") format("woff")}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import './larken.scss';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Backpack - Skyscanner's Design System
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2016 Skyscanner Ltd
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
$base-url: 'https://js.skyscnr.com/sttc/bpk-fonts';
|
|
20
|
+
|
|
21
|
+
@font-face {
|
|
22
|
+
font-family: Larken;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-weight: 300;
|
|
25
|
+
src:
|
|
26
|
+
url('#{$base-url}/Larken-Light-8371ea16.woff2') format('woff2'),
|
|
27
|
+
url('#{$base-url}/Larken-Light-39e53c9a.woff') format('woff');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@font-face {
|
|
31
|
+
font-family: Larken;
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 400;
|
|
34
|
+
src:
|
|
35
|
+
url('#{$base-url}/Larken-Regular-3d9dfe29.woff2') format('woff2'),
|
|
36
|
+
url('#{$base-url}/Larken-Regular-626ee28c.woff') format('woff');
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "34.
|
|
3
|
+
"version": "34.2.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@popperjs/core": "^2.11.8",
|
|
27
27
|
"@radix-ui/react-slider": "^1.1.2",
|
|
28
28
|
"@react-google-maps/api": "^2.12.0",
|
|
29
|
-
"@skyscanner/bpk-foundations-web": "^17.
|
|
29
|
+
"@skyscanner/bpk-foundations-web": "^17.13.0",
|
|
30
30
|
"@skyscanner/bpk-svgs": "^19.3.0",
|
|
31
31
|
"a11y-focus-scope": "^1.1.3",
|
|
32
32
|
"a11y-focus-store": "^1.0.0",
|
|
@@ -498,6 +498,57 @@
|
|
|
498
498
|
);
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
+
/// Editorial 1 text style
|
|
502
|
+
///
|
|
503
|
+
/// @example scss
|
|
504
|
+
/// .selector {
|
|
505
|
+
/// @include bpk-editorial-1;
|
|
506
|
+
/// }
|
|
507
|
+
|
|
508
|
+
@mixin bpk-editorial-1 {
|
|
509
|
+
font-family: tokens.$bpk-font-family-larken;
|
|
510
|
+
|
|
511
|
+
@include _bpk-text-factory(
|
|
512
|
+
tokens.$bpk-font-size-xxxxl,
|
|
513
|
+
tokens.$bpk-line-height-xxxxl,
|
|
514
|
+
tokens.$bpk-font-weight-light
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/// Editorial 2 text style
|
|
519
|
+
///
|
|
520
|
+
/// @example scss
|
|
521
|
+
/// .selector {
|
|
522
|
+
/// @include bpk-editorial-2;
|
|
523
|
+
/// }
|
|
524
|
+
|
|
525
|
+
@mixin bpk-editorial-2 {
|
|
526
|
+
font-family: tokens.$bpk-font-family-larken;
|
|
527
|
+
|
|
528
|
+
@include _bpk-text-factory(
|
|
529
|
+
tokens.$bpk-font-size-xxl,
|
|
530
|
+
tokens.$bpk-line-height-xxl,
|
|
531
|
+
tokens.$bpk-font-weight-light
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/// Editorial 3 text style
|
|
536
|
+
///
|
|
537
|
+
/// @example scss
|
|
538
|
+
/// .selector {
|
|
539
|
+
/// @include bpk-editorial-3;
|
|
540
|
+
/// }
|
|
541
|
+
|
|
542
|
+
@mixin bpk-editorial-3 {
|
|
543
|
+
font-family: tokens.$bpk-font-family-larken;
|
|
544
|
+
|
|
545
|
+
@include _bpk-text-factory(
|
|
546
|
+
tokens.$bpk-font-size-lg,
|
|
547
|
+
tokens.$bpk-line-height-lg,
|
|
548
|
+
tokens.$bpk-font-weight-book
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
|
|
501
552
|
/// Hero 1 text style
|
|
502
553
|
///
|
|
503
554
|
/// @example scss
|