@cuemath/leap 3.2.16-as1 → 3.2.16-link.1

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.
Files changed (209) hide show
  1. package/dist/assets/illustrations/illustrations.js +6 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/after-noon.js +34 -0
  4. package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
  5. package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
  6. package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
  7. package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
  8. package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
  9. package/dist/assets/line-icons/icons/cue-board.js +23 -0
  10. package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
  11. package/dist/assets/line-icons/icons/evening.js +35 -0
  12. package/dist/assets/line-icons/icons/evening.js.map +1 -0
  13. package/dist/assets/line-icons/icons/morning.js +35 -0
  14. package/dist/assets/line-icons/icons/morning.js.map +1 -0
  15. package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
  16. package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
  17. package/dist/assets/line-icons/icons/screen-grab.js +23 -0
  18. package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
  19. package/dist/assets/line-icons/icons/star3.js +32 -0
  20. package/dist/assets/line-icons/icons/star3.js.map +1 -0
  21. package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
  22. package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
  23. package/dist/assets/line-icons/icons/sticker.js +46 -0
  24. package/dist/assets/line-icons/icons/sticker.js.map +1 -0
  25. package/dist/assets/lottie/lottie.js +10 -0
  26. package/dist/assets/lottie/lottie.js.map +1 -1
  27. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
  28. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
  29. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +52 -0
  30. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
  31. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +93 -0
  32. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
  33. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +10 -0
  34. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +1 -0
  35. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +17 -0
  36. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -0
  37. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +18 -13
  38. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  39. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
  40. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
  41. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
  42. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
  43. package/dist/features/auth/comps/otp-input/otp-input-styled.js +22 -0
  44. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
  45. package/dist/features/auth/comps/otp-input/otp-input.js +51 -0
  46. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
  47. package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
  48. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
  49. package/dist/features/auth/comps/pill-button/pill-button.js +75 -0
  50. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
  51. package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
  52. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  53. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
  54. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
  55. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
  56. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
  57. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
  58. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  59. package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
  60. package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
  61. package/dist/features/auth/comps/tabs/tabs.js +5 -5
  62. package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
  63. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +19 -0
  64. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +1 -0
  65. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +32 -0
  66. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +1 -0
  67. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +44 -0
  68. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +1 -0
  69. package/dist/features/auth/signup-v2/signup-header/signup-header.js +54 -0
  70. package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +1 -0
  71. package/dist/features/auth/signup-v2/signup-options/signup-options.js +83 -0
  72. package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +1 -0
  73. package/dist/features/puzzles/app/puzzle-app.js +53 -73
  74. package/dist/features/puzzles/app/puzzle-app.js.map +1 -1
  75. package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
  76. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
  77. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
  78. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
  79. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  80. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
  81. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
  82. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
  83. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
  84. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
  85. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
  86. package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
  87. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
  88. package/dist/features/ui/accordion/accordion.js +62 -0
  89. package/dist/features/ui/accordion/accordion.js.map +1 -0
  90. package/dist/features/ui/drawer/drawer-styled.js +34 -0
  91. package/dist/features/ui/drawer/drawer-styled.js.map +1 -0
  92. package/dist/features/ui/drawer/drawer.js +42 -0
  93. package/dist/features/ui/drawer/drawer.js.map +1 -0
  94. package/dist/features/ui/image/image.js +1 -1
  95. package/dist/features/ui/image/image.js.map +1 -1
  96. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  97. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  98. package/dist/features/ui/inputs/base-select-input/base-select-input.js +55 -57
  99. package/dist/features/ui/inputs/base-select-input/base-select-input.js.map +1 -1
  100. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
  101. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
  102. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +5 -5
  103. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
  104. package/dist/features/ui/inputs/text-input/text-input.js +19 -18
  105. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  106. package/dist/features/ui/modals/modal-styled.js +43 -8
  107. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  108. package/dist/features/ui/modals/modal.js +37 -27
  109. package/dist/features/ui/modals/modal.js.map +1 -1
  110. package/dist/features/ui/text/text.js +31 -29
  111. package/dist/features/ui/text/text.js.map +1 -1
  112. package/dist/features/ui/theme/button.js +78 -78
  113. package/dist/features/ui/theme/button.js.map +1 -1
  114. package/dist/features/worksheet/worksheet/worksheet-helpers.js +31 -32
  115. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  116. package/dist/index.d.ts +205 -5
  117. package/dist/index.js +635 -589
  118. package/dist/index.js.map +1 -1
  119. package/dist/static/animated-avatar.1ad58b1d.json +1 -0
  120. package/dist/static/animated-avatar.69b07505.json +1 -0
  121. package/dist/static/animated-avatar.9c560b46.json +1 -0
  122. package/dist/static/calendar-purple.1a840b41.svg +1 -0
  123. package/dist/static/flying-disk.c7f6ed39.json +1 -0
  124. package/dist/static/graduation-cap.3be3340a.json +1 -0
  125. package/dist/static/handshake.287e7dfb.svg +1 -0
  126. package/dist/static/light-bulb.c6db0b23.json +1 -0
  127. package/dist/static/money.332aacf1.svg +1 -0
  128. package/dist/static/muscle.9bcfb8a7.json +1 -0
  129. package/dist/static/parent-avatar.822c7b9b.svg +1 -0
  130. package/dist/static/pencil.23df9da0.json +1 -0
  131. package/dist/static/plus-sign.de6af957.json +1 -0
  132. package/dist/static/racing-car.2cbf864e.json +1 -0
  133. package/dist/static/rocket.0a3ccab0.json +1 -0
  134. package/dist/static/shovel.abeec04c.json +1 -0
  135. package/dist/static/stripe-blurple.6abf422f.svg +1 -0
  136. package/dist/static/trustpilot.bd3d79e1.svg +1 -0
  137. package/package.json +2 -3
  138. package/dist/features/worksheet/worksheet/mocks/activity.js +0 -6
  139. package/dist/features/worksheet/worksheet/mocks/activity.js.map +0 -1
  140. package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js +0 -38
  141. package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js.map +0 -1
  142. package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js +0 -38
  143. package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js.map +0 -1
  144. package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js +0 -38
  145. package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js.map +0 -1
  146. package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js +0 -38
  147. package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js.map +0 -1
  148. package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js +0 -38
  149. package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js.map +0 -1
  150. package/dist/features/worksheet/worksheet/mocks/behaviors/index.js +0 -95
  151. package/dist/features/worksheet/worksheet/mocks/behaviors/index.js.map +0 -1
  152. package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js +0 -38
  153. package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js.map +0 -1
  154. package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js +0 -38
  155. package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js.map +0 -1
  156. package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js +0 -38
  157. package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js.map +0 -1
  158. package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js +0 -38
  159. package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js.map +0 -1
  160. package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js +0 -38
  161. package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js.map +0 -1
  162. package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js +0 -41
  163. package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js.map +0 -1
  164. package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js +0 -38
  165. package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js.map +0 -1
  166. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js +0 -39
  167. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js.map +0 -1
  168. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js +0 -39
  169. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js.map +0 -1
  170. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js +0 -39
  171. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js.map +0 -1
  172. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js +0 -39
  173. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js.map +0 -1
  174. package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js +0 -39
  175. package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js.map +0 -1
  176. package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js +0 -39
  177. package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js.map +0 -1
  178. package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js +0 -38
  179. package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js.map +0 -1
  180. package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js +0 -38
  181. package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js.map +0 -1
  182. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js +0 -38
  183. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js.map +0 -1
  184. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js +0 -38
  185. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js.map +0 -1
  186. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js +0 -39
  187. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js.map +0 -1
  188. package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js +0 -38
  189. package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js.map +0 -1
  190. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js +0 -38
  191. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js.map +0 -1
  192. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js +0 -38
  193. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js.map +0 -1
  194. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js +0 -38
  195. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js.map +0 -1
  196. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js +0 -38
  197. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js.map +0 -1
  198. package/dist/features/worksheet/worksheet/mocks/signed-requests.js +0 -5
  199. package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +0 -1
  200. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +0 -57
  201. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +0 -1
  202. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +0 -231
  203. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +0 -1
  204. package/dist/features/worksheet/worksheet/stories/worksheet-student.js +0 -174
  205. package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +0 -1
  206. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +0 -255
  207. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +0 -1
  208. package/dist/types/models/worksheet.js +0 -5
  209. package/dist/types/models/worksheet.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { jsxs as k, jsx as o } from "react/jsx-runtime";
2
- import { useMemo as W, useRef as T, useCallback as c } from "react";
1
+ import { jsxs as k, jsx as t } from "react/jsx-runtime";
2
+ import { useMemo as W, useRef as T, useCallback as d } from "react";
3
3
  import X from "../../../../assets/line-icons/icons/cross.js";
4
4
  import H from "../../hooks/use-context-menu-click-handler.js";
5
5
  import q from "../base-input/base-input.js";
@@ -10,108 +10,106 @@ import Y from "./select-section/select-section.js";
10
10
  const ae = (y) => {
11
11
  const {
12
12
  label: C,
13
- value: s,
14
- options: d,
15
- searchable: t = !1,
16
- searchText: b,
13
+ value: r,
14
+ options: u,
15
+ searchable: n = !1,
16
+ searchText: g,
17
17
  onCloseWithoutSelection: V,
18
- onSearchTextChange: r,
19
- onChange: g,
20
- renderAs: u,
18
+ onSearchTextChange: o,
19
+ onChange: b,
20
+ renderAs: h,
21
21
  width: A,
22
22
  widthX: E,
23
- disabled: h,
24
- willShowMessage: L,
25
- mandatory: R,
23
+ disabled: p,
24
+ willShowMessage: R,
25
+ mandatory: j,
26
26
  size: v = "regular",
27
27
  shape: m,
28
- theme: p = "light",
28
+ theme: f = "light",
29
29
  isTransparent: w = !1,
30
30
  renderOptionsAs: $ = "list",
31
- errorMessage: j
32
- } = y, i = $ === "section-list" && d, l = $ === "list" && d, I = W(() => {
33
- var e;
34
- if (t) return b;
35
- if (i) {
36
- const n = i.flatMap((f) => f.data).find(({ id: f }) => f === s);
37
- return n != null && n.inputLabel ? n.inputLabel || "" : (n == null ? void 0 : n.label) || "";
38
- }
39
- if (l) return (e = l.find((n) => n.id === s)) == null ? void 0 : e.label;
40
- }, [t, b, i, l, s]), S = T(null), x = T(null), { menuVisible: a, onMenuClick: z, hideMenu: M } = H(
31
+ errorMessage: z
32
+ } = y, i = $ === "section-list" && u, s = $ === "list" && u, I = W(() => {
33
+ var e, c;
34
+ if (n) return g;
35
+ if (i)
36
+ return (e = i.flatMap((l) => l.data).find(({ id: l }) => l === r)) == null ? void 0 : e.label;
37
+ if (s) return (c = s.find((l) => l.id === r)) == null ? void 0 : c.label;
38
+ }, [n, g, i, s, r]), S = T(null), x = T(null), { menuVisible: a, onMenuClick: B, hideMenu: M } = H(
41
39
  S,
42
40
  void 0,
43
- !t,
41
+ !n,
44
42
  V,
45
- h
46
- ), B = c(
43
+ p
44
+ ), D = d(
47
45
  (e) => {
48
- t && r && r(e.target.value);
46
+ n && o && o(e.target.value);
49
47
  },
50
- [r, t]
51
- ), O = c(
52
- (e, n) => {
53
- M(), g(e, n);
48
+ [o, n]
49
+ ), O = d(
50
+ (e, c) => {
51
+ M(), b(e, c);
54
52
  },
55
- [M, g]
56
- ), D = c((e) => {
53
+ [M, b]
54
+ ), F = d((e) => {
57
55
  e.target.select(), setTimeout(() => {
58
56
  e.target.scrollIntoView({
59
57
  behavior: "smooth"
60
58
  });
61
59
  }, 300);
62
- }, []), F = c(() => {
60
+ }, []), L = d(() => {
63
61
  var e;
64
- r && (r(""), (e = x.current) == null || e.focus());
65
- }, [r]);
66
- return /* @__PURE__ */ k(J, { ref: S, $width: A, $widthX: E, onClick: z, children: [
67
- /* @__PURE__ */ o(
62
+ o && (o(""), (e = x.current) == null || e.focus());
63
+ }, [o]);
64
+ return /* @__PURE__ */ k(J, { ref: S, $width: A, $widthX: E, onClick: B, children: [
65
+ /* @__PURE__ */ t(
68
66
  q,
69
67
  {
70
- renderAs: u,
68
+ renderAs: h,
71
69
  label: C,
72
70
  stickyLabel: !0,
73
- disabled: h,
74
- willShowMessage: L,
71
+ disabled: p,
72
+ willShowMessage: R,
75
73
  size: v,
76
- mandatory: R,
74
+ mandatory: j,
77
75
  shape: m,
78
76
  isTransparent: w,
79
- inputElement: /* @__PURE__ */ o(
77
+ inputElement: /* @__PURE__ */ t(
80
78
  G,
81
79
  {
82
80
  ref: x,
83
- $renderAs: u,
81
+ $renderAs: h,
84
82
  $size: v,
85
83
  placeholder: I ? "" : C,
86
- disabled: h,
87
- readOnly: !t,
84
+ disabled: p,
85
+ readOnly: !n,
88
86
  value: I ?? "",
89
- onFocus: t ? D : void 0,
90
- onChange: t ? B : void 0,
87
+ onFocus: n ? F : void 0,
88
+ onChange: n ? D : void 0,
91
89
  $isTransparent: w
92
90
  }
93
91
  ),
94
- siblingElement: t && a ? /* @__PURE__ */ o(X, { onClick: F }) : m === "curved" || m === "borderLess" ? /* @__PURE__ */ o(P, { $menuVisible: a, pointerEvents: "none" }) : /* @__PURE__ */ o(Q, { $menuVisible: a, pointerEvents: "none" }),
95
- errorMessage: j
92
+ siblingElement: n && a ? /* @__PURE__ */ t(X, { onClick: L }) : m === "curved" || m === "borderLess" ? /* @__PURE__ */ t(P, { $menuVisible: a, pointerEvents: "none" }) : /* @__PURE__ */ t(Q, { $menuVisible: a, pointerEvents: "none" }),
93
+ errorMessage: z
96
94
  }
97
95
  ),
98
- d.length > 0 && /* @__PURE__ */ o(K, { $visible: a, children: /* @__PURE__ */ k(N, { $renderAs: u, $theme: p, children: [
99
- i && /* @__PURE__ */ o(
96
+ u.length > 0 && /* @__PURE__ */ t(K, { $visible: a, children: /* @__PURE__ */ k(N, { $renderAs: h, $theme: f, children: [
97
+ i && /* @__PURE__ */ t(
100
98
  Y,
101
99
  {
102
100
  sectionOptions: i,
103
- theme: p,
104
- value: s,
101
+ theme: f,
102
+ value: r,
105
103
  onChange: O
106
104
  }
107
105
  ),
108
- l && l.map((e) => /* @__PURE__ */ o(
106
+ s && s.map((e) => /* @__PURE__ */ t(
109
107
  U,
110
108
  {
111
109
  option: e,
112
- selected: e.id === s,
110
+ selected: e.id === r,
113
111
  onChange: O,
114
- theme: p
112
+ theme: f
115
113
  },
116
114
  e.id
117
115
  ))
@@ -1 +1 @@
1
- {"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n const option = sectionOptions.flatMap(section => section.data).find(({ id }) => id === value);\n\n if (option?.inputLabel) return (option.inputLabel || '') as string;\n\n return option?.label || '';\n }\n\n if (selectOptions) return selectOptions.find(option => option.id === value)?.label;\n }, [searchable, searchText, sectionOptions, selectOptions, value]);\n\n const containerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const inputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(\n containerRef,\n undefined,\n !searchable,\n onCloseWithoutSelection,\n disabled,\n );\n\n const handleTextChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (searchable && onSearchTextChange) {\n onSearchTextChange(e.target.value);\n }\n },\n [onSearchTextChange, searchable],\n );\n\n const handleChange = useCallback<IBaseSelectInputProps<IDType>['onChange']>(\n (id, option) => {\n hideMenu();\n onChange(id, option);\n },\n [hideMenu, onChange],\n );\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n setTimeout(() => {\n e.target.scrollIntoView({\n behavior: 'smooth',\n });\n }, 300);\n }, []);\n\n const handleClear = useCallback(() => {\n if (onSearchTextChange) {\n onSearchTextChange('');\n inputRef.current?.focus();\n }\n }, [onSearchTextChange]);\n\n const downIcon =\n shape === 'curved' || shape === 'borderLess' ? (\n <Styled.StyledChevronDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n ) : (\n <Styled.StyledDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n );\n\n return (\n <Styled.Container ref={containerRef} $width={width} $widthX={widthX} onClick={onMenuClick}>\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={true}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={size}\n mandatory={mandatory}\n shape={shape}\n isTransparent={isTransparent}\n inputElement={\n <Input\n ref={inputRef}\n $renderAs={renderAs}\n $size={size}\n placeholder={inputValue ? '' : label}\n disabled={disabled}\n readOnly={!searchable}\n value={inputValue ?? ''}\n onFocus={searchable ? handleFocus : undefined}\n onChange={searchable ? handleTextChange : undefined}\n $isTransparent={isTransparent}\n />\n }\n siblingElement={searchable && menuVisible ? <CrossIcon onClick={handleClear} /> : downIcon}\n errorMessage={errorMessage}\n />\n\n {options.length > 0 && (\n <Styled.OptionsContainer $visible={menuVisible}>\n <Styled.OptionsWrapper $renderAs={renderAs} $theme={theme}>\n {sectionOptions && (\n <SelectSection<IDType>\n sectionOptions={sectionOptions}\n theme={theme}\n value={value}\n onChange={handleChange}\n />\n )}\n\n {selectOptions &&\n selectOptions.map(option => (\n <SelectOption<IDType>\n key={option.id}\n option={option}\n selected={option.id === value}\n onChange={handleChange}\n theme={theme}\n />\n ))}\n </Styled.OptionsWrapper>\n </Styled.OptionsContainer>\n )}\n </Styled.Container>\n );\n};\n\nexport default BaseSelectInput;\n"],"names":["BaseSelectInput","props","label","value","options","searchable","searchText","onCloseWithoutSelection","onSearchTextChange","onChange","renderAs","width","widthX","disabled","willShowMessage","mandatory","size","shape","theme","isTransparent","renderOptionsAs","errorMessage","sectionOptions","selectOptions","inputValue","useMemo","option","section","id","_a","containerRef","useRef","inputRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleTextChange","useCallback","handleChange","handleFocus","handleClear","jsxs","Styled.Container","jsx","BaseInput","Input","CrossIcon","Styled.StyledChevronDownIcon","Styled.StyledDownIcon","Styled.OptionsContainer","Styled.OptionsWrapper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AAA,QAClB;AAAA,QAEF,gBAAgBd,KAAc4B,sBAAec,GAAU,EAAA,SAASN,EAAa,CAAA,IAhCjFxB,MAAU,YAAYA,MAAU,eAC7B,gBAAA2B,EAAAI,GAAA,EAA6B,cAAcf,GAAa,eAAc,OAAO,CAAA,IAE7E,gBAAAW,EAAAK,GAAA,EAAsB,cAAchB,GAAa,eAAc,OAAO,CAAA;AAAA,QA8BrE,cAAAZ;AAAA,MAAA;AAAA,IACF;AAAA,IAECjB,EAAQ,SAAS,KACf,gBAAAwC,EAAAM,GAAA,EAAwB,UAAUjB,GACjC,UAAA,gBAAAS,EAACS,GAAA,EAAsB,WAAWzC,GAAU,QAAQQ,GACjD,UAAA;AAAA,MACCI,KAAA,gBAAAsB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,gBAAA9B;AAAA,UACA,OAAAJ;AAAA,UACA,OAAAf;AAAA,UACA,UAAUoC;AAAA,QAAA;AAAA,MACZ;AAAA,MAGDhB,KACCA,EAAc,IAAI,CAChBG,MAAA,gBAAAkB;AAAA,QAACS;AAAA,QAAA;AAAA,UAEC,QAAA3B;AAAA,UACA,UAAUA,EAAO,OAAOvB;AAAA,UACxB,UAAUoC;AAAA,UACV,OAAArB;AAAA,QAAA;AAAA,QAJKQ,EAAO;AAAA,MAAA,CAMf;AAAA,IAAA,EAAA,CACL,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"base-select-input.js","sources":["../../../../../src/features/ui/inputs/base-select-input/base-select-input.tsx"],"sourcesContent":["import type { ISectionOption } from '../../section-list/section-list-types';\nimport type { IBaseSelectInputProps, ISelectOption } from './base-select-input-types';\nimport type { ChangeEvent, FocusEvent, ReactElement } from 'react';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport useContextMenuClickHandler from '../../hooks/use-context-menu-click-handler';\nimport BaseInput from '../base-input/base-input';\nimport { Input } from '../text-input/text-input-styled';\nimport * as Styled from './base-select-input-styled';\nimport SelectOption from './select-option/select-option';\nimport SelectSection from './select-section/select-section';\n\nconst BaseSelectInput = <IDType extends string | number>(\n props: IBaseSelectInputProps<IDType>,\n): ReactElement => {\n const {\n label,\n value,\n options,\n searchable = false,\n searchText,\n onCloseWithoutSelection,\n onSearchTextChange,\n onChange,\n renderAs,\n width,\n widthX,\n disabled,\n willShowMessage,\n mandatory,\n size = 'regular',\n shape,\n theme = 'light',\n isTransparent = false,\n renderOptionsAs = 'list',\n errorMessage,\n } = props;\n\n const sectionOptions =\n renderOptionsAs === 'section-list' && (options as ISectionOption<ISelectOption<IDType>>[]);\n const selectOptions = renderOptionsAs === 'list' && (options as ISelectOption<IDType>[]);\n\n const inputValue = useMemo(() => {\n if (searchable) return searchText;\n\n if (sectionOptions) {\n return sectionOptions.flatMap(section => section.data).find(({ id }) => id === value)\n ?.label as string;\n }\n\n if (selectOptions) return selectOptions.find(option => option.id === value)?.label;\n }, [searchable, searchText, sectionOptions, selectOptions, value]);\n\n const containerRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const inputRef = useRef<HTMLInputElement>(null) as React.RefObject<HTMLInputElement>;\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(\n containerRef,\n undefined,\n !searchable,\n onCloseWithoutSelection,\n disabled,\n );\n\n const handleTextChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n if (searchable && onSearchTextChange) {\n onSearchTextChange(e.target.value);\n }\n },\n [onSearchTextChange, searchable],\n );\n\n const handleChange = useCallback<IBaseSelectInputProps<IDType>['onChange']>(\n (id, option) => {\n hideMenu();\n onChange(id, option);\n },\n [hideMenu, onChange],\n );\n\n const handleFocus = useCallback((e: FocusEvent<HTMLInputElement>) => {\n e.target.select();\n setTimeout(() => {\n e.target.scrollIntoView({\n behavior: 'smooth',\n });\n }, 300);\n }, []);\n\n const handleClear = useCallback(() => {\n if (onSearchTextChange) {\n onSearchTextChange('');\n inputRef.current?.focus();\n }\n }, [onSearchTextChange]);\n\n const downIcon =\n shape === 'curved' || shape === 'borderLess' ? (\n <Styled.StyledChevronDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n ) : (\n <Styled.StyledDownIcon $menuVisible={menuVisible} pointerEvents=\"none\" />\n );\n\n return (\n <Styled.Container ref={containerRef} $width={width} $widthX={widthX} onClick={onMenuClick}>\n <BaseInput\n renderAs={renderAs}\n label={label}\n stickyLabel={true}\n disabled={disabled}\n willShowMessage={willShowMessage}\n size={size}\n mandatory={mandatory}\n shape={shape}\n isTransparent={isTransparent}\n inputElement={\n <Input\n ref={inputRef}\n $renderAs={renderAs}\n $size={size}\n placeholder={inputValue ? '' : label}\n disabled={disabled}\n readOnly={!searchable}\n value={inputValue ?? ''}\n onFocus={searchable ? handleFocus : undefined}\n onChange={searchable ? handleTextChange : undefined}\n $isTransparent={isTransparent}\n />\n }\n siblingElement={searchable && menuVisible ? <CrossIcon onClick={handleClear} /> : downIcon}\n errorMessage={errorMessage}\n />\n\n {options.length > 0 && (\n <Styled.OptionsContainer $visible={menuVisible}>\n <Styled.OptionsWrapper $renderAs={renderAs} $theme={theme}>\n {sectionOptions && (\n <SelectSection<IDType>\n sectionOptions={sectionOptions}\n theme={theme}\n value={value}\n onChange={handleChange}\n />\n )}\n\n {selectOptions &&\n selectOptions.map(option => (\n <SelectOption<IDType>\n key={option.id}\n option={option}\n selected={option.id === value}\n onChange={handleChange}\n theme={theme}\n />\n ))}\n </Styled.OptionsWrapper>\n </Styled.OptionsContainer>\n )}\n </Styled.Container>\n );\n};\n\nexport default BaseSelectInput;\n"],"names":["BaseSelectInput","props","label","value","options","searchable","searchText","onCloseWithoutSelection","onSearchTextChange","onChange","renderAs","width","widthX","disabled","willShowMessage","mandatory","size","shape","theme","isTransparent","renderOptionsAs","errorMessage","sectionOptions","selectOptions","inputValue","useMemo","_a","section","id","_b","option","containerRef","useRef","inputRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleTextChange","useCallback","handleChange","handleFocus","handleClear","jsxs","Styled.Container","jsx","BaseInput","Input","CrossIcon","Styled.StyledChevronDownIcon","Styled.StyledDownIcon","Styled.OptionsContainer","Styled.OptionsWrapper","SelectSection","SelectOption"],"mappings":";;;;;;;;;AAcM,MAAAA,KAAkB,CACtBC,MACiB;AACX,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,YAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,eAAAC,IAAgB;AAAA,IAChB,iBAAAC,IAAkB;AAAA,IAClB,cAAAC;AAAA,EACE,IAAApB,GAEEqB,IACJF,MAAoB,kBAAmBhB,GACnCmB,IAAgBH,MAAoB,UAAWhB,GAE/CoB,IAAaC,EAAQ,MAAM;;AAC/B,QAAIpB,EAAmB,QAAAC;AAEvB,QAAIgB;AACF,cAAOI,IAAAJ,EAAe,QAAQ,CAAWK,MAAAA,EAAQ,IAAI,EAAE,KAAK,CAAC,EAAE,IAAAC,EAAS,MAAAA,MAAOzB,CAAK,MAA7E,gBAAAuB,EACH;AAGF,QAAAH,WAAsBM,IAAAN,EAAc,KAAK,OAAUO,EAAO,OAAO3B,CAAK,MAAhD,gBAAA0B,EAAmD;AAAA,EAAA,GAC5E,CAACxB,GAAYC,GAAYgB,GAAgBC,GAAepB,CAAK,CAAC,GAE3D4B,IAAeC,EAAuB,IAAI,GAC1CC,IAAWD,EAAyB,IAAI,GACxC,EAAE,aAAAE,GAAa,aAAAC,GAAa,UAAAC,EAAa,IAAAC;AAAA,IAC7CN;AAAA,IACA;AAAA,IACA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IAAmB;AAAA,YAC1C,gBAAgBnB;AAAA,UAAA;AAAA,QAClB;AAAA,QAEF,gBAAgBd,KAAc6B,sBAAec,GAAU,EAAA,SAASN,EAAa,CAAA,IAhCjFzB,MAAU,YAAYA,MAAU,eAC7B,gBAAA4B,EAAAI,GAAA,EAA6B,cAAcf,GAAa,eAAc,OAAO,CAAA,IAE7E,gBAAAW,EAAAK,GAAA,EAAsB,cAAchB,GAAa,eAAc,OAAO,CAAA;AAAA,QA8BrE,cAAAb;AAAA,MAAA;AAAA,IACF;AAAA,IAECjB,EAAQ,SAAS,KACf,gBAAAyC,EAAAM,GAAA,EAAwB,UAAUjB,GACjC,UAAA,gBAAAS,EAACS,GAAA,EAAsB,WAAW1C,GAAU,QAAQQ,GACjD,UAAA;AAAA,MACCI,KAAA,gBAAAuB;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,gBAAA/B;AAAA,UACA,OAAAJ;AAAA,UACA,OAAAf;AAAA,UACA,UAAUqC;AAAA,QAAA;AAAA,MACZ;AAAA,MAGDjB,KACCA,EAAc,IAAI,CAChBO,MAAA,gBAAAe;AAAA,QAACS;AAAA,QAAA;AAAA,UAEC,QAAAxB;AAAA,UACA,UAAUA,EAAO,OAAO3B;AAAA,UACxB,UAAUqC;AAAA,UACV,OAAAtB;AAAA,QAAA;AAAA,QAJKY,EAAO;AAAA,MAAA,CAMf;AAAA,IAAA,EAAA,CACL,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1,29 +1,29 @@
1
1
  import { jsxs as b, jsx as t } from "react/jsx-runtime";
2
- import { useCallback as I } from "react";
3
- import { useTheme as g } from "styled-components";
4
- import v from "../../text/text.js";
5
- import { CheckboxOptionWrapper as W, CheckboxInputWrapper as z, CheckboxInput as A, CheckIcon as T, IndeterminateIcon as y, CheckboxLabelWrapper as L } from "./checkbox-input-styled.js";
6
- const O = (h) => {
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: o,
10
+ value: a,
11
11
  checked: e,
12
12
  disabled: n,
13
- renderAs: a,
13
+ renderAs: o,
14
14
  labelWidthX: p,
15
- indeterminate: u,
16
- visibleOnCheck: k,
17
- alignTopWithLabel: $ = !1,
15
+ indeterminate: k,
16
+ visibleOnCheck: u,
17
+ alignTopWithLabel: C = !1,
18
18
  onChange: l
19
19
  } = h, {
20
- layout: { gutter: C },
20
+ layout: { gutter: $ },
21
21
  checkbox: c
22
- } = g(), { textVariant: m } = c.sizes[r ?? "regular"], { textColorName: x } = c.variants[a ?? "black"], s = k ? e : !0, f = !e && u, d = I(() => {
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(o, !e);
25
- }, [e, n, l, o]);
26
- return /* @__PURE__ */ b(W, { $alignTop: $, $disabled: n, children: [
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: a,
35
+ $renderAs: o,
36
36
  $size: r
37
37
  }
38
38
  ),
39
- e && /* @__PURE__ */ t(T, { $renderAs: a, $size: r }),
40
- f && /* @__PURE__ */ t(y, { $disabled: n, $size: C * 1.125 })
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
- L,
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
- v,
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 = O;
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","CheckboxInput$1"],"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
+ {"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 v from "../checkbox-input/checkbox-input.js";
5
- import { CheckboxInputListWrapper as A, CheckboxOptionWrapper as O } from "./checkbox-input-list-styled.js";
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(A, { children: d.map((t) => {
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(O, { $numColumns: C ?? 1, children: /* @__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
- v,
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;AAAAA,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
+ {"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,EA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/jsx-runtime";
2
2
  import { forwardRef as I } from "react";
3
3
  import T from "../base-input/base-input.js";
4
- import { Input as b } from "./text-input-styled.js";
5
- const i = "regular", g = I((o, p) => {
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: l,
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: h,
18
- isTransparent: n,
19
- helperText: w,
17
+ shape: b,
18
+ isTransparent: a,
19
+ helperText: h,
20
+ stickyLabel: w,
20
21
  ...x
21
22
  } = o;
22
- return /* @__PURE__ */ a(
23
+ return /* @__PURE__ */ n(
23
24
  T,
24
25
  {
25
26
  renderAs: r,
26
- label: l,
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: h,
34
+ shape: b,
34
35
  errorMessage: c,
35
- helperText: w,
36
- isTransparent: n,
37
- inputElement: /* @__PURE__ */ a(
38
- b,
36
+ helperText: h,
37
+ isTransparent: a,
38
+ inputElement: /* @__PURE__ */ n(
39
+ g,
39
40
  {
40
- ref: p,
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: n,
47
+ $isTransparent: a,
47
48
  ...x
48
49
  }
49
50
  ),
50
51
  siblingElement: f
51
52
  }
52
53
  );
53
- }), z = g;
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,IAAAf;AAGF,SAAA,gBAAAgB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAZ;AAAA,MACA,OAAAF;AAAA,MACA,aAAa,CAAC,CAACC,KAASF,MAAS;AAAA,MACjC,OAAAI;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,gBAAAG;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAAjB;AAAA,UACA,MAAAC;AAAA,UACA,OAAOE,KAAS;AAAA,UAChB,WAAWC;AAAA,UACX,OAAOR;AAAA,UACP,UAAAW;AAAA,UACA,gBAAgBK;AAAA,UACf,GAAGE;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDS,IAAerB;"}
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;"}
@@ -1,5 +1,5 @@
1
1
  import a from "styled-components";
2
- const s = a.div(
2
+ const p = a.div(
3
3
  ({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
4
4
  position: fixed;
5
5
  top: 0;
@@ -82,7 +82,7 @@ const s = a.div(
82
82
  max-height: 100vh;
83
83
  }
84
84
  }`
85
- ), d = a.div(
85
+ ), m = a.div(
86
86
  ({ theme: { colors: t }, $modalWidth: o }) => `
87
87
  position: absolute;
88
88
  top: -56px;
@@ -100,13 +100,13 @@ const s = a.div(
100
100
  color: ${t.BLACK_1};
101
101
  }
102
102
  `
103
- ), m = a.div`
103
+ ), d = a.div`
104
104
  display: flex;
105
105
  align-items: center;
106
106
  justify-content: center;
107
107
  height: 100vh;
108
108
  width: 100%;
109
- `, i = 720, r = 800, n = 500, h = a.div(
109
+ `, i = 720, r = 800, n = 500, f = a.div(
110
110
  ({ $isClosing: t }) => `
111
111
  position: absolute;
112
112
  width: ${i}px;
@@ -150,13 +150,48 @@ const s = a.div(
150
150
  }
151
151
  }
152
152
  `
153
+ ), h = a.div(
154
+ ({ $isClosing: t }) => `
155
+ width: 100%;
156
+ height: max-content;
157
+ background: white; // Remove
158
+ overflow: scroll;
159
+ position: fixed;
160
+ left: 0;
161
+ right: 0;
162
+ bottom: 0;
163
+ animation: ${t ? "slideOut" : "slideIn"} 0.3s forwards;
164
+
165
+ @keyframes slideIn {
166
+ from {
167
+ transform: translateY(100%);
168
+ opacity: 0;
169
+ }
170
+ to {
171
+ transform: translateY(0%);
172
+ opacity: 1;
173
+ }
174
+ }
175
+
176
+ @keyframes slideOut {
177
+ from {
178
+ transform: translateY(0%);
179
+ opacity: 1;
180
+ }
181
+ to {
182
+ transform: translateY(100%);
183
+ opacity: 0;
184
+ }
185
+ }
186
+ `
153
187
  );
154
188
  export {
155
189
  l as BaseModal,
156
190
  c as BaseModalContent,
157
- d as CloseButtonContainer,
158
- s as ModalContainer,
159
- m as ModalLoaderWrapper,
160
- h as SpotlightModal
191
+ h as BottomSheetModal,
192
+ m as CloseButtonContainer,
193
+ p as ModalContainer,
194
+ d as ModalLoaderWrapper,
195
+ f as SpotlightModal
161
196
  };
162
197
  //# sourceMappingURL=modal-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
1
+ {"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n background: white; // Remove\n overflow: scroll;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,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