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

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 (243) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -11
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/auth/account-selector/account-selector.js +25 -26
  6. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  7. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +14 -20
  8. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  9. package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
  10. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  11. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
  12. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  13. package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
  14. package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
  15. package/dist/features/auth/comps/tabs/tabs.js +5 -5
  16. package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
  17. package/dist/features/auth/comps/user-list/user-item/user-item.js +31 -30
  18. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  19. package/dist/features/auth/comps/user-list/user-list.js +34 -35
  20. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  21. package/dist/features/auth/forgot-password/forgot-password-styled.js +15 -14
  22. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  23. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +7 -6
  24. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  25. package/dist/features/auth/login/login-styled.js +9 -8
  26. package/dist/features/auth/login/login-styled.js.map +1 -1
  27. package/dist/features/chapters-v2/utils/node-card-utils.js +7 -7
  28. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  29. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +98 -121
  30. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  31. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +28 -29
  32. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
  33. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +42 -43
  34. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  35. package/dist/features/circle-games/games/tutorial/tutorial.js +35 -43
  36. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  37. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  38. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  39. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  40. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  41. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +24 -26
  42. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
  43. package/dist/features/circle-games/sign-up/constants.js +1 -3
  44. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  45. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  46. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  47. package/dist/features/hooks/use-viewport/use-viewport.js +22 -0
  48. package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
  49. package/dist/features/journey/comps/coachmark/coachmark.js +27 -29
  50. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  51. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  52. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  53. package/dist/features/journey/use-journey/journey-context-provider.js +72 -73
  54. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  55. package/dist/features/journey/use-journey/journey-styled.js +4 -6
  56. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  57. package/dist/features/stickers/sticker-data.js +234 -0
  58. package/dist/features/stickers/sticker-data.js.map +1 -0
  59. package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +4 -3
  60. package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
  61. package/dist/features/stickers/sticker-selector/sticker-selector.js +25 -0
  62. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
  63. package/dist/features/stickers/sticker-selector/sticker.js +57 -0
  64. package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
  65. package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js} +6 -6
  66. package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
  67. package/dist/features/{ui/stickers/stickers-styled.js → stickers/stickers-effects/stickers-effects-styled.js} +2 -2
  68. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
  69. package/dist/features/{ui/stickers/stickers-utils.js → stickers/stickers-effects/stickers-effects-utils.js} +6 -6
  70. package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +1 -0
  71. package/dist/features/stickers/stickers-effects/stickers-effects.js +39 -0
  72. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
  73. package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
  74. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +50 -7
  75. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
  76. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +69 -15
  77. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  78. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
  79. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  80. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
  81. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  82. package/dist/features/ui/error/error.js +27 -65
  83. package/dist/features/ui/error/error.js.map +1 -1
  84. package/dist/features/ui/image/image.js +1 -1
  85. package/dist/features/ui/image/image.js.map +1 -1
  86. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  87. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  88. package/dist/features/ui/inputs/text-input/text-input.js +18 -19
  89. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  90. package/dist/features/ui/lottie-animation/lottie-animation.js +29 -25
  91. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  92. package/dist/features/ui/modals/modal-styled.js +58 -69
  93. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  94. package/dist/features/ui/modals/modal.js +14 -50
  95. package/dist/features/ui/modals/modal.js.map +1 -1
  96. package/dist/features/ui/nudge/nudge-styled.js +7 -14
  97. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  98. package/dist/features/ui/nudge/nudge.js +12 -13
  99. package/dist/features/ui/nudge/nudge.js.map +1 -1
  100. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  101. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  102. package/dist/features/ui/streak-icon/streak-icon.js +15 -17
  103. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  104. package/dist/features/ui/text/text.js +38 -44
  105. package/dist/features/ui/text/text.js.map +1 -1
  106. package/dist/features/ui/theme/button.js +78 -78
  107. package/dist/features/ui/theme/button.js.map +1 -1
  108. package/dist/features/ui/theme/constants.js +2 -4
  109. package/dist/features/ui/theme/constants.js.map +1 -1
  110. package/dist/features/ui/theme/get-device.js +3 -3
  111. package/dist/features/ui/theme/get-device.js.map +1 -1
  112. package/dist/features/worksheet/worksheet/constants.js +13 -12
  113. package/dist/features/worksheet/worksheet/constants.js.map +1 -1
  114. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +24 -24
  115. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  116. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +260 -246
  117. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  118. package/dist/features/worksheet/worksheet/worksheet-styled.js +28 -37
  119. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  120. package/dist/features/worksheet/worksheet/worksheet.js +164 -166
  121. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  122. package/dist/index.d.ts +53 -246
  123. package/dist/index.js +585 -633
  124. package/dist/index.js.map +1 -1
  125. package/dist/static/nudge-tap.5cb30093.json +1057 -0
  126. package/package.json +3 -2
  127. package/dist/assets/line-icons/icons/after-noon.js +0 -34
  128. package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
  129. package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
  130. package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
  131. package/dist/assets/line-icons/icons/cue-board-filled.js +0 -33
  132. package/dist/assets/line-icons/icons/cue-board-filled.js.map +0 -1
  133. package/dist/assets/line-icons/icons/cue-board.js +0 -23
  134. package/dist/assets/line-icons/icons/cue-board.js.map +0 -1
  135. package/dist/assets/line-icons/icons/evening.js +0 -35
  136. package/dist/assets/line-icons/icons/evening.js.map +0 -1
  137. package/dist/assets/line-icons/icons/hint-fill.js +0 -35
  138. package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
  139. package/dist/assets/line-icons/icons/morning.js +0 -35
  140. package/dist/assets/line-icons/icons/morning.js.map +0 -1
  141. package/dist/assets/line-icons/icons/screen-grab-filled.js +0 -35
  142. package/dist/assets/line-icons/icons/screen-grab-filled.js.map +0 -1
  143. package/dist/assets/line-icons/icons/screen-grab.js +0 -23
  144. package/dist/assets/line-icons/icons/screen-grab.js.map +0 -1
  145. package/dist/assets/line-icons/icons/star3.js +0 -32
  146. package/dist/assets/line-icons/icons/star3.js.map +0 -1
  147. package/dist/assets/line-icons/icons/sticker-filled.js +0 -64
  148. package/dist/assets/line-icons/icons/sticker-filled.js.map +0 -1
  149. package/dist/assets/line-icons/icons/sticker.js +0 -46
  150. package/dist/assets/line-icons/icons/sticker.js.map +0 -1
  151. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +0 -9
  152. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +0 -1
  153. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +0 -52
  154. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +0 -1
  155. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +0 -93
  156. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +0 -1
  157. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +0 -10
  158. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +0 -1
  159. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +0 -17
  160. package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +0 -1
  161. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
  162. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
  163. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
  164. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
  165. package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
  166. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
  167. package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
  168. package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
  169. package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -44
  170. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
  171. package/dist/features/auth/comps/pill-button/pill-button.js +0 -75
  172. package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
  173. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
  174. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
  175. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -67
  176. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
  177. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +0 -19
  178. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +0 -1
  179. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +0 -32
  180. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +0 -1
  181. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +0 -44
  182. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +0 -1
  183. package/dist/features/auth/signup-v2/signup-header/signup-header.js +0 -54
  184. package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +0 -1
  185. package/dist/features/auth/signup-v2/signup-options/signup-options.js +0 -83
  186. package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +0 -1
  187. package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
  188. package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
  189. package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
  190. package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
  191. package/dist/features/puzzles/app/puzzle-app.js +0 -62
  192. package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
  193. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +0 -49
  194. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +0 -1
  195. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +0 -64
  196. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +0 -1
  197. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +0 -28
  198. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +0 -1
  199. package/dist/features/ui/accordion/accordion-items/accordion-items.js +0 -83
  200. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +0 -1
  201. package/dist/features/ui/accordion/accordion.js +0 -62
  202. package/dist/features/ui/accordion/accordion.js.map +0 -1
  203. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
  204. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
  205. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
  206. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
  207. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
  208. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
  209. package/dist/features/ui/drawer/drawer-styled.js +0 -34
  210. package/dist/features/ui/drawer/drawer-styled.js.map +0 -1
  211. package/dist/features/ui/drawer/drawer.js +0 -42
  212. package/dist/features/ui/drawer/drawer.js.map +0 -1
  213. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
  214. package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
  215. package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
  216. package/dist/features/ui/sticker-grid/sticker.js +0 -57
  217. package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
  218. package/dist/features/ui/stickers/constants.js +0 -6
  219. package/dist/features/ui/stickers/constants.js.map +0 -1
  220. package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
  221. package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
  222. package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
  223. package/dist/features/ui/stickers/stickers.js +0 -40
  224. package/dist/features/ui/stickers/stickers.js.map +0 -1
  225. package/dist/static/animated-avatar.1ad58b1d.json +0 -1
  226. package/dist/static/animated-avatar.69b07505.json +0 -1
  227. package/dist/static/animated-avatar.9c560b46.json +0 -1
  228. package/dist/static/calendar-purple.1a840b41.svg +0 -1
  229. package/dist/static/flying-disk.c7f6ed39.json +0 -1
  230. package/dist/static/graduation-cap.3be3340a.json +0 -1
  231. package/dist/static/handshake.287e7dfb.svg +0 -1
  232. package/dist/static/light-bulb.c6db0b23.json +0 -1
  233. package/dist/static/money.332aacf1.svg +0 -1
  234. package/dist/static/muscle.9bcfb8a7.json +0 -1
  235. package/dist/static/nudge-tap.0591aef4.json +0 -1
  236. package/dist/static/parent-avatar.822c7b9b.svg +0 -1
  237. package/dist/static/pencil.23df9da0.json +0 -1
  238. package/dist/static/plus-sign.de6af957.json +0 -1
  239. package/dist/static/racing-car.2cbf864e.json +0 -1
  240. package/dist/static/rocket.0a3ccab0.json +0 -1
  241. package/dist/static/shovel.abeec04c.json +0 -1
  242. package/dist/static/stripe-blurple.6abf422f.svg +0 -1
  243. package/dist/static/trustpilot.bd3d79e1.svg +0 -1
@@ -1,100 +1,105 @@
1
- import { jsxs as D, Fragment as U, jsx as e } from "react/jsx-runtime";
2
- import W from "../../../node_modules/lodash.throttle/index.js";
3
- import { memo as Y, useRef as H, useState as f, useCallback as p, useEffect as m } from "react";
4
- import $ from "../layout/flex-view.js";
5
- import P from "../portal/portal.js";
6
- import { THROTTLE_DURATION as Z, DEFAULT_ARROW_SIZE as q } from "./arrow-tooltip-constants.js";
7
- import { BackgroundOverlay as G } from "./arrow-tooltip-styled.js";
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
- import K from "./comps/tooltip-body.js";
10
- const Q = ({
11
- isAnimated: C,
10
+ const K = 8, Q = 100, V = ({
11
+ isAnimated: O,
12
12
  alwaysVisible: o = !1,
13
- arrowColor: O,
14
- arrowSize: w = q,
15
- arrowXCoOrdinates: E,
16
- arrowYCoOrdinates: T,
13
+ arrowColor: T,
14
+ arrowSize: E = K,
15
+ arrowXCoOrdinates: g,
16
+ arrowYCoOrdinates: h,
17
17
  backgroundColor: v,
18
18
  borderColor: R,
19
- children: h,
19
+ children: x,
20
20
  hidden: t,
21
21
  position: l,
22
- renderAs: A,
22
+ renderAs: s,
23
23
  textVariant: L,
24
- tooltipItem: g,
25
- tooltipOffset: x,
26
- tooltipXCoOrdinates: z,
27
- tooltipYCoOrdinates: I,
28
- width: b,
29
- widthX: k,
30
- zIndex: B,
31
- parentWidth: F,
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 u = H(null), [N, d] = f(o), [S, X] = f(
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
- ), s = p(
35
+ ), u = $(
37
36
  (n, i) => {
38
- X(n), d(i);
37
+ B(n), f(i);
39
38
  },
40
39
  []
41
- ), _ = p(() => {
40
+ ), D = $(() => {
42
41
  if (t || o)
43
42
  return null;
44
- s(null, !1);
45
- }, [o, s, t]), r = W(() => {
46
- var a;
47
- const { current: n } = u;
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 = (a = n.children[0]) == null ? void 0 : a.getBoundingClientRect(), j = i ? J(l, i) : null;
50
- return s(j, !0), null;
51
- }, Z);
52
- m(() => {
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]), m(() => {
58
- t && d(!1), o && r();
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: F || "fit-content",
88
- ref: u,
62
+ $width: M || "fit-content",
63
+ ref: d,
89
64
  onMouseEnter: r,
90
- onMouseLeave: _,
91
- children: /* @__PURE__ */ e($, { children: h })
65
+ onMouseLeave: D,
66
+ children: /* @__PURE__ */ e(w, { children: x })
92
67
  }
93
68
  ),
94
- N && /* @__PURE__ */ e(P, { portalId: "tooltip-root", children: M ? /* @__PURE__ */ e(G, { children: c }) : c })
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
- }, so = Y(Q);
101
+ }, co = V;
97
102
  export {
98
- so as default
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, memo } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport { DEFAULT_ARROW_SIZE, THROTTLE_DURATION } from './arrow-tooltip-constants';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\nimport TooltipBody from './comps/tooltip-body';\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 isBlocking = false,\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 const tooltipContent = (\n <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 $zIndex={zIndex}\n $backgroundColor={backgroundColor}\n $arrowColor={arrowColor}\n $borderColor={borderColor}\n $isAnimated={isAnimated}\n $width={width}\n $widthX={widthX}\n textVariant={textVariant || 'body3'}\n >\n {tooltipItem}\n </TooltipBody>\n );\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\n {visible && (\n <Portal portalId=\"tooltip-root\">\n {isBlocking ? (\n <Styled.BackgroundOverlay>{tooltipContent}</Styled.BackgroundOverlay>\n ) : (\n tooltipContent\n )}\n </Portal>\n )}\n </>\n );\n};\n\nexport default memo(ArrowTooltip);\n"],"names":["ArrowTooltip","isAnimated","alwaysVisible","arrowColor","arrowSize","DEFAULT_ARROW_SIZE","arrowXCoOrdinates","arrowYCoOrdinates","backgroundColor","borderColor","children","hidden","position","renderAs","textVariant","tooltipItem","tooltipOffset","tooltipXCoOrdinates","tooltipYCoOrdinates","width","widthX","zIndex","parentWidth","isBlocking","tooltipWrapperRef","useRef","visible","setVisible","useState","tooltipCoOrdinates","setTooltipCoOrdinates","handleVisibleNCoOrdinates","useCallback","newCoOrdinates","visibility","handleVisibility","handleOnMouseEnter","throttle","current","boundingClientRect","_a","computeTooltipNewCoOrdinates","THROTTLE_DURATION","useEffect","tooltipContent","jsx","TooltipBody","jsxs","Fragment","FlexView","Portal","Styled.BackgroundOverlay","ArrowTooltip$1","memo"],"mappings":"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"}
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":"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"}
@@ -1,85 +1,47 @@
1
- import { jsxs as n, jsx as i, Fragment as X } from "react/jsx-runtime";
2
- import { useCallback as $ } from "react";
3
- import { ILLUSTRATIONS as p } from "../../../assets/illustrations/illustrations.js";
4
- import f from "../buttons/button/button.js";
5
- import u from "../image/image.js";
6
- import a from "../layout/flex-view.js";
7
- import m from "../text/text.js";
8
- const e = {
9
- compact: {
10
- widthX: 10,
11
- heightX: 5,
12
- borderRadiusX: 1,
13
- marginBottomX: 1,
14
- title: "h6",
15
- description: "body3",
16
- imageWidth: 54,
17
- imageHeight: 44
18
- },
19
- full: {
20
- widthX: 22.5,
21
- heightX: 11.5,
22
- borderRadiusX: 1,
23
- marginBottomX: 1.5,
24
- title: "h4",
25
- description: "body2",
26
- imageWidth: 122,
27
- imageHeight: 100
28
- }
29
- }, w = (l) => {
30
- const { height: d, onTryAgain: r, theme: h = "light", title: s, description: g, size: t = "full" } = l, c = $(() => {
31
- r ? r() : window.location.reload();
32
- }, [r]), o = h === "dark" ? "WHITE_T_87" : "BLACK_T_87";
33
- return /* @__PURE__ */ n(a, { $alignItems: "center", $justifyContent: "center", $height: d, children: [
34
- /* @__PURE__ */ i(
35
- a,
1
+ import { jsxs as o, jsx as r, Fragment as h } from "react/jsx-runtime";
2
+ import { useCallback as g } from "react";
3
+ import { ILLUSTRATIONS as $ } from "../../../assets/illustrations/illustrations.js";
4
+ import p from "../buttons/button/button.js";
5
+ import f from "../image/image.js";
6
+ import n from "../layout/flex-view.js";
7
+ import i from "../text/text.js";
8
+ const w = (a) => {
9
+ const { height: l, onTryAgain: t, theme: s = "light", title: m, description: c } = a, d = g(() => {
10
+ t ? t() : window.location.reload();
11
+ }, [t]), e = s === "dark" ? "WHITE_T_87" : "BLACK_T_87";
12
+ return /* @__PURE__ */ o(n, { $alignItems: "center", $justifyContent: "center", $height: l, children: [
13
+ /* @__PURE__ */ r(
14
+ n,
36
15
  {
37
- $widthX: e[t].widthX,
38
- $heightX: e[t].heightX,
39
- $borderRadiusX: e[t].borderRadiusX,
40
- $marginBottomX: e[t].marginBottomX,
16
+ $widthX: 22.5,
17
+ $heightX: 11.5,
18
+ $borderRadiusX: 1,
19
+ $marginBottomX: 1.5,
41
20
  $background: "GREY_1",
42
21
  $justifyContent: "center",
43
22
  $alignItems: "center",
44
- children: /* @__PURE__ */ i(
45
- u,
46
- {
47
- width: e[t].imageWidth,
48
- height: e[t].imageHeight,
49
- src: p.ROCKET_BROKEN,
50
- withLoader: !1
51
- }
52
- )
23
+ children: /* @__PURE__ */ r(f, { width: 122, height: 100, src: $.ROCKET_BROKEN, withLoader: !1 })
53
24
  }
54
25
  ),
55
- /* @__PURE__ */ i(
56
- m,
57
- {
58
- $renderAs: e[t].title,
59
- $marginBottomX: 0.5,
60
- $color: o,
61
- $align: "center",
62
- children: s ?? "Oops! Looks like something went wrong"
63
- }
64
- ),
65
- /* @__PURE__ */ i(m, { $renderAs: "body2", $align: "center", $marginBottomX: 1.5, $color: o, children: g ?? /* @__PURE__ */ n(X, { children: [
26
+ /* @__PURE__ */ r(i, { $renderAs: "h4", $marginBottomX: 0.5, $color: e, $align: "center", children: m ?? "Oops! Looks like something went wrong" }),
27
+ /* @__PURE__ */ r(i, { $renderAs: "body2", $align: "center", $marginBottomX: 1.5, $color: e, children: c ?? /* @__PURE__ */ o(h, { children: [
66
28
  "Please try again. Alternatively if that does not work,",
67
- /* @__PURE__ */ i("br", {}),
29
+ /* @__PURE__ */ r("br", {}),
68
30
  " please contact support."
69
31
  ] }) }),
70
- /* @__PURE__ */ i(
71
- f,
32
+ /* @__PURE__ */ r(
33
+ p,
72
34
  {
73
35
  label: "Try again",
74
- onClick: c,
36
+ onClick: d,
75
37
  renderAs: "primary",
76
38
  size: "small",
77
39
  widthX: 14
78
40
  }
79
41
  )
80
42
  ] });
81
- }, k = w;
43
+ }, b = w;
82
44
  export {
83
- k as default
45
+ b as default
84
46
  };
85
47
  //# sourceMappingURL=error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import type { TTextVariants } from '../types';\n\nimport React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n size?: 'compact' | 'full';\n}\n\ninterface IErrorConfig {\n widthX: number;\n heightX: number;\n borderRadiusX: number;\n marginBottomX: number;\n title: TTextVariants;\n description: TTextVariants;\n imageWidth: number;\n imageHeight: number;\n}\n\nconst ERROR_CONFIG: Record<'compact' | 'full', IErrorConfig> = {\n compact: {\n widthX: 10,\n heightX: 5,\n borderRadiusX: 1,\n marginBottomX: 1,\n title: 'h6',\n description: 'body3',\n imageWidth: 54,\n imageHeight: 44,\n },\n full: {\n widthX: 22.5,\n heightX: 11.5,\n borderRadiusX: 1,\n marginBottomX: 1.5,\n title: 'h4',\n description: 'body2',\n imageWidth: 122,\n imageHeight: 100,\n },\n};\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description, size = 'full' } = props;\n\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={ERROR_CONFIG[size].widthX}\n $heightX={ERROR_CONFIG[size].heightX}\n $borderRadiusX={ERROR_CONFIG[size].borderRadiusX}\n $marginBottomX={ERROR_CONFIG[size].marginBottomX}\n $background=\"GREY_1\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Image\n width={ERROR_CONFIG[size].imageWidth}\n height={ERROR_CONFIG[size].imageHeight}\n src={ILLUSTRATIONS.ROCKET_BROKEN}\n withLoader={false}\n />\n </FlexView>\n <Text\n $renderAs={ERROR_CONFIG[size].title}\n $marginBottomX={0.5}\n $color={textColor}\n $align=\"center\"\n >\n {title ?? 'Oops! Looks like something went wrong'}\n </Text>\n <Text $renderAs=\"body2\" $align=\"center\" $marginBottomX={1.5} $color={textColor}>\n {description ?? (\n <>\n Please try again. Alternatively if that does not work,\n <br /> please contact support.\n </>\n )}\n </Text>\n <Button\n label=\"Try again\"\n onClick={handleTryAgain}\n renderAs=\"primary\"\n size=\"small\"\n widthX={14}\n />\n </FlexView>\n );\n};\n\nexport default Error;\n"],"names":["ERROR_CONFIG","Error","props","height","onTryAgain","theme","title","description","size","handleTryAgain","useCallback","textColor","FlexView","jsx","Image","ILLUSTRATIONS","Text","jsxs","Fragment","Button","Error$1"],"mappings":";;;;;;;AA8BA,MAAMA,IAAyD;AAAA,EAC7D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AACF,GAEMC,IAA+B,CAASC,MAAA;AACtC,QAAA,EAAE,QAAAC,GAAQ,YAAAC,GAAY,OAAAC,IAAQ,SAAS,OAAAC,GAAO,aAAAC,GAAa,MAAAC,IAAO,OAAW,IAAAN,GAE7EO,IAAiBC,EAAY,MAAM;AACvC,IAAIN,IACSA,MAEX,OAAO,SAAS;EAClB,GACC,CAACA,CAAU,CAAC,GAETO,IAAYN,MAAU,SAAS,eAAe;AAEpD,2BACGO,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAAS,SAAST,GAC/D,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,SAASZ,EAAaQ,CAAI,EAAE;AAAA,QAC5B,UAAUR,EAAaQ,CAAI,EAAE;AAAA,QAC7B,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QAEZ,UAAA,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAOd,EAAaQ,CAAI,EAAE;AAAA,YAC1B,QAAQR,EAAaQ,CAAI,EAAE;AAAA,YAC3B,KAAKO,EAAc;AAAA,YACnB,YAAY;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,WAAWhB,EAAaQ,CAAI,EAAE;AAAA,QAC9B,gBAAgB;AAAA,QAChB,QAAQG;AAAA,QACR,QAAO;AAAA,QAEN,UAASL,KAAA;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAO,EAACG,GAAK,EAAA,WAAU,SAAQ,QAAO,UAAS,gBAAgB,KAAK,QAAQL,GAClE,UAAAJ,KACG,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA;AAAA,wBAEC,MAAG,EAAA;AAAA,MAAE;AAAA,IAAA,EAAA,CACR,EAEJ,CAAA;AAAA,IACA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAASV;AAAA,QACT,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF,EAAA,CAAA;AAEJ,GAEAW,IAAenB;"}
1
+ {"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n}\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description } = props;\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={22.5}\n $heightX={11.5}\n $borderRadiusX={1}\n $marginBottomX={1.5}\n $background=\"GREY_1\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Image width={122} height={100} src={ILLUSTRATIONS.ROCKET_BROKEN} withLoader={false} />\n </FlexView>\n <Text $renderAs=\"h4\" $marginBottomX={0.5} $color={textColor} $align=\"center\">\n {title ?? 'Oops! Looks like something went wrong'}\n </Text>\n <Text $renderAs=\"body2\" $align=\"center\" $marginBottomX={1.5} $color={textColor}>\n {description ?? (\n <>\n Please try again. Alternatively if that does not work,\n <br /> please contact support.\n </>\n )}\n </Text>\n <Button\n label=\"Try again\"\n onClick={handleTryAgain}\n renderAs=\"primary\"\n size=\"small\"\n widthX={14}\n />\n </FlexView>\n );\n};\n\nexport default Error;\n"],"names":["Error","props","height","onTryAgain","theme","title","description","handleTryAgain","useCallback","textColor","FlexView","jsx","Image","ILLUSTRATIONS","Text","jsxs","Fragment","Button","Error$1"],"mappings":";;;;;;;AAgBA,MAAMA,IAA+B,CAASC,MAAA;AAC5C,QAAM,EAAE,QAAAC,GAAQ,YAAAC,GAAY,OAAAC,IAAQ,SAAS,OAAAC,GAAO,aAAAC,EAAgB,IAAAL,GAC9DM,IAAiBC,EAAY,MAAM;AACvC,IAAIL,IACSA,MAEX,OAAO,SAAS;EAClB,GACC,CAACA,CAAU,CAAC,GAETM,IAAYL,MAAU,SAAS,eAAe;AAEpD,2BACGM,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAAS,SAASR,GAC/D,UAAA;AAAA,IAAA,gBAAAS;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,SAAS;AAAA,QACT,UAAU;AAAA,QACV,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QAEZ,UAAA,gBAAAC,EAACC,GAAM,EAAA,OAAO,KAAK,QAAQ,KAAK,KAAKC,EAAc,eAAe,YAAY,GAAO,CAAA;AAAA,MAAA;AAAA,IACvF;AAAA,IACA,gBAAAF,EAACG,GAAK,EAAA,WAAU,MAAK,gBAAgB,KAAK,QAAQL,GAAW,QAAO,UACjE,UAAAJ,KAAS,wCACZ,CAAA;AAAA,IACA,gBAAAM,EAACG,GAAK,EAAA,WAAU,SAAQ,QAAO,UAAS,gBAAgB,KAAK,QAAQL,GAClE,UAAAH,KACG,gBAAAS,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA;AAAA,wBAEC,MAAG,EAAA;AAAA,MAAE;AAAA,IAAA,EAAA,CACR,EAEJ,CAAA;AAAA,IACA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAASV;AAAA,QACT,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF,EAAA,CAAA;AAEJ,GAEAW,IAAelB;"}
@@ -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 = !1, ...o }) => {
17
+ ({ borderRadius: n = 0, borderColor: r, withLoader: a, ...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 = 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
+ {"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,GAAY,GAAGC,QAAY;AACrD,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 a } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as l } 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 H = ($) => {
4
+ const k = (h) => {
5
5
  const {
6
- label: l,
7
- stickyLabel: h,
6
+ label: a,
7
+ stickyLabel: $,
8
8
  renderAs: e,
9
9
  width: b,
10
10
  widthX: c,
@@ -19,8 +19,8 @@ const H = ($) => {
19
19
  shape: t,
20
20
  isTransparent: p = !1,
21
21
  helperText: o
22
- } = $, { input: T } = g();
23
- return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ a(
22
+ } = h, { input: T } = g();
23
+ return /* @__PURE__ */ r(x, { $width: b, $widthX: c, $size: s, $willShowMessage: u, children: /* @__PURE__ */ l(
24
24
  z,
25
25
  {
26
26
  $renderAs: e,
@@ -29,7 +29,7 @@ const H = ($) => {
29
29
  $shape: t,
30
30
  $isTransparent: p,
31
31
  children: [
32
- /* @__PURE__ */ a(f, { children: [
32
+ /* @__PURE__ */ l(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 H = ($) => {
44
44
  children: d
45
45
  }
46
46
  ) : void 0,
47
- l && t !== "curved" && /* @__PURE__ */ a(
47
+ a && t !== "curved" && /* @__PURE__ */ l(
48
48
  E,
49
49
  {
50
50
  $renderAs: T.sizes[s].labelTextVariant,
51
51
  $inputRenderAs: e,
52
52
  $size: s,
53
- $stickyLabel: h,
53
+ $stickyLabel: $,
54
54
  $disabled: i,
55
55
  $shape: t,
56
56
  $isTransparent: p,
57
57
  children: [
58
- l,
58
+ a,
59
59
  A && /* @__PURE__ */ r("span", { children: "*" })
60
60
  ]
61
61
  }
@@ -63,7 +63,7 @@ const H = ($) => {
63
63
  ]
64
64
  }
65
65
  ) });
66
- }, k = H;
66
+ };
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","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
+ {"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,11 +1,11 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as a } 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 g } from "./text-input-styled.js";
5
- const i = "regular", $ = I((o, l) => {
4
+ import { Input as b } from "./text-input-styled.js";
5
+ const i = "regular", g = I((o, p) => {
6
6
  const {
7
7
  type: e,
8
- label: p,
8
+ label: l,
9
9
  value: t,
10
10
  renderAs: r,
11
11
  width: m,
@@ -14,44 +14,43 @@ const i = "regular", $ = I((o, l) => {
14
14
  willShowMessage: d,
15
15
  siblingElement: f,
16
16
  errorMessage: c,
17
- shape: b,
18
- isTransparent: a,
19
- helperText: h,
20
- stickyLabel: w,
17
+ shape: h,
18
+ isTransparent: n,
19
+ helperText: w,
21
20
  ...x
22
21
  } = o;
23
- return /* @__PURE__ */ n(
22
+ return /* @__PURE__ */ a(
24
23
  T,
25
24
  {
26
25
  renderAs: r,
27
- label: p,
28
- stickyLabel: !!t || e === "date" || w,
26
+ label: l,
27
+ stickyLabel: !!t || e === "date",
29
28
  width: m,
30
29
  widthX: u,
31
30
  disabled: s,
32
31
  willShowMessage: d,
33
32
  size: i,
34
- shape: b,
33
+ shape: h,
35
34
  errorMessage: c,
36
- helperText: h,
37
- isTransparent: a,
38
- inputElement: /* @__PURE__ */ n(
39
- g,
35
+ helperText: w,
36
+ isTransparent: n,
37
+ inputElement: /* @__PURE__ */ a(
38
+ b,
40
39
  {
41
- ref: l,
40
+ ref: p,
42
41
  type: e,
43
42
  value: t ?? "",
44
43
  $renderAs: r,
45
44
  $size: i,
46
45
  disabled: s,
47
- $isTransparent: a,
46
+ $isTransparent: n,
48
47
  ...x
49
48
  }
50
49
  ),
51
50
  siblingElement: f
52
51
  }
53
52
  );
54
- }), z = $;
53
+ }), z = g;
55
54
  export {
56
55
  z as default
57
56
  };
@@ -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 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
+ {"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;"}