@skyscanner/backpack-web 42.2.0 → 42.4.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.
Files changed (51) hide show
  1. package/bpk-component-chat-bubble/index.d.ts +4 -0
  2. package/bpk-component-chat-bubble/index.js +21 -0
  3. package/bpk-component-chat-bubble/src/BpkChatBubble.d.ts +3 -0
  4. package/bpk-component-chat-bubble/src/BpkChatBubble.js +107 -0
  5. package/bpk-component-chat-bubble/src/BpkChatBubble.module.css +18 -0
  6. package/bpk-component-chat-bubble/src/common-types.d.ts +55 -0
  7. package/bpk-component-chat-bubble/src/common-types.js +29 -0
  8. package/bpk-component-floating-notification/index.d.ts +2 -1
  9. package/bpk-component-floating-notification/index.js +2 -1
  10. package/bpk-component-floating-notification/src/BpkFloatingNotification.d.ts +5 -0
  11. package/bpk-component-floating-notification/src/BpkFloatingNotification.js +8 -2
  12. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +1 -1
  13. package/bpk-component-info-banner/src/BpkInfoBanner.module.css +1 -1
  14. package/bpk-component-info-banner/src/BpkInfoBannerInner.js +8 -3
  15. package/bpk-component-info-banner/src/common-types.d.ts +1 -0
  16. package/bpk-component-info-banner/src/common-types.js +2 -1
  17. package/bpk-component-layout/src/BpkBox.d.ts +1 -1
  18. package/bpk-component-layout/src/BpkBox.js +6 -3
  19. package/bpk-component-layout/src/BpkFlex.d.ts +1 -1
  20. package/bpk-component-layout/src/BpkFlex.js +8 -3
  21. package/bpk-component-layout/src/BpkGrid.d.ts +1 -1
  22. package/bpk-component-layout/src/BpkGrid.js +8 -3
  23. package/bpk-component-layout/src/BpkGridItem.d.ts +1 -1
  24. package/bpk-component-layout/src/BpkGridItem.js +14 -5
  25. package/bpk-component-layout/src/BpkStack.d.ts +3 -3
  26. package/bpk-component-layout/src/BpkStack.js +16 -9
  27. package/bpk-component-layout/src/commonProps.d.ts +10 -3
  28. package/bpk-component-layout/src/theme.js +239 -3
  29. package/bpk-component-layout/src/tokenUtils.d.ts +1 -1
  30. package/bpk-component-layout/src/tokenUtils.js +9 -3
  31. package/bpk-component-layout/src/types.d.ts +9 -8
  32. package/bpk-component-modal/index.d.ts +2 -1
  33. package/bpk-component-modal/index.js +2 -1
  34. package/bpk-component-modal/src/BpkModalV3/{BpkModalV3Body.module.css → BpkModalV3Body/BpkModalV3Body.module.css} +1 -1
  35. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content/BpkModalV3Content.module.css +18 -0
  36. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.d.ts +2 -2
  37. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/BpkModalV3Root.js +39 -16
  38. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/useBodyLock.d.ts +9 -0
  39. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Root/useBodyLock.js +69 -0
  40. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Scrim/BpkModalV3Scrim.js +1 -1
  41. package/bpk-component-modal/src/BpkModalV3/{BpkModalV3Scrim.module.css → BpkModalV3Scrim/BpkModalV3Scrim.module.css} +1 -1
  42. package/bpk-component-modal/src/BpkModalV3/common-types.d.ts +7 -1
  43. package/bpk-component-modal/src/BpkModalV3/common-types.js +24 -1
  44. package/package.json +1 -1
  45. package/bpk-component-modal/src/BpkModalV3/BpkModalV3Content.module.css +0 -18
  46. /package/bpk-component-chatbot-input/src/{InputField.module.css → InputField/InputField.module.css} +0 -0
  47. /package/bpk-component-chatbot-input/src/{TextAreaField.module.css → TextAreaField/TextAreaField.module.css} +0 -0
  48. /package/bpk-component-modal/src/BpkModalV3/{BpkModalV3CloseTrigger.module.css → BpkModalV3CloseTrigger/BpkModalV3CloseTrigger.module.css} +0 -0
  49. /package/bpk-component-modal/src/BpkModalV3/{BpkModalV3Header.module.css → BpkModalV3Header/BpkModalV3Header.module.css} +0 -0
  50. /package/bpk-component-modal/src/BpkModalV3/{BpkModalV3HeroImage.module.css → BpkModalV3HeroImage/BpkModalV3HeroImage.module.css} +0 -0
  51. /package/bpk-component-modal/src/BpkModalV3/{BpkModalV3Title.module.css → BpkModalV3Title/BpkModalV3Title.module.css} +0 -0
@@ -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-modal-v3__scrim{position:fixed;z-index:1100;transition:opacity 200ms ease-in-out;background-color:rgba(0,0,0,.7);opacity:0;inset:0;pointer-events:none}.bpk-modal-v3__scrim[data-state=open]{opacity:1;pointer-events:auto}.bpk-modal-v3__scrim[data-state=closed]{opacity:0}.bpk-modal-v3__scrim--full{display:none}@media(prefers-reduced-motion: reduce){.bpk-modal-v3__scrim{transition:none}}
18
+ .bpk-modal-v3__scrim{position:fixed;z-index:1100;transition:opacity 200ms ease-in-out;background-color:rgba(0,0,0,.7);opacity:0;inset:0;pointer-events:none}.bpk-modal-v3__scrim[data-state=open]{opacity:1;pointer-events:auto}.bpk-modal-v3__scrim[data-state=closed]{opacity:0}.bpk-modal-v3__scrim--full{display:none}.bpk-modal-v3__scrim--chatbot{transition:none}.bpk-modal-v3__scrim--chatbot[data-state=open]{animation:bpk-scrim-fade-in 200ms ease-in-out forwards}.bpk-modal-v3__scrim--chatbot[data-state=closed]{animation:bpk-scrim-fade-out 400ms ease-in-out both}@keyframes bpk-scrim-fade-in{from{opacity:0}to{opacity:1}}@keyframes bpk-scrim-fade-out{from{opacity:1}to{opacity:0}}@media(prefers-reduced-motion: reduce){.bpk-modal-v3__scrim{transition:none;animation:none}}
@@ -1 +1,7 @@
1
- export type BpkModalV3Type = 'default' | 'full' | 'sheet';
1
+ export declare const MODAL_V3_TYPES: {
2
+ readonly default: "default";
3
+ readonly full: "full";
4
+ readonly sheet: "sheet";
5
+ readonly chatbot: "chatbot";
6
+ };
7
+ export type BpkModalV3Type = (typeof MODAL_V3_TYPES)[keyof typeof MODAL_V3_TYPES];
@@ -1 +1,24 @@
1
- export {};
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
+ export const MODAL_V3_TYPES = {
20
+ default: 'default',
21
+ full: 'full',
22
+ sheet: 'sheet',
23
+ chatbot: 'chatbot'
24
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "42.2.0",
3
+ "version": "42.4.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,18 +0,0 @@
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-modal-v3__positioner{position:fixed;display:flex;z-index:1100;justify-content:center;align-items:center;inset:0;pointer-events:none}.bpk-modal-v3__positioner--sheet{align-items:flex-end}.bpk-modal-v3__positioner--full{align-items:stretch}.bpk-modal-v3__content{position:relative;display:flex;flex-direction:column;background-color:#fff;overflow:clip;pointer-events:none}.bpk-modal-v3__content[data-state=open]{pointer-events:auto}.bpk-modal-v3__content--default{width:100%;max-width:50rem;max-height:90vh;transform:scale(0.9);transition:transform 200ms ease-in-out;border-radius:1.5rem;opacity:0;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}@media(max-width: 32rem){.bpk-modal-v3__content--default{max-width:none;height:100%;max-height:none;transform:translateY(100%);border-radius:0;box-shadow:none}.bpk-modal-v3__content--default[data-state=open]{transform:translateY(0)}.bpk-modal-v3__content--default[data-state=closed]{transform:translateY(100%)}}.bpk-modal-v3__content--default[data-state=open]{transform:scale(1);opacity:1}.bpk-modal-v3__content--default[data-state=closed]{transform:scale(0.9);opacity:0}.bpk-modal-v3__content--sheet{width:100%;height:fit-content;max-height:100dvh;transform:translateY(100%);transition:opacity 400ms cubic-bezier(0.5, 0, 0, 1),transform 400ms cubic-bezier(0.5, 0, 0, 1);border-radius:1.5rem 1.5rem 0 0;opacity:0;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}.bpk-modal-v3__content--sheet[data-state=open]{transform:translateY(0);opacity:1}.bpk-modal-v3__content--sheet[data-state=closed]{transform:translateY(100%);opacity:0}.bpk-modal-v3__content--full{width:100%;height:100%;transform:translateY(100%);transition:opacity 400ms cubic-bezier(0.5, 0, 0, 1),transform 400ms cubic-bezier(0.5, 0, 0, 1);border-radius:0;opacity:0}.bpk-modal-v3__content--full[data-state=open]{transform:translateY(0);opacity:1}.bpk-modal-v3__content--full[data-state=closed]{transform:translateY(100%);opacity:0}@media(prefers-reduced-motion: reduce){.bpk-modal-v3__content--default{transform:scale(1);transition:none;opacity:1}}@media(prefers-reduced-motion: reduce)and (max-width: 32rem){.bpk-modal-v3__content--default{transform:translateY(0)}}@media(prefers-reduced-motion: reduce){.bpk-modal-v3__content--sheet,.bpk-modal-v3__content--full{transform:translateY(0);transition:none;opacity:1}}