@skyscanner/backpack-web 38.14.0 → 38.16.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-content-cards/index.d.ts +2 -0
- package/bpk-component-content-cards/src/BpkContentCard.d.ts +15 -0
- package/bpk-component-content-cards/src/BpkContentCard.js +0 -2
- package/bpk-component-content-cards/src/BpkContentCards.d.ts +14 -0
- package/bpk-component-star-rating/src/BpkStar.js +3 -3
- package/bpk-component-textarea/index.d.ts +4 -0
- package/bpk-component-textarea/index.js +3 -1
- package/bpk-component-textarea/src/BpkTextarea.d.ts +11 -0
- package/bpk-component-textarea/src/BpkTextarea.js +9 -20
- package/bpk-component-textarea/src/themeAttributes.d.ts +2 -0
- package/bpk-component-textarea/src/themeAttributes.js +4 -1
- package/bpk-stylesheets/font.css +1 -1
- package/bpk-stylesheets/font.scss +0 -90
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type CardLayout = 'HORIZONTAL' | 'VERTICAL';
|
|
2
|
+
type Props = {
|
|
3
|
+
card: {
|
|
4
|
+
image: {
|
|
5
|
+
url: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
};
|
|
8
|
+
headline: string;
|
|
9
|
+
description: string;
|
|
10
|
+
href: string;
|
|
11
|
+
};
|
|
12
|
+
layout: CardLayout;
|
|
13
|
+
};
|
|
14
|
+
declare const BpkContentCard: ({ card, layout }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default BpkContentCard;
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
20
19
|
import BpkText from "../../bpk-component-text";
|
|
21
|
-
// @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
|
|
22
20
|
import { cssModules } from "../../bpk-react-utils";
|
|
23
21
|
import STYLES from "./BpkContentCard.module.css";
|
|
24
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
heading: string;
|
|
3
|
+
cards: Array<{
|
|
4
|
+
image: {
|
|
5
|
+
url: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
};
|
|
8
|
+
headline: string;
|
|
9
|
+
description: string;
|
|
10
|
+
href: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
declare const BpkContentCards: ({ cards, heading }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export default BpkContentCards;
|
|
@@ -48,16 +48,16 @@ const BpkStar = ({
|
|
|
48
48
|
const halfIconClassNames = getClassName('bpk-star', 'bpk-star--half', 'bpk-star--filled');
|
|
49
49
|
let Icon = SmallIcon;
|
|
50
50
|
let OutlineIcon = OutlineSmallIcon;
|
|
51
|
-
let HalfIcon = HalfSmallIcon;
|
|
51
|
+
let HalfIcon = withRtlSupport(HalfSmallIcon);
|
|
52
52
|
if (large) {
|
|
53
53
|
Icon = LargeIcon;
|
|
54
54
|
OutlineIcon = OutlineLargeIcon;
|
|
55
|
-
HalfIcon = HalfLargeIcon;
|
|
55
|
+
HalfIcon = withRtlSupport(HalfLargeIcon);
|
|
56
56
|
}
|
|
57
57
|
if (extraLarge) {
|
|
58
58
|
Icon = ExtraLargeIcon;
|
|
59
59
|
OutlineIcon = OutlineExtraLargeIcon;
|
|
60
|
-
HalfIcon = HalfExtraLargeIcon;
|
|
60
|
+
HalfIcon = withRtlSupport(HalfExtraLargeIcon);
|
|
61
61
|
}
|
|
62
62
|
if (type === STAR_TYPES.HALF) {
|
|
63
63
|
return (
|
|
@@ -14,7 +14,9 @@
|
|
|
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
|
+
import BpkTextarea from "./src/BpkTextarea";
|
|
18
20
|
import themeAttributes from "./src/themeAttributes";
|
|
19
21
|
export default BpkTextarea;
|
|
20
22
|
export { themeAttributes };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
interface BpkTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
valid?: boolean;
|
|
8
|
+
large?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const BpkTextarea: FC<BpkTextareaProps>;
|
|
11
|
+
export default BpkTextarea;
|
|
@@ -14,36 +14,25 @@
|
|
|
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
|
+
|
|
18
19
|
import { cssModules } from "../../bpk-react-utils";
|
|
19
20
|
import STYLES from "./BpkTextarea.module.css";
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
22
|
const getClassName = cssModules(STYLES);
|
|
22
23
|
const BpkTextarea = ({
|
|
23
|
-
className
|
|
24
|
+
className,
|
|
24
25
|
large = false,
|
|
25
|
-
valid
|
|
26
|
+
valid,
|
|
26
27
|
...rest
|
|
27
28
|
}) => {
|
|
28
29
|
// Explicit check for false primitive value as undefined is
|
|
29
30
|
// treated as neither valid nor invalid
|
|
30
31
|
const isInvalid = valid === false;
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"aria-invalid": isInvalid,
|
|
37
|
-
...rest
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
BpkTextarea.propTypes = {
|
|
42
|
-
id: PropTypes.string.isRequired,
|
|
43
|
-
name: PropTypes.string.isRequired,
|
|
44
|
-
value: PropTypes.string.isRequired,
|
|
45
|
-
className: PropTypes.string,
|
|
46
|
-
valid: PropTypes.bool,
|
|
47
|
-
large: PropTypes.bool
|
|
32
|
+
return /*#__PURE__*/_jsx("textarea", {
|
|
33
|
+
className: getClassName('bpk-textarea', isInvalid && 'bpk-textarea--invalid', large && 'bpk-textarea--large', className),
|
|
34
|
+
"aria-invalid": isInvalid,
|
|
35
|
+
...rest
|
|
36
|
+
});
|
|
48
37
|
};
|
|
49
38
|
export default BpkTextarea;
|
|
@@ -14,4 +14,7 @@
|
|
|
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 themeAttributes = ['textareaInvalidBorderColor'];
|
|
20
|
+
export default themeAttributes;
|
package/bpk-stylesheets/font.css
CHANGED
|
@@ -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
|
-
@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-f9356ad6.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-46f9f429.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-ab1dbcbe.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-10532ac3.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-db5d0ac5.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-8eec3f3a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-c08dc28b.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-865e167a.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-d0ae478a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-81517f37.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-bbdb6b0c.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-226fe64c.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-8545937e.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-a099c9f7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-ec4cc5a7.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-01b5d138.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-4d6d36e3.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-dc9284dc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bb3c9434.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bba2eb55.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-314703cc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-c2149c91.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-a34cd594.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-7e516ee5.ttf") format("ttf")}
|
|
18
|
+
@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-f9356ad6.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-46f9f429.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-ab1dbcbe.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-10532ac3.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-db5d0ac5.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-8eec3f3a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-c08dc28b.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-865e167a.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-d0ae478a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-81517f37.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-bbdb6b0c.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-226fe64c.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-8545937e.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-a099c9f7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-ec4cc5a7.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-01b5d138.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-4d6d36e3.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-dc9284dc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bb3c9434.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bba2eb55.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-314703cc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-c2149c91.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-a34cd594.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-7e516ee5.ttf") format("ttf")}
|
|
@@ -105,93 +105,3 @@ $base-url: 'https://js.skyscnr.com/sttc/bpk-fonts';
|
|
|
105
105
|
url('#{$base-url}/SkyscannerRelative-BlackItalic-7e516ee5.ttf')
|
|
106
106
|
format('ttf');
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
@font-face {
|
|
110
|
-
font-family: 'Noto Sans Arabic';
|
|
111
|
-
font-style: normal;
|
|
112
|
-
font-weight: 800;
|
|
113
|
-
src:
|
|
114
|
-
url('#{$base-url}/NotoSansArabic-ExtraBold-da8cf050.woff2') format('woff2'),
|
|
115
|
-
url('#{$base-url}/NotoSansArabic-ExtraBold-4ac084a2.woff') format('woff'),
|
|
116
|
-
url('#{$base-url}/NotoSansArabic-ExtraBold-a965fbb5.ttf') format('ttf');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
@font-face {
|
|
120
|
-
font-family: 'Noto Sans Hebrew';
|
|
121
|
-
font-style: normal;
|
|
122
|
-
font-weight: 800;
|
|
123
|
-
src:
|
|
124
|
-
url('#{$base-url}/NotoSansHebrew-ExtraBold-e04df8b4.woff2') format('woff2'),
|
|
125
|
-
url('#{$base-url}/NotoSansHebrew-ExtraBold-3303fb69.woff') format('woff'),
|
|
126
|
-
url('#{$base-url}/NotoSansHebrew-ExtraBold-4cfb24e3.ttf') format('ttf');
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
@font-face {
|
|
130
|
-
font-family: 'Noto Serif';
|
|
131
|
-
font-style: normal;
|
|
132
|
-
font-weight: 800;
|
|
133
|
-
src:
|
|
134
|
-
url('#{$base-url}/NotoSans-ExtraBold-d8d5cc89.woff2') format('woff2'),
|
|
135
|
-
url('#{$base-url}/NotoSans-ExtraBold-177dbfc0.woff') format('woff'),
|
|
136
|
-
url('#{$base-url}/NotoSans-ExtraBold-cac84afc.ttf') format('ttf');
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@font-face {
|
|
140
|
-
font-family: 'Noto Serif Devanagari';
|
|
141
|
-
font-style: normal;
|
|
142
|
-
font-weight: 800;
|
|
143
|
-
src:
|
|
144
|
-
url('#{$base-url}/NotoSansDevanagari-Bold-19924491.woff2') format('woff2'),
|
|
145
|
-
url('#{$base-url}/NotoSansDevanagari-Bold-2598dc51.woff') format('woff'),
|
|
146
|
-
url('#{$base-url}/NotoSansDevanagari-Bold-bca34adc.ttf') format('ttf');
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@font-face {
|
|
150
|
-
font-family: 'Noto Serif Thai';
|
|
151
|
-
font-style: normal;
|
|
152
|
-
font-weight: 700;
|
|
153
|
-
src:
|
|
154
|
-
url('#{$base-url}/NotoSansThai-Bold-74e247cc.woff2') format('woff2'),
|
|
155
|
-
url('#{$base-url}/NotoSansThai-Bold-91433b5b.woff') format('woff'),
|
|
156
|
-
url('#{$base-url}/NotoSansThai-Bold-778d694c.ttf') format('ttf');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@font-face {
|
|
160
|
-
font-family: 'Noto Sans SC';
|
|
161
|
-
font-style: normal;
|
|
162
|
-
font-weight: 700;
|
|
163
|
-
src:
|
|
164
|
-
url('#{$base-url}/NotoSansSC-Bold-22c3e4e0.woff2') format('woff2'),
|
|
165
|
-
url('#{$base-url}/NotoSansSC-Bold-87ef5110.woff') format('woff'),
|
|
166
|
-
url('#{$base-url}/NotoSansSC-Bold-57f04989.ttf') format('ttf');
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
@font-face {
|
|
170
|
-
font-family: 'Noto Sans TC';
|
|
171
|
-
font-style: normal;
|
|
172
|
-
font-weight: 700;
|
|
173
|
-
src:
|
|
174
|
-
url('#{$base-url}/NotoSansTC-Bold-355d38e9.woff2') format('woff2'),
|
|
175
|
-
url('#{$base-url}/NotoSansTC-Bold-2abc3583.woff') format('woff'),
|
|
176
|
-
url('#{$base-url}/NotoSansTC-Bold-86244830.ttf') format('ttf');
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@font-face {
|
|
180
|
-
font-family: 'Noto Sans JP';
|
|
181
|
-
font-style: normal;
|
|
182
|
-
font-weight: 800;
|
|
183
|
-
src:
|
|
184
|
-
url('#{$base-url}/NotoSansJP-Bold-b656150c.woff2') format('woff2'),
|
|
185
|
-
url('#{$base-url}/NotoSansJP-Bold-6ddf472f.woff') format('woff'),
|
|
186
|
-
url('#{$base-url}/NotoSansJP-Bold-deeb2988.ttf') format('ttf');
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
@font-face {
|
|
190
|
-
font-family: 'Noto Sans KR';
|
|
191
|
-
font-style: normal;
|
|
192
|
-
font-weight: 800;
|
|
193
|
-
src:
|
|
194
|
-
url('#{$base-url}/NotoSansKR-Bold-5286cc6d.woff2') format('woff2'),
|
|
195
|
-
url('#{$base-url}/NotoSansKR-Bold-74c4cbc7.woff') format('woff'),
|
|
196
|
-
url('#{$base-url}/NotoSansKR-Bold-5651f33d.ttf') format('ttf');
|
|
197
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.16.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@radix-ui/react-compose-refs": "^1.1.1",
|
|
28
28
|
"@radix-ui/react-slider": "1.3.5",
|
|
29
29
|
"@react-google-maps/api": "^2.19.3",
|
|
30
|
-
"@skyscanner/bpk-foundations-web": "^22.
|
|
31
|
-
"@skyscanner/bpk-svgs": "^20.
|
|
30
|
+
"@skyscanner/bpk-foundations-web": "^22.3.0",
|
|
31
|
+
"@skyscanner/bpk-svgs": "^20.9.0",
|
|
32
32
|
"a11y-focus-scope": "^1.1.3",
|
|
33
33
|
"a11y-focus-store": "^1.0.0",
|
|
34
34
|
"d3-path": "^3.1.0",
|