@cuemath/leap 3.2.18-mb → 3.2.18
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/illustrations/illustrations.js +5 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +34 -0
- package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board.js +23 -0
- package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
- package/dist/assets/line-icons/icons/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.js.map +1 -0
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/assets/line-icons/icons/morning.js +35 -0
- package/dist/assets/line-icons/icons/morning.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab.js +23 -0
- package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
- package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker.js +46 -0
- package/dist/assets/line-icons/icons/sticker.js.map +1 -0
- package/dist/assets/lottie/lottie.js +11 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +26 -25
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +52 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +93 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +10 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +17 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -14
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +26 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +50 -0
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button.js +74 -0
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +35 -34
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +8 -9
- package/dist/features/auth/login/login-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +54 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +83 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +7 -7
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +3 -1
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -4
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +81 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +120 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +62 -0
- package/dist/features/puzzles/app/puzzle-app.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
- package/dist/features/ui/buttons/button/button.js +41 -38
- package/dist/features/ui/buttons/button/button.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +31 -27
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/buttons/text-button/text-button.js +26 -22
- package/dist/features/ui/buttons/text-button/text-button.js.map +1 -1
- package/dist/features/ui/drawer/drawer-styled.js +34 -0
- package/dist/features/ui/drawer/drawer-styled.js.map +1 -0
- package/dist/features/ui/drawer/drawer.js +42 -0
- package/dist/features/ui/drawer/drawer.js.map +1 -0
- package/dist/features/ui/error/error.js +65 -27
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/grade-selector/grade-selector.js +33 -27
- package/dist/features/ui/grade-selector/grade-selector.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +25 -29
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +34 -58
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +40 -14
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +14 -7
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +13 -12
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/{stickers/sticker-selector/sticker-selector-styles.js → ui/sticker-grid/sticker-grid-styles.js} +3 -4
- 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/streak-icon/streak-icon-styled.js +13 -13
- package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon.js +17 -15
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/tab/tab.js +30 -26
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/text/text.js +40 -36
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/constants.js +4 -2
- package/dist/features/ui/theme/constants.js.map +1 -1
- package/dist/features/ui/theme/get-device.js +3 -3
- package/dist/features/ui/theme/get-device.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +12 -13
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +24 -24
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +246 -260
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -28
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +166 -164
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/index.d.ts +194 -57
- package/dist/index.js +579 -541
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/calendar-purple.1a840b41.svg +1 -0
- package/dist/static/flying-disk.c7f6ed39.json +1 -0
- package/dist/static/graduation-cap.3be3340a.json +1 -0
- package/dist/static/handshake.287e7dfb.svg +1 -0
- package/dist/static/light-bulb.c6db0b23.json +1 -0
- package/dist/static/money.332aacf1.svg +1 -0
- package/dist/static/muscle.9bcfb8a7.json +1 -0
- package/dist/static/nudge-tap.0591aef4.json +1 -0
- package/dist/static/parent-avatar.822c7b9b.svg +1 -0
- package/dist/static/pencil.23df9da0.json +1 -0
- package/dist/static/plus-sign.de6af957.json +1 -0
- package/dist/static/racing-car.2cbf864e.json +1 -0
- package/dist/static/rocket.0a3ccab0.json +1 -0
- package/dist/static/shovel.abeec04c.json +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +1 -1
- package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
- package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -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 -25
- 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-styled.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js +0 -93
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +0 -39
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +0 -1
- package/dist/static/nudge-tap.5cb30093.json +0 -1057
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tooltip-body.js","sources":["../../../../../src/features/ui/arrow-tooltip/comps/tooltip-body.tsx"],"sourcesContent":["import type { ITooltipBodyProps } from './tooltip-body-types';\n\nimport React, { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../../text/text';\nimport * as Styled from './tooltip-body-styled';\n\nconst TooltipBody: React.FC<ITooltipBodyProps> = props => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n\n return (\n <Styled.TooltipBody {...props}>\n {typeof props.children === 'string' ? (\n <Text\n $renderAs={props.textVariant || 'body3'}\n $color={tooltipVariants[props.$renderAs].textColorName}\n $align=\"center\"\n >\n {props.children}\n </Text>\n ) : (\n props.children\n )}\n </Styled.TooltipBody>\n );\n};\n\nexport default memo(TooltipBody);\n"],"names":["TooltipBody","props","arrowTooltip","useTheme","tooltipVariants","jsx","Styled.TooltipBody","Text","TooltipBody$1","memo"],"mappings":";;;;;AAQA,MAAMA,IAA2C,CAASC,MAAA;AAClD,QAAA,EAAE,cAAAC,MAAiBC,KACnB,EAAE,iBAAAC,EAAoB,IAAAF;AAG1B,SAAA,gBAAAG,EAACC,GAAA,EAAoB,GAAGL,GACrB,UAAA,OAAOA,EAAM,YAAa,WACzB,gBAAAI;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,WAAWN,EAAM,eAAe;AAAA,MAChC,QAAQG,EAAgBH,EAAM,SAAS,EAAE;AAAA,MACzC,QAAO;AAAA,MAEN,UAAMA,EAAA;AAAA,IAAA;AAAA,EAAA,IAGTA,EAAM,SAEV,CAAA;AAEJ,GAEeO,IAAAC,EAAKT,CAAW;"}
|
@@ -1,55 +1,58 @@
|
|
1
|
-
import { jsx as t, jsxs as
|
2
|
-
import {
|
3
|
-
import { useTheme as
|
4
|
-
import { ILLUSTRATIONS as
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
|
8
|
-
|
1
|
+
import { jsx as t, jsxs as S, Fragment as T } from "react/jsx-runtime";
|
2
|
+
import { useMemo as g, useCallback as j } from "react";
|
3
|
+
import { useTheme as w } from "styled-components";
|
4
|
+
import { ILLUSTRATIONS as D } from "../../../../assets/illustrations/illustrations.js";
|
5
|
+
import F from "../../hooks/use-click-handler.js";
|
6
|
+
import { EDeviceType as u } from "../../theme/constants.js";
|
7
|
+
import { Button as H, Loader as M, Icon as N, Label as O } from "./button-styled.js";
|
8
|
+
const P = ({
|
9
|
+
label: s,
|
9
10
|
renderAs: o,
|
10
|
-
size:
|
11
|
-
shape:
|
12
|
-
disabled:
|
11
|
+
size: r = "regular",
|
12
|
+
shape: m = "curved",
|
13
|
+
disabled: f = !1,
|
13
14
|
busy: e = !1,
|
14
|
-
width:
|
15
|
-
widthX:
|
16
|
-
Icon:
|
17
|
-
iconPosition:
|
18
|
-
onClick:
|
19
|
-
alignSelf:
|
20
|
-
justifyContent:
|
21
|
-
analyticsLabel:
|
22
|
-
analyticsProps:
|
23
|
-
children:
|
24
|
-
|
15
|
+
width: $,
|
16
|
+
widthX: h,
|
17
|
+
Icon: a,
|
18
|
+
iconPosition: p = "left",
|
19
|
+
onClick: L,
|
20
|
+
alignSelf: B,
|
21
|
+
justifyContent: C = "center",
|
22
|
+
analyticsLabel: k,
|
23
|
+
analyticsProps: A,
|
24
|
+
children: v,
|
25
|
+
sizeOnMobile: d,
|
26
|
+
sizeOnTablet: i,
|
27
|
+
...x
|
25
28
|
}) => {
|
26
|
-
const { button:
|
29
|
+
const { button: E, device: c } = w(), n = g(() => c <= u.MOBILE ? d || i || r : c <= u.TABLET && i || r, [c, r, d, i]), { textVariant: I } = E.sizes[n], { handleClick: l } = F({ label: s, analyticsLabel: k, analyticsProps: A }, L), R = j(() => {
|
27
30
|
if (e) return null;
|
28
31
|
l();
|
29
32
|
}, [e, l]);
|
30
33
|
return /* @__PURE__ */ t(
|
31
|
-
|
34
|
+
H,
|
32
35
|
{
|
33
|
-
disabled:
|
34
|
-
$alignSelf:
|
35
|
-
$justifyContent:
|
36
|
-
$width:
|
37
|
-
$widthX:
|
36
|
+
disabled: f,
|
37
|
+
$alignSelf: B,
|
38
|
+
$justifyContent: C,
|
39
|
+
$width: $,
|
40
|
+
$widthX: h,
|
38
41
|
$renderAs: o,
|
39
42
|
$size: n,
|
40
|
-
$shape:
|
41
|
-
onClick:
|
43
|
+
$shape: m,
|
44
|
+
onClick: R,
|
42
45
|
"data-busy": e,
|
43
|
-
...
|
44
|
-
children: e ? /* @__PURE__ */ t(
|
45
|
-
|
46
|
-
/* @__PURE__ */ t(
|
47
|
-
|
46
|
+
...x,
|
47
|
+
children: e ? /* @__PURE__ */ t(M, { src: D.LOADER, alt: "Loader", $size: n }) : /* @__PURE__ */ S(T, { children: [
|
48
|
+
a ? /* @__PURE__ */ t(N, { $buttonRenderAs: o, $iconPosition: p, $size: n, children: /* @__PURE__ */ t(a, {}) }) : void 0,
|
49
|
+
/* @__PURE__ */ t(O, { $renderAs: I, $buttonRenderAs: o, children: s }),
|
50
|
+
v
|
48
51
|
] })
|
49
52
|
}
|
50
53
|
);
|
51
|
-
},
|
54
|
+
}, K = P;
|
52
55
|
export {
|
53
|
-
|
56
|
+
K as default
|
54
57
|
};
|
55
58
|
//# sourceMappingURL=button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"button.js","sources":["../../../../../src/features/ui/buttons/button/button.tsx"],"sourcesContent":["import type { IButtonProps } from './button-types';\n\nimport React, { useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport * as Styled from './button-styled';\n\nconst Button: React.FC<IButtonProps> = ({\n label,\n renderAs,\n size = 'regular',\n shape = 'curved',\n disabled = false,\n busy = false,\n width,\n widthX,\n Icon,\n iconPosition = 'left',\n onClick,\n alignSelf,\n justifyContent = 'center',\n analyticsLabel,\n analyticsProps,\n children,\n ...rest\n}) => {\n const { button } = useTheme();\n const { textVariant } = button.sizes[
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../../../src/features/ui/buttons/button/button.tsx"],"sourcesContent":["import type { IButtonProps } from './button-types';\n\nimport React, { useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport { EDeviceType } from '../../theme/constants';\nimport * as Styled from './button-styled';\n\nconst Button: React.FC<IButtonProps> = ({\n label,\n renderAs,\n size = 'regular',\n shape = 'curved',\n disabled = false,\n busy = false,\n width,\n widthX,\n Icon,\n iconPosition = 'left',\n onClick,\n alignSelf,\n justifyContent = 'center',\n analyticsLabel,\n analyticsProps,\n children,\n sizeOnMobile,\n sizeOnTablet,\n ...rest\n}) => {\n const { button, device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n const { textVariant } = button.sizes[renderSize];\n const { handleClick } = useClickHandler({ label, analyticsLabel, analyticsProps }, onClick);\n\n const handleOnClick = useCallback(() => {\n if (busy) return null;\n\n handleClick();\n }, [busy, handleClick]);\n\n return (\n <Styled.Button\n disabled={disabled}\n $alignSelf={alignSelf}\n $justifyContent={justifyContent}\n $width={width}\n $widthX={widthX}\n $renderAs={renderAs}\n $size={renderSize}\n $shape={shape}\n onClick={handleOnClick}\n data-busy={busy}\n {...rest}\n >\n {busy ? (\n <Styled.Loader src={ILLUSTRATIONS.LOADER} alt=\"Loader\" $size={renderSize} />\n ) : (\n <>\n {Icon ? (\n <Styled.Icon $buttonRenderAs={renderAs} $iconPosition={iconPosition} $size={renderSize}>\n <Icon />\n </Styled.Icon>\n ) : undefined}\n\n <Styled.Label $renderAs={textVariant} $buttonRenderAs={renderAs}>\n {label}\n </Styled.Label>\n\n {children}\n </>\n )}\n </Styled.Button>\n );\n};\n\nexport default Button;\n"],"names":["Button","label","renderAs","size","shape","disabled","busy","width","widthX","Icon","iconPosition","onClick","alignSelf","justifyContent","analyticsLabel","analyticsProps","children","sizeOnMobile","sizeOnTablet","rest","button","device","useTheme","renderSize","useMemo","EDeviceType","textVariant","handleClick","useClickHandler","handleOnClick","useCallback","jsx","Styled.Button","Styled.Loader","ILLUSTRATIONS","jsxs","Fragment","Styled.Icon","Styled.Label","Button$1"],"mappings":";;;;;;;AAUA,MAAMA,IAAiC,CAAC;AAAA,EACtC,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,QAAAC;AAAA,EAAA,MACAC;AAAAA,EACA,cAAAC,IAAe;AAAA,EACf,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,QAAAC,GAAQ,QAAAC,EAAO,IAAIC,EAAS,GAC9BC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBR,KAAgBC,KAAgBf,IAGrCkB,KAAUI,EAAY,UACjBP,KAAgBf,GAIxB,CAACkB,GAAQlB,GAAMc,GAAcC,CAAY,CAAC,GAEvC,EAAE,aAAAQ,EAAgB,IAAAN,EAAO,MAAMG,CAAU,GACzC,EAAE,aAAAI,EAAgB,IAAAC,EAAgB,EAAE,OAAA3B,GAAO,gBAAAa,GAAgB,gBAAAC,KAAkBJ,CAAO,GAEpFkB,IAAgBC,EAAY,MAAM;AACtC,QAAIxB,EAAa,QAAA;AAEL,IAAAqB;EAAA,GACX,CAACrB,GAAMqB,CAAW,CAAC;AAGpB,SAAA,gBAAAI;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAA3B;AAAA,MACA,YAAYO;AAAA,MACZ,iBAAiBC;AAAA,MACjB,QAAQN;AAAA,MACR,SAASC;AAAA,MACT,WAAWN;AAAA,MACX,OAAOqB;AAAA,MACP,QAAQnB;AAAA,MACR,SAASyB;AAAA,MACT,aAAWvB;AAAA,MACV,GAAGa;AAAA,MAEH,UACCb,IAAA,gBAAAyB,EAACE,GAAA,EAAc,KAAKC,EAAc,QAAQ,KAAI,UAAS,OAAOX,EAAY,CAAA,IAGvE,gBAAAY,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA3B,IACE,gBAAAsB,EAAAM,GAAA,EAAY,iBAAiBnC,GAAU,eAAeQ,GAAc,OAAOa,GAC1E,UAAC,gBAAAQ,EAAAtB,GAAA,CAAA,CAAK,GACR,IACE;AAAA,QAEJ,gBAAAsB,EAACO,GAAA,EAAa,WAAWZ,GAAa,iBAAiBxB,GACpD,UACHD,GAAA;AAAA,QAECe;AAAA,MAAA,GACH;AAAA,IAAA;AAAA,EAAA;AAIR,GAEAuB,IAAevC;"}
|
@@ -1,34 +1,38 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import {
|
7
|
-
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as b, useMemo as z } from "react";
|
3
|
+
import { useTheme as B } from "styled-components";
|
4
|
+
import { ILLUSTRATIONS as T } from "../../../../assets/illustrations/illustrations.js";
|
5
|
+
import $ from "../../hooks/use-click-handler.js";
|
6
|
+
import { EDeviceType as c } from "../../theme/constants.js";
|
7
|
+
import { Loader as A } from "../button/button-styled.js";
|
8
|
+
import { IconButtonWrapper as C, IconWrapper as O } from "./icon-button-styled.js";
|
9
|
+
const h = b((m) => {
|
8
10
|
const {
|
9
|
-
Icon:
|
10
|
-
size:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
11
|
+
Icon: l,
|
12
|
+
size: o,
|
13
|
+
sizeOnMobile: n,
|
14
|
+
sizeOnTablet: r,
|
15
|
+
onClick: a,
|
16
|
+
renderAs: i,
|
17
|
+
disabled: u,
|
18
|
+
analyticsLabel: p,
|
19
|
+
analyticsProps: d,
|
20
|
+
customBgColor: f,
|
21
|
+
busy: I
|
22
|
+
} = m, { handleClick: L } = $({ analyticsLabel: p, analyticsProps: d }, a), { device: t } = B(), s = z(() => t <= c.MOBILE ? n || r || o : t <= c.TABLET && r || o, [t, o, n, r]);
|
23
|
+
return /* @__PURE__ */ e(
|
24
|
+
C,
|
21
25
|
{
|
22
|
-
disabled:
|
23
|
-
$size:
|
24
|
-
$buttonRenderAs:
|
25
|
-
onClick:
|
26
|
-
$customBgColor:
|
27
|
-
children:
|
26
|
+
disabled: u,
|
27
|
+
$size: o,
|
28
|
+
$buttonRenderAs: i,
|
29
|
+
onClick: L,
|
30
|
+
$customBgColor: f,
|
31
|
+
children: I ? /* @__PURE__ */ e(A, { src: T.LOADER, alt: "Loader", $size: s || "small" }) : /* @__PURE__ */ e(O, { $size: s, $buttonRenderAs: i, children: /* @__PURE__ */ e(l, {}) })
|
28
32
|
}
|
29
33
|
);
|
30
|
-
}),
|
34
|
+
}), x = h;
|
31
35
|
export {
|
32
|
-
|
36
|
+
x as default
|
33
37
|
};
|
34
38
|
//# sourceMappingURL=icon-button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-button.js","sources":["../../../../../src/features/ui/buttons/icon-button/icon-button.tsx"],"sourcesContent":["import type { IIconButtonProps } from './icon-button-types';\n\nimport { memo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport { Loader } from '../button/button-styled';\nimport * as Styled from './icon-button-styled';\n\nconst IconButton: FC<IIconButtonProps> = memo(props => {\n const {\n Icon,\n size,\n onClick,\n renderAs,\n disabled,\n analyticsLabel,\n analyticsProps,\n customBgColor,\n busy,\n } = props;\n const { handleClick } = useClickHandler({ analyticsLabel, analyticsProps }, onClick);\n\n return (\n <Styled.IconButtonWrapper\n disabled={disabled}\n $size={size}\n $buttonRenderAs={renderAs}\n onClick={handleClick}\n $customBgColor={customBgColor}\n >\n {busy ? (\n <Loader src={ILLUSTRATIONS.LOADER} alt=\"Loader\" $size={
|
1
|
+
{"version":3,"file":"icon-button.js","sources":["../../../../../src/features/ui/buttons/icon-button/icon-button.tsx"],"sourcesContent":["import type { IIconButtonProps } from './icon-button-types';\n\nimport { memo, useMemo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport { EDeviceType } from '../../theme/constants';\nimport { Loader } from '../button/button-styled';\nimport * as Styled from './icon-button-styled';\n\nconst IconButton: FC<IIconButtonProps> = memo(props => {\n const {\n Icon,\n size,\n sizeOnMobile,\n sizeOnTablet,\n onClick,\n renderAs,\n disabled,\n analyticsLabel,\n analyticsProps,\n customBgColor,\n busy,\n } = props;\n const { handleClick } = useClickHandler({ analyticsLabel, analyticsProps }, onClick);\n const { device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n return (\n <Styled.IconButtonWrapper\n disabled={disabled}\n $size={size}\n $buttonRenderAs={renderAs}\n onClick={handleClick}\n $customBgColor={customBgColor}\n >\n {busy ? (\n <Loader src={ILLUSTRATIONS.LOADER} alt=\"Loader\" $size={renderSize || 'small'} />\n ) : (\n <Styled.IconWrapper $size={renderSize} $buttonRenderAs={renderAs}>\n <Icon />\n </Styled.IconWrapper>\n )}\n </Styled.IconButtonWrapper>\n );\n});\n\nexport default IconButton;\n"],"names":["IconButton","memo","props","Icon","size","sizeOnMobile","sizeOnTablet","onClick","renderAs","disabled","analyticsLabel","analyticsProps","customBgColor","busy","handleClick","useClickHandler","device","useTheme","renderSize","useMemo","EDeviceType","jsx","Styled.IconButtonWrapper","Loader","ILLUSTRATIONS","Styled.IconWrapper","IconButton$1"],"mappings":";;;;;;;;AAWA,MAAMA,IAAmCC,EAAK,CAASC,MAAA;AAC/C,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,MAAAC;AAAA,EACE,IAAAX,GACE,EAAE,aAAAY,MAAgBC,EAAgB,EAAE,gBAAAL,GAAgB,gBAAAC,EAAA,GAAkBJ,CAAO,GAC7E,EAAE,QAAAS,MAAWC,KACbC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBf,KAAgBC,KAAgBF,IAGrCY,KAAUI,EAAY,UACjBd,KAAgBF,GAIxB,CAACY,GAAQZ,GAAMC,GAAcC,CAAY,CAAC;AAG3C,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAAb;AAAA,MACA,OAAOL;AAAA,MACP,iBAAiBI;AAAA,MACjB,SAASM;AAAA,MACT,gBAAgBF;AAAA,MAEf,UAAAC,sBACEU,GAAO,EAAA,KAAKC,EAAc,QAAQ,KAAI,UAAS,OAAON,KAAc,SAAS,IAE7E,gBAAAG,EAAAI,GAAA,EAAmB,OAAOP,GAAY,iBAAiBV,GACtD,UAAC,gBAAAa,EAAAlB,GAAA,CAAA,CAAK,EACR,CAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDuB,IAAe1B;"}
|
@@ -1,30 +1,34 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import a from "
|
4
|
-
import {
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
2
|
+
import { useMemo as T } from "react";
|
3
|
+
import { useTheme as a } from "styled-components";
|
4
|
+
import { EDeviceType as c } from "../../theme/constants.js";
|
5
|
+
import $ from "../clickable/clickable.js";
|
6
|
+
import { Text as h } from "./text-button-styled.js";
|
5
7
|
const l = ({
|
6
|
-
label:
|
7
|
-
size:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
label: e,
|
9
|
+
size: r = "regular",
|
10
|
+
sizeOnMobile: n,
|
11
|
+
sizeOnTablet: t,
|
12
|
+
disabled: f = !1,
|
13
|
+
onClick: i,
|
14
|
+
analyticsLabel: p,
|
15
|
+
analyticsProps: s,
|
16
|
+
color: x
|
13
17
|
}) => {
|
14
|
-
const { textButton:
|
15
|
-
return /* @__PURE__ */
|
16
|
-
|
18
|
+
const { textButton: d, device: o } = a(), m = T(() => o <= c.MOBILE ? n || t || r : o <= c.TABLET && t || r, [o, r, n, t]), { textVariant: B } = d.sizes[m];
|
19
|
+
return /* @__PURE__ */ u(
|
20
|
+
$,
|
17
21
|
{
|
18
|
-
label:
|
19
|
-
disabled:
|
20
|
-
onClick:
|
21
|
-
analyticsLabel:
|
22
|
-
analyticsProps:
|
23
|
-
children: /* @__PURE__ */
|
22
|
+
label: e,
|
23
|
+
disabled: f,
|
24
|
+
onClick: i,
|
25
|
+
analyticsLabel: p,
|
26
|
+
analyticsProps: s,
|
27
|
+
children: /* @__PURE__ */ u(h, { $color: x, $renderAs: B, $buttonSize: m, children: e })
|
24
28
|
}
|
25
29
|
);
|
26
|
-
},
|
30
|
+
}, j = l;
|
27
31
|
export {
|
28
|
-
|
32
|
+
j as default
|
29
33
|
};
|
30
34
|
//# sourceMappingURL=text-button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-button.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button.tsx"],"sourcesContent":["import type { ITextButtonProps } from './text-button-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Clickable from '../clickable/clickable';\nimport * as Styled from './text-button-styled';\n\nconst TextButton: React.FC<ITextButtonProps> = ({\n label,\n size = 'regular',\n disabled = false,\n onClick,\n analyticsLabel,\n analyticsProps,\n color,\n}) => {\n const { textButton } = useTheme();\n const { textVariant } = textButton.sizes[
|
1
|
+
{"version":3,"file":"text-button.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button.tsx"],"sourcesContent":["import type { ITextButtonProps } from './text-button-types';\n\nimport React, { useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { EDeviceType } from '../../theme/constants';\nimport Clickable from '../clickable/clickable';\nimport * as Styled from './text-button-styled';\n\nconst TextButton: React.FC<ITextButtonProps> = ({\n label,\n size = 'regular',\n sizeOnMobile,\n sizeOnTablet,\n disabled = false,\n onClick,\n analyticsLabel,\n analyticsProps,\n color,\n}) => {\n const { textButton, device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n const { textVariant } = textButton.sizes[renderSize];\n\n return (\n <Clickable\n label={label}\n disabled={disabled}\n onClick={onClick}\n analyticsLabel={analyticsLabel}\n analyticsProps={analyticsProps}\n >\n <Styled.Text $color={color} $renderAs={textVariant} $buttonSize={renderSize}>\n {label}\n </Styled.Text>\n </Clickable>\n );\n};\n\nexport default TextButton;\n"],"names":["TextButton","label","size","sizeOnMobile","sizeOnTablet","disabled","onClick","analyticsLabel","analyticsProps","color","textButton","device","useTheme","renderSize","useMemo","EDeviceType","textVariant","jsx","Clickable","Styled.Text","TextButton$1"],"mappings":";;;;;;AASA,MAAMA,IAAyC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAAC,GAAY,QAAAC,EAAO,IAAIC,EAAS,GAClCC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBZ,KAAgBC,KAAgBF,IAGrCS,KAAUI,EAAY,UACjBX,KAAgBF,GAIxB,CAACS,GAAQT,GAAMC,GAAcC,CAAY,CAAC,GAEvC,EAAE,aAAAY,EAAgB,IAAAN,EAAW,MAAMG,CAAU;AAGjD,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAjB;AAAA,MACA,UAAAI;AAAA,MACA,SAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,gBAAAC;AAAA,MAEA,UAAA,gBAAAS,EAACE,GAAA,EAAY,QAAQV,GAAO,WAAWO,GAAa,aAAaH,GAC9D,UACHZ,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAmB,IAAepB;"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import e from "../layout/flex-view.js";
|
3
|
+
const a = o.div`
|
4
|
+
position: fixed;
|
5
|
+
top: 0;
|
6
|
+
bottom: 0;
|
7
|
+
left: ${({ $position: t }) => t === "left" ? 0 : "auto"};
|
8
|
+
right: ${({ $position: t }) => t === "right" ? 0 : "auto"};
|
9
|
+
width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
z-index: ${({ $zIndex: t }) => t ?? 999};
|
12
|
+
pointer-events: ${({ $isOpen: t }) => t ? "auto" : "none"};
|
13
|
+
`, s = o(e)`
|
14
|
+
position: absolute;
|
15
|
+
top: 0;
|
16
|
+
bottom: 0;
|
17
|
+
${({ $position: t }) => t === "left" ? "left: 0;" : "right: 0;"}
|
18
|
+
width: ${({ $drawerWidth: t }) => typeof t == "number" ? `${t}px` : t};
|
19
|
+
transform: ${({ $isOpen: t, $position: i }) => t ? "translateX(0)" : i === "left" ? "translateX(-100%)" : "translateX(100%)"};
|
20
|
+
transition: transform 0.3s ease-in-out;
|
21
|
+
height: 100%;
|
22
|
+
`, p = o(e)`
|
23
|
+
position: absolute;
|
24
|
+
inset: 0;
|
25
|
+
backdrop-filter: blur(40px);
|
26
|
+
opacity: ${({ $isOpen: t }) => t ? 1 : 0};
|
27
|
+
transition: opacity 0.3s ease-in-out;
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
p as DrawerBackdrop,
|
31
|
+
a as DrawerContainer,
|
32
|
+
s as DrawerPanel
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=drawer-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drawer-styled.js","sources":["../../../../src/features/ui/drawer/drawer-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\ninterface DrawerContainerProps {\n $isOpen: boolean;\n $position: 'left' | 'right';\n $zIndex?: number;\n}\n\ninterface DrawerPanelProps extends DrawerContainerProps {\n $drawerWidth: number | string;\n}\n\nexport const DrawerContainer = styled.div<DrawerContainerProps>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: ${({ $position }) => ($position === 'left' ? 0 : 'auto')};\n right: ${({ $position }) => ($position === 'right' ? 0 : 'auto')};\n width: 100%;\n height: 100%;\n z-index: ${({ $zIndex }) => $zIndex ?? 999};\n pointer-events: ${({ $isOpen }) => ($isOpen ? 'auto' : 'none')};\n`;\n\nexport const DrawerPanel = styled(FlexView)<DrawerPanelProps>`\n position: absolute;\n top: 0;\n bottom: 0;\n ${({ $position }) => ($position === 'left' ? 'left: 0;' : 'right: 0;')}\n width: ${({ $drawerWidth }) =>\n typeof $drawerWidth === 'number' ? `${$drawerWidth}px` : $drawerWidth};\n transform: ${({ $isOpen, $position }) =>\n $isOpen ? 'translateX(0)' : $position === 'left' ? 'translateX(-100%)' : 'translateX(100%)'};\n transition: transform 0.3s ease-in-out;\n height: 100%;\n`;\n\nexport const DrawerBackdrop = styled(FlexView)<{ $isOpen: boolean }>`\n position: absolute;\n inset: 0;\n backdrop-filter: blur(40px);\n opacity: ${({ $isOpen }) => ($isOpen ? 1 : 0)};\n transition: opacity 0.3s ease-in-out;\n`;\n"],"names":["DrawerContainer","styled","$position","$zIndex","$isOpen","DrawerPanel","FlexView","$drawerWidth","DrawerBackdrop"],"mappings":";;AAcO,MAAMA,IAAkBC,EAAO;AAAA;AAAA;AAAA;AAAA,UAI5B,CAAC,EAAE,WAAAC,QAAiBA,MAAc,SAAS,IAAI,MAAO;AAAA,WACrD,CAAC,EAAE,WAAAA,QAAiBA,MAAc,UAAU,IAAI,MAAO;AAAA;AAAA;AAAA,aAGrD,CAAC,EAAE,SAAAC,QAAcA,KAAW,GAAG;AAAA,oBACxB,CAAC,EAAE,SAAAC,EAAA,MAAeA,IAAU,SAAS,MAAO;AAAA,GAGnDC,IAAcJ,EAAOK,CAAQ;AAAA;AAAA;AAAA;AAAA,IAItC,CAAC,EAAE,WAAAJ,QAAiBA,MAAc,SAAS,aAAa,WAAY;AAAA,WAC7D,CAAC,EAAE,cAAAK,EACV,MAAA,OAAOA,KAAiB,WAAW,GAAGA,CAAY,OAAOA,CAAY;AAAA,eAC1D,CAAC,EAAE,SAAAH,GAAS,WAAAF,QACvBE,IAAU,kBAAkBF,MAAc,SAAS,sBAAsB,kBAAkB;AAAA;AAAA;AAAA,GAKlFM,IAAiBP,EAAOK,CAAQ;AAAA;AAAA;AAAA;AAAA,aAIhC,CAAC,EAAE,SAAAF,EAAA,MAAeA,IAAU,IAAI,CAAE;AAAA;AAAA;"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
2
|
+
import { memo as $, useRef as w, useEffect as k } from "react";
|
3
|
+
import { DrawerContainer as D, DrawerBackdrop as _, DrawerPanel as p } from "./drawer-styled.js";
|
4
|
+
const E = $(
|
5
|
+
({ isOpen: r, onClose: e, children: i, drawerWidth: o = 300, position: n = "left", zIndex: u, theme: m = "dark" }) => {
|
6
|
+
const t = w(null);
|
7
|
+
k(() => {
|
8
|
+
const d = (f) => {
|
9
|
+
t.current && !t.current.contains(f.target) && (e == null || e());
|
10
|
+
};
|
11
|
+
return r && document.addEventListener("mousedown", d), () => {
|
12
|
+
document.removeEventListener("mousedown", d);
|
13
|
+
};
|
14
|
+
}, [r, e]);
|
15
|
+
const a = m === "dark";
|
16
|
+
return /* @__PURE__ */ s(D, { $isOpen: r, $position: n, $zIndex: u, children: [
|
17
|
+
/* @__PURE__ */ c(
|
18
|
+
_,
|
19
|
+
{
|
20
|
+
$isOpen: r,
|
21
|
+
onClick: e,
|
22
|
+
$background: a ? "WHITE_T_10" : "BLACK_T_38"
|
23
|
+
}
|
24
|
+
),
|
25
|
+
/* @__PURE__ */ c(
|
26
|
+
p,
|
27
|
+
{
|
28
|
+
ref: t,
|
29
|
+
$isOpen: r,
|
30
|
+
$position: n,
|
31
|
+
$drawerWidth: o,
|
32
|
+
$background: a ? "BLACK_3" : "WHITE_3",
|
33
|
+
children: i
|
34
|
+
}
|
35
|
+
)
|
36
|
+
] });
|
37
|
+
}
|
38
|
+
), L = E;
|
39
|
+
export {
|
40
|
+
L as default
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=drawer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../../../src/features/ui/drawer/drawer.tsx"],"sourcesContent":["import type { IDrawerProps } from './drawer-types';\nimport type { FC } from 'react';\n\nimport { memo, useEffect, useRef } from 'react';\n\nimport * as Styled from './drawer-styled';\n\nconst Drawer: FC<IDrawerProps> = memo(\n ({ isOpen, onClose, children, drawerWidth = 300, position = 'left', zIndex, theme = 'dark' }) => {\n const drawerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (drawerRef.current && !drawerRef.current.contains(e.target as Node)) {\n onClose?.();\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose]);\n\n const isDarkTheme = theme === 'dark';\n\n return (\n <Styled.DrawerContainer $isOpen={isOpen} $position={position} $zIndex={zIndex}>\n <Styled.DrawerBackdrop\n $isOpen={isOpen}\n onClick={onClose}\n $background={isDarkTheme ? 'WHITE_T_10' : 'BLACK_T_38'}\n />\n <Styled.DrawerPanel\n ref={drawerRef}\n $isOpen={isOpen}\n $position={position}\n $drawerWidth={drawerWidth}\n $background={isDarkTheme ? 'BLACK_3' : 'WHITE_3'}\n >\n {children}\n </Styled.DrawerPanel>\n </Styled.DrawerContainer>\n );\n },\n);\n\nexport default Drawer;\n"],"names":["Drawer","memo","isOpen","onClose","children","drawerWidth","position","zIndex","theme","drawerRef","useRef","useEffect","handleClickOutside","e","isDarkTheme","jsxs","Styled.DrawerContainer","jsx","Styled.DrawerBackdrop","Styled.DrawerPanel","Drawer$1"],"mappings":";;;AAOA,MAAMA,IAA2BC;AAAA,EAC/B,CAAC,EAAE,QAAAC,GAAQ,SAAAC,GAAS,UAAAC,GAAU,aAAAC,IAAc,KAAK,UAAAC,IAAW,QAAQ,QAAAC,GAAQ,OAAAC,IAAQ,OAAA,MAAa;AACzF,UAAAC,IAAYC,EAAuB,IAAI;AAE7C,IAAAC,EAAU,MAAM;AACR,YAAAC,IAAqB,CAACC,MAAkB;AACxC,QAAAJ,EAAU,WAAW,CAACA,EAAU,QAAQ,SAASI,EAAE,MAAc,MACzDV,KAAA,QAAAA;AAAA,MACZ;AAGF,aAAID,KACO,SAAA,iBAAiB,aAAaU,CAAkB,GAGpD,MAAM;AACF,iBAAA,oBAAoB,aAAaA,CAAkB;AAAA,MAAA;AAAA,IAC9D,GACC,CAACV,GAAQC,CAAO,CAAC;AAEpB,UAAMW,IAAcN,MAAU;AAG5B,WAAA,gBAAAO,EAACC,GAAA,EAAuB,SAASd,GAAQ,WAAWI,GAAU,SAASC,GACrE,UAAA;AAAA,MAAA,gBAAAU;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,SAAShB;AAAA,UACT,SAASC;AAAA,UACT,aAAaW,IAAc,eAAe;AAAA,QAAA;AAAA,MAC5C;AAAA,MACA,gBAAAG;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAKV;AAAA,UACL,SAASP;AAAA,UACT,WAAWI;AAAA,UACX,cAAcD;AAAA,UACd,aAAaS,IAAc,YAAY;AAAA,UAEtC,UAAAV;AAAA,QAAA;AAAA,MACH;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAgB,IAAepB;"}
|
@@ -1,47 +1,85 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useCallback as
|
3
|
-
import { ILLUSTRATIONS as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { jsxs as n, jsx as i, Fragment as X } from "react/jsx-runtime";
|
2
|
+
import { useCallback as $ } from "react";
|
3
|
+
import { ILLUSTRATIONS as p } from "../../../assets/illustrations/illustrations.js";
|
4
|
+
import f from "../buttons/button/button.js";
|
5
|
+
import u from "../image/image.js";
|
6
|
+
import a from "../layout/flex-view.js";
|
7
|
+
import m from "../text/text.js";
|
8
|
+
const e = {
|
9
|
+
compact: {
|
10
|
+
widthX: 10,
|
11
|
+
heightX: 5,
|
12
|
+
borderRadiusX: 1,
|
13
|
+
marginBottomX: 1,
|
14
|
+
title: "h6",
|
15
|
+
description: "body3",
|
16
|
+
imageWidth: 54,
|
17
|
+
imageHeight: 44
|
18
|
+
},
|
19
|
+
full: {
|
20
|
+
widthX: 22.5,
|
21
|
+
heightX: 11.5,
|
22
|
+
borderRadiusX: 1,
|
23
|
+
marginBottomX: 1.5,
|
24
|
+
title: "h4",
|
25
|
+
description: "body2",
|
26
|
+
imageWidth: 122,
|
27
|
+
imageHeight: 100
|
28
|
+
}
|
29
|
+
}, w = (l) => {
|
30
|
+
const { height: d, onTryAgain: r, theme: h = "light", title: s, description: g, size: t = "full" } = l, c = $(() => {
|
31
|
+
r ? r() : window.location.reload();
|
32
|
+
}, [r]), o = h === "dark" ? "WHITE_T_87" : "BLACK_T_87";
|
33
|
+
return /* @__PURE__ */ n(a, { $alignItems: "center", $justifyContent: "center", $height: d, children: [
|
34
|
+
/* @__PURE__ */ i(
|
35
|
+
a,
|
15
36
|
{
|
16
|
-
$widthX:
|
17
|
-
$heightX:
|
18
|
-
$borderRadiusX:
|
19
|
-
$marginBottomX:
|
37
|
+
$widthX: e[t].widthX,
|
38
|
+
$heightX: e[t].heightX,
|
39
|
+
$borderRadiusX: e[t].borderRadiusX,
|
40
|
+
$marginBottomX: e[t].marginBottomX,
|
20
41
|
$background: "GREY_1",
|
21
42
|
$justifyContent: "center",
|
22
43
|
$alignItems: "center",
|
23
|
-
children: /* @__PURE__ */
|
44
|
+
children: /* @__PURE__ */ i(
|
45
|
+
u,
|
46
|
+
{
|
47
|
+
width: e[t].imageWidth,
|
48
|
+
height: e[t].imageHeight,
|
49
|
+
src: p.ROCKET_BROKEN,
|
50
|
+
withLoader: !1
|
51
|
+
}
|
52
|
+
)
|
24
53
|
}
|
25
54
|
),
|
26
|
-
/* @__PURE__ */
|
27
|
-
|
55
|
+
/* @__PURE__ */ i(
|
56
|
+
m,
|
57
|
+
{
|
58
|
+
$renderAs: e[t].title,
|
59
|
+
$marginBottomX: 0.5,
|
60
|
+
$color: o,
|
61
|
+
$align: "center",
|
62
|
+
children: s ?? "Oops! Looks like something went wrong"
|
63
|
+
}
|
64
|
+
),
|
65
|
+
/* @__PURE__ */ i(m, { $renderAs: "body2", $align: "center", $marginBottomX: 1.5, $color: o, children: g ?? /* @__PURE__ */ n(X, { children: [
|
28
66
|
"Please try again. Alternatively if that does not work,",
|
29
|
-
/* @__PURE__ */
|
67
|
+
/* @__PURE__ */ i("br", {}),
|
30
68
|
" please contact support."
|
31
69
|
] }) }),
|
32
|
-
/* @__PURE__ */
|
33
|
-
|
70
|
+
/* @__PURE__ */ i(
|
71
|
+
f,
|
34
72
|
{
|
35
73
|
label: "Try again",
|
36
|
-
onClick:
|
74
|
+
onClick: c,
|
37
75
|
renderAs: "primary",
|
38
76
|
size: "small",
|
39
77
|
widthX: 14
|
40
78
|
}
|
41
79
|
)
|
42
80
|
] });
|
43
|
-
},
|
81
|
+
}, k = w;
|
44
82
|
export {
|
45
|
-
|
83
|
+
k as default
|
46
84
|
};
|
47
85
|
//# sourceMappingURL=error.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n}\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description } = props;\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={
|
1
|
+
{"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import type { TTextVariants } from '../types';\n\nimport React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n size?: 'compact' | 'full';\n}\n\ninterface IErrorConfig {\n widthX: number;\n heightX: number;\n borderRadiusX: number;\n marginBottomX: number;\n title: TTextVariants;\n description: TTextVariants;\n imageWidth: number;\n imageHeight: number;\n}\n\nconst ERROR_CONFIG: Record<'compact' | 'full', IErrorConfig> = {\n compact: {\n widthX: 10,\n heightX: 5,\n borderRadiusX: 1,\n marginBottomX: 1,\n title: 'h6',\n description: 'body3',\n imageWidth: 54,\n imageHeight: 44,\n },\n full: {\n widthX: 22.5,\n heightX: 11.5,\n borderRadiusX: 1,\n marginBottomX: 1.5,\n title: 'h4',\n description: 'body2',\n imageWidth: 122,\n imageHeight: 100,\n },\n};\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description, size = 'full' } = props;\n\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={ERROR_CONFIG[size].widthX}\n $heightX={ERROR_CONFIG[size].heightX}\n $borderRadiusX={ERROR_CONFIG[size].borderRadiusX}\n $marginBottomX={ERROR_CONFIG[size].marginBottomX}\n $background=\"GREY_1\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Image\n width={ERROR_CONFIG[size].imageWidth}\n height={ERROR_CONFIG[size].imageHeight}\n src={ILLUSTRATIONS.ROCKET_BROKEN}\n withLoader={false}\n />\n </FlexView>\n <Text\n $renderAs={ERROR_CONFIG[size].title}\n $marginBottomX={0.5}\n $color={textColor}\n $align=\"center\"\n >\n {title ?? 'Oops! Looks like something went wrong'}\n </Text>\n <Text $renderAs=\"body2\" $align=\"center\" $marginBottomX={1.5} $color={textColor}>\n {description ?? (\n <>\n Please try again. Alternatively if that does not work,\n <br /> please contact support.\n </>\n )}\n </Text>\n <Button\n label=\"Try again\"\n onClick={handleTryAgain}\n renderAs=\"primary\"\n size=\"small\"\n widthX={14}\n />\n </FlexView>\n );\n};\n\nexport default Error;\n"],"names":["ERROR_CONFIG","Error","props","height","onTryAgain","theme","title","description","size","handleTryAgain","useCallback","textColor","FlexView","jsx","Image","ILLUSTRATIONS","Text","jsxs","Fragment","Button","Error$1"],"mappings":";;;;;;;AA8BA,MAAMA,IAAyD;AAAA,EAC7D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AACF,GAEMC,IAA+B,CAASC,MAAA;AACtC,QAAA,EAAE,QAAAC,GAAQ,YAAAC,GAAY,OAAAC,IAAQ,SAAS,OAAAC,GAAO,aAAAC,GAAa,MAAAC,IAAO,OAAW,IAAAN,GAE7EO,IAAiBC,EAAY,MAAM;AACvC,IAAIN,IACSA,MAEX,OAAO,SAAS;EAClB,GACC,CAACA,CAAU,CAAC,GAETO,IAAYN,MAAU,SAAS,eAAe;AAEpD,2BACGO,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAAS,SAAST,GAC/D,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,SAASZ,EAAaQ,CAAI,EAAE;AAAA,QAC5B,UAAUR,EAAaQ,CAAI,EAAE;AAAA,QAC7B,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QAEZ,UAAA,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAOd,EAAaQ,CAAI,EAAE;AAAA,YAC1B,QAAQR,EAAaQ,CAAI,EAAE;AAAA,YAC3B,KAAKO,EAAc;AAAA,YACnB,YAAY;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,WAAWhB,EAAaQ,CAAI,EAAE;AAAA,QAC9B,gBAAgB;AAAA,QAChB,QAAQG;AAAA,QACR,QAAO;AAAA,QAEN,UAASL,KAAA;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAO,EAACG,GAAK,EAAA,WAAU,SAAQ,QAAO,UAAS,gBAAgB,KAAK,QAAQL,GAClE,UAAAJ,KACG,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA;AAAA,wBAEC,MAAG,EAAA;AAAA,MAAE;AAAA,IAAA,EAAA,CACR,EAEJ,CAAA;AAAA,IACA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAASV;AAAA,QACT,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF,EAAA,CAAA;AAEJ,GAEAW,IAAenB;"}
|
@@ -1,40 +1,46 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
2
|
+
import { useMemo as h } from "react";
|
3
|
+
import { useTheme as s } from "styled-components";
|
4
|
+
import { EDeviceType as f } from "../theme/constants.js";
|
5
|
+
import { GradeSelectorWrapper as x } from "./grade-selector-styled.js";
|
6
|
+
import E from "./grade-tab.js";
|
7
|
+
function I({
|
8
|
+
selectedValue: i,
|
9
|
+
onSelect: n,
|
10
|
+
tabsWidth: p,
|
11
|
+
width: u,
|
12
|
+
grades: l,
|
13
|
+
renderAs: d,
|
14
|
+
size: e,
|
15
|
+
sizeOnMobile: m,
|
16
|
+
sizeOnTablet: t,
|
17
|
+
layoutAlignment: a
|
13
18
|
}) {
|
14
|
-
|
15
|
-
|
19
|
+
const { device: o } = s(), G = h(() => o <= f.MOBILE ? m || t || e : o <= f.TABLET && t || e, [o, e, m, t]);
|
20
|
+
return /* @__PURE__ */ c(
|
21
|
+
x,
|
16
22
|
{
|
17
|
-
width:
|
18
|
-
layoutAlignment:
|
23
|
+
width: u,
|
24
|
+
layoutAlignment: a,
|
19
25
|
$alignItems: "center",
|
20
26
|
$flexDirection: "row",
|
21
|
-
children:
|
22
|
-
|
27
|
+
children: l.map((r) => /* @__PURE__ */ c(
|
28
|
+
E,
|
23
29
|
{
|
24
|
-
label:
|
25
|
-
selected:
|
26
|
-
width:
|
27
|
-
onSelect:
|
28
|
-
renderAs:
|
29
|
-
size:
|
30
|
-
grade:
|
30
|
+
label: r === "0" ? "KG" : r,
|
31
|
+
selected: i === r,
|
32
|
+
width: p,
|
33
|
+
onSelect: n,
|
34
|
+
renderAs: d,
|
35
|
+
size: G,
|
36
|
+
grade: r
|
31
37
|
},
|
32
|
-
|
38
|
+
r
|
33
39
|
))
|
34
40
|
}
|
35
41
|
);
|
36
42
|
}
|
37
43
|
export {
|
38
|
-
|
44
|
+
I as default
|
39
45
|
};
|
40
46
|
//# sourceMappingURL=grade-selector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\nimport type
|
1
|
+
{"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\n\nimport { useMemo, type ReactElement } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\nimport * as Styled from './grade-selector-styled';\nimport GradeTab from './grade-tab';\n\nfunction GradeSelector({\n selectedValue,\n onSelect,\n tabsWidth,\n width,\n grades,\n renderAs,\n size,\n sizeOnMobile,\n sizeOnTablet,\n layoutAlignment,\n}: IGradeSelectorProps): ReactElement {\n const { device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n return (\n <Styled.GradeSelectorWrapper\n width={width}\n layoutAlignment={layoutAlignment}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n >\n {grades.map(grade => {\n return (\n <GradeTab\n key={grade}\n label={grade === '0' ? 'KG' : grade}\n selected={selectedValue === grade}\n width={tabsWidth}\n onSelect={onSelect}\n renderAs={renderAs}\n size={renderSize}\n grade={grade}\n />\n );\n })}\n </Styled.GradeSelectorWrapper>\n );\n}\n\nexport default GradeSelector;\n"],"names":["GradeSelector","selectedValue","onSelect","tabsWidth","width","grades","renderAs","size","sizeOnMobile","sizeOnTablet","layoutAlignment","device","useTheme","renderSize","useMemo","EDeviceType","jsx","Styled.GradeSelectorWrapper","grade","GradeTab"],"mappings":";;;;;;AASA,SAASA,EAAc;AAAA,EACrB,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AACF,GAAsC;AAC9B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBP,KAAgBC,KAAgBF,IAGrCI,KAAUI,EAAY,UACjBN,KAAgBF,GAIxB,CAACI,GAAQJ,GAAMC,GAAcC,CAAY,CAAC;AAG3C,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAb;AAAA,MACA,iBAAAM;AAAA,MACA,aAAY;AAAA,MACZ,gBAAe;AAAA,MAEd,UAAAL,EAAO,IAAI,CAASa,MAEjB,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UAEC,OAAOD,MAAU,MAAM,OAAOA;AAAA,UAC9B,UAAUjB,MAAkBiB;AAAA,UAC5B,OAAOf;AAAA,UACP,UAAAD;AAAA,UACA,UAAAI;AAAA,UACA,MAAMO;AAAA,UACN,OAAAK;AAAA,QAAA;AAAA,QAPKA;AAAA,MAAA,CAUV;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
@@ -14,7 +14,7 @@ const p = t(i)`
|
|
14
14
|
overflow: hidden;
|
15
15
|
position: relative;
|
16
16
|
`, u = g(
|
17
|
-
({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
|
17
|
+
({ borderRadius: n = 0, borderColor: r, withLoader: a = !1, ...o }) => {
|
18
18
|
const { width: s, height: d } = o, [m, l] = f(!0);
|
19
19
|
return /* @__PURE__ */ h(
|
20
20
|
L,
|