pixelize-design-library 2.4.1-beta.10 → 2.4.1-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/Components/AlertDialog/AlertDialog.js +1 -1
- package/dist/Components/Button/Button.d.ts +1 -1
- package/dist/Components/Button/Button.d.ts.map +1 -1
- package/dist/Components/Button/Button.js +2 -2
- package/dist/Components/Button/ButtonProps.d.ts +1 -1
- package/dist/Components/Button/ButtonProps.d.ts.map +1 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.d.ts.map +1 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +5 -2
- package/dist/Components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/Components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Components/Checkbox/Checkbox.js +2 -2
- package/dist/Components/Checkbox/CheckboxProps.d.ts +1 -1
- package/dist/Components/Checkbox/CheckboxProps.d.ts.map +1 -1
- package/dist/Components/Common/ErrorMessage.d.ts +2 -1
- package/dist/Components/Common/ErrorMessage.d.ts.map +1 -1
- package/dist/Components/Common/ErrorMessage.js +4 -2
- package/dist/Components/Common/FormLabel.d.ts +1 -1
- package/dist/Components/Common/FormLabel.d.ts.map +1 -1
- package/dist/Components/Common/FormLabel.js +15 -2
- package/dist/Components/Common/Label.d.ts +3 -1
- package/dist/Components/Common/Label.d.ts.map +1 -1
- package/dist/Components/Common/Label.js +2 -2
- package/dist/Components/Dropdown/DropDown.d.ts.map +1 -1
- package/dist/Components/Dropdown/DropDown.js +132 -14
- package/dist/Components/Dropdown/DropdownProps.d.ts +2 -0
- package/dist/Components/Dropdown/DropdownProps.d.ts.map +1 -1
- package/dist/Components/Editor/EditorProps.d.ts +1 -1
- package/dist/Components/Editor/EditorProps.d.ts.map +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts.map +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.js +5 -2
- package/dist/Components/KanbanBoard/MeasuredItem.d.ts.map +1 -1
- package/dist/Components/KanbanBoard/MeasuredItem.js +4 -2
- package/dist/Components/NavigationBar/NavigationBar.d.ts.map +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +3 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.d.ts.map +1 -1
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +40 -3
- package/dist/Components/ProductCard/ProductPrice.d.ts.map +1 -1
- package/dist/Components/ProductCard/ProductPrice.js +13 -7
- package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/Components/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/Components/ProgressBar/ProgressBar.js +2 -2
- package/dist/Components/ProgressBar/ProgressBarProps.d.ts +1 -1
- package/dist/Components/ProgressBar/ProgressBarProps.d.ts.map +1 -1
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts.map +1 -1
- package/dist/Components/ScrollToTop/ScrollToTop.js +8 -3
- package/dist/Components/SearchSelect/SearchSelect.d.ts.map +1 -1
- package/dist/Components/SearchSelect/SearchSelect.js +213 -18
- package/dist/Components/SelectSearch/SelectSearch.d.ts.map +1 -1
- package/dist/Components/SelectSearch/SelectSearch.js +89 -4
- package/dist/Components/SelectV2/SelectV2.d.ts.map +1 -1
- package/dist/Components/SelectV2/SelectV2.js +116 -29
- package/dist/Components/SideBar/SecondaryBar.d.ts.map +1 -1
- package/dist/Components/SideBar/SecondaryBar.js +15 -7
- package/dist/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/Components/SideBar/SideBar.js +36 -5
- package/dist/Components/SideBar/components/MenuItemBox.d.ts.map +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.js +44 -15
- package/dist/Components/SideBar/components/MenuPopoverContent.d.ts.map +1 -1
- package/dist/Components/SideBar/components/MenuPopoverContent.js +9 -3
- package/dist/Components/StageProgress/StageItem.d.ts.map +1 -1
- package/dist/Components/StageProgress/StageItem.js +1 -1
- package/dist/Components/StageProgress/StepperStage.d.ts.map +1 -1
- package/dist/Components/StageProgress/StepperStage.js +1 -1
- package/dist/Components/Table/Table.d.ts.map +1 -1
- package/dist/Components/Table/Table.js +1 -1
- package/dist/Components/Table/components/HeaderActions.d.ts.map +1 -1
- package/dist/Components/Table/components/HeaderActions.js +3 -1
- package/dist/Components/Table/components/TableActions.d.ts.map +1 -1
- package/dist/Components/Table/components/TableActions.js +3 -3
- package/dist/Components/Table/components/TableBody.d.ts.map +1 -1
- package/dist/Components/Table/components/TableBody.js +74 -48
- package/dist/Components/Table/components/TableGroupRow.d.ts +1 -0
- package/dist/Components/Table/components/TableGroupRow.d.ts.map +1 -1
- package/dist/Components/Table/components/TableGroupRow.js +2 -2
- package/dist/Components/Table/components/TableHeader.d.ts.map +1 -1
- package/dist/Components/Table/components/TableHeader.js +35 -42
- package/dist/Components/Table/components/TableSearch.d.ts.map +1 -1
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/CompactSelect.d.ts.map +1 -1
- package/dist/Components/Table/filters/CompactSelect.js +33 -1
- package/dist/Components/Table/filters/LeftFilterPane.d.ts.map +1 -1
- package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/Components/Table/hooks/useTable.d.ts.map +1 -1
- package/dist/Components/Table/hooks/useTable.js +6 -2
- package/dist/Components/Table/settings/ManageColumns.d.ts.map +1 -1
- package/dist/Components/Table/settings/ManageColumns.js +13 -4
- package/dist/Components/Table/settings/TableSettings.d.ts.map +1 -1
- package/dist/Components/Table/settings/TableSettings.js +2 -2
- package/dist/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/Components/Tag/Tag.js +5 -8
- package/dist/Components/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Components/Timeline/Timeline.js +202 -202
- package/dist/Components/Toaster/Toaster.d.ts.map +1 -1
- package/dist/Components/Toaster/Toaster.js +19 -11
- package/dist/Theme/chakra/common.web.d.ts.map +1 -1
- package/dist/Theme/chakra/common.web.js +4 -1
- package/dist/Theme/index.d.ts.map +1 -1
- package/dist/Theme/index.js +25 -9
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +12 -3
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -1
- package/dist/Theme/provider/PixelizeThemeProvider.js +44 -12
- package/dist/Theme/tokens/brands/lavender/palette.light.d.ts.map +1 -1
- package/dist/Theme/tokens/brands/lavender/palette.light.js +22 -15
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +5 -4
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts.map +1 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +19 -4
- package/dist/Utils/rafThrottle.d.ts +15 -0
- package/dist/Utils/rafThrottle.d.ts.map +1 -0
- package/dist/Utils/rafThrottle.js +34 -0
- package/dist/Utils/table.d.ts.map +1 -1
- package/dist/Utils/table.js +16 -5
- package/dist/esm/App.js +90 -0
- package/dist/esm/Assets/defaultLogo.js +5 -0
- package/dist/esm/Components/Accordion/Accordion.js +34 -0
- package/dist/esm/Components/Accordion/AccordionProps.js +1 -0
- package/dist/esm/Components/Accordion/accordionColors.js +30 -0
- package/dist/esm/Components/AlertDialog/AlertDialog.js +9 -0
- package/dist/esm/Components/AlertDialog/AlertDialogProps.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +71 -0
- package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChartProps.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +149 -0
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChartProps.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +161 -0
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChartProps.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +79 -0
- package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.js +1 -0
- package/dist/esm/Components/Breadcrumbs/Breadcrumbs.js +9 -0
- package/dist/esm/Components/Breadcrumbs/Breadcrumbs.stories.js +5 -0
- package/dist/esm/Components/Breadcrumbs/BreadcrumbsProps.js +1 -0
- package/dist/esm/Components/Button/Button.js +7 -0
- package/dist/esm/Components/Button/Button.stories.js +5 -0
- package/dist/esm/Components/Button/Button.styles.js +204 -0
- package/dist/esm/Components/Button/ButtonProps.js +1 -0
- package/dist/esm/Components/ButtonGroupIcon/ButtonGoupIconProps.js +1 -0
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +98 -0
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.stories.js +5 -0
- package/dist/esm/Components/Buttons/Buttons.js +5 -0
- package/dist/esm/Components/Buttons/ButtonsProps.js +1 -0
- package/dist/esm/Components/Card/Card.js +5 -0
- package/dist/esm/Components/Card/CardProps.js +1 -0
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +65 -0
- package/dist/esm/Components/Card/PaymentCard/PaymentCardProps.js +1 -0
- package/dist/esm/Components/Checkbox/Checkbox.js +28 -0
- package/dist/esm/Components/Checkbox/Checkbox.stories.js +6 -0
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +69 -0
- package/dist/esm/Components/Checkbox/CheckboxProps.js +1 -0
- package/dist/esm/Components/Common/ErrorComponent.js +15 -0
- package/dist/esm/Components/Common/ErrorMessage.js +17 -0
- package/dist/esm/Components/Common/FormLabel.js +32 -0
- package/dist/esm/Components/Common/FormattedDescription.js +57 -0
- package/dist/esm/Components/Common/HelperText.js +8 -0
- package/dist/esm/Components/Common/Label.js +13 -0
- package/dist/esm/Components/Common/fieldStyles.js +34 -0
- package/dist/esm/Components/ContactForm/ContactForm.js +112 -0
- package/dist/esm/Components/ContactForm/ContactFormProps.js +1 -0
- package/dist/esm/Components/CopyButton/CopyButton.js +44 -0
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +63 -0
- package/dist/esm/Components/CustomModulesTable/CustomModulesTableProps.js +1 -0
- package/dist/esm/Components/CustomModulesTable/DeleteModuleModal.js +11 -0
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +20 -0
- package/dist/esm/Components/DatePicker/CalendarPanel.js +133 -0
- package/dist/esm/Components/DatePicker/DatePicker.js +252 -0
- package/dist/esm/Components/DatePicker/DatePickerProps.js +1 -0
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +206 -0
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +972 -0
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +27 -0
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +78 -0
- package/dist/esm/Components/DatePicker/TimePicker.js +70 -0
- package/dist/esm/Components/DatePicker/TimePickerInput.js +412 -0
- package/dist/esm/Components/Divider/Divider.js +9 -0
- package/dist/esm/Components/Drawer/Drawer.js +24 -0
- package/dist/esm/Components/Drawer/DrawerProps.js +1 -0
- package/dist/esm/Components/Dropdown/DropDown.js +249 -0
- package/dist/esm/Components/Dropdown/DropdownProps.js +1 -0
- package/dist/esm/Components/Editor/Editor.js +38 -0
- package/dist/esm/Components/Editor/EditorProps.js +1 -0
- package/dist/esm/Components/Editor/joditThemeVars.js +75 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +15 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.js +1 -0
- package/dist/esm/Components/EmptyState/EmptyState.js +40 -0
- package/dist/esm/Components/EmptyState/EmptyStateProps.js +1 -0
- package/dist/esm/Components/FeedbackForm/FeedbackForm.js +65 -0
- package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +33 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +79 -0
- package/dist/esm/Components/FilePreview/FilePreviewProps.js +1 -0
- package/dist/esm/Components/FileUpload/FileUpload.js +82 -0
- package/dist/esm/Components/FileUpload/FileUploadProps.js +1 -0
- package/dist/esm/Components/FileUpload/constants.js +24 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +78 -0
- package/dist/esm/Components/FileUploader/FileUploaderProps.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +258 -0
- package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +10 -0
- package/dist/esm/Components/Form/FormWrapper.js +9 -0
- package/dist/esm/Components/Header/Header.js +55 -0
- package/dist/esm/Components/Header/HeaderActions.js +24 -0
- package/dist/esm/Components/Header/HeaderProps.js +1 -0
- package/dist/esm/Components/Header/components/desktopMenu.js +43 -0
- package/dist/esm/Components/Header/components/mobileMenu.js +37 -0
- package/dist/esm/Components/Input/Input/Input.js +40 -0
- package/dist/esm/Components/Input/Input/InputProps.js +1 -0
- package/dist/esm/Components/Input/PhoneNumberInput.js +62 -0
- package/dist/esm/Components/Input/PhoneNumberInputProps.js +1 -0
- package/dist/esm/Components/Input/Switch/InputSwitch.js +21 -0
- package/dist/esm/Components/Input/TextInput.js +16 -0
- package/dist/esm/Components/Input/TextInput.stories.js +7 -0
- package/dist/esm/Components/Input/TextInput.styles.js +101 -0
- package/dist/esm/Components/Input/TextInputProps.js +1 -0
- package/dist/esm/Components/Input/textInputIconSize.js +36 -0
- package/dist/esm/Components/InputTextArea/InputTextArea.js +8 -0
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +77 -0
- package/dist/esm/Components/InputTextArea/InputTextAreaProps.js +1 -0
- package/dist/esm/Components/KanbanBoard/AccountCard.js +22 -0
- package/dist/esm/Components/KanbanBoard/AccountRow.js +10 -0
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +13 -0
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +453 -0
- package/dist/esm/Components/KanbanBoard/KanbanBoardProps.js +1 -0
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +54 -0
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +10 -0
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +40 -0
- package/dist/esm/Components/LimitReachedModal/LimitReachedModalProps.js +1 -0
- package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +50 -0
- package/dist/esm/Components/Loading/Loading.js +24 -0
- package/dist/esm/Components/Loading/Loading.stories.js +6 -0
- package/dist/esm/Components/Loading/LoadingProps.js +1 -0
- package/dist/esm/Components/Modal/Modal.js +30 -0
- package/dist/esm/Components/Modal/Modal.stories.js +6 -0
- package/dist/esm/Components/Modal/ModalProps.js +1 -0
- package/dist/esm/Components/MoreItems/MoreItems.js +22 -0
- package/dist/esm/Components/MoreItems/MoreItemsProps.js +1 -0
- package/dist/esm/Components/MultiSelect/MultiSelect.js +70 -0
- package/dist/esm/Components/MultiSelect/MultiSelectProps.js +1 -0
- package/dist/esm/Components/NavigationBar/NavBar.stories.js +2 -0
- package/dist/esm/Components/NavigationBar/NavigationBar.js +57 -0
- package/dist/esm/Components/NavigationBar/NavigationBarProps.js +1 -0
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +142 -0
- package/dist/esm/Components/NoteTextArea/NoteTextAreaProps.js +1 -0
- package/dist/esm/Components/Notification/Notification.js +106 -0
- package/dist/esm/Components/Notification/NotificationProps.js +1 -0
- package/dist/esm/Components/NumberInput/NumberInput.js +6 -0
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +85 -0
- package/dist/esm/Components/NumberInput/NumberInputProps.js +1 -0
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +116 -0
- package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +34 -0
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +57 -0
- package/dist/esm/Components/OrganizationDetails/DeleteOrgModal.js +11 -0
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +165 -0
- package/dist/esm/Components/OrganizationDetails/OrganizationDetailsProps.js +1 -0
- package/dist/esm/Components/PdfViewer/PdfViewer.js +10 -0
- package/dist/esm/Components/PinInput/PinInput.js +15 -0
- package/dist/esm/Components/PinInput/PinInput.stories.js +5 -0
- package/dist/esm/Components/PinInput/PinInputProps.js +1 -0
- package/dist/esm/Components/PinInputs/PinInputs.js +48 -0
- package/dist/esm/Components/PinInputs/PinInputsProps.js +1 -0
- package/dist/esm/Components/PlanBadge/PlanBadge.js +17 -0
- package/dist/esm/Components/PlanBadge/PlanBadgeProps.js +1 -0
- package/dist/esm/Components/PlanPill/PlanPill.js +40 -0
- package/dist/esm/Components/PlanPill/PlanPillProps.js +1 -0
- package/dist/esm/Components/PlanPill/planPillGradient.js +17 -0
- package/dist/esm/Components/ProductCard/ProductCard.js +62 -0
- package/dist/esm/Components/ProductCard/ProductCardProps.js +1 -0
- package/dist/esm/Components/ProductCard/ProductLabel.js +18 -0
- package/dist/esm/Components/ProductCard/ProductPrice.js +110 -0
- package/dist/esm/Components/ProductCard/ProductReview.js +19 -0
- package/dist/esm/Components/ProductCard/ProductTags.js +48 -0
- package/dist/esm/Components/ProductDetails/ProductDetails.js +40 -0
- package/dist/esm/Components/ProductDetails/ProductDetailsProps.js +1 -0
- package/dist/esm/Components/ProductDetails/ProductDtlPrice.js +22 -0
- package/dist/esm/Components/ProductDetails/ProductImageSlider.js +188 -0
- package/dist/esm/Components/ProfileCard/ProfileCard.js +34 -0
- package/dist/esm/Components/ProfileCard/ProfileCard.stories.js +5 -0
- package/dist/esm/Components/ProfileCard/ProfileCardProps.js +1 -0
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +70 -0
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.stories.js +5 -0
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.js +1 -0
- package/dist/esm/Components/ProgressBar/ProgressBar.js +6 -0
- package/dist/esm/Components/ProgressBar/ProgressBar.stories.js +6 -0
- package/dist/esm/Components/ProgressBar/ProgressBarProps.js +1 -0
- package/dist/esm/Components/RadioButton/RadioButton.js +25 -0
- package/dist/esm/Components/RadioButton/RadioButton.stories.js +6 -0
- package/dist/esm/Components/RadioButton/RadioButtonProps.js +1 -0
- package/dist/esm/Components/Reorder/Reorder.js +22 -0
- package/dist/esm/Components/Reorder/ReorderProps.js +1 -0
- package/dist/esm/Components/RolesPermission/DeleteRoleModal.js +13 -0
- package/dist/esm/Components/RolesPermission/RolesPermission.js +121 -0
- package/dist/esm/Components/RolesPermission/RolesPermissionProps.js +1 -0
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +67 -0
- package/dist/esm/Components/Search/Search.js +29 -0
- package/dist/esm/Components/Search/SearchProps.js +1 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +518 -0
- package/dist/esm/Components/SearchSelect/SearchSelectProps.js +1 -0
- package/dist/esm/Components/SearchSelect/SelectTruncatedLabel.js +17 -0
- package/dist/esm/Components/SearchSelect/searchSelectSize.js +93 -0
- package/dist/esm/Components/Select/Select.js +24 -0
- package/dist/esm/Components/Select/Select.stories.js +7 -0
- package/dist/esm/Components/Select/Select.styles.js +108 -0
- package/dist/esm/Components/Select/SelectProps.js +1 -0
- package/dist/esm/Components/SelectSearch/SelectSearch.js +270 -0
- package/dist/esm/Components/SelectSearch/SelectSearchProps.js +1 -0
- package/dist/esm/Components/SelectV2/SelectV2.js +233 -0
- package/dist/esm/Components/SelectV2/SelectV2Props.js +1 -0
- package/dist/esm/Components/SideBar/SecondaryBar.js +67 -0
- package/dist/esm/Components/SideBar/SideBar.js +237 -0
- package/dist/esm/Components/SideBar/SideBarProps.js +1 -0
- package/dist/esm/Components/SideBar/Sidebar.stories.js +6 -0
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +132 -0
- package/dist/esm/Components/SideBar/components/MenuItems.js +114 -0
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +54 -0
- package/dist/esm/Components/SideBar/components/OtherApps.js +20 -0
- package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +29 -0
- package/dist/esm/Components/SideBar/components/TextTruncation.js +27 -0
- package/dist/esm/Components/SideBar/sidebarAccentColors.js +31 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +34 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTableProps.js +1 -0
- package/dist/esm/Components/Skeletons/Skeleton.stories.js +6 -0
- package/dist/esm/Components/Skeletons/SkeletonProps.js +1 -0
- package/dist/esm/Components/Skeletons/Skeletons.js +5 -0
- package/dist/esm/Components/Slider/Slider.js +41 -0
- package/dist/esm/Components/StageProgress/StageItem.js +85 -0
- package/dist/esm/Components/StageProgress/StageProgress.js +47 -0
- package/dist/esm/Components/StageProgress/StageProgressProps.js +29 -0
- package/dist/esm/Components/StageProgress/StepperStage.js +38 -0
- package/dist/esm/Components/Switch/Switch.js +11 -0
- package/dist/esm/Components/Switch/SwitchProps.js +1 -0
- package/dist/esm/Components/Table/Table.js +430 -0
- package/dist/esm/Components/Table/Table.stories.js +8 -0
- package/dist/esm/Components/Table/TableProps.js +1 -0
- package/dist/esm/Components/Table/components/HeaderActions.js +47 -0
- package/dist/esm/Components/Table/components/Pagination.js +19 -0
- package/dist/esm/Components/Table/components/TableActions.js +55 -0
- package/dist/esm/Components/Table/components/TableBody.js +337 -0
- package/dist/esm/Components/Table/components/TableGroupRow.js +11 -0
- package/dist/esm/Components/Table/components/TableHeader.js +100 -0
- package/dist/esm/Components/Table/components/TableLoading.js +11 -0
- package/dist/esm/Components/Table/components/TableSearch.js +31 -0
- package/dist/esm/Components/Table/components/tableRowHoverStyle.js +22 -0
- package/dist/esm/Components/Table/filterTypes.js +1 -0
- package/dist/esm/Components/Table/filters/ActiveFilters.js +63 -0
- package/dist/esm/Components/Table/filters/CompactSelect.js +55 -0
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +174 -0
- package/dist/esm/Components/Table/filters/SelectOperationControls.js +5 -0
- package/dist/esm/Components/Table/filters/TableFilters.js +45 -0
- package/dist/esm/Components/Table/filters/TextOperationControls.js +16 -0
- package/dist/esm/Components/Table/hooks/useDebounce.js +22 -0
- package/dist/esm/Components/Table/hooks/useTable.js +227 -0
- package/dist/esm/Components/Table/settings/ManageColumns.js +105 -0
- package/dist/esm/Components/Table/settings/TableSettings.js +82 -0
- package/dist/esm/Components/Tag/Tag.js +18 -0
- package/dist/esm/Components/Tag/Tag.styles.js +91 -0
- package/dist/esm/Components/Tag/TagProps.js +1 -0
- package/dist/esm/Components/Timeline/Timeline.js +250 -0
- package/dist/esm/Components/Timeline/TimelineProps.js +1 -0
- package/dist/esm/Components/Toaster/Toaster.js +120 -0
- package/dist/esm/Components/Toaster/Toaster.stories.js +7 -0
- package/dist/esm/Components/Toaster/ToasterProps.js +1 -0
- package/dist/esm/Components/Toggle/TableToggle.js +39 -0
- package/dist/esm/Components/Toggle/TableToggleProps.js +1 -0
- package/dist/esm/Components/ToolTip/OverflowToolTip.js +20 -0
- package/dist/esm/Components/ToolTip/ToolTip.js +35 -0
- package/dist/esm/Components/ToolTip/ToolTip.stories.js +6 -0
- package/dist/esm/Components/ToolTip/ToolTipProps.js +1 -0
- package/dist/esm/Components/Trail/EditableCell.js +27 -0
- package/dist/esm/Components/Trail/SelectAllCheckbox.js +5 -0
- package/dist/esm/Components/Trail/TrailWorks.js +54 -0
- package/dist/esm/Components/Trail/data.js +26 -0
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +79 -0
- package/dist/esm/Components/UpgradeButton/UpgradeButtonProps.js +1 -0
- package/dist/esm/Components/UserDetails/AddUserModal.js +101 -0
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +56 -0
- package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +14 -0
- package/dist/esm/Components/UserDetails/UserDetails.js +109 -0
- package/dist/esm/Components/UserDetails/UserDetailsProps.js +1 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +83 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +61 -0
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindowProps.js +1 -0
- package/dist/esm/Constants/Sidebar.js +39 -0
- package/dist/esm/Hooks/useIsTruncated.js +54 -0
- package/dist/esm/Hooks/usePreferences.js +69 -0
- package/dist/esm/Hooks/useSidebarPrefs.js +68 -0
- package/dist/esm/Layout.js +281 -0
- package/dist/esm/Pages/TInput.js +15 -0
- package/dist/esm/Pages/accordion.js +16 -0
- package/dist/esm/Pages/alertdialog.js +15 -0
- package/dist/esm/Pages/button.js +27 -0
- package/dist/esm/Pages/card.js +64 -0
- package/dist/esm/Pages/chart.js +20 -0
- package/dist/esm/Pages/checkbox.js +6 -0
- package/dist/esm/Pages/contactForm.js +10 -0
- package/dist/esm/Pages/customModulesTable.js +20 -0
- package/dist/esm/Pages/datePick.js +44 -0
- package/dist/esm/Pages/drawer.js +15 -0
- package/dist/esm/Pages/dropdown.js +16 -0
- package/dist/esm/Pages/editor.js +8 -0
- package/dist/esm/Pages/feedback.js +6 -0
- package/dist/esm/Pages/fileUpload.js +29 -0
- package/dist/esm/Pages/input.js +43 -0
- package/dist/esm/Pages/kanbanboard.js +177 -0
- package/dist/esm/Pages/modal.js +23 -0
- package/dist/esm/Pages/multiSelect.js +17 -0
- package/dist/esm/Pages/noteArea.js +21 -0
- package/dist/esm/Pages/notification.js +32 -0
- package/dist/esm/Pages/numberInput.js +11 -0
- package/dist/esm/Pages/orgSwitcher.js +31 -0
- package/dist/esm/Pages/organizationDetails.js +75 -0
- package/dist/esm/Pages/photoViewer.js +7 -0
- package/dist/esm/Pages/pinInputs.js +6 -0
- package/dist/esm/Pages/productCaard.js +306 -0
- package/dist/esm/Pages/productDetailCard.js +73 -0
- package/dist/esm/Pages/productFilter.js +143 -0
- package/dist/esm/Pages/progressbar.js +6 -0
- package/dist/esm/Pages/radioButton.js +16 -0
- package/dist/esm/Pages/rolesPermission.js +139 -0
- package/dist/esm/Pages/search.js +16 -0
- package/dist/esm/Pages/searchSelect.js +92 -0
- package/dist/esm/Pages/select.js +15 -0
- package/dist/esm/Pages/selectSearch.js +53 -0
- package/dist/esm/Pages/signInActivityTable.js +12 -0
- package/dist/esm/Pages/skeleton.js +7 -0
- package/dist/esm/Pages/stageProgress.js +26 -0
- package/dist/esm/Pages/switch.js +12 -0
- package/dist/esm/Pages/table.js +175 -0
- package/dist/esm/Pages/tag.js +22 -0
- package/dist/esm/Pages/textArea.js +9 -0
- package/dist/esm/Pages/tier1.js +48 -0
- package/dist/esm/Pages/timeline.js +68 -0
- package/dist/esm/Pages/tooltip.js +6 -0
- package/dist/esm/Pages/toster.js +48 -0
- package/dist/esm/Pages/upgradeButton.js +12 -0
- package/dist/esm/Pages/userDetails.js +74 -0
- package/dist/esm/Pages/verifyEmail.js +12 -0
- package/dist/esm/Theme/chakra/Avatar.styles.js +25 -0
- package/dist/esm/Theme/chakra/Drawer.styles.js +23 -0
- package/dist/esm/Theme/chakra/Menu.styles.js +47 -0
- package/dist/esm/Theme/chakra/Modal.styles.js +23 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +27 -0
- package/dist/esm/Theme/chakra/Slider.styles.js +22 -0
- package/dist/esm/Theme/chakra/Switch.styles.js +21 -0
- package/dist/esm/Theme/chakra/Tabs.styles.js +38 -0
- package/dist/esm/Theme/chakra/common.web.js +22 -0
- package/dist/esm/Theme/chakra/componentStyles.js +221 -0
- package/dist/esm/Theme/chakra/createBrandTheme.js +118 -0
- package/dist/esm/Theme/chakra/fonts.web.js +10 -0
- package/dist/esm/Theme/index.js +63 -0
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +204 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +107 -0
- package/dist/esm/Theme/provider/colorModeStorage.js +99 -0
- package/dist/esm/Theme/provider/index.js +3 -0
- package/dist/esm/Theme/provider/useThemeMode.js +9 -0
- package/dist/esm/Theme/themeProps.js +1 -0
- package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/emerald/palette.light.js +130 -0
- package/dist/esm/Theme/tokens/brands/index.js +73 -0
- package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +321 -0
- package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/meadow/palette.light.js +128 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +130 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +134 -0
- package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/skyline/palette.light.js +128 -0
- package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/slate/palette.light.js +132 -0
- package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +8 -0
- package/dist/esm/Theme/tokens/brands/storefront/palette.light.js +122 -0
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +202 -0
- package/dist/esm/Theme/tokens/brands/zinc/palette.light.js +381 -0
- package/dist/esm/Theme/tokens/builders/accentText.js +83 -0
- package/dist/esm/Theme/tokens/builders/buildBrandTokens.js +28 -0
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +289 -0
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +21 -0
- package/dist/esm/Theme/tokens/builders/color.js +141 -0
- package/dist/esm/Theme/tokens/builders/index.js +5 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +63 -0
- package/dist/esm/Theme/tokens/builders/statusTone.js +56 -0
- package/dist/esm/Theme/tokens/index.js +14 -0
- package/dist/esm/Theme/tokens/primitives/breakpoints.js +8 -0
- package/dist/esm/Theme/tokens/primitives/index.js +9 -0
- package/dist/esm/Theme/tokens/primitives/letterSpacings.js +9 -0
- package/dist/esm/Theme/tokens/primitives/lineHeights.js +18 -0
- package/dist/esm/Theme/tokens/primitives/radii.js +12 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +15 -0
- package/dist/esm/Theme/tokens/primitives/sizes.js +34 -0
- package/dist/esm/Theme/tokens/primitives/space.js +33 -0
- package/dist/esm/Theme/tokens/primitives/typography.js +40 -0
- package/dist/esm/Theme/tokens/primitives/zIndices.js +16 -0
- package/dist/esm/Theme/tokens/types.js +7 -0
- package/dist/esm/Theme/useCustomTheme.js +4 -0
- package/dist/esm/Utils/accountHandoff.js +139 -0
- package/dist/esm/Utils/functions.js +7 -0
- package/dist/esm/Utils/mergeRefs.js +16 -0
- package/dist/esm/Utils/planBadge.js +105 -0
- package/dist/esm/Utils/planExpiry.js +109 -0
- package/dist/esm/Utils/rafThrottle.js +30 -0
- package/dist/esm/Utils/table.js +321 -0
- package/dist/esm/bootstrap.js +11 -0
- package/dist/esm/index.js +133 -0
- package/dist/esm/services/feedback.js +15 -0
- package/dist/esm/withTheme.js +9 -0
- package/package.json +13 -6
package/dist/Theme/index.js
CHANGED
|
@@ -47,15 +47,31 @@ exports.ThemesList = {
|
|
|
47
47
|
storefront: storefront,
|
|
48
48
|
zinc: zinc,
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* `dark` is built on first read, not at import. Nine `createBrandTheme` calls measure ~15ms on a
|
|
52
|
+
* dev machine, and a light-only app (tickets, and every app before it opts in) never reads one.
|
|
53
|
+
* A getter — rather than a lazy map — keeps `Object.keys(brandThemes)` and its order intact,
|
|
54
|
+
* which `ThemeSwitcher` iterates to render the brand picker.
|
|
55
|
+
*/
|
|
56
|
+
const withLazyDark = (brand, light) => {
|
|
57
|
+
let dark;
|
|
58
|
+
return {
|
|
59
|
+
light,
|
|
60
|
+
get dark() {
|
|
61
|
+
dark !== null && dark !== void 0 ? dark : (dark = (0, createBrandTheme_1.default)(brands_1.darkPalettes[brand], { colorMode: "dark" }));
|
|
62
|
+
return dark;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
};
|
|
50
66
|
/** Light + dark theme per brand. `PixelizeThemeProvider` swaps between these. */
|
|
51
67
|
exports.brandThemes = {
|
|
52
|
-
lavender:
|
|
53
|
-
meadow:
|
|
54
|
-
radiant:
|
|
55
|
-
skyline:
|
|
56
|
-
slate:
|
|
57
|
-
emerald:
|
|
58
|
-
rosewood:
|
|
59
|
-
storefront:
|
|
60
|
-
zinc:
|
|
68
|
+
lavender: withLazyDark("lavender", lavender),
|
|
69
|
+
meadow: withLazyDark("meadow", meadow),
|
|
70
|
+
radiant: withLazyDark("radiant", radiant),
|
|
71
|
+
skyline: withLazyDark("skyline", skyline),
|
|
72
|
+
slate: withLazyDark("slate", slate),
|
|
73
|
+
emerald: withLazyDark("emerald", emerald),
|
|
74
|
+
rosewood: withLazyDark("rosewood", rosewood),
|
|
75
|
+
storefront: withLazyDark("storefront", storefront),
|
|
76
|
+
zinc: withLazyDark("zinc", zinc),
|
|
61
77
|
};
|
|
@@ -10,10 +10,19 @@ export type ThemeModeContextValue = {
|
|
|
10
10
|
};
|
|
11
11
|
export type PixelizeThemeProviderProps = {
|
|
12
12
|
children: React.ReactNode;
|
|
13
|
-
/** Initial brand. A persisted brand wins over this. */
|
|
13
|
+
/** Initial brand. A persisted brand wins over this. Re-synced if the prop changes after mount. */
|
|
14
14
|
brand?: ThemeName;
|
|
15
|
-
/**
|
|
15
|
+
/** Brand counterpart of `onModeChange`, with the same user-intent-only contract. */
|
|
16
|
+
onBrandChange?: (brand: ThemeName) => void;
|
|
17
|
+
/** Initial color mode. A persisted mode wins over this. Re-synced if the prop changes after mount. */
|
|
16
18
|
defaultMode?: ColorMode;
|
|
19
|
+
/**
|
|
20
|
+
* Fired only when the mode changes through `setMode`/`toggle` — i.e. user intent. It is NOT
|
|
21
|
+
* fired when a changed `defaultMode` prop is synced in, which is what makes it safe to persist
|
|
22
|
+
* from: an app that instead mirrors `mode` in an effect re-persists its own echo, and if that
|
|
23
|
+
* store feeds `defaultMode` back the two ends flip each other forever.
|
|
24
|
+
*/
|
|
25
|
+
onModeChange?: (mode: ColorMode) => void;
|
|
17
26
|
storageKey?: string;
|
|
18
27
|
disablePersistence?: boolean;
|
|
19
28
|
/**
|
|
@@ -42,5 +51,5 @@ export declare const ThemeModeContext: React.Context<ThemeModeContextValue | und
|
|
|
42
51
|
* whatever the active palette says. Read the mode from `useThemeMode()` instead. Existing apps are
|
|
43
52
|
* unaffected: they are light-only, where that argument was always the one returned anyway.
|
|
44
53
|
*/
|
|
45
|
-
export declare const PixelizeThemeProvider: ({ children, brand: brandProp, defaultMode, storageKey, disablePersistence, themeOverrides, }: PixelizeThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare const PixelizeThemeProvider: ({ children, brand: brandProp, onBrandChange, defaultMode, onModeChange, storageKey, disablePersistence, themeOverrides, }: PixelizeThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
55
|
//# sourceMappingURL=PixelizeThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PixelizeThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/PixelizeThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PixelizeThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/Theme/provider/PixelizeThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAU/E,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kGAAkG;IAClG,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oFAAoF;IACpF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,sGAAsG;IACtG,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C,CAAC;AA2BF,eAAO,MAAM,gBAAgB,kDAE5B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,2HASnC,0BAA0B,4CAyL5B,CAAC"}
|
|
@@ -48,7 +48,7 @@ exports.ThemeModeContext = (0, react_1.createContext)(undefined);
|
|
|
48
48
|
* whatever the active palette says. Read the mode from `useThemeMode()` instead. Existing apps are
|
|
49
49
|
* unaffected: they are light-only, where that argument was always the one returned anyway.
|
|
50
50
|
*/
|
|
51
|
-
const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, defaultMode = DEFAULT_MODE, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, themeOverrides, }) => {
|
|
51
|
+
const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, onBrandChange, defaultMode = DEFAULT_MODE, onModeChange, storageKey = DEFAULT_STORAGE_KEY, disablePersistence = false, themeOverrides, }) => {
|
|
52
52
|
const [mode, setModeState] = (0, react_1.useState)(defaultMode);
|
|
53
53
|
const [brand, setBrandState] = (0, react_1.useState)(brandProp);
|
|
54
54
|
// Deterministic on the server and on the first client render — the real OS value lands in
|
|
@@ -70,19 +70,27 @@ const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, def
|
|
|
70
70
|
// `brandProp` only seeds initial state above, so a consumer that re-renders with a new
|
|
71
71
|
// `brand` prop after mount (e.g. persisting the pick through its own store, like tickets'
|
|
72
72
|
// Settings page dispatching Redux instead of calling `setBrand`) would otherwise never see
|
|
73
|
-
// it applied
|
|
74
|
-
// mirroring `mode`. Sync it here instead so every consumer gets it for free.
|
|
73
|
+
// it applied. Sync it here instead so every consumer gets it for free.
|
|
75
74
|
const isFirstBrandPropRun = (0, react_1.useRef)(true);
|
|
76
75
|
(0, react_1.useEffect)(() => {
|
|
77
76
|
if (isFirstBrandPropRun.current) {
|
|
78
77
|
isFirstBrandPropRun.current = false;
|
|
79
78
|
return;
|
|
80
79
|
}
|
|
81
|
-
setBrandState(brandProp);
|
|
82
80
|
// Only re-sync when the prop itself changes — not on every local `setBrand` call (that
|
|
83
81
|
// would fight the user's own in-session brand picking, e.g. via ThemeSwitcher).
|
|
84
|
-
|
|
82
|
+
setBrandState(brandProp);
|
|
85
83
|
}, [brandProp]);
|
|
84
|
+
// Same prop-sync for the mode, so an app owning it in its own store no longer needs the
|
|
85
|
+
// `mode` -> store mirror effect that deadlocks against this one.
|
|
86
|
+
const isFirstModePropRun = (0, react_1.useRef)(true);
|
|
87
|
+
(0, react_1.useEffect)(() => {
|
|
88
|
+
if (isFirstModePropRun.current) {
|
|
89
|
+
isFirstModePropRun.current = false;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
setModeState(defaultMode);
|
|
93
|
+
}, [defaultMode]);
|
|
86
94
|
// Skipping the mount run keeps the defaults from being written over a stored value before
|
|
87
95
|
// the rehydrate effect above has applied it.
|
|
88
96
|
const isFirstPersistRun = (0, react_1.useRef)(true);
|
|
@@ -107,18 +115,42 @@ const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRAND, def
|
|
|
107
115
|
(0, react_1.useEffect)(() => {
|
|
108
116
|
document.documentElement.style.colorScheme = resolvedMode;
|
|
109
117
|
}, [resolvedMode]);
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
// Held in refs so a caller's inline arrow never re-creates `setMode`/`setBrand`, which would
|
|
119
|
+
// invalidate the context value on every render of the consuming app. Written in a layout
|
|
120
|
+
// effect, not during render — a render-phase write is unsafe under StrictMode's double
|
|
121
|
+
// invocation, and this still lands before any click handler can fire.
|
|
122
|
+
const onModeChangeRef = (0, react_1.useRef)(onModeChange);
|
|
123
|
+
const onBrandChangeRef = (0, react_1.useRef)(onBrandChange);
|
|
124
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
125
|
+
onModeChangeRef.current = onModeChange;
|
|
126
|
+
onBrandChangeRef.current = onBrandChange;
|
|
127
|
+
}, [onModeChange, onBrandChange]);
|
|
128
|
+
const setMode = (0, react_1.useCallback)((next) => {
|
|
129
|
+
var _a;
|
|
130
|
+
setModeState(next);
|
|
131
|
+
(_a = onModeChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onModeChangeRef, next);
|
|
132
|
+
}, []);
|
|
133
|
+
const setBrand = (0, react_1.useCallback)((next) => {
|
|
134
|
+
var _a;
|
|
135
|
+
setBrandState(next);
|
|
136
|
+
(_a = onBrandChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onBrandChangeRef, next);
|
|
137
|
+
}, []);
|
|
112
138
|
// From "system", flip to the opposite of what the OS currently gives, so a click always
|
|
113
139
|
// visibly changes the UI.
|
|
114
|
-
const toggle = (0, react_1.useCallback)(() =>
|
|
140
|
+
const toggle = (0, react_1.useCallback)(() => setMode(resolvedMode === "dark" ? "light" : "dark"), [resolvedMode, setMode]);
|
|
115
141
|
const value = (0, react_1.useMemo)(() => ({ mode, resolvedMode, setMode, toggle, brand, setBrand }), [mode, resolvedMode, setMode, toggle, brand, setBrand]);
|
|
142
|
+
// `themeOverrides` is caller-supplied, and the idiomatic way to pass it is an inline object
|
|
143
|
+
// literal — a new identity every render. Keying the memo on identity would re-run `extendTheme`
|
|
144
|
+
// and hand `ChakraProvider` a new theme on every render of the consuming app, invalidating
|
|
145
|
+
// emotion's style resolution for everything beneath it. Compare by value instead.
|
|
146
|
+
const overridesKey = themeOverrides ? JSON.stringify(themeOverrides) : "";
|
|
116
147
|
const resolvedTheme = (0, react_1.useMemo)(() => {
|
|
117
148
|
const base = index_1.brandThemes[brand][resolvedMode];
|
|
118
|
-
return themeOverrides
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
149
|
+
return themeOverrides ? (0, react_2.extendTheme)(base, themeOverrides) : base;
|
|
150
|
+
// Keyed on the serialized overrides, not their identity. `brand`/`resolvedMode` must stay:
|
|
151
|
+
// overrides re-layer onto the CURRENT palette (see the prop's doc comment above).
|
|
152
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
153
|
+
}, [brand, resolvedMode, overridesKey]);
|
|
122
154
|
/**
|
|
123
155
|
* The library ships its `var(--color-*)` tokens light-only on `:root` (global.css), so any
|
|
124
156
|
* consumer that styles with those CSS vars rather than Chakra tokens stays light in dark mode —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.light.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/lavender/palette.light.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"palette.light.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/lavender/palette.light.ts"],"names":[],"mappings":"AAmTA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -150,7 +150,8 @@ const backgroundColor = {
|
|
|
150
150
|
secondary: "#f2edf8",
|
|
151
151
|
tertiary: "#ebe3f4",
|
|
152
152
|
quaternary: "#e2d8ef",
|
|
153
|
-
|
|
153
|
+
// A card must read as lifted off the tinted canvas; the old #fdfcfe was 2% away from it.
|
|
154
|
+
light: "#ffffff",
|
|
154
155
|
medium: "#e8e0f2",
|
|
155
156
|
accent: "#e0d5ed",
|
|
156
157
|
subtle: "#f5f1fa",
|
|
@@ -227,25 +228,31 @@ const sidebar = {
|
|
|
227
228
|
},
|
|
228
229
|
};
|
|
229
230
|
const boxborder = {
|
|
230
|
-
50: "#
|
|
231
|
-
100: "#
|
|
232
|
-
200: "#
|
|
233
|
-
300: "#
|
|
234
|
-
400: "#
|
|
235
|
-
500: "#
|
|
236
|
-
600: "#
|
|
231
|
+
50: "#f5f3f9",
|
|
232
|
+
100: "#ece8f3",
|
|
233
|
+
200: "#dad4e8",
|
|
234
|
+
300: "#d1c9e2",
|
|
235
|
+
400: "#c7bcda",
|
|
236
|
+
500: "#bcb0d1",
|
|
237
|
+
600: "#a79ac3",
|
|
237
238
|
700: "#918ba1",
|
|
238
239
|
800: "#6d6879",
|
|
239
240
|
900: "#52505b",
|
|
240
241
|
};
|
|
242
|
+
/**
|
|
243
|
+
* The low rungs sat two steps too pale to draw anything: `200` — the default hairline for
|
|
244
|
+
* cards, dividers and inputs — was L94 against a L98 canvas, so a card had no visible edge.
|
|
245
|
+
* It now lands at L88, contrast 1.22 against a white card, matching Chakra's gray.200 hairline.
|
|
246
|
+
* Rungs 700+ are unchanged; they were never the problem.
|
|
247
|
+
*/
|
|
241
248
|
const border = {
|
|
242
|
-
50: "#
|
|
243
|
-
100: "#
|
|
244
|
-
200: "#
|
|
245
|
-
300: "#
|
|
246
|
-
400: "#
|
|
247
|
-
500: "#
|
|
248
|
-
600: "#
|
|
249
|
+
50: "#f6f4f9",
|
|
250
|
+
100: "#ede9f4",
|
|
251
|
+
200: "#dcd5e9",
|
|
252
|
+
300: "#d3cbe3",
|
|
253
|
+
400: "#c9bedb",
|
|
254
|
+
500: "#beb2d2",
|
|
255
|
+
600: "#a99cc4",
|
|
249
256
|
700: "#938da3",
|
|
250
257
|
800: "#6f6a7c",
|
|
251
258
|
900: "#54505e",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.dark.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/zinc/palette.dark.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"palette.dark.d.ts","sourceRoot":"","sources":["../../../../../src/Theme/tokens/brands/zinc/palette.dark.ts"],"names":[],"mappings":"AAwLA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -93,15 +93,16 @@ const header = {
|
|
|
93
93
|
900: "#ffffff",
|
|
94
94
|
};
|
|
95
95
|
// muted-foreground = gray[500] = #a1a1aa (5.81:1 on the #27272a muted surface); it also serves
|
|
96
|
-
// as the focus ring on the #09090b canvas (7.76:1). gray[400] = the interactive border/icon rung
|
|
97
|
-
//
|
|
98
|
-
//
|
|
96
|
+
// as the focus ring on the #09090b canvas (7.76:1). gray[400] = the interactive border/icon rung,
|
|
97
|
+
// and is the one value here NOT ported verbatim: it is pinned to whatever clears the 3:1 non-text
|
|
98
|
+
// bar on the LIGHTEST named surface, which is derived rather than ported. shadcn's own #71717a
|
|
99
|
+
// measures 2.81 there, so this sits two steps lighter (3.19).
|
|
99
100
|
const gray = {
|
|
100
101
|
50: "#18181b",
|
|
101
102
|
100: "#27272a",
|
|
102
103
|
200: "#3f3f46",
|
|
103
104
|
300: "#52525b",
|
|
104
|
-
400: "#
|
|
105
|
+
400: "#7a7a83",
|
|
105
106
|
500: "#a1a1aa",
|
|
106
107
|
600: "#b4b4bb",
|
|
107
108
|
700: "#d4d4d8",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDarkPalette.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/builders/buildDarkPalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA2CrE,uEAAuE;AACvE,eAAO,MAAM,YAAY,GAAI,OAAO,UAAU,KAAG,UAW/C,CAAC;AAEH,sFAAsF;AACtF,eAAO,MAAM,YAAY,GAAI,OAAO,UAAU,KAAG,UAW/C,CAAC;AAOH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,KAAG,MAWvE,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,EAAE,OAAO,MAAM,KAAG,UAM5D,CAAC;
|
|
1
|
+
{"version":3,"file":"buildDarkPalette.d.ts","sourceRoot":"","sources":["../../../../src/Theme/tokens/builders/buildDarkPalette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AA2CrE,uEAAuE;AACvE,eAAO,MAAM,YAAY,GAAI,OAAO,UAAU,KAAG,UAW/C,CAAC;AAEH,sFAAsF;AACtF,eAAO,MAAM,YAAY,GAAI,OAAO,UAAU,KAAG,UAW/C,CAAC;AAOH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,KAAG,MAWvE,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,EAAE,OAAO,MAAM,KAAG,UAM5D,CAAC;AAkJF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAwElE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -169,8 +169,11 @@ const TEXT_TARGETS = {
|
|
|
169
169
|
const PLACEHOLDER_TARGETS = {
|
|
170
170
|
50: 25, 100: 30, 200: 35, 300: 42, 400: 48, 500: 54, 600: 60, 700: 66, 800: 72, 900: 80,
|
|
171
171
|
};
|
|
172
|
+
// Rung 200 is the default hairline. At L18 it sat 5 points off a card at L13 — below the
|
|
173
|
+
// perceptible step, so dark cards read as edgeless. L22 draws the same 1.2x edge the light
|
|
174
|
+
// ramp does, which is what makes a card look like a card in either mode.
|
|
172
175
|
const BORDER_TARGETS = {
|
|
173
|
-
50:
|
|
176
|
+
50: 14, 100: 18, 200: 22, 300: 24, 400: 26, 500: 27, 600: 33, 700: 42, 800: 52, 900: 62,
|
|
174
177
|
};
|
|
175
178
|
const DISABLED_TARGETS = {
|
|
176
179
|
50: 14, 100: 18, 200: 22, 300: 26, 400: 30, 500: 34, 600: 42, 700: 52, 800: 62, 900: 72,
|
|
@@ -215,12 +218,22 @@ const NAMED_SURFACE_L = {
|
|
|
215
218
|
accent: 17,
|
|
216
219
|
muted: 18,
|
|
217
220
|
};
|
|
218
|
-
|
|
221
|
+
/**
|
|
222
|
+
* Surfaces are hue-NEUTRAL in dark: every brand shares one canvas, so switching theme recolors the
|
|
223
|
+
* accents and nothing else. Tinting them instead (this was 14) made a full-screen wash — Meadow's
|
|
224
|
+
* whole app read green — which reads as a different product per brand rather than a different
|
|
225
|
+
* accent. Light mode keeps its tinted canvas; there the tint is a hint on white, not the whole
|
|
226
|
+
* screen. Brand identity in dark lives in `primary`/semantic/text, which stay hued.
|
|
227
|
+
*/
|
|
228
|
+
const SURFACE_SAT = 0;
|
|
219
229
|
const TEXT_SAT = 12;
|
|
220
230
|
const PLACEHOLDER_SAT = 10;
|
|
221
231
|
const BORDER_SAT = 12;
|
|
222
232
|
const DISABLED_SAT = 8;
|
|
223
|
-
|
|
233
|
+
// Neutral for the same reason as SURFACE_SAT — gray's low rungs ARE surfaces, and a tinted ramp
|
|
234
|
+
// on a neutral canvas reads as a mismatch. It also buys back the contrast the neutral canvas
|
|
235
|
+
// cost: `gray[400]` on `muted` was 2.99 on lavender/zinc at sat 6, and is 3.16 at 0.
|
|
236
|
+
const GRAY_SAT = 0;
|
|
224
237
|
function buildDarkPalette(light) {
|
|
225
238
|
const hueSource = light.primary[500];
|
|
226
239
|
const { h } = (0, color_1.hexToHsl)(hueSource);
|
|
@@ -265,7 +278,9 @@ function buildDarkPalette(light) {
|
|
|
265
278
|
placeholder: fromTargets(hueSource, PLACEHOLDER_TARGETS, PLACEHOLDER_SAT),
|
|
266
279
|
border: fromTargets(hueSource, BORDER_TARGETS, BORDER_SAT),
|
|
267
280
|
boxborder: fromTargets(hueSource, BORDER_TARGETS, BORDER_SAT),
|
|
268
|
-
|
|
281
|
+
// Neutral: a row hover is a surface fill, and across a full table its tint is exactly the
|
|
282
|
+
// brand wash the canvas was changed to avoid.
|
|
283
|
+
table: { hover: fromTargets(hueSource, TABLE_HOVER_TARGETS, SURFACE_SAT) },
|
|
269
284
|
disabled: fromTargets(hueSource, DISABLED_TARGETS, DISABLED_SAT),
|
|
270
285
|
// Derived from the LIFTED accent against the dark canvas: the lift stops at the white-label
|
|
271
286
|
// floor (~4.55), which leaves primary[500] short of AA as text, so text needs its own rung.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coalesces bursts of calls into one per animation frame.
|
|
3
|
+
*
|
|
4
|
+
* Every use in this library is a listener that reads layout (`getBoundingClientRect`) and then
|
|
5
|
+
* writes position state. Unthrottled, a capture-phase `scroll` listener runs once per scrollable
|
|
6
|
+
* ancestor per scroll event — on a low-end device that is a forced reflow several times per frame,
|
|
7
|
+
* which is what makes menus judder while the page moves. One frame is also the fastest rate the
|
|
8
|
+
* screen can show a change, so nothing is lost by dropping the rest.
|
|
9
|
+
*
|
|
10
|
+
* The trailing call wins: the last arguments before the frame fires are the current ones.
|
|
11
|
+
*/
|
|
12
|
+
export declare const rafThrottle: <A extends unknown[]>(fn: (...args: A) => void) => ((...args: A) => void) & {
|
|
13
|
+
cancel: () => void;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=rafThrottle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rafThrottle.d.ts","sourceRoot":"","sources":["../../src/Utils/rafThrottle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,OAAO,EAAE,EAC7C,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,KACvB,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,IAAI,CAAA;CAmB/C,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rafThrottle = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Coalesces bursts of calls into one per animation frame.
|
|
6
|
+
*
|
|
7
|
+
* Every use in this library is a listener that reads layout (`getBoundingClientRect`) and then
|
|
8
|
+
* writes position state. Unthrottled, a capture-phase `scroll` listener runs once per scrollable
|
|
9
|
+
* ancestor per scroll event — on a low-end device that is a forced reflow several times per frame,
|
|
10
|
+
* which is what makes menus judder while the page moves. One frame is also the fastest rate the
|
|
11
|
+
* screen can show a change, so nothing is lost by dropping the rest.
|
|
12
|
+
*
|
|
13
|
+
* The trailing call wins: the last arguments before the frame fires are the current ones.
|
|
14
|
+
*/
|
|
15
|
+
const rafThrottle = (fn) => {
|
|
16
|
+
let frame = null;
|
|
17
|
+
let latest;
|
|
18
|
+
const throttled = (...args) => {
|
|
19
|
+
latest = args;
|
|
20
|
+
if (frame !== null)
|
|
21
|
+
return;
|
|
22
|
+
frame = requestAnimationFrame(() => {
|
|
23
|
+
frame = null;
|
|
24
|
+
fn(...latest);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
throttled.cancel = () => {
|
|
28
|
+
if (frame !== null)
|
|
29
|
+
cancelAnimationFrame(frame);
|
|
30
|
+
frame = null;
|
|
31
|
+
};
|
|
32
|
+
return throttled;
|
|
33
|
+
};
|
|
34
|
+
exports.rafThrottle = rafThrottle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/Utils/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/Utils/table.ts"],"names":[],"mappings":"AAAA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAa5D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAwBtG;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAAE,EAClB,UAAU,EAAE;IACV,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,EAAE,gBAWJ;AAGD,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAOhG,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,EAAE,CAwB9E;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,OAAO,EAAE,iBAAiB,EAAE,EAC5B,QAAQ,CAAC,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,gBAAgB,GACvB,iBAAiB,CAUnB;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAEvF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,EAAE,CAapF;AAED,eAAO,MAAM,mBAAmB,GAC9B,SAAS,MAAM,EAAE,EACjB,OAAO,MAAM,KACZ,MAEF,CAAC;AA0DF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAcvE;AAED,eAAO,MAAM,iBAAiB,GAC5B,MAAM,UAAU,EAAE,EAClB,cAAc,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,iBA4BrC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAC3D,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAQlC;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAC9D,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAsBlC;AAED,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,aAQlD,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,gBAAgB,CAAC;IACzB,GAAG,EAAE,UAAU,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,iGAUlC,yBAAyB;;;;;;CA6B3B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,IAAI,EAAE,CAAC,EAAE,EACT,KAAK,EAAE,MAAM,GACZ,CAAC,EAAE,CAmBL"}
|
package/dist/Utils/table.js
CHANGED
|
@@ -45,6 +45,13 @@ exports.useDebounce = useDebounce;
|
|
|
45
45
|
exports.globalSearchFilter = globalSearchFilter;
|
|
46
46
|
const react_1 = __importStar(require("react"));
|
|
47
47
|
const accentText_1 = require("../Theme/tokens/builders/accentText");
|
|
48
|
+
// Built once, not per comparison: sorting 10k rows runs this ~130k times, and constructing a
|
|
49
|
+
// collator is orders of magnitude dearer than using one.
|
|
50
|
+
const COLLATOR = new Intl.Collator(undefined, {
|
|
51
|
+
numeric: true,
|
|
52
|
+
sensitivity: "base",
|
|
53
|
+
});
|
|
54
|
+
const HAS_DIGIT = /\d/;
|
|
48
55
|
/**
|
|
49
56
|
* Type-aware, null-safe comparison. Detects numbers and dates; otherwise falls
|
|
50
57
|
* back to a numeric-aware locale string compare. Empty/null values sort last.
|
|
@@ -67,11 +74,15 @@ function compareValues(aRaw, bRaw, direction) {
|
|
|
67
74
|
const bn = Number(b);
|
|
68
75
|
if (!Number.isNaN(an) && !Number.isNaN(bn))
|
|
69
76
|
return (an - bn) * dir;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
// No digit means no date, so this skips two Date.parse calls per comparison on the common
|
|
78
|
+
// text columns (names, emails, statuses) without changing which strings parse as dates.
|
|
79
|
+
if (HAS_DIGIT.test(a) && HAS_DIGIT.test(b)) {
|
|
80
|
+
const ad = Date.parse(a);
|
|
81
|
+
const bd = Date.parse(b);
|
|
82
|
+
if (!Number.isNaN(ad) && !Number.isNaN(bd))
|
|
83
|
+
return (ad - bd) * dir;
|
|
84
|
+
}
|
|
85
|
+
return COLLATOR.compare(a, b) * dir;
|
|
75
86
|
}
|
|
76
87
|
function SortMultiColumnData(data, sortConfig) {
|
|
77
88
|
const active = sortConfig.filter((s) => s.direction !== "none");
|
package/dist/esm/App.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Box, Flex } from "@chakra-ui/react";
|
|
4
|
+
import { Calendar, Cuboid, FileText, House, Link2 } from "lucide-react";
|
|
5
|
+
import Loading from "./Components/Loading/Loading";
|
|
6
|
+
import Sidebar from "./Components/SideBar/SideBar";
|
|
7
|
+
import NavBar from "./Components/NavigationBar/NavigationBar";
|
|
8
|
+
import { useSidebarPrefs } from "./Hooks/useSidebarPrefs";
|
|
9
|
+
import { ThemeSwitcher } from "./Theme/provider";
|
|
10
|
+
import { useCustomTheme } from "./Theme/useCustomTheme";
|
|
11
|
+
import Layout from "./Layout";
|
|
12
|
+
import "./global.css";
|
|
13
|
+
// --- Static demo data (module scope so it isn't re-created each render) ------
|
|
14
|
+
const menu = [
|
|
15
|
+
{
|
|
16
|
+
id: 1, title: "Dashboard", icon: House, url: "", group: "Main",
|
|
17
|
+
secondaryItems: [
|
|
18
|
+
{ id: 11, title: "SubMenu", url: "submenu1", icon: Cuboid, badge: { count: 10, color: "red", radius: "5px", variant: "outline" } },
|
|
19
|
+
{ id: 12, title: "SubMenu2", url: "submenu2", icon: Cuboid },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 2, title: "AlertDialog", icon: Calendar, url: "alertdialog",
|
|
24
|
+
badge: { count: 10, color: "red", radius: "5px", variant: "outline" },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 3, title: "SideMenu", icon: Cuboid, url: "sidemenu",
|
|
28
|
+
subMenu: [
|
|
29
|
+
{ id: 31, title: "SubMenu1", url: "submenu1", icon: FileText },
|
|
30
|
+
{ id: 32, title: "SubMenu2", url: "submenu2", icon: Link2, badge: { count: 10, color: "red", radius: "5px", variant: "subtle" } },
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 4, title: "SideMenu", icon: Cuboid, url: "sidemenu",
|
|
35
|
+
subMenu: [
|
|
36
|
+
{ id: 33, title: "SubMenu1", url: "submenu1" },
|
|
37
|
+
{ id: 34, title: "SubMenu2", url: "submenu2" },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 8, title: "SideMenu", icon: Cuboid, url: "sidemenu", group: "Tools",
|
|
42
|
+
subMenu: [
|
|
43
|
+
{ id: 41, title: "SubMenu1", url: "submenu1", icon: Cuboid },
|
|
44
|
+
{ id: 42, title: "SubMenu2", url: "submenu2", icon: Cuboid },
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
const navmenus = [
|
|
49
|
+
{ title: "Account Settings", url: "myaccount", icon: _jsx(Cuboid, {}) },
|
|
50
|
+
{ title: "Reset password", url: "resetpassword" },
|
|
51
|
+
{ title: "Billing", url: "billing" },
|
|
52
|
+
{ title: "Notifications", url: "notifications" },
|
|
53
|
+
];
|
|
54
|
+
function useWindowSize() {
|
|
55
|
+
const [windowSize, setWindowSize] = useState({ width: 0, height: 0 });
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const handleResize = () => setWindowSize({ width: window.innerWidth, height: window.innerHeight });
|
|
58
|
+
window.addEventListener("resize", handleResize);
|
|
59
|
+
handleResize();
|
|
60
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
61
|
+
}, []);
|
|
62
|
+
return windowSize;
|
|
63
|
+
}
|
|
64
|
+
function App() {
|
|
65
|
+
const { height } = useWindowSize();
|
|
66
|
+
const theme = useCustomTheme();
|
|
67
|
+
// Persisted layout choices — restored to exactly the same state on reload/new
|
|
68
|
+
// session via localStorage. `collapsed` = mini-rail; `mobileNav` = navbar mode
|
|
69
|
+
// forced on a big screen; `mobileOpen` = whether the overlay drawer is open.
|
|
70
|
+
// Composed handlers (onToggleMobileNav / closeMobile) come straight from the hook,
|
|
71
|
+
// so this app does not re-implement the navbar-mode/drawer behavior.
|
|
72
|
+
const { collapsed: toggle, toggleCollapsed, mobileNav, mobileOpen, toggleMobileOpen, onToggleMobileNav, closeMobile, } = useSidebarPrefs();
|
|
73
|
+
const [activeMenu, setActiveMenu] = useState(2);
|
|
74
|
+
const [activeSecondaryItem, setActiveSecondaryItem] = useState(null);
|
|
75
|
+
const handleMenuClick = (menu) => {
|
|
76
|
+
setActiveMenu(menu === null || menu === void 0 ? void 0 : menu.id);
|
|
77
|
+
setActiveSecondaryItem(null);
|
|
78
|
+
};
|
|
79
|
+
const handleSecondaryNavClick = (item) => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
setActiveSecondaryItem((_b = (_a = item === null || item === void 0 ? void 0 : item.id) !== null && _a !== void 0 ? _a : item === null || item === void 0 ? void 0 : item.title) !== null && _b !== void 0 ? _b : null);
|
|
82
|
+
};
|
|
83
|
+
const handleNavOnClick = () => { };
|
|
84
|
+
const handleLogout = () => { };
|
|
85
|
+
return (_jsx("div", { className: "App", children: _jsxs(Box, { minH: "100vh", bg: "gray.100", overflow: "hidden", children: [_jsx(Loading, { text: "PIXELIZE CRM", isLoading: false, onlytext: true }), _jsxs(Flex, { children: [_jsx(Box, { children: _jsx(Sidebar, { menus: menu, activeMenu: activeMenu, handleMenuClick: handleMenuClick, handleSecondaryNavClick: handleSecondaryNavClick, toggle: toggle, changeToggle: toggleCollapsed, companyName: "PIXELIZE Technologies Pvt., Ltd.", selectedSecondaryItem: activeSecondaryItem, mobileOpen: mobileOpen, onMobileClose: closeMobile, mobileNav: mobileNav, onToggleMobileNav: onToggleMobileNav }) }), _jsxs(Box, { flex: "1", minW: 0, overflow: "hidden", children: [_jsx(NavBar, { userAvathar: "https://bit.ly/dan-abramo", userName: "PIXELIZE", userRole: "Admin", navMenu: navmenus, handleNavOnClick: handleNavOnClick, handleLogout: handleLogout, logoutText: "Logout", sideBarToggole: mobileOpen, onSideBarToggole: toggleMobileOpen, forceSideBarToggle: mobileNav, navigationBarText: {
|
|
86
|
+
text: _jsx(_Fragment, { children: "Dashboard" }),
|
|
87
|
+
onIconClick: () => { },
|
|
88
|
+
}, moreIcon: _jsx(Calendar, {}) }, "navbar"), _jsx("br", {}), _jsxs(Flex, { "data-testid": "theme-controls", px: "50px", pb: 3, gap: 4, align: "center", justify: "flex-end", children: [_jsx(ThemeSwitcher, { variant: "segmented", showBrandPicker: true }), _jsx(ThemeSwitcher, { variant: "icon" })] }), _jsx(Box, { p: "50px", pt: 0, height: height - 200, overflowY: "scroll", overflowX: "hidden", width: "100%", "data-testid": "playground-surface", bg: theme.colors.backgroundColor.main, children: _jsx(Layout, {}) })] })] })] }) }));
|
|
89
|
+
}
|
|
90
|
+
export default App;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const DefaultLogo = () => {
|
|
3
|
+
return (_jsxs("svg", { width: "12.09", height: "15.95", viewBox: "0 0 31 29", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M30.4999 6.26137V7.81058H15.9761H14.8787V22.8508V28.8862H12.5226C9.6824 28.8862 7.32632 26.4656 7.06812 23.3995C7.06812 23.2381 7.06812 23.0444 7.06812 22.8508V18.3323C7.06812 18.2677 7.06812 18.2032 7.06812 18.1063V15.5889V6.2291C7.06812 2.80793 9.84378 -5.72205e-06 13.2972 -5.72205e-06H24.8517C28.0147 0.355021 30.4676 3.00158 30.4676 6.2291L30.4999 6.26137Z", fill: "currentColor" }), _jsx("path", { d: "M7.10053 23.3672H7.03598C5.16402 23.2381 3.48571 22.4635 2.25926 21.3338C0.871428 20.0428 0 18.2677 0 16.3312V15.6211H7.06825V18.1386C7.06825 18.2032 7.06825 18.2677 7.06825 18.3645V22.883C7.06825 23.0767 7.06825 23.2381 7.06825 23.4317L7.10053 23.3672Z", fill: "currentColor" }), _jsx("path", { d: "M30.4678 12.0063V15.6211V17.1703C30.4678 20.6238 26.272 23.3994 21.0757 23.3994H14.8789V22.8508V15.6211H22.6572V7.81056C22.6895 7.81056 30.5001 7.81056 30.5001 7.81056V11.5868C30.5001 11.7159 30.5001 11.8772 30.5001 12.0063H30.4678Z", fill: "currentColor" })] }));
|
|
4
|
+
};
|
|
5
|
+
export default DefaultLogo;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { Accordion as ChakraAccordian, AccordionItem, AccordionButton, AccordionPanel, Box, Flex, } from "@chakra-ui/react";
|
|
4
|
+
import { ChevronDown } from "lucide-react";
|
|
5
|
+
import { useCustomTheme } from "../../Theme/useCustomTheme";
|
|
6
|
+
import { isDarkCanvas } from "../../Theme/tokens/builders/accentText";
|
|
7
|
+
import { getAccordionHoverColors } from "./accordionColors";
|
|
8
|
+
const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion, items, ...rest }) => {
|
|
9
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
10
|
+
const theme = useCustomTheme();
|
|
11
|
+
const c = (_a = theme.colors) !== null && _a !== void 0 ? _a : {};
|
|
12
|
+
const isDark = isDarkCanvas((_c = (_b = c.backgroundColor) === null || _b === void 0 ? void 0 : _b.main) !== null && _c !== void 0 ? _c : "#ffffff");
|
|
13
|
+
const border = (_e = (_d = c.boxborder) === null || _d === void 0 ? void 0 : _d[300]) !== null && _e !== void 0 ? _e : (_f = c.gray) === null || _f === void 0 ? void 0 : _f[200];
|
|
14
|
+
const headingColor = (_h = (_g = c.text) === null || _g === void 0 ? void 0 : _g[800]) !== null && _h !== void 0 ? _h : (_j = c.gray) === null || _j === void 0 ? void 0 : _j[800];
|
|
15
|
+
const bodyColor = (_l = (_k = c.text) === null || _k === void 0 ? void 0 : _k[600]) !== null && _l !== void 0 ? _l : (_m = c.gray) === null || _m === void 0 ? void 0 : _m[600];
|
|
16
|
+
const { expandedBg, softHover } = useMemo(() => { var _a; return getAccordionHoverColors((_a = theme.colors) !== null && _a !== void 0 ? _a : {}, isDark); }, [theme.colors, isDark]);
|
|
17
|
+
return (_jsx(ChakraAccordian, { allowMultiple: allowMultiple, allowToggle: allowToggle, index: index, onChange: onChange, reduceMotion: reduceMotion, ...rest, children: items.map((item, idx) => {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19
|
+
return (_jsx(AccordionItem, { border: `0.063rem solid ${border}`, borderRadius: "0.625rem", bg: (_b = (_a = c.background) === null || _a === void 0 ? void 0 : _a[50]) !== null && _b !== void 0 ? _b : "#fff", mb: 3, overflow: "hidden", transition: "border-color 0.15s ease, box-shadow 0.15s ease", _last: { mb: 0 }, _hover: { borderColor: (_d = (_c = c.boxborder) === null || _c === void 0 ? void 0 : _c[400]) !== null && _d !== void 0 ? _d : (_e = c.gray) === null || _e === void 0 ? void 0 : _e[300] }, ...item.itemProps, sx: (_f = item.customStyles) === null || _f === void 0 ? void 0 : _f.itemStyle, children: ({ isExpanded }) => {
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx("h2", { children: _jsxs(AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "0.875rem", fontWeight: 600, color: headingColor, bg: isExpanded ? expandedBg : "transparent", transition: "background 0.15s ease", _hover: { bg: isExpanded ? expandedBg : softHover }, _focusVisible: {
|
|
22
|
+
boxShadow: "none",
|
|
23
|
+
outline: `0.125rem solid ${(_b = (_a = c.primary) === null || _a === void 0 ? void 0 : _a[300]) !== null && _b !== void 0 ? _b : (_c = c.gray) === null || _c === void 0 ? void 0 : _c[300]}`,
|
|
24
|
+
outlineOffset: "-0.125rem",
|
|
25
|
+
}, ...item.buttonProps, sx: {
|
|
26
|
+
...(_d = item.customStyles) === null || _d === void 0 ? void 0 : _d.buttonStyle,
|
|
27
|
+
"&:hover": {
|
|
28
|
+
...(_e = item.customStyles) === null || _e === void 0 ? void 0 : _e.hoverbuttonStyle,
|
|
29
|
+
},
|
|
30
|
+
}, children: [_jsx(Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), _jsx(Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "0.375rem", color: isExpanded ? ((_g = (_f = c.primary) === null || _f === void 0 ? void 0 : _f[600]) !== null && _g !== void 0 ? _g : headingColor) : (_h = c.gray) === null || _h === void 0 ? void 0 : _h[500], bg: isExpanded ? ((_l = (_k = (_j = c.primary) === null || _j === void 0 ? void 0 : _j.opacity) === null || _k === void 0 ? void 0 : _k[16]) !== null && _l !== void 0 ? _l : "transparent") : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease, color 0.2s ease, background 0.2s ease", children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "0.875rem", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_m = item.customStyles) === null || _m === void 0 ? void 0 : _m.panelStyle, children: item.content })] }));
|
|
31
|
+
} }, idx));
|
|
32
|
+
}) }));
|
|
33
|
+
};
|
|
34
|
+
export default Accordion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { compositeOver } from "../../Theme/tokens/builders/color";
|
|
2
|
+
import { liftToContrast } from "../../Theme/tokens/builders/outlineRung";
|
|
3
|
+
/**
|
|
4
|
+
* Same perceptibility floor the SideBar ladder uses — a state a user cannot see is not a state.
|
|
5
|
+
* Light mode `softHover` measured 1.042-1.105 across all 9 brands (invisible) while dark sat at
|
|
6
|
+
* 1.58-1.85; `expandedBg` (`primary.opacity[8]`, an 8%-alpha tint) is the same bug class — an
|
|
7
|
+
* 8% tint composited over a near-white canvas is itself near-white. Both are resolved against
|
|
8
|
+
* the rest surface so light and dark actually agree on "you can see this".
|
|
9
|
+
*/
|
|
10
|
+
const MIN_HOVER_STEP = 1.15;
|
|
11
|
+
export const getAccordionHoverColors = (colors, isDark) => {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
13
|
+
if (isDark) {
|
|
14
|
+
// primary.opacity[8] composited over the dark canvas collapses to ~1.07:1 (near-black on
|
|
15
|
+
// near-black) — gray[200] is an opaque rung that stays visibly above canvas (~1.6:1) without
|
|
16
|
+
// being as loud as the gray[300] hover fill FilterSidebar/Table already use.
|
|
17
|
+
return {
|
|
18
|
+
expandedBg: (_d = (_b = (_a = colors.gray) === null || _a === void 0 ? void 0 : _a[200]) !== null && _b !== void 0 ? _b : (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[300]) !== null && _d !== void 0 ? _d : (_e = colors.gray) === null || _e === void 0 ? void 0 : _e[50],
|
|
19
|
+
softHover: (_j = (_g = (_f = colors.gray) === null || _f === void 0 ? void 0 : _f[200]) !== null && _g !== void 0 ? _g : (_h = colors.gray) === null || _h === void 0 ? void 0 : _h[300]) !== null && _j !== void 0 ? _j : (_k = colors.gray) === null || _k === void 0 ? void 0 : _k[50],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const rest = (_m = (_l = colors.background) === null || _l === void 0 ? void 0 : _l[50]) !== null && _m !== void 0 ? _m : "#ffffff";
|
|
23
|
+
const expandedTint = ((_p = (_o = colors.primary) === null || _o === void 0 ? void 0 : _o.opacity) === null || _p === void 0 ? void 0 : _p[8])
|
|
24
|
+
? compositeOver(colors.primary.opacity[8], rest)
|
|
25
|
+
: ((_r = (_q = colors.gray) === null || _q === void 0 ? void 0 : _q[50]) !== null && _r !== void 0 ? _r : rest);
|
|
26
|
+
return {
|
|
27
|
+
expandedBg: liftToContrast(expandedTint, rest, "light", MIN_HOVER_STEP),
|
|
28
|
+
softHover: liftToContrast((_u = (_t = (_s = colors.table) === null || _s === void 0 ? void 0 : _s.hover) === null || _t === void 0 ? void 0 : _t[100]) !== null && _u !== void 0 ? _u : (_v = colors.gray) === null || _v === void 0 ? void 0 : _v[50], rest, "light", MIN_HOVER_STEP),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AlertDialog as ChakraAlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, Button, } from "@chakra-ui/react";
|
|
3
|
+
import { useCustomTheme } from "../../Theme/useCustomTheme";
|
|
4
|
+
const AlertDialog = ({ isOpen, onClose, leastDestructiveRef, content, title, confirmButtonText = "Yes", cancelButtonText = "No", isConfirmLoading, onConfirm, ContentStyle, headerStyle, bodyStyle, footerStyle, closeButtonStyle, button1Style, button2Style, isCentered, key, }) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const { colors } = useCustomTheme();
|
|
7
|
+
return (_jsxs(ChakraAlertDialog, { motionPreset: "slideInBottom", leastDestructiveRef: leastDestructiveRef, onClose: onClose, isOpen: isOpen, isCentered: isCentered, children: [_jsx(AlertDialogOverlay, {}), _jsxs(AlertDialogContent, { bg: (_a = colors === null || colors === void 0 ? void 0 : colors.background) === null || _a === void 0 ? void 0 : _a[50], sx: ContentStyle, children: [_jsx(AlertDialogHeader, { sx: headerStyle, children: title }), _jsx(AlertDialogCloseButton, { sx: closeButtonStyle }), _jsx(AlertDialogBody, { sx: bodyStyle, children: content }), _jsxs(AlertDialogFooter, { sx: footerStyle, children: [_jsx(Button, { ref: leastDestructiveRef, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm", sx: button1Style, children: cancelButtonText }), _jsx(Button, { colorScheme: "primary", onClick: onConfirm, isLoading: isConfirmLoading, ml: 3, size: "sm", sx: button2Style, children: confirmButtonText })] })] })] }, key));
|
|
8
|
+
};
|
|
9
|
+
export default AlertDialog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|