@cuemath/leap 2.9.1 → 2.9.2-as2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +9 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/alarm.js +41 -0
- package/dist/assets/line-icons/icons/alarm.js.map +1 -0
- package/dist/assets/line-icons/icons/bin2.js +7 -8
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
- package/dist/assets/line-icons/icons/dart.js +23 -0
- package/dist/assets/line-icons/icons/dart.js.map +1 -0
- package/dist/assets/line-icons/icons/exclamation.js +26 -0
- package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
- package/dist/assets/line-icons/icons/home2.js +25 -0
- package/dist/assets/line-icons/icons/home2.js.map +1 -0
- package/dist/assets/line-icons/icons/important.js +23 -0
- package/dist/assets/line-icons/icons/important.js.map +1 -0
- package/dist/assets/line-icons/icons/puzzle.js +25 -0
- package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
- package/dist/assets/line-icons/icons/recap.js +32 -0
- package/dist/assets/line-icons/icons/recap.js.map +1 -0
- package/dist/assets/line-icons/icons/skip-colored.js +43 -0
- package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
- package/dist/assets/line-icons/icons/status.js +41 -0
- package/dist/assets/line-icons/icons/status.js.map +1 -0
- package/dist/assets/line-icons/icons/testtube.js +33 -0
- package/dist/assets/line-icons/icons/testtube.js.map +1 -0
- package/dist/assets/lottie/lottie.js +9 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +3 -2
- package/dist/constants/api.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
- package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters-v2/api/chapter.js +10 -0
- package/dist/features/chapters-v2/api/chapter.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +73 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +97 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +52 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +103 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +153 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +171 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +192 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +20 -0
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
- package/dist/features/chapters-v2/constants/node-constants.js +14 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +41 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +144 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/communication/pub-sub/constants.js +5 -2
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/card-menu-options.js +38 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/card-title.js +15 -0
- package/dist/features/homework/card-title.js.map +1 -0
- package/dist/features/homework/homework-card-view.js +131 -0
- package/dist/features/homework/homework-card-view.js.map +1 -0
- package/dist/features/homework/homework-card.js +206 -0
- package/dist/features/homework/homework-card.js.map +1 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +71 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +182 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
- package/dist/features/homework/node-progress.js +29 -0
- package/dist/features/homework/node-progress.js.map +1 -0
- package/dist/features/homework/styles.js +130 -0
- package/dist/features/homework/styles.js.map +1 -0
- package/dist/features/milestone/create/api/goal-submit.js +1 -1
- package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +49 -43
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js +33 -38
- package/dist/features/milestone/create/utils/index.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +64 -62
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +136 -104
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +155 -175
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +19 -23
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +96 -100
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +114 -112
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +85 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +6 -34
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters.js +34 -0
- package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js +39 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +1 -1
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +30 -15
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/theme/button.js +22 -107
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +280 -29
- package/dist/index.js +496 -470
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/differenceInDays.js +17 -0
- package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
- package/dist/static/competitive-arena.b9c40801.json +1 -0
- package/dist/static/learn.71b13323.json +1 -0
- package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
- package/dist/static/node-learn-bg.b61f815c.svg +1 -0
- package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
- package/dist/static/node-project-bg.e6a33e28.svg +1 -0
- package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
- package/dist/static/node-recap-bg.546154e4.svg +1 -0
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
- package/dist/static/node-video-bg.3df3f73a.svg +1 -0
- package/dist/static/practice.158dd488.json +1 -0
- package/dist/static/project.eb665827.json +1 -0
- package/dist/static/puzzle.b298c7e4.json +1 -0
- package/dist/static/recap.0dd2c1e2.json +1 -0
- package/dist/static/test.803d6036.json +1 -0
- package/dist/static/video.b41451e2.json +1 -0
- package/package.json +1 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recent-chapters-styled.js","sources":["../../../src/features/recent-chapters/recent-chapters-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nconst ChaptersWrapper = styled.div(({ theme }) => {\n const { WHITE_5, WHITE_2 } = theme.colors;\n\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n background: ${WHITE_2};\n background-image: linear-gradient(${WHITE_5} 0.5px, transparent 0.5px), linear-gradient(90deg, ${WHITE_5} 0.5px, transparent 0.5px);\n background-size: 45px 45px;\n `;\n});\n\nexport { ChaptersWrapper };\n"],"names":["ChaptersWrapper","styled","theme","WHITE_5","WHITE_2"],"mappings":";AAEA,MAAMA,IAAkBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAAY;AAChD,QAAM,EAAE,SAAAC,GAAS,SAAAC,MAAYF,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA,kBAISE,CAAO;AAAA,wCACeD,CAAO,sDAAsDA,CAAO;AAAA;AAAA;AAG5G,CAAC;"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
2
|
+
import { useCallback as c, useEffect as f } from "react";
|
3
|
+
import h from "../chapters/chapters-list/chapter-item/chapter-item.js";
|
4
|
+
import C from "../ui/layout/flex-view.js";
|
5
|
+
import d from "../ui/text/text.js";
|
6
|
+
import { useGetRecentChapters as u } from "./api/get-recent-chapters.js";
|
7
|
+
import { ChaptersWrapper as x } from "./recent-chapters-styled.js";
|
8
|
+
const g = ({ studentId: r, courseStream: t, onChapterClick: p }) => {
|
9
|
+
const { get: o, data: e, isProcessingFailed: a } = u(), i = c(() => {
|
10
|
+
o(r, void 0, { courseStream: t });
|
11
|
+
}, [t, o, r]);
|
12
|
+
return f(() => {
|
13
|
+
i();
|
14
|
+
}, [i]), a ? null : e && e.length > 0 ? /* @__PURE__ */ s(C, { $flexRowGapX: 1, children: [
|
15
|
+
/* @__PURE__ */ s(d, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
16
|
+
"Recent Chapters (",
|
17
|
+
e == null ? void 0 : e.length,
|
18
|
+
")"
|
19
|
+
] }),
|
20
|
+
/* @__PURE__ */ l(x, { children: e.map((n, m) => /* @__PURE__ */ l(
|
21
|
+
h,
|
22
|
+
{
|
23
|
+
chapter: n,
|
24
|
+
onChapterClick: p,
|
25
|
+
itemIndex: m
|
26
|
+
},
|
27
|
+
n.id
|
28
|
+
)) })
|
29
|
+
] }) : null;
|
30
|
+
}, F = g;
|
31
|
+
export {
|
32
|
+
F as default
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=recent-chapters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recent-chapters.js","sources":["../../../src/features/recent-chapters/recent-chapters.tsx"],"sourcesContent":["import type { IChaptersListProps } from '../chapters/chapters-list/chapters-list-types';\nimport type { TCourseStream } from '../milestone/create/milestone-create-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect } from 'react';\n\nimport ChapterItem from '../chapters/chapters-list/chapter-item/chapter-item';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\nimport { useGetRecentChapters } from './api/get-recent-chapters';\nimport * as Styled from './recent-chapters-styled';\n\ninterface RecentChaptersProps {\n studentId: string;\n courseStream: TCourseStream;\n userType: TUserTypes;\n onChapterClick: IChaptersListProps['onChapterClick'];\n}\n\nconst RecentChapters: FC<RecentChaptersProps> = ({ studentId, courseStream, onChapterClick }) => {\n const { get: getChapters, data: chapterData, isProcessingFailed } = useGetRecentChapters();\n\n const fetchChapterDetails = useCallback(() => {\n getChapters(studentId, undefined, { courseStream });\n }, [courseStream, getChapters, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n if (chapterData && chapterData.length > 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({chapterData?.length})\n </Text>\n <Styled.ChaptersWrapper>\n {chapterData.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n ))}\n </Styled.ChaptersWrapper>\n </FlexView>\n );\n }\n\n return null;\n};\n\nexport default RecentChapters;\n"],"names":["RecentChapters","studentId","courseStream","onChapterClick","getChapters","chapterData","isProcessingFailed","useGetRecentChapters","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","Text","jsx","Styled.ChaptersWrapper","chapter","idx","ChapterItem","RecentChapters$1"],"mappings":";;;;;;;AAoBA,MAAMA,IAA0C,CAAC,EAAE,WAAAC,GAAW,cAAAC,GAAc,gBAAAC,QAAqB;AAC/F,QAAM,EAAE,KAAKC,GAAa,MAAMC,GAAa,oBAAAC,EAAA,IAAuBC,KAE9DC,IAAsBC,EAAY,MAAM;AAC5C,IAAAL,EAAYH,GAAW,QAAW,EAAE,cAAAC,EAAc,CAAA;AAAA,EACjD,GAAA,CAACA,GAAcE,GAAaH,CAAS,CAAC;AAMzC,SAJAS,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAEpBF,IACK,OAGLD,KAAeA,EAAY,SAAS,IAEpC,gBAAAM,EAACC,GAAS,EAAA,cAAc,GACtB,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAK,EAAA,WAAU,aAAY,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MAC5BR,KAAA,gBAAAA,EAAa;AAAA,MAAO;AAAA,IAAA,GACxC;AAAA,IACA,gBAAAS,EAACC,GAAA,EACE,YAAY,IAAI,CAACC,GAASC,MACzB,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,SAAAF;AAAA,QACA,gBAAAb;AAAA,QACA,WAAWc;AAAA,MAAA;AAAA,MAHND,EAAQ;AAAA,IAKhB,CAAA,GACH;AAAA,EACF,EAAA,CAAA,IAIG;AACT,GAEAG,IAAenB;"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { h as f } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
3
|
+
import { memo as $ } from "react";
|
4
|
+
import x from "styled-components";
|
5
|
+
import _ from "../../homework/homework-card.js";
|
6
|
+
import g from "../../ui/layout/flex-view.js";
|
7
|
+
const w = x.div`
|
8
|
+
display: grid;
|
9
|
+
grid-template-columns: repeat(3, 200px);
|
10
|
+
grid-gap: 32px;
|
11
|
+
justify-content: center;
|
12
|
+
padding: 32px 0;
|
13
|
+
`, R = ({ sheets: r, userType: n, ...m }) => /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(w, { children: r.map((o, s) => {
|
14
|
+
const {
|
15
|
+
title: d,
|
16
|
+
node_id: a,
|
17
|
+
worksheet_id: p,
|
18
|
+
is_timed: l,
|
19
|
+
sheet_time: c,
|
20
|
+
total_questions: e
|
21
|
+
} = o, u = Math.ceil((c || 0) / 60), i = e ? `${e} ${f.pluralize(e, "Question")}` : "", h = l ? `${i} ${u} Mins` : i;
|
22
|
+
return /* @__PURE__ */ t(
|
23
|
+
_,
|
24
|
+
{
|
25
|
+
header: d,
|
26
|
+
subHeader: h,
|
27
|
+
userType: n,
|
28
|
+
nodeData: o,
|
29
|
+
renderAs: "milestone",
|
30
|
+
shouldOpenOnRight: (s + 1) % 3 === 0,
|
31
|
+
...m
|
32
|
+
},
|
33
|
+
`${p}_${a}_${s}`
|
34
|
+
);
|
35
|
+
}) }) }), j = $(R);
|
36
|
+
export {
|
37
|
+
j as default
|
38
|
+
};
|
39
|
+
//# sourceMappingURL=resource-list.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACP,GACE,EAAA,UAAAG,EAAO,IAAI,CAACK,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,IAAID,CAAc,UACvCC;AAGF,SAAA,gBAAAX;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,QAAQV;AAAA,MACR,WAAAS;AAAA,MACA,UAAAf;AAAA,MACA,UAAUI;AAAA,MACV,UAAS;AAAA,MACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGJ;AAAA,IAAA;AAAA,IAPC,GAAGO,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAU1C,CAAC,GACH,EACF,CAAA,GAGaY,IAAAC,EAAKpB,CAAa;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n\n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n \n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const
|
1
|
+
const A = {
|
2
2
|
CHANGE_LOCATION: "Change location",
|
3
3
|
RESET_PROGRESS: "Reset progress",
|
4
4
|
MARK_AS_FAMILIAR: "Mark as learned",
|
@@ -11,9 +11,10 @@ const E = {
|
|
11
11
|
MARK_AS_DONE: "Mark as Done",
|
12
12
|
SKIP: "Skip",
|
13
13
|
REVERT_SKIP: "Revert Skip",
|
14
|
-
REDO: "Redo"
|
14
|
+
REDO: "Redo",
|
15
|
+
ASSIGN_AS_HW: "Assign as HW"
|
15
16
|
};
|
16
17
|
export {
|
17
|
-
|
18
|
+
A as TEACHER_MENU_OPTIONS
|
18
19
|
};
|
19
20
|
//# sourceMappingURL=teacher-actions-constant.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;
|
1
|
+
{"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n ASSIGN_AS_HW: 'Assign as HW',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,cAAc;AAChB;"}
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import { useRef as
|
4
|
-
import { useTheme as
|
1
|
+
import { jsxs as I, Fragment as U, jsx as r } from "react/jsx-runtime";
|
2
|
+
import W from "../../../node_modules/lodash.throttle/index.js";
|
3
|
+
import { useRef as Y, useState as m, useCallback as $, useEffect as H } from "react";
|
4
|
+
import { useTheme as P } from "styled-components";
|
5
5
|
import C from "../layout/flex-view.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import { TooltipBody as
|
9
|
-
import { computeTooltipNewCoOrdinates as
|
10
|
-
const
|
6
|
+
import V from "../portal/portal.js";
|
7
|
+
import Z from "../text/text.js";
|
8
|
+
import { TooltipBody as q } from "./arrow-tooltip-styled.js";
|
9
|
+
import { computeTooltipNewCoOrdinates as y } from "./arrow-tooltip-util.js";
|
10
|
+
const G = 8, J = 100, K = ({
|
11
11
|
isAnimated: O,
|
12
12
|
alwaysVisible: o = !1,
|
13
13
|
arrowColor: T,
|
14
|
-
arrowSize: h =
|
14
|
+
arrowSize: h = G,
|
15
15
|
arrowXCoOrdinates: g,
|
16
16
|
arrowYCoOrdinates: w,
|
17
17
|
backgroundColor: R,
|
@@ -27,61 +27,62 @@ const y = 8, G = 100, J = ({
|
|
27
27
|
tooltipYCoOrdinates: k,
|
28
28
|
width: F,
|
29
29
|
widthX: L,
|
30
|
-
zIndex: M
|
30
|
+
zIndex: M,
|
31
|
+
parentWidth: S
|
31
32
|
}) => {
|
32
|
-
const { arrowTooltip:
|
33
|
+
const { arrowTooltip: X } = P(), { tooltipVariants: a } = X, { backgroundColorName: _ } = a[i], u = Y(null), [j, p] = m(o), [v, z] = m(
|
33
34
|
null
|
34
35
|
), s = $(
|
35
36
|
(e, n) => {
|
36
|
-
|
37
|
+
z(e), p(n);
|
37
38
|
},
|
38
39
|
[]
|
39
|
-
),
|
40
|
+
), B = $(() => {
|
40
41
|
if (t || o)
|
41
42
|
return null;
|
42
43
|
s(null, !1);
|
43
|
-
}, [o, s, t]), d =
|
44
|
+
}, [o, s, t]), d = W(() => {
|
44
45
|
var f;
|
45
46
|
const { current: e } = u;
|
46
47
|
if (t || !e) return null;
|
47
|
-
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(),
|
48
|
-
return s(
|
49
|
-
},
|
50
|
-
return
|
48
|
+
const n = (f = e.children[0]) == null ? void 0 : f.getBoundingClientRect(), D = n ? y(c, n) : null;
|
49
|
+
return s(D, !0), null;
|
50
|
+
}, J);
|
51
|
+
return H(() => {
|
51
52
|
t && p(!1), o && d();
|
52
|
-
}, [o, t]), /* @__PURE__ */
|
53
|
+
}, [o, t]), /* @__PURE__ */ I(U, { children: [
|
53
54
|
/* @__PURE__ */ r(
|
54
55
|
C,
|
55
56
|
{
|
56
|
-
$width: "fit-content",
|
57
|
+
$width: S || "fit-content",
|
57
58
|
ref: u,
|
58
59
|
onMouseEnter: d,
|
59
|
-
onMouseLeave:
|
60
|
+
onMouseLeave: B,
|
60
61
|
children: /* @__PURE__ */ r(C, { children: x })
|
61
62
|
}
|
62
63
|
),
|
63
|
-
|
64
|
-
|
64
|
+
j && /* @__PURE__ */ r(V, { portalId: "tooltip-root", children: /* @__PURE__ */ r(
|
65
|
+
q,
|
65
66
|
{
|
66
67
|
$arrowSize: h,
|
67
68
|
$arrowXCoOrdinates: g,
|
68
69
|
$arrowYCoOrdinates: w,
|
69
70
|
$position: c,
|
70
71
|
$renderAs: i,
|
71
|
-
$tooltipCoOrdinates:
|
72
|
+
$tooltipCoOrdinates: v,
|
72
73
|
$tooltipOffset: E,
|
73
74
|
$tooltipXCoOrdinates: N,
|
74
75
|
$tooltipYCoOrdinates: k,
|
75
76
|
$width: F,
|
76
77
|
$widthX: L,
|
77
78
|
$zIndex: M,
|
78
|
-
$background:
|
79
|
+
$background: _,
|
79
80
|
$backgroundColor: R,
|
80
81
|
$arrowColor: T,
|
81
82
|
$borderColor: b,
|
82
83
|
$isAnimated: O,
|
83
84
|
children: typeof l == "string" ? /* @__PURE__ */ r(
|
84
|
-
|
85
|
+
Z,
|
85
86
|
{
|
86
87
|
$renderAs: A || "body3",
|
87
88
|
$color: a[i].textColorName,
|
@@ -92,8 +93,8 @@ const y = 8, G = 100, J = ({
|
|
92
93
|
}
|
93
94
|
) })
|
94
95
|
] });
|
95
|
-
},
|
96
|
+
}, co = K;
|
96
97
|
export {
|
97
|
-
|
98
|
+
co as default
|
98
99
|
};
|
99
100
|
//# sourceMappingURL=arrow-tooltip.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width
|
1
|
+
{"version":3,"file":"arrow-tooltip.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip.tsx"],"sourcesContent":["import type {\n IArrowTooltipProps,\n THandleVisibleNCoOrdinatesProps,\n TTooltipCoOrdinatesProps,\n} from './arrow-tooltip-types';\n\nimport throttle from 'lodash.throttle';\nimport { useState, type FC, useCallback, useRef, useEffect } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport Portal from '../portal/portal';\nimport Text from '../text/text';\nimport * as Styled from './arrow-tooltip-styled';\nimport { computeTooltipNewCoOrdinates } from './arrow-tooltip-util';\n\nconst DEFAULT_ARROW_SIZE = 8;\nconst THROTTLE_DURATION = 100;\n\nconst ArrowTooltip: FC<IArrowTooltipProps> = ({\n isAnimated,\n alwaysVisible = false,\n arrowColor,\n arrowSize = DEFAULT_ARROW_SIZE,\n arrowXCoOrdinates,\n arrowYCoOrdinates,\n backgroundColor,\n borderColor,\n children,\n hidden,\n position,\n renderAs,\n textVariant,\n tooltipItem,\n tooltipOffset,\n tooltipXCoOrdinates,\n tooltipYCoOrdinates,\n width,\n widthX,\n zIndex,\n parentWidth,\n}) => {\n const { arrowTooltip } = useTheme();\n const { tooltipVariants } = arrowTooltip;\n const { backgroundColorName } = tooltipVariants[renderAs];\n\n const tooltipWrapperRef = useRef<HTMLDivElement>(null);\n const [visible, setVisible] = useState(alwaysVisible);\n const [tooltipCoOrdinates, setTooltipCoOrdinates] = useState<TTooltipCoOrdinatesProps | null>(\n null,\n );\n\n const handleVisibleNCoOrdinates: THandleVisibleNCoOrdinatesProps = useCallback(\n (newCoOrdinates, visibility) => {\n setTooltipCoOrdinates(newCoOrdinates);\n setVisible(visibility);\n },\n [],\n );\n\n const handleVisibility = useCallback(() => {\n if (hidden || alwaysVisible) {\n return null;\n }\n\n handleVisibleNCoOrdinates(null, false);\n\n return;\n }, [alwaysVisible, handleVisibleNCoOrdinates, hidden]);\n\n const handleOnMouseEnter = throttle(() => {\n const { current } = tooltipWrapperRef;\n\n if (hidden || !current) return null;\n\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n const newCoOrdinates = boundingClientRect\n ? computeTooltipNewCoOrdinates(position, boundingClientRect)\n : null;\n\n handleVisibleNCoOrdinates(newCoOrdinates, true);\n\n return null;\n }, THROTTLE_DURATION);\n\n useEffect(() => {\n if (hidden) {\n setVisible(false);\n }\n\n if (alwaysVisible) {\n handleOnMouseEnter();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [alwaysVisible, hidden]);\n\n return (\n <>\n <FlexView\n $width={parentWidth || 'fit-content'}\n ref={tooltipWrapperRef}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleVisibility}\n >\n <FlexView>{children}</FlexView>\n </FlexView>\n {visible && (\n <Portal portalId=\"tooltip-root\">\n <Styled.TooltipBody\n $arrowSize={arrowSize}\n $arrowXCoOrdinates={arrowXCoOrdinates}\n $arrowYCoOrdinates={arrowYCoOrdinates}\n $position={position}\n $renderAs={renderAs}\n $tooltipCoOrdinates={tooltipCoOrdinates}\n $tooltipOffset={tooltipOffset}\n $tooltipXCoOrdinates={tooltipXCoOrdinates}\n $tooltipYCoOrdinates={tooltipYCoOrdinates}\n $width={width}\n $widthX={widthX}\n $zIndex={zIndex}\n $background={backgroundColorName}\n $backgroundColor={backgroundColor}\n $arrowColor={arrowColor}\n $borderColor={borderColor}\n $isAnimated={isAnimated}\n >\n {typeof tooltipItem === 'string' ? (\n <Text\n $renderAs={textVariant || 'body3'}\n $color={tooltipVariants[renderAs].textColorName}\n $align=\"center\"\n >\n {tooltipItem}\n </Text>\n ) : (\n tooltipItem\n )}\n </Styled.TooltipBody>\n </Portal>\n )}\n </>\n );\n};\n\nexport default ArrowTooltip;\n"],"names":["DEFAULT_ARROW_SIZE","THROTTLE_DURATION","ArrowTooltip","isAnimated","alwaysVisible","arrowColor","arrowSize","arrowXCoOrdinates","arrowYCoOrdinates","backgroundColor","borderColor","children","hidden","position","renderAs","textVariant","tooltipItem","tooltipOffset","tooltipXCoOrdinates","tooltipYCoOrdinates","width","widthX","zIndex","parentWidth","arrowTooltip","useTheme","tooltipVariants","backgroundColorName","tooltipWrapperRef","useRef","visible","setVisible","useState","tooltipCoOrdinates","setTooltipCoOrdinates","handleVisibleNCoOrdinates","useCallback","newCoOrdinates","visibility","handleVisibility","handleOnMouseEnter","throttle","current","boundingClientRect","_a","computeTooltipNewCoOrdinates","useEffect","jsxs","Fragment","jsx","FlexView","Portal","Styled.TooltipBody","Text","ArrowTooltip$1"],"mappings":";;;;;;;;;AAgBA,MAAMA,IAAqB,GACrBC,IAAoB,KAEpBC,IAAuC,CAAC;AAAA,EAC5C,YAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,YAAAC;AAAA,EACA,WAAAC,IAAYN;AAAA,EACZ,mBAAAO;AAAA,EACA,mBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,MAAM;AACE,QAAA,EAAE,cAAAC,MAAiBC,KACnB,EAAE,iBAAAC,EAAoB,IAAAF,GACtB,EAAE,qBAAAG,EAAA,IAAwBD,EAAgBZ,CAAQ,GAElDc,IAAoBC,EAAuB,IAAI,GAC/C,CAACC,GAASC,CAAU,IAAIC,EAAS5B,CAAa,GAC9C,CAAC6B,GAAoBC,CAAqB,IAAIF;AAAA,IAClD;AAAA,EAAA,GAGIG,IAA6DC;AAAA,IACjE,CAACC,GAAgBC,MAAe;AAC9B,MAAAJ,EAAsBG,CAAc,GACpCN,EAAWO,CAAU;AAAA,IACvB;AAAA,IACA,CAAC;AAAA,EAAA,GAGGC,IAAmBH,EAAY,MAAM;AACzC,QAAIxB,KAAUR;AACL,aAAA;AAGT,IAAA+B,EAA0B,MAAM,EAAK;AAAA,EAGpC,GAAA,CAAC/B,GAAe+B,GAA2BvB,CAAM,CAAC,GAE/C4B,IAAqBC,EAAS,MAAM;;AAClC,UAAA,EAAE,SAAAC,EAAY,IAAAd;AAEhB,QAAAhB,KAAU,CAAC8B,EAAgB,QAAA;AAE/B,UAAMC,KAAqBC,IAAAF,EAAQ,SAAS,CAAC,MAAlB,gBAAAE,EAAqB,yBAC1CP,IAAiBM,IACnBE,EAA6BhC,GAAU8B,CAAkB,IACzD;AAEJ,WAAAR,EAA0BE,GAAgB,EAAI,GAEvC;AAAA,KACNpC,CAAiB;AAEpB,SAAA6C,EAAU,MAAM;AACd,IAAIlC,KACFmB,EAAW,EAAK,GAGd3B,KACiBoC;EACrB,GAEC,CAACpC,GAAeQ,CAAM,CAAC,GAItB,gBAAAmC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQ3B,KAAe;AAAA,QACvB,KAAKK;AAAA,QACL,cAAcY;AAAA,QACd,cAAcD;AAAA,QAEd,UAAA,gBAAAU,EAACC,KAAU,UAAAvC,EAAS,CAAA;AAAA,MAAA;AAAA,IACtB;AAAA,IACCmB,KACC,gBAAAmB,EAACE,GAAO,EAAA,UAAS,gBACf,UAAA,gBAAAF;AAAA,MAACG;AAAAA,MAAA;AAAA,QACC,YAAY9C;AAAA,QACZ,oBAAoBC;AAAA,QACpB,oBAAoBC;AAAA,QACpB,WAAWK;AAAA,QACX,WAAWC;AAAA,QACX,qBAAqBmB;AAAA,QACrB,gBAAgBhB;AAAA,QAChB,sBAAsBC;AAAA,QACtB,sBAAsBC;AAAA,QACtB,QAAQC;AAAA,QACR,SAASC;AAAA,QACT,SAASC;AAAA,QACT,aAAaK;AAAA,QACb,kBAAkBlB;AAAA,QAClB,aAAaJ;AAAA,QACb,cAAcK;AAAA,QACd,aAAaP;AAAA,QAEZ,UAAA,OAAOa,KAAgB,WACtB,gBAAAiC;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,WAAWtC,KAAe;AAAA,YAC1B,QAAQW,EAAgBZ,CAAQ,EAAE;AAAA,YAClC,QAAO;AAAA,YAEN,UAAAE;AAAA,UAAA;AAAA,QAAA,IAGHA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAsC,KAAepD;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG:
|
1
|
+
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG: 2,\n LPAR_SHEET_ITEM_BOTTOM_DASH_BOX: 1,\n LPAR_SHEET_ITEM_TOP_VERTICAL_ICON: 2,\n MODAL: 20,\n SAT_SUMMARY_SCORE: 25, //* SAT_SUMMARY_SCORE > MODAL\n CANVAS_SCRIBBLING: 26, //* CANVAS_SCRIBBLING > Learnosity\n TILE_CONTAINER: 30, //whiteboard\n QUESTION_TIPS: -1,\n DESMOS_CALCULATOR: 2,\n GOAL_CHAPTER_SHEETS_MENU: 4,\n} as const;\n\nexport { ZINDEX };\n"],"names":["ZINDEX"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACb,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,mCAAmC;AAAA,EACnC,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EACnB,mBAAmB;AAAA;AAAA,EACnB,gBAAgB;AAAA;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;"}
|
@@ -1,27 +1,41 @@
|
|
1
|
-
import
|
2
|
-
const
|
3
|
-
width:
|
1
|
+
import o from "styled-components";
|
2
|
+
const d = o.div`
|
3
|
+
width: auto;
|
4
4
|
height: fit-content;
|
5
5
|
position: relative;
|
6
6
|
border-radius: 50%;
|
7
|
-
`,
|
8
|
-
({
|
7
|
+
`, f = o.div(
|
8
|
+
({
|
9
|
+
$visible: t,
|
10
|
+
$menuOffset: a,
|
11
|
+
$startLeft: i,
|
12
|
+
$menuZIndex: s,
|
13
|
+
$placeTop: e,
|
14
|
+
$menuWidth: r,
|
15
|
+
$menuWidthX: n,
|
16
|
+
theme: p
|
17
|
+
}) => {
|
18
|
+
const { layout: u } = p;
|
19
|
+
return `
|
9
20
|
position: absolute;
|
10
|
-
|
11
|
-
${n ?
|
12
|
-
|
21
|
+
width: ${r ? `${r}` : "auto"}${typeof r == "number" ? "px" : ""};
|
22
|
+
${n ? `width: ${n * u.gutter}px;` : ""}
|
23
|
+
top: calc(${e ? "0% -" : "100% +"} ${a ?? 0}px);
|
24
|
+
${i ? "left: 0" : "right: 0"};
|
25
|
+
z-index: ${s ?? "unset"};
|
13
26
|
|
14
27
|
transform-origin: top;
|
15
|
-
transform: scaleY(${t ? 1 : 0}) rotate(${
|
28
|
+
transform: scaleY(${t ? 1 : 0}) rotate(${e ? 180 : 0}deg);
|
16
29
|
opacity: ${t ? 1 : 0};
|
17
30
|
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
18
|
-
|
19
|
-
|
31
|
+
`;
|
32
|
+
}
|
33
|
+
), $ = o.div(({ $placeTop: t }) => `
|
20
34
|
transform: rotate(${t ? 180 : 0}deg);
|
21
35
|
`);
|
22
36
|
export {
|
23
|
-
|
24
|
-
|
25
|
-
|
37
|
+
$ as MenuElementWrapper,
|
38
|
+
f as OptionsMenuWrapper,
|
39
|
+
d as TargetElementWrapper
|
26
40
|
};
|
27
41
|
//# sourceMappingURL=context-menu-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width:
|
1
|
+
{"version":3,"file":"context-menu-styled.js","sources":["../../../../src/features/ui/context-menu/context-menu-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst TargetElementWrapper = styled.div`\n width: auto;\n height: fit-content;\n position: relative;\n border-radius: 50%;\n`;\n\ninterface IOptionsMenuWrapperProps {\n $visible: boolean;\n $startLeft?: boolean;\n $menuOffset?: number;\n $menuZIndex?: number;\n $placeTop?: boolean;\n $menuWidth?: number | string;\n $menuWidthX?: number;\n}\n\nconst OptionsMenuWrapper = styled.div<IOptionsMenuWrapperProps>(\n ({\n $visible,\n $menuOffset,\n $startLeft,\n $menuZIndex,\n $placeTop,\n $menuWidth,\n $menuWidthX,\n theme,\n }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n width: ${$menuWidth ? `${$menuWidth}` : 'auto'}${typeof $menuWidth === 'number' ? 'px' : ''};\n ${$menuWidthX ? `width: ${$menuWidthX * layout.gutter}px;` : ''}\n top: calc(${$placeTop ? '0% -' : '100% +'} ${$menuOffset ?? 0}px);\n ${$startLeft ? 'left: 0' : 'right: 0'};\n z-index: ${$menuZIndex ?? 'unset'};\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0}) rotate(${$placeTop ? 180 : 0}deg);\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n `;\n },\n);\n\ninterface IMenuElementWrapperProps {\n $placeTop?: boolean;\n}\n\nconst MenuElementWrapper = styled.div<IMenuElementWrapperProps>(({ $placeTop }) => {\n return `\n transform: rotate(${$placeTop ? 180 : 0}deg);\n `;\n});\n\nexport { TargetElementWrapper, OptionsMenuWrapper, MenuElementWrapper };\n"],"names":["TargetElementWrapper","styled","OptionsMenuWrapper","$visible","$menuOffset","$startLeft","$menuZIndex","$placeTop","$menuWidth","$menuWidthX","theme","layout","MenuElementWrapper"],"mappings":";AAEA,MAAMA,IAAuBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAiB9BC,IAAqBD,EAAO;AAAA,EAChC,CAAC;AAAA,IACC,UAAAE;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,MACI;AACE,UAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,WAAA;AAAA;AAAA,aAEEF,IAAa,GAAGA,CAAU,KAAK,MAAM,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,MACzFC,IAAc,UAAUA,IAAcE,EAAO,MAAM,QAAQ,EAAE;AAAA,gBACnDJ,IAAY,SAAS,QAAQ,IAAIH,KAAe,CAAC;AAAA,MAC3DC,IAAa,YAAY,UAAU;AAAA,eAC1BC,KAAe,OAAO;AAAA;AAAA;AAAA,wBAGbH,IAAW,IAAI,CAAC,YAAYI,IAAY,MAAM,CAAC;AAAA,eACxDJ,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA,EAG7B;AACF,GAMMS,IAAqBX,EAAO,IAA8B,CAAC,EAAE,WAAAM,QAC1D;AAAA,wBACeA,IAAY,MAAM,CAAC;AAAA,GAE1C;"}
|
@@ -1,27 +1,42 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({
|
7
|
-
|
8
|
-
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as $, useRef as d } from "react";
|
3
|
+
import x from "../hooks/use-context-menu-click-handler.js";
|
4
|
+
import { TargetElementWrapper as C, OptionsMenuWrapper as M, MenuElementWrapper as h } from "./context-menu-styled.js";
|
5
|
+
const W = $(
|
6
|
+
({
|
7
|
+
targetElement: r,
|
8
|
+
menuElement: o,
|
9
|
+
menuOffset: i,
|
10
|
+
startLeft: m,
|
11
|
+
menuZIndex: u,
|
12
|
+
placeTop: e,
|
13
|
+
menuWidth: l,
|
14
|
+
menuWidthX: s,
|
15
|
+
handleOnMenuClick: p
|
16
|
+
}) => {
|
17
|
+
const n = d(null), { menuVisible: c, onMenuClick: f } = x(
|
18
|
+
n,
|
19
|
+
p
|
20
|
+
);
|
21
|
+
return /* @__PURE__ */ a(C, { ref: n, onClick: f, children: [
|
9
22
|
r,
|
10
23
|
/* @__PURE__ */ t(
|
11
|
-
|
24
|
+
M,
|
12
25
|
{
|
13
26
|
$menuOffset: i,
|
14
|
-
$visible:
|
15
|
-
$startLeft:
|
16
|
-
$menuZIndex:
|
27
|
+
$visible: c,
|
28
|
+
$startLeft: m,
|
29
|
+
$menuZIndex: u,
|
17
30
|
$placeTop: e,
|
18
|
-
|
31
|
+
$menuWidth: l,
|
32
|
+
$menuWidthX: s,
|
33
|
+
children: /* @__PURE__ */ t(h, { $placeTop: e, children: o })
|
19
34
|
}
|
20
35
|
)
|
21
36
|
] });
|
22
37
|
}
|
23
|
-
),
|
38
|
+
), O = W;
|
24
39
|
export {
|
25
|
-
|
40
|
+
O as default
|
26
41
|
};
|
27
42
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({\n targetElement,\n menuElement,\n menuOffset,\n startLeft,\n menuZIndex,\n placeTop,\n menuWidth,\n menuWidthX,\n handleOnMenuClick,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(\n containerRef,\n handleOnMenuClick,\n );\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n $menuWidth={menuWidth}\n $menuWidthX={menuWidthX}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","menuWidth","menuWidthX","handleOnMenuClick","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC;AAAA,IACC,eAAAC;AAAA,IACA,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAA,IAAgBC;AAAA,MACnCJ;AAAA,MACAD;AAAA,IAAA;AAGF,6BACGM,GAAA,EAA4B,KAAKL,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAZ;AAAA,MAED,gBAAAe;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAad;AAAA,UACb,UAAUS;AAAA,UACV,YAAYR;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UACX,YAAYC;AAAA,UACZ,aAAaC;AAAA,UAEb,4BAACU,GAAA,EAA0B,WAAWZ,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAiB,IAAepB;"}
|
@@ -81,123 +81,38 @@ const o = (i) => ({ sizes: {
|
|
81
81
|
},
|
82
82
|
tertiary: {
|
83
83
|
backgroundColorName: {
|
84
|
-
inactive: "
|
85
|
-
active: "
|
84
|
+
inactive: "RED",
|
85
|
+
active: "BLACK",
|
86
86
|
disabled: "GREY_3"
|
87
87
|
},
|
88
88
|
colorName: {
|
89
|
-
inactive: "
|
89
|
+
inactive: "WHITE",
|
90
90
|
active: "WHITE",
|
91
91
|
disabled: "BLACK"
|
92
92
|
},
|
93
93
|
borderColorName: {
|
94
|
-
inactive: "
|
95
|
-
active: "
|
94
|
+
inactive: "BLACK",
|
95
|
+
active: "BLACK",
|
96
|
+
disabled: "GREY_3"
|
97
|
+
}
|
98
|
+
},
|
99
|
+
"secondary-gray": {
|
100
|
+
backgroundColorName: {
|
101
|
+
inactive: "WHITE",
|
102
|
+
active: "WHITE_4",
|
103
|
+
disabled: "GREY_3"
|
104
|
+
},
|
105
|
+
colorName: {
|
106
|
+
inactive: "BLACK",
|
107
|
+
active: "BLACK",
|
108
|
+
disabled: "BLACK"
|
109
|
+
},
|
110
|
+
borderColorName: {
|
111
|
+
inactive: "BLACK",
|
112
|
+
active: "BLACK",
|
96
113
|
disabled: "GREY_3"
|
97
114
|
}
|
98
115
|
}
|
99
|
-
// 'yellow': {
|
100
|
-
// backgroundColorName: {
|
101
|
-
// inactive: 'YELLOW_4',
|
102
|
-
// active: 'BLACK_4',
|
103
|
-
// disabled: 'BLACK_T_35',
|
104
|
-
// },
|
105
|
-
// borderColorName: {
|
106
|
-
// inactive: 'BLACK_4',
|
107
|
-
// active: 'BLACK_4',
|
108
|
-
// disabled: 'BLACK_T_35',
|
109
|
-
// },
|
110
|
-
// colorName: {
|
111
|
-
// inactive: 'BLACK_4',
|
112
|
-
// active: 'WHITE_4',
|
113
|
-
// disabled: 'BLACK_T_35',
|
114
|
-
// },
|
115
|
-
// },
|
116
|
-
// 'yellow-dark': {
|
117
|
-
// backgroundColorName: {
|
118
|
-
// inactive: 'YELLOW_4',
|
119
|
-
// active: 'WHITE_4',
|
120
|
-
// disabled: 'WHITE_T_40',
|
121
|
-
// },
|
122
|
-
// borderColorName: {
|
123
|
-
// inactive: 'BLACK_4',
|
124
|
-
// active: 'BLACK_4',
|
125
|
-
// disabled: 'WHITE_T_40',
|
126
|
-
// },
|
127
|
-
// colorName: {
|
128
|
-
// inactive: 'BLACK_4',
|
129
|
-
// active: 'BLACK_4',
|
130
|
-
// disabled: 'WHITE_T_40',
|
131
|
-
// },
|
132
|
-
// },
|
133
|
-
// 'white': {
|
134
|
-
// backgroundColorName: {
|
135
|
-
// inactive: 'WHITE_1',
|
136
|
-
// active: 'BLACK_T_35',
|
137
|
-
// disabled: 'BLACK_T_35',
|
138
|
-
// },
|
139
|
-
// borderColorName: {
|
140
|
-
// inactive: 'BLACK_4',
|
141
|
-
// active: 'BLACK_4',
|
142
|
-
// disabled: 'BLACK_T_35',
|
143
|
-
// },
|
144
|
-
// colorName: {
|
145
|
-
// inactive: 'BLACK_4',
|
146
|
-
// active: 'BLACK_4',
|
147
|
-
// disabled: 'BLACK_T_35',
|
148
|
-
// },
|
149
|
-
// },
|
150
|
-
// 'white-dark': {
|
151
|
-
// backgroundColorName: {
|
152
|
-
// inactive: 'WHITE_4',
|
153
|
-
// active: 'WHITE_T_70',
|
154
|
-
// disabled: 'WHITE_T_40',
|
155
|
-
// },
|
156
|
-
// borderColorName: {
|
157
|
-
// inactive: 'BLACK_4',
|
158
|
-
// active: 'BLACK_4',
|
159
|
-
// disabled: 'WHITE_T_40',
|
160
|
-
// },
|
161
|
-
// colorName: {
|
162
|
-
// inactive: 'BLACK_4',
|
163
|
-
// active: 'BLACK_4',
|
164
|
-
// disabled: 'WHITE_T_40',
|
165
|
-
// },
|
166
|
-
// },
|
167
|
-
// 'black': {
|
168
|
-
// backgroundColorName: {
|
169
|
-
// inactive: 'BLACK_4',
|
170
|
-
// active: 'BLACK_T_60',
|
171
|
-
// disabled: 'BLACK_T_35',
|
172
|
-
// },
|
173
|
-
// borderColorName: {
|
174
|
-
// inactive: 'BLACK_4',
|
175
|
-
// active: 'BLACK_4',
|
176
|
-
// disabled: 'BLACK_T_35',
|
177
|
-
// },
|
178
|
-
// colorName: {
|
179
|
-
// inactive: 'WHITE_4',
|
180
|
-
// active: 'WHITE_4',
|
181
|
-
// disabled: 'BLACK_T_35',
|
182
|
-
// },
|
183
|
-
// },
|
184
|
-
// 'black-dark': {
|
185
|
-
// backgroundColorName: {
|
186
|
-
// inactive: 'BLACK_4',
|
187
|
-
// active: 'WHITE_T_40',
|
188
|
-
// disabled: 'WHITE_T_40',
|
189
|
-
// },
|
190
|
-
// borderColorName: {
|
191
|
-
// inactive: 'WHITE_4',
|
192
|
-
// active: 'WHITE_4',
|
193
|
-
// disabled: 'WHITE_T_40',
|
194
|
-
// },
|
195
|
-
// colorName: {
|
196
|
-
// inactive: 'WHITE_4',
|
197
|
-
// active: 'WHITE_4',
|
198
|
-
// disabled: 'WHITE_T_40',
|
199
|
-
// },
|
200
|
-
// },
|
201
116
|
} });
|
202
117
|
export {
|
203
118
|
o as default
|