pixelize-design-library 2.2.198 → 2.3.1-beta.1
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/.claude/settings.local.json +24 -0
- package/coverage/clover.xml +638 -0
- package/coverage/coverage-final.json +20 -0
- package/coverage/lcov-report/Table/CompactSelect.tsx.html +379 -0
- package/coverage/lcov-report/Table/Components/ActiveFilters.tsx.html +514 -0
- package/coverage/lcov-report/Table/Components/HeaderActions.tsx.html +373 -0
- package/coverage/lcov-report/Table/Components/Pagination.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableActions.tsx.html +574 -0
- package/coverage/lcov-report/Table/Components/TableBody.tsx.html +1027 -0
- package/coverage/lcov-report/Table/Components/TableFilters.tsx.html +397 -0
- package/coverage/lcov-report/Table/Components/TableHeader.tsx.html +1060 -0
- package/coverage/lcov-report/Table/Components/TableLoading.tsx.html +361 -0
- package/coverage/lcov-report/Table/Components/TableSearch.tsx.html +337 -0
- package/coverage/lcov-report/Table/Components/index.html +266 -0
- package/coverage/lcov-report/Table/Components/useDebounce.ts.html +178 -0
- package/coverage/lcov-report/Table/Components/useTable.ts.html +778 -0
- package/coverage/lcov-report/Table/LeftFilterPane.tsx.html +1810 -0
- package/coverage/lcov-report/Table/SelectOperationControls.tsx.html +178 -0
- package/coverage/lcov-report/Table/Table.tsx.html +1567 -0
- package/coverage/lcov-report/Table/TableProps.tsx.html +658 -0
- package/coverage/lcov-report/Table/TableSettings/ManageColumns.tsx.html +619 -0
- package/coverage/lcov-report/Table/TableSettings/TableFilters.tsx.html +229 -0
- package/coverage/lcov-report/Table/TableSettings/TableSettings.tsx.html +532 -0
- package/coverage/lcov-report/Table/TableSettings/index.html +146 -0
- package/coverage/lcov-report/Table/TableToDo.tsx.html +973 -0
- package/coverage/lcov-report/Table/TextOperationControls.tsx.html +271 -0
- package/coverage/lcov-report/Table/filterTypes.ts.html +97 -0
- package/coverage/lcov-report/Table/index.html +176 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +1836 -0
- package/dist/App.d.ts +4 -0
- package/dist/App.js +131 -0
- package/dist/Assets/defaultLogo.tsx +31 -0
- package/dist/Components/Button/Button.styles.js +44 -3
- package/dist/Components/Button/ButtonProps.d.ts +1 -1
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +2 -2
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +50 -38
- package/dist/Components/Checkbox/Checkbox.js +2 -2
- package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
- package/dist/Components/Common/FormLabel.d.ts +2 -1
- package/dist/Components/Common/FormLabel.js +8 -9
- package/dist/Components/Common/fieldStyles.d.ts +22 -0
- package/dist/Components/Common/fieldStyles.js +42 -0
- package/dist/Components/DatePicker/CalendarPanel.d.ts +2 -0
- package/dist/Components/DatePicker/CalendarPanel.js +104 -65
- package/dist/Components/DatePicker/RangeDatePicker.js +37 -16
- package/dist/Components/DatePicker/SingleDatePicker.js +16 -16
- package/dist/Components/DatePicker/TimePicker.js +4 -4
- package/dist/Components/Input/Input/Input.d.ts +1 -1
- package/dist/Components/Input/Input/Input.js +5 -4
- package/dist/Components/Input/Input/InputProps.d.ts +2 -0
- package/dist/Components/Input/TextInput.styles.js +2 -1
- package/dist/Components/InputTextArea/InputTextArea.style.js +2 -1
- package/dist/Components/MultiSelect/MultiSelect.js +11 -12
- package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +54 -27
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +1 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +44 -40
- package/dist/Components/NumberInput/NumberInput.styles.js +2 -1
- package/dist/Components/PinInput/PinInput.d.ts +1 -1
- package/dist/Components/PinInput/PinInput.js +3 -2
- package/dist/Components/PinInput/PinInputProps.d.ts +4 -0
- package/dist/Components/RadioButton/RadioButton.js +1 -1
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +3 -3
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +2 -0
- package/dist/Components/Select/Select.styles.js +2 -1
- package/dist/Components/SelectSearch/SelectSearch.js +7 -4
- package/dist/Components/SideBar/SecondaryBar.js +20 -18
- package/dist/Components/SideBar/SideBar.d.ts +1 -1
- package/dist/Components/SideBar/SideBar.js +58 -43
- package/dist/Components/SideBar/SideBarProps.d.ts +14 -3
- package/dist/Components/SideBar/components/MenuItemBox.js +28 -24
- package/dist/Components/SideBar/components/MenuItems.js +16 -2
- package/dist/Components/SideBar/components/MenuPopoverContent.js +16 -16
- package/dist/Components/SideBar/components/OtherApps.js +16 -14
- package/dist/Components/Table/Components/TableBody.d.ts +5 -1
- package/dist/Components/Table/Components/TableBody.js +133 -31
- package/dist/Components/Table/Components/TableGroupRow.d.ts +15 -0
- package/dist/Components/Table/Components/TableGroupRow.js +27 -0
- package/dist/Components/Table/Components/TableHeader.js +23 -9
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Table/Table.js +119 -38
- package/dist/Components/Table/TableProps.d.ts +34 -2
- package/dist/Components/Table/filters/ActiveFilters.d.ts +9 -0
- package/dist/Components/Table/filters/ActiveFilters.js +132 -0
- package/dist/Components/Table/filters/CompactSelect.d.ts +15 -0
- package/dist/Components/Table/filters/CompactSelect.js +69 -0
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +36 -0
- package/dist/Components/Table/filters/LeftFilterPane.js +273 -0
- package/dist/Components/Table/filters/SelectOperationControls.d.ts +8 -0
- package/dist/Components/Table/filters/SelectOperationControls.js +15 -0
- package/dist/Components/Table/filters/TableFilters.d.ts +7 -0
- package/dist/Components/Table/filters/TableFilters.js +89 -0
- package/dist/Components/Table/filters/TextOperationControls.d.ts +12 -0
- package/dist/Components/Table/filters/TextOperationControls.js +29 -0
- package/dist/Components/Table/hooks/useDebounce.d.ts +2 -0
- package/dist/Components/Table/hooks/useDebounce.js +28 -0
- package/dist/Components/Table/hooks/useTable.d.ts +47 -0
- package/dist/Components/Table/hooks/useTable.js +219 -0
- package/dist/Components/Table/settings/ManageColumns.d.ts +12 -0
- package/dist/Components/Table/settings/ManageColumns.js +166 -0
- package/dist/Components/Table/settings/ManageColumns.test.d.ts +1 -0
- package/dist/Components/Table/settings/ManageColumns.test.js +146 -0
- package/dist/Components/Table/settings/TableSettings.d.ts +10 -0
- package/dist/Components/Table/settings/TableSettings.js +141 -0
- package/dist/Layout.d.ts +3 -0
- package/dist/Layout.js +292 -0
- package/dist/Pages/TInput.d.ts +3 -0
- package/dist/Pages/TInput.js +56 -0
- package/dist/Pages/accordion.d.ts +3 -0
- package/dist/Pages/accordion.js +42 -0
- package/dist/Pages/alertdialog.d.ts +3 -0
- package/dist/Pages/alertdialog.js +54 -0
- package/dist/Pages/button.d.ts +3 -0
- package/dist/Pages/button.js +46 -0
- package/dist/Pages/card.d.ts +3 -0
- package/dist/Pages/card.js +117 -0
- package/dist/Pages/chart.d.ts +4 -0
- package/dist/Pages/chart.js +40 -0
- package/dist/Pages/checkbox.d.ts +3 -0
- package/dist/Pages/checkbox.js +12 -0
- package/dist/Pages/contactForm.d.ts +3 -0
- package/dist/Pages/contactForm.js +16 -0
- package/dist/Pages/datePick.d.ts +3 -0
- package/dist/Pages/datePick.js +88 -0
- package/dist/Pages/drawer.d.ts +3 -0
- package/dist/Pages/drawer.js +58 -0
- package/dist/Pages/dropdown.d.ts +3 -0
- package/dist/Pages/dropdown.js +24 -0
- package/dist/Pages/editor.d.ts +3 -0
- package/dist/Pages/editor.js +14 -0
- package/dist/Pages/feedback.d.ts +2 -0
- package/dist/Pages/feedback.js +15 -0
- package/dist/Pages/fileUpload.d.ts +2 -0
- package/dist/Pages/fileUpload.js +82 -0
- package/dist/Pages/input.d.ts +3 -0
- package/dist/Pages/input.js +92 -0
- package/dist/Pages/kanbanboard.d.ts +3 -0
- package/dist/Pages/kanbanboard.js +224 -0
- package/dist/Pages/modal.d.ts +3 -0
- package/dist/Pages/modal.js +65 -0
- package/dist/Pages/multiSelect.d.ts +3 -0
- package/dist/Pages/multiSelect.js +55 -0
- package/dist/Pages/noteArea.d.ts +3 -0
- package/dist/Pages/noteArea.js +59 -0
- package/dist/Pages/notification.d.ts +3 -0
- package/dist/Pages/notification.js +25 -0
- package/dist/Pages/numberInput.d.ts +3 -0
- package/dist/Pages/numberInput.js +49 -0
- package/dist/Pages/photoViewer.d.ts +3 -0
- package/dist/Pages/photoViewer.js +12 -0
- package/dist/Pages/pinInputs.d.ts +3 -0
- package/dist/Pages/pinInputs.js +12 -0
- package/dist/Pages/productCaard.d.ts +3 -0
- package/dist/Pages/productCaard.js +311 -0
- package/dist/Pages/productDetailCard.d.ts +3 -0
- package/dist/Pages/productDetailCard.js +78 -0
- package/dist/Pages/productFilter.d.ts +3 -0
- package/dist/Pages/productFilter.js +202 -0
- package/dist/Pages/progressbar.d.ts +3 -0
- package/dist/Pages/progressbar.js +12 -0
- package/dist/Pages/radioButton.d.ts +3 -0
- package/dist/Pages/radioButton.js +54 -0
- package/dist/Pages/search.d.ts +3 -0
- package/dist/Pages/search.js +54 -0
- package/dist/Pages/searchSelect.d.ts +3 -0
- package/dist/Pages/searchSelect.js +133 -0
- package/dist/Pages/select.d.ts +3 -0
- package/dist/Pages/select.js +53 -0
- package/dist/Pages/selectSearch.d.ts +3 -0
- package/dist/Pages/selectSearch.js +103 -0
- package/dist/Pages/skeleton.d.ts +3 -0
- package/dist/Pages/skeleton.js +22 -0
- package/dist/Pages/switch.d.ts +3 -0
- package/dist/Pages/switch.js +50 -0
- package/dist/Pages/table.d.ts +3 -0
- package/dist/Pages/table.js +174 -0
- package/dist/Pages/textArea.d.ts +3 -0
- package/dist/Pages/textArea.js +15 -0
- package/dist/Pages/timeline.d.ts +3 -0
- package/dist/Pages/timeline.js +74 -0
- package/dist/Pages/tooltip.d.ts +3 -0
- package/dist/Pages/tooltip.js +12 -0
- package/dist/Pages/toster.d.ts +3 -0
- package/dist/Pages/toster.js +68 -0
- package/dist/Pages/verifyEmail.d.ts +3 -0
- package/dist/Pages/verifyEmail.js +18 -0
- package/dist/Theme/Dark/palette.d.ts +370 -0
- package/dist/Theme/Dark/palette.js +372 -0
- package/dist/Theme/Default/palette.d.ts +4 -0
- package/dist/Theme/Default/palette.js +3 -0
- package/dist/Theme/Emerald/palette.d.ts +4 -0
- package/dist/Theme/Emerald/palette.js +2 -1
- package/dist/Theme/Meadow/palette.d.ts +4 -0
- package/dist/Theme/Meadow/palette.js +2 -1
- package/dist/Theme/Radiant/palette.d.ts +4 -0
- package/dist/Theme/Radiant/palette.js +2 -1
- package/dist/Theme/Rosewood/palette.d.ts +4 -0
- package/dist/Theme/Rosewood/palette.js +2 -1
- package/dist/Theme/Skyline/palette.d.ts +4 -0
- package/dist/Theme/Skyline/palette.js +2 -1
- package/dist/Theme/Slate/palette.d.ts +4 -0
- package/dist/Theme/Slate/palette.js +2 -1
- package/dist/Theme/themeProps.d.ts +4 -0
- package/dist/Utils/table.d.ts +21 -0
- package/dist/Utils/table.js +98 -14
- package/dist/bootstrap.d.ts +1 -0
- package/dist/bootstrap.js +14 -0
- package/dist/components-v2/AlertDialog/AlertDialog.d.ts +23 -0
- package/dist/components-v2/AlertDialog/AlertDialog.js +98 -0
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.d.ts +14 -0
- package/dist/components-v2/Breadcrumbs/Breadcrumbs.js +66 -0
- package/dist/components-v2/Charts/AreaChart.d.ts +23 -0
- package/dist/components-v2/Charts/AreaChart.js +63 -0
- package/dist/components-v2/Charts/BarChart.d.ts +25 -0
- package/dist/components-v2/Charts/BarChart.js +57 -0
- package/dist/components-v2/Charts/LineChart.d.ts +23 -0
- package/dist/components-v2/Charts/LineChart.js +55 -0
- package/dist/components-v2/Charts/PieChart.d.ts +15 -0
- package/dist/components-v2/Charts/PieChart.js +54 -0
- package/dist/components-v2/Charts/PolarChart.d.ts +14 -0
- package/dist/components-v2/Charts/PolarChart.js +54 -0
- package/dist/components-v2/Charts/chartOptions.d.ts +7 -0
- package/dist/components-v2/Charts/chartOptions.js +41 -0
- package/dist/components-v2/Charts/useChartTheme.d.ts +22 -0
- package/dist/components-v2/Charts/useChartTheme.js +106 -0
- package/dist/components-v2/ContactForm/ContactForm.d.ts +25 -0
- package/dist/components-v2/ContactForm/ContactForm.js +116 -0
- package/dist/components-v2/DatePicker/Calendar.d.ts +19 -0
- package/dist/components-v2/DatePicker/Calendar.js +212 -0
- package/dist/components-v2/DatePicker/DatePicker.d.ts +46 -0
- package/dist/components-v2/DatePicker/DatePicker.js +189 -0
- package/dist/components-v2/DatePicker/TimePicker.d.ts +12 -0
- package/dist/components-v2/DatePicker/TimePicker.js +105 -0
- package/dist/components-v2/DatePicker/utils.d.ts +31 -0
- package/dist/components-v2/DatePicker/utils.js +109 -0
- package/dist/components-v2/Drawer/Drawer.d.ts +27 -0
- package/dist/components-v2/Drawer/Drawer.js +132 -0
- package/dist/components-v2/FeedbackForm/FeedbackForm.d.ts +26 -0
- package/dist/components-v2/FeedbackForm/FeedbackForm.js +112 -0
- package/dist/components-v2/FileUploader/FileUploader.d.ts +28 -0
- package/dist/components-v2/FileUploader/FileUploader.js +127 -0
- package/dist/components-v2/Input/TextInput.d.ts +41 -0
- package/dist/components-v2/Input/TextInput.js +169 -0
- package/dist/components-v2/KanbanBoard/KanbanBoard.d.ts +39 -0
- package/dist/components-v2/KanbanBoard/KanbanBoard.js +101 -0
- package/dist/components-v2/Layout/AppLayout.d.ts +22 -0
- package/dist/components-v2/Layout/AppLayout.js +53 -0
- package/dist/components-v2/Loading/Loading.d.ts +19 -0
- package/dist/components-v2/Loading/Loading.js +55 -0
- package/dist/components-v2/Modal/Modal.d.ts +30 -0
- package/dist/components-v2/Modal/Modal.js +82 -0
- package/dist/components-v2/NavigationBar/NavigationBar.d.ts +47 -0
- package/dist/components-v2/NavigationBar/NavigationBar.js +148 -0
- package/dist/components-v2/Notification/Notification.d.ts +22 -0
- package/dist/components-v2/Notification/Notification.js +113 -0
- package/dist/components-v2/NumberInput/NumberInput.d.ts +37 -0
- package/dist/components-v2/NumberInput/NumberInput.js +210 -0
- package/dist/components-v2/PinInput/PinInput.d.ts +26 -0
- package/dist/components-v2/PinInput/PinInput.js +138 -0
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +18 -0
- package/dist/components-v2/ProfilePhotoViewer/ProfilePhotoViewer.js +91 -0
- package/dist/components-v2/Select/Select.d.ts +41 -0
- package/dist/components-v2/Select/Select.js +284 -0
- package/dist/components-v2/Sidebar/Sidebar.d.ts +41 -0
- package/dist/components-v2/Sidebar/Sidebar.js +182 -0
- package/dist/components-v2/Slider/Slider.d.ts +18 -0
- package/dist/components-v2/Slider/Slider.js +101 -0
- package/dist/components-v2/Table/Table.d.ts +7 -0
- package/dist/components-v2/Table/Table.js +172 -0
- package/dist/components-v2/Table/TableProps.d.ts +139 -0
- package/dist/components-v2/Table/TableProps.js +9 -0
- package/dist/components-v2/Table/components/ActiveFilters.d.ts +10 -0
- package/dist/components-v2/Table/components/ActiveFilters.js +70 -0
- package/dist/components-v2/Table/components/BulkActionBar.d.ts +11 -0
- package/dist/components-v2/Table/components/BulkActionBar.js +92 -0
- package/dist/components-v2/Table/components/ColumnResizeHandle.d.ts +7 -0
- package/dist/components-v2/Table/components/ColumnResizeHandle.js +41 -0
- package/dist/components-v2/Table/components/Pagination.d.ts +11 -0
- package/dist/components-v2/Table/components/Pagination.js +92 -0
- package/dist/components-v2/Table/components/TableBody.d.ts +23 -0
- package/dist/components-v2/Table/components/TableBody.js +69 -0
- package/dist/components-v2/Table/components/TableCell.d.ts +14 -0
- package/dist/components-v2/Table/components/TableCell.js +63 -0
- package/dist/components-v2/Table/components/TableEmptyState.d.ts +12 -0
- package/dist/components-v2/Table/components/TableEmptyState.js +55 -0
- package/dist/components-v2/Table/components/TableErrorState.d.ts +6 -0
- package/dist/components-v2/Table/components/TableErrorState.js +52 -0
- package/dist/components-v2/Table/components/TableHeader.d.ts +21 -0
- package/dist/components-v2/Table/components/TableHeader.js +94 -0
- package/dist/components-v2/Table/components/TableRow.d.ts +20 -0
- package/dist/components-v2/Table/components/TableRow.js +64 -0
- package/dist/components-v2/Table/components/TableSearch.d.ts +8 -0
- package/dist/components-v2/Table/components/TableSearch.js +47 -0
- package/dist/components-v2/Table/filters/FilterChips.d.ts +6 -0
- package/dist/components-v2/Table/filters/FilterChips.js +9 -0
- package/dist/components-v2/Table/filters/LeftFilterPane.d.ts +17 -0
- package/dist/components-v2/Table/filters/LeftFilterPane.js +105 -0
- package/dist/components-v2/Table/filters/TableFilters.d.ts +12 -0
- package/dist/components-v2/Table/filters/TableFilters.js +127 -0
- package/dist/components-v2/Table/hooks/useColumnResize.d.ts +15 -0
- package/dist/components-v2/Table/hooks/useColumnResize.js +104 -0
- package/dist/components-v2/Table/hooks/useTable.d.ts +58 -0
- package/dist/components-v2/Table/hooks/useTable.js +254 -0
- package/dist/components-v2/Table/hooks/useTableKeyboard.d.ts +25 -0
- package/dist/components-v2/Table/hooks/useTableKeyboard.js +112 -0
- package/dist/components-v2/Table/hooks/useVirtualScroll.d.ts +29 -0
- package/dist/components-v2/Table/hooks/useVirtualScroll.js +83 -0
- package/dist/components-v2/Table/settings/ManageColumns.d.ts +12 -0
- package/dist/components-v2/Table/settings/ManageColumns.js +59 -0
- package/dist/components-v2/Table/settings/TableSettings.d.ts +12 -0
- package/dist/components-v2/Table/settings/TableSettings.js +57 -0
- package/dist/components-v2/Table/utils/filterUtils.d.ts +7 -0
- package/dist/components-v2/Table/utils/filterUtils.js +149 -0
- package/dist/components-v2/Table/utils/sortUtils.d.ts +6 -0
- package/dist/components-v2/Table/utils/sortUtils.js +65 -0
- package/dist/components-v2/Tag/Tag.d.ts +15 -0
- package/dist/components-v2/Tag/Tag.js +87 -0
- package/dist/components-v2/Timeline/Timeline.d.ts +18 -0
- package/dist/components-v2/Timeline/Timeline.js +76 -0
- package/dist/components-v2/Toaster/Toaster.d.ts +61 -0
- package/dist/components-v2/Toaster/Toaster.js +63 -0
- package/dist/components-v2/Toggle/Toggle.d.ts +28 -0
- package/dist/components-v2/Toggle/Toggle.js +90 -0
- package/dist/components-v2/ui/accordion.d.ts +12 -0
- package/dist/components-v2/ui/accordion.js +104 -0
- package/dist/components-v2/ui/alert.d.ts +18 -0
- package/dist/components-v2/ui/alert.js +99 -0
- package/dist/components-v2/ui/avatar.d.ts +12 -0
- package/dist/components-v2/ui/avatar.js +80 -0
- package/dist/components-v2/ui/badge.d.ts +10 -0
- package/dist/components-v2/ui/badge.js +76 -0
- package/dist/components-v2/ui/button.d.ts +18 -0
- package/dist/components-v2/ui/button.js +97 -0
- package/dist/components-v2/ui/checkbox.d.ts +15 -0
- package/dist/components-v2/ui/checkbox.js +86 -0
- package/dist/components-v2/ui/dialog.d.ts +30 -0
- package/dist/components-v2/ui/dialog.js +115 -0
- package/dist/components-v2/ui/dropdown-menu.d.ts +26 -0
- package/dist/components-v2/ui/dropdown-menu.js +121 -0
- package/dist/components-v2/ui/field.d.ts +32 -0
- package/dist/components-v2/ui/field.js +62 -0
- package/dist/components-v2/ui/form-field.d.ts +25 -0
- package/dist/components-v2/ui/form-field.js +96 -0
- package/dist/components-v2/ui/input.d.ts +9 -0
- package/dist/components-v2/ui/input.js +73 -0
- package/dist/components-v2/ui/label.d.ts +10 -0
- package/dist/components-v2/ui/label.js +70 -0
- package/dist/components-v2/ui/popover.d.ts +9 -0
- package/dist/components-v2/ui/popover.js +60 -0
- package/dist/components-v2/ui/progress.d.ts +12 -0
- package/dist/components-v2/ui/progress.js +75 -0
- package/dist/components-v2/ui/radio-group.d.ts +17 -0
- package/dist/components-v2/ui/radio-group.js +91 -0
- package/dist/components-v2/ui/select.d.ts +24 -0
- package/dist/components-v2/ui/select.js +122 -0
- package/dist/components-v2/ui/separator.d.ts +5 -0
- package/dist/components-v2/ui/separator.js +55 -0
- package/dist/components-v2/ui/skeleton.d.ts +9 -0
- package/dist/components-v2/ui/skeleton.js +68 -0
- package/dist/components-v2/ui/spinner.d.ts +16 -0
- package/dist/components-v2/ui/spinner.js +64 -0
- package/dist/components-v2/ui/switch.d.ts +10 -0
- package/dist/components-v2/ui/switch.js +81 -0
- package/dist/components-v2/ui/tabs.d.ts +13 -0
- package/dist/components-v2/ui/tabs.js +95 -0
- package/dist/components-v2/ui/textarea.d.ts +10 -0
- package/dist/components-v2/ui/textarea.js +96 -0
- package/dist/components-v2/ui/tooltip.d.ts +17 -0
- package/dist/components-v2/ui/tooltip.js +75 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +8 -0
- package/dist/theme-v2/ThemeProvider.d.ts +19 -0
- package/dist/theme-v2/ThemeProvider.js +149 -0
- package/dist/theme-v2/dark.css +47 -0
- package/dist/theme-v2/tokens.css +72 -0
- package/package.json +2 -2
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ProductCard_1 = __importDefault(require("../Components/ProductCard/ProductCard"));
|
|
8
|
+
var react_2 = require("@chakra-ui/react");
|
|
9
|
+
var productCaard = function () {
|
|
10
|
+
var Products = [
|
|
11
|
+
{
|
|
12
|
+
"productId": 12,
|
|
13
|
+
"label": "hello",
|
|
14
|
+
"description": "hh",
|
|
15
|
+
"batch": {
|
|
16
|
+
"color": "red",
|
|
17
|
+
"label": "nh"
|
|
18
|
+
},
|
|
19
|
+
"tags": [],
|
|
20
|
+
"rating": 1,
|
|
21
|
+
"reviews": 0,
|
|
22
|
+
"images": [
|
|
23
|
+
{
|
|
24
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
25
|
+
"imageId": 9,
|
|
26
|
+
"order": 4,
|
|
27
|
+
"isImage": true
|
|
28
|
+
},
|
|
29
|
+
// {
|
|
30
|
+
// "imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376124/main_sweets/1763376123548-Mothichoor%20%281%29.jpg",
|
|
31
|
+
// "imageId": 10,
|
|
32
|
+
// "order": 5
|
|
33
|
+
// }
|
|
34
|
+
],
|
|
35
|
+
"options": [
|
|
36
|
+
{
|
|
37
|
+
"var_id": 6,
|
|
38
|
+
"unit": 2,
|
|
39
|
+
"label": "hho",
|
|
40
|
+
"offer": 5,
|
|
41
|
+
"price": 800,
|
|
42
|
+
"weight": 200,
|
|
43
|
+
"offerPrice": "475",
|
|
44
|
+
"stocks": 2
|
|
45
|
+
},
|
|
46
|
+
// {
|
|
47
|
+
// "var_id": 7,
|
|
48
|
+
// "unit": 2,
|
|
49
|
+
// "label": "hho",
|
|
50
|
+
// "offer": 5,
|
|
51
|
+
// "price": 600,
|
|
52
|
+
// "weight": 200,
|
|
53
|
+
// "offerPrice": "475",
|
|
54
|
+
// "stocks": 5
|
|
55
|
+
// },
|
|
56
|
+
// {
|
|
57
|
+
// "var_id": 8,
|
|
58
|
+
// "unit": 2,
|
|
59
|
+
// "label": "hho",
|
|
60
|
+
// "offer": 5,
|
|
61
|
+
// "price": 400,
|
|
62
|
+
// "weight": 200,
|
|
63
|
+
// "offerPrice": "475",
|
|
64
|
+
// "stocks": 5
|
|
65
|
+
// },
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"productId": 13,
|
|
70
|
+
"label": "hellovideo",
|
|
71
|
+
"description": "hh",
|
|
72
|
+
"batch": {
|
|
73
|
+
"color": "red",
|
|
74
|
+
"label": "nh"
|
|
75
|
+
},
|
|
76
|
+
"tags": [
|
|
77
|
+
"hwnjncdsncidjncsdncsjncjnvjnvjsnvjnsdvkjnsdvkjnsdvkjnsdvkjn", "jbjkbjbj"
|
|
78
|
+
],
|
|
79
|
+
"rating": 2,
|
|
80
|
+
"reviews": 0,
|
|
81
|
+
"images": [
|
|
82
|
+
{
|
|
83
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
84
|
+
"imageId": 9,
|
|
85
|
+
"order": 4,
|
|
86
|
+
"isImage": true
|
|
87
|
+
}, {
|
|
88
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376124/main_sweets/1763376123548-Mothichoor%20%281%29.jpg",
|
|
89
|
+
"imageId": 10,
|
|
90
|
+
"order": 5,
|
|
91
|
+
"isImage": false
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"options": [
|
|
95
|
+
{
|
|
96
|
+
"var_id": 6,
|
|
97
|
+
"unit": 2,
|
|
98
|
+
"label": "hhhgbjhbjhbjhbkjbkjnkjnkjbkjbkjbkjbjhvjhvbjhvjhvjhvjhvo",
|
|
99
|
+
"offer": 5,
|
|
100
|
+
"price": 800,
|
|
101
|
+
"weight": 200,
|
|
102
|
+
"offerPrice": "475",
|
|
103
|
+
"stocks": 2
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"var_id": 7,
|
|
107
|
+
"unit": 2,
|
|
108
|
+
"label": "hho",
|
|
109
|
+
"offer": 5,
|
|
110
|
+
"price": 600,
|
|
111
|
+
"weight": 200,
|
|
112
|
+
"offerPrice": "475",
|
|
113
|
+
"stocks": 5
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"var_id": 8,
|
|
117
|
+
"unit": 2,
|
|
118
|
+
"label": "hho",
|
|
119
|
+
"offer": 5,
|
|
120
|
+
"price": 400,
|
|
121
|
+
"weight": 200,
|
|
122
|
+
"offerPrice": "475",
|
|
123
|
+
"stocks": 5
|
|
124
|
+
},
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"productId": 14,
|
|
129
|
+
"label": "hello",
|
|
130
|
+
"description": "hh",
|
|
131
|
+
"batch": {
|
|
132
|
+
"color": "red",
|
|
133
|
+
"label": "nh"
|
|
134
|
+
},
|
|
135
|
+
"tags": [
|
|
136
|
+
"hw", "new"
|
|
137
|
+
],
|
|
138
|
+
"rating": 3,
|
|
139
|
+
"reviews": 0,
|
|
140
|
+
"images": [
|
|
141
|
+
{
|
|
142
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
143
|
+
"imageId": 9,
|
|
144
|
+
"order": 4,
|
|
145
|
+
"isImage": true
|
|
146
|
+
}, {
|
|
147
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376124/main_sweets/1763376123548-Mothichoor%20%281%29.jpg",
|
|
148
|
+
"imageId": 10,
|
|
149
|
+
"order": 5,
|
|
150
|
+
"isImage": true
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"options": [
|
|
154
|
+
{
|
|
155
|
+
"var_id": 6,
|
|
156
|
+
"unit": 2,
|
|
157
|
+
"label": "hho",
|
|
158
|
+
"offer": 5,
|
|
159
|
+
"price": 800,
|
|
160
|
+
"weight": 200,
|
|
161
|
+
"offerPrice": "475",
|
|
162
|
+
"stocks": 2
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"var_id": 7,
|
|
166
|
+
"unit": 2,
|
|
167
|
+
"label": "hho",
|
|
168
|
+
"offer": 5,
|
|
169
|
+
"price": 600,
|
|
170
|
+
"weight": 200,
|
|
171
|
+
"offerPrice": "475",
|
|
172
|
+
"stocks": 5
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"var_id": 8,
|
|
176
|
+
"unit": 2,
|
|
177
|
+
"label": "hho",
|
|
178
|
+
"offer": 5,
|
|
179
|
+
"price": 400,
|
|
180
|
+
"weight": 200,
|
|
181
|
+
"offerPrice": "475",
|
|
182
|
+
"stocks": 5
|
|
183
|
+
},
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"productId": 15,
|
|
188
|
+
"label": "hello",
|
|
189
|
+
"description": "hh",
|
|
190
|
+
"batch": {
|
|
191
|
+
"color": "red",
|
|
192
|
+
"label": "nh"
|
|
193
|
+
},
|
|
194
|
+
"tags": [
|
|
195
|
+
"hw", "new", "featured"
|
|
196
|
+
],
|
|
197
|
+
"rating": 4.5,
|
|
198
|
+
"reviews": 120,
|
|
199
|
+
"images": [
|
|
200
|
+
{
|
|
201
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376124/main_sweets/1763376123548-Mothichoor%20%281%29.jpg",
|
|
202
|
+
"imageId": 11,
|
|
203
|
+
"order": 4,
|
|
204
|
+
"isImage": true
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
208
|
+
"imageId": 12,
|
|
209
|
+
"order": 5,
|
|
210
|
+
"isImage": true
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"options": [
|
|
214
|
+
{
|
|
215
|
+
"var_id": 9,
|
|
216
|
+
"unit": 2,
|
|
217
|
+
"label": "hho",
|
|
218
|
+
"offer": 5,
|
|
219
|
+
"price": 900,
|
|
220
|
+
"weight": 200,
|
|
221
|
+
"offerPrice": "475",
|
|
222
|
+
"stocks": 5
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"var_id": 10,
|
|
226
|
+
"unit": 2,
|
|
227
|
+
"label": "hho",
|
|
228
|
+
"offer": 5,
|
|
229
|
+
"price": 700,
|
|
230
|
+
"weight": 200,
|
|
231
|
+
"offerPrice": "475",
|
|
232
|
+
"stocks": 4
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"var_id": 11,
|
|
236
|
+
"unit": 2,
|
|
237
|
+
"label": "hho",
|
|
238
|
+
"offer": 5,
|
|
239
|
+
"price": 200,
|
|
240
|
+
"weight": 200,
|
|
241
|
+
"offerPrice": "475",
|
|
242
|
+
"stocks": 0
|
|
243
|
+
},
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"productId": 16,
|
|
248
|
+
"label": "hello",
|
|
249
|
+
"description": "hh",
|
|
250
|
+
"batch": {
|
|
251
|
+
"color": "red",
|
|
252
|
+
"label": "nh"
|
|
253
|
+
},
|
|
254
|
+
"tags": [
|
|
255
|
+
"hw", "new", "featured", "popular"
|
|
256
|
+
],
|
|
257
|
+
"rating": 4,
|
|
258
|
+
"reviews": 120,
|
|
259
|
+
"images": [
|
|
260
|
+
{
|
|
261
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376124/main_sweets/1763376123548-Mothichoor%20%281%29.jpg",
|
|
262
|
+
"imageId": 11,
|
|
263
|
+
"order": 4,
|
|
264
|
+
"isImage": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
268
|
+
"imageId": 12,
|
|
269
|
+
"order": 5,
|
|
270
|
+
"isImage": true
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"options": [
|
|
274
|
+
{
|
|
275
|
+
"var_id": 9,
|
|
276
|
+
"unit": 2,
|
|
277
|
+
"label": "hho",
|
|
278
|
+
"offer": 5,
|
|
279
|
+
"price": 900,
|
|
280
|
+
"weight": 200,
|
|
281
|
+
"offerPrice": "475",
|
|
282
|
+
"stocks": 5
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"var_id": 10,
|
|
286
|
+
"unit": 2,
|
|
287
|
+
"label": "hho",
|
|
288
|
+
"offer": 5,
|
|
289
|
+
"price": 700,
|
|
290
|
+
"weight": 200,
|
|
291
|
+
"offerPrice": "475",
|
|
292
|
+
"stocks": 4
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"var_id": 11,
|
|
296
|
+
"unit": 2,
|
|
297
|
+
"label": "hho",
|
|
298
|
+
"offer": 5,
|
|
299
|
+
"price": 200,
|
|
300
|
+
"weight": 200,
|
|
301
|
+
"offerPrice": "475",
|
|
302
|
+
"stocks": 0
|
|
303
|
+
},
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
return (react_1.default.createElement(react_2.SimpleGrid, { columns: { base: 2, md: 3, lg: 4 }, spacing: 6 }, Products.map(function (product) { return (react_1.default.createElement(ProductCard_1.default, { key: product.productId, id: product.productId, label: product.label, productImage: product.images, description: product.description, options: product.options, batch: product.batch, tags: product.tags, rating: product.rating, reviews: product.reviews, addToCart: true,
|
|
308
|
+
// isQtyEditable={true}
|
|
309
|
+
displayRating: false, onAddToCart: function (id, var_id, qty) { return console.log('Add to cart:', id, var_id, qty); }, onNotifyMe: function (id, var_id) { return console.log('notify', id, var_id); } })); })));
|
|
310
|
+
};
|
|
311
|
+
exports.default = productCaard;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ProductDetails_1 = __importDefault(require("../Components/ProductDetails/ProductDetails"));
|
|
8
|
+
var ProductDetailCard = function () {
|
|
9
|
+
var Product = {
|
|
10
|
+
"productId": 12,
|
|
11
|
+
"label": "hello",
|
|
12
|
+
"description": "Prepared using time-honored recipes, our Traditional Laddu – Special is made with carefully selected ingredients, slow-roasted to perfection and blended with pure ghee. Each laddu is hand-crafted to deliver rich aroma, authentic taste, and melt-in-the-mouth texture. Free from artificial colors and preservatives, this special laddu reflects the true essence of traditional Indian sweets, perfect for festivals, celebrations, and gifting.",
|
|
13
|
+
"category": "sweets",
|
|
14
|
+
"batch": {
|
|
15
|
+
"color": "red",
|
|
16
|
+
"label": "normal"
|
|
17
|
+
},
|
|
18
|
+
"tags": [
|
|
19
|
+
"hw"
|
|
20
|
+
],
|
|
21
|
+
"images": [
|
|
22
|
+
{
|
|
23
|
+
"imageUrl": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg",
|
|
24
|
+
"imageId": 9,
|
|
25
|
+
"order": 4,
|
|
26
|
+
"isImage": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"imageUrl": "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4",
|
|
30
|
+
"imageId": 10,
|
|
31
|
+
"order": 5,
|
|
32
|
+
"isImage": false,
|
|
33
|
+
"thumb": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"imageUrl": "https://www.youtube.com/watch?v=xp2by5790OE",
|
|
37
|
+
"imageId": 11,
|
|
38
|
+
"order": 52,
|
|
39
|
+
"isImage": false,
|
|
40
|
+
// "thumb": "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1763376123/main_sweets/1763376123173-Motichoorladdu.jpg"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"options": [
|
|
44
|
+
{
|
|
45
|
+
"var_id": 6,
|
|
46
|
+
"unit": 2,
|
|
47
|
+
"label": "hho",
|
|
48
|
+
"offer": 5,
|
|
49
|
+
"price": 800,
|
|
50
|
+
"weight": 200,
|
|
51
|
+
"offerPrice": "475",
|
|
52
|
+
"stocks": 2
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"var_id": 7,
|
|
56
|
+
"unit": 2,
|
|
57
|
+
"label": "hho",
|
|
58
|
+
"offer": 5,
|
|
59
|
+
"price": 600,
|
|
60
|
+
"weight": 200,
|
|
61
|
+
"offerPrice": "475",
|
|
62
|
+
"stocks": 5
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"var_id": 8,
|
|
66
|
+
"unit": 2,
|
|
67
|
+
"label": "hho",
|
|
68
|
+
"offer": 5,
|
|
69
|
+
"price": 400,
|
|
70
|
+
"weight": 200,
|
|
71
|
+
"offerPrice": "475",
|
|
72
|
+
"stocks": 0
|
|
73
|
+
},
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
return (react_1.default.createElement(ProductDetails_1.default, { id: Product.productId, price: Product === null || Product === void 0 ? void 0 : Product.options, label: Product === null || Product === void 0 ? void 0 : Product.label, shortdesc: Product === null || Product === void 0 ? void 0 : Product.description, tags: Product === null || Product === void 0 ? void 0 : Product.tags, rating: 4.5, reviews: 120, displayRating: false, images: Product === null || Product === void 0 ? void 0 : Product.images, batch: Product === null || Product === void 0 ? void 0 : Product.batch, category: Product === null || Product === void 0 ? void 0 : Product.category, addToCart: true, notifyMe: true, onAddToCart: function (id, var_id, qty) { return console.log('detail add', id, var_id, qty); }, onNotifyMe: function (id, var_id) { return console.log('detail notify', id, var_id); } }));
|
|
77
|
+
};
|
|
78
|
+
exports.default = ProductDetailCard;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
var react_1 = __importStar(require("react"));
|
|
51
|
+
var react_2 = require("@chakra-ui/react");
|
|
52
|
+
var ProductCard_1 = __importDefault(require("../Components/ProductCard/ProductCard"));
|
|
53
|
+
var FilterSidebar_1 = __importDefault(require("../Components/FilterSidebar/FilterSidebar"));
|
|
54
|
+
var Button_1 = __importDefault(require("../Components/Button/Button"));
|
|
55
|
+
var lucide_react_1 = require("lucide-react");
|
|
56
|
+
var ProductFilterPage = function () {
|
|
57
|
+
var _a = (0, react_1.useState)({}), filters = _a[0], setFilters = _a[1];
|
|
58
|
+
var sections = [
|
|
59
|
+
{
|
|
60
|
+
id: "features",
|
|
61
|
+
label: "Features bjhgjgkjgkjkjkj",
|
|
62
|
+
initiallyExpanded: true,
|
|
63
|
+
options: [
|
|
64
|
+
{ id: "eggless", label: "Eggless" },
|
|
65
|
+
{ id: "sugar_free", label: "Sugar Free" },
|
|
66
|
+
{ id: "freshly_made", label: "Freshly Made" },
|
|
67
|
+
{ id: "gift_pack", label: "Gift Pack" },
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "brand",
|
|
72
|
+
label: "Category",
|
|
73
|
+
searchable: true,
|
|
74
|
+
checkboxes: true,
|
|
75
|
+
initiallyExpanded: true,
|
|
76
|
+
options: [
|
|
77
|
+
{ id: "sweets", label: "Sweets" },
|
|
78
|
+
{ id: "cakes", label: "Cakes" },
|
|
79
|
+
{ id: "bakery", label: "Bakery" },
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "hairType",
|
|
84
|
+
label: "Type of Sweet",
|
|
85
|
+
radio: true,
|
|
86
|
+
initiallyExpanded: true,
|
|
87
|
+
options: [
|
|
88
|
+
{ id: "milk_based", label: "Milk Based" },
|
|
89
|
+
{ id: "ghee", label: "Ghee" },
|
|
90
|
+
{ id: "dry_fruits", label: "Dry Fruits" },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: "availability",
|
|
95
|
+
label: "Availability",
|
|
96
|
+
initiallyExpanded: true,
|
|
97
|
+
options: [
|
|
98
|
+
{ id: "in_stock", label: "In Stock" },
|
|
99
|
+
{ id: "out_of_stock", label: "Out of Stock" },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: "price",
|
|
104
|
+
label: "Price",
|
|
105
|
+
range: { min: 0, max: 1000, step: 100, values: [0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], unit: "₹" },
|
|
106
|
+
initiallyExpanded: true,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "rating",
|
|
110
|
+
label: "Customer Reviews",
|
|
111
|
+
radio: true,
|
|
112
|
+
initiallyExpanded: true,
|
|
113
|
+
options: [
|
|
114
|
+
{ id: "4", label: "4" },
|
|
115
|
+
{ id: "3", label: "3" },
|
|
116
|
+
{ id: "2", label: "2" },
|
|
117
|
+
{ id: "1", label: "1" },
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
];
|
|
121
|
+
// eslint-disable-next-line
|
|
122
|
+
var products = [
|
|
123
|
+
{
|
|
124
|
+
id: 1,
|
|
125
|
+
label: "Mysore Pak",
|
|
126
|
+
description: "Classic ghee-rich sweet",
|
|
127
|
+
productImage: [{ imageUrl: "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1768976723/main_sweets/1768976723212-4J7A2875.jpg", imageId: 1, order: 1 }],
|
|
128
|
+
tags: ["ghee", "sweets", "freshly_made", "muthu_kavitha"],
|
|
129
|
+
rating: 4.7,
|
|
130
|
+
reviews: 1200,
|
|
131
|
+
options: [{ var_id: 11, label: "Default", price: 250, offer: 10, weight: 200, stocks: 12 }],
|
|
132
|
+
avalabilitys: true,
|
|
133
|
+
addToCart: true,
|
|
134
|
+
batch: { color: "red", label: "Classic " }
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: 2,
|
|
138
|
+
label: "Laddu Assortment",
|
|
139
|
+
description: "Dry fruit laddus",
|
|
140
|
+
productImage: [{ imageUrl: "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1768976340/main_sweets/1768976340242-4J7A3163%20%281%29.webp", imageId: 2, order: 1 }],
|
|
141
|
+
tags: ["dry_fruits", "sweets", "gift_pack", "signature"],
|
|
142
|
+
rating: 4.5,
|
|
143
|
+
reviews: 800,
|
|
144
|
+
options: [{ var_id: 21, label: "Default", price: 450, offer: 5, weight: 300, stocks: 5 }],
|
|
145
|
+
avalabilitys: true,
|
|
146
|
+
addToCart: true,
|
|
147
|
+
batch: { color: "red", label: "Classic " }
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: 3,
|
|
151
|
+
label: "Eggless Black Forest Cake",
|
|
152
|
+
description: "Chocolate sponge with cherries",
|
|
153
|
+
productImage: [{ imageUrl: "https://res.cloudinary.com/dcpnzaqtu/image/upload/v1768987701/main_sweets/1768987700430-Ellu-laddu.jpg", imageId: 3, order: 1 }],
|
|
154
|
+
tags: ["eggless", "milk_based", "cakes", "chef_special"],
|
|
155
|
+
rating: 4.6,
|
|
156
|
+
reviews: 1500,
|
|
157
|
+
options: [{ var_id: 31, label: "Default", price: 699, offer: 0, weight: 500, stocks: 3 }],
|
|
158
|
+
avalabilitys: true,
|
|
159
|
+
addToCart: true,
|
|
160
|
+
batch: { color: "red", label: "Classic " }
|
|
161
|
+
},
|
|
162
|
+
];
|
|
163
|
+
var asArray = function (v) { return (Array.isArray(v) ? v : v ? [v] : []); };
|
|
164
|
+
var filteredProducts = (0, react_1.useMemo)(function () {
|
|
165
|
+
return products.filter(function (p) {
|
|
166
|
+
var _a;
|
|
167
|
+
var availOk = asArray(filters.availability).length === 0 ||
|
|
168
|
+
asArray(filters.availability).includes(p.avalabilitys ? "in_stock" : "out_of_stock");
|
|
169
|
+
var featureOk = asArray(filters.features).length === 0 || (p.tags || []).some(function (t) { return asArray(filters.features).includes(t); });
|
|
170
|
+
var hairOk = asArray(filters.hairType).length === 0 || (p.tags || []).some(function (t) { return asArray(filters.hairType).includes(t); });
|
|
171
|
+
var brandOk = asArray(filters.brand).length === 0 || (p.tags || []).some(function (t) { return asArray(filters.brand).includes(t); });
|
|
172
|
+
var minRatingStr = asArray(filters.rating)[0];
|
|
173
|
+
var minRating = minRatingStr ? Number(minRatingStr) : undefined;
|
|
174
|
+
var numericRating = typeof p.rating === "number" ? p.rating : Number((_a = p.rating) !== null && _a !== void 0 ? _a : 0);
|
|
175
|
+
var ratingOk = minRating === undefined ? true : numericRating >= minRating;
|
|
176
|
+
var priceRange = filters.price;
|
|
177
|
+
var priceOk = !priceRange || priceRange.length !== 2
|
|
178
|
+
? true
|
|
179
|
+
: (p.options && p.options.length ? p.options[0].price >= priceRange[0] && p.options[0].price <= priceRange[1] : true);
|
|
180
|
+
return availOk && featureOk && hairOk && brandOk && ratingOk && priceOk;
|
|
181
|
+
});
|
|
182
|
+
}, [filters, products]);
|
|
183
|
+
var handleFilterChange = function (newFilters) {
|
|
184
|
+
console.log(newFilters);
|
|
185
|
+
setFilters(newFilters);
|
|
186
|
+
};
|
|
187
|
+
return (react_1.default.createElement(react_2.Box, { p: 4 },
|
|
188
|
+
react_1.default.createElement(react_2.Flex, { gap: 6, align: "start" },
|
|
189
|
+
react_1.default.createElement(Button_1.default, { size: "xs", variant: "outline", leftIcon: react_1.default.createElement(lucide_react_1.X, { size: 12 }), onClick: function () { return setFilters({}); } }, "Clear All"),
|
|
190
|
+
react_1.default.createElement(react_2.Box, { flexShrink: 0 },
|
|
191
|
+
react_1.default.createElement(FilterSidebar_1.default, { sidebarOptions: sections, selected: filters, onChange: handleFilterChange, width: 180, containerPadding: 4, panelPadding: 2,
|
|
192
|
+
// variant="cards"
|
|
193
|
+
clearAllButton: true, onClearAllHandler: function () { return setFilters({}); } })),
|
|
194
|
+
react_1.default.createElement(react_2.Box, { flex: "1" },
|
|
195
|
+
react_1.default.createElement(react_2.Text, { fontSize: "xl", fontWeight: "bold", mb: 4 },
|
|
196
|
+
"Products (",
|
|
197
|
+
filteredProducts.length,
|
|
198
|
+
")"),
|
|
199
|
+
filteredProducts.length > 0 ? (react_1.default.createElement(react_2.SimpleGrid, { columns: { base: 1, md: 2, lg: 3 }, spacing: 6 }, filteredProducts.map(function (product) { return (react_1.default.createElement(ProductCard_1.default, __assign({ key: product.id }, product, { onAddToCart: function (id, var_id, qty) { return console.log('Add to cart:', id, var_id, qty); } }))); }))) : (react_1.default.createElement(react_2.Box, { p: 8, textAlign: "center", border: "1px dashed", borderColor: "gray.300", borderRadius: "md" },
|
|
200
|
+
react_1.default.createElement(react_2.Text, { color: "gray.500" }, "No products match your selection.")))))));
|
|
201
|
+
};
|
|
202
|
+
exports.default = ProductFilterPage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
var react_1 = __importDefault(require("react"));
|
|
7
|
+
var ProgressBar_1 = __importDefault(require("../Components/ProgressBar/ProgressBar"));
|
|
8
|
+
var ProgressbarPage = function () {
|
|
9
|
+
return (react_1.default.createElement("div", null,
|
|
10
|
+
react_1.default.createElement(ProgressBar_1.default, { min: 10, max: 0, isIndeterminate: true, size: "xs" })));
|
|
11
|
+
};
|
|
12
|
+
exports.default = ProgressbarPage;
|