@cuemath/leap 3.1.10-j2 → 3.1.10
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.
- package/dist/constants/country.js +994 -2
- package/dist/constants/country.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +1 -1
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +1 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +1 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -1
- package/dist/features/auth/signup/signup-constants.js +10 -1
- package/dist/features/auth/signup/signup-constants.js.map +1 -1
- package/dist/features/auth/{comps/user-list → user-list}/user-item/user-item-styled.js +1 -1
- package/dist/features/auth/user-list/user-item/user-item-styled.js.map +1 -0
- package/dist/features/auth/{comps/user-list → user-list}/user-item/user-item.js +4 -4
- package/dist/features/auth/user-list/user-item/user-item.js.map +1 -0
- package/dist/features/auth/user-list/user-list-constants.js.map +1 -0
- package/dist/features/auth/user-list/user-list-styled.js.map +1 -0
- package/dist/features/auth/{comps/user-list → user-list}/user-list.js +3 -3
- package/dist/features/auth/user-list/user-list.js.map +1 -0
- package/dist/features/ui/inputs/text-input/text-input-styled.js +16 -30
- package/dist/features/ui/inputs/text-input/text-input-styled.js.map +1 -1
- package/dist/features/ui/modals/modal-context.js +13 -0
- package/dist/features/ui/modals/modal-context.js.map +1 -0
- package/dist/features/ui/modals/modal-helpers.js +17 -0
- package/dist/features/ui/modals/modal-helpers.js.map +1 -0
- package/dist/features/ui/modals/modal-provider.js +48 -0
- package/dist/features/ui/modals/modal-provider.js.map +1 -0
- package/dist/features/ui/modals/modal-styled.js +154 -0
- package/dist/features/ui/modals/modal-styled.js.map +1 -0
- package/dist/features/ui/modals/modal.js +19 -0
- package/dist/features/ui/modals/modal.js.map +1 -0
- package/dist/features/ui/modals/use-modal-actions.js +10 -0
- package/dist/features/ui/modals/use-modal-actions.js.map +1 -0
- package/dist/features/ui/modals/use-modal-params.js +10 -0
- package/dist/features/ui/modals/use-modal-params.js.map +1 -0
- package/dist/index.d.ts +56 -10
- package/dist/index.js +382 -377
- package/dist/index.js.map +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +1 -1
- package/dist/features/auth/auth-constants.js +0 -1005
- package/dist/features/auth/auth-constants.js.map +0 -1
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +0 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +0 -1
- package/dist/features/auth/comps/user-list/user-list-constants.js.map +0 -1
- package/dist/features/auth/comps/user-list/user-list-styled.js.map +0 -1
- package/dist/features/auth/comps/user-list/user-list.js.map +0 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/features/auth/{comps/user-list → user-list}/user-list-constants.js +0 -0
- /package/dist/features/auth/{comps/user-list → user-list}/user-list-styled.js +0 -0
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -0,0 +1,154 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
const s = o.div(
|
3
|
+
({ theme: { colors: a }, $isClosing: t }) => `
|
4
|
+
position: fixed;
|
5
|
+
top: 0;
|
6
|
+
left: 0;
|
7
|
+
right: 0;
|
8
|
+
bottom: 0;
|
9
|
+
background-color: ${a.BLACK_T_60};
|
10
|
+
backdrop-filter: blur(40px);
|
11
|
+
display: flex;
|
12
|
+
animation: ${t ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
13
|
+
|
14
|
+
@keyframes backdropFadeIn {
|
15
|
+
from {
|
16
|
+
opacity: 0;
|
17
|
+
}
|
18
|
+
to {
|
19
|
+
opacity: 1;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@keyframes backdropFadeOut {
|
24
|
+
from {
|
25
|
+
opacity: 1;
|
26
|
+
}
|
27
|
+
to {
|
28
|
+
opacity: 0;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
`
|
32
|
+
), l = o.div(
|
33
|
+
({ theme: { colors: a }, $isClosing: t, $width: i }) => `
|
34
|
+
position: relative;
|
35
|
+
align-self: center;
|
36
|
+
margin: 0 auto;
|
37
|
+
width: ${i};
|
38
|
+
background-color: ${a.WHITE_1};
|
39
|
+
border: 1px solid ${a.BLACK_1};
|
40
|
+
transform-origin: center center;
|
41
|
+
animation: ${t ? "modalDisappear" : "modalAppear"} 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
|
42
|
+
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);
|
43
|
+
|
44
|
+
/* Responsive behavior for smaller screens */
|
45
|
+
@media (max-width: calc(${i} + 80px)) {
|
46
|
+
width: 100%;
|
47
|
+
max-width: 100%;
|
48
|
+
height: 100%;
|
49
|
+
max-height: 100%;
|
50
|
+
border: none;
|
51
|
+
}
|
52
|
+
|
53
|
+
@keyframes modalAppear {
|
54
|
+
0% {
|
55
|
+
opacity: 0;
|
56
|
+
transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);
|
57
|
+
}
|
58
|
+
100% {
|
59
|
+
opacity: 1;
|
60
|
+
transform: perspective(1200px) translateZ(0) translateY(0) scale(1);
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
@keyframes modalDisappear {
|
65
|
+
0% {
|
66
|
+
opacity: 1;
|
67
|
+
transform: perspective(1200px) translateZ(0) translateY(0) scale(1);
|
68
|
+
}
|
69
|
+
100% {
|
70
|
+
opacity: 0;
|
71
|
+
transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
`
|
75
|
+
), c = o.div(
|
76
|
+
({ $modalWidth: a }) => `
|
77
|
+
max-height: calc(100vh - 142px);
|
78
|
+
overflow-y: auto;
|
79
|
+
|
80
|
+
@media (max-width: calc(${a} + 80px)) {
|
81
|
+
max-height: 100vh;
|
82
|
+
}
|
83
|
+
}`
|
84
|
+
), m = o.div(
|
85
|
+
({ theme: { colors: a }, $modalWidth: t }) => `
|
86
|
+
position: absolute;
|
87
|
+
top: -56px;
|
88
|
+
right: -40px;
|
89
|
+
color: ${a.WHITE_1};
|
90
|
+
transition: all 0.2s ease;
|
91
|
+
|
92
|
+
&:hover {
|
93
|
+
transform: scale(1.05);
|
94
|
+
}
|
95
|
+
|
96
|
+
@media (max-width: calc(${t} + 80px)) {
|
97
|
+
top: 16px;
|
98
|
+
right: 16px;
|
99
|
+
color: ${a.BLACK_1};
|
100
|
+
}
|
101
|
+
`
|
102
|
+
), e = 720, r = 800, n = 500, d = o.div(
|
103
|
+
({ $isClosing: a }) => `
|
104
|
+
position: absolute;
|
105
|
+
width: ${e}px;
|
106
|
+
height: 100%;
|
107
|
+
left: 50%;
|
108
|
+
margin-left: ${-(e / 2)}px;
|
109
|
+
clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);
|
110
|
+
background: linear-gradient(
|
111
|
+
180deg,
|
112
|
+
rgba(0, 0, 0, 1) 0%,
|
113
|
+
rgba(0, 0, 0, 0) 100%
|
114
|
+
);
|
115
|
+
animation: openSpotlight;
|
116
|
+
animation-duration: ${r}ms;
|
117
|
+
animation-timing-function: linear;
|
118
|
+
animation-fill-mode: forwards;
|
119
|
+
opacity: 0;
|
120
|
+
${a ? `
|
121
|
+
animation: closeSpotlight;
|
122
|
+
animation-duration: ${n}ms;
|
123
|
+
animation-timing-function: linear;
|
124
|
+
animation-fill-mode: forwards;
|
125
|
+
opacity: 1;
|
126
|
+
` : ""}
|
127
|
+
|
128
|
+
@keyframes openSpotlight {
|
129
|
+
from {
|
130
|
+
opacity: 0;
|
131
|
+
}
|
132
|
+
to {
|
133
|
+
opacity: 1;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
@keyframes closeSpotlight {
|
138
|
+
from {
|
139
|
+
transform: rotateY(0);
|
140
|
+
}
|
141
|
+
to {
|
142
|
+
transform: rotateY(90deg);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
`
|
146
|
+
);
|
147
|
+
export {
|
148
|
+
l as BaseModal,
|
149
|
+
c as BaseModalContent,
|
150
|
+
m as CloseButtonContainer,
|
151
|
+
s as ModalContainer,
|
152
|
+
d as SpotlightModal
|
153
|
+
};
|
154
|
+
//# sourceMappingURL=modal-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n \n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,YAAAC,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMnBD,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBC,IAAa,oBAAoB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBhE,GAKMC,IAAYH,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAC,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKH,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCC,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBL,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAM,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBP,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAK,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BL,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGK,CAAW;AAAA;AAAA;AAAA,aAG1BL,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMO,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBX,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAE,EAAA,MAAiB;AAAA;AAAA,WAEXM,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDP,IACI;AAAA;AAAA,4BAEoBQ,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { memo as m } from "react";
|
3
|
+
import h from "../../../assets/line-icons/icons/cross.js";
|
4
|
+
import c from "../buttons/clickable/clickable.js";
|
5
|
+
import { ModalContainer as r, SpotlightModal as f, BaseModal as C, CloseButtonContainer as p, BaseModalContent as $ } from "./modal-styled.js";
|
6
|
+
const B = m(({ modal: n, isClosing: e = !1, onClose: s }) => {
|
7
|
+
const { renderAs: d, element: l, modalWidth: i, isDismissable: a } = n;
|
8
|
+
return d === "spotlight" ? /* @__PURE__ */ t(r, { $isClosing: e, children: [
|
9
|
+
/* @__PURE__ */ o(f, { $isClosing: e }),
|
10
|
+
l
|
11
|
+
] }) : /* @__PURE__ */ o(r, { $isClosing: e, children: /* @__PURE__ */ t(C, { $isClosing: e, $width: i, children: [
|
12
|
+
a !== !1 && /* @__PURE__ */ o(p, { $modalWidth: i, children: /* @__PURE__ */ o(c, { label: "Close", onClick: s, children: /* @__PURE__ */ o(h, { width: 40, height: 40 }) }) }),
|
13
|
+
/* @__PURE__ */ o($, { $modalWidth: i, children: l })
|
14
|
+
] }) });
|
15
|
+
});
|
16
|
+
export {
|
17
|
+
B as default
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=modal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>{element}</Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","jsxs","Styled.ModalContainer","jsx","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;AAaM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN;AAEzD,SAAIG,MAAa,cAEZ,gBAAAI,EAAAC,GAAA,EAAsB,YAAYP,GACjC,UAAA;AAAA,IAAA,gBAAAQ,EAACC,GAAA,EAAsB,YAAYT,EAAW,CAAA;AAAA,IAC7CG;AAAA,EACH,EAAA,CAAA,IAKD,gBAAAK,EAAAD,GAAA,EAAsB,YAAYP,GACjC,UAAC,gBAAAM,EAAAI,GAAA,EAAiB,YAAYV,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBM,GAAA,EAA4B,aAAaP,GACxC,4BAACQ,GAAU,EAAA,OAAM,SAAQ,SAASX,GAChC,4BAACY,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,sBAEDC,GAAA,EAAwB,aAAaV,GAAa,UAAQD,GAAA;AAAA,EAAA,EAC7D,CAAA,EACF,CAAA;AAEJ,CAAC;"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { useContext as e } from "react";
|
2
|
+
import n from "./modal-context.js";
|
3
|
+
const l = () => {
|
4
|
+
const { openModal: o, closeModal: t, isClosing: s } = e(n);
|
5
|
+
return { openModal: o, closeModal: t, isClosing: s };
|
6
|
+
}, c = l;
|
7
|
+
export {
|
8
|
+
c as default
|
9
|
+
};
|
10
|
+
//# sourceMappingURL=use-modal-actions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing } = useContext(ModalContext);\n\n return { openModal, closeModal, isClosing };\n};\n\nexport default useModalActions;\n"],"names":["useModalActions","openModal","closeModal","isClosing","useContext","ModalContext","useModalActions$1"],"mappings":";;AAMA,MAAMA,IAAoC,MAAM;AAC9C,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAWC,CAAY;AAE7D,SAAA,EAAE,WAAAJ,GAAW,YAAAC,GAAY,WAAAC;AAClC,GAEAG,IAAeN;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-modal-params.js","sources":["../../../../src/features/ui/modals/use-modal-params.ts"],"sourcesContent":["import type { IUseModalParams } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalParams: IUseModalParams = <T = undefined>(): T => {\n const { modalParams } = useContext(ModalContext);\n\n return modalParams as T;\n};\n\nexport default useModalParams;\n"],"names":["useModalParams","modalParams","useContext","ModalContext","useModalParams$1"],"mappings":";;AAMA,MAAMA,IAAkC,MAAwB;AAC9D,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAWC,CAAY;AAExC,SAAAF;AACT,GAEAG,IAAeJ;"}
|
package/dist/index.d.ts
CHANGED
@@ -277,16 +277,6 @@ export declare const CopyIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
277
277
|
|
278
278
|
export declare const CountdownTimer: FC<ICountdownTimer>;
|
279
279
|
|
280
|
-
export declare const COUNTRY_CODE_MAP: {
|
281
|
-
id: string;
|
282
|
-
code: string;
|
283
|
-
label: string;
|
284
|
-
value: string;
|
285
|
-
icon: string;
|
286
|
-
url: string;
|
287
|
-
geoIPCountryCode: string;
|
288
|
-
}[];
|
289
|
-
|
290
280
|
declare const COURSE_STREAMS: {
|
291
281
|
readonly SAT_DEMO: "SAT-DEMO";
|
292
282
|
readonly SAT_MATH: "SAT-MATH";
|
@@ -2360,6 +2350,45 @@ declare interface IMilestoneWidgetResourcesProps extends INodeCardCallbacks {
|
|
2360
2350
|
canUpdatePlan?: boolean;
|
2361
2351
|
}
|
2362
2352
|
|
2353
|
+
/**
|
2354
|
+
* Configuration for a modal component
|
2355
|
+
*/
|
2356
|
+
export declare interface IModal {
|
2357
|
+
/** Unique identifier for the modal */
|
2358
|
+
name: string;
|
2359
|
+
/** Content to display inside the modal */
|
2360
|
+
element: JSX.Element;
|
2361
|
+
/** Rendering style of the modal */
|
2362
|
+
renderAs?: 'modal' | 'fullscreen' | 'spotlight';
|
2363
|
+
/** Whether the modal can be dismissed by clicking outside or ESC key (default: true) */
|
2364
|
+
isDismissable?: boolean;
|
2365
|
+
/** Whether the modal requires authentication to view (default: true) */
|
2366
|
+
isPrivate?: boolean;
|
2367
|
+
/** Width of the modal in CSS units (e.g., '500px', '80vw') */
|
2368
|
+
modalWidth: string;
|
2369
|
+
}
|
2370
|
+
|
2371
|
+
/**
|
2372
|
+
* Context for managing modals throughout the application
|
2373
|
+
*/
|
2374
|
+
declare interface IModalContext {
|
2375
|
+
/** Currently active modal or null if no modal is open */
|
2376
|
+
modal: IModal | null;
|
2377
|
+
/** Parameters passed to the modal when opened */
|
2378
|
+
modalParams?: Record<string, unknown>;
|
2379
|
+
/** Opens a modal by name with optional parameters */
|
2380
|
+
openModal: <T = undefined>(name: string, params?: T) => void;
|
2381
|
+
/** Closes the currently open modal */
|
2382
|
+
closeModal: () => void;
|
2383
|
+
/** Whether the modal is in the process of closing (for animation) */
|
2384
|
+
isClosing?: boolean;
|
2385
|
+
}
|
2386
|
+
|
2387
|
+
declare interface IModalProviderProps extends PropsWithChildren {
|
2388
|
+
modals: IModal[];
|
2389
|
+
isUserAuthenticated?: boolean;
|
2390
|
+
}
|
2391
|
+
|
2363
2392
|
export declare interface IMultiplayerWebGameProps extends IBaseWebGameProps, ISyncableWebGameProps {
|
2364
2393
|
enablePlayerTurnIndicators?: boolean;
|
2365
2394
|
}
|
@@ -3565,6 +3594,14 @@ declare interface IUseIsTabBlocked {
|
|
3565
3594
|
(): IMultiTabBlockerContextValue;
|
3566
3595
|
}
|
3567
3596
|
|
3597
|
+
declare interface IUseModalActions {
|
3598
|
+
(): Pick<IModalContext, 'openModal' | 'closeModal' | 'isClosing'>;
|
3599
|
+
}
|
3600
|
+
|
3601
|
+
declare interface IUseModalParams {
|
3602
|
+
<T = undefined>(): T;
|
3603
|
+
}
|
3604
|
+
|
3568
3605
|
declare interface IusePointerSyncMethods {
|
3569
3606
|
publishMouseMove?: (data: IPointerData) => void;
|
3570
3607
|
susbcribeMouseMove?: (qrId: string, cb: (data: IPointerData) => void) => void;
|
@@ -4128,6 +4165,11 @@ export declare const MistakeIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
4128
4165
|
|
4129
4166
|
export declare const Mobile: React.FC<React.SVGProps<SVGSVGElement>>;
|
4130
4167
|
|
4168
|
+
/**
|
4169
|
+
* Provider component that manages modal state and provides modal context to child components
|
4170
|
+
*/
|
4171
|
+
export declare const ModalProvider: FC<IModalProviderProps>;
|
4172
|
+
|
4131
4173
|
export declare const MoreVerticalIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
4132
4174
|
|
4133
4175
|
export declare const MultiTabBlocker: FC<PropsWithChildren<IMultiTabBlockerProps>>;
|
@@ -5845,6 +5887,10 @@ export declare const useIsTabBlocked: IUseIsTabBlocked;
|
|
5845
5887
|
|
5846
5888
|
export declare const useJourney: () => IJourneyContext;
|
5847
5889
|
|
5890
|
+
export declare const useModalActions: IUseModalActions;
|
5891
|
+
|
5892
|
+
export declare const useModalParams: IUseModalParams;
|
5893
|
+
|
5848
5894
|
export declare const usePointerSync: ({ userType, targetUserId, }: IusePointerSyncProps) => IusePointerSyncMethods;
|
5849
5895
|
|
5850
5896
|
export declare const User2Icon: React.FC<React.SVGProps<SVGSVGElement>>;
|