@opexa/portal-components 0.0.943 → 0.0.945

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.
@@ -92,13 +92,11 @@ export function DisclaimerV2(props) {
92
92
  setTimeout(() => setShowWarning(false), 4000);
93
93
  return;
94
94
  }
95
+ disclaimer.close();
95
96
  if (isAuthenticated) {
96
97
  globalStore.termsOfUse.setOpen(true);
97
- globalStore.termsOfUse.setNext('DISCLAIMER');
98
- disclaimer.close();
99
98
  return;
100
99
  }
101
- disclaimer.close();
102
100
  }, children: "I Accept" })] })] }) })] }) }));
103
101
  }
104
102
  const Circle = () => (_jsx("div", { children: _jsx("div", { className: "flex h-4.5 w-4.5 items-center justify-center rounded-full border-[5px] border-brand-400", children: _jsx("div", { className: "h-2 w-2 rounded-full bg-bg-disabled" }) }) }));
@@ -49,13 +49,11 @@ export function DisclaimerV3(props) {
49
49
  setTimeout(() => setShowWarning(false), 4000);
50
50
  return;
51
51
  }
52
+ disclaimer.close();
52
53
  if (isAuthenticated) {
53
54
  globalStore.termsOfUse.setOpen(true);
54
- globalStore.termsOfUse.setNext('DISCLAIMER');
55
- disclaimer.close();
56
55
  return;
57
56
  }
58
- disclaimer.close();
59
57
  if (props.openOnboardingOnAgree) {
60
58
  globalStore.onboarding.setOpen(true);
61
59
  }
@@ -22,11 +22,11 @@ export function TermsOfUseV2({ logo, siteName, content, ...props }) {
22
22
  useEffect(() => {
23
23
  if (scrollableContentRef.current) {
24
24
  const { scrollHeight, clientHeight } = scrollableContentRef.current;
25
- const atBottom = scrollHeight <= clientHeight;
26
- setIsAtBottom(atBottom);
27
- if (atBottom) {
28
- setHasReachedBottom(true);
29
- }
25
+ const isScrollable = scrollHeight > clientHeight;
26
+ const atBottom = scrollHeight - scrollableContentRef.current.scrollTop <=
27
+ clientHeight + 1;
28
+ setIsAtBottom(!isScrollable || atBottom);
29
+ setHasReachedBottom(!isScrollable || atBottom);
30
30
  }
31
31
  }, []);
32
32
  return (_jsx(Dialog.Root, { open: globalStore.termsOfUse.open, onOpenChange: (details) => {
@@ -23,11 +23,11 @@ export function TermsOfUseV3({ logo, siteName, content, ...props }) {
23
23
  useEffect(() => {
24
24
  if (scrollableContentRef.current) {
25
25
  const { scrollHeight, clientHeight } = scrollableContentRef.current;
26
- const atBottom = scrollHeight <= clientHeight;
27
- setIsAtBottom(atBottom);
28
- if (atBottom) {
29
- setHasReachedBottom(true);
30
- }
26
+ const isScrollable = scrollHeight > clientHeight;
27
+ const atBottom = scrollHeight - scrollableContentRef.current.scrollTop <=
28
+ clientHeight + 1;
29
+ setIsAtBottom(!isScrollable || atBottom);
30
+ setHasReachedBottom(!isScrollable || atBottom);
31
31
  }
32
32
  }, []);
33
33
  return (_jsx(Dialog.Root, { open: globalStore.termsOfUse.open, onOpenChange: (details) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.943",
3
+ "version": "0.0.945",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",