@cuemath/leap 3.2.23-mb → 3.2.24-j1
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/features/auth/account-selector/account-selector.js +54 -52
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js +9 -3
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +14 -15
- package/dist/features/auth/comps/user-list/user-item/user-item.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-styled.js +9 -0
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation-styled.js.map +1 -0
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +80 -0
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -0
- 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 +31 -36
- 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/index.d.ts +98 -39
- package/dist/index.js +444 -440
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js +1881 -0
- package/dist/node_modules/@lottiefiles/dotlottie-web/dist/index.js.map +1 -0
- 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/package.json +2 -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-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 -43
- 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
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as d } from "react";
|
|
3
3
|
import { useTheme as $ } from "styled-components";
|
|
4
|
-
import { ILLUSTRATIONS as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { EDeviceType as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { ImageWrapper as
|
|
13
|
-
const
|
|
14
|
-
userAccounts:
|
|
15
|
-
onSelect:
|
|
16
|
-
onAddNew:
|
|
17
|
-
isLoading:
|
|
4
|
+
import { ILLUSTRATIONS as m } from "../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import f from "../../ui/image/image.js";
|
|
6
|
+
import t from "../../ui/layout/flex-view.js";
|
|
7
|
+
import o from "../../ui/separator/separator.js";
|
|
8
|
+
import n from "../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as g } from "../../ui/theme/constants.js";
|
|
10
|
+
import T from "../comps/overlay-loader/overlay-loader.js";
|
|
11
|
+
import u from "../comps/user-list/user-list.js";
|
|
12
|
+
import { ImageWrapper as w } from "./account-selector-styled.js";
|
|
13
|
+
const L = ({
|
|
14
|
+
userAccounts: i,
|
|
15
|
+
onSelect: c,
|
|
16
|
+
onAddNew: h,
|
|
17
|
+
isLoading: l
|
|
18
18
|
}) => {
|
|
19
|
-
const { device:
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
19
|
+
const { device: p } = $(), a = p <= g.TABLET;
|
|
20
|
+
return /* @__PURE__ */ r(
|
|
21
|
+
t,
|
|
22
22
|
{
|
|
23
23
|
$flex: 1,
|
|
24
24
|
$alignItems: "center",
|
|
@@ -27,42 +27,44 @@ const w = ({
|
|
|
27
27
|
$height: "100%",
|
|
28
28
|
$gapX: 2,
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
r
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
30
|
+
/* @__PURE__ */ e(T, { isLoading: l }),
|
|
31
|
+
/* @__PURE__ */ e(f, { src: m.CIRCLE_CUEMATH_LOGO_WHITE, alt: "Parent Signup", withLoader: !1 }),
|
|
32
|
+
/* @__PURE__ */ e(o, { heightX: 1 }),
|
|
33
|
+
/* @__PURE__ */ e(n, { $renderAs: "ab1", $color: "WHITE_T_60", $align: "center", children: "Switch between accounts" }),
|
|
34
|
+
/* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
|
|
35
|
+
i.length > 0 && /* @__PURE__ */ r(s, { children: [
|
|
36
|
+
/* @__PURE__ */ e(u, { users: i, onSelect: c, onAddNew: h }),
|
|
37
|
+
/* @__PURE__ */ e(o, { heightX: a ? 1.5 : 5 }),
|
|
38
|
+
/* @__PURE__ */ r(
|
|
39
|
+
t,
|
|
40
|
+
{
|
|
41
|
+
$gutterX: 0.5,
|
|
42
|
+
$gapX: 1,
|
|
43
|
+
$flexGapX: 0.5,
|
|
44
|
+
$width: 280,
|
|
45
|
+
$borderColor: "BLACK_5",
|
|
46
|
+
$background: "BLACK_3",
|
|
47
|
+
$flexDirection: "row",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ e(
|
|
50
|
+
w,
|
|
51
|
+
{
|
|
52
|
+
src: m.CUEMATH_APP_QR_CODE,
|
|
53
|
+
width: 80,
|
|
54
|
+
height: 80,
|
|
55
|
+
withLoader: !1
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ e(t, { $gapX: 0.5, $flex: 1, children: /* @__PURE__ */ e(n, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", children: "Download the cuemath app to view your children’s report" }) })
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] })
|
|
61
63
|
]
|
|
62
64
|
}
|
|
63
65
|
);
|
|
64
|
-
},
|
|
66
|
+
}, y = d(L);
|
|
65
67
|
export {
|
|
66
|
-
|
|
68
|
+
y as default
|
|
67
69
|
};
|
|
68
70
|
//# sourceMappingURL=account-selector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} />\n
|
|
1
|
+
{"version":3,"file":"account-selector.js","sources":["../../../../src/features/auth/account-selector/account-selector.tsx"],"sourcesContent":["import type { IAccountSelectorViewProps } from './account-selector-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { EDeviceType } from '../../ui/theme/constants';\nimport OverlayLoader from '../comps/overlay-loader/overlay-loader';\nimport UserList from '../comps/user-list/user-list';\nimport * as Styled from './account-selector-styled';\n\nconst AccountSelector = ({\n userAccounts,\n onSelect,\n onAddNew,\n isLoading,\n}: IAccountSelectorViewProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n return (\n <FlexView\n $flex={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n $height=\"100%\"\n $gapX={2}\n >\n <OverlayLoader isLoading={isLoading} />\n <Image src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} alt=\"Parent Signup\" withLoader={false} />\n <Separator heightX={1} />\n <Text $renderAs=\"ab1\" $color=\"WHITE_T_60\" $align=\"center\">\n Switch between accounts\n </Text>\n <Separator heightX={isCompact ? 1.5 : 5} />\n {userAccounts.length > 0 && (\n <>\n <UserList users={userAccounts} onSelect={onSelect} onAddNew={onAddNew} />\n <Separator heightX={isCompact ? 1.5 : 5} />\n <FlexView\n $gutterX={0.5}\n $gapX={1}\n $flexGapX={0.5}\n $width={280}\n $borderColor=\"BLACK_5\"\n $background=\"BLACK_3\"\n $flexDirection=\"row\"\n >\n <Styled.ImageWrapper\n src={ILLUSTRATIONS.CUEMATH_APP_QR_CODE}\n width={80}\n height={80}\n withLoader={false}\n />\n <FlexView $gapX={0.5} $flex={1}>\n <Text $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\">\n Download the cuemath app to view your children’s report\n </Text>\n </FlexView>\n </FlexView>\n </>\n )}\n </FlexView>\n );\n};\n\nexport default memo(AccountSelector);\n"],"names":["AccountSelector","userAccounts","onSelect","onAddNew","isLoading","device","useTheme","isCompact","EDeviceType","jsxs","FlexView","jsx","OverlayLoader","Image","ILLUSTRATIONS","Separator","Text","Fragment","UserList","Styled.ImageWrapper","accountSelector","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAkB,CAAC;AAAA,EACvB,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,MAAiC;AACzB,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY;AAGtC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,OAAO;AAAA,MAEP,UAAA;AAAA,Q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
import l from "../../../../ui/layout/flex-view.js";
|
|
3
|
-
|
|
3
|
+
import s from "../../../../ui/text/text.js";
|
|
4
|
+
const x = t(l)`
|
|
4
5
|
cursor: pointer;
|
|
5
6
|
transition: background-color 0.3s ease;
|
|
6
7
|
position: relative;
|
|
@@ -13,9 +14,14 @@ const c = t(l)`
|
|
|
13
14
|
|
|
14
15
|
${({ index: o, theme: r, maxColumns: e }) => o < e && `border-top: 1px solid ${r.colors.BLACK_5};`}
|
|
15
16
|
|
|
16
|
-
${({ index: o, isLastItem: r, theme: e, maxColumns:
|
|
17
|
+
${({ index: o, isLastItem: r, theme: e, maxColumns: i }) => ((o + 1) % i === 0 || r) && `border-right: 1px solid ${e.colors.BLACK_5};`}
|
|
18
|
+
`, m = t(s)`
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
max-width: 100%;
|
|
17
22
|
`;
|
|
18
23
|
export {
|
|
19
|
-
|
|
24
|
+
m as TitleText,
|
|
25
|
+
x as UserItemCard
|
|
20
26
|
};
|
|
21
27
|
//# sourceMappingURL=user-item-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-item-styled.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const UserItemCard = styled(FlexView)<{\n index: number;\n isLastItem?: boolean;\n maxColumns: number;\n}>`\n cursor: pointer;\n transition: background-color 0.3s ease;\n position: relative;\n border-left: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n border-bottom: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n\n &:hover {\n background-color: ${({ theme }) => theme.colors.BLACK_2};\n }\n\n ${({ index, theme, maxColumns }) =>\n index < maxColumns && `border-top: 1px solid ${theme.colors.BLACK_5};`}\n\n ${({ index, isLastItem, theme, maxColumns }) =>\n ((index + 1) % maxColumns === 0 || isLastItem) &&\n `border-right: 1px solid ${theme.colors.BLACK_5};`}\n`;\n"],"names":["UserItemCard","styled","FlexView","theme","index","maxColumns","isLastItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"user-item-styled.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nexport const UserItemCard = styled(FlexView)<{\n index: number;\n isLastItem?: boolean;\n maxColumns: number;\n}>`\n cursor: pointer;\n transition: background-color 0.3s ease;\n position: relative;\n border-left: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n border-bottom: 1px solid ${({ theme }) => theme.colors.BLACK_5};\n\n &:hover {\n background-color: ${({ theme }) => theme.colors.BLACK_2};\n }\n\n ${({ index, theme, maxColumns }) =>\n index < maxColumns && `border-top: 1px solid ${theme.colors.BLACK_5};`}\n\n ${({ index, isLastItem, theme, maxColumns }) =>\n ((index + 1) % maxColumns === 0 || isLastItem) &&\n `border-right: 1px solid ${theme.colors.BLACK_5};`}\n`;\n\nexport const TitleText = styled(Text)`\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n`;\n"],"names":["UserItemCard","styled","FlexView","theme","index","maxColumns","isLastItem","TitleText","Text"],"mappings":";;;AAKa,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,2BAQhB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BACjC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,wBAGxC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,IAGvD,CAAC,EAAE,OAAAC,GAAO,OAAAD,GAAO,YAAAE,EAAW,MAC5BD,IAAQC,KAAc,yBAAyBF,EAAM,OAAO,OAAO,GAAG;AAAA;AAAA,IAEtE,CAAC,EAAE,OAAAC,GAAO,YAAAE,GAAY,OAAAH,GAAO,YAAAE,EAC3B,QAAAD,IAAQ,KAAKC,MAAe,KAAKC,MACnC,2BAA2BH,EAAM,OAAO,OAAO,GAAG;AAAA,GAGzCI,IAAYN,EAAOO,CAAI;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { memo as g, useCallback as A } from "react";
|
|
3
3
|
import u from "../../../../ui/avatar/avatar.js";
|
|
4
4
|
import C from "../../../../ui/separator/separator.js";
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const d = ({
|
|
5
|
+
import { AVATAR_CONFIGURATIONS as n } from "../user-list-constants.js";
|
|
6
|
+
import { UserItemCard as I, TitleText as T } from "./user-item-styled.js";
|
|
7
|
+
const b = ({
|
|
9
8
|
id: r,
|
|
10
|
-
phone:
|
|
9
|
+
phone: m,
|
|
11
10
|
username: s,
|
|
12
11
|
avatar: i,
|
|
13
12
|
index: e,
|
|
@@ -17,13 +16,13 @@ const d = ({
|
|
|
17
16
|
maxColumns: $,
|
|
18
17
|
cardSize: a
|
|
19
18
|
}) => {
|
|
20
|
-
const
|
|
19
|
+
const h = A(() => {
|
|
21
20
|
o(r);
|
|
22
|
-
}, [r, o]),
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
21
|
+
}, [r, o]), p = i ?? n[e % n.length];
|
|
22
|
+
return /* @__PURE__ */ f(
|
|
23
|
+
I,
|
|
25
24
|
{
|
|
26
|
-
onClick:
|
|
25
|
+
onClick: h,
|
|
27
26
|
maxColumns: $,
|
|
28
27
|
$gutterX: 1.5,
|
|
29
28
|
$gapX: 1.5,
|
|
@@ -35,15 +34,15 @@ const d = ({
|
|
|
35
34
|
isLastItem: c,
|
|
36
35
|
$background: "BLACK_1",
|
|
37
36
|
children: [
|
|
38
|
-
/* @__PURE__ */ t(u, { size: l, avatar:
|
|
37
|
+
/* @__PURE__ */ t(u, { size: l, avatar: p }),
|
|
39
38
|
/* @__PURE__ */ t(C, { heightX: 0.5 }),
|
|
40
|
-
/* @__PURE__ */ t(
|
|
39
|
+
/* @__PURE__ */ t(T, { $color: "WHITE", $renderOnTabletAs: "ab3", $renderAs: "ab2", $align: "center", children: s || m })
|
|
41
40
|
]
|
|
42
41
|
},
|
|
43
42
|
r
|
|
44
43
|
);
|
|
45
|
-
},
|
|
44
|
+
}, O = g(b);
|
|
46
45
|
export {
|
|
47
|
-
|
|
46
|
+
O as default
|
|
48
47
|
};
|
|
49
48
|
//# sourceMappingURL=user-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-item.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item.tsx"],"sourcesContent":["import type { IUserItemProps } from './user-item-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport Avatar from '../../../../ui/avatar/avatar';\nimport Separator from '../../../../ui/separator/separator';\nimport
|
|
1
|
+
{"version":3,"file":"user-item.js","sources":["../../../../../../src/features/auth/comps/user-list/user-item/user-item.tsx"],"sourcesContent":["import type { IUserItemProps } from './user-item-types';\n\nimport { useCallback, type FC, memo } from 'react';\n\nimport Avatar from '../../../../ui/avatar/avatar';\nimport Separator from '../../../../ui/separator/separator';\nimport { AVATAR_CONFIGURATIONS } from '../user-list-constants';\nimport * as Styled from './user-item-styled';\n\nconst UserItem: FC<IUserItemProps> = ({\n id,\n phone,\n username,\n avatar,\n index,\n isLastItem,\n onSelect,\n avatarSize,\n maxColumns,\n cardSize,\n}) => {\n const handleClick = useCallback(() => {\n onSelect(id);\n }, [id, onSelect]);\n\n const avatarSource = avatar ?? AVATAR_CONFIGURATIONS[index % AVATAR_CONFIGURATIONS.length];\n\n return (\n <Styled.UserItemCard\n key={id}\n onClick={handleClick}\n maxColumns={maxColumns}\n $gutterX={1.5}\n $gapX={1.5}\n $width={cardSize}\n $height={cardSize}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n index={index}\n isLastItem={isLastItem}\n $background=\"BLACK_1\"\n >\n <Avatar size={avatarSize} avatar={avatarSource} />\n <Separator heightX={0.5} />\n <Styled.TitleText $color=\"WHITE\" $renderOnTabletAs=\"ab3\" $renderAs=\"ab2\" $align=\"center\">\n {username || phone}\n </Styled.TitleText>\n </Styled.UserItemCard>\n );\n};\n\nexport default memo(UserItem);\n"],"names":["UserItem","id","phone","username","avatar","index","isLastItem","onSelect","avatarSize","maxColumns","cardSize","handleClick","useCallback","avatarSource","AVATAR_CONFIGURATIONS","jsxs","Styled.UserItemCard","jsx","Avatar","Separator","Styled.TitleText","UserItem$1","memo"],"mappings":";;;;;;AASA,MAAMA,IAA+B,CAAC;AAAA,EACpC,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACE,QAAAC,IAAcC,EAAY,MAAM;AACpC,IAAAL,EAASN,CAAE;AAAA,EAAA,GACV,CAACA,GAAIM,CAAQ,CAAC,GAEXM,IAAeT,KAAUU,EAAsBT,IAAQS,EAAsB,MAAM;AAGvF,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MAEC,SAASL;AAAA,MACT,YAAAF;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,QAAQC;AAAA,MACR,SAASA;AAAA,MACT,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,OAAAL;AAAA,MACA,YAAAC;AAAA,MACA,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAW,EAACC,GAAO,EAAA,MAAMV,GAAY,QAAQK,GAAc;AAAA,QAChD,gBAAAI,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,QACxB,gBAAAF,EAAAG,GAAA,EAAiB,QAAO,SAAQ,mBAAkB,OAAM,WAAU,OAAM,QAAO,UAC7E,eAAYlB,EACf,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAjBKD;AAAA,EAAA;AAoBX,GAEeoB,IAAAC,EAAKtB,CAAQ;"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { jsxs as w, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as e } from "react";
|
|
3
|
+
import x, { keyframes as A, css as I } from "styled-components";
|
|
4
|
+
import T from "../../assets/line-icons/icons/cross.js";
|
|
5
|
+
import W from "../ui/layout/flex-view.js";
|
|
6
|
+
import k from "../ui/text/text.js";
|
|
7
|
+
const C = ({ $position: r, $verticalDist: o }) => A`
|
|
8
|
+
${(r === "top-right" || r === "top-left") && `
|
|
9
|
+
0% {
|
|
10
|
+
top: 0;
|
|
11
|
+
}
|
|
12
|
+
100% {
|
|
13
|
+
top: ${o}px;
|
|
14
|
+
}
|
|
15
|
+
`};
|
|
16
|
+
${(r === "bottom-left" || r === "bottom-right") && `
|
|
17
|
+
0% {
|
|
18
|
+
bottom: 0;
|
|
19
|
+
}
|
|
20
|
+
100% {
|
|
21
|
+
bottom: ${o}px;
|
|
22
|
+
}
|
|
23
|
+
`};
|
|
24
|
+
`, E = ({ $position: r, $verticalDist: o, $horizontalDist: t }) => I`
|
|
25
|
+
${r === "top-right" && `
|
|
26
|
+
top: ${o}px;
|
|
27
|
+
right: ${t}px;
|
|
28
|
+
`};
|
|
29
|
+
${r === "top-left" && `
|
|
30
|
+
top: ${o}px;
|
|
31
|
+
left: ${t}px;
|
|
32
|
+
`};
|
|
33
|
+
${r === "bottom-left" && `
|
|
34
|
+
bottom: ${o}px;
|
|
35
|
+
left: ${t}px;
|
|
36
|
+
`};
|
|
37
|
+
${r === "bottom-right" && `
|
|
38
|
+
bottom: ${o}px;
|
|
39
|
+
right: ${t}px;
|
|
40
|
+
`};
|
|
41
|
+
`, m = x.div`
|
|
42
|
+
position: fixed;
|
|
43
|
+
width: 310px;
|
|
44
|
+
padding: ${({ $gap: r, $gutter: o }) => `${r}px ${o}px`};
|
|
45
|
+
box-shadow: 0px 4px 8px 4px rgba(0, 0, 0, 0.05);
|
|
46
|
+
border-radius: 16px;
|
|
47
|
+
${E};
|
|
48
|
+
animation: ${C} 0.5s ease-in;
|
|
49
|
+
z-index: 105;
|
|
50
|
+
background: ${({ $notificationTheme: r, theme: o }) => {
|
|
51
|
+
var t, p;
|
|
52
|
+
return r === "white" ? (t = o == null ? void 0 : o.colors) == null ? void 0 : t.WHITE : (p = o == null ? void 0 : o.colors) == null ? void 0 : p.BLACK;
|
|
53
|
+
}};
|
|
54
|
+
color: ${({ $notificationTheme: r, theme: o }) => {
|
|
55
|
+
var t, p;
|
|
56
|
+
return r === "white" ? (t = o == null ? void 0 : o.colors) == null ? void 0 : t.BLACK : (p = o == null ? void 0 : o.colors) == null ? void 0 : p.WHITE;
|
|
57
|
+
}};
|
|
58
|
+
`, B = x.div`
|
|
59
|
+
width: 48px;
|
|
60
|
+
height: 48px;
|
|
61
|
+
background: ${({ $src: r }) => `url(${r})`};
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
border: 2px solid #ffffff;
|
|
64
|
+
position: absolute;
|
|
65
|
+
bottom: 88%;
|
|
66
|
+
`, H = x(W)`
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: -40px;
|
|
69
|
+
right: 0;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
`, K = x(k)`
|
|
72
|
+
white-space: pre-wrap;
|
|
73
|
+
`, L = ({
|
|
74
|
+
avatarUrl: r = null,
|
|
75
|
+
Component: o = null,
|
|
76
|
+
componentProps: t = {},
|
|
77
|
+
duration: p = null,
|
|
78
|
+
gap: f = 24,
|
|
79
|
+
gutter: u = 16,
|
|
80
|
+
hideNotification: c = () => null,
|
|
81
|
+
horizontalDist: $ = 50,
|
|
82
|
+
notificationTheme: s = "black",
|
|
83
|
+
position: i = "bottom-right",
|
|
84
|
+
showCloseIcon: b = !1,
|
|
85
|
+
text: d = null,
|
|
86
|
+
verticalDist: a = 60,
|
|
87
|
+
visible: n = !1
|
|
88
|
+
}) => (e(() => {
|
|
89
|
+
if (p && n) {
|
|
90
|
+
const g = setTimeout(() => {
|
|
91
|
+
c();
|
|
92
|
+
}, p * 1e3);
|
|
93
|
+
return () => {
|
|
94
|
+
clearTimeout(g);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
return () => {
|
|
98
|
+
};
|
|
99
|
+
}, [p, c, n]), n ? /* @__PURE__ */ w(
|
|
100
|
+
m,
|
|
101
|
+
{
|
|
102
|
+
$gap: f,
|
|
103
|
+
$gutter: u,
|
|
104
|
+
$horizontalDist: $,
|
|
105
|
+
$notificationTheme: s,
|
|
106
|
+
$position: i,
|
|
107
|
+
$verticalDist: a,
|
|
108
|
+
children: [
|
|
109
|
+
b && /* @__PURE__ */ l(
|
|
110
|
+
H,
|
|
111
|
+
{
|
|
112
|
+
onClick: c,
|
|
113
|
+
$background: s === "white" ? "WHITE" : "BLACK",
|
|
114
|
+
$borderRadiusX: 10,
|
|
115
|
+
$gutter: 2,
|
|
116
|
+
$gap: 2,
|
|
117
|
+
children: /* @__PURE__ */ l(T, { color: s === "white" ? "BLACK" : "WHITE" })
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
r && /* @__PURE__ */ l(B, { $src: r }),
|
|
121
|
+
d && /* @__PURE__ */ l(K, { $renderAs: "ub3", $color: s === "white" ? "BLACK" : "WHITE", children: d }),
|
|
122
|
+
o && /* @__PURE__ */ l(o, { ...t })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
) : null), V = L;
|
|
126
|
+
export {
|
|
127
|
+
V as default
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=notification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../src/features/notification/notification.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport styled, { keyframes, css } from 'styled-components';\n\nimport CrossIcon from '../../assets/line-icons/icons/cross';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\ntype Position = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right';\ntype NotificationTheme = 'white' | 'black';\n\ninterface SlideProps {\n $position: Position;\n $verticalDist: number;\n}\n\ninterface PositionProps {\n $position: Position;\n $verticalDist: number;\n $horizontalDist: number;\n}\n\ninterface WrapperProps extends PositionProps {\n $gap: number;\n $gutter: number;\n $notificationTheme: NotificationTheme;\n}\n\ninterface AvatarWrapperProps {\n $src: string;\n}\n\ninterface NotificationProps {\n avatarUrl?: string | null;\n Component?: React.ComponentType<Record<string, unknown>> | null;\n componentProps?: Record<string, unknown>;\n duration?: number | null;\n gap?: number;\n gutter?: number;\n hideNotification?: () => void;\n horizontalDist?: number;\n notificationTheme?: NotificationTheme;\n position?: Position;\n showCloseIcon?: boolean;\n text?: string | null;\n verticalDist?: number;\n visible?: boolean;\n}\n\nconst slide = ({ $position, $verticalDist }: SlideProps) => keyframes`\n ${\n ($position === 'top-right' || $position === 'top-left') &&\n `\n 0% {\n top: 0;\n }\n 100% {\n top: ${$verticalDist}px;\n }\n `\n };\n ${\n ($position === 'bottom-left' || $position === 'bottom-right') &&\n `\n 0% {\n bottom: 0;\n }\n 100% {\n bottom: ${$verticalDist}px;\n }\n `\n };\n`;\n\nconst notificationPostion = ({ $position, $verticalDist, $horizontalDist }: PositionProps) => css`\n ${$position === 'top-right' &&\n `\n top: ${$verticalDist}px;\n right: ${$horizontalDist}px;\n `};\n ${$position === 'top-left' &&\n `\n\ttop: ${$verticalDist}px;\n left: ${$horizontalDist}px;\n `};\n ${$position === 'bottom-left' &&\n `\n bottom: ${$verticalDist}px;\n left: ${$horizontalDist}px;\n `};\n ${$position === 'bottom-right' &&\n `\n bottom: ${$verticalDist}px;\n right: ${$horizontalDist}px;\n `};\n`;\n\nconst Wrapper = styled.div<WrapperProps>`\n position: fixed;\n width: 310px;\n padding: ${({ $gap, $gutter }) => `${$gap}px ${$gutter}px`};\n box-shadow: 0px 4px 8px 4px rgba(0, 0, 0, 0.05);\n border-radius: 16px;\n ${notificationPostion};\n animation: ${slide} 0.5s ease-in;\n z-index: 105;\n background: ${({ $notificationTheme, theme }) =>\n $notificationTheme === 'white' ? theme?.colors?.WHITE : theme?.colors?.BLACK};\n color: ${({ $notificationTheme, theme }) =>\n $notificationTheme === 'white' ? theme?.colors?.BLACK : theme?.colors?.WHITE};\n`;\n\nconst AvatarWrapper = styled.div<AvatarWrapperProps>`\n width: 48px;\n height: 48px;\n background: ${({ $src }) => `url(${$src})`};\n border-radius: 50%;\n border: 2px solid #ffffff;\n position: absolute;\n bottom: 88%;\n`;\n\nconst StyledIcon = styled(FlexView)`\n position: absolute;\n top: -40px;\n right: 0;\n cursor: pointer;\n`;\n\nconst StyledText = styled(Text)`\n white-space: pre-wrap;\n`;\n\nconst Notification: React.FC<NotificationProps> = ({\n avatarUrl = null,\n Component = null,\n componentProps = {},\n duration = null,\n gap = 24,\n gutter = 16,\n hideNotification = () => null,\n horizontalDist = 50,\n notificationTheme = 'black',\n position = 'bottom-right',\n showCloseIcon = false,\n text = null,\n verticalDist = 60,\n visible = false,\n}) => {\n useEffect(() => {\n if (duration && visible) {\n const countdown = setTimeout(() => {\n hideNotification();\n }, duration * 1000);\n\n return () => {\n clearTimeout(countdown);\n };\n }\n\n return () => {};\n }, [duration, hideNotification, visible]);\n\n if (!visible) return null;\n\n return (\n <Wrapper\n $gap={gap}\n $gutter={gutter}\n $horizontalDist={horizontalDist}\n $notificationTheme={notificationTheme}\n $position={position}\n $verticalDist={verticalDist}\n >\n {showCloseIcon && (\n <StyledIcon\n onClick={hideNotification}\n $background={notificationTheme === 'white' ? 'WHITE' : 'BLACK'}\n $borderRadiusX={10}\n $gutter={2}\n $gap={2}\n >\n <CrossIcon color={notificationTheme === 'white' ? 'BLACK' : 'WHITE'} />\n </StyledIcon>\n )}\n {avatarUrl && <AvatarWrapper $src={avatarUrl} />}\n {text && (\n <StyledText $renderAs=\"ub3\" $color={notificationTheme === 'white' ? 'BLACK' : 'WHITE'}>\n {text}\n </StyledText>\n )}\n {Component && <Component {...componentProps} />}\n </Wrapper>\n );\n};\n\nexport default Notification;\n"],"names":["slide","$position","$verticalDist","keyframes","notificationPostion","$horizontalDist","css","Wrapper","styled","$gap","$gutter","$notificationTheme","theme","_a","_b","AvatarWrapper","$src","StyledIcon","FlexView","StyledText","Text","Notification","avatarUrl","Component","componentProps","duration","gap","gutter","hideNotification","horizontalDist","notificationTheme","position","showCloseIcon","text","verticalDist","visible","useEffect","countdown","jsxs","jsx","CrossIcon","Notification$1"],"mappings":";;;;;;AAgDA,MAAMA,IAAQ,CAAC,EAAE,WAAAC,GAAW,eAAAC,QAAgCC;AAAA,KAEvDF,MAAc,eAAeA,MAAc,eAC5C;AAAA;AAAA;AAAA;AAAA;AAAA,eAKWC,CAAa;AAAA;AAAA,GAG1B;AAAA,KAEGD,MAAc,iBAAiBA,MAAc,mBAC9C;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKcC,CAAa;AAAA;AAAA,GAG7B;AAAA,GAGIE,IAAsB,CAAC,EAAE,WAAAH,GAAW,eAAAC,GAAe,iBAAAG,QAAqCC;AAAA,IAC1FL,MAAc,eAChB;AAAA,WACSC,CAAa;AAAA,aACXG,CAAe;AAAA,GACzB;AAAA,IACCJ,MAAc,cAChB;AAAA,QACMC,CAAa;AAAA,YACTG,CAAe;AAAA,GACxB;AAAA,IACCJ,MAAc,iBAChB;AAAA,cACYC,CAAa;AAAA,YACfG,CAAe;AAAA,GACxB;AAAA,IACCJ,MAAc,kBAChB;AAAA,cACYC,CAAa;AAAA,aACdG,CAAe;AAAA,GACzB;AAAA,GAGGE,IAAUC,EAAO;AAAA;AAAA;AAAA,aAGV,CAAC,EAAE,MAAAC,GAAM,SAAAC,QAAc,GAAGD,CAAI,MAAMC,CAAO,IAAI;AAAA;AAAA;AAAA,IAGxDN,CAA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AA;AAAA,EAE1B;AAEA,SAAO,MAAM;AAAA,EAAA;AACZ,GAAA,CAACZ,GAAUG,GAAkBO,CAAO,CAAC,GAEnCA,IAGH,gBAAAG;AAAA,EAAC/B;AAAA,EAAA;AAAA,IACC,MAAMmB;AAAA,IACN,SAASC;AAAA,IACT,iBAAiBE;AAAA,IACjB,oBAAoBC;AAAA,IACpB,WAAWC;AAAA,IACX,eAAeG;AAAA,IAEd,UAAA;AAAA,MACCF,KAAA,gBAAAO;AAAA,QAACtB;AAAA,QAAA;AAAA,UACC,SAASW;AAAA,UACT,aAAaE,MAAsB,UAAU,UAAU;AAAA,UACvD,gBAAgB;AAAA,UAChB,SAAS;AAAA,UACT,MAAM;AAAA,UAEN,4BAACU,GAAU,EAAA,OAAOV,MAAsB,UAAU,UAAU,SAAS;AAAA,QAAA;AAAA,MACvE;AAAA,MAEDR,KAAa,gBAAAiB,EAACxB,GAAc,EAAA,MAAMO,EAAW,CAAA;AAAA,MAC7CW,KACE,gBAAAM,EAAApB,GAAA,EAAW,WAAU,OAAM,QAAQW,MAAsB,UAAU,UAAU,SAC3E,UACHG,EAAA,CAAA;AAAA,MAEDV,KAAa,gBAAAgB,EAAChB,GAAW,EAAA,GAAGC,EAAgB,CAAA;AAAA,IAAA;AAAA,EAAA;AAAA,IA5B5B,OAiCvBiB,IAAepB;"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import n from "styled-components";
|
|
2
|
+
const a = n.div`
|
|
3
|
+
margin-left: ${({ theme: t }) => t.layout.gutter}px;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
margin: ${({ $wrapperMargin: t }) => t};
|
|
6
|
+
`, o = n.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
transition: transform 1s ease;
|
|
9
|
+
transform: ${({ $position: t }) => `translateX(calc(${t} * (-100%)))`};
|
|
10
|
+
`, s = n.div`
|
|
11
|
+
padding-right: ${({ theme: t }) => t.layout.gutter}px;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex: 1 0 100%;
|
|
14
|
+
transition: opacity 1s ease;
|
|
15
|
+
padding: ${({ $carouselSlotPadding: t }) => t};
|
|
16
|
+
${({ $slideAlign: t }) => t === "center" && `
|
|
17
|
+
display:flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
`}
|
|
20
|
+
`, l = n.div`
|
|
21
|
+
margin-top: 12px;
|
|
22
|
+
text-align: center;
|
|
23
|
+
${({ $flexCenterIndicators: t }) => t && `
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
`}
|
|
28
|
+
`, d = n.span`
|
|
29
|
+
background: ${({ $isCurrent: t, $dotColor: e, $inactiveDotColor: i }) => t ? e : i};
|
|
30
|
+
width: ${({ $isCurrent: t, $activeIndicatorSize: e }) => t ? e : "8px"};
|
|
31
|
+
height: ${({ $isCurrent: t, $activeIndicatorSize: e }) => t ? e : "8px"};
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
margin-right: 5px;
|
|
34
|
+
display: inline-block;
|
|
35
|
+
transition: background 0.5s ease;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
`;
|
|
38
|
+
export {
|
|
39
|
+
o as CarouselContainer,
|
|
40
|
+
s as CarouselSlot,
|
|
41
|
+
l as Container,
|
|
42
|
+
d as Dot,
|
|
43
|
+
a as Wrapper
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=carousal-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousal-styles.js","sources":["../../../../src/features/ui/carousal/carousal-styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\ninterface WrapperProps {\n $wrapperMargin?: string;\n}\n\nexport const Wrapper = styled.div<WrapperProps>`\n margin-left: ${({ theme }) => theme.layout.gutter}px;\n overflow: hidden;\n margin: ${({ $wrapperMargin }) => $wrapperMargin};\n`;\n\ninterface CarouselContainerProps {\n $position: number;\n}\nexport const CarouselContainer = styled.div<CarouselContainerProps>`\n display: flex;\n transition: transform 1s ease;\n transform: ${({ $position }) => `translateX(calc(${$position} * (-100%)))`};\n`;\n\ninterface CarouselSlotProps {\n $carouselSlotPadding?: string;\n $slideAlign?: string | null;\n}\nexport const CarouselSlot = styled.div<CarouselSlotProps>`\n padding-right: ${({ theme }) => theme.layout.gutter}px;\n display: flex;\n flex: 1 0 100%;\n transition: opacity 1s ease;\n padding: ${({ $carouselSlotPadding }) => $carouselSlotPadding};\n ${({ $slideAlign }) =>\n $slideAlign === 'center' &&\n `\n display:flex;\n justify-content: center;\n `}\n`;\n\ninterface ContainerProps {\n $flexCenterIndicators?: boolean;\n}\nexport const Container = styled.div<ContainerProps>`\n margin-top: 12px;\n text-align: center;\n ${({ $flexCenterIndicators }) =>\n $flexCenterIndicators &&\n `\n display: flex;\n justify-content: center;\n align-items: center;\n `}\n`;\n\ninterface DotProps {\n $isCurrent: boolean;\n $dotColor: string;\n $inactiveDotColor: string;\n $activeIndicatorSize: string;\n}\nexport const Dot = styled.span<DotProps>`\n background: ${({ $isCurrent, $dotColor, $inactiveDotColor }) =>\n $isCurrent ? $dotColor : $inactiveDotColor};\n width: ${({ $isCurrent, $activeIndicatorSize }) => ($isCurrent ? $activeIndicatorSize : '8px')};\n height: ${({ $isCurrent, $activeIndicatorSize }) => ($isCurrent ? $activeIndicatorSize : '8px')};\n border-radius: 50%;\n margin-right: 5px;\n display: inline-block;\n transition: background 0.5s ease;\n cursor: pointer;\n`;\n"],"names":["Wrapper","styled","theme","$wrapperMargin","CarouselContainer","$position","CarouselSlot","$carouselSlotPadding","$slideAlign","Container","$flexCenterIndicators","Dot","$isCurrent","$dotColor","$inactiveDotColor","$activeIndicatorSize"],"mappings":";AAMO,MAAMA,IAAUC,EAAO;AAAA,iBACb,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,MAAM;AAAA;AAAA,YAEvC,CAAC,EAAE,gBAAAC,EAAe,MAAMA,CAAc;AAAA,GAMrCC,IAAoBH,EAAO;AAAA;AAAA;AAAA,eAGzB,CAAC,EAAE,WAAAI,EAAgB,MAAA,mBAAmBA,CAAS,cAAc;AAAA,GAO/DC,IAAeL,EAAO;AAAA,mBAChB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA,aAIxC,CAAC,EAAE,sBAAAK,EAAqB,MAAMA,CAAoB;AAAA,IAC3D,CAAC,EAAE,aAAAC,EAAY,MACfA,MAAgB,YAChB;AAAA;AAAA;AAAA,GAGD;AAAA,GAMUC,IAAYR,EAAO;AAAA;AAAA;AAAA,IAG5B,CAAC,EAAE,uBAAAS,QACHA,KACA;AAAA;AAAA;AAAA;AAAA,GAID;AAAA,GASUC,IAAMV,EAAO;AAAA,gBACV,CAAC,EAAE,YAAAW,GAAY,WAAAC,GAAW,mBAAAC,QACtCF,IAAaC,IAAYC,CAAiB;AAAA,WACnC,CAAC,EAAE,YAAAF,GAAY,sBAAAG,EAA4B,MAAAH,IAAaG,IAAuB,KAAM;AAAA,YACpF,CAAC,EAAE,YAAAH,GAAY,sBAAAG,EAA4B,MAAAH,IAAaG,IAAuB,KAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as q, Fragment as G, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as H, useRef as J, useCallback as o, useEffect as L } from "react";
|
|
3
|
+
import { getTheme as N } from "../theme/get-theme.js";
|
|
4
|
+
import { Wrapper as Q, CarouselContainer as U, CarouselSlot as _, Container as V, Dot as X } from "./carousal-styles.js";
|
|
5
|
+
const { colors: j } = N(), Y = ({
|
|
6
|
+
children: l,
|
|
7
|
+
initialPosition: B = 0,
|
|
8
|
+
infinite: p = !1,
|
|
9
|
+
slideDuration: $ = 8e3,
|
|
10
|
+
dotColor: K = j.BLACK,
|
|
11
|
+
changeColor: m = () => null,
|
|
12
|
+
slideAlign: y = null,
|
|
13
|
+
inactiveDotColor: b = j.BLACK_T_15,
|
|
14
|
+
activeIndicatorSize: z = "8px",
|
|
15
|
+
flexCenterIndicators: D = !1,
|
|
16
|
+
isTestimonial: i = !1,
|
|
17
|
+
setColor: n = () => null,
|
|
18
|
+
setPosition: g = () => null,
|
|
19
|
+
carouselSlotPadding: x = "",
|
|
20
|
+
wrapperMargin: E = "",
|
|
21
|
+
hideIndicators: F = !1,
|
|
22
|
+
autoScroll: C = !0,
|
|
23
|
+
nodeRef: e = null,
|
|
24
|
+
onChange: S = () => null
|
|
25
|
+
}) => {
|
|
26
|
+
const [r, M] = H(B), A = J(null), f = o(
|
|
27
|
+
(t) => {
|
|
28
|
+
M(t), g(t), e && e.current && (e.current.position = t), S();
|
|
29
|
+
},
|
|
30
|
+
[g, e, S]
|
|
31
|
+
), s = o(
|
|
32
|
+
(t, c = !1) => {
|
|
33
|
+
const k = (Array.isArray(l) ? l : [l]).length;
|
|
34
|
+
let a = r;
|
|
35
|
+
i && n && n(a), t === "next" ? (a = r + 1, a > k - 1 && (a = c ? 0 : r)) : (a = r - 1, a < 0 && (a = c ? k - 1 : r)), a !== r && f(a);
|
|
36
|
+
},
|
|
37
|
+
[r, l, i, n, f]
|
|
38
|
+
), v = o(() => s("next", p), [s, p]), I = o(() => s("prev", p), [s, p]), W = o(
|
|
39
|
+
(t) => {
|
|
40
|
+
i && n && n(r), t !== r && f(t);
|
|
41
|
+
},
|
|
42
|
+
[r, i, n, f]
|
|
43
|
+
);
|
|
44
|
+
L(() => (e && e.current && (e.current.next = v, e.current.prev = I, e.current.position = r), C && (A.current = setInterval(() => s("next", !0), $)), () => {
|
|
45
|
+
A.current && clearInterval(A.current);
|
|
46
|
+
}), [$, C, e, r, v, I, s]), L(() => {
|
|
47
|
+
m(r);
|
|
48
|
+
}, [r, m]);
|
|
49
|
+
const h = Array.isArray(l) ? l.length : 1;
|
|
50
|
+
return /* @__PURE__ */ q(G, { children: [
|
|
51
|
+
/* @__PURE__ */ u(Q, { $wrapperMargin: E, children: /* @__PURE__ */ u(U, { $position: r, children: Array.isArray(l) ? l.map((t, c) => /* @__PURE__ */ u(
|
|
52
|
+
_,
|
|
53
|
+
{
|
|
54
|
+
$carouselSlotPadding: x,
|
|
55
|
+
$slideAlign: y,
|
|
56
|
+
children: t
|
|
57
|
+
},
|
|
58
|
+
c
|
|
59
|
+
)) : /* @__PURE__ */ u(_, { $carouselSlotPadding: x, $slideAlign: y, children: l }) }) }),
|
|
60
|
+
h > 1 && !F && /* @__PURE__ */ u(V, { $flexCenterIndicators: D, children: Array.from({ length: h }, (t, c) => /* @__PURE__ */ u(
|
|
61
|
+
X,
|
|
62
|
+
{
|
|
63
|
+
onClick: () => W(c),
|
|
64
|
+
$isCurrent: c === r,
|
|
65
|
+
$dotColor: K,
|
|
66
|
+
$inactiveDotColor: b,
|
|
67
|
+
$activeIndicatorSize: z
|
|
68
|
+
},
|
|
69
|
+
c
|
|
70
|
+
)) })
|
|
71
|
+
] });
|
|
72
|
+
}, T = Y;
|
|
73
|
+
export {
|
|
74
|
+
T as default
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=carousal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"carousal.js","sources":["../../../../src/features/ui/carousal/carousal.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, useCallback } from 'react';\n\nimport { getTheme } from '../theme/get-theme';\nimport { CarouselContainer, CarouselSlot, Container, Dot, Wrapper } from './carousal-styles';\n\nconst { colors } = getTheme();\n\ninterface CarouselProps {\n children: React.ReactNode[] | React.ReactNode;\n initialPosition?: number;\n infinite?: boolean;\n slideDuration?: number;\n dotColor?: string;\n changeColor?: (position: number) => void;\n slideAlign?: string | null;\n inactiveDotColor?: string;\n activeIndicatorSize?: string;\n flexCenterIndicators?: boolean;\n isTestimonial?: boolean;\n setColor?: (position: number) => void;\n setPosition?: (position: number) => void;\n carouselSlotPadding?: string;\n wrapperMargin?: string;\n hideIndicators?: boolean;\n autoScroll?: boolean;\n nodeRef?: { current?: { next?: () => void; prev?: () => void; position?: number } } | null;\n onChange?: () => void;\n}\n\nconst Carousel: React.FC<CarouselProps> = ({\n children,\n initialPosition = 0,\n infinite = false,\n slideDuration = 8000,\n dotColor = colors.BLACK,\n changeColor = () => null,\n slideAlign = null,\n inactiveDotColor = colors.BLACK_T_15,\n activeIndicatorSize = '8px',\n flexCenterIndicators = false,\n isTestimonial = false,\n setColor = () => null,\n setPosition = () => null,\n carouselSlotPadding = '',\n wrapperMargin = '',\n hideIndicators = false,\n autoScroll = true,\n nodeRef = null,\n onChange = () => null,\n}) => {\n const [position, setPositionState] = useState(initialPosition);\n const autoSlideRef = useRef<NodeJS.Timeout | null>(null);\n\n const slide = useCallback(\n (newPosition: number) => {\n setPositionState(newPosition);\n setPosition(newPosition);\n if (nodeRef && nodeRef.current) {\n nodeRef.current.position = newPosition;\n }\n onChange();\n },\n [setPosition, nodeRef, onChange],\n );\n\n const changeSlide = useCallback(\n (action: 'next' | 'prev', infiniteOverride = false) => {\n const childrenArray = Array.isArray(children) ? children : [children];\n const numItems = childrenArray.length;\n let newPosition = position;\n\n if (isTestimonial && setColor) {\n setColor(newPosition);\n }\n\n if (action === 'next') {\n newPosition = position + 1;\n if (newPosition > numItems - 1) {\n newPosition = infiniteOverride ? 0 : position;\n }\n } else {\n newPosition = position - 1;\n if (newPosition < 0) {\n newPosition = infiniteOverride ? numItems - 1 : position;\n }\n }\n\n if (newPosition !== position) slide(newPosition);\n },\n [position, children, isTestimonial, setColor, slide],\n );\n\n const nextSlide = useCallback(() => changeSlide('next', infinite), [changeSlide, infinite]);\n const prevSlide = useCallback(() => changeSlide('prev', infinite), [changeSlide, infinite]);\n\n const onIndicatorClick = useCallback(\n (newPosition: number) => {\n if (isTestimonial && setColor) {\n setColor(position);\n }\n\n if (newPosition !== position) {\n slide(newPosition);\n }\n },\n [position, isTestimonial, setColor, slide],\n );\n\n useEffect(() => {\n if (nodeRef && nodeRef.current) {\n nodeRef.current.next = nextSlide;\n nodeRef.current.prev = prevSlide;\n nodeRef.current.position = position;\n }\n\n if (autoScroll) {\n autoSlideRef.current = setInterval(() => changeSlide('next', true), slideDuration);\n }\n\n return () => {\n if (autoSlideRef.current) {\n clearInterval(autoSlideRef.current);\n }\n };\n }, [slideDuration, autoScroll, nodeRef, position, nextSlide, prevSlide, changeSlide]);\n\n useEffect(() => {\n changeColor(position);\n }, [position, changeColor]);\n\n const carouselLength = Array.isArray(children) ? children.length : 1;\n\n return (\n <>\n <Wrapper $wrapperMargin={wrapperMargin}>\n <CarouselContainer $position={position}>\n {Array.isArray(children) ? (\n children.map((child, index) => (\n <CarouselSlot\n key={index}\n $carouselSlotPadding={carouselSlotPadding}\n $slideAlign={slideAlign}\n >\n {child}\n </CarouselSlot>\n ))\n ) : (\n <CarouselSlot $carouselSlotPadding={carouselSlotPadding} $slideAlign={slideAlign}>\n {children}\n </CarouselSlot>\n )}\n </CarouselContainer>\n </Wrapper>\n {carouselLength > 1 && !hideIndicators && (\n <Container $flexCenterIndicators={flexCenterIndicators}>\n {Array.from({ length: carouselLength }, (_, index) => (\n <Dot\n key={index}\n onClick={() => onIndicatorClick(index)}\n $isCurrent={index === position}\n $dotColor={dotColor}\n $inactiveDotColor={inactiveDotColor}\n $activeIndicatorSize={activeIndicatorSize}\n />\n ))}\n </Container>\n )}\n </>\n );\n};\n\nexport default Carousel;\n"],"names":["colors","getTheme","Carousel","children","initialPosition","infinite","slideDuration","dotColor","changeColor","slideAlign","inactiveDotColor","activeIndicatorSize","flexCenterIndicators","isTestimonial","setColor","setPosition","carouselSlotPadding","wrapperMargin","hideIndicators","autoScroll","nodeRef","onChange","position","setPositionState","useState","autoSlideRef","useRef","slide","useCallback","newPosition","changeSlide","action","infiniteOverride","numItems","nextSlide","prevSlide","onIndicatorClick","useEffect","carouselLength","jsxs","Fragment","jsx","Wrapper","CarouselContainer","child","index","CarouselSlot","Container","_","Dot","Carousel$1"],"mappings":";;;;AAKA,MAAM,EAAE,QAAAA,EAAO,I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Z,UAAAmC;AAAA,MAAA;AAAA,MAJIC;AAAA,IAMR,CAAA,IAED,gBAAAJ,EAACK,GAAa,EAAA,sBAAsB9B,GAAqB,aAAaP,GACnE,UAAAN,GACH,EAAA,CAEJ,EACF,CAAA;AAAA,IACCmC,IAAiB,KAAK,CAACpB,KACtB,gBAAAuB,EAACM,KAAU,uBAAuBnC,GAC/B,UAAM,MAAA,KAAK,EAAE,QAAQ0B,EAAA,GAAkB,CAACU,GAAGH,MAC1C,gBAAAJ;AAAA,MAACQ;AAAA,MAAA;AAAA,QAEC,SAAS,MAAMb,EAAiBS,CAAK;AAAA,QACrC,YAAYA,MAAUvB;AAAA,QACtB,WAAWf;AAAA,QACX,mBAAmBG;AAAA,QACnB,sBAAsBC;AAAA,MAAA;AAAA,MALjBkC;AAAA,IAOR,CAAA,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAK,IAAehD;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import p from "styled-components";
|
|
2
|
+
const a = p.canvas`
|
|
3
|
+
${({ $renderWidth: o }) => typeof o == "number" ? `width: ${o}px;` : `width: ${o};`}
|
|
4
|
+
${({ $renderHeight: o }) => typeof o == "number" ? `height: ${o}px;` : `height: ${o};`}
|
|
5
|
+
`;
|
|
6
|
+
export {
|
|
7
|
+
a as Canvas
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=dot-lottie-animation-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dot-lottie-animation-styled.js","sources":["../../../../src/features/ui/dot-lottie-animations/dot-lottie-animation-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const Canvas = styled.canvas<{\n $renderWidth: string | number;\n $renderHeight: string | number;\n}>`\n ${({ $renderWidth }) =>\n typeof $renderWidth === 'number' ? `width: ${$renderWidth}px;` : `width: ${$renderWidth};`}\n ${({ $renderHeight }) =>\n typeof $renderHeight === 'number' ? `height: ${$renderHeight}px;` : `height: ${$renderHeight};`}\n`;\n"],"names":["Canvas","styled","$renderWidth","$renderHeight"],"mappings":";AAEO,MAAMA,IAASC,EAAO;AAAA,IAIzB,CAAC,EAAE,cAAAC,EAAa,MAChB,OAAOA,KAAiB,WAAW,UAAUA,CAAY,QAAQ,UAAUA,CAAY,GAAG;AAAA,IAC1F,CAAC,EAAE,eAAAC,EAAc,MACjB,OAAOA,KAAkB,WAAW,WAAWA,CAAa,QAAQ,WAAWA,CAAa,GAAG;AAAA;"}
|