diff --git a/package.json b/package.json index 5e51ce3b..4a426f48 100644 --- a/package.json +++ b/package.json @@ -9,20 +9,10 @@ "lint": "next lint" }, "dependencies": { - "@ant-design/icons": "^5.3.7", - "@ant-design/pro-components": "^2.6.4", "@growthbook/growthbook-react": "^1.0.0", - "@hassanmojab/react-modern-calendar-datepicker": "^3.1.7", - "@plasmicapp/cli": "^0.1.331", + "@plasmicapp/cli": "^0.1.330", "@plasmicapp/host": "^1.0.196", "@plasmicapp/react-web": "^0.2.337", - "@plasmicpkgs/antd5": "^0.0.239", - "@plasmicpkgs/plasmic-basic-components": "^0.0.218", - "@plasmicpkgs/plasmic-embed-css": "^0.1.184", - "@plasmicpkgs/plasmic-query": "^0.0.216", - "@plasmicpkgs/plasmic-rich-components": "^1.0.187", - "@plasmicpkgs/plasmic-tabs": "^0.0.39", - "@plasmicpkgs/radix-ui": "^0.0.53", "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-select": "^2.1.1", "@radix-ui/react-slider": "^1.2.0", @@ -35,8 +25,10 @@ "react": "^18", "react-dom": "^18", "react-hot-toast": "^2.4.1", - "react-quill": "^2.0.0", + "react-multi-date-picker": "^4.5.2", "react-timeit": "^1.2.12", + "recharts": "^2.12.7", + "swr": "^2.2.5", "tailwind-merge": "^2.3.0", "tailwindcss-animate": "^1.0.7" }, diff --git a/plasmic.json b/plasmic.json index ee7c3e4c..aa056928 100644 --- a/plasmic.json +++ b/plasmic.json @@ -5,10 +5,6 @@ "scheme": "blackbox", "reactRuntime": "classic" }, - "style": { - "scheme": "css-modules", - "defaultStyleCssFilePath": "plasmic/plasmic__default_style.module.css" - }, "images": { "scheme": "public-files", "publicDir": "../public", @@ -20,826 +16,12 @@ }, "srcDir": "components", "defaultPlasmicDir": "./plasmic", - "projects": [ - { - "projectId": "caTPwKxj5ZrD9LQ7DMdK4Z", - "projectApiToken": "vXGGQpdi9fhcncabBdg8DcMRUbkz0iRW6HS1jzQufQR6QH0MasPwr9SX7ap4SsK3xXwwXmzZtglWGe0Rm2nw", - "projectName": "plasmic-basic-components", - "version": ">0.0.0", - "cssFilePath": "plasmic/plasmic_basic_components/plasmic.module.css", - "components": [], - "icons": [], - "images": [], - "indirect": true, - "globalContextsFilePath": "", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "CMDBvOhaI4s", - "name": "Iframe", - "displayName": "hostless-iframe", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "RhitNJW5Zu-", - "name": "Video", - "displayName": "hostless-html-video", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "PKldDYkH42", - "name": "Embed", - "displayName": "hostless-embed", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "D4RbnlpRXg3", - "name": "DataProvider", - "displayName": "hostless-data-provider", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "zlBHsvkFlN", - "name": "ConditionGuard", - "displayName": "hostless-condition-guard", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "K-mWGqrHefEp", - "name": "SideEffect", - "displayName": "hostless-side-effect", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - }, - { - "id": "SpkzmXJqg27p", - "name": "Timer", - "displayName": "hostless-timer", - "componentImportPath": "@plasmicpkgs/plasmic-basic-components" - } - ], - "customFunctions": [], - "jsBundleThemes": [] - }, - { - "projectId": "oBJtsp5RgVpcN6KCrDTuQT", - "projectApiToken": "Z0HEwdCEbNq2vJqCawLDXDkFahbOZftdUQ198aMRfnh2EL3KVg2GQ0q3G7MV4Q5hexgsS4BVG9ZpjLWYxcjg", - "projectName": "Fragment/Icons", - "version": ">0.0.0", - "cssFilePath": "plasmic/fragment_icons/plasmic.module.css", - "components": [], - "icons": [ - { - "id": "rDjUqSUK3eUM", - "name": "BellIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Bell.tsx" - }, - { - "id": "r9Upp9NbiZkf", - "name": "ChevronLeftIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ChevronLeft.tsx" - }, - { - "id": "GHdF3hS-oP_3", - "name": "ChevronRightIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ChevronRight.tsx" - }, - { - "id": "YXreB8gS3SjV", - "name": "ChevronUpIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ChevronUp.tsx" - }, - { - "id": "aC_QFogxt1Ko", - "name": "ChevronDownIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ChevronDown.tsx" - }, - { - "id": "GRY2zHJ6uxOn", - "name": "ThumbUpIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ThumbUp.tsx" - }, - { - "id": "jHvDymIOvRnf", - "name": "ThumbDownIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__ThumbDown.tsx" - }, - { - "id": "9zdEG9CdGbdC", - "name": "LocationIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Location.tsx" - }, - { - "id": "7Dhq6fgU-utK", - "name": "InfoIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Info.tsx" - }, - { - "id": "J8ozh55UiWsA", - "name": "SmileIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Smile.tsx" - }, - { - "id": "rW7v27ONOoUe", - "name": "ClockIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Clock.tsx" - }, - { - "id": "4D7uZNf6OjbV", - "name": "MoneyIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Money.tsx" - }, - { - "id": "e2zWN9c_lxv7", - "name": "CalendarIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Calendar.tsx" - }, - { - "id": "WTtCf_1I-uMv", - "name": "HeartIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Heart.tsx" - }, - { - "id": "eZfYsLpdWQA_", - "name": "BoldheartIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Boldheart.tsx" - }, - { - "id": "NSxX1Iy4jDVL", - "name": "ShareIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Share.tsx" - }, - { - "id": "dmfb3Ga2IoVt", - "name": "MenuIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Menu.tsx" - }, - { - "id": "BamIPHX72k5k", - "name": "RepliesIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Replies.tsx" - }, - { - "id": "zb1oqVXdrxPK", - "name": "XIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__X.tsx" - }, - { - "id": "oob3UzcKBsd_", - "name": "WhatsappIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Whatsapp.tsx" - }, - { - "id": "qxWwW7vbw7na", - "name": "EitaaIcon", - "moduleFilePath": "plasmic/fragment_icons/icons/PlasmicIcon__Eitaa.tsx" - } - ], - "images": [ - { - "id": "ijbf5URccsnE", - "name": "Red-Dot", - "filePath": "../public/plasmic/fragment_icons/images/redDot.svg" - } - ], - "indirect": true, - "globalContextsFilePath": "", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "kbwf7uMhTcmG", - "name": "PlasmicHead", - "displayName": "hostless-plasmic-head", - "componentImportPath": "@plasmicapp/react-web" - }, - { - "id": "8bmEUoRKkAPa", - "name": "Fetcher", - "displayName": "plasmic-data-source-fetcher", - "componentImportPath": "@plasmicapp/react-web/lib/data-sources" - } - ], - "customFunctions": [], - "jsBundleThemes": [] - }, - { - "projectId": "sqPBLwEBBKHA2WDuGb17eV", - "projectApiToken": "iSkfEguGYRieW7aywQdeHJ2kHCgSYAzIucSfo1aoYAmuxbDKSEVLpn0OWlulrvi7DOO5qF0Mrt3ZjgPrFi2RA", - "projectName": "radix-ui", - "version": ">0.0.0", - "cssFilePath": "plasmic/radix_ui/plasmic.module.css", - "components": [ - { - "id": "5nirPCGmCnRD", - "name": "Button", - "type": "managed", - "projectId": "sqPBLwEBBKHA2WDuGb17eV", - "renderModuleFilePath": "plasmic/radix_ui/PlasmicButton.tsx", - "importSpec": { - "modulePath": "Button.tsx" - }, - "cssFilePath": "plasmic/radix_ui/PlasmicButton.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "button" - } - ], - "icons": [ - { - "id": "Wyt3GMMsLefj", - "name": "ChecksvgIcon", - "moduleFilePath": "plasmic/radix_ui/icons/PlasmicIcon__Checksvg.tsx" - }, - { - "id": "MbDRsJU0e3bw", - "name": "IconIcon", - "moduleFilePath": "plasmic/radix_ui/icons/PlasmicIcon__Icon.tsx" - } - ], - "images": [], - "indirect": true, - "globalContextsFilePath": "", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "-VVCIjLHaMgA", - "name": "Popover", - "displayName": "hostless-radix-popover", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "z4QhkqHluocO", - "name": "Dialog", - "displayName": "hostless-radix-dialog", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "logdOHtqNj-h", - "name": "DialogClose", - "displayName": "hostless-radix-dialog-close", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "7LzIe7AaW4AB", - "name": "SheetContent", - "displayName": "hostless-radix-sheet-content", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "iYIxAkansYwL", - "name": "DialogContent", - "displayName": "hostless-radix-dialog-content", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "iNBmY1xCN2UL", - "name": "DialogTitle", - "displayName": "hostless-radix-dialog-title", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "92yIzUPezjQ1", - "name": "DialogDescription", - "displayName": "hostless-radix-dialog-description", - "componentImportPath": "@plasmicpkgs/radix-ui" - }, - { - "id": "wI1aJ4FfrKn1", - "name": "Tooltip", - "displayName": "hostless-radix-tooltip", - "componentImportPath": "@plasmicpkgs/radix-ui" - } - ], - "customFunctions": [], - "jsBundleThemes": [] - }, - { - "projectId": "8PtdGodUbexNYgkuyBUcWu", - "projectApiToken": "34o5R5KswluuZ4sD83F88oQrcLWsNNeUpCptQ8Okf4hYqgjnHnX2idGAlhtB7WWQQelNAInf5XFazR1cGw", - "projectName": "plasmic-embed-css", - "version": ">0.0.0", - "cssFilePath": "plasmic/plasmic_embed_css/plasmic.module.css", - "components": [], - "icons": [], - "images": [], - "indirect": true, - "globalContextsFilePath": "plasmic/plasmic_embed_css/PlasmicGlobalContextsProvider.tsx", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "qF0uJxFztB", - "name": "EmbedCss", - "displayName": "global-embed-css", - "componentImportPath": "@plasmicpkgs/plasmic-embed-css" - } - ], - "customFunctions": [], - "jsBundleThemes": [] - }, - { - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "projectApiToken": "qxq800gYC67BOqHYnTHxD4C7pBBFZm6VP4XdU8vevI8awru5kfW7ofg2msC86kBNrxxuzWwrQOpU6gvdkEg", - "projectName": "Fragment/DesignSystem", - "version": ">0.0.0", - "cssFilePath": "plasmic/fragment_design_system/plasmic.module.css", - "components": [ - { - "id": "3i84rYjQRrs4", - "name": "Avatar", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicAvatar.tsx", - "importSpec": { - "modulePath": "Avatar.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicAvatar.module.css", - "scheme": "blackbox", - "componentType": "component" - }, - { - "id": "oVzoHzMf1TLl", - "name": "Button", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicButton.tsx", - "importSpec": { - "modulePath": "Button.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicButton.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "button" - }, - { - "id": "FJiI2-N1is_F", - "name": "Dialog", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicDialog.tsx", - "importSpec": { - "modulePath": "Dialog.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicDialog.module.css", - "scheme": "blackbox", - "componentType": "component" - }, - { - "id": "1bFBcAoH0lNN", - "name": "Chip", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicChip.tsx", - "importSpec": { - "modulePath": "Chip.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicChip.module.css", - "scheme": "blackbox", - "componentType": "component" - }, - { - "id": "fa_t7ELXcm5k", - "name": "LineClamp", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicLineClamp.tsx", - "importSpec": { - "modulePath": "LineClamp.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicLineClamp.module.css", - "scheme": "blackbox", - "componentType": "component" - }, - { - "id": "CZBpNouNw7Ui", - "name": "MultilineTextInput", - "type": "managed", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "renderModuleFilePath": "plasmic/fragment_design_system/PlasmicMultilineTextInput.tsx", - "importSpec": { - "modulePath": "MultilineTextInput.tsx" - }, - "cssFilePath": "plasmic/fragment_design_system/PlasmicMultilineTextInput.module.css", - "scheme": "blackbox", - "componentType": "component" - } - ], - "icons": [ - { - "id": "eCsLCdWP9DST", - "name": "Icon17Icon", - "moduleFilePath": "plasmic/fragment_design_system/icons/PlasmicIcon__Icon17.tsx" - }, - { - "id": "xYtO5aWYRBvW", - "name": "IconIcon", - "moduleFilePath": "plasmic/fragment_design_system/icons/PlasmicIcon__Icon.tsx" - }, - { - "id": "RqwNL88PjcHS", - "name": "SearchsvgIcon", - "moduleFilePath": "plasmic/fragment_design_system/icons/PlasmicIcon__Searchsvg.tsx" - }, - { - "id": "_Qaeb-4Y8N07", - "name": "ChecksvgIcon", - "moduleFilePath": "plasmic/fragment_design_system/icons/PlasmicIcon__Checksvg.tsx" - } - ], - "images": [], - "indirect": true, - "globalContextsFilePath": "", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "mzEFNYvCTvAi", - "name": "PlasmicHead", - "displayName": "hostless-plasmic-head", - "componentImportPath": "@plasmicapp/react-web" - }, - { - "id": "QpiWJfvbJkdi", - "name": "Fetcher", - "displayName": "plasmic-data-source-fetcher", - "componentImportPath": "@plasmicapp/react-web/lib/data-sources" - } - ], - "customFunctions": [], - "jsBundleThemes": [] - }, - { - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "projectApiToken": "dsYqHeC2LBq5eJkzvPsoZ09vYZAs1uVXCjBoxTjePPnhAqsHsXGOe3NUriwIVkiOi5qj5UnWU0Wu4rTqZkoZig", - "projectName": "pricing", - "version": "latest", - "cssFilePath": "plasmic/pricing/plasmic.module.css", - "components": [ - { - "id": "g64VYoCfAKTS", - "name": "Homepage", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicHomepage.tsx", - "importSpec": { - "modulePath": "../src/pages/index.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicHomepage.module.css", - "scheme": "blackbox", - "componentType": "page", - "path": "/" - }, - { - "id": "ZdzGQGZE4mJ7", - "name": "TextInput", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicTextInput.tsx", - "importSpec": { - "modulePath": "TextInput.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicTextInput.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "text-input" - }, - { - "id": "eXdB-XBoNLdg", - "name": "Select", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicSelect.tsx", - "importSpec": { - "modulePath": "Select.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicSelect.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "select" - }, - { - "id": "qHmDd91cq7ci", - "name": "Select__Option", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicSelect__Option.tsx", - "importSpec": { - "modulePath": "Select__Option.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicSelect__Option.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "select-option" - }, - { - "id": "OiZqCFXnVtk_", - "name": "Select__OptionGroup", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicSelect__OptionGroup.tsx", - "importSpec": { - "modulePath": "Select__OptionGroup.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicSelect__OptionGroup.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "select-option-group" - }, - { - "id": "L283ckhGbtu3", - "name": "Select__Overlay", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicSelect__Overlay.tsx", - "importSpec": { - "modulePath": "Select__Overlay.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicSelect__Overlay.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "triggered-overlay" - }, - { - "id": "dk4vJhcf_j2D", - "name": "Checkbox", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicCheckbox.tsx", - "importSpec": { - "modulePath": "Checkbox.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicCheckbox.module.css", - "scheme": "blackbox", - "componentType": "component", - "plumeType": "checkbox" - }, - { - "id": "0FMc41XIUA0C", - "name": "MenuFeature", - "type": "managed", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "renderModuleFilePath": "plasmic/pricing/PlasmicMenuFeature.tsx", - "importSpec": { - "modulePath": "MenuFeature.tsx" - }, - "cssFilePath": "plasmic/pricing/PlasmicMenuFeature.module.css", - "scheme": "blackbox", - "componentType": "component" - } - ], - "icons": [ - { - "id": "2VY19-xmXXIp", - "name": "SearchsvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Searchsvg.tsx" - }, - { - "id": "22TzxIplc3cE", - "name": "ChecksvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Checksvg.tsx" - }, - { - "id": "6BOnyrSHKU5V", - "name": "ChevronDownsvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__ChevronDownsvg.tsx" - }, - { - "id": "82YD-Tor0jUQ", - "name": "ChevronUpsvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__ChevronUpsvg.tsx" - }, - { - "id": "wsKdM0teCjsm", - "name": "IconIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon.tsx" - }, - { - "id": "mWyKgupBp1Cr", - "name": "Icon2Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon2.tsx" - }, - { - "id": "jRHPVqrBy9SV", - "name": "Icon3Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon3.tsx" - }, - { - "id": "gsRGA0OcKSmi", - "name": "Icon4Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon4.tsx" - }, - { - "id": "HAnMzYJg5d76", - "name": "Icon5Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon5.tsx" - }, - { - "id": "WvR12xDIGLgz", - "name": "Icon6Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon6.tsx" - }, - { - "id": "1eqoHYLc_fOB", - "name": "Icon7Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon7.tsx" - }, - { - "id": "fEKKJ-2F5BD1", - "name": "Icon8Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon8.tsx" - }, - { - "id": "JK4sPT7lqUH1", - "name": "Icon9Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon9.tsx" - }, - { - "id": "5Kdxmn_uOBnI", - "name": "Icon10Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon10.tsx" - }, - { - "id": "YXzAIe4mJWDL", - "name": "Icon11Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon11.tsx" - }, - { - "id": "MFDv12-mmwTj", - "name": "SquaresvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Squaresvg.tsx" - }, - { - "id": "JhqU_pVwANVN", - "name": "SquareCheckFilledsvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__SquareCheckFilledsvg.tsx" - }, - { - "id": "gqt0H-uJ-Xg8", - "name": "SquareMinussvgIcon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__SquareMinussvg.tsx" - }, - { - "id": "8GqB7Ju9fvrK", - "name": "Icon12Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon12.tsx" - }, - { - "id": "pmluLmEGECI6", - "name": "Icon13Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon13.tsx" - }, - { - "id": "KibdjfOFOCp3", - "name": "Icon14Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon14.tsx" - }, - { - "id": "jAui2HVvT8Qw", - "name": "Icon15Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon15.tsx" - }, - { - "id": "wgGgWP4KVX41", - "name": "Icon16Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon16.tsx" - }, - { - "id": "j9YlsTC9FYO_", - "name": "Icon17Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon17.tsx" - }, - { - "id": "sLZRs4d-Nkod", - "name": "Icon18Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon18.tsx" - }, - { - "id": "5bp8lGg8G7HU", - "name": "Icon19Icon", - "moduleFilePath": "plasmic/pricing/icons/PlasmicIcon__Icon19.tsx" - } - ], - "images": [ - { - "id": "2mpvjEcDOPA5", - "name": "image", - "filePath": "../public/plasmic/pricing/images/image.svg" - }, - { - "id": "-ntPJdjA0KGE", - "name": "logo.5e03fe79.svg", - "filePath": "../public/plasmic/pricing/images/logo5E03Fe79Svg.svg" - } - ], - "indirect": false, - "globalContextsFilePath": "plasmic/pricing/PlasmicGlobalContextsProvider.tsx", - "splitsProviderFilePath": "", - "codeComponents": [ - { - "id": "Y7x8T3r63_t7", - "name": "PlasmicHead", - "displayName": "hostless-plasmic-head", - "componentImportPath": "@plasmicapp/react-web" - }, - { - "id": "vxf7QVWAuDhX", - "name": "Fetcher", - "displayName": "plasmic-data-source-fetcher", - "componentImportPath": "@plasmicapp/react-web/lib/data-sources" - }, - { - "id": "rq1pFzAXsE9z", - "name": "DatePicker", - "displayName": "DatePicker", - "componentImportPath": "@/fragment/components/date-picker" - }, - { - "id": "w_Nty63X2o-t", - "name": "TimePicker", - "displayName": "TimePicker", - "componentImportPath": "@/fragment/components/time-picker" - }, - { - "id": "7LNGFaQ1WVv-", - "name": "Popover", - "displayName": "Popover", - "componentImportPath": "@/fragment/components/popover" - }, - { - "id": "Un2ikOagWEY9", - "name": "Fragment", - "displayName": "Fragment", - "componentImportPath": "@/fragment/fragment" - }, - { - "id": "-aZML1EcKLz0", - "name": "GrowthBook", - "displayName": "GrowthBook", - "componentImportPath": "@/fragment/growthbook" - }, - { - "id": "A4mXljoSlg6E", - "name": "Splunk", - "displayName": "Splunk", - "componentImportPath": "@/fragment/splunk" - }, - { - "id": "M1-4Te7Kf9_v", - "name": "Select", - "displayName": "Select", - "componentImportPath": "@/fragment/components/select" - }, - { - "id": "yi2DFxegVSb9", - "name": "Input", - "displayName": "Input", - "componentImportPath": "@/fragment/components/input" - }, - { - "id": "Dp5S3zaeC1yD", - "name": "Switch", - "displayName": "Switch", - "componentImportPath": "@/fragment/components/switch" - }, - { - "id": "IwfvOcf1tP7X", - "name": "Slider", - "displayName": "Slider", - "componentImportPath": "@/fragment/components/slider" - }, - { - "id": "du8dIdosOH2V", - "name": "ApiRequest", - "displayName": "ApiRequest", - "componentImportPath": "@/fragment/components/api-request" - } - ], - "customFunctions": [] - } - ], - "globalVariants": { - "variantGroups": [ - { - "id": "BR2UhI7ulpvR", - "name": "Screen", - "projectId": "oBJtsp5RgVpcN6KCrDTuQT", - "contextFilePath": "plasmic/fragment_icons/PlasmicGlobalVariant__Screen.tsx" - }, - { - "id": "QmLtHiTXdNxv", - "name": "Screen", - "projectId": "h9Dbk9ygddw7UVEq1NNhKi", - "contextFilePath": "plasmic/fragment_design_system/PlasmicGlobalVariant__Screen.tsx" - }, - { - "id": "ebUcSKv8j57Q", - "name": "Screen", - "projectId": "seYsnBL1P3AiXaFGNEMUUM", - "contextFilePath": "plasmic/pricing/PlasmicGlobalVariant__Screen.tsx" - } - ] - }, + "projects": [], + "globalVariants": {}, "wrapPagesWithGlobalContexts": true, "nextjsConfig": { "pagesDir": "../src/pages" }, - "cliVersion": "0.1.331", - "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.331/dist/plasmic.schema.json" + "cliVersion": "0.1.330", + "$schema": "https://unpkg.com/@plasmicapp/cli@0.1.330/dist/plasmic.schema.json" } diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx new file mode 100644 index 00000000..82cc71cc --- /dev/null +++ b/src/components/ui/chart.tsx @@ -0,0 +1,361 @@ +import * as React from "react" +import * as RechartsPrimitive from "recharts" + +import { cn } from "@/lib/utils" + +// Format: { THEME_NAME: CSS_SELECTOR } +const THEMES = { light: "", dark: ".dark" } as const + +export type ChartConfig = { + [k in string]: { + label?: React.ReactNode + icon?: React.ComponentType + } & ( + | { color?: string; theme?: never } + | { color?: never; theme: Record } + ) +} + +type ChartContextProps = { + config: ChartConfig +} + +const ChartContext = React.createContext(null) + +function useChart() { + const context = React.useContext(ChartContext) + + if (!context) { + throw new Error("useChart must be used within a ") + } + + return context +} + +const ChartContainer = React.forwardRef< + HTMLDivElement, + React.ComponentProps<"div"> & { + config: ChartConfig + children: React.ComponentProps< + typeof RechartsPrimitive.ResponsiveContainer + >["children"] + } +>(({ id, className, children, config, ...props }, ref) => { + const uniqueId = React.useId() + const chartId = `chart-${id || uniqueId.replace(/:/g, "")}` + + return ( + +
+ + + {children} + +
+
+ ) +}) +ChartContainer.displayName = "Chart" + +const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => { + const colorConfig = Object.entries(config).filter( + ([_, config]) => config.theme || config.color + ) + + if (!colorConfig.length) { + return null + } + + return ( +