@cuemath/leap 3.3.30 → 3.3.31

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 (53) hide show
  1. package/dist/features/auth/pla-signup/pla-analytics-events.js +4 -2
  2. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  3. package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
  4. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
  5. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
  6. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
  7. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +74 -0
  8. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
  9. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +31 -29
  10. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  11. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
  12. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
  13. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
  14. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
  15. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
  16. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
  17. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
  18. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
  19. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +71 -0
  20. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
  21. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +119 -0
  22. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
  23. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +58 -0
  24. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
  25. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  26. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  27. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
  28. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
  29. package/dist/features/parent-dashboard/parent-dashboard-constants.js +5 -4
  30. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  31. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  32. package/dist/features/parent-dashboard/parent-dashboard-view.js +173 -149
  33. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  34. package/dist/index.d.ts +27 -1
  35. package/dist/index.js +140 -132
  36. package/dist/index.js.map +1 -1
  37. package/dist/node_modules/query-string/base.js +1 -1
  38. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
  39. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  40. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  41. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  42. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  43. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  44. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  45. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  46. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  47. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  48. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  49. package/package.json +2 -3
  50. package/dist/node_modules/decode-uri-component/index.js.map +0 -1
  51. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  52. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
  53. /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { PLUGINS as _ } from "../../../node_modules/@cuemath/analytics-v2/dist/constants.js";
2
- var s = /* @__PURE__ */ ((e) => (e.START_SIGNUP_CTA_CLICKED = "start_signup_cta_clicked", e.ECNA_STEP_VIEWED = "ecna_step_viewed", e.ECNA_RESPONSE_RECORDED_DEBUG = "ecna_response_recorded_debug", e.PARENT_SIGNUP_CTA_CLICKED = "parent_signup_cta_clicked", e.PARENT_SIGNUP_SUCCESSFUL = "parent_signup_successful", e.PARENT_SIGNUP_FAILED = "parent_signup_failed", e.STUDENT_SIGNUP_SUCCESSFUL = "signup_successful", e.STUDENT_SIGNUP_FAILED = "signup_failed", e.SIGNUP_OTP_ENTERED = "signup_otp_entered", e.SIGNUP_OTP_VERIFIED = "signup_otp_verified", e.SIGNUP_OTP_FAILED = "signup_otp_failed", e.SLOTS_SHOWN = "slots_shown", e.SLOT_DATE_SELECTED = "slot_date_selected", e.SLOT_TIME_SELECTED = "slot_time_selected", e.TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected", e))(s || {});
2
+ var s = /* @__PURE__ */ ((e) => (e.START_SIGNUP_CTA_CLICKED = "start_signup_cta_clicked", e.ECNA_STEP_VIEWED = "ecna_step_viewed", e.ECNA_RESPONSE_RECORDED_DEBUG = "ecna_response_recorded_debug", e.PARENT_SIGNUP_CTA_CLICKED = "parent_signup_cta_clicked", e.PARENT_SIGNUP_SUCCESSFUL = "parent_signup_successful", e.PARENT_SIGNUP_FAILED = "parent_signup_failed", e.STUDENT_SIGNUP_SUCCESSFUL = "signup_successful", e.STUDENT_SIGNUP_FAILED = "signup_failed", e.SIGNUP_OTP_ENTERED = "signup_otp_entered", e.SIGNUP_OTP_VERIFIED = "signup_otp_verified", e.SIGNUP_OTP_FAILED = "signup_otp_failed", e.SLOTS_SHOWN = "slots_shown", e.SLOT_DATE_SELECTED = "slot_date_selected", e.SLOT_TIME_SELECTED = "slot_time_selected", e.TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected", e.SUBSCRIPTION_CANCELLATION_FAILED = "subscription_cancellation_failed", e.SUBSCRIPTION_CANCELLATION_SUCCESSFUL = "subscription_cancellation_successful", e))(s || {});
3
3
  const n = {
4
4
  start_signup_cta_clicked: [_.MIXPANEL],
5
5
  ecna_step_viewed: [_.MIXPANEL],
@@ -15,7 +15,9 @@ const n = {
15
15
  slots_shown: [_.MIXPANEL],
16
16
  slot_date_selected: [_.MIXPANEL],
17
17
  slot_time_selected: [_.MIXPANEL],
18
- tutor_change_reason_selected: [_.MIXPANEL]
18
+ tutor_change_reason_selected: [_.MIXPANEL],
19
+ subscription_cancellation_failed: [_.MIXPANEL],
20
+ subscription_cancellation_successful: [_.MIXPANEL]
19
21
  };
20
22
  export {
21
23
  s as PLA_ANALYTICS_EVENTS,
@@ -1 +1 @@
1
- {"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n}\n\nexport const PLA_ANALYTICS_WHITELIST_EVENTS = {\n [PLA_ANALYTICS_EVENTS.START_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_STEP_VIEWED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_RESPONSE_RECORDED_DEBUG]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_ENTERED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_VERIFIED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOTS_SHOWN]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_DATE_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_TIME_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.TUTOR_CHANGE_REASON_SELECTED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLA_ANALYTICS_EVENTS","PLA_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,2BAA2B,4BAC3BA,EAAA,mBAAmB,oBACnBA,EAAA,+BAA+B,gCAC/BA,EAAA,4BAA4B,6BAC5BA,EAAA,2BAA2B,4BAC3BA,EAAA,uBAAuB,wBACvBA,EAAA,4BAA4B,qBAC5BA,EAAA,wBAAwB,iBACxBA,EAAA,qBAAqB,sBACrBA,EAAA,sBAAsB,uBACtBA,EAAA,oBAAoB,qBACpBA,EAAA,cAAc,eACdA,EAAA,qBAAqB,sBACrBA,EAAA,qBAAqB,sBACrBA,EAAA,+BAA+B,gCAfrBA,IAAAA,KAAA,CAAA,CAAA;AAkBL,MAAMC,IAAiC;AAAA,EAC3C,0BAAgD,CAACC,EAAQ,QAAQ;AAAA,EACjE,kBAAwC,CAACA,EAAQ,QAAQ;AAAA,EACzD,8BAAoD,CAACA,EAAQ,QAAQ;AAAA,EACrE,2BAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,0BAAgD,CAACA,EAAQ,QAAQ;AAAA,EACjE,sBAA4C,CAACA,EAAQ,QAAQ;AAAA,EAC7D,mBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,eAA6C,CAACA,EAAQ,QAAQ;AAAA,EAC9D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,qBAA2C,CAACA,EAAQ,QAAQ;AAAA,EAC5D,mBAAyC,CAACA,EAAQ,QAAQ;AAAA,EAC1D,aAAmC,CAACA,EAAQ,QAAQ;AAAA,EACpD,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,8BAAoD,CAACA,EAAQ,QAAQ;AACxE;"}
1
+ {"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n SUBSCRIPTION_CANCELLATION_FAILED = 'subscription_cancellation_failed',\n SUBSCRIPTION_CANCELLATION_SUCCESSFUL = 'subscription_cancellation_successful',\n}\n\nexport const PLA_ANALYTICS_WHITELIST_EVENTS = {\n [PLA_ANALYTICS_EVENTS.START_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_STEP_VIEWED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_RESPONSE_RECORDED_DEBUG]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_ENTERED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_VERIFIED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOTS_SHOWN]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_DATE_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_TIME_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.TUTOR_CHANGE_REASON_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLA_ANALYTICS_EVENTS","PLA_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,2BAA2B,4BAC3BA,EAAA,mBAAmB,oBACnBA,EAAA,+BAA+B,gCAC/BA,EAAA,4BAA4B,6BAC5BA,EAAA,2BAA2B,4BAC3BA,EAAA,uBAAuB,wBACvBA,EAAA,4BAA4B,qBAC5BA,EAAA,wBAAwB,iBACxBA,EAAA,qBAAqB,sBACrBA,EAAA,sBAAsB,uBACtBA,EAAA,oBAAoB,qBACpBA,EAAA,cAAc,eACdA,EAAA,qBAAqB,sBACrBA,EAAA,qBAAqB,sBACrBA,EAAA,+BAA+B,gCAC/BA,EAAA,mCAAmC,oCACnCA,EAAA,uCAAuC,wCAjB7BA,IAAAA,KAAA,CAAA,CAAA;AAoBL,MAAMC,IAAiC;AAAA,EAC3C,0BAAgD,CAACC,EAAQ,QAAQ;AAAA,EACjE,kBAAwC,CAACA,EAAQ,QAAQ;AAAA,EACzD,8BAAoD,CAACA,EAAQ,QAAQ;AAAA,EACrE,2BAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,0BAAgD,CAACA,EAAQ,QAAQ;AAAA,EACjE,sBAA4C,CAACA,EAAQ,QAAQ;AAAA,EAC7D,mBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,eAA6C,CAACA,EAAQ,QAAQ;AAAA,EAC9D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,qBAA2C,CAACA,EAAQ,QAAQ;AAAA,EAC5D,mBAAyC,CAACA,EAAQ,QAAQ;AAAA,EAC1D,aAAmC,CAACA,EAAQ,QAAQ;AAAA,EACpD,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,8BAAoD,CAACA,EAAQ,QAAQ;AAAA,EACrE,kCAAwD,CAACA,EAAQ,QAAQ;AAAA,EACzE,sCAA4D,CAACA,EAAQ,QAAQ;AAChF;"}
@@ -0,0 +1,9 @@
1
+ import { createPatchAPI as c } from "@cuemath/rest-api";
2
+ import { BASE_URL_V1 as e } from "../../../constants/api.js";
3
+ const { usePatch: s } = c({
4
+ getURL: (t) => `${e}/students/${t}/cancel-subscription`
5
+ });
6
+ export {
7
+ s as useCancelSubscriptionPatch
8
+ };
9
+ //# sourceMappingURL=cancel-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-subscription.js","sources":["../../../../src/features/parent-dashboard/api/cancel-subscription.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\n\nconst { usePatch: useCancelSubscriptionPatch } = createPatchAPI({\n getURL: studentId => `${BASE_URL_V1}/students/${studentId}/cancel-subscription`,\n});\n\nexport { useCancelSubscriptionPatch };\n"],"names":["useCancelSubscriptionPatch","createPatchAPI","studentId","BASE_URL_V1"],"mappings":";;AAIA,MAAM,EAAE,UAAUA,EAA2B,IAAIC,EAAe;AAAA,EAC9D,QAAQ,CAAAC,MAAa,GAAGC,CAAW,aAAaD,CAAS;AAC3D,CAAC;"}
@@ -0,0 +1,20 @@
1
+ import o from "styled-components";
2
+ import t from "../../../../assets/line-icons/icons/more-vertical.js";
3
+ import e from "../../../ui/layout/flex-view.js";
4
+ const l = o(t)(
5
+ ({ theme: r }) => `
6
+ cursor: pointer;
7
+ path {
8
+ stroke: ${r.colors.WHITE};
9
+ }
10
+ `
11
+ );
12
+ o(e)`
13
+ top: 0;
14
+ right: 32px;
15
+ z-index: 100;
16
+ `;
17
+ export {
18
+ l as StyledVerticalMenu
19
+ };
20
+ //# sourceMappingURL=billing-information-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-information-styled.js","sources":["../../../../../src/features/parent-dashboard/comps/billing-information/billing-information-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst StyledVerticalMenu = styled(MoreVerticalIcon)(\n ({ theme }) => `\n cursor: pointer;\n path {\n stroke: ${theme.colors.WHITE};\n }\n `,\n);\n\nconst DropdownMenu = styled(FlexView)`\n top: 0;\n right: 32px;\n z-index: 100;\n`;\n\nexport { StyledVerticalMenu, DropdownMenu };\n"],"names":["StyledVerticalMenu","styled","MoreVerticalIcon","theme","FlexView"],"mappings":";;;AAKM,MAAAA,IAAqBC,EAAOC,CAAgB;AAAA,EAChD,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA;AAAA;AAAA,gBAGDA,EAAM,OAAO,KAAK;AAAA;AAAA;AAGlC;AAEqBF,EAAOG,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,74 @@
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { memo as s } from "react";
3
+ import { useTheme as p } from "styled-components";
4
+ import l from "../../../ui/buttons/clickable/clickable.js";
5
+ import b from "../../../ui/context-menu/context-menu.js";
6
+ import t from "../../../ui/layout/flex-view.js";
7
+ import f from "../../../ui/separator/separator.js";
8
+ import n from "../../../ui/text/text.js";
9
+ import { EDeviceType as h } from "../../../ui/theme/constants.js";
10
+ import { StyledVerticalMenu as C } from "./billing-information-styled.js";
11
+ const M = s(
12
+ ({ billingDetails: c, onViewPaymentMethod: i, onCancelSubscription: d }) => {
13
+ const { amount: m, cycle_frequency: a, next_due_date: u } = c, { device: $ } = p(), r = $ <= h.MOBILE;
14
+ return /* @__PURE__ */ o(t, { children: [
15
+ /* @__PURE__ */ e(n, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Billing Information" }),
16
+ /* @__PURE__ */ e(f, { height: 20 }),
17
+ /* @__PURE__ */ o(
18
+ t,
19
+ {
20
+ $flexDirection: "row",
21
+ $justifyContent: "space-between",
22
+ $alignItems: "center",
23
+ $gap: r ? 16 : 24,
24
+ $gutter: r ? 16 : 24,
25
+ $background: "BLACK_2",
26
+ $borderColor: r ? "WHITE" : "BLACK_5",
27
+ onClick: r ? i : void 0,
28
+ children: [
29
+ /* @__PURE__ */ o(t, { $flexGap: 12, children: [
30
+ /* @__PURE__ */ o(n, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "PURPLE_4", children: [
31
+ a,
32
+ " PLAN"
33
+ ] }),
34
+ /* @__PURE__ */ o(n, { $renderAs: r ? "ub3" : "ub2", $color: "WHITE", children: [
35
+ "$",
36
+ m,
37
+ " payment due on ",
38
+ u
39
+ ] })
40
+ ] }),
41
+ r ? null : /* @__PURE__ */ e(
42
+ b,
43
+ {
44
+ menuWidth: 180,
45
+ targetElement: /* @__PURE__ */ e(C, { height: 24, width: 24 }),
46
+ menuElement: /* @__PURE__ */ o(
47
+ t,
48
+ {
49
+ $position: "absolute",
50
+ $background: "BLACK_4",
51
+ $borderColor: "BLACK_5",
52
+ $gapX: 1,
53
+ $gutterX: 1,
54
+ $flexGap: 12,
55
+ children: [
56
+ /* @__PURE__ */ e(l, { onClick: i, label: "View Payment Method", children: /* @__PURE__ */ e(n, { $renderAs: "ub3", $cursor: "pointer", $color: "WHITE", children: "View Payment Method" }) }),
57
+ /* @__PURE__ */ e(l, { onClick: d, label: "Cancel Subscription", children: /* @__PURE__ */ e(n, { $renderAs: "ub3", $cursor: "pointer", $color: "ORANGE_5", children: "Cancel Subscription" }) })
58
+ ]
59
+ }
60
+ ),
61
+ menuOffset: -24,
62
+ menuZIndex: 1
63
+ }
64
+ )
65
+ ]
66
+ }
67
+ )
68
+ ] });
69
+ }
70
+ );
71
+ export {
72
+ M as default
73
+ };
74
+ //# sourceMappingURL=billing-information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing-information.js","sources":["../../../../../src/features/parent-dashboard/comps/billing-information/billing-information.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Clickable from '../../../ui/buttons/clickable/clickable';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport * as Styled from './billing-information-styled';\nimport { type IBillingInformationProps } from './billing-information-types';\n\nconst BillingInformation: FC<IBillingInformationProps> = memo(\n ({ billingDetails, onViewPaymentMethod, onCancelSubscription }) => {\n const { amount, cycle_frequency: cycleFrequency, next_due_date: nextDueDate } = billingDetails;\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Billing Information\n </Text>\n <Separator height={20} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gap={isMobile ? 16 : 24}\n $gutter={isMobile ? 16 : 24}\n $background=\"BLACK_2\"\n $borderColor={isMobile ? 'WHITE' : 'BLACK_5'}\n onClick={isMobile ? onViewPaymentMethod : undefined}\n >\n <FlexView $flexGap={12}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"PURPLE_4\">\n {cycleFrequency} PLAN\n </Text>\n <Text $renderAs={isMobile ? 'ub3' : 'ub2'} $color=\"WHITE\">\n ${amount} payment due on {nextDueDate}\n </Text>\n </FlexView>\n\n {isMobile ? null : (\n <ContextMenu\n menuWidth={180}\n targetElement={<Styled.StyledVerticalMenu height={24} width={24} />}\n menuElement={\n <FlexView\n $position=\"absolute\"\n $background=\"BLACK_4\"\n $borderColor=\"BLACK_5\"\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n >\n <Clickable onClick={onViewPaymentMethod} label=\"View Payment Method\">\n <Text $renderAs=\"ub3\" $cursor=\"pointer\" $color=\"WHITE\">\n View Payment Method\n </Text>\n </Clickable>\n <Clickable onClick={onCancelSubscription} label=\"Cancel Subscription\">\n <Text $renderAs=\"ub3\" $cursor=\"pointer\" $color=\"ORANGE_5\">\n Cancel Subscription\n </Text>\n </Clickable>\n </FlexView>\n }\n menuOffset={-24}\n menuZIndex={1}\n />\n )}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nexport default BillingInformation;\n"],"names":["BillingInformation","memo","billingDetails","onViewPaymentMethod","onCancelSubscription","amount","cycleFrequency","nextDueDate","device","useTheme","isMobile","EDeviceType","FlexView","jsx","Text","Separator","jsxs","ContextMenu","Styled.StyledVerticalMenu","Clickable"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAmDC;AAAA,EACvD,CAAC,EAAE,gBAAAC,GAAgB,qBAAAC,GAAqB,sBAAAC,QAA2B;AACjE,UAAM,EAAE,QAAAC,GAAQ,iBAAiBC,GAAgB,eAAeC,EAAgB,IAAAL,GAE1E,EAAE,QAAAM,MAAWC,KACbC,IAAWF,KAAUG,EA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,WAAU,QAAO,SAAQ,gCAEvD,CAAA,GACF;AAAA,sBACC,gBAAAD,EAAAM,GAAA,EAAU,SAASf,GAAsB,OAAM,uBAC9C,UAAA,gBAAAS,EAACC,GAAK,EAAA,WAAU,OAAM,SAAQ,WAAU,QAAO,YAAW,gCAE1D,CAAA,GACF;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAEF,YAAY;AAAA,gBACZ,YAAY;AAAA,cAAA;AAAA,YACd;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
@@ -1,53 +1,55 @@
1
- import { useMemo as p } from "react";
2
- import { useParentHomeGet as P } from "../api/parent-home.js";
3
- import { DEFAULT_LOADING_STATE as R, SUBSCRIPTION_CANCELLED_STATES as f, TRIAL_COMPLETED_STATES as M, PLA_INTRO_ELIGIBLE_STATES as h } from "../parent-dashboard-constants.js";
1
+ import { useMemo as P } from "react";
2
+ import { useParentHomeGet as R } from "../api/parent-home.js";
3
+ import { DEFAULT_LOADING_STATE as f, SUBSCRIPTION_CANCELLED_STATES as g, TRIAL_COMPLETED_STATES as M, PLA_INTRO_ELIGIBLE_STATES as h } from "../parent-dashboard-constants.js";
4
4
  import { EPLAState as e } from "../parent-dashboard-types.js";
5
- const g = (_) => {
6
- const { data: t, isProcessingFailed: n } = P(_);
7
- return p(() => {
5
+ const G = (_) => {
6
+ const { data: t, isProcessingFailed: o } = R(_);
7
+ return P(() => {
8
8
  if (!(t != null && t.pla_state))
9
9
  return {
10
- ...R,
11
- isProcessingFailed: n
10
+ ...f,
11
+ isProcessingFailed: o
12
12
  };
13
13
  const {
14
- teacher_details: o,
14
+ teacher_details: n,
15
15
  session_details: i,
16
+ billing_details: l,
16
17
  pla_state: s
17
18
  } = t, {
18
19
  completed_sessions: r = 0,
19
20
  next_session_end: c = 0,
20
- next_session_start: l = 0,
21
+ next_session_start: d = 0,
21
22
  upcoming_sessions: T = [],
22
- student_demo_id: d = null,
23
- user_attempt_id: E = null
24
- } = i ?? {}, m = o ? `${o.first_name || ""} ${o.last_name || ""}`.trim() : "", S = s === e.TRIAL_COMPLETED_CARD_DECLINED, L = s === e.NO_CARD_ON_FILE, u = f.includes(s), A = s === e.TRIAL_TUTOR_NO_SHOW, D = s === e.TRIAL_STUDENT_NO_SHOW, a = M.includes(s), C = a && s !== e.REGULAR_CLASS_COMPLETED, I = s === e.REGULAR_CLASS_COMPLETED, N = s === e.TRIAL_COMPLETED_PAYMENT_PENDING, O = h.includes(s);
23
+ student_demo_id: E = null,
24
+ user_attempt_id: m = null
25
+ } = i ?? {}, S = n ? `${n.first_name || ""} ${n.last_name || ""}`.trim() : "", L = s === e.TRIAL_COMPLETED_CARD_DECLINED, u = s === e.NO_CARD_ON_FILE, A = g.includes(s), D = s === e.TRIAL_TUTOR_NO_SHOW, C = s === e.TRIAL_STUDENT_NO_SHOW, a = M.includes(s), I = a && s !== e.REGULAR_CLASS_COMPLETED, N = s === e.REGULAR_CLASS_COMPLETED, O = s === e.TRIAL_COMPLETED_PAYMENT_PENDING, p = h.includes(s);
25
26
  return {
26
27
  plaState: s,
27
28
  sessionDetails: i,
28
- teacherDetails: o,
29
- teacherName: m,
29
+ teacherDetails: n,
30
+ billingDetails: l,
31
+ teacherName: S,
30
32
  completedSessions: r,
31
33
  nextSessionEnd: c,
32
- nextSessionStart: l,
34
+ nextSessionStart: d,
33
35
  upcomingSessions: T,
34
36
  isTrialDone: a,
35
- isOnlyTrialDone: C,
36
- isRegularClassDone: I,
37
- isCardDeclined: S,
38
- isSubscriptionCancelled: u,
39
- cardOnFileNotAvailable: L,
40
- isTutorNoShow: A,
41
- isStudentNoShow: D,
37
+ isOnlyTrialDone: I,
38
+ isRegularClassDone: N,
39
+ isCardDeclined: L,
40
+ isSubscriptionCancelled: A,
41
+ cardOnFileNotAvailable: u,
42
+ isTutorNoShow: D,
43
+ isStudentNoShow: C,
42
44
  showLoading: !1,
43
- demoId: d,
44
- userAttemptId: E,
45
+ demoId: E,
46
+ userAttemptId: m,
45
47
  isProcessingFailed: !1,
46
- canChangeTutor: N,
47
- showPLAIntroduction: O
48
+ canChangeTutor: O,
49
+ showPLAIntroduction: p
48
50
  };
49
- }, [t, n]);
50
- }, w = g;
51
+ }, [t, o]);
52
+ }, w = G;
51
53
  export {
52
54
  w as default
53
55
  };
@@ -1 +1 @@
1
- {"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type { IUseParentHomeDataReturn } from '../parent-dashboard-types';\n\nimport { useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\nimport {\n DEFAULT_LOADING_STATE,\n PLA_INTRO_ELIGIBLE_STATES,\n SUBSCRIPTION_CANCELLED_STATES,\n TRIAL_COMPLETED_STATES,\n} from '../parent-dashboard-constants';\nimport { EPLAState } from '../parent-dashboard-types';\n\n/**\n * Hook to consume processed parent home data.\n * - Automatically fetches on mount and when stale using useFetchParentHome() at <ParentRoutesWrapper/>.\n * - Use this to **read** parent home data.\n */\n\nconst useParentHomeData = (studentId: string): IUseParentHomeDataReturn => {\n const { data: parentHomeData, isProcessingFailed } = useParentHomeGet(studentId);\n\n const parentHomeDataMemoised = useMemo(() => {\n if (!parentHomeData?.pla_state) {\n return {\n ...DEFAULT_LOADING_STATE,\n isProcessingFailed,\n };\n }\n\n const {\n teacher_details: teacherDetails,\n session_details: sessionDetails,\n pla_state: plaState,\n } = parentHomeData;\n\n const {\n completed_sessions: completedSessions = 0,\n next_session_end: nextSessionEnd = 0,\n next_session_start: nextSessionStart = 0,\n upcoming_sessions: upcomingSessions = [],\n student_demo_id: demoId = null,\n user_attempt_id: userAttemptId = null,\n } = sessionDetails ?? {};\n\n const teacherName = teacherDetails\n ? `${teacherDetails.first_name || ''} ${teacherDetails.last_name || ''}`.trim()\n : '';\n\n const isCardDeclined = plaState === EPLAState.TRIAL_COMPLETED_CARD_DECLINED;\n const cardOnFileNotAvailable = plaState === EPLAState.NO_CARD_ON_FILE;\n const isSubscriptionCancelled = SUBSCRIPTION_CANCELLED_STATES.includes(plaState);\n\n const isTutorNoShow = plaState === EPLAState.TRIAL_TUTOR_NO_SHOW;\n const isStudentNoShow = plaState === EPLAState.TRIAL_STUDENT_NO_SHOW;\n const isTrialDone = TRIAL_COMPLETED_STATES.includes(plaState);\n const isOnlyTrialDone = isTrialDone && plaState !== EPLAState.REGULAR_CLASS_COMPLETED;\n const isRegularClassDone = plaState === EPLAState.REGULAR_CLASS_COMPLETED;\n const canChangeTutor = plaState === EPLAState.TRIAL_COMPLETED_PAYMENT_PENDING;\n\n const showPLAIntroduction = PLA_INTRO_ELIGIBLE_STATES.includes(plaState);\n\n return {\n plaState,\n sessionDetails,\n teacherDetails,\n teacherName,\n completedSessions,\n nextSessionEnd,\n nextSessionStart,\n upcomingSessions,\n isTrialDone,\n isOnlyTrialDone,\n isRegularClassDone,\n isCardDeclined,\n isSubscriptionCancelled,\n cardOnFileNotAvailable,\n isTutorNoShow,\n isStudentNoShow,\n showLoading: false,\n demoId,\n userAttemptId,\n isProcessingFailed: false,\n canChangeTutor,\n showPLAIntroduction,\n };\n }, [parentHomeData, isProcessingFailed]);\n\n return parentHomeDataMemoised;\n};\n\nexport default useParentHomeData;\n"],"names":["useParentHomeData","studentId","parentHomeData","isProcessingFailed","useParentHomeGet","useMemo","DEFAULT_LOADING_STATE","teacherDetails","sessionDetails","plaState","completedSessions","nextSessionEnd","nextSessionStart","upcomingSessions","demoId","userAttemptId","teacherName","isCardDeclined","EPLAState","cardOnFileNotAvailable","isSubscriptionCancelled","SUBSCRIPTION_CANCELLED_STATES","isTutorNoShow","isStudentNoShow","isTrialDone","TRIAL_COMPLETED_STATES","isOnlyTrialDone","isRegularClassDone","canChangeTutor","showPLAIntroduction","PLA_INTRO_ELIGIBLE_STATES","useParentHomeData$1"],"mappings":";;;;AAmBA,MAAMA,IAAoB,CAACC,MAAgD;AACzE,QAAM,EAAE,MAAMC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AA,MACA,aAAa;AAAA,MACb,QAAAT;AAAA,MACA,eAAAC;AAAA,MACA,oBAAoB;AAAA,MACpB,gBAAAa;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EACF,GACC,CAAC3B,GAAgBC,CAAkB,CAAC;AAGzC,GAEA4B,IAAe/B;"}
1
+ {"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type { IUseParentHomeDataReturn } from '../parent-dashboard-types';\n\nimport { useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\nimport {\n DEFAULT_LOADING_STATE,\n PLA_INTRO_ELIGIBLE_STATES,\n SUBSCRIPTION_CANCELLED_STATES,\n TRIAL_COMPLETED_STATES,\n} from '../parent-dashboard-constants';\nimport { EPLAState } from '../parent-dashboard-types';\n\n/**\n * Hook to consume processed parent home data.\n * - Automatically fetches on mount and when stale using useFetchParentHome() at <ParentRoutesWrapper/>.\n * - Use this to **read** parent home data.\n */\n\nconst useParentHomeData = (studentId: string): IUseParentHomeDataReturn => {\n const { data: parentHomeData, isProcessingFailed } = useParentHomeGet(studentId);\n\n const parentHomeDataMemoised = useMemo(() => {\n if (!parentHomeData?.pla_state) {\n return {\n ...DEFAULT_LOADING_STATE,\n isProcessingFailed,\n };\n }\n\n const {\n teacher_details: teacherDetails,\n session_details: sessionDetails,\n billing_details: billingDetails,\n pla_state: plaState,\n } = parentHomeData;\n\n const {\n completed_sessions: completedSessions = 0,\n next_session_end: nextSessionEnd = 0,\n next_session_start: nextSessionStart = 0,\n upcoming_sessions: upcomingSessions = [],\n student_demo_id: demoId = null,\n user_attempt_id: userAttemptId = null,\n } = sessionDetails ?? {};\n\n const teacherName = teacherDetails\n ? `${teacherDetails.first_name || ''} ${teacherDetails.last_name || ''}`.trim()\n : '';\n\n const isCardDeclined = plaState === EPLAState.TRIAL_COMPLETED_CARD_DECLINED;\n const cardOnFileNotAvailable = plaState === EPLAState.NO_CARD_ON_FILE;\n const isSubscriptionCancelled = SUBSCRIPTION_CANCELLED_STATES.includes(plaState);\n\n const isTutorNoShow = plaState === EPLAState.TRIAL_TUTOR_NO_SHOW;\n const isStudentNoShow = plaState === EPLAState.TRIAL_STUDENT_NO_SHOW;\n const isTrialDone = TRIAL_COMPLETED_STATES.includes(plaState);\n const isOnlyTrialDone = isTrialDone && plaState !== EPLAState.REGULAR_CLASS_COMPLETED;\n const isRegularClassDone = plaState === EPLAState.REGULAR_CLASS_COMPLETED;\n const canChangeTutor = plaState === EPLAState.TRIAL_COMPLETED_PAYMENT_PENDING;\n\n const showPLAIntroduction = PLA_INTRO_ELIGIBLE_STATES.includes(plaState);\n\n return {\n plaState,\n sessionDetails,\n teacherDetails,\n billingDetails,\n teacherName,\n completedSessions,\n nextSessionEnd,\n nextSessionStart,\n upcomingSessions,\n isTrialDone,\n isOnlyTrialDone,\n isRegularClassDone,\n isCardDeclined,\n isSubscriptionCancelled,\n cardOnFileNotAvailable,\n isTutorNoShow,\n isStudentNoShow,\n showLoading: false,\n demoId,\n userAttemptId,\n isProcessingFailed: false,\n canChangeTutor,\n showPLAIntroduction,\n };\n }, [parentHomeData, isProcessingFailed]);\n\n return parentHomeDataMemoised;\n};\n\nexport default useParentHomeData;\n"],"names":["useParentHomeData","studentId","parentHomeData","isProcessingFailed","useParentHomeGet","useMemo","DEFAULT_LOADING_STATE","teacherDetails","sessionDetails","billingDetails","plaState","completedSessions","nextSessionEnd","nextSessionStart","upcomingSessions","demoId","userAttemptId","teacherName","isCardDeclined","EPLAState","cardOnFileNotAvailable","isSubscriptionCancelled","SUBSCRIPTION_CANCELLED_STATES","isTutorNoShow","isStudentNoShow","isTrialDone","TRIAL_COMPLETED_STATES","isOnlyTrialDone","isRegularClassDone","canChangeTutor","showPLAIntroduction","PLA_INTRO_ELIGIBLE_STATES","useParentHomeData$1"],"mappings":";;;;AAmBA,MAAMA,IAAoB,CAACC,MAAgD;AACzE,QAAM,EAAE,MAAMC,GAAgB,oB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AAAG;AAAA,MACA,iBAAAC;AAAA,MACA,aAAa;AAAA,MACb,QAAAT;AAAA,MACA,eAAAC;AAAA,MACA,oBAAoB;AAAA,MACpB,gBAAAa;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EACF,GACC,CAAC5B,GAAgBC,CAAkB,CAAC;AAGzC,GAEA6B,IAAehC;"}
@@ -0,0 +1,21 @@
1
+ const e = {
2
+ title: "Wait! Weʼve found the perfect tutor for your child. Sure you want to cancel?",
3
+ consequences: [
4
+ "Your first session will be cancelled",
5
+ "Youʼll lose access to the student platform",
6
+ "Youʼll have to go through the signup process again"
7
+ ]
8
+ }, t = {
9
+ title: "Wait! Weʼve almost found the perfect tutor. Sure you want to cancel?",
10
+ consequences: [
11
+ "Youʼll lose this perfect tutor match",
12
+ "Your first session will be cancelled",
13
+ "You'll lose access to the student platform",
14
+ "Youʼll have to go through the signup process again"
15
+ ]
16
+ };
17
+ export {
18
+ t as cancelSubscriptionNoTutor,
19
+ e as cancelSubscriptionWithTutor
20
+ };
21
+ //# sourceMappingURL=cancel-subscription-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-subscription-constants.js","sources":["../../../../../src/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.ts"],"sourcesContent":["export const cancelSubscriptionWithTutor = {\n title: 'Wait! Weʼve found the perfect tutor for your child. Sure you want to cancel?',\n consequences: [\n 'Your first session will be cancelled',\n 'Youʼll lose access to the student platform',\n 'Youʼll have to go through the signup process again',\n ],\n};\n\nexport const cancelSubscriptionNoTutor = {\n title: 'Wait! Weʼve almost found the perfect tutor. Sure you want to cancel?',\n consequences: [\n 'Youʼll lose this perfect tutor match',\n 'Your first session will be cancelled',\n \"You'll lose access to the student platform\",\n 'Youʼll have to go through the signup process again',\n ],\n};\n"],"names":["cancelSubscriptionWithTutor","cancelSubscriptionNoTutor"],"mappings":"AAAO,MAAMA,IAA8B;AAAA,EACzC,OAAO;AAAA,EACP,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GAEaC,IAA4B;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;"}
@@ -0,0 +1,85 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { memo as g } from "react";
3
+ import { useTheme as w } from "styled-components";
4
+ import T from "../../../../assets/line-icons/icons/cross.js";
5
+ import c from "../../../ui/buttons/text-button/text-button.js";
6
+ import o from "../../../ui/layout/flex-view.js";
7
+ import X from "../../../ui/modals/use-modal-params.js";
8
+ import n from "../../../ui/separator/separator.js";
9
+ import i from "../../../ui/text/text.js";
10
+ import { EDeviceType as x } from "../../../ui/theme/constants.js";
11
+ import { cancelSubscriptionWithTutor as A, cancelSubscriptionNoTutor as C } from "./cancel-subscription-constants.js";
12
+ const E = g(() => {
13
+ const { withTutor: a, studentName: u, isTrialDone: h, onSwitchTutor: d, onReschedule: $, onCancel: l } = X(), { device: b } = w(), t = b <= x.MOBILE, f = a ? A : C, { title: m, consequences: p } = f;
14
+ return h ? /* @__PURE__ */ r(o, { $gapX: t ? 1.5 : 2.5, $gutterX: t ? 1 : 2.5, $background: "BLACK_2", children: [
15
+ /* @__PURE__ */ e(i, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Before you cancel - is this about the tutor?" }),
16
+ /* @__PURE__ */ e(n, { heightX: 0.75 }),
17
+ /* @__PURE__ */ r(i, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: [
18
+ "This is exactly why we offer a tutor match guarantee. It's completely okay if the first tutor wasn't the right fit - with our extensive network, we're confident we can find",
19
+ " ",
20
+ u,
21
+ "'s ideal tutor."
22
+ ] }),
23
+ /* @__PURE__ */ e(n, { heightX: 0.75 }),
24
+ /* @__PURE__ */ e(i, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: "Do you want to try a session with another tutor? We won’t charge you for it." }),
25
+ /* @__PURE__ */ e(n, { heightX: 2.5 }),
26
+ /* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 1.5, children: [
27
+ /* @__PURE__ */ e(
28
+ c,
29
+ {
30
+ size: "regular",
31
+ label: t ? "Cancel subscription" : "No, cancel subscription",
32
+ color: "ORANGE_4",
33
+ onClick: l
34
+ }
35
+ ),
36
+ /* @__PURE__ */ e(
37
+ c,
38
+ {
39
+ size: "regular",
40
+ label: t ? "Switch tutor" : "Yes, try another tutor",
41
+ color: "WHITE",
42
+ onClick: d
43
+ }
44
+ )
45
+ ] })
46
+ ] }) : /* @__PURE__ */ r(o, { $gapX: t ? 1.5 : 2.5, $gutterX: t ? 1 : 2.5, $background: "BLACK_2", children: [
47
+ /* @__PURE__ */ e(i, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: m }),
48
+ /* @__PURE__ */ e(n, { heightX: 0.75 }),
49
+ /* @__PURE__ */ r(o, { $flexGapX: 0.75, children: [
50
+ /* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", children: "If you decide to cancel:" }),
51
+ p.map((s) => /* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 0.5, children: [
52
+ /* @__PURE__ */ e(
53
+ o,
54
+ {
55
+ $justifyContent: "center",
56
+ $alignItems: "center",
57
+ $background: "ORANGE_4",
58
+ $borderRadiusX: 0.5,
59
+ $widthX: 1,
60
+ $heightX: 1,
61
+ children: /* @__PURE__ */ e(T, {})
62
+ }
63
+ ),
64
+ /* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", children: s })
65
+ ] }, s))
66
+ ] }),
67
+ /* @__PURE__ */ e(n, { heightX: 2.5 }),
68
+ /* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 1.5, children: [
69
+ /* @__PURE__ */ e(
70
+ c,
71
+ {
72
+ size: "regular",
73
+ label: "Cancel subscription",
74
+ color: "ORANGE_4",
75
+ onClick: l
76
+ }
77
+ ),
78
+ /* @__PURE__ */ e(c, { size: "regular", label: "Reschedule", color: "WHITE", onClick: $ })
79
+ ] })
80
+ ] });
81
+ }), R = E;
82
+ export {
83
+ R as default
84
+ };
85
+ //# sourceMappingURL=cancel-subscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancel-subscription.js","sources":["../../../../../src/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.tsx"],"sourcesContent":["import type { ICancelSubscriptionProps } from './cancel-subscription-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport {\n cancelSubscriptionNoTutor,\n cancelSubscriptionWithTutor,\n} from './cancel-subscription-constants';\n\nconst CancelSubscription = memo(() => {\n const { withTutor, studentName, isTrialDone, onSwitchTutor, onReschedule, onCancel } =\n useModalParams<ICancelSubscriptionProps>();\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const config = withTutor ? cancelSubscriptionWithTutor : cancelSubscriptionNoTutor;\n const { title, consequences } = config;\n\n if (isTrialDone) {\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Before you cancel - is this about the tutor?\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n This is exactly why we offer a tutor match guarantee. It's completely okay if the first\n tutor wasn't the right fit - with our extensive network, we're confident we can find{' '}\n {studentName}'s ideal tutor.\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n Do you want to try a session with another tutor? We won’t charge you for it.\n </Text>\n <Separator heightX={2.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <TextButton\n size=\"regular\"\n label={isMobile ? 'Cancel subscription' : 'No, cancel subscription'}\n color=\"ORANGE_4\"\n onClick={onCancel}\n />\n <TextButton\n size=\"regular\"\n label={isMobile ? 'Switch tutor' : 'Yes, try another tutor'}\n color=\"WHITE\"\n onClick={onSwitchTutor}\n />\n </FlexView>\n </FlexView>\n );\n }\n\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator heightX={0.75} />\n <FlexView $flexGapX={0.75}>\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n If you decide to cancel:\n </Text>\n {consequences.map(item => (\n <FlexView key={item} $flexDirection=\"row\" $flexGapX={0.5}>\n <FlexView\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $background=\"ORANGE_4\"\n $borderRadiusX={0.5}\n $widthX={1}\n $heightX={1}\n >\n <CrossIcon />\n </FlexView>\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {item}\n </Text>\n </FlexView>\n ))}\n </FlexView>\n <Separator heightX={2.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <TextButton\n size=\"regular\"\n label=\"Cancel subscription\"\n color=\"ORANGE_4\"\n onClick={onCancel}\n />\n <TextButton size=\"regular\" label=\"Reschedule\" color=\"WHITE\" onClick={onReschedule} />\n </FlexView>\n </FlexView>\n );\n});\n\nexport default CancelSubscription;\n"],"names":["CancelSubscription","memo","withTutor","studentName","isTrialDone","onSwitchTutor","onReschedule","onCancel","useModalParams","device","useTheme","isMobile","EDeviceType","config","cancelSubscriptionWithTutor","cancelSubscriptionN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a,EAACG,KAAW,MAAK,WAAU,OAAM,cAAa,OAAM,SAAQ,SAASjB,EAAc,CAAA;AAAA,IAAA,GACrF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDoB,IAAe1B;"}
@@ -0,0 +1,23 @@
1
+ import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
+ import { memo as c } from "react";
3
+ import { useTheme as a } from "styled-components";
4
+ import l from "../../../ui/buttons/text-button/text-button.js";
5
+ import m from "../../../ui/layout/flex-view.js";
6
+ import u from "../../../ui/modals/use-modal-actions.js";
7
+ import r from "../../../ui/separator/separator.js";
8
+ import t from "../../../ui/text/text.js";
9
+ import { EDeviceType as d } from "../../../ui/theme/constants.js";
10
+ const p = c(() => {
11
+ const { closeModal: i } = u(), { device: n } = a(), e = n <= d.MOBILE;
12
+ return /* @__PURE__ */ s(m, { $gapX: e ? 1.5 : 2.5, $gutterX: e ? 1 : 2.5, $background: "BLACK_2", children: [
13
+ /* @__PURE__ */ o(t, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "ORANGE_4", children: "Your subscription has been cancelled" }),
14
+ /* @__PURE__ */ o(r, { heightX: 0.75 }),
15
+ /* @__PURE__ */ o(t, { $renderAs: "ub3", $color: "WHITE", children: "We won't charge your card. If you change your mind, you can always restart the signup process by visiting our website." }),
16
+ /* @__PURE__ */ o(r, { heightX: 2.5 }),
17
+ /* @__PURE__ */ o(l, { size: "regular", label: "Close", color: "WHITE", onClick: i })
18
+ ] });
19
+ }), T = p;
20
+ export {
21
+ T as default
22
+ };
23
+ //# sourceMappingURL=cancellation-confirmation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-confirmation.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\n\nconst CancelConfirmation = memo(() => {\n const { closeModal } = useModalActions();\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"ORANGE_4\">\n Your subscription has been cancelled\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n We won't charge your card. If you change your mind, you can always restart the signup\n process by visiting our website.\n </Text>\n <Separator heightX={2.5} />\n <TextButton size=\"regular\" label=\"Close\" color=\"WHITE\" onClick={closeModal} />\n </FlexView>\n );\n});\n\nexport default CancelConfirmation;\n"],"names":["CancelConfirmation","memo","closeModal","useModalActions","device","useTheme","isMobile","EDeviceType","jsxs","FlexView","jsx","Text","Separator","TextButton","CancelConfirmation$1"],"mappings":";;;;;;;;;AAUA,MAAMA,IAAqBC,EAAK,MAAM;AAC9B,QAAA,EAAE,YAAAC,MAAeC,KACjB,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAGrC,SAAA,gBAAAC,EAACC,GAAS,EAAA,OAAOH,IAAW,MAAM,KAAK,UAAUA,IAAW,IAAI,KAAK,aAAY,WAC/E,UAAA;AAAA,IAAA,gBAAAI,EAACC,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,YAAW,UAE1E,uCAAA,CAAA;AAAA,IACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,sBACzBD,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAGrC,0HAAA;AAAA,IACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAF,EAACG,KAAW,MAAK,WAAU,OAAM,SAAQ,OAAM,SAAQ,SAASX,EAAY,CAAA;AAAA,EAC9E,EAAA,CAAA;AAEJ,CAAC,GAEDY,IAAed;"}
@@ -0,0 +1,55 @@
1
+ const e = {
2
+ title: "We’re sorry to see you go!",
3
+ description: "Tell us why youʼre canceling.",
4
+ reasons: [
5
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
6
+ { id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
7
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
8
+ { id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
9
+ {
10
+ id: "No longer interested in online tutoring",
11
+ label: "No longer interested in online tutoring"
12
+ },
13
+ { id: "other", label: "Something else" }
14
+ ]
15
+ }, o = {
16
+ title: "We’re sorry to see you go!",
17
+ description: "Tell us why youʼre canceling.",
18
+ reasons: [
19
+ {
20
+ id: "The tutor doesnʼt seem like a good fit",
21
+ label: "The tutor doesnʼt seem like a good fit"
22
+ },
23
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
24
+ { id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
25
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
26
+ {
27
+ id: "No longer interested in online tutoring",
28
+ label: "No longer interested in online tutoring"
29
+ },
30
+ { id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
31
+ { id: "other", label: "Something else" }
32
+ ]
33
+ }, t = {
34
+ title: "We’re sorry to see you go!",
35
+ description: "Tell us why youʼre canceling.",
36
+ reasons: [
37
+ { id: "Looking for more affordable options", label: "Looking for more affordable options" },
38
+ { id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
39
+ {
40
+ id: "No longer interested in online tutoring",
41
+ label: "No longer interested in online tutoring"
42
+ },
43
+ {
44
+ id: "I want to try other options first",
45
+ label: "I want to try other options first"
46
+ },
47
+ { id: "other", label: "Something else" }
48
+ ]
49
+ };
50
+ export {
51
+ t as cancellationReasonAfterTrial,
52
+ e as cancellationReasonNoTutor,
53
+ o as cancellationReasonWithTutor
54
+ };
55
+ //# sourceMappingURL=cancellation-reason-constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-reason-constant.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.ts"],"sourcesContent":["export const cancellationReasonNoTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonWithTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n {\n id: 'The tutor doesnʼt seem like a good fit',\n label: 'The tutor doesnʼt seem like a good fit',\n },\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonAfterTrial = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n {\n id: 'I want to try other options first',\n label: 'I want to try other options first',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n"],"names":["cancellationReasonNoTutor","cancellationReasonWithTutor","cancellationReasonAfterTrial"],"mappings":"AAAO,MAAMA,IAA4B;AAAA,EACvC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA8B;AAAA,EACzC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA+B;AAAA,EAC1C,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF;"}
@@ -0,0 +1,71 @@
1
+ import o from "styled-components";
2
+ import t from "../../../ui/layout/flex-view.js";
3
+ import d from "../../../ui/text/text.js";
4
+ const x = o(t)`
5
+ max-width: 560px;
6
+ border: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
7
+ `, h = o(t)`
8
+ overflow-y: auto;
9
+ max-height: 468px;
10
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
11
+ max-height: unset;
12
+ overflow-y: hidden;
13
+ }
14
+ `, u = o(t)`
15
+ padding-top: 0;
16
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
17
+ max-height: 300px;
18
+ overflow-y: auto;
19
+ }
20
+ `, c = o(t)`
21
+ padding-bottom: 24px;
22
+ ${({ theme: e }) => e.mediaQueries.minWidthTablet} {
23
+ border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
24
+ padding-bottom: 40px;
25
+ }
26
+ `, g = o.textarea(({ theme: e }) => {
27
+ const {
28
+ colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
29
+ layout: { gutter: p }
30
+ } = e;
31
+ return `border: 1px solid ${a};
32
+ width: 100%;
33
+ min-height: ${p * 5}px;
34
+ padding: 16px;
35
+ background-color: ${n};
36
+ white-space: pre-line;
37
+ font-family: 'Untitled Sans Regular';
38
+ font-weight: 400;
39
+ font-size: 14px;
40
+ line-height: 24px;
41
+ color: ${i};
42
+ resize: none;
43
+ outline: none;
44
+ &::placeholder {
45
+ color: ${r};
46
+ }
47
+
48
+ &:focus {
49
+ outline: none;
50
+ }
51
+ `;
52
+ }), $ = o(d)(
53
+ ({ theme: e }) => `
54
+ position: absolute;
55
+ top: 0;
56
+ width: 100%;
57
+ transition: all 0.2s ease-in-out;
58
+ ${e.mediaQueries.minWidthTablet} {
59
+ top: 6px;
60
+ }
61
+ `
62
+ );
63
+ export {
64
+ x as Container,
65
+ u as ContentWrapper,
66
+ $ as ErrorWrapper,
67
+ c as FooterWrapper,
68
+ h as OuterWrapper,
69
+ g as StyledTextArea
70
+ };
71
+ //# sourceMappingURL=cancellation-reason-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellation-reason-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nexport const Container = styled(FlexView)`\n max-width: 560px;\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n }\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n }\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n\nexport const ErrorWrapper = styled(Text)(\n ({ theme }) =>\n `\n position: absolute;\n top: 0;\n width: 100%;\n transition: all 0.2s ease-in-out;\n ${theme.mediaQueries.minWidthTablet} {\n top: 6px;\n }\n`,\n);\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterW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