@cuemath/leap 3.2.25-mb → 3.2.26
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/assets/lottie/lottie.js +1 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +17 -15
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +2 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +8 -8
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +82 -60
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +41 -38
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +18 -14
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +32 -26
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +23 -0
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +42 -35
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +68 -53
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
- package/dist/features/notification/notification.js +129 -0
- package/dist/features/notification/notification.js.map +1 -0
- package/dist/features/ui/carousal/carousal-styles.js +45 -0
- package/dist/features/ui/carousal/carousal-styles.js.map +1 -0
- package/dist/features/ui/carousal/carousal.js +76 -0
- package/dist/features/ui/carousal/carousal.js.map +1 -0
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +75 -88
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
- package/dist/features/ui/inputs/base-select-input/base-select-input.js +77 -67
- package/dist/features/ui/inputs/base-select-input/base-select-input.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +43 -45
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +8 -39
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +31 -31
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/{stickers/sticker-selector/sticker-selector-styles.js → ui/sticker-grid/sticker-grid-styles.js} +31 -21
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker.js +57 -0
- package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
- package/dist/features/ui/stickers/constants.js +6 -0
- package/dist/features/ui/stickers/constants.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/effects.js → ui/stickers/stickers-effects.js} +6 -6
- package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/stickers-effects-styled.js → ui/stickers/stickers-styled.js} +2 -2
- package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
- package/dist/features/ui/stickers/stickers-utils.js +91 -0
- package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
- package/dist/features/ui/stickers/stickers.js +40 -0
- package/dist/features/ui/stickers/stickers.js.map +1 -0
- package/dist/features/ui/theme/layout.js +3 -3
- package/dist/features/ui/theme/layout.js.map +1 -1
- package/dist/index.d.ts +114 -81
- package/dist/index.js +452 -448
- package/dist/index.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/static/animated-avatar.c3a0fa98.json +1 -0
- package/package.json +1 -1
- package/dist/features/stickers/sticker-data.js +0 -234
- package/dist/features/stickers/sticker-data.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +0 -27
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker.js +0 -57
- package/dist/features/stickers/sticker-selector/sticker.js.map +0 -1
- package/dist/features/stickers/stickers-effects/effects.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-cache.js +0 -19
- package/dist/features/stickers/stickers-effects/stickers-cache.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +0 -86
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +0 -54
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- package/dist/static/animated-avatar.1ad58b1d.json +0 -1
- package/dist/static/animated-avatar.69b07505.json +0 -1
- package/dist/static/animated-avatar.9c560b46.json +0 -1
- package/dist/static/cuemath-app-qr-code.4beefe48.svg +0 -1
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +0 -1
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/otp.2d08f874.json +0 -1
- package/dist/static/phone-number.84f55562.json +0 -1
- package/dist/static/target-achieved-text.053bd142.json +0 -2830
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +0 -1
|
@@ -1,114 +1,124 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { Input as
|
|
7
|
-
import { Container as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as V, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as G, useRef as A, useCallback as d } from "react";
|
|
3
|
+
import J from "../../../../assets/line-icons/icons/cross.js";
|
|
4
|
+
import K from "../../hooks/use-context-menu-click-handler.js";
|
|
5
|
+
import N from "../base-input/base-input.js";
|
|
6
|
+
import { Input as P } from "../text-input/text-input-styled.js";
|
|
7
|
+
import { Container as Q, OptionsContainer as U, OptionsWrapper as Y, StyledChevronDownIcon as Z, StyledDownIcon as _ } from "./base-select-input-styled.js";
|
|
8
|
+
import ee from "./select-option/select-option.js";
|
|
9
|
+
import ne from "./select-section/select-section.js";
|
|
10
|
+
const he = (E) => {
|
|
11
11
|
const {
|
|
12
|
-
label:
|
|
13
|
-
value:
|
|
12
|
+
label: b,
|
|
13
|
+
value: i,
|
|
14
14
|
options: u,
|
|
15
15
|
searchable: n = !1,
|
|
16
16
|
searchText: g,
|
|
17
|
-
onCloseWithoutSelection:
|
|
18
|
-
onSearchTextChange:
|
|
19
|
-
onChange:
|
|
17
|
+
onCloseWithoutSelection: L,
|
|
18
|
+
onSearchTextChange: r,
|
|
19
|
+
onChange: v,
|
|
20
20
|
renderAs: h,
|
|
21
|
-
width:
|
|
22
|
-
widthX:
|
|
21
|
+
width: R,
|
|
22
|
+
widthX: j,
|
|
23
23
|
disabled: p,
|
|
24
|
-
willShowMessage:
|
|
25
|
-
mandatory:
|
|
26
|
-
size:
|
|
24
|
+
willShowMessage: z,
|
|
25
|
+
mandatory: B,
|
|
26
|
+
size: w = "regular",
|
|
27
27
|
shape: m,
|
|
28
28
|
theme: f = "light",
|
|
29
|
-
isTransparent:
|
|
29
|
+
isTransparent: S = !1,
|
|
30
30
|
renderOptionsAs: $ = "list",
|
|
31
|
-
errorMessage:
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
errorMessage: D,
|
|
32
|
+
inputLabelOverrides: C
|
|
33
|
+
} = E, s = $ === "section-list" && u, l = $ === "list" && u, I = G(() => {
|
|
34
|
+
var e;
|
|
34
35
|
if (n) return g;
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
if (s) {
|
|
37
|
+
let o, a;
|
|
38
|
+
for (const T of s) {
|
|
39
|
+
const y = T.data.find(({ id: q }) => q === i);
|
|
40
|
+
if (y) {
|
|
41
|
+
o = T, a = y;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return o && C ? C(o, a) : (a == null ? void 0 : a.label) || "";
|
|
46
|
+
}
|
|
47
|
+
if (l) return (e = l.find((o) => o.id === i)) == null ? void 0 : e.label;
|
|
48
|
+
}, [n, g, s, l, C, i]), k = A(null), x = A(null), { menuVisible: c, onMenuClick: F, hideMenu: O } = K(
|
|
49
|
+
k,
|
|
40
50
|
void 0,
|
|
41
51
|
!n,
|
|
42
|
-
|
|
52
|
+
L,
|
|
43
53
|
p
|
|
44
|
-
),
|
|
54
|
+
), W = d(
|
|
45
55
|
(e) => {
|
|
46
|
-
n &&
|
|
56
|
+
n && r && r(e.target.value);
|
|
47
57
|
},
|
|
48
|
-
[
|
|
49
|
-
),
|
|
50
|
-
(e,
|
|
51
|
-
|
|
58
|
+
[r, n]
|
|
59
|
+
), M = d(
|
|
60
|
+
(e, o) => {
|
|
61
|
+
O(), v(e, o);
|
|
52
62
|
},
|
|
53
|
-
[
|
|
54
|
-
),
|
|
63
|
+
[O, v]
|
|
64
|
+
), X = d((e) => {
|
|
55
65
|
e.target.select(), setTimeout(() => {
|
|
56
66
|
e.target.scrollIntoView({
|
|
57
67
|
behavior: "smooth"
|
|
58
68
|
});
|
|
59
69
|
}, 300);
|
|
60
|
-
}, []),
|
|
70
|
+
}, []), H = d(() => {
|
|
61
71
|
var e;
|
|
62
|
-
|
|
63
|
-
}, [
|
|
64
|
-
return /* @__PURE__ */
|
|
72
|
+
r && (r(""), (e = x.current) == null || e.focus());
|
|
73
|
+
}, [r]);
|
|
74
|
+
return /* @__PURE__ */ V(Q, { ref: k, $width: R, $widthX: j, onClick: F, children: [
|
|
65
75
|
/* @__PURE__ */ t(
|
|
66
|
-
|
|
76
|
+
N,
|
|
67
77
|
{
|
|
68
78
|
renderAs: h,
|
|
69
|
-
label:
|
|
79
|
+
label: b,
|
|
70
80
|
stickyLabel: !0,
|
|
71
81
|
disabled: p,
|
|
72
|
-
willShowMessage:
|
|
73
|
-
size:
|
|
74
|
-
mandatory:
|
|
82
|
+
willShowMessage: z,
|
|
83
|
+
size: w,
|
|
84
|
+
mandatory: B,
|
|
75
85
|
shape: m,
|
|
76
|
-
isTransparent:
|
|
86
|
+
isTransparent: S,
|
|
77
87
|
inputElement: /* @__PURE__ */ t(
|
|
78
|
-
|
|
88
|
+
P,
|
|
79
89
|
{
|
|
80
90
|
ref: x,
|
|
81
91
|
$renderAs: h,
|
|
82
|
-
$size:
|
|
83
|
-
placeholder: I ? "" :
|
|
92
|
+
$size: w,
|
|
93
|
+
placeholder: I ? "" : b,
|
|
84
94
|
disabled: p,
|
|
85
95
|
readOnly: !n,
|
|
86
96
|
value: I ?? "",
|
|
87
|
-
onFocus: n ?
|
|
88
|
-
onChange: n ?
|
|
89
|
-
$isTransparent:
|
|
97
|
+
onFocus: n ? X : void 0,
|
|
98
|
+
onChange: n ? W : void 0,
|
|
99
|
+
$isTransparent: S
|
|
90
100
|
}
|
|
91
101
|
),
|
|
92
|
-
siblingElement: n &&
|
|
93
|
-
errorMessage:
|
|
102
|
+
siblingElement: n && c ? /* @__PURE__ */ t(J, { onClick: H }) : m === "curved" || m === "borderLess" ? /* @__PURE__ */ t(Z, { $menuVisible: c, pointerEvents: "none" }) : /* @__PURE__ */ t(_, { $menuVisible: c, pointerEvents: "none" }),
|
|
103
|
+
errorMessage: D
|
|
94
104
|
}
|
|
95
105
|
),
|
|
96
|
-
u.length > 0 && /* @__PURE__ */ t(
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
u.length > 0 && /* @__PURE__ */ t(U, { $visible: c, children: /* @__PURE__ */ V(Y, { $renderAs: h, $theme: f, children: [
|
|
107
|
+
s && /* @__PURE__ */ t(
|
|
108
|
+
ne,
|
|
99
109
|
{
|
|
100
|
-
sectionOptions:
|
|
110
|
+
sectionOptions: s,
|
|
101
111
|
theme: f,
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
112
|
+
value: i,
|
|
113
|
+
onChange: M
|
|
104
114
|
}
|
|
105
115
|
),
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
l && l.map((e) => /* @__PURE__ */ t(
|
|
117
|
+
ee,
|
|
108
118
|
{
|
|
109
119
|
option: e,
|
|
110
|
-
selected: e.id ===
|
|
111
|
-
onChange:
|
|
120
|
+
selected: e.id === i,
|
|
121
|
+
onChange: M,
|
|
112
122
|
theme: f
|
|
113
123
|
},
|
|
114
124
|
e.id
|
|
@@ -117,6 +127,6 @@ const ae = (y) => {
|
|
|
117
127
|
] });
|
|
118
128
|
};
|
|
119
129
|
export {
|
|
120
|
-
|
|
130
|
+
he as default
|
|
121
131
|
};
|
|
122
132
|
//# sourceMappingURL=base-select-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n
|
|
1
|
+
{"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n inputLabelOverrides,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n let foundSection, foundOption;\n\n for (const section of sectionOptions) {\n const option = section.data.find(({ id }) => id === value);\n\n if (option) {\n foundSection = section;\n foundOption = option;\n\n break;\n }\n }\n\n if (foundSection && inputLabelOverrides)\n return inputLabelOverrides(foundSection, foundOption);\n\n return foundOption?.label || '';\n }\n\n if (selectOptions) return selectOptions.find(option => option.id === value)?.label;\n }, [searchable, searchText, sectionOptions, selectOptions, inputLabelOverrides, value]);\n\n const containerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const inputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(\n containerRef,\n undefined,\n !searchable,\n onCloseWithoutSelection,\n disabled,\n );\n\n const handleTextChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (searchable && onSearchTextChange) {\n onSearchTextChange(e.target.value);\n }\n },\n [onSearchTextChange, searchable],\n );\n\n const handleChange = useCallback<IBaseSelectInputProps<IDType>['onChange']>(\n (id, option) => {\n hideMenu();\n onChange(id, option);\n },\n [hideMenu, onChange],\n );\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n setTimeout(() => {\n e.target.scrollIntoView({\n behavior: 'smooth',\n });\n }, 300);\n }, []);\n\n const handleClear = useCallback(() => {\n if (onSearchTextChange) {\n onSearchTextChange('');\n inputRef.current?.focus();\n }\n }, [onSearchTextChange]);\n\n const downIcon =\n shape === 'curved' || shape === 'borderLess' ? (\n <Styled.StyledChevronDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n ) : (\n <Styled.StyledDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n );\n\n return (\n <Styled.Container ref={containerRef} $width={width} $widthX={widthX} onClick={onMenuClick}>\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={true}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={size}\n mandatory={mandatory}\n shape={shape}\n isTransparent={isTransparent}\n inputElement={\n <Input\n ref={inputRef}\n $renderAs={renderAs}\n $size={size}\n placeholder={inputValue ? '' : label}\n disabled={disabled}\n readOnly={!searchable}\n value={inputValue ?? ''}\n onFocus={searchable ? handleFocus : undefined}\n onChange={searchable ? handleTextChange : undefined}\n $isTransparent={isTransparent}\n />\n }\n siblingElement={searchable && menuVisible ? <CrossIcon onClick={handleClear} /> : downIcon}\n errorMessage={errorMessage}\n />\n\n {options.length > 0 && (\n <Styled.OptionsContainer $visible={menuVisible}>\n <Styled.OptionsWrapper $renderAs={renderAs} $theme={theme}>\n {sectionOptions && (\n <SelectSection<IDType>\n sectionOptions={sectionOptions}\n theme={theme}\n value={value}\n onChange={handleChange}\n />\n )}\n\n {selectOptions &&\n selectOptions.map(option => (\n <SelectOption<IDType>\n key={option.id}\n option={option}\n selected={option.id === value}\n onChange={handleChange}\n theme={theme}\n />\n ))}\n </Styled.OptionsWrapper>\n </Styled.OptionsContainer>\n )}\n </Styled.Container>\n );\n};\n\nexport default BaseSelectInput;\n"],"names":["BaseSelectInput","props","label","value","options","searchable","searchText","onCloseWithoutSelection","onSearchTextChange","onChange","renderAs","width","widthX","disabled","willShowMessage","mandatory","size","shape","theme","isTransparent","renderOptionsAs","errorMessage","inputLabelOverrides","sectionOptions","selectOptions","inputValue","useMemo","foundSection","foundOption","section","option","id","_a","containerRef","useRef","inputRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleTextChange","useCallback","handleChange","handleFocus","handleClear","jsxs","Styled.Container","jsx","BaseInput","Input","CrossIcon","Styled.StyledChevronDownIcon","Styled.StyledDownIcon","Styled.OptionsContainer","Styled.OptionsWrapper","SelectSection","SelectOption"],"mappings":";;;;;;;;;AAcM,MAAAA,KAAkB,CACtBC,MACiB;AACX,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,eAAAC,IAAgB;AAAA,IAChB,iBAAAC,IAAkB;AAAA,IAClB,cAAAC;AAAA,IACA,qBAAAC;AAAA,EACE,IAAArB,GAEEsB,IACJH,MAAoB,kBAAmBhB,GACnCoB,IAAgBJ,MAAoB,UAAWhB,GAE/CqB,IAAaC,EAAQ,MAAM;;AAC/B,QAAIrB,EAAmB,QAAAC;AAEvB,QAAIiB,GAAgB;AAClB,UAAII,GAAcC;AAElB,iBAAWC,KAAWN,GAAgB;AAC9B,cAAAO,IAASD,EAAQ,KAAK,KAAK,CAAC,EAAE,IAAAE,EAAS,MAAAA,MAAO5B,CAAK;AAEzD,YAAI2B,GAAQ;AACK,UAAAH,IAAAE,GACDD,IAAAE;AAEd;AAAA,QACF;AAAA,MACF;AAEA,aAAIH,KAAgBL,IACXA,EAAoBK,GAAcC,CAAW,KAE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A,EAAA,CACL,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,76 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { memo as w, forwardRef as
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import g from "lottie-web";
|
|
3
|
+
import { memo as w, forwardRef as A, useRef as u, useImperativeHandle as b, useEffect as I } from "react";
|
|
4
4
|
import $ from "../layout/flex-view.js";
|
|
5
5
|
import { fetchLottie as x } from "./helper.js";
|
|
6
|
-
const O =
|
|
6
|
+
const O = A((v, L) => {
|
|
7
7
|
const {
|
|
8
|
-
src:
|
|
9
|
-
width:
|
|
8
|
+
src: m,
|
|
9
|
+
width: h = "100%",
|
|
10
10
|
height: y = "100%",
|
|
11
|
-
settings:
|
|
12
|
-
eventListener:
|
|
11
|
+
settings: l,
|
|
12
|
+
eventListener: n,
|
|
13
13
|
onRender: i,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
h,
|
|
14
|
+
animateOnIntersect: c
|
|
15
|
+
} = v, a = u(null), r = u(null), s = u(null);
|
|
16
|
+
return b(
|
|
17
|
+
L,
|
|
19
18
|
() => ({
|
|
20
|
-
playSegments: (
|
|
21
|
-
var
|
|
22
|
-
return (
|
|
19
|
+
playSegments: (e, o) => {
|
|
20
|
+
var t;
|
|
21
|
+
return (t = r.current) == null ? void 0 : t.playSegments(e, o);
|
|
23
22
|
},
|
|
24
|
-
addEventListener: (
|
|
25
|
-
var
|
|
26
|
-
return (
|
|
23
|
+
addEventListener: (e, o) => {
|
|
24
|
+
var t;
|
|
25
|
+
return (t = r.current) == null ? void 0 : t.addEventListener(e, o);
|
|
27
26
|
},
|
|
28
|
-
removeEventListener: (
|
|
29
|
-
var
|
|
30
|
-
return (
|
|
27
|
+
removeEventListener: (e, o) => {
|
|
28
|
+
var t;
|
|
29
|
+
return (t = r.current) == null ? void 0 : t.removeEventListener(e, o);
|
|
31
30
|
},
|
|
32
31
|
play: () => {
|
|
33
|
-
var
|
|
34
|
-
return (
|
|
32
|
+
var e;
|
|
33
|
+
return (e = r.current) == null ? void 0 : e.play();
|
|
35
34
|
},
|
|
36
35
|
stop: () => {
|
|
37
|
-
var t;
|
|
38
|
-
return (t = r.current) == null ? void 0 : t.stop();
|
|
39
|
-
},
|
|
40
|
-
goToAndStop: (t, n) => {
|
|
41
36
|
var e;
|
|
42
|
-
return (e = r.current) == null ? void 0 : e.
|
|
37
|
+
return (e = r.current) == null ? void 0 : e.stop();
|
|
38
|
+
},
|
|
39
|
+
setLoop: (e) => {
|
|
40
|
+
r.current && (r.current.loop = e);
|
|
43
41
|
}
|
|
44
42
|
}),
|
|
45
43
|
[]
|
|
46
|
-
),
|
|
47
|
-
let
|
|
44
|
+
), I(() => {
|
|
45
|
+
let e = !1;
|
|
48
46
|
return (async () => {
|
|
49
47
|
try {
|
|
50
|
-
const
|
|
48
|
+
const t = await x(m);
|
|
51
49
|
requestAnimationFrame(() => {
|
|
52
|
-
!
|
|
53
|
-
container:
|
|
54
|
-
animationData:
|
|
50
|
+
!a.current || e || (r.current = g.loadAnimation({
|
|
51
|
+
container: a.current,
|
|
52
|
+
animationData: t,
|
|
55
53
|
loop: !0,
|
|
56
54
|
autoplay: !0,
|
|
57
|
-
...
|
|
58
|
-
}),
|
|
55
|
+
...l
|
|
56
|
+
}), c && (s.current = new IntersectionObserver(
|
|
59
57
|
([f]) => {
|
|
60
|
-
var
|
|
61
|
-
f && f.isIntersecting ? (
|
|
58
|
+
var d, p;
|
|
59
|
+
f && f.isIntersecting ? (d = r.current) == null || d.play() : (p = r.current) == null || p.pause();
|
|
62
60
|
},
|
|
63
61
|
{ threshold: 0 }
|
|
64
|
-
),
|
|
62
|
+
), s.current.observe(a.current)), i == null || i(), n && r.current.addEventListener(n.name, n.callback));
|
|
65
63
|
});
|
|
66
|
-
} catch (
|
|
67
|
-
throw
|
|
64
|
+
} catch (t) {
|
|
65
|
+
throw Error(`Error loading Lottie animation: ${t}`);
|
|
68
66
|
}
|
|
69
67
|
})(), () => {
|
|
70
|
-
var
|
|
71
|
-
|
|
68
|
+
var t;
|
|
69
|
+
e = !0, r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((t = s.current) == null || t.disconnect()), r.current.destroy());
|
|
72
70
|
};
|
|
73
|
-
}, [
|
|
71
|
+
}, [m, n, i, c, l]), /* @__PURE__ */ E($, { ref: a, $width: h, $height: y });
|
|
74
72
|
}), D = w(O);
|
|
75
73
|
export {
|
|
76
74
|
D as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n
|
|
1
|
+
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n setLoop: (loop: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.loop = loop;\n }\n },\n }),\n [],\n );\n\n useEffect(() => {\n let destroyed = false;\n\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n // Wait for layout\n // NOTE: Do not remove this as this is needed to fix canvas rendering on first layout.\n requestAnimationFrame(() => {\n if (!container.current || destroyed) return;\n\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n intersectionObserver.current.observe(container.current);\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n });\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","loop","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,oBAAoBC,GAAiCC;AAAA;AAAA,MAClF,MAAM,MAAM;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,MACvC,MAAM,MAAM;;AAAA,gBAAAA,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,MACvC,SAAS,CAACG,MAAkB;AAC1B,QAAIR,EAAkB,YACpBA,EAAkB,QAAQ,OAAOQ;AAAA,MAErC;AAAA,IAAA;AAAA,IAEF,CAAC;AAAA,EAAA,GAGHC,EAAU,MAAM;AACd,QAAIC,IAAY;AA4CF,YA1CQ,YAAY;AAC5B,UAAA;AAC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c(100vh - 142px);
|
|
79
79
|
overflow-y: auto;
|
|
@@ -82,7 +82,7 @@ const p = a.div(
|
|
|
82
82
|
max-height: 100vh;
|
|
83
83
|
}
|
|
84
84
|
}`
|
|
85
|
-
),
|
|
85
|
+
), m = a.div(
|
|
86
86
|
({ theme: { colors: t }, $modalWidth: o }) => `
|
|
87
87
|
position: absolute;
|
|
88
88
|
top: -56px;
|
|
@@ -100,7 +100,7 @@ const p = a.div(
|
|
|
100
100
|
color: ${t.BLACK_1};
|
|
101
101
|
}
|
|
102
102
|
`
|
|
103
|
-
),
|
|
103
|
+
), d = a.div`
|
|
104
104
|
display: flex;
|
|
105
105
|
align-items: center;
|
|
106
106
|
justify-content: center;
|
|
@@ -151,36 +151,6 @@ const p = a.div(
|
|
|
151
151
|
}
|
|
152
152
|
`
|
|
153
153
|
), h = a.div(
|
|
154
|
-
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
|
155
|
-
position: fixed;
|
|
156
|
-
top: 0;
|
|
157
|
-
left: 0;
|
|
158
|
-
right: 0;
|
|
159
|
-
bottom: 0;
|
|
160
|
-
background-color: ${t.TRANSPARENT};
|
|
161
|
-
display: flex;
|
|
162
|
-
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
|
163
|
-
z-index: ${o.MODAL};
|
|
164
|
-
|
|
165
|
-
@keyframes backdropFadeIn {
|
|
166
|
-
from {
|
|
167
|
-
opacity: 0;
|
|
168
|
-
}
|
|
169
|
-
to {
|
|
170
|
-
opacity: 1;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
@keyframes backdropFadeOut {
|
|
175
|
-
from {
|
|
176
|
-
opacity: 1;
|
|
177
|
-
}
|
|
178
|
-
to {
|
|
179
|
-
opacity: 0;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
`
|
|
183
|
-
), x = a.div(
|
|
184
154
|
({ $isClosing: t }) => `
|
|
185
155
|
width: 100%;
|
|
186
156
|
height: max-content;
|
|
@@ -216,12 +186,11 @@ const p = a.div(
|
|
|
216
186
|
);
|
|
217
187
|
export {
|
|
218
188
|
l as BaseModal,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
189
|
+
c as BaseModalContent,
|
|
190
|
+
h as BottomSheetModal,
|
|
191
|
+
m as CloseButtonContainer,
|
|
222
192
|
p as ModalContainer,
|
|
223
|
-
|
|
224
|
-
f as SpotlightModal
|
|
225
|
-
h as TransparentModalContainer
|
|
193
|
+
d as ModalLoaderWrapper,
|
|
194
|
+
f as SpotlightModal
|
|
226
195
|
};
|
|
227
196
|
//# sourceMappingURL=modal-styled.js.map
|
|
@@ -1 +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, zIndex }, $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 z-index: ${zIndex.MODAL};\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 ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\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\nconst
|
|
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, zIndex }, $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 z-index: ${zIndex.MODAL};\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 ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\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\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3B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A;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,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,GAEME,IAAmBd,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { captureException as
|
|
3
|
-
import { memo as $, useCallback as g, Suspense as
|
|
4
|
-
import { ErrorBoundary as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
2
|
+
import { captureException as u } from "@sentry/browser";
|
|
3
|
+
import { memo as $, useCallback as g, Suspense as n } from "react";
|
|
4
|
+
import { ErrorBoundary as a } from "react-error-boundary";
|
|
5
|
+
import E from "../../../assets/line-icons/icons/cross.js";
|
|
6
|
+
import h from "../error/error.js";
|
|
7
|
+
import M from "../buttons/clickable/clickable.js";
|
|
8
8
|
import x from "../layout/flex-view.js";
|
|
9
|
-
import
|
|
10
|
-
import { ModalContainer as
|
|
11
|
-
const q = $(({ modal:
|
|
12
|
-
const { renderAs:
|
|
13
|
-
|
|
14
|
-
}, []),
|
|
15
|
-
|
|
9
|
+
import c from "../loader/app-loader/app-loader.js";
|
|
10
|
+
import { ModalContainer as d, BottomSheetModal as v, ModalLoaderWrapper as C, SpotlightModal as B, BaseModal as S, CloseButtonContainer as W, BaseModalContent as w } from "./modal-styled.js";
|
|
11
|
+
const q = $(({ modal: b, isClosing: o = !1, onClose: m }) => {
|
|
12
|
+
const { renderAs: s, element: e, modalWidth: l, isDismissable: p } = b, i = g((t) => {
|
|
13
|
+
u(t);
|
|
14
|
+
}, []), k = g((t) => {
|
|
15
|
+
t.stopPropagation();
|
|
16
16
|
}, []);
|
|
17
|
-
return
|
|
18
|
-
|
|
17
|
+
return s === "bottom-sheet" ? /* @__PURE__ */ r(d, { $isClosing: o, onClick: p ? m : () => null, children: /* @__PURE__ */ r(v, { $isClosing: o, onClick: k, children: /* @__PURE__ */ r(
|
|
18
|
+
a,
|
|
19
19
|
{
|
|
20
|
-
fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(
|
|
21
|
-
onError:
|
|
22
|
-
children: /* @__PURE__ */ r(
|
|
20
|
+
fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(h, { height: "100%" }) }),
|
|
21
|
+
onError: i,
|
|
22
|
+
children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
|
|
23
23
|
}
|
|
24
|
-
) }) }) :
|
|
25
|
-
|
|
24
|
+
) }) }) : s === "spotlight" ? /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ r(
|
|
25
|
+
a,
|
|
26
26
|
{
|
|
27
|
-
fallback: /* @__PURE__ */ r(
|
|
28
|
-
onError:
|
|
27
|
+
fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
|
|
28
|
+
onError: i,
|
|
29
29
|
children: /* @__PURE__ */ f(
|
|
30
|
-
|
|
30
|
+
n,
|
|
31
31
|
{
|
|
32
|
-
fallback: /* @__PURE__ */ r(
|
|
32
|
+
fallback: /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(c, { height: "100vh" }) }),
|
|
33
33
|
children: [
|
|
34
34
|
/* @__PURE__ */ r(B, { $isClosing: o }),
|
|
35
35
|
e
|
|
@@ -37,14 +37,14 @@ const q = $(({ modal: C, isClosing: o = !1, onClose: m }) => {
|
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
}
|
|
40
|
-
) }) :
|
|
41
|
-
p !== !1 && /* @__PURE__ */ r(
|
|
42
|
-
/* @__PURE__ */ r(
|
|
43
|
-
|
|
40
|
+
) }) : /* @__PURE__ */ r(d, { $isClosing: o, children: /* @__PURE__ */ f(S, { $isClosing: o, $width: l, children: [
|
|
41
|
+
p !== !1 && /* @__PURE__ */ r(W, { $modalWidth: l, children: /* @__PURE__ */ r(M, { label: "Close", onClick: m, children: /* @__PURE__ */ r(E, { width: 40, height: 40 }) }) }),
|
|
42
|
+
/* @__PURE__ */ r(w, { $modalWidth: l, children: /* @__PURE__ */ r(
|
|
43
|
+
a,
|
|
44
44
|
{
|
|
45
|
-
fallback: /* @__PURE__ */ r(
|
|
46
|
-
onError:
|
|
47
|
-
children: /* @__PURE__ */ r(
|
|
45
|
+
fallback: /* @__PURE__ */ r(h, { height: "50vh", size: "compact" }),
|
|
46
|
+
onError: i,
|
|
47
|
+
children: /* @__PURE__ */ r(n, { fallback: /* @__PURE__ */ r(c, { height: "50vh" }), children: e })
|
|
48
48
|
}
|
|
49
49
|
) })
|
|
50
50
|
] }) });
|