@stokr/components-library 3.0.55 → 3.0.56

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.
@@ -25,12 +25,10 @@ BackButton.propTypes = {
25
25
  to: PropTypes.string,
26
26
  href: PropTypes.string
27
27
  };
28
- var stdin_default = BackButton;
29
28
  export {
30
29
  BackButton,
31
30
  BackButtonIcon,
32
31
  StyledBackButton,
33
32
  StyledBackButtonExternal,
34
- StyledWindowBackButton,
35
- stdin_default as default
33
+ StyledWindowBackButton
36
34
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useEffect } from "react";
3
3
  import PropTypes from "prop-types";
4
- import { Scrollbars } from "react-custom-scrollbars-2";
4
+ import { Scrollbars } from "react-custom-scrollbars-4";
5
5
  import { Container, Outer, Inner, ThumbV, TrackV, ThumbH, TrackH } from "./ComponentScroll.styles.js";
6
6
  const ComponentScroll = (props) => {
7
7
  const {
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import PropTypes from "prop-types";
3
3
  import { Text } from "../Text/Text.styles.js";
4
4
  import { useState } from "react";
5
- import scrollToElement from "scroll-to-element";
5
+ import { scrollToElement } from "../../utils/scrollUtils.js";
6
6
  import { FaqItems, FaqItem, FaqTitle, FaqDropdownIcon, FaqContent, FaqText } from "./FAQ.styles.js";
7
7
  function slugFromTitle(title) {
8
8
  if (title == null) return "";
@@ -22,10 +22,7 @@ const FAQ = (props) => {
22
22
  scrollRef?.current.scrollToBottom();
23
23
  }, 0);
24
24
  } else {
25
- scrollToElement?.(e.target.parentElement, {
26
- duration: 300,
27
- offset: 20
28
- });
25
+ scrollToElement(e.target.parentElement, { offset: 20 });
29
26
  }
30
27
  }
31
28
  };
@@ -22,9 +22,7 @@ const MultiProgressBarPropTypes = {
22
22
  fill: PropTypes.number.isRequired
23
23
  };
24
24
  MultiProgressBar.propTypes = MultiProgressBarPropTypes;
25
- var stdin_default = MultiProgressBar;
26
25
  export {
27
26
  MultiProgressBar,
28
- MultiProgressBarPropTypes,
29
- stdin_default as default
27
+ MultiProgressBarPropTypes
30
28
  };
@@ -46,9 +46,7 @@ Tabs.propTypes = {
46
46
  children: PropTypes.node.isRequired,
47
47
  activeTab: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
48
48
  };
49
- var stdin_default = Tabs;
50
49
  export {
51
50
  Tab,
52
- Tabs,
53
- stdin_default as default
51
+ Tabs
54
52
  };
@@ -16,13 +16,11 @@ TabsNav.propTypes = {
16
16
  noBorderBottom: PropTypes.bool,
17
17
  noWrapperPadding: PropTypes.bool
18
18
  };
19
- var stdin_default = TabsNav;
20
19
  export {
21
20
  LinkText,
22
21
  Scroll,
23
22
  StyledTab,
24
23
  StyledTabs,
25
24
  TabsNav,
26
- TabsWrapper,
27
- stdin_default as default
25
+ TabsWrapper
28
26
  };
package/dist/index.js CHANGED
@@ -9,7 +9,6 @@ import { HeroVideoBlock } from "./components/HeroBlock/HeroVideoBlock.js";
9
9
  import { BasicTable } from "./components/BasicTable/BasicTable.js";
10
10
  import { Button } from "./components/Button/Button.styles.js";
11
11
  import { ButtonContainer, ButtonGridContainer } from "./components/ButtonContainer/ButtonContainer.styles.js";
12
- import { CaptialRaisedSummary } from "./components/CapitalRaisedSummary/CaptialRaisedSummary.js";
13
12
  import { ChartLegend } from "./components/ChartLegend/ChartLegend.js";
14
13
  import { CheckBoxCaption, Checkbox } from "./components/Checkbox/Checkbox.js";
15
14
  import { ComponentScroll } from "./components/ComponentScroll/ComponentScroll.js";
@@ -45,12 +44,6 @@ import { TableFilterDropdown } from "./components/Input/TableFilterDropdown.js";
45
44
  import { InvestmentStat } from "./components/InvestmentStat/InvestmentStat.js";
46
45
  import { SpanButton } from "./components/SpanButton/SpanButton.styles.js";
47
46
  import { LatestUpdate } from "./components/LatestUpdate/LatestUpdate.js";
48
- import { LearnMoreCarousel } from "./components/LearnMoreCarousel/LearnMoreCarousel.js";
49
- import { LearnMore } from "./components/LearnMorePage/LearnMore.js";
50
- import { LearnMoreExampleObject } from "./components/LearnMorePage/LearnMoreExampleObject.js";
51
- import { LearnMoreItem } from "./components/LearnMorePage/LearnMoreItem.js";
52
- import { LearnMoreSection } from "./components/LearnMoreSection/LearnMore.js";
53
- import { LearnMoreItemSection } from "./components/LearnMoreSection/LearnMoreItem.js";
54
47
  import { MainMenu } from "./components/MainMenu/MainMenu.js";
55
48
  import { MenuNav } from "./components/MenuNav/MenuNav.styles.js";
56
49
  import { GlareButton } from "./components/Button/GlareButton.js";
@@ -244,7 +237,6 @@ import { Youtube } from "./components/icons/Youtube.js";
244
237
  import { format } from "date-fns";
245
238
  import { getAnalyticsIngestUrl, getBackofficeAppUrl } from "./utils/app-urls-analytics-backoffice.js";
246
239
  import { getConfig, resetRuntimeConfig } from "./runtime-config.js";
247
- import { learnMoreCategoryPropTypes, learnMorePostPropTypes } from "./components/LearnMorePage/LearnMore.propTypes.js";
248
240
  import { useSnackbar } from "./components/Snackbar/useSnackbar.js";
249
241
  export {
250
242
  AccountBalance,
@@ -280,7 +272,6 @@ export {
280
272
  CURRENCY_CONFIG,
281
273
  default10 as CameraSvg,
282
274
  default11 as CapsLockSvg,
283
- CaptialRaisedSummary,
284
275
  Card,
285
276
  CardHeader,
286
277
  CardHeaderRegular,
@@ -405,12 +396,6 @@ export {
405
396
  LatestUpdate,
406
397
  LatestUpdateWrapper,
407
398
  Layout,
408
- LearnMore,
409
- LearnMoreCarousel,
410
- LearnMoreExampleObject,
411
- LearnMoreItem,
412
- LearnMoreItemSection,
413
- LearnMoreSection,
414
399
  LinkIcon,
415
400
  LinkText,
416
401
  LinkedIn,
@@ -641,8 +626,6 @@ export {
641
626
  isPasswordValid,
642
627
  isUSInvestor,
643
628
  km_ify,
644
- learnMoreCategoryPropTypes,
645
- learnMorePostPropTypes,
646
629
  loaderGif,
647
630
  momentUtils,
648
631
  navigateToHref,
@@ -1,22 +1,22 @@
1
1
  import { useEffect, useCallback } from "react";
2
2
  import { useLocation } from "react-router-dom";
3
- const scrollToElement = (elementRef, options = {}) => {
4
- const { behavior = "smooth", block = "start", delay = 0 } = options;
3
+ const scrollToElement = (elementOrRef, options = {}) => {
4
+ const { behavior = "smooth", block = "start", delay = 0, offset = 0 } = options;
5
5
  const performScroll = () => {
6
- if (!elementRef?.current) return;
6
+ const element = elementOrRef?.current ?? elementOrRef;
7
+ if (!element) return;
7
8
  const isAppleDevice = /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1;
8
9
  requestAnimationFrame(() => {
9
- if (isAppleDevice) {
10
- const rect = elementRef.current.getBoundingClientRect();
11
- const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
12
- const targetY = rect.top + scrollTop;
10
+ const rect = element.getBoundingClientRect();
11
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
12
+ const targetY = rect.top + scrollTop - offset;
13
+ if (isAppleDevice || offset !== 0) {
13
14
  window.scrollTo({
14
15
  top: targetY,
15
16
  behavior: behavior === "smooth" ? "auto" : behavior
16
- // Use 'auto' for Apple devices
17
17
  });
18
18
  } else {
19
- elementRef.current.scrollIntoView({
19
+ element.scrollIntoView({
20
20
  behavior,
21
21
  block
22
22
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokr/components-library",
3
- "version": "3.0.55",
3
+ "version": "3.0.56",
4
4
  "description": "STOKR - Components Library",
5
5
  "author": "Bilal Hodzic <bilal@stokr.io>",
6
6
  "license": "MIT",
@@ -54,32 +54,25 @@
54
54
  "serve": "npx http-server ./storybook-static -p 9009"
55
55
  },
56
56
  "dependencies": {
57
- "@lottiefiles/dotlottie-react": "^0.17.13",
58
- "ajv": "^8.18.0",
57
+ "@lottiefiles/dotlottie-react": "^0.19.4",
59
58
  "axios": "^1.13.5",
60
- "bignumber.js": "^9.1.1",
61
59
  "country-flag-icons": "^1.6.17",
62
60
  "date-fns": "^4.1.0",
63
61
  "date-fns-tz": "^3.2.0",
64
62
  "dompurify": "^3.2.4",
65
63
  "firebase": "^12.4.0",
66
64
  "formik": "^2.2.9",
67
- "formik-persist": "^1.1.0",
68
65
  "html-react-parser": "^5.0.6",
69
66
  "js-cookie": "^3.0.5",
70
67
  "mixpanel-browser": "^2.74.0",
71
- "mobile-detect": "^1.4.5",
72
68
  "moment": "^2.30.1",
73
69
  "moment-timezone": "^0.6.0",
74
70
  "prop-types": "^15.8.1",
75
71
  "qrcode.react": "^4.2.0",
76
72
  "react-collapse": "^5.1.1",
77
73
  "react-copy-to-clipboard": "^5.1.0",
78
- "react-countup": "^6.4.1",
79
- "react-custom-scrollbars-2": "^4.5.0",
74
+ "react-custom-scrollbars-4": "^4.5.1",
80
75
  "react-day-picker": "^9.11.1",
81
- "react-device-detect": "^2.2.3",
82
- "react-ga4": "^2.1.0",
83
76
  "react-helmet": "^6.1.0",
84
77
  "react-intersection-observer": "^10.0.2",
85
78
  "react-otp-input": "^3.1.0",
@@ -89,15 +82,13 @@
89
82
  "react-slick": "^0.31.0",
90
83
  "react-table": "^7.8.0",
91
84
  "react-tippy": "^1.4.0",
92
- "scroll-to-element": "^2.0.3",
93
- "semantic-ui-react": "^2.1.4",
94
85
  "slick-carousel": "^1.8.1",
95
86
  "yup": "^1.0.0"
96
87
  },
97
88
  "peerDependencies": {
98
89
  "react": "^18.0.0 || ^19.0.0",
99
90
  "react-dom": "^18.0.0 || ^19.0.0",
100
- "react-router-dom": "^6.0.0",
91
+ "react-router-dom": "^6.0.0 || ^7.0.0",
101
92
  "styled-components": "^6.0.0"
102
93
  },
103
94
  "devDependencies": {
@@ -1,18 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import "react";
3
- import CountUp from "react-countup";
4
- import PropTypes from "prop-types";
5
- import stdin_default, { MultiProgressBarPropTypes } from "../MultiProgressBar/MultiProgressBar.js";
6
- import { Wrapper, Title, Amount } from "./CaptialRaisedSummary.styles.js";
7
- const CaptialRaisedSummary = ({ capital, multiProgressBar }) => /* @__PURE__ */ jsxs(Wrapper, { children: [
8
- /* @__PURE__ */ jsx(Title, { children: "CAPITAL RAISED" }),
9
- /* @__PURE__ */ jsx(Amount, { children: /* @__PURE__ */ jsx(CountUp, { end: capital, prefix: "€ ", duration: 0.01, separator: "," }) }),
10
- /* @__PURE__ */ jsx(stdin_default, { ...multiProgressBar })
11
- ] });
12
- CaptialRaisedSummary.propTypes = {
13
- capital: PropTypes.number.isRequired,
14
- multiProgressBar: PropTypes.shape(MultiProgressBarPropTypes).isRequired
15
- };
16
- export {
17
- CaptialRaisedSummary
18
- };
@@ -1,41 +0,0 @@
1
- import styled from "styled-components";
2
- import { ComponentWrapper } from "../ComponentWrapper/ComponentWrapper.styles.js";
3
- import rwd from "../../styles/rwd.js";
4
- import theme from "../../styles/theme.js";
5
- const Wrapper = styled(ComponentWrapper)`
6
- background: ${() => theme.cPrimary};
7
- display: flex;
8
- flex-direction: column;
9
- justify-content: center;
10
- height: 100%;
11
- margin-top: -1px;
12
- `;
13
- const Title = styled.div`
14
- font-size: 11px;
15
- line-height: 20px;
16
- letter-spacing: 2px;
17
- margin-bottom: 14px;
18
- color: ${() => theme.cWhite};
19
- `;
20
- const Amount = styled.div`
21
- font-size: 34px;
22
- line-height: 40px;
23
- font-weight: 300;
24
- margin-bottom: 20px;
25
- letter-spacing: 2px;
26
- color: ${() => theme.cWhite};
27
- white-space: nowrap;
28
-
29
- ${rwd.Medium`
30
- font-size: 28px;
31
- `}
32
-
33
- ${rwd.Large`
34
- font-size: 34px;
35
- `}
36
- `;
37
- export {
38
- Amount,
39
- Title,
40
- Wrapper
41
- };
@@ -1,32 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import "react";
3
- import PropTypes from "prop-types";
4
- import Slick from "react-slick";
5
- import "slick-carousel/slick/slick.css";
6
- import "slick-carousel/slick/slick-theme.css";
7
- import { Container, Offset, Wrapper } from "./LearnMoreCarousel.styles.js";
8
- const LearnMoreCarousel = ({ children, autoplay = 0, dots = false, arrows = false, isMobile = false }) => {
9
- const settings = {
10
- dots,
11
- arrows,
12
- infinite: false,
13
- speed: 600,
14
- autoplay: !!autoplay,
15
- autoplaySpeed: autoplay,
16
- slidesToShow: isMobile ? 1 : 2,
17
- slidesToScroll: isMobile ? 1 : 1
18
- };
19
- return /* @__PURE__ */ jsx(Container, { children: /* @__PURE__ */ jsx(Offset, { children: /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(Slick, { ...settings, children }) }) }) });
20
- };
21
- LearnMoreCarousel.propTypes = {
22
- children: PropTypes.node.isRequired,
23
- autoplay: PropTypes.number,
24
- dots: PropTypes.bool,
25
- arrows: PropTypes.bool,
26
- isMobile: PropTypes.bool
27
- };
28
- var stdin_default = LearnMoreCarousel;
29
- export {
30
- LearnMoreCarousel,
31
- stdin_default as default
32
- };
@@ -1,208 +0,0 @@
1
- import styled from "styled-components";
2
- import rwd from "../../styles/rwd.js";
3
- import theme from "../../styles/theme.js";
4
- const Container = styled.div`
5
- overflow: hidden;
6
- `;
7
- const Offset = styled.div`
8
- position: relative;
9
- padding-top: 28px;
10
- padding-bottom: 76px;
11
- margin-right: 0;
12
-
13
- ${rwd.Medium`
14
- padding-top: 32px;
15
- padding-bottom: 72px;
16
- margin-right: 64px;
17
- `}
18
-
19
- ${rwd.Large`
20
- padding-top: 64px;
21
- padding-bottom: 88px;
22
- margin-right: 128px;
23
- `}
24
- `;
25
- const Wrapper = styled.div`
26
- margin-right: 0;
27
-
28
- ${rwd.Medium`
29
- margin-right: -100%;
30
- `}
31
-
32
- .slick-list {
33
- z-index: 0;
34
- }
35
-
36
- .slick-arrow {
37
- z-index: 1;
38
- width: 32px;
39
- height: 48px;
40
- background-color: ${() => theme.cWarning};
41
- transition: background-color 0.2s;
42
-
43
- ${rwd.Large`
44
- width: 64px;
45
- `}
46
-
47
- &.slick-prev ,
48
- &.slick-next {
49
- top: 100%;
50
- right: 50%;
51
- margin-top: 40px;
52
- transform: none;
53
-
54
- ${rwd.Medium`
55
- margin-top: 24px;
56
- `}
57
-
58
- ${rwd.Large`
59
- margin-top: 40px;
60
- `}
61
-
62
- &:before {
63
- font-family: 'Ionicons';
64
- speak: none;
65
- font-style: normal;
66
- font-weight: normal;
67
- font-variant: normal;
68
- text-transform: none;
69
- text-rendering: auto;
70
- -webkit-font-smoothing: antialiased;
71
- -moz-osx-font-smoothing: grayscale;
72
- font-size: 20px;
73
- line-height: 24px;
74
- text-align: center;
75
- opacity: 1;
76
- color: ${() => theme.cWhite};
77
- }
78
-
79
- &:focus,
80
- &:hover {
81
- background-color: ${() => theme.cWarningDark};
82
- }
83
- }
84
-
85
- &.slick-prev {
86
- left: auto;
87
- margin-right: -32px;
88
-
89
- ${rwd.Large`
90
- margin-right: -64px;
91
- `}
92
-
93
- &:before {
94
- content: '\f3cf';
95
- }
96
- }
97
-
98
- &.slick-next {
99
- border-left: 1px solid ${() => theme.cWarningDark};
100
- margin-right: -64px;
101
-
102
- ${rwd.Large`
103
- margin-right: -128px;
104
- `}
105
-
106
- &:before {
107
- content: '\f3d1';
108
- }
109
- }
110
- }
111
-
112
- .slick-dots {
113
- z-index: 1;
114
- height: auto;
115
- top: 100%;
116
- margin-left: 8px;
117
- text-align: center;
118
- width: 100%;
119
- margin-top: 28px;
120
-
121
- ${rwd.Medium`
122
- margin-top: 36px;
123
- width: 50%;
124
- padding-right: 32px;
125
- text-align: right;
126
- `}
127
-
128
- ${rwd.Large`
129
- margin-top: 52px;
130
- padding-right: 36px;
131
- `}
132
-
133
- li {
134
- display: inline-block;
135
- width: 24px;
136
- height: 24px;
137
- margin: 0;
138
-
139
- button {
140
- display: block;
141
- padding: 8px;
142
- width: 24px;
143
- height: 24px;
144
-
145
- &:before {
146
- position: relative;
147
- content: '';
148
- display: block;
149
- width: 8px;
150
- height: 8px;
151
- border-radius: 4px;
152
- background-color: #eee;
153
- opacity: 1;
154
- transition: background-color 0.2s;
155
- }
156
-
157
- &:hover {
158
- &:before {
159
- background-color: #0050ca;
160
- }
161
- }
162
- }
163
-
164
- &.slick-active {
165
- button {
166
- &:before {
167
- background-color: #ee220d;
168
- }
169
- }
170
- }
171
- }
172
- }
173
-
174
- .slick-track {
175
- display: flex;
176
- align-items: stretch;
177
- }
178
-
179
- .slick-slide {
180
- height: auto;
181
-
182
- & > div {
183
- height: 100%;
184
- }
185
- }
186
- `;
187
- const LearnMoreSlide = styled.div`
188
- outline: 0;
189
- height: 100%;
190
- padding-left: 32px;
191
- padding-right: 32px;
192
-
193
- ${rwd.Medium`
194
- padding-left: 32px;
195
- padding-right: 0;
196
- `}
197
-
198
- ${rwd.Large`
199
- padding-left: 64px;
200
- padding-right: 0;
201
- `}
202
- `;
203
- export {
204
- Container,
205
- LearnMoreSlide,
206
- Offset,
207
- Wrapper
208
- };