@skyscanner/backpack-web 34.9.0 → 34.10.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.
@@ -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-bottom-sheet{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-bottom-sheet{position:fixed;bottom:0;height:fit-content;max-height:90%;margin-bottom:0;border-radius:1.5rem 1.5rem 0 0;overflow-x:hidden}}.bpk-bottom-sheet::-webkit-scrollbar{display:none}.bpk-bottom-sheet--appear{animation-duration:200ms;animation-name:slide-up;animation-timing-function:ease-in-out}@media(min-width: 32.0625rem){.bpk-bottom-sheet--appear{transform:scale(0.9);opacity:0;animation:none}}@media(min-width: 32.0625rem){.bpk-bottom-sheet--appear-active{transform:scale(1);opacity:1}}.bpk-bottom-sheet--exit{animation-direction:reverse;animation-duration:200ms;animation-name:slide-up;animation-timing-function:ease-in-out}@media(min-width: 32.0625rem){.bpk-bottom-sheet--exit{animation:none}}.bpk-bottom-sheet--content{padding:1rem;flex:1;overflow-y:auto}@media(min-width: 32.0625rem){.bpk-bottom-sheet--wide{max-width:64rem}}.bpk-bottom-sheet--header{position:sticky;top:0;z-index:899;padding:.25rem 0;background-color:#fff;background-color:var(--bpk-navigation-bar-background-color, rgb(255, 255, 255))}@keyframes slide-up{0%{transform:translateY(100%)}100%{transform:translateY(0%)}}
18
+ .bpk-bottom-sheet{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none;-webkit-tap-highlight-color:rgba(0,0,0,0);box-shadow:0px 12px 50px 0px rgba(37,32,31,.25);border-radius:.5rem}@media(max-width: 32rem){.bpk-bottom-sheet{position:fixed;bottom:0;height:fit-content;max-height:90%;margin-bottom:0;border-radius:1.5rem 1.5rem 0 0;overflow-x:hidden}}.bpk-bottom-sheet::-webkit-scrollbar{display:none}.bpk-bottom-sheet--appear{animation-duration:200ms;animation-name:slide-up;animation-timing-function:ease-in-out}@media(min-width: 32.0625rem){.bpk-bottom-sheet--appear{transform:scale(0.9);opacity:0;animation:none}}@media(min-width: 32.0625rem){.bpk-bottom-sheet--appear-active{transform:scale(1);opacity:1}}.bpk-bottom-sheet--exit{animation-fill-mode:forwards;animation-duration:200ms;animation-name:slide-down;animation-timing-function:ease-in-out}@media(min-width: 32.0625rem){.bpk-bottom-sheet--exit{animation:none}}.bpk-bottom-sheet--content{padding:1rem;flex:1;overflow-y:auto}@media(min-width: 32.0625rem){.bpk-bottom-sheet--wide{max-width:64rem}}.bpk-bottom-sheet--header{position:sticky;top:0;z-index:899;padding:.25rem 0;background-color:#fff;background-color:var(--bpk-navigation-bar-background-color, rgb(255, 255, 255))}@keyframes slide-up{0%{transform:translateY(100%)}100%{transform:translateY(0%)}}@keyframes slide-down{0%{transform:translateY(0%)}100%{transform:translateY(100%)}}
@@ -0,0 +1,3 @@
1
+ import BpkJourneyArrow, { type Props as BpkJourneyArrowProps } from './src/BpkJourneyArrow';
2
+ export type { BpkJourneyArrowProps };
3
+ export default BpkJourneyArrow;
@@ -0,0 +1,20 @@
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 BpkJourneyArrow from "./src/BpkJourneyArrow";
20
+ export default BpkJourneyArrow;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export type Props = {
3
+ /** the number of dot stops to display */
4
+ stops?: number;
5
+ [rest: string]: any;
6
+ };
7
+ declare const BpkJourneyArrow: ({ stops, ...rest }: Props) => JSX.Element;
8
+ export default BpkJourneyArrow;
@@ -0,0 +1,40 @@
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 { cssModules } from "../../bpk-react-utils";
20
+ import STYLES from "./BpkJourneyArrow.module.css";
21
+ import { jsx as _jsx } from "react/jsx-runtime";
22
+ const getClassName = cssModules(STYLES);
23
+ const BpkJourneyArrow = ({
24
+ stops = 0,
25
+ ...rest
26
+ }) => {
27
+ // Ensure the number of displayed stops is between 0 and 3
28
+ const dotCount = Math.min(3, Math.max(0, stops));
29
+ return /*#__PURE__*/_jsx("div", {
30
+ className: getClassName("bpk-journey-arrow"),
31
+ ...rest,
32
+ children: Array.from({
33
+ length: dotCount
34
+ }).map((_, i) => /*#__PURE__*/_jsx("div", {
35
+ className: getClassName("bpk-journey-arrow__stop")
36
+ }, i) // eslint-disable-line react/no-array-index-key
37
+ )
38
+ });
39
+ };
40
+ export default BpkJourneyArrow;
@@ -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
+ .bpk-journey-arrow{display:flex;width:100%;min-width:2.5rem;height:.5rem;margin:0 .5rem;justify-content:center;border-width:0 .3125rem 0 .125rem;border-style:solid;border-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="8" fill="none" viewBox="0 0 16 8"><path fill="%23C1C7CF" d="M15.69 4.35a.5.5 0 0 0 0-.7L12.51.46a.5.5 0 1 0-.7.71L14.62 4 11.8 6.83a.5.5 0 0 0 .7.7l3.2-3.17m-.7.14v-1H.5a.5.5 0 0 0 0 1Z"/></svg>') 0 5 0 2 fill/1/0 stretch}html[dir=rtl] .bpk-journey-arrow{transform:scaleX(-1)}.bpk-journey-arrow__stop{width:.5rem;height:.5rem;border:.125rem solid #fff;border-radius:.25rem;background-color:#e70866}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "34.9.0",
3
+ "version": "34.10.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",