pixelize-design-library 2.1.18 → 2.1.20
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/.github/workflows/build.yml +31 -0
- package/dist/index.d.mts +1468 -0
- package/dist/index.d.ts +1468 -55
- package/dist/index.js +263 -148
- package/dist/index.mjs +263 -0
- package/package.json +24 -10
- package/src/Components/Accordion/Accordion.tsx +59 -0
- package/src/Components/Accordion/AccordionProps.tsx +22 -0
- package/src/Components/AlertDialog/AlertDialog.tsx +69 -0
- package/{dist/Components/AlertDialog/AlertDialogProps.d.ts → src/Components/AlertDialog/AlertDialogProps.tsx} +9 -2
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.tsx +42 -0
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChart.tsx +80 -0
- package/src/Components/Apexcharts/ApexBarChart/ApexBarChartProps.tsx +19 -0
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.tsx +34 -0
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChart.tsx +42 -0
- package/src/Components/Apexcharts/ApexPieChart/ApexPieChartProps.tsx +42 -0
- package/src/Components/Breadcrumbs/Breadcrumbs.stories.tsx +27 -0
- package/src/Components/Breadcrumbs/Breadcrumbs.tsx +42 -0
- package/{dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts → src/Components/Breadcrumbs/BreadcrumbsProps.tsx} +2 -1
- package/src/Components/Button/Button.stories.tsx +33 -0
- package/src/Components/Button/Button.styles.ts +104 -0
- package/src/Components/Button/Button.tsx +49 -0
- package/src/Components/Button/ButtonProps.tsx +25 -0
- package/src/Components/ButtonGroupIcon/ButtonGoupIconProps.tsx +46 -0
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.stories.tsx +37 -0
- package/src/Components/ButtonGroupIcon/ButtonGroupIcon.tsx +159 -0
- package/src/Components/Buttons/Buttons.tsx +16 -0
- package/{dist/Components/Buttons/ButtonsProps.d.ts → src/Components/Buttons/ButtonsProps.ts} +1 -1
- package/src/Components/Card/Card.tsx +35 -0
- package/src/Components/Card/CardProps.tsx +41 -0
- package/src/Components/Checkbox/Checkbox.stories.tsx +46 -0
- package/src/Components/Checkbox/Checkbox.styles.ts +56 -0
- package/src/Components/Checkbox/Checkbox.tsx +68 -0
- package/src/Components/Checkbox/CheckboxProps.tsx +42 -0
- package/src/Components/Common/ErrorComponent.tsx +16 -0
- package/src/Components/Common/ErrorMessage.tsx +22 -0
- package/src/Components/Common/FormLabel.tsx +48 -0
- package/src/Components/Common/HelperText.tsx +14 -0
- package/src/Components/Common/Label.tsx +12 -0
- package/src/Components/ContactForm/ContactForm.tsx +250 -0
- package/src/Components/ContactForm/ContactFormProps.tsx +10 -0
- package/src/Components/DatePicker/DatePicker.tsx +378 -0
- package/src/Components/DatePicker/DatePickerProps.tsx +48 -0
- package/src/Components/DatePicker/TimePicker.tsx +112 -0
- package/src/Components/Divider/Divider.tsx +17 -0
- package/src/Components/Drawer/Drawer.tsx +66 -0
- package/src/Components/Drawer/DrawerProps.tsx +11 -0
- package/src/Components/Dropdown/DropDown.tsx +189 -0
- package/src/Components/Dropdown/DropdownProps.tsx +26 -0
- package/src/Components/Editor/Editor.tsx +23 -0
- package/src/Components/Editor/EditorProps.tsx +8 -0
- package/src/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.tsx +78 -0
- package/src/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.tsx +12 -0
- package/src/Components/FileUpload/FileUpload.tsx +282 -0
- package/src/Components/FileUpload/FileUploadProps.tsx +34 -0
- package/src/Components/FileUpload/constants.ts +30 -0
- package/src/Components/Form/FormWrapper.tsx +47 -0
- package/src/Components/Header/Header.tsx +92 -0
- package/src/Components/Header/HeaderActions.tsx +96 -0
- package/src/Components/Header/HeaderProps.ts +72 -0
- package/src/Components/Header/components/desktopMenu.tsx +116 -0
- package/src/Components/Header/components/mobileMenu.tsx +99 -0
- package/src/Components/Input/Input/Input.tsx +56 -0
- package/{dist/Components/Input/Input/InputProps.d.ts → src/Components/Input/Input/InputProps.tsx} +2 -1
- package/src/Components/Input/TextInput.stories.tsx +46 -0
- package/{dist/Components/Input/TextInput.styles.js → src/Components/Input/TextInput.styles.ts} +20 -19
- package/src/Components/Input/TextInput.tsx +112 -0
- package/{dist/Components/Input/TextInputProps.d.ts → src/Components/Input/TextInputProps.tsx} +21 -2
- package/src/Components/InputTextArea/InputTextArea.stories.tsx +49 -0
- package/src/Components/InputTextArea/InputTextArea.tsx +54 -0
- package/{dist/Components/InputTextArea/InputTextAreaProps.d.ts → src/Components/InputTextArea/InputTextAreaProps.tsx} +2 -1
- package/src/Components/KanbanBoard/AccountCard.tsx +121 -0
- package/src/Components/KanbanBoard/AccountRow.tsx +35 -0
- package/src/Components/KanbanBoard/KanbanActions/KanbanActions.tsx +37 -0
- package/src/Components/KanbanBoard/KanbanBoard.tsx +185 -0
- package/src/Components/KanbanBoard/KanbanBoardProps.ts +34 -0
- package/src/Components/Loading/Loading.stories.tsx +26 -0
- package/src/Components/Loading/Loading.tsx +80 -0
- package/src/Components/Loading/LoadingProps.tsx +5 -0
- package/src/Components/Modal/Modal.stories.tsx +107 -0
- package/src/Components/Modal/Modal.tsx +107 -0
- package/src/Components/Modal/ModalProps.tsx +22 -0
- package/src/Components/MultiSelect/MultiSelect.tsx +154 -0
- package/src/Components/MultiSelect/MultiSelectProps.tsx +20 -0
- package/src/Components/NavigationBar/NavBar.stories.tsx +27 -0
- package/src/Components/NavigationBar/NavigationBar.tsx +125 -0
- package/src/Components/NavigationBar/NavigationBarProps.tsx +19 -0
- package/src/Components/NoteTextArea/NoteTextArea.tsx +409 -0
- package/src/Components/NoteTextArea/NoteTextAreaProps.tsx +22 -0
- package/src/Components/NumberInput/NumberInput.stories.tsx +32 -0
- package/src/Components/NumberInput/NumberInput.tsx +63 -0
- package/src/Components/NumberInput/NumberInputProps.tsx +28 -0
- package/src/Components/PinInput/PinInput.stories.tsx +41 -0
- package/src/Components/PinInput/PinInput.tsx +49 -0
- package/src/Components/PinInput/PinInputProps.tsx +33 -0
- package/src/Components/PinInputs/PinInputs.tsx +63 -0
- package/{dist/Components/PinInputs/PinInputsProps.d.ts → src/Components/PinInputs/PinInputsProps.tsx} +1 -1
- package/src/Components/ProductCard/ProductCard.tsx +77 -0
- package/{dist/Components/ProductCard/ProductCardProps.d.ts → src/Components/ProductCard/ProductCardProps.tsx} +15 -14
- package/src/Components/ProductCard/ProductLabel.tsx +13 -0
- package/src/Components/ProductCard/ProductPrice.tsx +177 -0
- package/src/Components/ProductCard/ProductReview.tsx +37 -0
- package/src/Components/ProductCard/ProductTags.tsx +57 -0
- package/src/Components/ProfileCard/ProfileCard.stories.tsx +31 -0
- package/src/Components/ProfileCard/ProfileCard.tsx +97 -0
- package/src/Components/ProfileCard/ProfileCardProps.tsx +39 -0
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.tsx +26 -0
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewer.tsx +177 -0
- package/src/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.tsx +18 -0
- package/src/Components/ProgressBar/ProgressBar.stories.tsx +48 -0
- package/src/Components/ProgressBar/ProgressBar.tsx +31 -0
- package/{dist/Components/ProgressBar/ProgressBarProps.d.ts → src/Components/ProgressBar/ProgressBarProps.tsx} +6 -5
- package/src/Components/RadioButton/RadioButton.stories.tsx +47 -0
- package/src/Components/RadioButton/RadioButton.tsx +78 -0
- package/src/Components/RadioButton/RadioButtonProps.tsx +10 -0
- package/src/Components/Reorder/Reorder.tsx +121 -0
- package/src/Components/Reorder/ReorderProps.tsx +11 -0
- package/src/Components/Search/Search.tsx +80 -0
- package/src/Components/Search/SearchProps.tsx +7 -0
- package/src/Components/SearchSelect/SearchSelect.tsx +525 -0
- package/src/Components/SearchSelect/SearchSelectProps.tsx +60 -0
- package/src/Components/SearchSelect/SelectTruncatedLabel.tsx +31 -0
- package/src/Components/Select/Select.stories.tsx +59 -0
- package/src/Components/Select/Select.styles.ts +97 -0
- package/src/Components/Select/Select.tsx +89 -0
- package/src/Components/Select/SelectProps.tsx +37 -0
- package/src/Components/SelectSearch/SelectSearch.tsx +447 -0
- package/src/Components/SelectSearch/SelectSearchProps.tsx +43 -0
- package/src/Components/SideBar/SideBar.tsx +206 -0
- package/src/Components/SideBar/SideBarProps.tsx +31 -0
- package/src/Components/SideBar/Sidebar.stories.tsx +80 -0
- package/src/Components/SideBar/components/MenuItemBox.tsx +217 -0
- package/src/Components/SideBar/components/MenuItems.tsx +29 -0
- package/src/Components/SideBar/components/MenuPopoverContent.tsx +98 -0
- package/src/Components/SideBar/components/TextTruncation.tsx +76 -0
- package/src/Components/Skeletons/Skeleton.stories.tsx +65 -0
- package/src/Components/Skeletons/SkeletonProps.tsx +23 -0
- package/src/Components/Skeletons/Skeletons.tsx +51 -0
- package/src/Components/Slider/Slider.tsx +121 -0
- package/src/Components/Switch/Switch.tsx +104 -0
- package/src/Components/Switch/SwitchProps.tsx +28 -0
- package/src/Components/Table/Components/HeaderActions.tsx +79 -0
- package/src/Components/Table/Components/Pagination.tsx +101 -0
- package/src/Components/Table/Components/TableActions.tsx +75 -0
- package/src/Components/Table/Components/TableBody.tsx +299 -0
- package/src/Components/Table/Components/TableFilters.tsx +77 -0
- package/src/Components/Table/Components/TableHeader.tsx +314 -0
- package/src/Components/Table/Components/TableLoading.tsx +83 -0
- package/src/Components/Table/Components/TableSearch.tsx +84 -0
- package/src/Components/Table/Components/useDebounce.ts +31 -0
- package/src/Components/Table/Components/useTable.ts +220 -0
- package/src/Components/Table/Table.stories.tsx +48 -0
- package/src/Components/Table/Table.tsx +258 -0
- package/src/Components/Table/TableProps.tsx +163 -0
- package/src/Components/Table/TableSettings/ManageColumns.tsx +148 -0
- package/src/Components/Table/TableSettings/TableSettings.tsx +153 -0
- package/{dist/Components/Table/TableToDo.js → src/Components/Table/TableToDo.tsx} +105 -100
- package/src/Components/Tag/Tag.styles.tsx +56 -0
- package/src/Components/Tag/Tag.tsx +68 -0
- package/src/Components/Timeline/Timeline.tsx +310 -0
- package/src/Components/Timeline/TimelineProps.tsx +22 -0
- package/src/Components/Toaster/Toaster.stories.tsx +60 -0
- package/src/Components/Toaster/Toaster.tsx +99 -0
- package/{dist/Components/Toaster/ToasterProps.d.ts → src/Components/Toaster/ToasterProps.tsx} +9 -6
- package/src/Components/Toggle/TableToggle.tsx +68 -0
- package/{dist/Components/Toggle/TableToggleProps.d.ts → src/Components/Toggle/TableToggleProps.ts} +3 -2
- package/src/Components/ToolTip/ToolTip.stories.tsx +38 -0
- package/src/Components/ToolTip/ToolTip.tsx +62 -0
- package/src/Components/ToolTip/ToolTipProps.tsx +46 -0
- package/src/Components/Trail/EditableCell.tsx +116 -0
- package/src/Components/Trail/SelectAllCheckbox.tsx +22 -0
- package/{dist/Components/Trail/TrailWorks.js → src/Components/Trail/TrailWorks.tsx} +108 -65
- package/src/Components/Trail/data.ts +42 -0
- package/src/Constants/Sidebar.ts +39 -0
- package/src/Hooks/usePreferences.ts +105 -0
- package/{dist/Theme/Dark/theme.js → src/Theme/Dark/theme.ts} +74 -79
- package/src/Theme/Default/palette.ts +373 -0
- package/src/Theme/Default/theme.ts +16 -0
- package/src/Theme/Meadow/palette.ts +372 -0
- package/src/Theme/Meadow/theme.ts +17 -0
- package/src/Theme/Radiant/palette.ts +372 -0
- package/src/Theme/Radiant/theme.ts +17 -0
- package/src/Theme/Skyline/palette.ts +372 -0
- package/src/Theme/Skyline/theme.ts +17 -0
- package/{dist/Theme/common.js → src/Theme/common.ts} +30 -22
- package/src/Theme/componentStyles.ts +13 -0
- package/src/Theme/fonts.ts +41 -0
- package/{dist/Theme/index.d.ts → src/Theme/index.ts} +8 -6
- package/src/Theme/space.ts +34 -0
- package/src/Theme/theme.ts +9 -0
- package/src/Theme/themeProps.ts +477 -0
- package/src/Theme/useCustomTheme.ts +6 -0
- package/src/Utils/table.ts +200 -0
- package/src/index.ts +146 -0
- package/src/types/pixelize-design-library.d.ts +4 -0
- package/src/withTheme.tsx +20 -0
- package/tsconfig.json +23 -0
- package/dist/App.d.ts +0 -4
- package/dist/App.js +0 -158
- package/dist/Assets/defaultLogo.d.ts +0 -3
- package/dist/Assets/defaultLogo.js +0 -15
- package/dist/Components/Accordion/Accordion.d.ts +0 -4
- package/dist/Components/Accordion/Accordion.js +0 -40
- package/dist/Components/Accordion/AccordionProps.d.ts +0 -17
- package/dist/Components/Accordion/AccordionProps.js +0 -2
- package/dist/Components/AlertDialog/AlertDialog.d.ts +0 -4
- package/dist/Components/AlertDialog/AlertDialog.js +0 -20
- package/dist/Components/AlertDialog/AlertDialogProps.js +0 -2
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +0 -3
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +0 -64
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.d.ts +0 -1
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.stories.js +0 -6
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +0 -19
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.js +0 -2
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +0 -3
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +0 -29
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.d.ts +0 -1
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.stories.js +0 -6
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +0 -41
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.js +0 -2
- package/dist/Components/Breadcrumbs/Breadcrumbs.d.ts +0 -3
- package/dist/Components/Breadcrumbs/Breadcrumbs.js +0 -17
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -1
- package/dist/Components/Breadcrumbs/Breadcrumbs.stories.js +0 -6
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.js +0 -2
- package/dist/Components/Button/Button.d.ts +0 -5
- package/dist/Components/Button/Button.js +0 -32
- package/dist/Components/Button/Button.stories.d.ts +0 -1
- package/dist/Components/Button/Button.stories.js +0 -6
- package/dist/Components/Button/Button.styles.d.ts +0 -2
- package/dist/Components/Button/Button.styles.js +0 -112
- package/dist/Components/Button/ButtonProps.d.ts +0 -13
- package/dist/Components/Button/ButtonProps.js +0 -2
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +0 -33
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.js +0 -2
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts +0 -5
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +0 -86
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.stories.d.ts +0 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.stories.js +0 -6
- package/dist/Components/Buttons/Buttons.d.ts +0 -4
- package/dist/Components/Buttons/Buttons.js +0 -11
- package/dist/Components/Buttons/ButtonsProps.js +0 -2
- package/dist/Components/Card/Card.d.ts +0 -3
- package/dist/Components/Card/Card.js +0 -12
- package/dist/Components/Card/CardProps.d.ts +0 -14
- package/dist/Components/Card/CardProps.js +0 -2
- package/dist/Components/Checkbox/Checkbox.d.ts +0 -3
- package/dist/Components/Checkbox/Checkbox.js +0 -20
- package/dist/Components/Checkbox/Checkbox.stories.d.ts +0 -1
- package/dist/Components/Checkbox/Checkbox.stories.js +0 -7
- package/dist/Components/Checkbox/Checkbox.styles.d.ts +0 -2
- package/dist/Components/Checkbox/Checkbox.styles.js +0 -54
- package/dist/Components/Checkbox/CheckboxProps.d.ts +0 -15
- package/dist/Components/Checkbox/CheckboxProps.js +0 -2
- package/dist/Components/Common/ErrorComponent.d.ts +0 -6
- package/dist/Components/Common/ErrorComponent.js +0 -16
- package/dist/Components/Common/ErrorMessage.d.ts +0 -5
- package/dist/Components/Common/ErrorMessage.js +0 -17
- package/dist/Components/Common/FormLabel.d.ts +0 -8
- package/dist/Components/Common/FormLabel.js +0 -22
- package/dist/Components/Common/HelperText.d.ts +0 -5
- package/dist/Components/Common/HelperText.js +0 -14
- package/dist/Components/Common/Label.d.ts +0 -7
- package/dist/Components/Common/Label.js +0 -13
- package/dist/Components/ContactForm/ContactForm.d.ts +0 -4
- package/dist/Components/ContactForm/ContactForm.js +0 -215
- package/dist/Components/ContactForm/ContactFormProps.d.ts +0 -9
- package/dist/Components/ContactForm/ContactFormProps.js +0 -2
- package/dist/Components/DatePicker/DatePicker.d.ts +0 -3
- package/dist/Components/DatePicker/DatePicker.js +0 -235
- package/dist/Components/DatePicker/DatePickerProps.d.ts +0 -42
- package/dist/Components/DatePicker/DatePickerProps.js +0 -2
- package/dist/Components/DatePicker/TimePicker.d.ts +0 -4
- package/dist/Components/DatePicker/TimePicker.js +0 -101
- package/dist/Components/Divider/Divider.d.ts +0 -3
- package/dist/Components/Divider/Divider.js +0 -14
- package/dist/Components/Drawer/Drawer.d.ts +0 -12
- package/dist/Components/Drawer/Drawer.js +0 -40
- package/dist/Components/Drawer/DrawerProps.d.ts +0 -8
- package/dist/Components/Drawer/DrawerProps.js +0 -2
- package/dist/Components/Dropdown/DropDown.d.ts +0 -4
- package/dist/Components/Dropdown/DropDown.js +0 -97
- package/dist/Components/Dropdown/DropdownProps.d.ts +0 -26
- package/dist/Components/Dropdown/DropdownProps.js +0 -2
- package/dist/Components/Editor/Editor.d.ts +0 -3
- package/dist/Components/Editor/Editor.js +0 -12
- package/dist/Components/Editor/EditorProps.d.ts +0 -5
- package/dist/Components/Editor/EditorProps.js +0 -2
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +0 -3
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +0 -44
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +0 -13
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.js +0 -2
- package/dist/Components/FileUpload/FileUpload.d.ts +0 -4
- package/dist/Components/FileUpload/FileUpload.js +0 -156
- package/dist/Components/FileUpload/FileUploadProps.d.ts +0 -11
- package/dist/Components/FileUpload/FileUploadProps.js +0 -2
- package/dist/Components/FileUpload/constants.d.ts +0 -3
- package/dist/Components/FileUpload/constants.js +0 -28
- package/dist/Components/Form/FormWrapper.d.ts +0 -7
- package/dist/Components/Form/FormWrapper.js +0 -19
- package/dist/Components/Header/Header.d.ts +0 -4
- package/dist/Components/Header/Header.js +0 -57
- package/dist/Components/Header/HeaderActions.d.ts +0 -23
- package/dist/Components/Header/HeaderActions.js +0 -37
- package/dist/Components/Header/HeaderProps.d.ts +0 -44
- package/dist/Components/Header/HeaderProps.js +0 -2
- package/dist/Components/Header/components/desktopMenu.d.ts +0 -4
- package/dist/Components/Header/components/desktopMenu.js +0 -33
- package/dist/Components/Header/components/mobileMenu.d.ts +0 -4
- package/dist/Components/Header/components/mobileMenu.js +0 -32
- package/dist/Components/Input/Input/Input.d.ts +0 -4
- package/dist/Components/Input/Input/Input.js +0 -45
- package/dist/Components/Input/Input/InputProps.js +0 -2
- package/dist/Components/Input/TextInput.d.ts +0 -4
- package/dist/Components/Input/TextInput.js +0 -68
- package/dist/Components/Input/TextInput.stories.d.ts +0 -1
- package/dist/Components/Input/TextInput.stories.js +0 -8
- package/dist/Components/Input/TextInput.styles.d.ts +0 -2
- package/dist/Components/Input/TextInputProps.js +0 -2
- package/dist/Components/InputTextArea/InputTextArea.d.ts +0 -3
- package/dist/Components/InputTextArea/InputTextArea.js +0 -16
- package/dist/Components/InputTextArea/InputTextArea.stories.d.ts +0 -1
- package/dist/Components/InputTextArea/InputTextArea.stories.js +0 -7
- package/dist/Components/InputTextArea/InputTextAreaProps.js +0 -2
- package/dist/Components/KaTable/CustomHeader.d.ts +0 -14
- package/dist/Components/KaTable/CustomHeader.js +0 -69
- package/dist/Components/KaTable/KaTable.d.ts +0 -13
- package/dist/Components/KaTable/KaTable.js +0 -111
- package/dist/Components/KaTable/KaTableProps.d.ts +0 -23
- package/dist/Components/KaTable/KaTableProps.js +0 -2
- package/dist/Components/KaTable/SelectionCell.d.ts +0 -8
- package/dist/Components/KaTable/SelectionCell.js +0 -38
- package/dist/Components/KaTable/SelectionHeader.d.ts +0 -3
- package/dist/Components/KaTable/SelectionHeader.js +0 -56
- package/dist/Components/KaTable/ka-table.css +0 -27
- package/dist/Components/KaTable/useMergedChildComponents.d.ts +0 -14
- package/dist/Components/KaTable/useMergedChildComponents.js +0 -224
- package/dist/Components/KanbanBoard/AccountCard.d.ts +0 -9
- package/dist/Components/KanbanBoard/AccountCard.js +0 -74
- package/dist/Components/KanbanBoard/AccountRow.d.ts +0 -6
- package/dist/Components/KanbanBoard/AccountRow.js +0 -20
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +0 -9
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +0 -26
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +0 -4
- package/dist/Components/KanbanBoard/KanbanBoard.js +0 -120
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +0 -27
- package/dist/Components/KanbanBoard/KanbanBoardProps.js +0 -2
- package/dist/Components/Loading/Loading.d.ts +0 -3
- package/dist/Components/Loading/Loading.js +0 -36
- package/dist/Components/Loading/Loading.stories.d.ts +0 -1
- package/dist/Components/Loading/Loading.stories.js +0 -7
- package/dist/Components/Loading/LoadingProps.d.ts +0 -5
- package/dist/Components/Loading/LoadingProps.js +0 -2
- package/dist/Components/Modal/Modal.d.ts +0 -12
- package/dist/Components/Modal/Modal.js +0 -50
- package/dist/Components/Modal/Modal.stories.d.ts +0 -1
- package/dist/Components/Modal/Modal.stories.js +0 -7
- package/dist/Components/Modal/ModalProps.d.ts +0 -11
- package/dist/Components/Modal/ModalProps.js +0 -2
- package/dist/Components/MultiSelect/MultiSelect.d.ts +0 -3
- package/dist/Components/MultiSelect/MultiSelect.js +0 -115
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +0 -20
- package/dist/Components/MultiSelect/MultiSelectProps.js +0 -2
- package/dist/Components/NavigationBar/NavBar.stories.d.ts +0 -1
- package/dist/Components/NavigationBar/NavBar.stories.js +0 -3
- package/dist/Components/NavigationBar/NavigationBar.d.ts +0 -3
- package/dist/Components/NavigationBar/NavigationBar.js +0 -50
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +0 -19
- package/dist/Components/NavigationBar/NavigationBarProps.js +0 -2
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +0 -3
- package/dist/Components/NoteTextArea/NoteTextArea.js +0 -274
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +0 -16
- package/dist/Components/NoteTextArea/NoteTextAreaProps.js +0 -2
- package/dist/Components/NumberInput/NumberInput.d.ts +0 -3
- package/dist/Components/NumberInput/NumberInput.js +0 -16
- package/dist/Components/NumberInput/NumberInput.stories.d.ts +0 -1
- package/dist/Components/NumberInput/NumberInput.stories.js +0 -5
- package/dist/Components/NumberInput/NumberInputProps.d.ts +0 -12
- package/dist/Components/NumberInput/NumberInputProps.js +0 -2
- package/dist/Components/PinInput/PinInput.d.ts +0 -3
- package/dist/Components/PinInput/PinInput.js +0 -15
- package/dist/Components/PinInput/PinInput.stories.d.ts +0 -1
- package/dist/Components/PinInput/PinInput.stories.js +0 -6
- package/dist/Components/PinInput/PinInputProps.d.ts +0 -9
- package/dist/Components/PinInput/PinInputProps.js +0 -2
- package/dist/Components/PinInputs/PinInputs.d.ts +0 -4
- package/dist/Components/PinInputs/PinInputs.js +0 -71
- package/dist/Components/PinInputs/PinInputsProps.js +0 -2
- package/dist/Components/ProductCard/ProductCard.d.ts +0 -4
- package/dist/Components/ProductCard/ProductCard.js +0 -51
- package/dist/Components/ProductCard/ProductCardProps.js +0 -2
- package/dist/Components/ProductCard/ProductLabel.d.ts +0 -6
- package/dist/Components/ProductCard/ProductLabel.js +0 -14
- package/dist/Components/ProductCard/ProductPrice.d.ts +0 -7
- package/dist/Components/ProductCard/ProductPrice.js +0 -88
- package/dist/Components/ProductCard/ProductReview.d.ts +0 -7
- package/dist/Components/ProductCard/ProductReview.js +0 -23
- package/dist/Components/ProductCard/ProductTags.d.ts +0 -7
- package/dist/Components/ProductCard/ProductTags.js +0 -30
- package/dist/Components/ProfileCard/ProfileCard.d.ts +0 -12
- package/dist/Components/ProfileCard/ProfileCard.js +0 -57
- package/dist/Components/ProfileCard/ProfileCard.stories.d.ts +0 -1
- package/dist/Components/ProfileCard/ProfileCard.stories.js +0 -6
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +0 -16
- package/dist/Components/ProfileCard/ProfileCardProps.js +0 -2
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +0 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +0 -94
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.d.ts +0 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.js +0 -6
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +0 -19
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.js +0 -2
- package/dist/Components/ProgressBar/ProgressBar.d.ts +0 -3
- package/dist/Components/ProgressBar/ProgressBar.js +0 -12
- package/dist/Components/ProgressBar/ProgressBar.stories.d.ts +0 -1
- package/dist/Components/ProgressBar/ProgressBar.stories.js +0 -7
- package/dist/Components/ProgressBar/ProgressBarProps.js +0 -2
- package/dist/Components/RadioButton/RadioButton.d.ts +0 -5
- package/dist/Components/RadioButton/RadioButton.js +0 -31
- package/dist/Components/RadioButton/RadioButton.stories.d.ts +0 -1
- package/dist/Components/RadioButton/RadioButton.stories.js +0 -7
- package/dist/Components/RadioButton/RadioButtonProps.d.ts +0 -11
- package/dist/Components/RadioButton/RadioButtonProps.js +0 -2
- package/dist/Components/Reorder/Reorder.d.ts +0 -4
- package/dist/Components/Reorder/Reorder.js +0 -50
- package/dist/Components/Reorder/ReorderProps.d.ts +0 -10
- package/dist/Components/Reorder/ReorderProps.js +0 -2
- package/dist/Components/Search/Search.d.ts +0 -3
- package/dist/Components/Search/Search.js +0 -66
- package/dist/Components/Search/SearchProps.d.ts +0 -8
- package/dist/Components/Search/SearchProps.js +0 -2
- package/dist/Components/SearchSelect/SearchSelect.d.ts +0 -4
- package/dist/Components/SearchSelect/SearchSelect.js +0 -237
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +0 -60
- package/dist/Components/SearchSelect/SearchSelectProps.js +0 -2
- package/dist/Components/SearchSelect/SelectTruncatedLabel.d.ts +0 -6
- package/dist/Components/SearchSelect/SelectTruncatedLabel.js +0 -45
- package/dist/Components/Select/Select.d.ts +0 -3
- package/dist/Components/Select/Select.js +0 -54
- package/dist/Components/Select/Select.stories.d.ts +0 -1
- package/dist/Components/Select/Select.stories.js +0 -8
- package/dist/Components/Select/Select.styles.d.ts +0 -2
- package/dist/Components/Select/Select.styles.js +0 -98
- package/dist/Components/Select/SelectProps.d.ts +0 -20
- package/dist/Components/Select/SelectProps.js +0 -2
- package/dist/Components/SelectSearch/SelectSearch.d.ts +0 -3
- package/dist/Components/SelectSearch/SelectSearch.js +0 -239
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +0 -42
- package/dist/Components/SelectSearch/SelectSearchProps.js +0 -2
- package/dist/Components/SideBar/SideBar.d.ts +0 -3
- package/dist/Components/SideBar/SideBar.js +0 -55
- package/dist/Components/SideBar/SideBarProps.d.ts +0 -29
- package/dist/Components/SideBar/SideBarProps.js +0 -2
- package/dist/Components/SideBar/Sidebar.stories.d.ts +0 -1
- package/dist/Components/SideBar/Sidebar.stories.js +0 -7
- package/dist/Components/SideBar/components/MenuItemBox.d.ts +0 -11
- package/dist/Components/SideBar/components/MenuItemBox.js +0 -116
- package/dist/Components/SideBar/components/MenuItems.d.ts +0 -4
- package/dist/Components/SideBar/components/MenuItems.js +0 -13
- package/dist/Components/SideBar/components/MenuPopoverContent.d.ts +0 -9
- package/dist/Components/SideBar/components/MenuPopoverContent.js +0 -37
- package/dist/Components/SideBar/components/TextTruncation.d.ts +0 -8
- package/dist/Components/SideBar/components/TextTruncation.js +0 -77
- package/dist/Components/Skeletons/Skeleton.stories.d.ts +0 -1
- package/dist/Components/Skeletons/Skeleton.stories.js +0 -7
- package/dist/Components/Skeletons/SkeletonProps.d.ts +0 -4
- package/dist/Components/Skeletons/SkeletonProps.js +0 -2
- package/dist/Components/Skeletons/Skeletons.d.ts +0 -3
- package/dist/Components/Skeletons/Skeletons.js +0 -15
- package/dist/Components/Slider/Slider.d.ts +0 -8
- package/dist/Components/Slider/Slider.js +0 -57
- package/dist/Components/Switch/Switch.d.ts +0 -3
- package/dist/Components/Switch/Switch.js +0 -39
- package/dist/Components/Switch/SwitchProps.d.ts +0 -9
- package/dist/Components/Switch/SwitchProps.js +0 -2
- package/dist/Components/Table/Components/HeaderActions.d.ts +0 -7
- package/dist/Components/Table/Components/HeaderActions.js +0 -45
- package/dist/Components/Table/Components/Pagination.d.ts +0 -14
- package/dist/Components/Table/Components/Pagination.js +0 -32
- package/dist/Components/Table/Components/TableActions.d.ts +0 -3
- package/dist/Components/Table/Components/TableActions.js +0 -28
- package/dist/Components/Table/Components/TableBody.d.ts +0 -4
- package/dist/Components/Table/Components/TableBody.js +0 -140
- package/dist/Components/Table/Components/TableFilters.d.ts +0 -4
- package/dist/Components/Table/Components/TableFilters.js +0 -59
- package/dist/Components/Table/Components/TableHeader.d.ts +0 -4
- package/dist/Components/Table/Components/TableHeader.js +0 -147
- package/dist/Components/Table/Components/TableLoading.d.ts +0 -7
- package/dist/Components/Table/Components/TableLoading.js +0 -41
- package/dist/Components/Table/Components/TableSearch.d.ts +0 -6
- package/dist/Components/Table/Components/TableSearch.js +0 -60
- package/dist/Components/Table/Components/useDebounce.d.ts +0 -2
- package/dist/Components/Table/Components/useDebounce.js +0 -28
- package/dist/Components/Table/Components/useTable.d.ts +0 -46
- package/dist/Components/Table/Components/useTable.js +0 -168
- package/dist/Components/Table/Table.css +0 -16
- package/dist/Components/Table/Table.d.ts +0 -3
- package/dist/Components/Table/Table.js +0 -129
- package/dist/Components/Table/Table.stories.d.ts +0 -1
- package/dist/Components/Table/Table.stories.js +0 -9
- package/dist/Components/Table/TableProps.d.ts +0 -112
- package/dist/Components/Table/TableProps.js +0 -2
- package/dist/Components/Table/TableSettings/ManageColumns.d.ts +0 -10
- package/dist/Components/Table/TableSettings/ManageColumns.js +0 -107
- package/dist/Components/Table/TableSettings/TableSettings.d.ts +0 -7
- package/dist/Components/Table/TableSettings/TableSettings.js +0 -73
- package/dist/Components/Table/TableToDo.d.ts +0 -2
- package/dist/Components/Tag/Tag.d.ts +0 -12
- package/dist/Components/Tag/Tag.js +0 -21
- package/dist/Components/Tag/Tag.styles.d.ts +0 -2
- package/dist/Components/Tag/Tag.styles.js +0 -63
- package/dist/Components/Timeline/Timeline.d.ts +0 -4
- package/dist/Components/Timeline/Timeline.js +0 -166
- package/dist/Components/Timeline/TimelineProps.d.ts +0 -20
- package/dist/Components/Timeline/TimelineProps.js +0 -2
- package/dist/Components/Toaster/Toaster.d.ts +0 -4
- package/dist/Components/Toaster/Toaster.js +0 -86
- package/dist/Components/Toaster/Toaster.stories.d.ts +0 -1
- package/dist/Components/Toaster/Toaster.stories.js +0 -8
- package/dist/Components/Toaster/ToasterProps.js +0 -2
- package/dist/Components/Toggle/TableToggle.d.ts +0 -4
- package/dist/Components/Toggle/TableToggle.js +0 -60
- package/dist/Components/Toggle/TableToggleProps.js +0 -2
- package/dist/Components/ToolTip/ToolTip.d.ts +0 -3
- package/dist/Components/ToolTip/ToolTip.js +0 -12
- package/dist/Components/ToolTip/ToolTip.stories.d.ts +0 -1
- package/dist/Components/ToolTip/ToolTip.stories.js +0 -7
- package/dist/Components/ToolTip/ToolTipProps.d.ts +0 -7
- package/dist/Components/ToolTip/ToolTipProps.js +0 -2
- package/dist/Components/Trail/EditableCell.d.ts +0 -11
- package/dist/Components/Trail/EditableCell.js +0 -71
- package/dist/Components/Trail/SelectAllCheckbox.d.ts +0 -8
- package/dist/Components/Trail/SelectAllCheckbox.js +0 -13
- package/dist/Components/Trail/TrailWorks.d.ts +0 -3
- package/dist/Components/Trail/data.d.ts +0 -15
- package/dist/Components/Trail/data.js +0 -29
- package/dist/Constants/Sidebar.d.ts +0 -38
- package/dist/Constants/Sidebar.js +0 -42
- package/dist/Hooks/usePreferences.d.ts +0 -24
- package/dist/Hooks/usePreferences.js +0 -73
- package/dist/Layout.d.ts +0 -3
- package/dist/Layout.js +0 -269
- package/dist/Pages/KaTableExample.d.ts +0 -3
- package/dist/Pages/KaTableExample.js +0 -259
- package/dist/Pages/TInput.d.ts +0 -3
- package/dist/Pages/TInput.js +0 -46
- package/dist/Pages/accordion.d.ts +0 -3
- package/dist/Pages/accordion.js +0 -42
- package/dist/Pages/alertdialog.d.ts +0 -3
- package/dist/Pages/alertdialog.js +0 -44
- package/dist/Pages/button.d.ts +0 -3
- package/dist/Pages/button.js +0 -29
- package/dist/Pages/card.d.ts +0 -3
- package/dist/Pages/card.js +0 -48
- package/dist/Pages/chart.d.ts +0 -3
- package/dist/Pages/chart.js +0 -28
- package/dist/Pages/checkbox.d.ts +0 -3
- package/dist/Pages/checkbox.js +0 -12
- package/dist/Pages/contactForm.d.ts +0 -3
- package/dist/Pages/contactForm.js +0 -16
- package/dist/Pages/datePick.d.ts +0 -3
- package/dist/Pages/datePick.js +0 -70
- package/dist/Pages/drawer.d.ts +0 -3
- package/dist/Pages/drawer.js +0 -48
- package/dist/Pages/dropdown.d.ts +0 -3
- package/dist/Pages/dropdown.js +0 -24
- package/dist/Pages/editor.d.ts +0 -3
- package/dist/Pages/editor.js +0 -14
- package/dist/Pages/fileUpload.d.ts +0 -2
- package/dist/Pages/fileUpload.js +0 -65
- package/dist/Pages/input.d.ts +0 -3
- package/dist/Pages/input.js +0 -42
- package/dist/Pages/kanbanboard.d.ts +0 -3
- package/dist/Pages/kanbanboard.js +0 -115
- package/dist/Pages/modal.d.ts +0 -3
- package/dist/Pages/modal.js +0 -55
- package/dist/Pages/multiSelect.d.ts +0 -3
- package/dist/Pages/multiSelect.js +0 -45
- package/dist/Pages/noteArea.d.ts +0 -3
- package/dist/Pages/noteArea.js +0 -49
- package/dist/Pages/numberInput.d.ts +0 -3
- package/dist/Pages/numberInput.js +0 -39
- package/dist/Pages/photoViewer.d.ts +0 -3
- package/dist/Pages/photoViewer.js +0 -12
- package/dist/Pages/pinInputs.d.ts +0 -3
- package/dist/Pages/pinInputs.js +0 -12
- package/dist/Pages/productCaard.d.ts +0 -3
- package/dist/Pages/productCaard.js +0 -32
- package/dist/Pages/progressbar.d.ts +0 -3
- package/dist/Pages/progressbar.js +0 -12
- package/dist/Pages/radioButton.d.ts +0 -3
- package/dist/Pages/radioButton.js +0 -44
- package/dist/Pages/search.d.ts +0 -3
- package/dist/Pages/search.js +0 -44
- package/dist/Pages/searchSelect.d.ts +0 -3
- package/dist/Pages/searchSelect.js +0 -151
- package/dist/Pages/select.d.ts +0 -3
- package/dist/Pages/select.js +0 -43
- package/dist/Pages/selectSearch.d.ts +0 -3
- package/dist/Pages/selectSearch.js +0 -93
- package/dist/Pages/skeleton.d.ts +0 -3
- package/dist/Pages/skeleton.js +0 -22
- package/dist/Pages/switch.d.ts +0 -3
- package/dist/Pages/switch.js +0 -40
- package/dist/Pages/table.d.ts +0 -2
- package/dist/Pages/table.js +0 -144
- package/dist/Pages/textArea.d.ts +0 -3
- package/dist/Pages/textArea.js +0 -12
- package/dist/Pages/timeline.d.ts +0 -3
- package/dist/Pages/timeline.js +0 -74
- package/dist/Pages/tooltip.d.ts +0 -3
- package/dist/Pages/tooltip.js +0 -12
- package/dist/Pages/toster.d.ts +0 -3
- package/dist/Pages/toster.js +0 -63
- package/dist/Pages/verifyEmail.d.ts +0 -3
- package/dist/Pages/verifyEmail.js +0 -18
- package/dist/Theme/Dark/theme.d.ts +0 -2
- package/dist/Theme/Default/fonts.d.ts +0 -35
- package/dist/Theme/Default/fonts.js +0 -37
- package/dist/Theme/Default/palette.d.ts +0 -370
- package/dist/Theme/Default/palette.js +0 -372
- package/dist/Theme/Default/theme.d.ts +0 -2
- package/dist/Theme/Default/theme.js +0 -23
- package/dist/Theme/Meadow/palette.d.ts +0 -368
- package/dist/Theme/Meadow/palette.js +0 -356
- package/dist/Theme/Meadow/theme.d.ts +0 -2
- package/dist/Theme/Meadow/theme.js +0 -23
- package/dist/Theme/Radiant/palette.d.ts +0 -368
- package/dist/Theme/Radiant/palette.js +0 -356
- package/dist/Theme/Radiant/theme.d.ts +0 -2
- package/dist/Theme/Radiant/theme.js +0 -23
- package/dist/Theme/Skyline/palette.d.ts +0 -368
- package/dist/Theme/Skyline/palette.js +0 -356
- package/dist/Theme/Skyline/theme.d.ts +0 -2
- package/dist/Theme/Skyline/theme.js +0 -23
- package/dist/Theme/common.d.ts +0 -166
- package/dist/Theme/componentStyles.d.ts +0 -7
- package/dist/Theme/componentStyles.js +0 -15
- package/dist/Theme/fonts.d.ts +0 -34
- package/dist/Theme/fonts.js +0 -41
- package/dist/Theme/index.js +0 -20
- package/dist/Theme/space.d.ts +0 -33
- package/dist/Theme/space.js +0 -35
- package/dist/Theme/theme.d.ts +0 -2
- package/dist/Theme/theme.js +0 -9
- package/dist/Theme/themeProps.d.ts +0 -475
- package/dist/Theme/themeProps.js +0 -3
- package/dist/Theme/useCustomTheme.d.ts +0 -2
- package/dist/Theme/useCustomTheme.js +0 -8
- package/dist/Utils/table.d.ts +0 -36
- package/dist/Utils/table.js +0 -168
- package/dist/bootstrap.d.ts +0 -1
- package/dist/bootstrap.js +0 -14
- package/dist/withTheme.d.ts +0 -3
- package/dist/withTheme.js +0 -28
- /package/{dist → src}/Assets/defaultLogo.tsx +0 -0
- /package/{dist → src}/global.css +0 -0
- /package/{dist → src}/index.css +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React, { useImperativeHandle, useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
Flex,
|
|
5
|
+
IconButton,
|
|
6
|
+
Input,
|
|
7
|
+
List,
|
|
8
|
+
ListItem,
|
|
9
|
+
Text,
|
|
10
|
+
} from "@chakra-ui/react";
|
|
11
|
+
import Checkbox from "../../Checkbox/Checkbox";
|
|
12
|
+
import { useCustomTheme } from "../../../Theme/useCustomTheme";
|
|
13
|
+
import { TableProps } from "../TableProps";
|
|
14
|
+
import { GripVertical } from "lucide-react";
|
|
15
|
+
|
|
16
|
+
type ManageColumnsMethods = {
|
|
17
|
+
getManageColumnsData: () => TableProps["columns"];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const ManageColumns = ({
|
|
21
|
+
columns,
|
|
22
|
+
childInputMethodsRef,
|
|
23
|
+
}: {
|
|
24
|
+
columns: TableProps["columns"];
|
|
25
|
+
childInputMethodsRef: React.Ref<ManageColumnsMethods>;
|
|
26
|
+
}) => {
|
|
27
|
+
const theme = useCustomTheme();
|
|
28
|
+
const [items, setItems] = useState(
|
|
29
|
+
columns.map((o) => ({ ...o, isHidden: !o.isHidden }))
|
|
30
|
+
);
|
|
31
|
+
const [searchTerm, setSearchTerm] = useState("");
|
|
32
|
+
const [draggedItemIndex, setDraggedItemIndex] = useState<number | null>(null);
|
|
33
|
+
|
|
34
|
+
useImperativeHandle(childInputMethodsRef, () => {
|
|
35
|
+
return {
|
|
36
|
+
getManageColumnsData() {
|
|
37
|
+
return items.map((o) => ({ ...o, isHidden: !o.isHidden }));
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}, [items]);
|
|
41
|
+
|
|
42
|
+
const handleDragStart = (index: number) => {
|
|
43
|
+
setDraggedItemIndex(index);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const handleDragOver = (e: React.DragEvent<HTMLLIElement>, index: number) => {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
if (draggedItemIndex === null || draggedItemIndex === index) return;
|
|
49
|
+
|
|
50
|
+
const newItems = [...items];
|
|
51
|
+
const draggedItem = newItems[draggedItemIndex];
|
|
52
|
+
|
|
53
|
+
newItems.splice(draggedItemIndex, 1);
|
|
54
|
+
|
|
55
|
+
newItems.splice(index, 0, draggedItem);
|
|
56
|
+
|
|
57
|
+
setDraggedItemIndex(index);
|
|
58
|
+
setItems(newItems);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const handleDragEnd = () => {
|
|
62
|
+
setDraggedItemIndex(null);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const toggleCheckbox = (index: number) => {
|
|
66
|
+
const newItems = [...items];
|
|
67
|
+
newItems[index].isHidden = !newItems[index].isHidden;
|
|
68
|
+
setItems(newItems);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const filteredItems = items.filter((item) =>
|
|
72
|
+
item.label.toString().toLowerCase().includes(searchTerm.toLowerCase())
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Box mt="5">
|
|
77
|
+
<Input
|
|
78
|
+
placeholder="Search"
|
|
79
|
+
mb="4"
|
|
80
|
+
value={searchTerm}
|
|
81
|
+
onChange={(e) => setSearchTerm(e.target.value)}
|
|
82
|
+
/>
|
|
83
|
+
{!searchTerm.length && (
|
|
84
|
+
<Flex align="center" mb="2">
|
|
85
|
+
<Checkbox
|
|
86
|
+
isChecked={items.every((item) => item.isHidden)}
|
|
87
|
+
onChange={() => {
|
|
88
|
+
const allChecked = items.every((item) => item.isHidden);
|
|
89
|
+
setItems(
|
|
90
|
+
items.map((item) => ({ ...item, isHidden: !allChecked }))
|
|
91
|
+
);
|
|
92
|
+
}}
|
|
93
|
+
/>
|
|
94
|
+
<Text ml="2" fontSize={14}>
|
|
95
|
+
Select all
|
|
96
|
+
</Text>
|
|
97
|
+
</Flex>
|
|
98
|
+
)}
|
|
99
|
+
|
|
100
|
+
<List spacing="2">
|
|
101
|
+
{filteredItems.length > 0 ? (
|
|
102
|
+
filteredItems.map((item, index) => (
|
|
103
|
+
<ListItem
|
|
104
|
+
key={item.id}
|
|
105
|
+
draggable
|
|
106
|
+
onDragStart={() => handleDragStart(index)}
|
|
107
|
+
onDragOver={(e) => handleDragOver(e, index)}
|
|
108
|
+
onDragEnd={handleDragEnd}
|
|
109
|
+
bg={theme.colors.gray[50]}
|
|
110
|
+
display="flex"
|
|
111
|
+
alignItems="center"
|
|
112
|
+
justifyContent="space-between"
|
|
113
|
+
borderRadius="md"
|
|
114
|
+
border="1px solid"
|
|
115
|
+
borderColor="gray.200"
|
|
116
|
+
cursor="grab"
|
|
117
|
+
position={"relative"}
|
|
118
|
+
fontSize={14}
|
|
119
|
+
>
|
|
120
|
+
<IconButton
|
|
121
|
+
aria-label="Drag"
|
|
122
|
+
icon={<GripVertical />}
|
|
123
|
+
variant="ghost"
|
|
124
|
+
cursor="grab"
|
|
125
|
+
mr="1"
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
<Checkbox
|
|
129
|
+
isChecked={item.isHidden}
|
|
130
|
+
onChange={() => toggleCheckbox(index)}
|
|
131
|
+
sx={{
|
|
132
|
+
marginRight: "4",
|
|
133
|
+
}}
|
|
134
|
+
/>
|
|
135
|
+
<Text flex="1">{item.label}</Text>
|
|
136
|
+
</ListItem>
|
|
137
|
+
))
|
|
138
|
+
) : (
|
|
139
|
+
<Text color="gray.500" textAlign="center">
|
|
140
|
+
No items found
|
|
141
|
+
</Text>
|
|
142
|
+
)}
|
|
143
|
+
</List>
|
|
144
|
+
</Box>
|
|
145
|
+
);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export default ManageColumns;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Modal,
|
|
4
|
+
ModalBody,
|
|
5
|
+
ModalCloseButton,
|
|
6
|
+
ModalContent,
|
|
7
|
+
ModalFooter,
|
|
8
|
+
ModalHeader,
|
|
9
|
+
ModalOverlay,
|
|
10
|
+
Tabs,
|
|
11
|
+
TabList,
|
|
12
|
+
TabPanels,
|
|
13
|
+
Tab,
|
|
14
|
+
TabPanel,
|
|
15
|
+
Text,
|
|
16
|
+
} from "@chakra-ui/react";
|
|
17
|
+
import React, { useRef, useState } from "react";
|
|
18
|
+
import ManageColumns from "./ManageColumns";
|
|
19
|
+
import Button from "../../Button/Button";
|
|
20
|
+
import { useCustomTheme } from "../../../Theme/useCustomTheme";
|
|
21
|
+
import { TableProps } from "../TableProps";
|
|
22
|
+
import { Settings } from "lucide-react";
|
|
23
|
+
|
|
24
|
+
const TableSettings = ({
|
|
25
|
+
columns,
|
|
26
|
+
onSave,
|
|
27
|
+
}: {
|
|
28
|
+
columns: TableProps["columns"];
|
|
29
|
+
onSave: (updatedColumns: TableProps["columns"]) => void;
|
|
30
|
+
}) => {
|
|
31
|
+
const theme: any = useCustomTheme();
|
|
32
|
+
const childInputMethodsRef = useRef<{
|
|
33
|
+
getManageColumnsData?: () => TableProps["columns"];
|
|
34
|
+
}>({});
|
|
35
|
+
|
|
36
|
+
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
37
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<Box>
|
|
41
|
+
<Box display={"flex"} justifyContent={"flex-end"} cursor={"pointer"}>
|
|
42
|
+
<Settings
|
|
43
|
+
onClick={() => setSettingsOpen(true)}
|
|
44
|
+
size={"1.25rem"}
|
|
45
|
+
color={theme?.colors?.text?.[500]}
|
|
46
|
+
/>
|
|
47
|
+
</Box>
|
|
48
|
+
|
|
49
|
+
<Modal
|
|
50
|
+
isOpen={settingsOpen}
|
|
51
|
+
onClose={() => setSettingsOpen(false)}
|
|
52
|
+
size={"md"}
|
|
53
|
+
>
|
|
54
|
+
<ModalOverlay />
|
|
55
|
+
<ModalContent minW="700px" minH="600px">
|
|
56
|
+
<ModalHeader>Table Settings</ModalHeader>
|
|
57
|
+
<ModalCloseButton />
|
|
58
|
+
<ModalBody>
|
|
59
|
+
<Tabs
|
|
60
|
+
index={selectedIndex}
|
|
61
|
+
onChange={setSelectedIndex}
|
|
62
|
+
orientation="vertical"
|
|
63
|
+
variant="unstyled"
|
|
64
|
+
>
|
|
65
|
+
<TabList
|
|
66
|
+
whiteSpace={"nowrap"}
|
|
67
|
+
minWidth={160}
|
|
68
|
+
height="fit-content"
|
|
69
|
+
>
|
|
70
|
+
<Tab
|
|
71
|
+
_selected={{
|
|
72
|
+
borderLeft: `2px solid ${theme.colors.primary[600]}`,
|
|
73
|
+
}}
|
|
74
|
+
fontSize={"14px"}
|
|
75
|
+
justifyContent="flex-start"
|
|
76
|
+
>
|
|
77
|
+
Manage columns
|
|
78
|
+
</Tab>
|
|
79
|
+
|
|
80
|
+
{/* <Tab
|
|
81
|
+
_selected={{
|
|
82
|
+
borderLeft: "2px solid blue",
|
|
83
|
+
}}
|
|
84
|
+
justifyContent="flex-start"
|
|
85
|
+
>
|
|
86
|
+
Font size
|
|
87
|
+
</Tab>
|
|
88
|
+
<Tab
|
|
89
|
+
_selected={{
|
|
90
|
+
borderLeft: "2px solid blue",
|
|
91
|
+
}}
|
|
92
|
+
justifyContent="flex-start"
|
|
93
|
+
>
|
|
94
|
+
Density
|
|
95
|
+
</Tab>
|
|
96
|
+
<Tab
|
|
97
|
+
_selected={{
|
|
98
|
+
borderLeft: "2px solid blue",
|
|
99
|
+
}}
|
|
100
|
+
justifyContent="flex-start"
|
|
101
|
+
>
|
|
102
|
+
Scrollbar
|
|
103
|
+
</Tab> */}
|
|
104
|
+
</TabList>
|
|
105
|
+
<TabPanels>
|
|
106
|
+
<TabPanel>
|
|
107
|
+
<ManageColumns
|
|
108
|
+
columns={columns}
|
|
109
|
+
childInputMethodsRef={
|
|
110
|
+
childInputMethodsRef as React.MutableRefObject<{
|
|
111
|
+
getManageColumnsData: () => TableProps["columns"];
|
|
112
|
+
}>
|
|
113
|
+
}
|
|
114
|
+
/>
|
|
115
|
+
</TabPanel>
|
|
116
|
+
<TabPanel>
|
|
117
|
+
<Text>Font size settings</Text>
|
|
118
|
+
</TabPanel>
|
|
119
|
+
<TabPanel>
|
|
120
|
+
<Text>Density settings</Text>
|
|
121
|
+
</TabPanel>
|
|
122
|
+
<TabPanel>
|
|
123
|
+
<Text>Scrollbar settings</Text>
|
|
124
|
+
</TabPanel>
|
|
125
|
+
</TabPanels>
|
|
126
|
+
</Tabs>
|
|
127
|
+
</ModalBody>
|
|
128
|
+
|
|
129
|
+
<ModalFooter>
|
|
130
|
+
<Button
|
|
131
|
+
label={"Close"}
|
|
132
|
+
size="sm"
|
|
133
|
+
onClick={() => setSettingsOpen(false)}
|
|
134
|
+
sx={{ marginRight: "0.5rem" }}
|
|
135
|
+
/>
|
|
136
|
+
<Button
|
|
137
|
+
label={"Save"}
|
|
138
|
+
size={"sm"}
|
|
139
|
+
onClick={() => {
|
|
140
|
+
onSave(
|
|
141
|
+
childInputMethodsRef.current?.getManageColumnsData?.() ?? []
|
|
142
|
+
);
|
|
143
|
+
setSettingsOpen(false);
|
|
144
|
+
}}
|
|
145
|
+
/>
|
|
146
|
+
</ModalFooter>
|
|
147
|
+
</ModalContent>
|
|
148
|
+
</Modal>
|
|
149
|
+
</Box>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export default TableSettings;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// const [isPopoverOpen, setPopoverOpen] = useState(false);
|
|
3
2
|
// const [activeHeader, setActiveHeader] = useState<string | null>(null);
|
|
4
3
|
// const [searchTerms, setSearchTerms] = useState<Record<string, string>>({});
|
|
@@ -8,11 +7,7 @@
|
|
|
8
7
|
// const [betweenValues, setBetweenValues] = useState<
|
|
9
8
|
// Record<string, { min: string; max: string }>
|
|
10
9
|
// >({});
|
|
11
|
-
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.searchFeatures = void 0;
|
|
10
|
+
|
|
16
11
|
// const sortedData = [...data].sort((a, b) => {
|
|
17
12
|
// if (!sortField) return 0;
|
|
18
13
|
// if (a[sortField] < b[sortField]) return sortDirection === "asc" ? -1 : 1;
|
|
@@ -33,6 +28,7 @@ exports.searchFeatures = void 0;
|
|
|
33
28
|
// }, []);
|
|
34
29
|
// return value;
|
|
35
30
|
// };
|
|
31
|
+
|
|
36
32
|
// const handleSearchOperation = (header: string, operation: string) => {
|
|
37
33
|
// // setSearchOperation((prev) => ({ ...prev, [header]: operation }));
|
|
38
34
|
// // const list_ofdata = getValue(header);
|
|
@@ -55,6 +51,7 @@ exports.searchFeatures = void 0;
|
|
|
55
51
|
// // }
|
|
56
52
|
// // }
|
|
57
53
|
// };
|
|
54
|
+
|
|
58
55
|
// const handleSearch = (field: string, term: string) => {
|
|
59
56
|
// // if (searchOperation[field] === "between") {
|
|
60
57
|
// // setBetweenValues((prev) => ({
|
|
@@ -65,6 +62,7 @@ exports.searchFeatures = void 0;
|
|
|
65
62
|
// // setSearchTerms((prev) => ({ ...prev, [field]: term }));
|
|
66
63
|
// // }
|
|
67
64
|
// };
|
|
65
|
+
|
|
68
66
|
// const handleHeaderClick = (header: string, search: boolean) => {
|
|
69
67
|
// // if (!search) {
|
|
70
68
|
// // return;
|
|
@@ -75,6 +73,7 @@ exports.searchFeatures = void 0;
|
|
|
75
73
|
// const closePopover = () => {
|
|
76
74
|
// // setPopoverOpen(false);
|
|
77
75
|
// };
|
|
76
|
+
|
|
78
77
|
// const filteredData = sortedData.filter((item) => {
|
|
79
78
|
// return Object.keys(searchTerms).every((key) => {
|
|
80
79
|
// const term = String(searchTerms[key]).toLowerCase();
|
|
@@ -114,108 +113,111 @@ exports.searchFeatures = void 0;
|
|
|
114
113
|
// }
|
|
115
114
|
// });
|
|
116
115
|
// });
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
116
|
+
import React from "react";
|
|
117
|
+
|
|
118
|
+
export const searchFeatures = (header: string) => {
|
|
119
|
+
return <>hi</>;
|
|
120
|
+
// const fieldType = getFieldType(header, data);
|
|
121
|
+
// return (
|
|
122
|
+
// <>
|
|
123
|
+
// <Select
|
|
124
|
+
// value={searchOperation[header] || "notBlank"}
|
|
125
|
+
// onChange={(e) => handleSearchOperation(header, e.target.value)}
|
|
126
|
+
// style={{ background: "#3182ce", color: "white" }}
|
|
127
|
+
// >
|
|
128
|
+
// <option value="equals">Equals</option>
|
|
129
|
+
// <option value="notEquals">Does not equal</option>
|
|
130
|
+
// {fieldType === "number" ? (
|
|
131
|
+
// <>
|
|
132
|
+
// <option value="greaterThan">Greater than</option>
|
|
133
|
+
// <option value="greaterThanOrEqual">
|
|
134
|
+
// Greater than or equal to
|
|
135
|
+
// </option>
|
|
136
|
+
// <option value="lessThan">Less than</option>
|
|
137
|
+
// <option value="lessThanOrEqual">Less than or equal to</option>
|
|
138
|
+
// <option value="between">Between</option>
|
|
139
|
+
// </>
|
|
140
|
+
// ) : (
|
|
141
|
+
// <>
|
|
142
|
+
// <option value="contains">Contains</option>
|
|
143
|
+
// <option value="notContains">Does not contain</option>
|
|
144
|
+
// <option value="beginsWith">Begins with</option>
|
|
145
|
+
// <option value="endsWith">Ends with</option>
|
|
146
|
+
// </>
|
|
147
|
+
// )}
|
|
148
|
+
// <option value="blank">Blank</option>
|
|
149
|
+
// <option value="notBlank">Not blank</option>
|
|
150
|
+
// </Select>
|
|
151
|
+
// {searchOperation[header] !== undefined &&
|
|
152
|
+
// searchOperation[header] === "between" &&
|
|
153
|
+
// fieldType === "number" && (
|
|
154
|
+
// <>
|
|
155
|
+
// <br />
|
|
156
|
+
// <Input
|
|
157
|
+
// value={betweenValues[header]?.min || ""}
|
|
158
|
+
// onChange={(e) => {
|
|
159
|
+
// setBetweenValues((prev) => ({
|
|
160
|
+
// ...prev,
|
|
161
|
+
// [header]: { ...prev[header], min: e.target.value },
|
|
162
|
+
// }));
|
|
163
|
+
// setSearchTerms((prev) => ({ ...prev, [header]: "between" }));
|
|
164
|
+
// }}
|
|
165
|
+
// placeholder="Min..."
|
|
166
|
+
// background="white"
|
|
167
|
+
// color="black"
|
|
168
|
+
// />
|
|
169
|
+
// <br />
|
|
170
|
+
// <br />
|
|
171
|
+
// <Input
|
|
172
|
+
// value={betweenValues[header]?.max || ""}
|
|
173
|
+
// onChange={(e) => {
|
|
174
|
+
// setBetweenValues((prev) => ({
|
|
175
|
+
// ...prev,
|
|
176
|
+
// [header]: { ...prev[header], max: e.target.value },
|
|
177
|
+
// }));
|
|
178
|
+
// setSearchTerms((prev) => ({ ...prev, [header]: "between" }));
|
|
179
|
+
// }}
|
|
180
|
+
// placeholder="Max..."
|
|
181
|
+
// background="white"
|
|
182
|
+
// color="black"
|
|
183
|
+
// />
|
|
184
|
+
// </>
|
|
185
|
+
// )}
|
|
186
|
+
// {searchOperation[header] !== undefined &&
|
|
187
|
+
// searchOperation[header] !== "between" &&
|
|
188
|
+
// searchOperation[header] !== "blank" &&
|
|
189
|
+
// searchOperation[header] !== "notBlank" && (
|
|
190
|
+
// <>
|
|
191
|
+
// <br />
|
|
192
|
+
// <Input
|
|
193
|
+
// value={searchTerms[header] || ""}
|
|
194
|
+
// onChange={(e) => handleSearch(header, e.target.value)}
|
|
195
|
+
// placeholder="Search..."
|
|
196
|
+
// background="white"
|
|
197
|
+
// color="black"
|
|
198
|
+
// />
|
|
199
|
+
// {/* <br />
|
|
200
|
+
// <select onChange={(e) => console.log("option 1")} style={{ width: "100%", borderRadius: "2px", height: "30px" }}>
|
|
201
|
+
// <option value="">Select an option</option>
|
|
202
|
+
// <option value="option1">Option 1</option>
|
|
203
|
+
// <option value="option2">Option 2</option>
|
|
204
|
+
// <option value="option3">Option 3</option>
|
|
205
|
+
// </select> */}
|
|
206
|
+
// </>
|
|
207
|
+
// )}
|
|
208
|
+
// </>
|
|
209
|
+
// );
|
|
210
210
|
};
|
|
211
|
-
|
|
211
|
+
|
|
212
212
|
// const hasSelection = selection.length > 0;
|
|
213
213
|
// const indeterminate = hasSelection && selection.length < data.length;
|
|
214
|
+
|
|
214
215
|
// const handleMouseEnter = (index: number) => setHoveredHeaderIndex(index);
|
|
215
216
|
// const handleMouseLeave = () => {
|
|
216
217
|
// setHoveredHeaderIndex(null);
|
|
217
218
|
// closePopover();
|
|
218
219
|
// };
|
|
220
|
+
|
|
219
221
|
// const removeSearchOptionTerm = (key: any) => {
|
|
220
222
|
// const newSearchTerms = { ...searchTerms };
|
|
221
223
|
// const newSearchOperation = { ...searchOperation };
|
|
@@ -227,6 +229,7 @@ exports.searchFeatures = searchFeatures;
|
|
|
227
229
|
// setSearchOperation(newSearchOperation);
|
|
228
230
|
// setBetweenValues(newBetweenValues);
|
|
229
231
|
// };
|
|
232
|
+
|
|
230
233
|
// const SearchOptions = () => {
|
|
231
234
|
// return (
|
|
232
235
|
// <Wrap>
|
|
@@ -259,6 +262,7 @@ exports.searchFeatures = searchFeatures;
|
|
|
259
262
|
// </Wrap>
|
|
260
263
|
// );
|
|
261
264
|
// };
|
|
265
|
+
|
|
262
266
|
// const Export = ({
|
|
263
267
|
// exportOptions,
|
|
264
268
|
// }: {
|
|
@@ -282,6 +286,7 @@ exports.searchFeatures = searchFeatures;
|
|
|
282
286
|
// </Select>
|
|
283
287
|
// );
|
|
284
288
|
// };
|
|
289
|
+
|
|
285
290
|
/* <Box display="flex" justifyContent="flex-end">
|
|
286
291
|
<SearchOptions />
|
|
287
292
|
{exportOptions && exportOptions.length > 0 && (
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ComponentStyleConfig } from "@chakra-ui/react";
|
|
2
|
+
|
|
3
|
+
export const Tag: ComponentStyleConfig = {
|
|
4
|
+
baseStyle: {
|
|
5
|
+
borderRadius: "full",
|
|
6
|
+
fontWeight: "bold",
|
|
7
|
+
px: 3,
|
|
8
|
+
py: 1,
|
|
9
|
+
},
|
|
10
|
+
sizes: {
|
|
11
|
+
sm: {
|
|
12
|
+
fontSize: "0.75rem",
|
|
13
|
+
px: 2,
|
|
14
|
+
py: 1,
|
|
15
|
+
},
|
|
16
|
+
md: {
|
|
17
|
+
fontSize: "0.875rem",
|
|
18
|
+
px: 3,
|
|
19
|
+
py: 1.5,
|
|
20
|
+
},
|
|
21
|
+
lg: {
|
|
22
|
+
fontSize: "1rem",
|
|
23
|
+
px: 4,
|
|
24
|
+
py: 2,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
variants: {
|
|
28
|
+
solid: ({ theme, colorScheme = "primary" }) => ({
|
|
29
|
+
bg: theme.colors[colorScheme][500],
|
|
30
|
+
color: theme.colors.white,
|
|
31
|
+
_hover: {
|
|
32
|
+
bg: theme.colors[colorScheme][600],
|
|
33
|
+
},
|
|
34
|
+
_active: {
|
|
35
|
+
bg: theme.colors[colorScheme][700],
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
outline: ({ theme, colorScheme = "primary" }) => ({
|
|
39
|
+
border: "0.125rem solid",
|
|
40
|
+
borderColor: theme.colors[colorScheme][500],
|
|
41
|
+
color: theme.colors[colorScheme][500],
|
|
42
|
+
bg: "transparent",
|
|
43
|
+
_hover: {
|
|
44
|
+
bg: theme.colors[colorScheme][50],
|
|
45
|
+
},
|
|
46
|
+
_active: {
|
|
47
|
+
bg: theme.colors[colorScheme][100],
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
defaultProps: {
|
|
52
|
+
size: "md",
|
|
53
|
+
variant: "solid",
|
|
54
|
+
colorScheme: "primary",
|
|
55
|
+
},
|
|
56
|
+
};
|