@cuemath/leap 3.2.15-as2 → 3.2.15-link.0
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 +6 -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/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.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/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.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/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 +65 -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 +92 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +18 -13
- 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 +22 -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 +51 -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 +75 -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/signup-v2/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/signup-v2/signup-header/signup-header.js +54 -0
- package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/signup-v2/signup-options/signup-options.js +83 -0
- package/dist/features/auth/signup-v2/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/journey/comps/coachmark/coachmark.js +28 -29
- 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 +72 -73
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +4 -6
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.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/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +5 -5
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +43 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +7 -14
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +12 -13
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- 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/worksheet/worksheet/worksheet-helpers.js +31 -32
- package/dist/features/worksheet/worksheet/worksheet-helpers.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/index.d.ts +151 -48
- package/dist/index.js +522 -498
- 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.5cb30093.json +1057 -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/stripe-blurple.6abf422f.svg +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +2 -3
- package/dist/assets/line-icons/icons/hint-fill.js +0 -35
- package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
- package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app.js +0 -82
- package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
- package/dist/features/ui/carousal/carousal-styles.js +0 -45
- package/dist/features/ui/carousal/carousal-styles.js.map +0 -1
- package/dist/features/ui/carousal/carousal.js +0 -76
- package/dist/features/ui/carousal/carousal.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/activity.js +0 -6
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/index.js +0 -95
- package/dist/features/worksheet/worksheet/mocks/behaviors/index.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js +0 -41
- package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +0 -5
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +0 -57
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +0 -231
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +0 -174
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +0 -255
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +0 -1
- package/dist/static/nudge-tap.0591aef4.json +0 -1
- package/dist/types/models/worksheet.js +0 -5
- package/dist/types/models/worksheet.js.map +0 -1
@@ -1,100 +1,105 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
1
|
+
import { jsxs as U, Fragment as W, jsx as e } from "react/jsx-runtime";
|
2
|
+
import Y from "../../../node_modules/lodash.throttle/index.js";
|
3
|
+
import { useRef as H, useState as m, useCallback as $, useEffect as C } from "react";
|
4
|
+
import { useTheme as P } from "styled-components";
|
5
|
+
import w from "../layout/flex-view.js";
|
6
|
+
import Z from "../portal/portal.js";
|
7
|
+
import q from "../text/text.js";
|
8
|
+
import { TooltipBody as G } from "./arrow-tooltip-styled.js";
|
8
9
|
import { computeTooltipNewCoOrdinates as J } from "./arrow-tooltip-util.js";
|
9
|
-
|
10
|
-
|
11
|
-
isAnimated: C,
|
10
|
+
const K = 8, Q = 100, V = ({
|
11
|
+
isAnimated: O,
|
12
12
|
alwaysVisible: o = !1,
|
13
|
-
arrowColor:
|
14
|
-
arrowSize:
|
15
|
-
arrowXCoOrdinates:
|
16
|
-
arrowYCoOrdinates:
|
13
|
+
arrowColor: T,
|
14
|
+
arrowSize: E = K,
|
15
|
+
arrowXCoOrdinates: g,
|
16
|
+
arrowYCoOrdinates: h,
|
17
17
|
backgroundColor: v,
|
18
18
|
borderColor: R,
|
19
|
-
children:
|
19
|
+
children: x,
|
20
20
|
hidden: t,
|
21
21
|
position: l,
|
22
|
-
renderAs:
|
22
|
+
renderAs: s,
|
23
23
|
textVariant: L,
|
24
|
-
tooltipItem:
|
25
|
-
tooltipOffset:
|
26
|
-
tooltipXCoOrdinates:
|
27
|
-
tooltipYCoOrdinates:
|
28
|
-
width:
|
29
|
-
widthX:
|
30
|
-
zIndex:
|
31
|
-
parentWidth:
|
32
|
-
isBlocking: M = !1
|
24
|
+
tooltipItem: c,
|
25
|
+
tooltipOffset: A,
|
26
|
+
tooltipXCoOrdinates: b,
|
27
|
+
tooltipYCoOrdinates: N,
|
28
|
+
width: k,
|
29
|
+
widthX: z,
|
30
|
+
zIndex: F,
|
31
|
+
parentWidth: M
|
33
32
|
}) => {
|
34
|
-
const
|
33
|
+
const { arrowTooltip: S } = P(), { tooltipVariants: a } = S, { backgroundColorName: X } = a[s], d = H(null), [_, f] = m(o), [j, B] = m(
|
35
34
|
null
|
36
|
-
),
|
35
|
+
), u = $(
|
37
36
|
(n, i) => {
|
38
|
-
|
37
|
+
B(n), f(i);
|
39
38
|
},
|
40
39
|
[]
|
41
|
-
),
|
40
|
+
), D = $(() => {
|
42
41
|
if (t || o)
|
43
42
|
return null;
|
44
|
-
|
45
|
-
}, [o,
|
46
|
-
var
|
47
|
-
const { current: n } =
|
43
|
+
u(null, !1);
|
44
|
+
}, [o, u, t]), r = Y(() => {
|
45
|
+
var p;
|
46
|
+
const { current: n } = d;
|
48
47
|
if (t || !n) return null;
|
49
|
-
const i = (
|
50
|
-
return
|
51
|
-
},
|
52
|
-
|
48
|
+
const i = (p = n.children[0]) == null ? void 0 : p.getBoundingClientRect(), I = i ? J(l, i) : null;
|
49
|
+
return u(I, !0), null;
|
50
|
+
}, Q);
|
51
|
+
return C(() => {
|
53
52
|
if (!(!o || t))
|
54
53
|
return window.addEventListener("scroll", r, !0), window.addEventListener("resize", r), () => {
|
55
54
|
window.removeEventListener("scroll", r, !0), window.removeEventListener("resize", r);
|
56
55
|
};
|
57
|
-
}, [o, t, l, r]),
|
58
|
-
t &&
|
59
|
-
}, [o, t])
|
60
|
-
const c = /* @__PURE__ */ e(
|
61
|
-
K,
|
62
|
-
{
|
63
|
-
$arrowSize: w,
|
64
|
-
$arrowXCoOrdinates: E,
|
65
|
-
$arrowYCoOrdinates: T,
|
66
|
-
$position: l,
|
67
|
-
$renderAs: A,
|
68
|
-
$tooltipCoOrdinates: S,
|
69
|
-
$tooltipOffset: x,
|
70
|
-
$tooltipXCoOrdinates: z,
|
71
|
-
$tooltipYCoOrdinates: I,
|
72
|
-
$zIndex: B,
|
73
|
-
$backgroundColor: v,
|
74
|
-
$arrowColor: O,
|
75
|
-
$borderColor: R,
|
76
|
-
$isAnimated: C,
|
77
|
-
$width: b,
|
78
|
-
$widthX: k,
|
79
|
-
textVariant: L || "body3",
|
80
|
-
children: g
|
81
|
-
}
|
82
|
-
);
|
83
|
-
return /* @__PURE__ */ D(U, { children: [
|
56
|
+
}, [o, t, l, r]), C(() => {
|
57
|
+
t && f(!1), o && r();
|
58
|
+
}, [o, t]), /* @__PURE__ */ U(W, { children: [
|
84
59
|
/* @__PURE__ */ e(
|
85
|
-
|
60
|
+
w,
|
86
61
|
{
|
87
|
-
$width:
|
88
|
-
ref:
|
62
|
+
$width: M || "fit-content",
|
63
|
+
ref: d,
|
89
64
|
onMouseEnter: r,
|
90
|
-
onMouseLeave:
|
91
|
-
children: /* @__PURE__ */ e(
|
65
|
+
onMouseLeave: D,
|
66
|
+
children: /* @__PURE__ */ e(w, { children: x })
|
92
67
|
}
|
93
68
|
),
|
94
|
-
|
69
|
+
_ && /* @__PURE__ */ e(Z, { portalId: "tooltip-root", children: /* @__PURE__ */ e(
|
70
|
+
G,
|
71
|
+
{
|
72
|
+
$arrowSize: E,
|
73
|
+
$arrowXCoOrdinates: g,
|
74
|
+
$arrowYCoOrdinates: h,
|
75
|
+
$position: l,
|
76
|
+
$renderAs: s,
|
77
|
+
$tooltipCoOrdinates: j,
|
78
|
+
$tooltipOffset: A,
|
79
|
+
$tooltipXCoOrdinates: b,
|
80
|
+
$tooltipYCoOrdinates: N,
|
81
|
+
$width: k,
|
82
|
+
$widthX: z,
|
83
|
+
$zIndex: F,
|
84
|
+
$background: X,
|
85
|
+
$backgroundColor: v,
|
86
|
+
$arrowColor: T,
|
87
|
+
$borderColor: R,
|
88
|
+
$isAnimated: O,
|
89
|
+
children: typeof c == "string" ? /* @__PURE__ */ e(
|
90
|
+
q,
|
91
|
+
{
|
92
|
+
$renderAs: L || "body3",
|
93
|
+
$color: a[s].textColorName,
|
94
|
+
$align: "center",
|
95
|
+
children: c
|
96
|
+
}
|
97
|
+
) : c
|
98
|
+
}
|
99
|
+
) })
|
95
100
|
] });
|
96
|
-
},
|
101
|
+
}, co = V;
|
97
102
|
export {
|
98
|
-
|
103
|
+
co as default
|
99
104
|
};
|
100
105
|
//# sourceMappingURL=arrow-tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect
|
1
|
+
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n parentWidth,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (!alwaysVisible || hidden) return;\n\n window.addEventListener('scroll', handleOnMouseEnter, true);\n window.addEventListener('resize', handleOnMouseEnter);\n\n return () => {\n window.removeEventListener('scroll', handleOnMouseEnter, true);\n window.removeEventListener('resize', handleOnMouseEnter);\n };\n }, [alwaysVisible, hidden, position, handleOnMouseEnter]);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width={parentWidth || 'fit-content'}\n ref={tooltipWrapperRef}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleVisibility}\n >\n <FlexView>{children}</FlexView>\n </FlexView>\n {visible && (\n <Portal portalId=\"tooltip-root\">\n <Styled.TooltipBody\n $arrowSize={arrowSize}\n $arrowXCoOrdinates={arrowXCoOrdinates}\n $arrowYCoOrdinates={arrowYCoOrdinates}\n $position={position}\n $renderAs={renderAs}\n $tooltipCoOrdinates={tooltipCoOrdinates}\n $tooltipOffset={tooltipOffset}\n $tooltipXCoOrdinates={tooltipXCoOrdinates}\n $tooltipYCoOrdinates={tooltipYCoOrdinates}\n $width={width}\n $widthX={widthX}\n $zIndex={zIndex}\n $background={backgroundColorName}\n $backgroundColor={backgroundColor}\n $arrowColor={arrowColor}\n $borderColor={borderColor}\n $isAnimated={isAnimated}\n >\n {typeof tooltipItem === 'string' ? (\n <Text\n $renderAs={textVariant || 'body3'}\n $color={tooltipVariants[renderAs].textColorName}\n $align=\"center\"\n >\n {tooltipItem}\n </Text>\n ) : (\n tooltipItem\n )}\n </Styled.TooltipBody>\n </Portal>\n )}\n </>\n );\n};\n\nexport default ArrowTooltip;\n"],"names":["DEFAULT_ARROW_SIZE","THROTTLE_DURATION","ArrowTooltip","isAnimated","alwaysVisible","arrowColor","arrowSize","arrowXCoOrdinates","arrowYCoOrdinates","backgroundColor","borderColor","children","hidden","position","renderAs","textVariant","tooltipItem","tooltipOffset","tooltipXCoOrdinates","tooltipYCoOrdinates","width","widthX","zIndex","parentWidth","arrowTooltip","useTheme","tooltipVariants","backgroundColorName","tooltipWrapperRef","useRef","visible","setVisible","useState","tooltipCoOrdinates","setTooltipCoOrdinates","handleVisibleNCoOrdinates","useCallback","newCoOrdinates","visibility","handleVisibility","handleOnMouseEnter","throttle","current","boundingClientRect","_a","computeTooltipNewCoOrdinates","useEffect","jsxs","Fragment","jsx","FlexView","Portal","Styled.TooltipBody","Text","ArrowTooltip$1"],"mappings":";;;;;;;;;AAgBA,MAAMA,IAAqB,GACrBC,IAAoB,KAEpBC,IAAuC,CAAC;AAAA,EAC5C,YAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,YAAAC;AAAA,EACA,WAAAC,IAAYN;AAAA,EACZ,mBAAAO;AAAA,EACA,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,MAAM;AACE,QAAA,EAAE,cAAAC,MAAiBC,KACnB,EAAE,iBAAAC,EAAoB,IAAAF,GACtB,EAAE,qBAAAG,EAAA,IAAwBD,EAAgBZ,CAAQ,GAElDc,IAAoBC,EAAuB,IAAI,GAC/C,CAACC,GAASC,CAAU,IAAIC,EAAS5B,CAAa,GAC9C,CAAC6B,GAAoBC,CAAqB,IAAIF;AAAA,IAClD;AAAA,EAAA,GAGIG,IAA6DC;AAAA,IACjE,CAACC,GAAgBC,MAAe;AAC9B,MAAAJ,EAAsBG,CAAc,GACpCN,EAAWO,CAAU;AAAA,IACvB;AAAA,IACA,CAAC;AAAA,EAAA,GAGGC,IAAmBH,EAAY,MAAM;AACzC,QAAIxB,KAAUR;AACL,aAAA;AAGT,IAAA+B,EAA0B,MAAM,EAAK;AAAA,EAGpC,GAAA,CAAC/B,GAAe+B,GAA2BvB,CAAM,CAAC,GAE/C4B,IAAqBC,EAAS,MAAM;;AAClC,UAAA,EAAE,SAAAC,EAAY,IAAAd;AAEhB,QAAAhB,KAAU,CAAC8B,EAAgB,QAAA;AAE/B,UAAMC,KAAqBC,IAAAF,EAAQ,SAAS,CAAC,MAAlB,gBAAAE,EAAqB,yBAC1CP,IAAiBM,IACnBE,EAA6BhC,GAAU8B,CAAkB,IACzD;AAEJ,WAAAR,EAA0BE,GAAgB,EAAI,GAEvC;AAAA,KACNpC,CAAiB;AAEpB,SAAA6C,EAAU,MAAM;AACV,QAAA,GAAC1C,KAAiBQ;AAEf,oBAAA,iBAAiB,UAAU4B,GAAoB,EAAI,GACnD,OAAA,iBAAiB,UAAUA,CAAkB,GAE7C,MAAM;AACJ,eAAA,oBAAoB,UAAUA,GAAoB,EAAI,GACtD,OAAA,oBAAoB,UAAUA,CAAkB;AAAA,MAAA;AAAA,KAExD,CAACpC,GAAeQ,GAAQC,GAAU2B,CAAkB,CAAC,GAExDM,EAAU,MAAM;AACd,IAAIlC,KACFmB,EAAW,EAAK,GAGd3B,KACiBoC;EACrB,GAEC,CAACpC,GAAeQ,CAAM,CAAC,GAItB,gBAAAmC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQ3B,KAAe;AAAA,QACvB,KAAKK;AAAA,QACL,cAAcY;AAAA,QACd,cAAcD;AAAA,QAEd,UAAA,gBAAAU,EAACC,KAAU,UAAAvC,EAAS,CAAA;AAAA,MAAA;AAAA,IACtB;AAAA,IACCmB,KACC,gBAAAmB,EAACE,GAAO,EAAA,UAAS,gBACf,UAAA,gBAAAF;AAAA,MAACG;AAAAA,MAAA;AAAA,QACC,YAAY9C;AAAA,QACZ,oBAAoBC;AAAA,QACpB,oBAAoBC;AAAA,QACpB,WAAWK;AAAA,QACX,WAAWC;AAAA,QACX,qBAAqBmB;AAAA,QACrB,gBAAgBhB;AAAA,QAChB,sBAAsBC;AAAA,QACtB,sBAAsBC;AAAA,QACtB,QAAQC;AAAA,QACR,SAASC;AAAA,QACT,SAASC;AAAA,QACT,aAAaK;AAAA,QACb,kBAAkBlB;AAAA,QAClB,aAAaJ;AAAA,QACb,cAAcK;AAAA,QACd,aAAaP;AAAA,QAEZ,UAAA,OAAOa,KAAgB,WACtB,gBAAAiC;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,WAAWtC,KAAe;AAAA,YAC1B,QAAQW,EAAgBZ,CAAQ,EAAE;AAAA,YAClC,QAAO;AAAA,YAEN,UAAAE;AAAA,UAAA;AAAA,QAAA,IAGHA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAsC,KAAepD;"}
|
@@ -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,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader = false, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,IAAa,IAAO,GAAGC,QAAY;AAC7D,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsx as r, jsxs as
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
2
|
import { useTheme as g } from "styled-components";
|
3
3
|
import { Container as x, Wrapper as z, InputWrapper as f, Error as L, HelperText as y, SiblingWrapper as R, Label as E } from "./base-input-styled.js";
|
4
|
-
const
|
4
|
+
const H = ($) => {
|
5
5
|
const {
|
6
|
-
label:
|
7
|
-
stickyLabel:
|
6
|
+
label: l,
|
7
|
+
stickyLabel: h,
|
8
8
|
renderAs: e,
|
9
9
|
width: b,
|
10
10
|
widthX: c,
|
@@ -19,8 +19,8 @@ const k = (h) => {
|
|
19
19
|
shape: t,
|
20
20
|
isTransparent: p = !1,
|
21
21
|
helperText: o
|
22
|
-
} =
|
23
|
-
return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */
|
22
|
+
} = $, { input: T } = g();
|
23
|
+
return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ a(
|
24
24
|
z,
|
25
25
|
{
|
26
26
|
$renderAs: e,
|
@@ -29,7 +29,7 @@ const k = (h) => {
|
|
29
29
|
$shape: t,
|
30
30
|
$isTransparent: p,
|
31
31
|
children: [
|
32
|
-
/* @__PURE__ */
|
32
|
+
/* @__PURE__ */ a(f, { children: [
|
33
33
|
w,
|
34
34
|
n && /* @__PURE__ */ r(L, { $renderAs: "body3", $inputRenderAs: e, children: n }),
|
35
35
|
o && !n && /* @__PURE__ */ r(y, { $renderAs: "ub3", $inputRenderAs: e, children: o })
|
@@ -44,18 +44,18 @@ const k = (h) => {
|
|
44
44
|
children: d
|
45
45
|
}
|
46
46
|
) : void 0,
|
47
|
-
|
47
|
+
l && t !== "curved" && /* @__PURE__ */ a(
|
48
48
|
E,
|
49
49
|
{
|
50
50
|
$renderAs: T.sizes[s].labelTextVariant,
|
51
51
|
$inputRenderAs: e,
|
52
52
|
$size: s,
|
53
|
-
$stickyLabel:
|
53
|
+
$stickyLabel: h,
|
54
54
|
$disabled: i,
|
55
55
|
$shape: t,
|
56
56
|
$isTransparent: p,
|
57
57
|
children: [
|
58
|
-
|
58
|
+
l,
|
59
59
|
A && /* @__PURE__ */ r("span", { children: "*" })
|
60
60
|
]
|
61
61
|
}
|
@@ -63,7 +63,7 @@ const k = (h) => {
|
|
63
63
|
]
|
64
64
|
}
|
65
65
|
) });
|
66
|
-
};
|
66
|
+
}, k = H;
|
67
67
|
export {
|
68
68
|
k as default
|
69
69
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-input.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n Container,\n Error,\n InputWrapper,\n Label,\n SiblingWrapper,\n Wrapper,\n HelperText,\n} from './base-input-styled';\n\nconst BaseInput: React.FC<IBaseInputProps> = props => {\n const {\n label,\n stickyLabel,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n inputElement,\n siblingElement,\n siblingPosition,\n size,\n errorMessage,\n mandatory,\n shape,\n isTransparent = false,\n helperText,\n } = props;\n const { input } = useTheme();\n const showLabel = label && shape !== 'curved';\n const showHelperText = helperText && !errorMessage;\n\n return (\n <Container $width={width} $widthX={widthX} $size={size} $willShowMessage={willShowMessage}>\n <Wrapper\n $renderAs={renderAs}\n $size={size}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n <InputWrapper>\n {inputElement}\n {errorMessage && (\n <Error $renderAs=\"body3\" $inputRenderAs={renderAs}>\n {errorMessage}\n </Error>\n )}\n {showHelperText && (\n <HelperText $renderAs=\"ub3\" $inputRenderAs={renderAs}>\n {helperText}\n </HelperText>\n )}\n </InputWrapper>\n {siblingElement ? (\n <SiblingWrapper\n $inputRenderAs={renderAs}\n $disabled={disabled}\n $size={size}\n $siblingPosition={siblingPosition ?? 'right'}\n >\n {siblingElement}\n </SiblingWrapper>\n ) : undefined}\n {showLabel && (\n <Label\n $renderAs={input.sizes[size].labelTextVariant}\n $inputRenderAs={renderAs}\n $size={size}\n $stickyLabel={stickyLabel}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n {label}\n {mandatory && <span>*</span>}\n </Label>\n )}\n </Wrapper>\n </Container>\n );\n};\n\nexport default BaseInput;\n"],"names":["BaseInput","props","label","stickyLabel","renderAs","width","widthX","disabled","willShowMessage","inputElement","siblingElement","siblingPosition","size","errorMessage","mandatory","shape","isTransparent","helperText","input","useTheme","jsx","Container","jsxs","Wrapper","InputWrapper","Error","HelperText","SiblingWrapper","Label"],"mappings":";;;AAeA,MAAMA,IAAuC,CAASC,MAAA;AAC9C,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,YAAAC;AAAA,EACE,IAAAhB,GACE,EAAE,OAAAiB,MAAUC;AAKhB,SAAA,gBAAAC,EAACC,KAAU,QAAQhB,GAAO,SAASC,GAAQ,OAAOM,GAAM,kBAAkBJ,GACxE,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWnB;AAAA,MACX,OAAOQ;AAAA,MACP,WAAWL;AAAA,MACX,QAAQQ;AAAA,MACR,gBAAgBC;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAM,EAACE,GACE,EAAA,UAAA;AAAA,UAAAf;AAAA,UACAI,KACE,gBAAAO,EAAAK,GAAA,EAAM,WAAU,SAAQ,gBAAgBrB,GACtC,UACHS,GAAA;AAAA,UAhBaI,KAAc,CAACJ,KAmB3B,gBAAAO,EAAAM,GAAA,EAAW,WAAU,OAAM,gBAAgBtB,GACzC,UACHa,GAAA;AAAA,QAAA,GAEJ;AAAA,QACCP,IACC,gBAAAU;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,gBAAgBvB;AAAA,YAChB,WAAWG;AAAA,YACX,OAAOK;AAAA,YACP,kBAAkBD,KAAmB;AAAA,YAEpC,UAAAD;AAAA,UAAA;AAAA,QAED,IAAA;AAAA,QAlCQR,KAASa,MAAU,YAoC7B,gBAAAO;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,WAAWV,EAAM,MAAMN,CAAI,EAAE;AAAA,YAC7B,gBAAgBR;AAAA,YAChB,OAAOQ;AAAA,YACP,cAAcT;AAAA,YACd,WAAWI;AAAA,YACX,QAAQQ;AAAA,YACR,gBAAgBC;AAAA,YAEf,UAAA;AAAA,cAAAd;AAAA,cACAY,KAAc,gBAAAM,EAAA,QAAA,EAAK,UAAC,IAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACvB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"base-input.js","sources":["../../../../../src/features/ui/inputs/base-input/base-input.tsx"],"sourcesContent":["import type { IBaseInputProps } from './base-input-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n Container,\n Error,\n InputWrapper,\n Label,\n SiblingWrapper,\n Wrapper,\n HelperText,\n} from './base-input-styled';\n\nconst BaseInput: React.FC<IBaseInputProps> = props => {\n const {\n label,\n stickyLabel,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n inputElement,\n siblingElement,\n siblingPosition,\n size,\n errorMessage,\n mandatory,\n shape,\n isTransparent = false,\n helperText,\n } = props;\n const { input } = useTheme();\n const showLabel = label && shape !== 'curved';\n const showHelperText = helperText && !errorMessage;\n\n return (\n <Container $width={width} $widthX={widthX} $size={size} $willShowMessage={willShowMessage}>\n <Wrapper\n $renderAs={renderAs}\n $size={size}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n <InputWrapper>\n {inputElement}\n {errorMessage && (\n <Error $renderAs=\"body3\" $inputRenderAs={renderAs}>\n {errorMessage}\n </Error>\n )}\n {showHelperText && (\n <HelperText $renderAs=\"ub3\" $inputRenderAs={renderAs}>\n {helperText}\n </HelperText>\n )}\n </InputWrapper>\n {siblingElement ? (\n <SiblingWrapper\n $inputRenderAs={renderAs}\n $disabled={disabled}\n $size={size}\n $siblingPosition={siblingPosition ?? 'right'}\n >\n {siblingElement}\n </SiblingWrapper>\n ) : undefined}\n {showLabel && (\n <Label\n $renderAs={input.sizes[size].labelTextVariant}\n $inputRenderAs={renderAs}\n $size={size}\n $stickyLabel={stickyLabel}\n $disabled={disabled}\n $shape={shape}\n $isTransparent={isTransparent}\n >\n {label}\n {mandatory && <span>*</span>}\n </Label>\n )}\n </Wrapper>\n </Container>\n );\n};\n\nexport default BaseInput;\n"],"names":["BaseInput","props","label","stickyLabel","renderAs","width","widthX","disabled","willShowMessage","inputElement","siblingElement","siblingPosition","size","errorMessage","mandatory","shape","isTransparent","helperText","input","useTheme","jsx","Container","jsxs","Wrapper","InputWrapper","Error","HelperText","SiblingWrapper","Label","BaseInput$1"],"mappings":";;;AAeA,MAAMA,IAAuC,CAASC,MAAA;AAC9C,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC,IAAgB;AAAA,IAChB,YAAAC;AAAA,EACE,IAAAhB,GACE,EAAE,OAAAiB,MAAUC;AAKhB,SAAA,gBAAAC,EAACC,KAAU,QAAQhB,GAAO,SAASC,GAAQ,OAAOM,GAAM,kBAAkBJ,GACxE,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWnB;AAAA,MACX,OAAOQ;AAAA,MACP,WAAWL;AAAA,MACX,QAAQQ;AAAA,MACR,gBAAgBC;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAM,EAACE,GACE,EAAA,UAAA;AAAA,UAAAf;AAAA,UACAI,KACE,gBAAAO,EAAAK,GAAA,EAAM,WAAU,SAAQ,gBAAgBrB,GACtC,UACHS,GAAA;AAAA,UAhBaI,KAAc,CAACJ,KAmB3B,gBAAAO,EAAAM,GAAA,EAAW,WAAU,OAAM,gBAAgBtB,GACzC,UACHa,GAAA;AAAA,QAAA,GAEJ;AAAA,QACCP,IACC,gBAAAU;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,gBAAgBvB;AAAA,YAChB,WAAWG;AAAA,YACX,OAAOK;AAAA,YACP,kBAAkBD,KAAmB;AAAA,YAEpC,UAAAD;AAAA,UAAA;AAAA,QAED,IAAA;AAAA,QAlCQR,KAASa,MAAU,YAoC7B,gBAAAO;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,WAAWV,EAAM,MAAMN,CAAI,EAAE;AAAA,YAC7B,gBAAgBR;AAAA,YAChB,OAAOQ;AAAA,YACP,cAAcT;AAAA,YACd,WAAWI;AAAA,YACX,QAAQQ;AAAA,YACR,gBAAgBC;AAAA,YAEf,UAAA;AAAA,cAAAd;AAAA,cACAY,KAAc,gBAAAM,EAAA,QAAA,EAAK,UAAC,IAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACvB;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ,GAEAS,IAAe7B;"}
|
@@ -1,29 +1,29 @@
|
|
1
1
|
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
2
|
-
import { useCallback as
|
3
|
-
import { useTheme as
|
4
|
-
import
|
5
|
-
import { CheckboxOptionWrapper as W, CheckboxInputWrapper as z, CheckboxInput as A, CheckIcon as
|
6
|
-
const
|
2
|
+
import { useCallback as g } from "react";
|
3
|
+
import { useTheme as v } from "styled-components";
|
4
|
+
import I from "../../text/text.js";
|
5
|
+
import { CheckboxOptionWrapper as W, CheckboxInputWrapper as z, CheckboxInput as A, CheckIcon as O, IndeterminateIcon as T, CheckboxLabelWrapper as y } from "./checkbox-input-styled.js";
|
6
|
+
const L = (h) => {
|
7
7
|
const {
|
8
8
|
size: r,
|
9
9
|
label: i,
|
10
|
-
value:
|
10
|
+
value: a,
|
11
11
|
checked: e,
|
12
12
|
disabled: n,
|
13
|
-
renderAs:
|
13
|
+
renderAs: o,
|
14
14
|
labelWidthX: p,
|
15
|
-
indeterminate:
|
16
|
-
visibleOnCheck:
|
17
|
-
alignTopWithLabel:
|
15
|
+
indeterminate: k,
|
16
|
+
visibleOnCheck: u,
|
17
|
+
alignTopWithLabel: C = !1,
|
18
18
|
onChange: l
|
19
19
|
} = h, {
|
20
|
-
layout: { gutter:
|
20
|
+
layout: { gutter: $ },
|
21
21
|
checkbox: c
|
22
|
-
} =
|
22
|
+
} = v(), { textVariant: m } = c.sizes[r ?? "regular"], { textColorName: x } = c.variants[o ?? "black"], s = u ? e : !0, f = !e && k, d = g(() => {
|
23
23
|
if (n) return null;
|
24
|
-
l(
|
25
|
-
}, [e, n, l,
|
26
|
-
return /* @__PURE__ */ b(W, { $alignTop:
|
24
|
+
l(a, !e);
|
25
|
+
}, [e, n, l, a]);
|
26
|
+
return /* @__PURE__ */ b(W, { $alignTop: C, $disabled: n, children: [
|
27
27
|
/* @__PURE__ */ b(z, { onClick: d, $disabled: n, children: [
|
28
28
|
/* @__PURE__ */ t(
|
29
29
|
A,
|
@@ -32,15 +32,15 @@ const O = (h) => {
|
|
32
32
|
checked: e,
|
33
33
|
disabled: !!n,
|
34
34
|
onChange: () => null,
|
35
|
-
$renderAs:
|
35
|
+
$renderAs: o,
|
36
36
|
$size: r
|
37
37
|
}
|
38
38
|
),
|
39
|
-
e && /* @__PURE__ */ t(
|
40
|
-
f && /* @__PURE__ */ t(
|
39
|
+
e && /* @__PURE__ */ t(O, { $renderAs: o, $size: r }),
|
40
|
+
f && /* @__PURE__ */ t(T, { $disabled: n, $size: $ * 1.125 })
|
41
41
|
] }),
|
42
42
|
/* @__PURE__ */ t(
|
43
|
-
|
43
|
+
y,
|
44
44
|
{
|
45
45
|
$labelWidthX: p,
|
46
46
|
$visible: s,
|
@@ -48,7 +48,7 @@ const O = (h) => {
|
|
48
48
|
$disabled: n,
|
49
49
|
$checked: e,
|
50
50
|
children: typeof i == "string" ? /* @__PURE__ */ t(
|
51
|
-
|
51
|
+
I,
|
52
52
|
{
|
53
53
|
$renderAs: m[e ? "active" : "inactive"],
|
54
54
|
$color: x[e ? "active" : "inactive"],
|
@@ -58,7 +58,7 @@ const O = (h) => {
|
|
58
58
|
}
|
59
59
|
)
|
60
60
|
] });
|
61
|
-
}, q =
|
61
|
+
}, q = L;
|
62
62
|
export {
|
63
63
|
q as default
|
64
64
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkbox-input.js","sources":["../../../../../src/features/ui/inputs/checkbox-input/checkbox-input.tsx"],"sourcesContent":["import type { ICheckboxOptionProps } from './checkbox-input-types';\n\nimport { useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../../text/text';\nimport * as Styled from './checkbox-input-styled';\n\nconst CheckboxInput = <IDType extends string | number>(props: ICheckboxOptionProps<IDType>) => {\n const {\n size,\n label,\n value,\n checked,\n disabled,\n renderAs,\n labelWidthX,\n indeterminate,\n visibleOnCheck,\n alignTopWithLabel = false,\n onChange,\n } = props;\n\n const {\n layout: { gutter },\n checkbox,\n } = useTheme();\n\n const { textVariant } = checkbox.sizes[size ?? 'regular'];\n const { textColorName } = checkbox.variants[renderAs ?? 'black'];\n\n const renderLabel = visibleOnCheck ? checked : true;\n const renderIndeterminateState = !checked && indeterminate;\n\n const handleOnChange = useCallback(() => {\n if (disabled) return null;\n\n onChange(value, !checked);\n }, [checked, disabled, onChange, value]);\n\n return (\n <Styled.CheckboxOptionWrapper $alignTop={alignTopWithLabel} $disabled={disabled}>\n <Styled.CheckboxInputWrapper onClick={handleOnChange} $disabled={disabled}>\n <Styled.CheckboxInput\n type=\"checkbox\"\n checked={checked}\n disabled={!!disabled}\n onChange={() => null}\n $renderAs={renderAs}\n $size={size}\n />\n {checked && <Styled.CheckIcon $renderAs={renderAs} $size={size} />}\n\n {renderIndeterminateState && (\n <Styled.IndeterminateIcon $disabled={disabled} $size={gutter * 1.125} />\n )}\n </Styled.CheckboxInputWrapper>\n\n <Styled.CheckboxLabelWrapper\n $labelWidthX={labelWidthX}\n $visible={renderLabel}\n onClick={renderLabel ? handleOnChange : () => null}\n $disabled={disabled}\n $checked={checked}\n >\n {typeof label === 'string' ? (\n <Text\n $renderAs={textVariant[checked ? 'active' : 'inactive']}\n $color={textColorName[checked ? 'active' : 'inactive']}\n >\n {label}\n </Text>\n ) : (\n label\n )}\n </Styled.CheckboxLabelWrapper>\n </Styled.CheckboxOptionWrapper>\n );\n};\n\nexport default CheckboxInput;\n"],"names":["CheckboxInput","props","size","label","value","checked","disabled","renderAs","labelWidthX","indeterminate","visibleOnCheck","alignTopWithLabel","onChange","gutter","checkbox","useTheme","textVariant","textColorName","renderLabel","renderIndeterminateState","handleOnChange","useCallback","Styled.CheckboxOptionWrapper","jsxs","Styled.CheckboxInputWrapper","jsx","Styled.CheckboxInput","Styled.CheckIcon","Styled.IndeterminateIcon","Styled.CheckboxLabelWrapper","Text","
|
1
|
+
{"version":3,"file":"checkbox-input.js","sources":["../../../../../src/features/ui/inputs/checkbox-input/checkbox-input.tsx"],"sourcesContent":["import type { ICheckboxOptionProps } from './checkbox-input-types';\n\nimport { useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Text from '../../text/text';\nimport * as Styled from './checkbox-input-styled';\n\nconst CheckboxInput = <IDType extends string | number>(props: ICheckboxOptionProps<IDType>) => {\n const {\n size,\n label,\n value,\n checked,\n disabled,\n renderAs,\n labelWidthX,\n indeterminate,\n visibleOnCheck,\n alignTopWithLabel = false,\n onChange,\n } = props;\n\n const {\n layout: { gutter },\n checkbox,\n } = useTheme();\n\n const { textVariant } = checkbox.sizes[size ?? 'regular'];\n const { textColorName } = checkbox.variants[renderAs ?? 'black'];\n\n const renderLabel = visibleOnCheck ? checked : true;\n const renderIndeterminateState = !checked && indeterminate;\n\n const handleOnChange = useCallback(() => {\n if (disabled) return null;\n\n onChange(value, !checked);\n }, [checked, disabled, onChange, value]);\n\n return (\n <Styled.CheckboxOptionWrapper $alignTop={alignTopWithLabel} $disabled={disabled}>\n <Styled.CheckboxInputWrapper onClick={handleOnChange} $disabled={disabled}>\n <Styled.CheckboxInput\n type=\"checkbox\"\n checked={checked}\n disabled={!!disabled}\n onChange={() => null}\n $renderAs={renderAs}\n $size={size}\n />\n {checked && <Styled.CheckIcon $renderAs={renderAs} $size={size} />}\n\n {renderIndeterminateState && (\n <Styled.IndeterminateIcon $disabled={disabled} $size={gutter * 1.125} />\n )}\n </Styled.CheckboxInputWrapper>\n\n <Styled.CheckboxLabelWrapper\n $labelWidthX={labelWidthX}\n $visible={renderLabel}\n onClick={renderLabel ? handleOnChange : () => null}\n $disabled={disabled}\n $checked={checked}\n >\n {typeof label === 'string' ? (\n <Text\n $renderAs={textVariant[checked ? 'active' : 'inactive']}\n $color={textColorName[checked ? 'active' : 'inactive']}\n >\n {label}\n </Text>\n ) : (\n label\n )}\n </Styled.CheckboxLabelWrapper>\n </Styled.CheckboxOptionWrapper>\n );\n};\n\nexport default CheckboxInput;\n"],"names":["CheckboxInput","props","size","label","value","checked","disabled","renderAs","labelWidthX","indeterminate","visibleOnCheck","alignTopWithLabel","onChange","gutter","checkbox","useTheme","textVariant","textColorName","renderLabel","renderIndeterminateState","handleOnChange","useCallback","Styled.CheckboxOptionWrapper","jsxs","Styled.CheckboxInputWrapper","jsx","Styled.CheckboxInput","Styled.CheckIcon","Styled.IndeterminateIcon","Styled.CheckboxLabelWrapper","Text","CheckboxOption"],"mappings":";;;;;AAQA,MAAMA,IAAgB,CAAiCC,MAAwC;AACvF,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,UAAAC;AAAA,EACE,IAAAX,GAEE;AAAA,IACJ,QAAQ,EAAE,QAAAY,EAAO;AAAA,IACjB,UAAAC;AAAA,MACEC,EAAS,GAEP,EAAE,aAAAC,EAAY,IAAIF,EAAS,MAAMZ,KAAQ,SAAS,GAClD,EAAE,eAAAe,EAAc,IAAIH,EAAS,SAASP,KAAY,OAAO,GAEzDW,IAAcR,IAAiBL,IAAU,IACzCc,IAA2B,CAACd,KAAWI,GAEvCW,IAAiBC,EAAY,MAAM;AACvC,QAAIf,EAAiB,QAAA;AAEZ,IAAAM,EAAAR,GAAO,CAACC,CAAO;AAAA,KACvB,CAACA,GAASC,GAAUM,GAAUR,CAAK,CAAC;AAEvC,2BACGkB,GAAA,EAA6B,WAAWX,GAAmB,WAAWL,GACrE,UAAA;AAAA,IAAA,gBAAAiB,EAACC,GAAA,EAA4B,SAASJ,GAAgB,WAAWd,GAC/D,UAAA;AAAA,MAAA,gBAAAmB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAArB;AAAA,UACA,UAAU,CAAC,CAACC;AAAA,UACZ,UAAU,MAAM;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOL;AAAA,QAAA;AAAA,MACT;AAAA,MACCG,uBAAYsB,GAAA,EAAiB,WAAWpB,GAAU,OAAOL,GAAM;AAAA,MAE/DiB,uBACES,GAAA,EAAyB,WAAWtB,GAAU,OAAOO,IAAS,OAAO;AAAA,IAAA,GAE1E;AAAA,IAEA,gBAAAY;AAAA,MAACI;AAAAA,MAAA;AAAA,QACC,cAAcrB;AAAA,QACd,UAAUU;AAAA,QACV,SAASA,IAAcE,IAAiB,MAAM;AAAA,QAC9C,WAAWd;AAAA,QACX,UAAUD;AAAA,QAET,UAAA,OAAOF,KAAU,WAChB,gBAAAsB;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,WAAWd,EAAYX,IAAU,WAAW,UAAU;AAAA,YACtD,QAAQY,EAAcZ,IAAU,WAAW,UAAU;AAAA,YAEpD,UAAAF;AAAA,UAAA;AAAA,QAAA,IAGHA;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,GAEA4B,IAAe/B;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { useMemo as g, useCallback as I } from "react";
|
3
3
|
import L from "../../arrow-tooltip/arrow-tooltip.js";
|
4
|
-
import
|
5
|
-
import { CheckboxInputListWrapper as
|
4
|
+
import O from "../checkbox-input/checkbox-input.js";
|
5
|
+
import { CheckboxInputListWrapper as v, CheckboxOptionWrapper as A } from "./checkbox-input-list-styled.js";
|
6
6
|
const $ = (h) => {
|
7
7
|
const {
|
8
8
|
size: a,
|
@@ -24,9 +24,9 @@ const $ = (h) => {
|
|
24
24
|
},
|
25
25
|
[e, i, c, o]
|
26
26
|
);
|
27
|
-
return /* @__PURE__ */ r(
|
27
|
+
return /* @__PURE__ */ r(v, { children: d.map((t) => {
|
28
28
|
const { id: n, label: l } = t, p = o.includes(n), m = c && !p, k = (s == null ? void 0 : s.includes(n)) || m;
|
29
|
-
return /* @__PURE__ */ r(
|
29
|
+
return /* @__PURE__ */ r(A, { $numColumns: C ?? 1, children: /* @__PURE__ */ r(
|
30
30
|
L,
|
31
31
|
{
|
32
32
|
renderAs: "primary",
|
@@ -35,7 +35,7 @@ const $ = (h) => {
|
|
35
35
|
hidden: !m,
|
36
36
|
zIndex: 2,
|
37
37
|
children: /* @__PURE__ */ r(
|
38
|
-
|
38
|
+
O,
|
39
39
|
{
|
40
40
|
value: n,
|
41
41
|
size: a,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"checkbox-input-list.js","sources":["../../../../../src/features/ui/inputs/checkbox-input-list/checkbox-input-list.tsx"],"sourcesContent":["import type { ICheckboxInputProps } from './checkbox-input-list-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport ArrowTooltip from '../../arrow-tooltip/arrow-tooltip';\nimport CheckboxOption from '../checkbox-input/checkbox-input';\nimport * as Styled from './checkbox-input-list-styled';\n\nconst CheckboxInputList = <IDType extends string | number>(props: ICheckboxInputProps<IDType>) => {\n const {\n size,\n value,\n options,\n disabled,\n renderAs,\n numColumns,\n indeterminate,\n visibleOnCheck,\n maximumSelection,\n onChange,\n } = props;\n\n const reachedMaxLength = useMemo(\n () => !!(maximumSelection && maximumSelection > 1 && value.length >= maximumSelection),\n [maximumSelection, value.length],\n );\n\n const handleOnChange = useCallback(\n (selectedValue: IDType, selected: boolean) => {\n if (!selected) {\n onChange(value.filter(val => val !== selectedValue));\n } else {\n if (maximumSelection === 1) {\n onChange([selectedValue]);\n } else if (!reachedMaxLength || !maximumSelection) {\n onChange([...value, selectedValue]);\n }\n }\n },\n [maximumSelection, onChange, reachedMaxLength, value],\n );\n\n return (\n <Styled.CheckboxInputListWrapper>\n {options.map(option => {\n const { id, label } = option;\n\n const checked = value.includes(id);\n const showTooltip = reachedMaxLength && !checked;\n const disableCheck = disabled?.includes(id) || showTooltip;\n\n return (\n <Styled.CheckboxOptionWrapper key={id} $numColumns={numColumns ?? 1}>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n tooltipItem={`${maximumSelection} options already selected`}\n hidden={!showTooltip}\n zIndex={2}\n >\n <CheckboxOption<IDType>\n value={id}\n size={size}\n label={label}\n checked={checked}\n renderAs={renderAs}\n disabled={disableCheck}\n onChange={handleOnChange}\n indeterminate={indeterminate} //* Took this name from Mui.\n visibleOnCheck={visibleOnCheck}\n />\n </ArrowTooltip>\n </Styled.CheckboxOptionWrapper>\n );\n })}\n </Styled.CheckboxInputListWrapper>\n );\n};\n\nexport default CheckboxInputList;\n"],"names":["CheckboxInputList","props","size","value","options","disabled","renderAs","numColumns","indeterminate","visibleOnCheck","maximumSelection","onChange","reachedMaxLength","useMemo","handleOnChange","useCallback","selectedValue","selected","val","Styled.CheckboxInputListWrapper","option","id","label","checked","showTooltip","disableCheck","Styled.CheckboxOptionWrapper","jsx","ArrowTooltip","CheckboxOption","CheckboxInputList$1"],"mappings":";;;;;AAQA,MAAMA,IAAoB,CAAiCC,MAAuC;AAC1F,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAV,GAEEW,IAAmBC;AAAA,IACvB,MAAM,CAAC,EAAEH,KAAoBA,IAAmB,KAAKP,EAAM,UAAUO;AAAA,IACrE,CAACA,GAAkBP,EAAM,MAAM;AAAA,EAAA,GAG3BW,IAAiBC;AAAA,IACrB,CAACC,GAAuBC,MAAsB;AAC5C,MAAKA,IAGCP,MAAqB,IACdC,EAAA,CAACK,CAAa,CAAC,KACf,CAACJ,KAAoB,CAACF,MAC/BC,EAAS,CAAC,GAAGR,GAAOa,CAAa,CAAC,IALpCL,EAASR,EAAM,OAAO,CAAOe,MAAAA,MAAQF,CAAa,CAAC;AAAA,IAQvD;AAAA,IACA,CAACN,GAAkBC,GAAUC,GAAkBT,CAAK;AAAA,EAAA;AAGtD,2BACGgB,GAAA,EACE,UAAAf,EAAQ,IAAI,CAAUgB,MAAA;AACf,UAAA,EAAE,IAAAC,GAAI,OAAAC,EAAU,IAAAF,GAEhBG,IAAUpB,EAAM,SAASkB,CAAE,GAC3BG,IAAcZ,KAAoB,CAACW,GACnCE,KAAepB,KAAA,gBAAAA,EAAU,SAASgB,OAAOG;AAE/C,6BACGE,GAAA,EAAsC,aAAanB,KAAc,GAChE,UAAA,gBAAAoB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,aAAa,GAAGlB,CAAgB;AAAA,QAChC,QAAQ,CAACc;AAAA,QACT,QAAQ;AAAA,QAER,UAAA,gBAAAG;AAAA,UAACE;
|
1
|
+
{"version":3,"file":"checkbox-input-list.js","sources":["../../../../../src/features/ui/inputs/checkbox-input-list/checkbox-input-list.tsx"],"sourcesContent":["import type { ICheckboxInputProps } from './checkbox-input-list-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport ArrowTooltip from '../../arrow-tooltip/arrow-tooltip';\nimport CheckboxOption from '../checkbox-input/checkbox-input';\nimport * as Styled from './checkbox-input-list-styled';\n\nconst CheckboxInputList = <IDType extends string | number>(props: ICheckboxInputProps<IDType>) => {\n const {\n size,\n value,\n options,\n disabled,\n renderAs,\n numColumns,\n indeterminate,\n visibleOnCheck,\n maximumSelection,\n onChange,\n } = props;\n\n const reachedMaxLength = useMemo(\n () => !!(maximumSelection && maximumSelection > 1 && value.length >= maximumSelection),\n [maximumSelection, value.length],\n );\n\n const handleOnChange = useCallback(\n (selectedValue: IDType, selected: boolean) => {\n if (!selected) {\n onChange(value.filter(val => val !== selectedValue));\n } else {\n if (maximumSelection === 1) {\n onChange([selectedValue]);\n } else if (!reachedMaxLength || !maximumSelection) {\n onChange([...value, selectedValue]);\n }\n }\n },\n [maximumSelection, onChange, reachedMaxLength, value],\n );\n\n return (\n <Styled.CheckboxInputListWrapper>\n {options.map(option => {\n const { id, label } = option;\n\n const checked = value.includes(id);\n const showTooltip = reachedMaxLength && !checked;\n const disableCheck = disabled?.includes(id) || showTooltip;\n\n return (\n <Styled.CheckboxOptionWrapper key={id} $numColumns={numColumns ?? 1}>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n tooltipItem={`${maximumSelection} options already selected`}\n hidden={!showTooltip}\n zIndex={2}\n >\n <CheckboxOption<IDType>\n value={id}\n size={size}\n label={label}\n checked={checked}\n renderAs={renderAs}\n disabled={disableCheck}\n onChange={handleOnChange}\n indeterminate={indeterminate} //* Took this name from Mui.\n visibleOnCheck={visibleOnCheck}\n />\n </ArrowTooltip>\n </Styled.CheckboxOptionWrapper>\n );\n })}\n </Styled.CheckboxInputListWrapper>\n );\n};\n\nexport default CheckboxInputList;\n"],"names":["CheckboxInputList","props","size","value","options","disabled","renderAs","numColumns","indeterminate","visibleOnCheck","maximumSelection","onChange","reachedMaxLength","useMemo","handleOnChange","useCallback","selectedValue","selected","val","Styled.CheckboxInputListWrapper","option","id","label","checked","showTooltip","disableCheck","Styled.CheckboxOptionWrapper","jsx","ArrowTooltip","CheckboxOption","CheckboxInputList$1"],"mappings":";;;;;AAQA,MAAMA,IAAoB,CAAiCC,MAAuC;AAC1F,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAV,GAEEW,IAAmBC;AAAA,IACvB,MAAM,CAAC,EAAEH,KAAoBA,IAAmB,KAAKP,EAAM,UAAUO;AAAA,IACrE,CAACA,GAAkBP,EAAM,MAAM;AAAA,EAAA,GAG3BW,IAAiBC;AAAA,IACrB,CAACC,GAAuBC,MAAsB;AAC5C,MAAKA,IAGCP,MAAqB,IACdC,EAAA,CAACK,CAAa,CAAC,KACf,CAACJ,KAAoB,CAACF,MAC/BC,EAAS,CAAC,GAAGR,GAAOa,CAAa,CAAC,IALpCL,EAASR,EAAM,OAAO,CAAOe,MAAAA,MAAQF,CAAa,CAAC;AAAA,IAQvD;AAAA,IACA,CAACN,GAAkBC,GAAUC,GAAkBT,CAAK;AAAA,EAAA;AAGtD,2BACGgB,GAAA,EACE,UAAAf,EAAQ,IAAI,CAAUgB,MAAA;AACf,UAAA,EAAE,IAAAC,GAAI,OAAAC,EAAU,IAAAF,GAEhBG,IAAUpB,EAAM,SAASkB,CAAE,GAC3BG,IAAcZ,KAAoB,CAACW,GACnCE,KAAepB,KAAA,gBAAAA,EAAU,SAASgB,OAAOG;AAE/C,6BACGE,GAAA,EAAsC,aAAanB,KAAc,GAChE,UAAA,gBAAAoB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,aAAa,GAAGlB,CAAgB;AAAA,QAChC,QAAQ,CAACc;AAAA,QACT,QAAQ;AAAA,QAER,UAAA,gBAAAG;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,OAAOR;AAAA,YACP,MAAAnB;AAAA,YACA,OAAAoB;AAAA,YACA,SAAAC;AAAA,YACA,UAAAjB;AAAA,YACA,UAAUmB;AAAA,YACV,UAAUX;AAAA,YACV,eAAAN;AAAA,YACA,gBAAAC;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA,KAlB+BY,CAoBnC;AAAA,EAEH,CAAA,EACH,CAAA;AAEJ,GAEAS,IAAe9B;"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { jsx as
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
2
2
|
import { forwardRef as I } from "react";
|
3
3
|
import T from "../base-input/base-input.js";
|
4
|
-
import { Input as
|
5
|
-
const i = "regular",
|
4
|
+
import { Input as g } from "./text-input-styled.js";
|
5
|
+
const i = "regular", $ = I((o, l) => {
|
6
6
|
const {
|
7
7
|
type: e,
|
8
|
-
label:
|
8
|
+
label: p,
|
9
9
|
value: t,
|
10
10
|
renderAs: r,
|
11
11
|
width: m,
|
@@ -14,43 +14,44 @@ const i = "regular", g = I((o, p) => {
|
|
14
14
|
willShowMessage: d,
|
15
15
|
siblingElement: f,
|
16
16
|
errorMessage: c,
|
17
|
-
shape:
|
18
|
-
isTransparent:
|
19
|
-
helperText:
|
17
|
+
shape: b,
|
18
|
+
isTransparent: a,
|
19
|
+
helperText: h,
|
20
|
+
stickyLabel: w,
|
20
21
|
...x
|
21
22
|
} = o;
|
22
|
-
return /* @__PURE__ */
|
23
|
+
return /* @__PURE__ */ n(
|
23
24
|
T,
|
24
25
|
{
|
25
26
|
renderAs: r,
|
26
|
-
label:
|
27
|
-
stickyLabel: !!t || e === "date",
|
27
|
+
label: p,
|
28
|
+
stickyLabel: !!t || e === "date" || w,
|
28
29
|
width: m,
|
29
30
|
widthX: u,
|
30
31
|
disabled: s,
|
31
32
|
willShowMessage: d,
|
32
33
|
size: i,
|
33
|
-
shape:
|
34
|
+
shape: b,
|
34
35
|
errorMessage: c,
|
35
|
-
helperText:
|
36
|
-
isTransparent:
|
37
|
-
inputElement: /* @__PURE__ */
|
38
|
-
|
36
|
+
helperText: h,
|
37
|
+
isTransparent: a,
|
38
|
+
inputElement: /* @__PURE__ */ n(
|
39
|
+
g,
|
39
40
|
{
|
40
|
-
ref:
|
41
|
+
ref: l,
|
41
42
|
type: e,
|
42
43
|
value: t ?? "",
|
43
44
|
$renderAs: r,
|
44
45
|
$size: i,
|
45
46
|
disabled: s,
|
46
|
-
$isTransparent:
|
47
|
+
$isTransparent: a,
|
47
48
|
...x
|
48
49
|
}
|
49
50
|
),
|
50
51
|
siblingElement: f
|
51
52
|
}
|
52
53
|
);
|
53
|
-
}), z =
|
54
|
+
}), z = $;
|
54
55
|
export {
|
55
56
|
z as default
|
56
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n helperText,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date'}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n helperText={helperText}\n isTransparent={isTransparent}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","helperText","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EACD,
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../../../src/features/ui/inputs/text-input/text-input.tsx"],"sourcesContent":["import type { ITextInputProps } from './text-input-types';\nimport type { Ref } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport BaseInput from '../base-input/base-input';\nimport * as Styled from './text-input-styled';\n\nconst SIZE = 'regular';\n\nconst TextInput = forwardRef((props: ITextInputProps, ref: Ref<HTMLInputElement>) => {\n const {\n type,\n label,\n value,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n siblingElement,\n errorMessage,\n shape,\n isTransparent,\n helperText,\n stickyLabel,\n ...rest\n } = props;\n\n return (\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={!!value || type === 'date' || stickyLabel}\n width={width}\n widthX={widthX}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={SIZE}\n shape={shape}\n errorMessage={errorMessage}\n helperText={helperText}\n isTransparent={isTransparent}\n inputElement={\n <Styled.Input\n ref={ref}\n type={type}\n value={value ?? ''}\n $renderAs={renderAs}\n $size={SIZE}\n disabled={disabled}\n $isTransparent={isTransparent}\n {...rest}\n />\n }\n siblingElement={siblingElement}\n />\n );\n});\n\nexport default TextInput;\n"],"names":["SIZE","TextInput","forwardRef","props","ref","type","label","value","renderAs","width","widthX","disabled","willShowMessage","siblingElement","errorMessage","shape","isTransparent","helperText","stickyLabel","rest","jsx","BaseInput","Styled.Input","TextInput$1"],"mappings":";;;;AAQA,MAAMA,IAAO,WAEPC,IAAYC,EAAW,CAACC,GAAwBC,MAA+B;AAC7E,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAhB;AAGF,SAAA,gBAAAiB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAb;AAAA,MACA,OAAAF;AAAA,MACA,aAAa,CAAC,CAACC,KAASF,MAAS,UAAUa;AAAA,MAC3C,OAAAT;AAAA,MACA,QAAAC;AAAA,MACA,UAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,MAAMZ;AAAA,MACN,OAAAe;AAAA,MACA,cAAAD;AAAA,MACA,YAAAG;AAAA,MACA,eAAAD;AAAA,MACA,cACE,gBAAAI;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAAlB;AAAA,UACA,MAAAC;AAAA,UACA,OAAOE,KAAS;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOR;AAAA,UACP,UAAAW;AAAA,UACA,gBAAgBK;AAAA,UACf,GAAGG;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,gBAAAN;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDU,IAAetB;"}
|