@cuemath/leap 3.1.7-gg1 → 3.1.8-aa0

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 (71) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/constants/country.js +994 -2
  4. package/dist/constants/country.js.map +1 -1
  5. package/dist/features/auth/account-selector/account-selector-styled.js +9 -0
  6. package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
  7. package/dist/features/auth/account-selector/account-selector.js +60 -36
  8. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  9. package/dist/features/auth/comps/auth-page-layout/{auth-page-layout-styles.js → auth-page-layout-styled.js} +1 -1
  10. package/dist/features/auth/comps/auth-page-layout/{auth-page-layout-styles.js.map → auth-page-layout-styled.js.map} +1 -1
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -9
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
  14. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
  15. package/dist/features/auth/forgot-password/forgot-password-styled.js +30 -4
  16. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  17. package/dist/features/auth/forgot-password/otp-form/otp-form.js +27 -29
  18. package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
  19. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +22 -27
  20. package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
  21. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +25 -28
  22. package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
  23. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +17 -4
  24. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  25. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +88 -79
  26. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
  27. package/dist/features/auth/login/login-styled.js +26 -0
  28. package/dist/features/auth/login/login-styled.js.map +1 -0
  29. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +27 -21
  30. package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
  31. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +9 -0
  32. package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +1 -0
  33. package/dist/features/auth/login/social-login-methods/social-login-methods.js +43 -34
  34. package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
  35. package/dist/features/auth/login/username-password-form/username-password-form.js +68 -71
  36. package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
  37. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +1 -1
  38. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -1
  39. package/dist/features/auth/signup/signup-constants.js +6 -998
  40. package/dist/features/auth/signup/signup-constants.js.map +1 -1
  41. package/dist/features/auth/user-list/user-item/user-item.js +33 -32
  42. package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
  43. package/dist/features/auth/user-list/user-list.js +60 -51
  44. package/dist/features/auth/user-list/user-list.js.map +1 -1
  45. package/dist/features/hooks/use-viewport/use-viewport.js +21 -0
  46. package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
  47. package/dist/features/ui/buttons/button/button-styled.js +29 -29
  48. package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
  49. package/dist/features/utils/media.js +16 -0
  50. package/dist/features/utils/media.js.map +1 -0
  51. package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js +60 -60
  52. package/dist/features/worksheet/worksheet/worksheet-question/subjective-feedback.js.map +1 -1
  53. package/dist/index.d.ts +22 -71
  54. package/dist/index.js +348 -350
  55. package/dist/index.js.map +1 -1
  56. package/dist/static/cuemath-app-qr-code.7205ee79.svg +1 -0
  57. package/package.json +1 -1
  58. package/dist/features/ui/modals/modal-context.js +0 -13
  59. package/dist/features/ui/modals/modal-context.js.map +0 -1
  60. package/dist/features/ui/modals/modal-helpers.js +0 -17
  61. package/dist/features/ui/modals/modal-helpers.js.map +0 -1
  62. package/dist/features/ui/modals/modal-provider.js +0 -48
  63. package/dist/features/ui/modals/modal-provider.js.map +0 -1
  64. package/dist/features/ui/modals/modal-styled.js +0 -154
  65. package/dist/features/ui/modals/modal-styled.js.map +0 -1
  66. package/dist/features/ui/modals/modal.js +0 -19
  67. package/dist/features/ui/modals/modal.js.map +0 -1
  68. package/dist/features/ui/modals/use-modal-actions.js +0 -10
  69. package/dist/features/ui/modals/use-modal-actions.js.map +0 -1
  70. package/dist/features/ui/modals/use-modal-params.js +0 -10
  71. package/dist/features/ui/modals/use-modal-params.js.map +0 -1
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024"><defs><clipPath id="clip-path-dot-color"><path d="M 62 341 v 31 h 31v -31h -31ZM 62 403 v 31 h 31v -31h -31ZM 62 465 v 31 h 31v -31h -31ZM 62 496 v 31 h 31v -31h -31ZM 62 558 v 31 h 31v -31h -31ZM 62 589 v 31 h 31v -31h -31ZM 62 620 v 31 h 31v -31h -31ZM 62 651 v 31 h 31v -31h -31ZM 93 341 v 31 h 31v -31h -31ZM 93 372 v 31 h 31v -31h -31ZM 93 434 v 31 h 31v -31h -31ZM 93 465 v 31 h 31v -31h -31ZM 93 496 v 31 h 31v -31h -31ZM 93 527 v 31 h 31v -31h -31ZM 93 558 v 31 h 31v -31h -31ZM 93 589 v 31 h 31v -31h -31ZM 93 620 v 31 h 31v -31h -31ZM 93 682 v 31 h 31v -31h -31ZM 124 341 v 31 h 31v -31h -31ZM 124 434 v 31 h 31v -31h -31ZM 124 465 v 31 h 31v -31h -31ZM 124 558 v 31 h 31v -31h -31ZM 124 589 v 31 h 31v -31h -31ZM 124 651 v 31 h 31v -31h -31ZM 124 682 v 31 h 31v -31h -31ZM 155 403 v 31 h 31v -31h -31ZM 155 465 v 31 h 31v -31h -31ZM 155 496 v 31 h 31v -31h -31ZM 186 341 v 31 h 31v -31h -31ZM 186 434 v 31 h 31v -31h -31ZM 186 465 v 31 h 31v -31h -31ZM 186 496 v 31 h 31v -31h -31ZM 186 527 v 31 h 31v -31h -31ZM 186 558 v 31 h 31v -31h -31ZM 186 589 v 31 h 31v -31h -31ZM 186 620 v 31 h 31v -31h -31ZM 217 310 v 31 h 31v -31h -31ZM 217 341 v 31 h 31v -31h -31ZM 217 403 v 31 h 31v -31h -31ZM 217 465 v 31 h 31v -31h -31ZM 217 496 v 31 h 31v -31h -31ZM 217 527 v 31 h 31v -31h -31ZM 217 589 v 31 h 31v -31h -31ZM 217 620 v 31 h 31v -31h -31ZM 217 651 v 31 h 31v -31h -31ZM 248 310 v 31 h 31v -31h -31ZM 248 372 v 31 h 31v -31h -31ZM 248 434 v 31 h 31v -31h -31ZM 248 496 v 31 h 31v -31h -31ZM 248 558 v 31 h 31v -31h -31ZM 248 620 v 31 h 31v -31h -31ZM 248 682 v 31 h 31v -31h -31ZM 279 341 v 31 h 31v -31h -31ZM 279 372 v 31 h 31v -31h -31ZM 279 403 v 31 h 31v -31h -31ZM 279 496 v 31 h 31v -31h -31ZM 279 527 v 31 h 31v -31h -31ZM 279 589 v 31 h 31v -31h -31ZM 279 620 v 31 h 31v -31h -31ZM 279 651 v 31 h 31v -31h -31ZM 310 62 v 31 h 31v -31h -31ZM 310 155 v 31 h 31v -31h -31ZM 310 217 v 31 h 31v -31h -31ZM 310 248 v 31 h 31v -31h -31ZM 310 310 v 31 h 31v -31h -31ZM 310 341 v 31 h 31v -31h -31ZM 310 713 v 31 h 31v -31h -31ZM 310 775 v 31 h 31v -31h -31ZM 341 93 v 31 h 31v -31h -31ZM 341 124 v 31 h 31v -31h -31ZM 341 155 v 31 h 31v -31h -31ZM 341 186 v 31 h 31v -31h -31ZM 341 279 v 31 h 31v -31h -31ZM 341 372 v 31 h 31v -31h -31ZM 341 496 v 31 h 31v -31h -31ZM 341 558 v 31 h 31v -31h -31ZM 341 589 v 31 h 31v -31h -31ZM 341 682 v 31 h 31v -31h -31ZM 341 713 v 31 h 31v -31h -31ZM 341 744 v 31 h 31v -31h -31ZM 341 837 v 31 h 31v -31h -31ZM 341 930 v 31 h 31v -31h -31ZM 372 124 v 31 h 31v -31h -31ZM 372 155 v 31 h 31v -31h -31ZM 372 248 v 31 h 31v -31h -31ZM 372 341 v 31 h 31v -31h -31ZM 372 403 v 31 h 31v -31h -31ZM 372 434 v 31 h 31v -31h -31ZM 372 558 v 31 h 31v -31h -31ZM 372 620 v 31 h 31v -31h -31ZM 372 651 v 31 h 31v -31h -31ZM 372 682 v 31 h 31v -31h -31ZM 372 837 v 31 h 31v -31h -31ZM 372 868 v 31 h 31v -31h -31ZM 372 899 v 31 h 31v -31h -31ZM 403 93 v 31 h 31v -31h -31ZM 403 124 v 31 h 31v -31h -31ZM 403 186 v 31 h 31v -31h -31ZM 403 217 v 31 h 31v -31h -31ZM 403 310 v 31 h 31v -31h -31ZM 403 341 v 31 h 31v -31h -31ZM 403 372 v 31 h 31v -31h -31ZM 403 496 v 31 h 31v -31h -31ZM 403 527 v 31 h 31v -31h -31ZM 403 620 v 31 h 31v -31h -31ZM 403 744 v 31 h 31v -31h -31ZM 403 775 v 31 h 31v -31h -31ZM 403 806 v 31 h 31v -31h -31ZM 403 868 v 31 h 31v -31h -31ZM 403 899 v 31 h 31v -31h -31ZM 434 93 v 31 h 31v -31h -31ZM 434 155 v 31 h 31v -31h -31ZM 434 217 v 31 h 31v -31h -31ZM 434 248 v 31 h 31v -31h -31ZM 434 372 v 31 h 31v -31h -31ZM 434 558 v 31 h 31v -31h -31ZM 434 589 v 31 h 31v -31h -31ZM 434 651 v 31 h 31v -31h -31ZM 434 682 v 31 h 31v -31h -31ZM 434 713 v 31 h 31v -31h -31ZM 434 744 v 31 h 31v -31h -31ZM 434 837 v 31 h 31v -31h -31ZM 434 899 v 31 h 31v -31h -31ZM 434 930 v 31 h 31v -31h -31ZM 465 186 v 31 h 31v -31h -31ZM 465 217 v 31 h 31v -31h -31ZM 465 434 v 31 h 31v -31h -31ZM 465 589 v 31 h 31v -31h -31ZM 465 620 v 31 h 31v -31h -31ZM 465 651 v 31 h 31v -31h -31ZM 465 775 v 31 h 31v -31h -31ZM 496 93 v 31 h 31v -31h -31ZM 496 155 v 31 h 31v -31h -31ZM 496 186 v 31 h 31v -31h -31ZM 496 248 v 31 h 31v -31h -31ZM 496 279 v 31 h 31v -31h -31ZM 496 341 v 31 h 31v -31h -31ZM 496 372 v 31 h 31v -31h -31ZM 496 589 v 31 h 31v -31h -31ZM 496 620 v 31 h 31v -31h -31ZM 496 713 v 31 h 31v -31h -31ZM 496 744 v 31 h 31v -31h -31ZM 496 837 v 31 h 31v -31h -31ZM 496 868 v 31 h 31v -31h -31ZM 496 899 v 31 h 31v -31h -31ZM 496 930 v 31 h 31v -31h -31ZM 527 62 v 31 h 31v -31h -31ZM 527 217 v 31 h 31v -31h -31ZM 527 403 v 31 h 31v -31h -31ZM 527 465 v 31 h 31v -31h -31ZM 527 496 v 31 h 31v -31h -31ZM 527 527 v 31 h 31v -31h -31ZM 527 558 v 31 h 31v -31h -31ZM 527 589 v 31 h 31v -31h -31ZM 527 651 v 31 h 31v -31h -31ZM 527 837 v 31 h 31v -31h -31ZM 527 899 v 31 h 31v -31h -31ZM 558 62 v 31 h 31v -31h -31ZM 558 93 v 31 h 31v -31h -31ZM 558 124 v 31 h 31v -31h -31ZM 558 155 v 31 h 31v -31h -31ZM 558 217 v 31 h 31v -31h -31ZM 558 248 v 31 h 31v -31h -31ZM 558 279 v 31 h 31v -31h -31ZM 558 310 v 31 h 31v -31h -31ZM 558 372 v 31 h 31v -31h -31ZM 558 465 v 31 h 31v -31h -31ZM 558 496 v 31 h 31v -31h -31ZM 558 527 v 31 h 31v -31h -31ZM 558 589 v 31 h 31v -31h -31ZM 558 682 v 31 h 31v -31h -31ZM 558 713 v 31 h 31v -31h -31ZM 558 775 v 31 h 31v -31h -31ZM 558 899 v 31 h 31v -31h -31ZM 589 124 v 31 h 31v -31h -31ZM 589 186 v 31 h 31v -31h -31ZM 589 279 v 31 h 31v -31h -31ZM 589 310 v 31 h 31v -31h -31ZM 589 341 v 31 h 31v -31h -31ZM 589 403 v 31 h 31v -31h -31ZM 589 434 v 31 h 31v -31h -31ZM 589 558 v 31 h 31v -31h -31ZM 589 620 v 31 h 31v -31h -31ZM 589 713 v 31 h 31v -31h -31ZM 589 744 v 31 h 31v -31h -31ZM 589 775 v 31 h 31v -31h -31ZM 589 837 v 31 h 31v -31h -31ZM 589 930 v 31 h 31v -31h -31ZM 620 62 v 31 h 31v -31h -31ZM 620 124 v 31 h 31v -31h -31ZM 620 248 v 31 h 31v -31h -31ZM 620 310 v 31 h 31v -31h -31ZM 620 372 v 31 h 31v -31h -31ZM 620 403 v 31 h 31v -31h -31ZM 620 434 v 31 h 31v -31h -31ZM 620 465 v 31 h 31v -31h -31ZM 620 620 v 31 h 31v -31h -31ZM 620 682 v 31 h 31v -31h -31ZM 620 713 v 31 h 31v -31h -31ZM 620 744 v 31 h 31v -31h -31ZM 620 775 v 31 h 31v -31h -31ZM 620 899 v 31 h 31v -31h -31ZM 620 930 v 31 h 31v -31h -31ZM 651 124 v 31 h 31v -31h -31ZM 651 465 v 31 h 31v -31h -31ZM 651 527 v 31 h 31v -31h -31ZM 651 589 v 31 h 31v -31h -31ZM 651 682 v 31 h 31v -31h -31ZM 651 744 v 31 h 31v -31h -31ZM 651 899 v 31 h 31v -31h -31ZM 651 930 v 31 h 31v -31h -31ZM 682 62 v 31 h 31v -31h -31ZM 682 124 v 31 h 31v -31h -31ZM 682 248 v 31 h 31v -31h -31ZM 682 310 v 31 h 31v -31h -31ZM 682 341 v 31 h 31v -31h -31ZM 682 372 v 31 h 31v -31h -31ZM 682 403 v 31 h 31v -31h -31ZM 682 434 v 31 h 31v -31h -31ZM 682 496 v 31 h 31v -31h -31ZM 682 558 v 31 h 31v -31h -31ZM 682 682 v 31 h 31v -31h -31ZM 682 713 v 31 h 31v -31h -31ZM 682 744 v 31 h 31v -31h -31ZM 682 775 v 31 h 31v -31h -31ZM 682 806 v 31 h 31v -31h -31ZM 682 868 v 31 h 31v -31h -31ZM 713 310 v 31 h 31v -31h -31ZM 713 372 v 31 h 31v -31h -31ZM 713 403 v 31 h 31v -31h -31ZM 713 465 v 31 h 31v -31h -31ZM 713 558 v 31 h 31v -31h -31ZM 713 589 v 31 h 31v -31h -31ZM 713 620 v 31 h 31v -31h -31ZM 713 682 v 31 h 31v -31h -31ZM 713 806 v 31 h 31v -31h -31ZM 713 868 v 31 h 31v -31h -31ZM 713 899 v 31 h 31v -31h -31ZM 713 930 v 31 h 31v -31h -31ZM 744 372 v 31 h 31v -31h -31ZM 744 403 v 31 h 31v -31h -31ZM 744 465 v 31 h 31v -31h -31ZM 744 496 v 31 h 31v -31h -31ZM 744 558 v 31 h 31v -31h -31ZM 744 589 v 31 h 31v -31h -31ZM 744 620 v 31 h 31v -31h -31ZM 744 682 v 31 h 31v -31h -31ZM 744 744 v 31 h 31v -31h -31ZM 744 806 v 31 h 31v -31h -31ZM 744 899 v 31 h 31v -31h -31ZM 775 310 v 31 h 31v -31h -31ZM 775 341 v 31 h 31v -31h -31ZM 775 372 v 31 h 31v -31h -31ZM 775 465 v 31 h 31v -31h -31ZM 775 527 v 31 h 31v -31h -31ZM 775 558 v 31 h 31v -31h -31ZM 775 620 v 31 h 31v -31h -31ZM 775 682 v 31 h 31v -31h -31ZM 775 806 v 31 h 31v -31h -31ZM 775 837 v 31 h 31v -31h -31ZM 775 868 v 31 h 31v -31h -31ZM 775 899 v 31 h 31v -31h -31ZM 806 341 v 31 h 31v -31h -31ZM 806 403 v 31 h 31v -31h -31ZM 806 496 v 31 h 31v -31h -31ZM 806 589 v 31 h 31v -31h -31ZM 806 620 v 31 h 31v -31h -31ZM 806 682 v 31 h 31v -31h -31ZM 806 713 v 31 h 31v -31h -31ZM 806 744 v 31 h 31v -31h -31ZM 806 775 v 31 h 31v -31h -31ZM 806 806 v 31 h 31v -31h -31ZM 806 899 v 31 h 31v -31h -31ZM 806 930 v 31 h 31v -31h -31ZM 837 310 v 31 h 31v -31h -31ZM 837 341 v 31 h 31v -31h -31ZM 837 434 v 31 h 31v -31h -31ZM 837 496 v 31 h 31v -31h -31ZM 837 651 v 31 h 31v -31h -31ZM 837 744 v 31 h 31v -31h -31ZM 837 806 v 31 h 31v -31h -31ZM 837 837 v 31 h 31v -31h -31ZM 837 868 v 31 h 31v -31h -31ZM 837 899 v 31 h 31v -31h -31ZM 868 341 v 31 h 31v -31h -31ZM 868 496 v 31 h 31v -31h -31ZM 868 806 v 31 h 31v -31h -31ZM 868 837 v 31 h 31v -31h -31ZM 868 868 v 31 h 31v -31h -31ZM 868 930 v 31 h 31v -31h -31ZM 899 372 v 31 h 31v -31h -31ZM 899 403 v 31 h 31v -31h -31ZM 899 434 v 31 h 31v -31h -31ZM 899 496 v 31 h 31v -31h -31ZM 899 589 v 31 h 31v -31h -31ZM 899 620 v 31 h 31v -31h -31ZM 899 651 v 31 h 31v -31h -31ZM 899 682 v 31 h 31v -31h -31ZM 899 744 v 31 h 31v -31h -31ZM 899 806 v 31 h 31v -31h -31ZM 899 899 v 31 h 31v -31h -31ZM 930 310 v 31 h 31v -31h -31ZM 930 341 v 31 h 31v -31h -31ZM 930 589 v 31 h 31v -31h -31ZM 930 682 v 31 h 31v -31h -31ZM 930 713 v 31 h 31v -31h -31ZM 930 775 v 31 h 31v -31h -31ZM 930 806 v 31 h 31v -31h -31ZM 930 899 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-square-color-0-0"><path d="M 62 62 v 31 h 31v -31h -31ZM 62 93 v 31 h 31v -31h -31ZM 62 124 v 31 h 31v -31h -31ZM 62 155 v 31 h 31v -31h -31ZM 62 186 v 31 h 31v -31h -31ZM 62 217 v 31 h 31v -31h -31ZM 62 248 v 31 h 31v -31h -31ZM 93 62 v 31 h 31v -31h -31ZM 93 248 v 31 h 31v -31h -31ZM 124 62 v 31 h 31v -31h -31ZM 124 248 v 31 h 31v -31h -31ZM 155 62 v 31 h 31v -31h -31ZM 155 248 v 31 h 31v -31h -31ZM 186 62 v 31 h 31v -31h -31ZM 186 248 v 31 h 31v -31h -31ZM 217 62 v 31 h 31v -31h -31ZM 217 248 v 31 h 31v -31h -31ZM 248 62 v 31 h 31v -31h -31ZM 248 93 v 31 h 31v -31h -31ZM 248 124 v 31 h 31v -31h -31ZM 248 155 v 31 h 31v -31h -31ZM 248 186 v 31 h 31v -31h -31ZM 248 217 v 31 h 31v -31h -31ZM 248 248 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-dot-color-0-0"><path d="M 124 124 v 31 h 31v -31h -31ZM 124 155 v 31 h 31v -31h -31ZM 124 186 v 31 h 31v -31h -31ZM 155 124 v 31 h 31v -31h -31ZM 155 155 v 31 h 31v -31h -31ZM 155 186 v 31 h 31v -31h -31ZM 186 124 v 31 h 31v -31h -31ZM 186 155 v 31 h 31v -31h -31ZM 186 186 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-square-color-1-0"><path d="M 744 62 v 31 h 31v -31h -31ZM 744 93 v 31 h 31v -31h -31ZM 744 124 v 31 h 31v -31h -31ZM 744 155 v 31 h 31v -31h -31ZM 744 186 v 31 h 31v -31h -31ZM 744 217 v 31 h 31v -31h -31ZM 744 248 v 31 h 31v -31h -31ZM 775 62 v 31 h 31v -31h -31ZM 775 248 v 31 h 31v -31h -31ZM 806 62 v 31 h 31v -31h -31ZM 806 248 v 31 h 31v -31h -31ZM 837 62 v 31 h 31v -31h -31ZM 837 248 v 31 h 31v -31h -31ZM 868 62 v 31 h 31v -31h -31ZM 868 248 v 31 h 31v -31h -31ZM 899 62 v 31 h 31v -31h -31ZM 899 248 v 31 h 31v -31h -31ZM 930 62 v 31 h 31v -31h -31ZM 930 93 v 31 h 31v -31h -31ZM 930 124 v 31 h 31v -31h -31ZM 930 155 v 31 h 31v -31h -31ZM 930 186 v 31 h 31v -31h -31ZM 930 217 v 31 h 31v -31h -31ZM 930 248 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-dot-color-1-0"><path d="M 806 124 v 31 h 31v -31h -31ZM 806 155 v 31 h 31v -31h -31ZM 806 186 v 31 h 31v -31h -31ZM 837 124 v 31 h 31v -31h -31ZM 837 155 v 31 h 31v -31h -31ZM 837 186 v 31 h 31v -31h -31ZM 868 124 v 31 h 31v -31h -31ZM 868 155 v 31 h 31v -31h -31ZM 868 186 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-square-color-0-1"><path d="M 62 744 v 31 h 31v -31h -31ZM 62 775 v 31 h 31v -31h -31ZM 62 806 v 31 h 31v -31h -31ZM 62 837 v 31 h 31v -31h -31ZM 62 868 v 31 h 31v -31h -31ZM 62 899 v 31 h 31v -31h -31ZM 62 930 v 31 h 31v -31h -31ZM 93 744 v 31 h 31v -31h -31ZM 93 930 v 31 h 31v -31h -31ZM 124 744 v 31 h 31v -31h -31ZM 124 930 v 31 h 31v -31h -31ZM 155 744 v 31 h 31v -31h -31ZM 155 930 v 31 h 31v -31h -31ZM 186 744 v 31 h 31v -31h -31ZM 186 930 v 31 h 31v -31h -31ZM 217 744 v 31 h 31v -31h -31ZM 217 930 v 31 h 31v -31h -31ZM 248 744 v 31 h 31v -31h -31ZM 248 775 v 31 h 31v -31h -31ZM 248 806 v 31 h 31v -31h -31ZM 248 837 v 31 h 31v -31h -31ZM 248 868 v 31 h 31v -31h -31ZM 248 899 v 31 h 31v -31h -31ZM 248 930 v 31 h 31v -31h -31Z"/></clipPath><clipPath id="clip-path-corners-dot-color-0-1"><path d="M 124 806 v 31 h 31v -31h -31ZM 124 837 v 31 h 31v -31h -31ZM 124 868 v 31 h 31v -31h -31ZM 155 806 v 31 h 31v -31h -31ZM 155 837 v 31 h 31v -31h -31ZM 155 868 v 31 h 31v -31h -31ZM 186 806 v 31 h 31v -31h -31ZM 186 837 v 31 h 31v -31h -31ZM 186 868 v 31 h 31v -31h -31Z"/></clipPath></defs><path d="M 0 0 h 1024 v 1024 h -1024 Z" clip-path="url('#clip-path-background-color')" fill="rgba(255,255,255,0)"/><path d="M 62 62 h 899 v 899 h -899 Z" clip-path="url('#clip-path-dot-color')" fill="#000000"/><path d="M 62 62 h 217 v 217 h -217 Z" clip-path="url('#clip-path-corners-square-color-0-0')" fill="#000000"/><path d="M 124 124 h 93 v 93 h -93 Z" clip-path="url('#clip-path-corners-dot-color-0-0')" fill="#000"/><path d="M 744 62 h 217 v 217 h -217 Z" clip-path="url('#clip-path-corners-square-color-1-0')" fill="#000000"/><path d="M 806 124 h 93 v 93 h -93 Z" clip-path="url('#clip-path-corners-dot-color-1-0')" fill="#000"/><path d="M 62 744 h 217 v 217 h -217 Z" clip-path="url('#clip-path-corners-square-color-0-1')" fill="#000000"/><path d="M 124 806 h 93 v 93 h -93 Z" clip-path="url('#clip-path-corners-dot-color-0-1')" fill="#000"/></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.1.7-gg1",
3
+ "version": "3.1.8-aa0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,13 +0,0 @@
1
- import { createContext as o } from "react";
2
- const e = o({
3
- modal: null,
4
- openModal: () => {
5
- },
6
- closeModal: () => {
7
- },
8
- isClosing: !1
9
- });
10
- export {
11
- e as default
12
- };
13
- //# sourceMappingURL=modal-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal-context.js","sources":["../../../../src/features/ui/modals/modal-context.ts"],"sourcesContent":["import type { IModalContext } from './modal-types';\n\nimport { createContext } from 'react';\n\n/**\n * Context for providing modal functionality throughout the application\n * Provides access to modal state and actions to open/close modals\n *\n * @example\n * // Usage with useContext\n * const { openModal, closeModal } = useContext(ModalContext);\n * openModal('modalName', { someParam: 'value' });\n */\nconst ModalContext = createContext<IModalContext>({\n modal: null,\n openModal: () => {},\n closeModal: () => {},\n isClosing: false,\n});\n\nexport default ModalContext;\n"],"names":["ModalContext","createContext"],"mappings":";AAaA,MAAMA,IAAeC,EAA6B;AAAA,EAChD,OAAO;AAAA,EACP,WAAW,MAAM;AAAA,EAAC;AAAA,EAClB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,WAAW;AACb,CAAC;"}
@@ -1,17 +0,0 @@
1
- const e = () => {
2
- const o = window.innerWidth > document.documentElement.clientWidth;
3
- if (document.body.dataset.originalOverflow = document.body.style.overflow || "", o) {
4
- const d = window.innerWidth - document.documentElement.clientWidth;
5
- document.body.dataset.originalPadding = document.body.style.paddingRight || "";
6
- const t = parseInt(window.getComputedStyle(document.body).paddingRight, 10) || 0;
7
- document.body.style.paddingRight = `${t + d}px`;
8
- }
9
- document.body.style.overflow = "hidden", document.body.style.touchAction = "none";
10
- }, n = () => {
11
- document.body.dataset.originalPadding !== void 0 && (document.body.style.paddingRight = document.body.dataset.originalPadding, delete document.body.dataset.originalPadding), document.body.dataset.originalOverflow !== void 0 ? (document.body.style.overflow = document.body.dataset.originalOverflow, delete document.body.dataset.originalOverflow) : document.body.style.overflow = "", document.body.style.touchAction = "";
12
- };
13
- export {
14
- e as lockScroll,
15
- n as unlockScroll
16
- };
17
- //# sourceMappingURL=modal-helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal-helpers.js","sources":["../../../../src/features/ui/modals/modal-helpers.ts"],"sourcesContent":["/**\n * Locks scrolling on the body element while preserving the scrollbar width to prevent layout shifts.\n * Stores original style values in data attributes for later restoration.\n */\nexport const lockScroll = (): void => {\n // Calculate if scrollbar is present\n const hasScrollbar = window.innerWidth > document.documentElement.clientWidth;\n\n // Save original overflow state regardless\n document.body.dataset.originalOverflow = document.body.style.overflow || '';\n\n if (hasScrollbar) {\n // Calculate scrollbar width\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n\n // Save original padding\n document.body.dataset.originalPadding = document.body.style.paddingRight || '';\n\n // Get current padding if any\n const currentPadding = parseInt(window.getComputedStyle(document.body).paddingRight, 10) || 0;\n\n // Add padding to prevent content shift when scrollbar disappears\n document.body.style.paddingRight = `${currentPadding + scrollbarWidth}px`;\n }\n\n // Lock scroll\n document.body.style.overflow = 'hidden';\n document.body.style.touchAction = 'none'; // Prevent touch scrolling on mobile\n};\n\n/**\n * Unlocks scrolling on the body element and restores original styles.\n * Uses stored data attributes from lockScroll to restore previous state.\n */\nexport const unlockScroll = (): void => {\n // Restore original padding if it was set\n if (document.body.dataset.originalPadding !== undefined) {\n document.body.style.paddingRight = document.body.dataset.originalPadding;\n delete document.body.dataset.originalPadding;\n }\n\n // Restore original overflow\n if (document.body.dataset.originalOverflow !== undefined) {\n document.body.style.overflow = document.body.dataset.originalOverflow;\n delete document.body.dataset.originalOverflow;\n } else {\n document.body.style.overflow = '';\n }\n\n document.body.style.touchAction = '';\n};\n"],"names":["lockScroll","hasScrollbar","scrollbarWidth","currentPadding","unlockScroll"],"mappings":"AAIO,MAAMA,IAAa,MAAY;AAEpC,QAAMC,IAAe,OAAO,aAAa,SAAS,gBAAgB;AAKlE,MAFA,SAAS,KAAK,QAAQ,mBAAmB,SAAS,KAAK,MAAM,YAAY,IAErEA,GAAc;AAEhB,UAAMC,IAAiB,OAAO,aAAa,SAAS,gBAAgB;AAGpE,aAAS,KAAK,QAAQ,kBAAkB,SAAS,KAAK,MAAM,gBAAgB;AAGtE,UAAAC,IAAiB,SAAS,OAAO,iBAAiB,SAAS,IAAI,EAAE,cAAc,EAAE,KAAK;AAG5F,aAAS,KAAK,MAAM,eAAe,GAAGA,IAAiBD,CAAc;AAAA,EACvE;AAGS,WAAA,KAAK,MAAM,WAAW,UACtB,SAAA,KAAK,MAAM,cAAc;AACpC,GAMaE,IAAe,MAAY;AAEtC,EAAI,SAAS,KAAK,QAAQ,oBAAoB,WAC5C,SAAS,KAAK,MAAM,eAAe,SAAS,KAAK,QAAQ,iBAClD,OAAA,SAAS,KAAK,QAAQ,kBAI3B,SAAS,KAAK,QAAQ,qBAAqB,UAC7C,SAAS,KAAK,MAAM,WAAW,SAAS,KAAK,QAAQ,kBAC9C,OAAA,SAAS,KAAK,QAAQ,oBAEpB,SAAA,KAAK,MAAM,WAAW,IAGxB,SAAA,KAAK,MAAM,cAAc;AACpC;"}
@@ -1,48 +0,0 @@
1
- import { jsxs as k, jsx as C } from "react/jsx-runtime";
2
- import { memo as E, useState as a, useCallback as M, useMemo as x, useEffect as u } from "react";
3
- import y from "./modal.js";
4
- import I from "./modal-context.js";
5
- import { lockScroll as S, unlockScroll as h } from "./modal-helpers.js";
6
- const D = 500, T = E(({ children: w, modals: d, isUserAuthenticated: t }) => {
7
- const [o, c] = a(null), [f, v] = a(void 0), [s, r] = a(!1), m = M(
8
- (n, l) => {
9
- const i = d.find((P) => P.name === n);
10
- if (!i)
11
- throw new Error(`Modal with name "${n}" not found`);
12
- if (i.isPrivate && !t)
13
- throw new Error(
14
- `Access violation: Modal "${n}" is private and user is not authenticated`
15
- );
16
- r(!1), c(i), v(l), S();
17
- },
18
- [t, d]
19
- ), e = M(() => {
20
- r(!0), h(), setTimeout(() => {
21
- c(null), r(!1);
22
- }, D);
23
- }, []), p = x(
24
- () => ({
25
- modal: o,
26
- modalParams: f,
27
- openModal: m,
28
- closeModal: e,
29
- isClosing: s
30
- }),
31
- [o, f, m, e, s]
32
- );
33
- return u(() => {
34
- !t && (o != null && o.isPrivate) && e();
35
- }, [t, o, e]), u(() => {
36
- const n = (l) => {
37
- l.key === "Escape" && (o == null ? void 0 : o.isDismissable) !== !1 && !s && e();
38
- };
39
- return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
40
- }, [o, e, s]), /* @__PURE__ */ k(I.Provider, { value: p, children: [
41
- w,
42
- o && /* @__PURE__ */ C(y, { modal: o, isClosing: s, onClose: e })
43
- ] });
44
- }), O = T;
45
- export {
46
- O as default
47
- };
48
- //# sourceMappingURL=modal-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal-provider.js","sources":["../../../../src/features/ui/modals/modal-provider.tsx"],"sourcesContent":["import type { IModal, IModalContext, IModalProviderProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport Modal from './modal';\nimport ModalContext from './modal-context';\nimport { lockScroll, unlockScroll } from './modal-helpers';\n\nconst ANIMATION_DURATION_MS = 500; // Match the animation duration in modal.tsx\n\n/**\n * Provider component that manages modal state and provides modal context to child components\n */\nconst ModalProvider: FC<IModalProviderProps> = memo(({ children, modals, isUserAuthenticated }) => {\n const [modal, setModal] = useState<IModal | null>(null);\n const [modalParams, setModalParams] = useState<Record<string, unknown> | undefined>(undefined);\n const [isClosing, setIsClosing] = useState(false);\n\n /**\n * Opens a modal by name with optional parameters\n * Handles authentication check for private modals\n */\n const openModal = useCallback<IModalContext['openModal']>(\n (modalName, newModalParams) => {\n const newModal = modals.find(m => m.name === modalName);\n\n if (!newModal) {\n throw new Error(`Modal with name \"${modalName}\" not found`);\n }\n\n if (newModal.isPrivate && !isUserAuthenticated) {\n throw new Error(\n `Access violation: Modal \"${modalName}\" is private and user is not authenticated`,\n );\n }\n\n setIsClosing(false);\n setModal(newModal);\n setModalParams(newModalParams as unknown as Record<string, unknown> | undefined);\n lockScroll(); // Lock scroll while preserving scrollbar width\n },\n [isUserAuthenticated, modals],\n );\n\n const closeModal = useCallback(() => {\n setIsClosing(true);\n // Wait for the animation to complete before removing the modal\n unlockScroll();\n setTimeout(() => {\n setModal(null);\n setIsClosing(false);\n }, ANIMATION_DURATION_MS);\n }, []);\n\n const modalContent = useMemo<IModalContext>(\n () => ({\n modal,\n modalParams,\n openModal,\n closeModal,\n isClosing,\n }),\n [modal, modalParams, openModal, closeModal, isClosing],\n );\n\n useEffect(() => {\n if (!isUserAuthenticated && modal?.isPrivate) {\n // If the modal is private and user is not authenticated, close it\n closeModal();\n }\n }, [isUserAuthenticated, modal, closeModal]);\n\n // Handle ESC key\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === 'Escape' && modal?.isDismissable !== false && !isClosing) {\n closeModal();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [modal, closeModal, isClosing]);\n\n return (\n <ModalContext.Provider value={modalContent}>\n {children}\n {modal && <Modal modal={modal} isClosing={isClosing} onClose={closeModal} />}\n </ModalContext.Provider>\n );\n});\n\nexport default ModalProvider;\n"],"names":["ANIMATION_DURATION_MS","ModalProvider","memo","children","modals","isUserAuthenticated","modal","setModal","useState","modalParams","setModalParams","isClosing","setIsClosing","openModal","useCallback","modalName","newModalParams","newModal","m","lockScroll","closeModal","unlockScroll","modalContent","useMemo","useEffect","handleKeyDown","e","jsxs","ModalContext","jsx","Modal","ModalProvider$1"],"mappings":";;;;;AASA,MAAMA,IAAwB,KAKxBC,IAAyCC,EAAK,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,qBAAAC,QAA0B;AACjG,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAwB,IAAI,GAChD,CAACC,GAAaC,CAAc,IAAIF,EAA8C,MAAS,GACvF,CAACG,GAAWC,CAAY,IAAIJ,EAAS,EAAK,GAM1CK,IAAYC;AAAA,IAChB,CAACC,GAAWC,MAAmB;AAC7B,YAAMC,IAAWb,EAAO,KAAK,CAAKc,MAAAA,EAAE,SAASH,CAAS;AAEtD,UAAI,CAACE;AACH,cAAM,IAAI,MAAM,oBAAoBF,CAAS,aAAa;AAGxD,UAAAE,EAAS,aAAa,CAACZ;AACzB,cAAM,IAAI;AAAA,UACR,4BAA4BU,CAAS;AAAA,QAAA;AAIzC,MAAAH,EAAa,EAAK,GAClBL,EAASU,CAAQ,GACjBP,EAAeM,CAAgE,GACpEG;IACb;AAAA,IACA,CAACd,GAAqBD,CAAM;AAAA,EAAA,GAGxBgB,IAAaN,EAAY,MAAM;AACnC,IAAAF,EAAa,EAAI,GAEJS,KACb,WAAW,MAAM;AACf,MAAAd,EAAS,IAAI,GACbK,EAAa,EAAK;AAAA,OACjBZ,CAAqB;AAAA,EAC1B,GAAG,CAAE,CAAA,GAECsB,IAAeC;AAAA,IACnB,OAAO;AAAA,MACL,OAAAjB;AAAA,MACA,aAAAG;AAAA,MACA,WAAAI;AAAA,MACA,YAAAO;AAAA,MACA,WAAAT;AAAA,IAAA;AAAA,IAEF,CAACL,GAAOG,GAAaI,GAAWO,GAAYT,CAAS;AAAA,EAAA;AAGvD,SAAAa,EAAU,MAAM;AACV,IAAA,CAACnB,MAAuBC,KAAA,QAAAA,EAAO,cAEtBc;EAEZ,GAAA,CAACf,GAAqBC,GAAOc,CAAU,CAAC,GAG3CI,EAAU,MAAM;AACR,UAAAC,IAAgB,CAACC,MAAqB;AAC1C,MAAIA,EAAE,QAAQ,aAAYpB,KAAA,gBAAAA,EAAO,mBAAkB,MAAS,CAACK,KAChDS;IACb;AAGK,kBAAA,iBAAiB,WAAWK,CAAa,GAEzC,MAAM,OAAO,oBAAoB,WAAWA,CAAa;AAAA,EAC/D,GAAA,CAACnB,GAAOc,GAAYT,CAAS,CAAC,GAG9B,gBAAAgB,EAAAC,EAAa,UAAb,EAAsB,OAAON,GAC3B,UAAA;AAAA,IAAAnB;AAAA,IACAG,KAAU,gBAAAuB,EAAAC,GAAA,EAAM,OAAAxB,GAAc,WAAAK,GAAsB,SAASS,GAAY;AAAA,EAC5E,EAAA,CAAA;AAEJ,CAAC,GAEDW,IAAe9B;"}
@@ -1,154 +0,0 @@
1
- import o from "styled-components";
2
- const s = o.div(
3
- ({ theme: { colors: a }, $isClosing: t }) => `
4
- position: fixed;
5
- top: 0;
6
- left: 0;
7
- right: 0;
8
- bottom: 0;
9
- background-color: ${a.BLACK_T_60};
10
- backdrop-filter: blur(40px);
11
- display: flex;
12
- animation: ${t ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
13
-
14
- @keyframes backdropFadeIn {
15
- from {
16
- opacity: 0;
17
- }
18
- to {
19
- opacity: 1;
20
- }
21
- }
22
-
23
- @keyframes backdropFadeOut {
24
- from {
25
- opacity: 1;
26
- }
27
- to {
28
- opacity: 0;
29
- }
30
- }
31
- `
32
- ), l = o.div(
33
- ({ theme: { colors: a }, $isClosing: t, $width: i }) => `
34
- position: relative;
35
- align-self: center;
36
- margin: 0 auto;
37
- width: ${i};
38
- background-color: ${a.WHITE_1};
39
- border: 1px solid ${a.BLACK_1};
40
- transform-origin: center center;
41
- animation: ${t ? "modalDisappear" : "modalAppear"} 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
42
- box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);
43
-
44
- /* Responsive behavior for smaller screens */
45
- @media (max-width: calc(${i} + 80px)) {
46
- width: 100%;
47
- max-width: 100%;
48
- height: 100%;
49
- max-height: 100%;
50
- border: none;
51
- }
52
-
53
- @keyframes modalAppear {
54
- 0% {
55
- opacity: 0;
56
- transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);
57
- }
58
- 100% {
59
- opacity: 1;
60
- transform: perspective(1200px) translateZ(0) translateY(0) scale(1);
61
- }
62
- }
63
-
64
- @keyframes modalDisappear {
65
- 0% {
66
- opacity: 1;
67
- transform: perspective(1200px) translateZ(0) translateY(0) scale(1);
68
- }
69
- 100% {
70
- opacity: 0;
71
- transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);
72
- }
73
- }
74
- `
75
- ), c = o.div(
76
- ({ $modalWidth: a }) => `
77
- max-height: calc(100vh - 142px);
78
- overflow-y: auto;
79
-
80
- @media (max-width: calc(${a} + 80px)) {
81
- max-height: 100vh;
82
- }
83
- }`
84
- ), m = o.div(
85
- ({ theme: { colors: a }, $modalWidth: t }) => `
86
- position: absolute;
87
- top: -56px;
88
- right: -40px;
89
- color: ${a.WHITE_1};
90
- transition: all 0.2s ease;
91
-
92
- &:hover {
93
- transform: scale(1.05);
94
- }
95
-
96
- @media (max-width: calc(${t} + 80px)) {
97
- top: 16px;
98
- right: 16px;
99
- color: ${a.BLACK_1};
100
- }
101
- `
102
- ), e = 720, r = 800, n = 500, d = o.div(
103
- ({ $isClosing: a }) => `
104
- position: absolute;
105
- width: ${e}px;
106
- height: 100%;
107
- left: 50%;
108
- margin-left: ${-(e / 2)}px;
109
- clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);
110
- background: linear-gradient(
111
- 180deg,
112
- rgba(0, 0, 0, 1) 0%,
113
- rgba(0, 0, 0, 0) 100%
114
- );
115
- animation: openSpotlight;
116
- animation-duration: ${r}ms;
117
- animation-timing-function: linear;
118
- animation-fill-mode: forwards;
119
- opacity: 0;
120
- ${a ? `
121
- animation: closeSpotlight;
122
- animation-duration: ${n}ms;
123
- animation-timing-function: linear;
124
- animation-fill-mode: forwards;
125
- opacity: 1;
126
- ` : ""}
127
-
128
- @keyframes openSpotlight {
129
- from {
130
- opacity: 0;
131
- }
132
- to {
133
- opacity: 1;
134
- }
135
- }
136
-
137
- @keyframes closeSpotlight {
138
- from {
139
- transform: rotateY(0);
140
- }
141
- to {
142
- transform: rotateY(90deg);
143
- }
144
- }
145
- `
146
- );
147
- export {
148
- l as BaseModal,
149
- c as BaseModalContent,
150
- m as CloseButtonContainer,
151
- s as ModalContainer,
152
- d as SpotlightModal
153
- };
154
- //# sourceMappingURL=modal-styled.js.map
@@ -1 +0,0 @@
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 }, $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 \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 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 { ModalContainer, BaseModal, BaseModalContent, CloseButtonContainer, SpotlightModal };\n"],"names":["ModalContainer","styled","colors","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,YAAAC,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMnBD,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBC,IAAa,oBAAoB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBhE,GAKMC,IAAYH,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAC,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKH,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCC,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,IAAmBL,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAM,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBP,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAK,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BL,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGK,CAAW;AAAA;AAAA;AAAA,aAG1BL,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMO,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBX,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAE,EAAA,MAAiB;AAAA;AAAA,WAEXM,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDP,IACI;AAAA;AAAA,4BAEoBQ,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,19 +0,0 @@
1
- import { jsxs as t, jsx as o } from "react/jsx-runtime";
2
- import { memo as m } from "react";
3
- import h from "../../../assets/line-icons/icons/cross.js";
4
- import c from "../buttons/clickable/clickable.js";
5
- import { ModalContainer as r, SpotlightModal as f, BaseModal as C, CloseButtonContainer as p, BaseModalContent as $ } from "./modal-styled.js";
6
- const B = m(({ modal: n, isClosing: e = !1, onClose: s }) => {
7
- const { renderAs: d, element: l, modalWidth: i, isDismissable: a } = n;
8
- return d === "spotlight" ? /* @__PURE__ */ t(r, { $isClosing: e, children: [
9
- /* @__PURE__ */ o(f, { $isClosing: e }),
10
- l
11
- ] }) : /* @__PURE__ */ o(r, { $isClosing: e, children: /* @__PURE__ */ t(C, { $isClosing: e, $width: i, children: [
12
- a !== !1 && /* @__PURE__ */ o(p, { $modalWidth: i, children: /* @__PURE__ */ o(c, { label: "Close", onClick: s, children: /* @__PURE__ */ o(h, { width: 40, height: 40 }) }) }),
13
- /* @__PURE__ */ o($, { $modalWidth: i, children: l })
14
- ] }) });
15
- });
16
- export {
17
- B as default
18
- };
19
- //# sourceMappingURL=modal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>{element}</Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","jsxs","Styled.ModalContainer","jsx","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;AAaM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN;AAEzD,SAAIG,MAAa,cAEZ,gBAAAI,EAAAC,GAAA,EAAsB,YAAYP,GACjC,UAAA;AAAA,IAAA,gBAAAQ,EAACC,GAAA,EAAsB,YAAYT,EAAW,CAAA;AAAA,IAC7CG;AAAA,EACH,EAAA,CAAA,IAKD,gBAAAK,EAAAD,GAAA,EAAsB,YAAYP,GACjC,UAAC,gBAAAM,EAAAI,GAAA,EAAiB,YAAYV,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBM,GAAA,EAA4B,aAAaP,GACxC,4BAACQ,GAAU,EAAA,OAAM,SAAQ,SAASX,GAChC,4BAACY,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,sBAEDC,GAAA,EAAwB,aAAaV,GAAa,UAAQD,GAAA;AAAA,EAAA,EAC7D,CAAA,EACF,CAAA;AAEJ,CAAC;"}
@@ -1,10 +0,0 @@
1
- import { useContext as e } from "react";
2
- import n from "./modal-context.js";
3
- const l = () => {
4
- const { openModal: o, closeModal: t, isClosing: s } = e(n);
5
- return { openModal: o, closeModal: t, isClosing: s };
6
- }, c = l;
7
- export {
8
- c as default
9
- };
10
- //# sourceMappingURL=use-modal-actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-modal-actions.js","sources":["../../../../src/features/ui/modals/use-modal-actions.ts"],"sourcesContent":["import type { IUseModalActions } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalActions: IUseModalActions = () => {\n const { openModal, closeModal, isClosing } = useContext(ModalContext);\n\n return { openModal, closeModal, isClosing };\n};\n\nexport default useModalActions;\n"],"names":["useModalActions","openModal","closeModal","isClosing","useContext","ModalContext","useModalActions$1"],"mappings":";;AAMA,MAAMA,IAAoC,MAAM;AAC9C,QAAM,EAAE,WAAAC,GAAW,YAAAC,GAAY,WAAAC,EAAU,IAAIC,EAAWC,CAAY;AAE7D,SAAA,EAAE,WAAAJ,GAAW,YAAAC,GAAY,WAAAC;AAClC,GAEAG,IAAeN;"}
@@ -1,10 +0,0 @@
1
- import { useContext as a } from "react";
2
- import t from "./modal-context.js";
3
- const r = () => {
4
- const { modalParams: o } = a(t);
5
- return o;
6
- }, m = r;
7
- export {
8
- m as default
9
- };
10
- //# sourceMappingURL=use-modal-params.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-modal-params.js","sources":["../../../../src/features/ui/modals/use-modal-params.ts"],"sourcesContent":["import type { IUseModalParams } from './modal-types';\n\nimport { useContext } from 'react';\n\nimport ModalContext from './modal-context';\n\nconst useModalParams: IUseModalParams = <T = undefined>(): T => {\n const { modalParams } = useContext(ModalContext);\n\n return modalParams as T;\n};\n\nexport default useModalParams;\n"],"names":["useModalParams","modalParams","useContext","ModalContext","useModalParams$1"],"mappings":";;AAMA,MAAMA,IAAkC,MAAwB;AAC9D,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAWC,CAAY;AAExC,SAAAF;AACT,GAEAG,IAAeJ;"}