@popsure/dirty-swan 0.30.5 → 0.30.7

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.
@@ -5,8 +5,8 @@ import { s as styleInject } from '../../../style-inject.es-1f59c1d0.js';
5
5
  import { u as useOnClose } from '../../../useOnClose-d818a54f.js';
6
6
  import { c as classnames } from '../../../index-e9e37a34.js';
7
7
 
8
- var css_248z = "@keyframes style-module_fade-in__1GZgs {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n}\n@keyframes style-module_fade-out__30Bns {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n }\n}\n@keyframes style-module_appear-in__3U2lu {\n 0% {\n transform: translateY(100%);\n }\n 80% {\n transform: translateY(-2%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@keyframes style-module_disappear-out__6pOVr {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(100%);\n }\n}\n.style-module_close__1GERU {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}\n\n.style-module_overlay__AlX2J, .style-module_overlay--close__3E9GY {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__1GZgs 0.3s both;\n}\n.style-module_overlay--close__3E9GY {\n animation-delay: 0.1s;\n animation: style-module_fade-out__30Bns 0.3s both;\n}\n\n.style-module_container__aOENo, .style-module_container--close__K506c {\n position: relative;\n background-color: white;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n width: 100%;\n animation-name: style-module_appear-in__3U2lu;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n top: 0;\n}\n.style-module_container--close__K506c {\n animation-name: style-module_disappear-out__6pOVr;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_header__10iiH {\n height: 60px;\n display: flex;\n align-items: center;\n padding: 0 16px;\n}";
9
- var styles = {"close":"style-module_close__1GERU","overlay":"style-module_overlay__AlX2J","overlay--close":"style-module_overlay--close__3E9GY","fade-in":"style-module_fade-in__1GZgs","fade-out":"style-module_fade-out__30Bns","container":"style-module_container__aOENo","container--close":"style-module_container--close__K506c","appear-in":"style-module_appear-in__3U2lu","disappear-out":"style-module_disappear-out__6pOVr","header":"style-module_header__10iiH"};
8
+ var css_248z = "@keyframes style-module_fade-in__1GZgs {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n}\n@keyframes style-module_fade-out__30Bns {\n from {\n background-color: rgba(0, 0, 0, 0.3);\n }\n to {\n background-color: rgba(0, 0, 0, 0);\n }\n}\n@keyframes style-module_appear-in__3U2lu {\n 0% {\n transform: translateY(100%);\n }\n 80% {\n transform: translateY(-2%);\n }\n 100% {\n transform: translateY(0);\n }\n}\n@keyframes style-module_disappear-out__6pOVr {\n 0% {\n transform: translateY(0);\n }\n 100% {\n transform: translateY(100%);\n }\n}\n.style-module_close__1GERU {\n border: none;\n background-color: transparent;\n cursor: pointer;\n}\n\n.style-module_overlay__AlX2J, .style-module_overlay--close__3E9GY {\n position: fixed;\n z-index: 100;\n overflow: auto;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n animation: style-module_fade-in__1GZgs 0.3s both;\n}\n.style-module_overlay--close__3E9GY {\n animation-delay: 0.1s;\n animation: style-module_fade-out__30Bns 0.3s both;\n}\n\n.style-module_container__aOENo, .style-module_container--close__K506c {\n position: relative;\n background-color: white;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n width: 100%;\n animation-name: style-module_appear-in__3U2lu;\n animation-duration: 0.4s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n top: 0;\n}\n.style-module_container--close__K506c {\n animation-name: style-module_disappear-out__6pOVr;\n animation-duration: 0.4s;\n animation-delay: 0s;\n animation-fill-mode: both;\n animation-timing-function: ease-out;\n}\n\n.style-module_header__10iiH {\n height: 60px;\n display: flex;\n align-items: center;\n padding: 0 16px;\n}\n\n@media (max-width: 34rem) {\n .style-module_content__mq_IJ {\n padding-bottom: 48px;\n }\n}";
9
+ var styles = {"close":"style-module_close__1GERU","overlay":"style-module_overlay__AlX2J","overlay--close":"style-module_overlay--close__3E9GY","fade-in":"style-module_fade-in__1GZgs","fade-out":"style-module_fade-out__30Bns","container":"style-module_container__aOENo","container--close":"style-module_container--close__K506c","appear-in":"style-module_appear-in__3U2lu","disappear-out":"style-module_disappear-out__6pOVr","header":"style-module_header__10iiH","content":"style-module_content__mq_IJ"};
10
10
  styleInject(css_248z);
11
11
 
12
12
  var imageClose = "data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M18%206L6%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3Cpath%20d%3D%22M6%206L18%2018%22%20stroke%3D%22%2326262E%22%20strokeWidth%3D%222%22%20strokeLinecap%3D%22round%22%20strokeLinejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E";
package/dist/esm/index.js CHANGED
@@ -36,7 +36,6 @@ import './index-21239ab0.js';
36
36
  import './index-6ced5532.js';
37
37
  import './useOnClose-d818a54f.js';
38
38
  import './index-171a0108.js';
39
- import 'react-dom';
40
39
  import './components/comparisonTable/components/Chevron.js';
41
40
  import './components/comparisonTable/components/Row/index.js';
42
41
  import './components/comparisonTable/components/TableArrows/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@popsure/dirty-swan",
3
- "version": "0.30.5",
3
+ "version": "0.30.7",
4
4
  "author": "Vincent Audoire <vincent@getpopsure.com>",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -35,7 +35,7 @@
35
35
  "react-day-picker": "^7.4.10",
36
36
  "react-dropzone": "^14.2.2",
37
37
  "react-markdown": "^8.0.3",
38
- "react-scroll-sync": "^0.9.0",
38
+ "react-scroll-sync": "^0.11.0",
39
39
  "remark-directive": "^2.0.1",
40
40
  "sass": "^1.35.1",
41
41
  "signature_pad": "^3.0.0-beta.3"
@@ -56,9 +56,10 @@ export const useComparisonTable = () => {
56
56
  return;
57
57
  }
58
58
 
59
+ const headerWidth = headerRef.current.getBoundingClientRect().width;
60
+
59
61
  const currentTabIndex = Math.round(
60
- headerRef.current.scrollLeft /
61
- headerRef.current.getBoundingClientRect().width
62
+ headerRef.current.scrollLeft / headerWidth
62
63
  );
63
64
 
64
65
  setSelectedTabIndex(currentTabIndex);
@@ -100,7 +100,7 @@ const ComparisonTable = <T extends { id: number }>(
100
100
  } as React.CSSProperties;
101
101
 
102
102
  return (
103
- <ScrollSync>
103
+ <ScrollSync onSync={scrollContainerCallbackRef}>
104
104
  <div style={cssVariablesStyle}>
105
105
  <div className={classNames(baseStyles.header, styles?.header)}>
106
106
  <ScrollSyncPane>
@@ -108,7 +108,6 @@ const ComparisonTable = <T extends { id: number }>(
108
108
  className={classNames(baseStyles.container, {
109
109
  [baseStyles.noScrollBars]: hideScrollBars,
110
110
  })}
111
- ref={scrollContainerCallbackRef}
112
111
  >
113
112
  <div className={classNames(baseStyles['overflow-container'])}>
114
113
  <div className={baseStyles['group-container']}>
@@ -1,3 +1,5 @@
1
+ @use "../../../scss/public/grid" as *;
2
+
1
3
  @keyframes fade-in {
2
4
  0% {
3
5
  background-color: rgba($color: #000000, $alpha: 0);
@@ -101,3 +103,9 @@
101
103
 
102
104
  padding: 0 16px;
103
105
  }
106
+
107
+ .content {
108
+ @include p-size-mobile {
109
+ padding-bottom: 48px;
110
+ }
111
+ }