pixelize-design-library 2.4.2-beta.4 → 2.4.2-beta.41
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/COMPONENT-GOTCHAS.md +1102 -0
- package/README.md +26 -0
- package/dist/Components/Accordion/Accordion.d.ts +1 -0
- package/dist/Components/Accordion/Accordion.js +4 -1
- package/dist/Components/Accordion/AccordionProps.d.ts +2 -0
- package/dist/Components/AlertDialog/AlertDialog.d.ts +1 -0
- package/dist/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/Components/AlertDialog/AlertDialogProps.d.ts +2 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/Components/Apexcharts/ApexAreaChart/ApexAreaChartProps.d.ts +4 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/Components/Apexcharts/ApexBarChart/ApexBarChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChartProps.d.ts +8 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/Components/Apexcharts/ApexPieChart/ApexPieChartProps.d.ts +6 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/Components/Apexcharts/ApexPolarCharts/ApexPolarChartsProps.d.ts +3 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.d.ts +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/Components/Apexcharts/ApexRadialChart/ApexRadialChartProps.d.ts +3 -0
- package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
- package/dist/Components/AppSwitcher/AppMark.js +62 -0
- package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +278 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +70 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/Components/AppearanceSettings/AppearanceSettingsProps.d.ts +2 -0
- package/dist/Components/Breadcrumbs/BreadcrumbsProps.d.ts +3 -0
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +4 -3
- package/dist/Components/Button/Button.styles.js +37 -23
- package/dist/Components/Button/ButtonProps.d.ts +9 -1
- package/dist/Components/ButtonGroupIcon/ButtonGoupIconProps.d.ts +7 -0
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/Components/Buttons/ButtonsProps.d.ts +2 -0
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +3 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/Components/Card/PaymentCard/PaymentCardProps.d.ts +6 -0
- package/dist/Components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/Components/Checkbox/Checkbox.js +2 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
- package/dist/Components/Checkbox/CheckboxProps.d.ts +4 -0
- package/dist/Components/Common/ErrorComponent.d.ts +2 -0
- package/dist/Components/Common/ErrorComponent.js +7 -5
- package/dist/Components/Common/ErrorMessage.js +2 -2
- package/dist/Components/Common/FormLabel.d.ts +4 -0
- package/dist/Components/Common/FormLabel.js +1 -0
- package/dist/Components/Common/FormattedDescription.d.ts +2 -0
- package/dist/Components/Common/FormattedDescription.js +1 -0
- package/dist/Components/Common/HelperText.d.ts +2 -0
- package/dist/Components/Common/HelperText.js +2 -0
- package/dist/Components/Common/Label.d.ts +1 -0
- package/dist/Components/Common/Label.js +1 -0
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/ContactForm/ContactForm.d.ts +1 -0
- package/dist/Components/ContactForm/ContactForm.js +1 -0
- package/dist/Components/ContactForm/ContactFormProps.d.ts +4 -0
- package/dist/Components/CopyButton/CopyButton.d.ts +3 -1
- package/dist/Components/CopyButton/CopyButton.js +9 -3
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +8 -0
- package/dist/Components/DatePicker/CalendarPanel.d.ts +6 -0
- package/dist/Components/DatePicker/CalendarPanel.js +37 -15
- package/dist/Components/DatePicker/DatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/DatePicker.js +1 -0
- package/dist/Components/DatePicker/DatePickerProps.d.ts +30 -0
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +30 -5
- package/dist/Components/DatePicker/SingleDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/SingleDatePicker.js +49 -14
- package/dist/Components/DatePicker/ThemeDatePicker.d.ts +1 -0
- package/dist/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/Components/DatePicker/TimePicker.d.ts +1 -0
- package/dist/Components/DatePicker/TimePicker.js +4 -3
- package/dist/Components/DatePicker/TimePickerInput.d.ts +1 -0
- package/dist/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/Components/DatePicker/dayStates.d.ts +56 -0
- package/dist/Components/DatePicker/dayStates.js +87 -0
- package/dist/Components/Divider/Divider.d.ts +1 -0
- package/dist/Components/Divider/Divider.js +1 -0
- package/dist/Components/Drawer/DrawerProps.d.ts +2 -0
- package/dist/Components/Dropdown/DropDown.d.ts +1 -0
- package/dist/Components/Dropdown/DropDown.js +22 -6
- package/dist/Components/Dropdown/DropdownProps.d.ts +3 -0
- package/dist/Components/Editor/Editor.d.ts +1 -0
- package/dist/Components/Editor/Editor.js +1 -0
- package/dist/Components/Editor/EditorProps.d.ts +2 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.d.ts +1 -0
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtpProps.d.ts +4 -0
- package/dist/Components/EmptyState/EmptyState.d.ts +1 -0
- package/dist/Components/EmptyState/EmptyState.js +4 -2
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.d.ts +3 -0
- package/dist/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/Components/FieldSelectModal/FieldSelectModal.d.ts +3 -2
- package/dist/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/Components/FilePreview/FilePreview.d.ts +1 -0
- package/dist/Components/FilePreview/FilePreview.js +3 -1
- package/dist/Components/FilePreview/FilePreviewProps.d.ts +5 -2
- package/dist/Components/FileUpload/FileUpload.d.ts +1 -0
- package/dist/Components/FileUpload/FileUpload.js +7 -5
- package/dist/Components/FileUpload/FileUploadProps.d.ts +7 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FileUploader/FileUploader.d.ts +1 -0
- package/dist/Components/FileUploader/FileUploader.js +1 -0
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +2 -0
- package/dist/Components/FilterSidebar/FilterSidebar.d.ts +3 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +2 -10
- package/dist/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/Components/Form/FormWrapper.d.ts +3 -0
- package/dist/Components/Form/FormWrapper.js +2 -1
- package/dist/Components/Header/HeaderProps.d.ts +5 -0
- package/dist/Components/Header/components/mobileMenu.js +12 -3
- package/dist/Components/Input/Input/InputProps.d.ts +2 -0
- package/dist/Components/Input/PhoneNumberInput.d.ts +1 -0
- package/dist/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/Components/Input/PhoneNumberInputProps.d.ts +3 -0
- package/dist/Components/Input/Switch/InputSwitch.d.ts +2 -0
- package/dist/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/Components/Input/TextInput.js +1 -0
- package/dist/Components/Input/TextInput.styles.js +8 -10
- package/dist/Components/Input/TextInputProps.d.ts +2 -0
- package/dist/Components/InputTextArea/InputTextArea.d.ts +1 -0
- package/dist/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/Components/InputTextArea/InputTextAreaProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountCard.d.ts +3 -0
- package/dist/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/Components/KanbanBoard/AccountRow.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.d.ts +2 -0
- package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/Components/KanbanBoard/KanbanBoard.d.ts +1 -0
- package/dist/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/Components/KanbanBoard/KanbanBoardProps.d.ts +39 -14
- package/dist/Components/KanbanBoard/MeasuredItem.d.ts +1 -0
- package/dist/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/Components/LazyWrapper/LazyWrapper.d.ts +3 -2
- package/dist/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/Components/LimitReachedModal/LimitReachedModalProps.d.ts +4 -1
- package/dist/Components/LimitReachedModal/limitReachedCopy.d.ts +2 -0
- package/dist/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/Components/Loading/Loading.d.ts +1 -0
- package/dist/Components/Loading/Loading.js +16 -14
- package/dist/Components/Loading/LoadingProps.d.ts +2 -0
- package/dist/Components/Modal/ModalProps.d.ts +2 -0
- package/dist/Components/MoreItems/MoreItems.d.ts +1 -0
- package/dist/Components/MoreItems/MoreItems.js +4 -1
- package/dist/Components/MoreItems/MoreItemsProps.d.ts +4 -2
- package/dist/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/Components/MultiSelect/MultiSelectProps.d.ts +2 -0
- package/dist/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +3 -0
- package/dist/Components/NoteTextArea/NoteTextArea.d.ts +1 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +2 -0
- package/dist/Components/Notification/Notification.d.ts +1 -0
- package/dist/Components/Notification/Notification.js +1 -0
- package/dist/Components/Notification/NotificationProps.d.ts +6 -0
- package/dist/Components/NumberInput/NumberInput.d.ts +1 -0
- package/dist/Components/NumberInput/NumberInput.js +4 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/Components/NumberInput/NumberInputProps.d.ts +3 -0
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +6 -1
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts +1 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +4 -2
- package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +17 -4
- package/dist/Components/PdfViewer/PdfViewer.d.ts +2 -1
- package/dist/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/Components/PinInput/PinInput.d.ts +1 -0
- package/dist/Components/PinInput/PinInput.js +1 -0
- package/dist/Components/PinInput/PinInputProps.d.ts +2 -0
- package/dist/Components/PinInputs/PinInputs.d.ts +1 -0
- package/dist/Components/PinInputs/PinInputs.js +1 -0
- package/dist/Components/PinInputs/PinInputsProps.d.ts +1 -0
- package/dist/Components/PlanBadge/PlanBadgeProps.d.ts +2 -0
- package/dist/Components/PlanPill/PlanPillProps.d.ts +2 -0
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/ProductCard/ProductCardProps.d.ts +10 -0
- package/dist/Components/ProductCard/ProductReview.d.ts +1 -0
- package/dist/Components/ProductCard/ProductReview.js +6 -1
- package/dist/Components/ProductCard/ProductTags.js +1 -1
- package/dist/Components/ProductDetails/ProductDetailsProps.d.ts +7 -0
- package/dist/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +3 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.d.ts +1 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewerProps.d.ts +9 -1
- package/dist/Components/ProgressBar/ProgressBar.d.ts +1 -0
- package/dist/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/Components/ProgressBar/ProgressBarProps.d.ts +2 -0
- package/dist/Components/RadioButton/RadioButton.js +3 -2
- package/dist/Components/RadioButton/RadioButtonProps.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.d.ts +2 -0
- package/dist/Components/Reorder/Reorder.js +1 -0
- package/dist/Components/Reorder/ReorderProps.d.ts +3 -0
- package/dist/Components/RolesPermission/RolesPermission.d.ts +1 -0
- package/dist/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/Components/RolesPermission/RolesPermissionProps.d.ts +16 -1
- package/dist/Components/ScrollToTop/ScrollToTop.d.ts +3 -2
- package/dist/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +7 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/Components/Search/Search.d.ts +1 -0
- package/dist/Components/Search/Search.js +3 -2
- package/dist/Components/Search/SearchProps.d.ts +2 -0
- package/dist/Components/SearchSelect/SearchSelect.d.ts +1 -0
- package/dist/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/Components/SearchSelect/SearchSelectProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +3 -0
- package/dist/Components/SegmentedControl/SegmentedControl.js +89 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +23 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +4 -2
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/Select/SelectProps.d.ts +6 -0
- package/dist/Components/SelectSearch/SelectSearch.d.ts +1 -0
- package/dist/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/Components/SelectSearch/SelectSearchProps.d.ts +5 -0
- package/dist/Components/SelectV2/SelectV2.d.ts +1 -0
- package/dist/Components/SelectV2/SelectV2.js +20 -5
- package/dist/Components/SelectV2/SelectV2Props.d.ts +6 -1
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/SideBar/SideBar.js +5 -3
- package/dist/Components/SideBar/SideBarProps.d.ts +38 -24
- package/dist/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +3 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +2 -0
- package/dist/Components/Skeletons/Skeletons.d.ts +1 -0
- package/dist/Components/Skeletons/Skeletons.js +1 -0
- package/dist/Components/Slider/Slider.d.ts +3 -0
- package/dist/Components/Slider/Slider.js +9 -1
- package/dist/Components/StageProgress/StageItem.d.ts +1 -0
- package/dist/Components/StageProgress/StageItem.js +1 -0
- package/dist/Components/StageProgress/StageProgress.d.ts +1 -0
- package/dist/Components/StageProgress/StageProgress.js +1 -0
- package/dist/Components/StageProgress/StageProgressProps.d.ts +45 -4
- package/dist/Components/StageProgress/StageProgressProps.js +6 -4
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/Switch/Switch.d.ts +1 -0
- package/dist/Components/Switch/Switch.js +1 -0
- package/dist/Components/Switch/SwitchProps.d.ts +1 -0
- package/dist/Components/Table/Table.d.ts +2 -1
- package/dist/Components/Table/Table.js +15 -5
- package/dist/Components/Table/TableProps.d.ts +47 -0
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableActions.js +2 -2
- package/dist/Components/Table/components/TableBody.js +44 -18
- package/dist/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/CompactSelect.d.ts +1 -0
- package/dist/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/Components/Table/filters/LeftFilterPane.d.ts +9 -1
- package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/Components/Table/settings/TableSettings.js +6 -4
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Components/Tag/Tag.d.ts +1 -0
- package/dist/Components/Tag/Tag.js +1 -0
- package/dist/Components/Tag/Tag.styles.js +16 -11
- package/dist/Components/Tag/TagProps.d.ts +7 -0
- package/dist/Components/Timeline/Timeline.d.ts +1 -0
- package/dist/Components/Timeline/Timeline.js +1 -0
- package/dist/Components/Timeline/TimelineProps.d.ts +8 -0
- package/dist/Components/Toaster/Toaster.d.ts +1 -0
- package/dist/Components/Toaster/Toaster.js +1 -0
- package/dist/Components/Toaster/ToasterProps.d.ts +3 -0
- package/dist/Components/Toggle/TableToggle.d.ts +1 -0
- package/dist/Components/Toggle/TableToggle.js +73 -18
- package/dist/Components/Toggle/TableToggleProps.d.ts +6 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +19 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +13 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
- package/dist/Components/ToolTip/ToolTip.d.ts +1 -0
- package/dist/Components/ToolTip/ToolTip.js +7 -6
- package/dist/Components/ToolTip/ToolTipProps.d.ts +5 -1
- package/dist/Components/Trail/EditableCell.d.ts +2 -0
- package/dist/Components/Trail/EditableCell.js +2 -1
- package/dist/Components/Trail/SelectAllCheckbox.d.ts +1 -0
- package/dist/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/Components/Trail/TrailWorks.d.ts +1 -0
- package/dist/Components/Trail/TrailWorks.js +2 -1
- package/dist/Components/UpgradeButton/UpgradeButtonProps.d.ts +6 -2
- package/dist/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/Components/UserDetails/UserDetails.d.ts +1 -0
- package/dist/Components/UserDetails/UserDetails.js +6 -3
- package/dist/Components/UserDetails/UserDetailsProps.d.ts +30 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +6 -1
- package/dist/Hooks/exclusiveOverlay.d.ts +4 -0
- package/dist/Hooks/exclusiveOverlay.js +22 -0
- package/dist/Hooks/useExclusiveOverlay.d.ts +5 -0
- package/dist/Hooks/useExclusiveOverlay.js +24 -0
- package/dist/Theme/assertPalette.d.ts +1 -1
- package/dist/Theme/assertPalette.js +3 -2
- package/dist/Theme/chakra/Menu.styles.d.ts +2 -0
- package/dist/Theme/chakra/Menu.styles.js +9 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
- package/dist/Theme/chakra/Popover.styles.js +5 -1
- package/dist/Theme/chakra/componentStyles.d.ts +5 -0
- package/dist/Theme/chakra/componentStyles.js +16 -9
- package/dist/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
- package/dist/Theme/chakra/focusRing.styles.js +46 -0
- package/dist/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/Theme/tokens/brands/index.js +6 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/filledSurface.d.ts +29 -0
- package/dist/Theme/tokens/builders/filledSurface.js +74 -0
- package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
- package/dist/Theme/tokens/builders/focusRing.js +92 -0
- package/dist/Theme/tokens/builders/index.d.ts +2 -0
- package/dist/Theme/tokens/builders/index.js +2 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +41 -3
- package/dist/Theme/tokens/builders/outlineRung.js +82 -5
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
- package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
- package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
- package/dist/Theme/tokens/builders/rowStates.js +19 -0
- package/dist/Theme/tokens/builders/scrollShadow.d.ts +2 -0
- package/dist/Theme/tokens/builders/scrollShadow.js +16 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -2
- package/dist/Theme/tokens/builders/surfaceRungs.js +19 -9
- package/dist/Theme/tokens/types.d.ts +21 -1
- package/dist/Utils/table.d.ts +3 -0
- package/dist/Utils/table.js +49 -3
- package/dist/esm/Components/Accordion/Accordion.js +4 -1
- package/dist/esm/Components/AlertDialog/AlertDialog.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexAreaChart/ApexAreaChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexBarChart/ApexBarChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPieChart/ApexPieChart.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexPolarCharts/ApexPolarCharts.js +1 -0
- package/dist/esm/Components/Apexcharts/ApexRadialChart/ApexRadialChart.js +1 -0
- package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +243 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
- package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/esm/Components/Button/Button.js +5 -4
- package/dist/esm/Components/Button/Button.styles.js +38 -24
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +2 -4
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +21 -12
- package/dist/esm/Components/Checkbox/Checkbox.js +2 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
- package/dist/esm/Components/Common/ErrorComponent.js +7 -5
- package/dist/esm/Components/Common/ErrorMessage.js +2 -2
- package/dist/esm/Components/Common/FormLabel.js +1 -0
- package/dist/esm/Components/Common/FormattedDescription.js +1 -0
- package/dist/esm/Components/Common/HelperText.js +2 -0
- package/dist/esm/Components/Common/Label.js +1 -0
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -0
- package/dist/esm/Components/CopyButton/CopyButton.js +10 -4
- package/dist/esm/Components/DatePicker/CalendarPanel.js +38 -16
- package/dist/esm/Components/DatePicker/DatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +31 -6
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +50 -15
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +1 -0
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +11 -2
- package/dist/esm/Components/DatePicker/TimePicker.js +4 -3
- package/dist/esm/Components/DatePicker/TimePickerInput.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +79 -0
- package/dist/esm/Components/Divider/Divider.js +1 -0
- package/dist/esm/Components/Dropdown/DropDown.js +23 -7
- package/dist/esm/Components/Editor/Editor.js +1 -0
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -5
- package/dist/esm/Components/EmptyState/EmptyState.js +4 -2
- package/dist/esm/Components/FeedbackForm/FeedbackForm.js +1 -0
- package/dist/esm/Components/FieldSelectModal/FieldSelectModal.js +1 -0
- package/dist/esm/Components/FilePreview/FilePreview.js +3 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +8 -6
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +5 -5
- package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +3 -10
- package/dist/esm/Components/Form/FormWrapper.js +2 -1
- package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
- package/dist/esm/Components/Input/PhoneNumberInput.js +1 -0
- package/dist/esm/Components/Input/Switch/InputSwitch.js +1 -0
- package/dist/esm/Components/Input/TextInput.js +1 -0
- package/dist/esm/Components/Input/TextInput.styles.js +8 -10
- package/dist/esm/Components/InputTextArea/InputTextArea.js +1 -0
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +7 -6
- package/dist/esm/Components/KanbanBoard/AccountCard.js +1 -0
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -0
- package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +2 -2
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +1 -0
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +1 -0
- package/dist/esm/Components/LazyWrapper/LazyWrapper.js +1 -0
- package/dist/esm/Components/LimitReachedModal/limitReachedCopy.js +2 -0
- package/dist/esm/Components/Loading/Loading.js +13 -11
- package/dist/esm/Components/MoreItems/MoreItems.js +4 -1
- package/dist/esm/Components/MultiSelect/MultiSelect.js +2 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +9 -10
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +10 -4
- package/dist/esm/Components/Notification/Notification.js +1 -0
- package/dist/esm/Components/NumberInput/NumberInput.js +5 -2
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +7 -6
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +14 -10
- package/dist/esm/Components/OrgSwitcher/OrgSwitcherProps.js +1 -0
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/PdfViewer/PdfViewer.js +7 -1
- package/dist/esm/Components/PinInput/PinInput.js +1 -0
- package/dist/esm/Components/PinInputs/PinInputs.js +1 -0
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
- package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +6 -4
- package/dist/esm/Components/ProgressBar/ProgressBar.js +1 -0
- package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
- package/dist/esm/Components/Reorder/Reorder.js +1 -0
- package/dist/esm/Components/RolesPermission/RolesPermission.js +5 -3
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +4 -1
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +1 -0
- package/dist/esm/Components/Search/Search.js +3 -2
- package/dist/esm/Components/SearchSelect/SearchSelect.js +48 -37
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +86 -0
- package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
- package/dist/esm/Components/Select/Select.js +5 -3
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +37 -15
- package/dist/esm/Components/SelectV2/SelectV2.js +20 -5
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/SideBar/SideBar.js +5 -3
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +15 -11
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +13 -10
- package/dist/esm/Components/Skeletons/Skeletons.js +1 -0
- package/dist/esm/Components/Slider/Slider.js +9 -1
- package/dist/esm/Components/StageProgress/StageItem.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgress.js +1 -0
- package/dist/esm/Components/StageProgress/StageProgressProps.js +7 -5
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/Switch/Switch.js +1 -0
- package/dist/esm/Components/Table/Table.js +15 -5
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableActions.js +2 -2
- package/dist/esm/Components/Table/components/TableBody.js +44 -18
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/components/TableSearch.js +1 -1
- package/dist/esm/Components/Table/filters/CompactSelect.js +29 -8
- package/dist/esm/Components/Table/filters/LeftFilterPane.js +1 -1
- package/dist/esm/Components/Table/settings/ManageColumns.js +8 -5
- package/dist/esm/Components/Table/settings/TableSettings.js +7 -5
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Components/Tag/Tag.js +1 -0
- package/dist/esm/Components/Tag/Tag.styles.js +17 -12
- package/dist/esm/Components/Timeline/Timeline.js +1 -0
- package/dist/esm/Components/Toaster/Toaster.js +1 -0
- package/dist/esm/Components/Toggle/TableToggle.js +72 -17
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +16 -0
- package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
- package/dist/esm/Components/ToolTip/ToolTip.js +7 -6
- package/dist/esm/Components/Trail/EditableCell.js +2 -1
- package/dist/esm/Components/Trail/SelectAllCheckbox.js +1 -0
- package/dist/esm/Components/Trail/TrailWorks.js +2 -1
- package/dist/esm/Components/UserDetails/DeactivateConfirmModal.js +1 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +6 -3
- package/dist/esm/Hooks/exclusiveOverlay.js +16 -0
- package/dist/esm/Hooks/useExclusiveOverlay.js +20 -0
- package/dist/esm/Theme/assertPalette.js +3 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +9 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
- package/dist/esm/Theme/chakra/componentStyles.js +16 -9
- package/dist/esm/Theme/chakra/createBrandTheme.js +22 -9
- package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/esm/Theme/tokens/brands/index.js +6 -1
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/filledSurface.js +67 -0
- package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
- package/dist/esm/Theme/tokens/builders/index.js +2 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +78 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
- package/dist/esm/Theme/tokens/builders/scrollShadow.js +13 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -10
- package/dist/esm/Utils/table.js +50 -5
- package/dist/esm/index.js +26 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.js +67 -4
- package/package.json +11 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ElementType } from "react";
|
|
2
|
+
/** Footer identity block (UserFooter); avatar falls back to initials derived from name when absent. */
|
|
2
3
|
export type SidebarUser = {
|
|
3
4
|
name: string;
|
|
4
5
|
role?: string;
|
|
@@ -6,74 +7,75 @@ export type SidebarUser = {
|
|
|
6
7
|
initials?: string;
|
|
7
8
|
onClick?: () => void;
|
|
8
9
|
};
|
|
10
|
+
/** Docked/collapsible left rail with its own responsive overlay — not NavigationBar (top bar) or WorkspaceWindow (floating panel). */
|
|
9
11
|
export type SidebarProps = {
|
|
10
12
|
menus: MenuProps[];
|
|
13
|
+
/** Matched against each menu's `title` first, then `id` — a title that collides with another menu's `id` wins silently. */
|
|
11
14
|
activeMenu: string | number;
|
|
12
15
|
handleMenuClick?: (menu: MenuProps) => void;
|
|
13
16
|
handleSecondaryNavClick?: (menu: MenuProps) => void;
|
|
14
17
|
toggle: boolean;
|
|
15
18
|
changeToggle: () => void;
|
|
19
|
+
/** Falls back to a rendered brand mark (DefaultLogo) tinted by primary color when omitted. */
|
|
16
20
|
logo?: string;
|
|
17
21
|
companyName: string;
|
|
18
22
|
companySubtitle?: string;
|
|
23
|
+
/** Footer identity block is omitted entirely (not just simplified) when this is not provided. */
|
|
19
24
|
user?: SidebarUser;
|
|
25
|
+
/** true hides the Add New row completely, rather than disabling it. */
|
|
20
26
|
isDisableAddNew?: boolean;
|
|
21
27
|
onAddNewClick?: () => void;
|
|
28
|
+
/** @deprecated Dead — threaded down to MenuItemBox but never read there; no known consumer usage. */
|
|
22
29
|
selectedSubMenu?: string | null;
|
|
23
30
|
selectedSecondaryItem?: string | number | null;
|
|
31
|
+
/** Shows skeleton rows instead of MenuItems; header and footer render normally. */
|
|
24
32
|
isLoading?: boolean;
|
|
33
|
+
/** Defaults to 15 when isLoading is true; ignored otherwise. */
|
|
25
34
|
loadingLines?: number;
|
|
35
|
+
/** Not a direct render switch — on change it calls `changeToggle()` once; nothing collapses unless that updates `toggle`. */
|
|
26
36
|
open?: boolean;
|
|
37
|
+
/** Legacy "Switch app" grid — AppSwitcher supersedes it; avoid wiring both into one shell. */
|
|
27
38
|
otherApps?: OtherAppsProps['otherApps'];
|
|
28
|
-
/**
|
|
29
|
-
* Below the `lg` breakpoint the sidebar renders as a slide-in overlay above
|
|
30
|
-
* the content (it does not occupy layout space). `mobileOpen` controls that
|
|
31
|
-
* overlay's visibility; it has no effect at `lg` and up, where the sidebar is
|
|
32
|
-
* always inline. Wire it to the NavigationBar hamburger (`onSideBarToggole`).
|
|
33
|
-
*/
|
|
39
|
+
/** Controls the overlay's visibility below `lg`; no effect once inline at `lg`+. Wire to NavigationBar's `onSideBarToggole`. */
|
|
34
40
|
mobileOpen?: boolean;
|
|
35
41
|
/** Called when the overlay is dismissed (backdrop click, Esc, close button, or swipe). */
|
|
36
42
|
onMobileClose?: () => void;
|
|
37
|
-
/**
|
|
38
|
-
* Forces the "mobile navbar" presentation at ANY width: the sidebar leaves the
|
|
39
|
-
* inline layout and behaves as the slide-in overlay (hamburger + full-screen
|
|
40
|
-
* content), exactly like below `lg` — but on big screens too. This is a layout
|
|
41
|
-
* switch, not a close: toggling it never hides the navigation, it only changes
|
|
42
|
-
* how it is presented. When `false` the breakpoint alone decides (inline at
|
|
43
|
-
* `lg`+, overlay below `lg`).
|
|
44
|
-
*/
|
|
43
|
+
/** Forces overlay presentation at any width — a layout switch, not a close; never hides navigation. */
|
|
45
44
|
mobileNav?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Handler for the footer Hide/Show control that flips `mobileNav`. Render the
|
|
48
|
-
* control only when provided. Wire it so entering mobile-nav also opens the
|
|
49
|
-
* overlay (keeps the sidebar visible) and leaving it returns to the docked
|
|
50
|
-
* sidebar — see the playground for the canonical wiring.
|
|
51
|
-
*/
|
|
45
|
+
/** Backs the footer Hide/Show control; render it only when this is provided. */
|
|
52
46
|
onToggleMobileNav?: () => void;
|
|
53
|
-
/**
|
|
54
|
-
* Overlay peek: the sidebar shows without pinning, and closes itself when the pointer
|
|
55
|
-
* leaves the panel. Wire to `NavigationBar`'s `onSideBarPeek`.
|
|
56
|
-
*/
|
|
47
|
+
/** Shows the sidebar without pinning — closes on pointer-leave. Wire to NavigationBar's `onSideBarPeek`. */
|
|
57
48
|
peekOpen?: boolean;
|
|
58
49
|
onPeekEnd?: () => void;
|
|
59
50
|
};
|
|
51
|
+
/** One nav item; `subMenu` renders inline (expand/collapse), `secondaryItems` opens a separate SecondaryBar instead. */
|
|
60
52
|
export type MenuProps = {
|
|
61
53
|
id: string | number;
|
|
62
54
|
title: string;
|
|
63
55
|
icon?: ElementType;
|
|
56
|
+
/** Ignored when subMenu is non-empty — the row becomes a toggle button instead of a link. */
|
|
64
57
|
url: string;
|
|
65
58
|
disabled?: boolean;
|
|
59
|
+
/** Shows a lock icon only — does not block the click handler; pair with `disabled` to prevent it. */
|
|
66
60
|
locked?: boolean;
|
|
61
|
+
/** Runtime also accepts a bare number/string (legacy shorthand) though the type only declares the object shape. */
|
|
67
62
|
badge?: {
|
|
63
|
+
/** Also triggers the small red dot on the icon when the rail is collapsed. */
|
|
68
64
|
count?: number;
|
|
65
|
+
/** Chakra colorScheme name; defaults to "teal". */
|
|
69
66
|
color?: string;
|
|
67
|
+
/** Chakra borderRadius value; defaults to "full". */
|
|
70
68
|
radius?: string | number;
|
|
69
|
+
/** Chakra Badge variant; defaults to "subtle". */
|
|
71
70
|
variant?: string;
|
|
72
71
|
};
|
|
73
72
|
subMenu?: MenuProps[];
|
|
73
|
+
/** Non-empty on the active menu auto-collapses the main rail and renders a SecondaryBar, regardless of the `toggle` prop. */
|
|
74
74
|
secondaryItems?: MenuProps[];
|
|
75
|
+
/** First item with a new value renders a section label plus divider; items must be pre-sorted by group. */
|
|
75
76
|
group?: string;
|
|
76
77
|
};
|
|
78
|
+
/** Props for the internal MenuItems renderer — a narrowed slice of SidebarProps. */
|
|
77
79
|
export type RenderMenuType = {
|
|
78
80
|
menus: MenuProps[];
|
|
79
81
|
activeMenu: string | number;
|
|
@@ -82,25 +84,37 @@ export type RenderMenuType = {
|
|
|
82
84
|
selectedSubMenu?: string | null;
|
|
83
85
|
selectedSecondaryItem?: string | number | null;
|
|
84
86
|
};
|
|
87
|
+
/** Secondary flyout panel props; `defaultCollapsed` only seeds initial state, then the panel self-manages it. */
|
|
85
88
|
export type SecondaryBarProps = {
|
|
86
89
|
items?: MenuProps[];
|
|
90
|
+
/** Defaults to true (collapsed) when omitted. */
|
|
87
91
|
defaultCollapsed?: boolean;
|
|
92
|
+
/** Defaults to "3.5rem". */
|
|
88
93
|
collapsedWidth?: string | number;
|
|
94
|
+
/** Defaults to "10rem". */
|
|
89
95
|
expandedWidth?: string | number;
|
|
90
96
|
headerFontSize?: string;
|
|
91
97
|
itemFontSize?: string;
|
|
98
|
+
/** Matched by string equality against either the item's id or title, whichever matches. */
|
|
92
99
|
selected?: string | number | null;
|
|
93
100
|
onItemClick?: (item: MenuProps) => void;
|
|
101
|
+
/** Also used as the collapsed-state tooltip label. */
|
|
94
102
|
title?: string;
|
|
103
|
+
/** Shown only in the expanded header — hidden entirely while collapsed. */
|
|
95
104
|
icon?: ElementType;
|
|
96
105
|
};
|
|
106
|
+
/** "Switch app" footer grid; becomes hover popovers when the sidebar is collapsed. */
|
|
97
107
|
export type OtherAppsProps = {
|
|
98
108
|
toggle: boolean;
|
|
99
109
|
otherApps: {
|
|
110
|
+
/** Used as the React list key — must be unique among otherApps entries. */
|
|
100
111
|
name: string;
|
|
112
|
+
/** Fills the fallback dot (no icon) and its glow — ignored when `icon` is provided. */
|
|
101
113
|
color: string;
|
|
114
|
+
/** Shown only in the collapsed-state hover flyout, never in the expanded grid cell. */
|
|
102
115
|
description?: string;
|
|
103
116
|
onClick: () => void;
|
|
117
|
+
/** A pre-rendered ReactNode, unlike MenuProps.icon (a component reference). */
|
|
104
118
|
icon?: React.ReactNode;
|
|
105
119
|
}[];
|
|
106
120
|
};
|
|
@@ -21,6 +21,9 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
21
21
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
22
22
|
const activeAccent = (0, sidebarAccentColors_1.getSidebarActiveAccent)(theme.colors);
|
|
23
23
|
const { title, icon, disabled, locked, badge, subMenu, url } = menu;
|
|
24
|
+
// `locked` blocks interaction the same as `disabled` — a locked item showing the padlock icon
|
|
25
|
+
// but still fully clickable was a real gotcha (see COMPONENT-GOTCHAS.md).
|
|
26
|
+
const isBlocked = disabled || locked;
|
|
24
27
|
const hasSubMenu = !!(subMenu === null || subMenu === void 0 ? void 0 : subMenu.length);
|
|
25
28
|
const submenuPanelId = `submenu-${String((_a = menu.id) !== null && _a !== void 0 ? _a : title)}`;
|
|
26
29
|
// A submenu parent only expands, so it is a button; every other row navigates.
|
|
@@ -40,11 +43,11 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
40
43
|
const isParentActive = activeMenu === menu.id;
|
|
41
44
|
const isAnyActive = isParentActive || isChildActive;
|
|
42
45
|
const handleToggleSubMenu = (e) => {
|
|
43
|
-
if (!
|
|
46
|
+
if (!isBlocked && hasSubMenu) {
|
|
44
47
|
onToggle === null || onToggle === void 0 ? void 0 : onToggle(menu, e === null || e === void 0 ? void 0 : e.clientY);
|
|
45
48
|
return;
|
|
46
49
|
}
|
|
47
|
-
if (!
|
|
50
|
+
if (!isBlocked)
|
|
48
51
|
handleClick === null || handleClick === void 0 ? void 0 : handleClick(menu);
|
|
49
52
|
};
|
|
50
53
|
// Pill-style nav item. The fill is a white overlay, not a brand tint: the sidebar is a
|
|
@@ -68,14 +71,14 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
68
71
|
borderLeft: "2px solid",
|
|
69
72
|
borderLeftColor: isAnyActive ? theme.colors.sidebar.activeIcon : "transparent",
|
|
70
73
|
backgroundColor: isAnyActive ? "whiteAlpha.300" : "transparent",
|
|
71
|
-
color:
|
|
72
|
-
_hover:
|
|
74
|
+
color: isBlocked ? "whiteAlpha.400" : "whiteAlpha.700",
|
|
75
|
+
_hover: isBlocked
|
|
73
76
|
? {}
|
|
74
77
|
: {
|
|
75
78
|
backgroundColor: isAnyActive ? "whiteAlpha.400" : "whiteAlpha.200",
|
|
76
79
|
},
|
|
77
|
-
cursor:
|
|
78
|
-
opacity:
|
|
80
|
+
cursor: isBlocked ? "not-allowed" : "pointer",
|
|
81
|
+
opacity: isBlocked ? 0.6 : 1,
|
|
79
82
|
transition: "background 0.12s",
|
|
80
83
|
};
|
|
81
84
|
const buttonContent = ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "9px", justify: toggle ? "center" : "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "9px", overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { position: "relative", display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: icon, fontSize: "1rem", verticalAlign: "middle", color: isAnyActive ? activeAccent.icon : "whiteAlpha.800", _groupHover: isAnyActive ? undefined : { color: "white" }, transition: "color 0.12s" }), toggle && (badgeValue != null || hasSubmenuBadge) && ((0, jsx_runtime_1.jsx)(react_1.Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.red[400] }))] }), !toggle && ((0, jsx_runtime_1.jsx)(TextTruncation_1.default
|
|
@@ -92,14 +95,14 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
92
95
|
})(), locked && (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.LockKeyhole, fontSize: "1rem", color: "whiteAlpha.600" }), hasSubMenu && ((0, jsx_runtime_1.jsx)(react_1.Icon, { as: isOpen ? lucide_react_1.ChevronDown : lucide_react_1.ChevronRight, fontSize: "1rem", color: theme.colors.sidebar.mutedIcon }))] }))] }));
|
|
93
96
|
if (toggle) {
|
|
94
97
|
// Collapsed sidebar: show Popover
|
|
95
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Popover, { trigger: "hover", placement: "right-start", closeOnBlur: false, isLazy: true, children: [(0, jsx_runtime_1.jsx)(react_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_1.Box, { ...commonStyles, as: rowAs, type: hasSubMenu ? "button" : undefined, href: hasSubMenu ? undefined : url !== null && url !== void 0 ? url : "#", "aria-label": title, "aria-current": isAnyActive ? "page" : undefined, "aria-disabled":
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Popover, { trigger: "hover", placement: "right-start", closeOnBlur: false, isLazy: true, children: [(0, jsx_runtime_1.jsx)(react_1.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_1.Box, { ...commonStyles, as: rowAs, type: hasSubMenu ? "button" : undefined, href: hasSubMenu ? undefined : url !== null && url !== void 0 ? url : "#", "aria-label": title, "aria-current": isAnyActive ? "page" : undefined, "aria-disabled": isBlocked ? true : undefined, onClick: (e) => {
|
|
96
99
|
if (!hasSubMenu && url && isBrowserNavigationGesture(e))
|
|
97
100
|
return;
|
|
98
101
|
e.preventDefault();
|
|
99
102
|
handleToggleSubMenu(e);
|
|
100
|
-
}, "data-menu-id": String((_d = menu.id) !== null && _d !== void 0 ? _d : title), children: buttonContent }) }), (0, jsx_runtime_1.jsx)(react_1.Portal, { children: (0, jsx_runtime_1.jsx)(react_1.PopoverContent, { borderRadius: "lg", bg: theme.colors.sidebar.elevated, boxShadow: "lg", minW: "10rem", maxW: "14rem", py: "0.125rem", ml: "-0.5rem", border: 'none', cursor:
|
|
103
|
+
}, "data-menu-id": String((_d = menu.id) !== null && _d !== void 0 ? _d : title), children: buttonContent }) }), (0, jsx_runtime_1.jsx)(react_1.Portal, { children: (0, jsx_runtime_1.jsx)(react_1.PopoverContent, { borderRadius: "lg", bg: theme.colors.sidebar.elevated, boxShadow: "lg", minW: "10rem", maxW: "14rem", py: "0.125rem", ml: "-0.5rem", border: 'none', cursor: isBlocked ? "not-allowed" : "pointer", zIndex: 1500, children: (0, jsx_runtime_1.jsx)(react_1.PopoverBody, { p: "0.625rem", color: "white", children: (0, jsx_runtime_1.jsx)(MenuPopoverContent_1.default, { menu: menu, handleMenuClick: handleClick, activeMenu: activeMenu }) }) }) })] }));
|
|
101
104
|
}
|
|
102
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Box, { ...commonStyles, as: rowAs, type: hasSubMenu ? "button" : undefined, href: hasSubMenu ? undefined : url !== null && url !== void 0 ? url : "#", "aria-expanded": hasSubMenu ? !!isOpen : undefined, "aria-controls": hasSubMenu ? submenuPanelId : undefined, "aria-current": isAnyActive ? "page" : undefined, "aria-disabled":
|
|
105
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Box, { ...commonStyles, as: rowAs, type: hasSubMenu ? "button" : undefined, href: hasSubMenu ? undefined : url !== null && url !== void 0 ? url : "#", "aria-expanded": hasSubMenu ? !!isOpen : undefined, "aria-controls": hasSubMenu ? submenuPanelId : undefined, "aria-current": isAnyActive ? "page" : undefined, "aria-disabled": isBlocked ? true : undefined, onClick: (e) => {
|
|
103
106
|
if (!hasSubMenu && url && isBrowserNavigationGesture(e))
|
|
104
107
|
return;
|
|
105
108
|
e.preventDefault();
|
|
@@ -111,11 +114,12 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
111
114
|
}, children: subMenu.map((sub, sIdx) => {
|
|
112
115
|
var _a, _b, _c;
|
|
113
116
|
const isSubActive = activeMenu === sub.id;
|
|
114
|
-
|
|
117
|
+
const isSubBlocked = sub.disabled || sub.locked;
|
|
118
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "a", href: (_a = sub.url) !== null && _a !== void 0 ? _a : "#", "data-group": "", "aria-current": isSubActive ? "page" : undefined, "aria-disabled": isSubBlocked ? true : undefined, textDecoration: "none", py: "5px", pl: "30px", pr: "10px", borderRadius: "md", fontSize: "11.5px", backgroundColor: "transparent", _hover: { backgroundColor: "whiteAlpha.100" }, opacity: isSubBlocked ? 0.6 : 1, cursor: isSubBlocked ? "not-allowed" : "pointer", pointerEvents: isSubBlocked ? "none" : "auto", onClick: (e) => {
|
|
115
119
|
if (sub.url && isBrowserNavigationGesture(e))
|
|
116
120
|
return;
|
|
117
121
|
e.preventDefault();
|
|
118
|
-
if (!
|
|
122
|
+
if (!isSubBlocked)
|
|
119
123
|
handleClick === null || handleClick === void 0 ? void 0 : handleClick(sub);
|
|
120
124
|
}, display: "flex", alignItems: "center", justifyContent: "space-between", gap: "0.5rem", transition: "background 0.12s", children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [sub.icon ? ((0, jsx_runtime_1.jsx)(react_1.Icon, { as: sub.icon, fontSize: "0.95rem", flexShrink: 0, color: isSubActive ? activeAccent.icon : "whiteAlpha.800", _groupHover: isSubActive ? undefined : { color: "white" }, transition: "color 0.12s" })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { w: "5px", h: "5px", borderRadius: "full", flexShrink: 0, bg: isSubActive ? activeAccent.icon : "whiteAlpha.500", _groupHover: isSubActive ? undefined : { bg: "whiteAlpha.700" }, transition: "background 0.12s" })), (0, jsx_runtime_1.jsx)(TextTruncation_1.default, { fontSize: "12px", fontWeight: isSubActive ? 600 : 500, lineHeight: "1",
|
|
121
125
|
// open={isOpen}
|
|
@@ -13,15 +13,17 @@ const MenuPopoverContent = ({ menu, handleMenuClick, activeMenu, }) => {
|
|
|
13
13
|
var _a;
|
|
14
14
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
15
15
|
const activeAccent = (0, sidebarAccentColors_1.getSidebarActiveAccent)(theme.colors);
|
|
16
|
-
const { title, icon, subMenu, badge, locked } = menu;
|
|
16
|
+
const { title, icon, subMenu, badge, locked, disabled } = menu;
|
|
17
|
+
const isBlocked = disabled || locked;
|
|
17
18
|
const hasSubMenu = !!(subMenu === null || subMenu === void 0 ? void 0 : subMenu.length);
|
|
18
19
|
const isParentActive = activeMenu === menu.id;
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { as: (hasSubMenu ? "div" : "a"), href: hasSubMenu ? undefined : (_a = menu.url) !== null && _a !== void 0 ? _a : "#", "aria-current": !hasSubMenu && isParentActive ? "page" : undefined, textDecoration: "none", align: "center", gap: "8px", px: "8px", py: hasSubMenu ? "6px" : "8px", mb: hasSubMenu ? "4px" : 0, borderBottom: hasSubMenu ? "1px solid" : undefined, borderColor: hasSubMenu ? "whiteAlpha.100" : undefined, borderRadius: hasSubMenu ? "none" : "md", bg: !hasSubMenu && isParentActive ?
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { as: (hasSubMenu ? "div" : "a"), href: hasSubMenu ? undefined : (_a = menu.url) !== null && _a !== void 0 ? _a : "#", "aria-current": !hasSubMenu && isParentActive ? "page" : undefined, textDecoration: "none", align: "center", gap: "8px", px: "8px", py: hasSubMenu ? "6px" : "8px", mb: hasSubMenu ? "4px" : 0, borderBottom: hasSubMenu ? "1px solid" : undefined, borderColor: hasSubMenu ? "whiteAlpha.100" : undefined, borderRadius: hasSubMenu ? "none" : "md", bg: !hasSubMenu && isParentActive ? "whiteAlpha.300" : "transparent", _hover: !hasSubMenu && !isBlocked ? { bg: "whiteAlpha.100" } : undefined, onClick: (e) => {
|
|
20
21
|
if (!hasSubMenu) {
|
|
21
22
|
e.preventDefault();
|
|
22
|
-
|
|
23
|
+
if (!isBlocked)
|
|
24
|
+
handleMenuClick === null || handleMenuClick === void 0 ? void 0 : handleMenuClick(menu);
|
|
23
25
|
}
|
|
24
|
-
}, cursor: !hasSubMenu ? "pointer" : "default", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: icon, fontSize: "1rem", flexShrink: 0, color: !hasSubMenu && isParentActive ? activeAccent.icon : "whiteAlpha.700" }), (0, jsx_runtime_1.jsx)(TextTruncation_1.default, { fontWeight: 600, fontSize: "13px", flex: "1", color: theme.colors.white, children: title }), (() => {
|
|
26
|
+
}, cursor: !hasSubMenu ? (isBlocked ? "not-allowed" : "pointer") : "default", "aria-disabled": !hasSubMenu && isBlocked ? true : undefined, children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: icon, fontSize: "1rem", flexShrink: 0, color: !hasSubMenu && isParentActive ? activeAccent.icon : "whiteAlpha.700" }), (0, jsx_runtime_1.jsx)(TextTruncation_1.default, { fontWeight: 600, fontSize: "13px", flex: "1", color: theme.colors.white, children: title }), (() => {
|
|
25
27
|
var _a, _b, _c, _d;
|
|
26
28
|
const cfg = typeof badge === "object" && badge !== null
|
|
27
29
|
? badge
|
|
@@ -34,14 +36,15 @@ const MenuPopoverContent = ({ menu, handleMenuClick, activeMenu, }) => {
|
|
|
34
36
|
})(), locked && (0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.LockKeyhole, fontSize: "1rem", color: theme.colors.sidebar.mutedIcon })] }), subMenu === null || subMenu === void 0 ? void 0 : subMenu.map((sub) => {
|
|
35
37
|
var _a;
|
|
36
38
|
const isSubActive = activeMenu === sub.id;
|
|
37
|
-
|
|
39
|
+
const isSubBlocked = sub.disabled || sub.locked;
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "a", href: (_a = sub.url) !== null && _a !== void 0 ? _a : "#", "data-group": "", "aria-current": isSubActive ? "page" : undefined, "aria-disabled": isSubBlocked ? true : undefined, textDecoration: "none", onClick: (e) => {
|
|
38
41
|
e.preventDefault();
|
|
39
|
-
if (!
|
|
42
|
+
if (!isSubBlocked)
|
|
40
43
|
handleMenuClick === null || handleMenuClick === void 0 ? void 0 : handleMenuClick(sub);
|
|
41
|
-
}, px: "8px", py: "7px", mb: "2px", borderRadius: "md", align: "center", justify: "space-between", gap: "8px", borderLeft: "2px solid", borderLeftColor: isSubActive ? theme.colors.sidebar.activeIcon : "transparent", bg: isSubActive ?
|
|
42
|
-
bg: !
|
|
43
|
-
cursor: !
|
|
44
|
-
}, opacity:
|
|
44
|
+
}, px: "8px", py: "7px", mb: "2px", borderRadius: "md", align: "center", justify: "space-between", gap: "8px", borderLeft: "2px solid", borderLeftColor: isSubActive ? theme.colors.sidebar.activeIcon : "transparent", bg: isSubActive ? "whiteAlpha.300" : "transparent", _hover: {
|
|
45
|
+
bg: !isSubBlocked ? "whiteAlpha.100" : "transparent",
|
|
46
|
+
cursor: !isSubBlocked ? "pointer" : "not-allowed",
|
|
47
|
+
}, opacity: isSubBlocked ? 0.5 : 1, pointerEvents: isSubBlocked ? "none" : "auto", transition: "background 0.12s", children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [(0, jsx_runtime_1.jsx)(react_1.Icon, { as: sub.icon, fontSize: "0.95rem", flexShrink: 0, color: isSubActive ? activeAccent.icon : "whiteAlpha.800", _groupHover: isSubActive ? undefined : { color: "white" }, transition: "color 0.12s" }), (0, jsx_runtime_1.jsx)(TextTruncation_1.default, { fontSize: "12.5px", fontWeight: isSubActive ? 600 : 500, flex: 1, color: isSubActive ? activeAccent.label : theme.colors.white, _groupHover: isSubActive ? undefined : { color: "white" }, children: sub.title })] }), sub.locked ? ((0, jsx_runtime_1.jsx)(react_1.Icon, { as: lucide_react_1.LockKeyhole, fontSize: "1rem", color: theme.colors.sidebar.mutedIcon })) : (() => {
|
|
45
48
|
var _a, _b, _c, _d;
|
|
46
49
|
const cfg = typeof sub.badge === "object" && sub.badge !== null
|
|
47
50
|
? sub.badge
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** One row of sign-in device history rendered by SignInActivityTable. */
|
|
1
2
|
export type SignInDevice = {
|
|
3
|
+
/** Falls back to "—" when falsy; device and activity below don't — a blank one renders as an empty cell, not a dash. */
|
|
2
4
|
browser: string;
|
|
3
5
|
device: string;
|
|
4
6
|
activity: string;
|
|
@@ -14,6 +16,7 @@ export type SignInActivityLabels = {
|
|
|
14
16
|
recentActivity?: string;
|
|
15
17
|
noActivity?: string;
|
|
16
18
|
};
|
|
19
|
+
/** Read-only 3-column device list (browser, device, activity) on raw Chakra table parts, not the library Table — no row actions, closed props, no ref/...rest passthrough. */
|
|
17
20
|
export interface SignInActivityTableProps {
|
|
18
21
|
devices: SignInDevice[];
|
|
19
22
|
isLoading?: boolean;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SkeletonProps as ChakraSkeleton, SkeletonTextProps } from "@chakra-ui/react";
|
|
2
|
+
/** Closed prop list, no ...rest, no borderRadius/margin — for those or a ref use Chakra's Skeleton (Primitives barrel) instead. */
|
|
2
3
|
export type SkeletonProps = Pick<ChakraSkeleton, "startColor" | "endColor" | "height" | "isLoaded" | "bg" | "color" | "fadeDuration" | "children" | "speed" | "size" | "mt" | "noOfLines" | "width"> & {
|
|
4
|
+
/** isLoaded, children, bg, color, fadeDuration only apply to type="skeleton" — circle/text accept but silently ignore them. */
|
|
3
5
|
type: "skeleton" | "circle" | "text";
|
|
4
6
|
} & Partial<Pick<SkeletonTextProps, "spacing" | "skeletonHeight">>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { SkeletonProps } from "./SkeletonProps";
|
|
2
|
+
/** Renders exactly one of Skeleton/SkeletonCircle/SkeletonText per `type` — not a layout wrapper combining all three. */
|
|
2
3
|
export default function Skeletons({ startColor, endColor, height, isLoaded, bg, color, fadeDuration, children, type, speed, size, mt, noOfLines, spacing, skeletonHeight, width, }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.default = Skeletons;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("@chakra-ui/react");
|
|
6
|
+
/** Renders exactly one of Skeleton/SkeletonCircle/SkeletonText per `type` — not a layout wrapper combining all three. */
|
|
6
7
|
function Skeletons({ startColor, endColor, height = "20px", isLoaded, bg, color, fadeDuration, children, type, speed, size, mt, noOfLines, spacing, skeletonHeight, width, }) {
|
|
7
8
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [type === "skeleton" && ((0, jsx_runtime_1.jsx)(react_1.Skeleton, { height: height, isLoaded: isLoaded, bg: bg, color: color, fadeDuration: fadeDuration, startColor: startColor, endColor: endColor, speed: speed, width: width, children: children })), type === "circle" && (0, jsx_runtime_1.jsx)(react_1.SkeletonCircle, { size: size, speed: speed }), type === "text" && ((0, jsx_runtime_1.jsx)(react_1.SkeletonText, { mt: mt, noOfLines: noOfLines, spacing: spacing, skeletonHeight: skeletonHeight }))] }));
|
|
8
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
type ImageSliderProps = {
|
|
3
3
|
images: SliderImage[];
|
|
4
|
+
/** interval <= 0 disables auto-advance entirely (no timer set) — it does not mean "no delay"/immediate. */
|
|
4
5
|
interval?: number;
|
|
5
6
|
isArrow?: boolean;
|
|
6
7
|
mobileImages?: SliderImage[];
|
|
@@ -11,7 +12,9 @@ type SliderImage = {
|
|
|
11
12
|
previewUrl: string;
|
|
12
13
|
/** Optional URL used on small viewports when provided via `mobileImages`. */
|
|
13
14
|
mobilePreviewUrl?: string;
|
|
15
|
+
/** Sorts the main track, but pagination dots follow the array's original order — pass images pre-sorted by order to keep dots in sync. */
|
|
14
16
|
order: number;
|
|
15
17
|
};
|
|
18
|
+
/** Auto-advancing image/content carousel — NOT a numeric range input; for that use Chakra's Slider via the Primitives barrel (exported as RangeSlider). */
|
|
16
19
|
declare const Slider: React.FC<ImageSliderProps>;
|
|
17
20
|
export default Slider;
|
|
@@ -5,6 +5,9 @@ const react_1 = require("react");
|
|
|
5
5
|
const react_2 = require("@chakra-ui/react");
|
|
6
6
|
const lucide_react_1 = require("lucide-react");
|
|
7
7
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
|
+
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
9
|
+
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
10
|
+
/** Auto-advancing image/content carousel — NOT a numeric range input; for that use Chakra's Slider via the Primitives barrel (exported as RangeSlider). */
|
|
8
11
|
const Slider = ({ images, interval = 5000, isArrow = false, mobileImages, }) => {
|
|
9
12
|
var _a, _b;
|
|
10
13
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -34,10 +37,15 @@ const Slider = ({ images, interval = 5000, isArrow = false, mobileImages, }) =>
|
|
|
34
37
|
// eslint-disable-next-line
|
|
35
38
|
}, [slides.length]);
|
|
36
39
|
const ratio = (_b = (0, react_2.useBreakpointValue)({ base: 16 / 9, md: 21 / 9, lg: 21 / 9 })) !== null && _b !== void 0 ? _b : 16 / 9;
|
|
40
|
+
const chipBg = colors.background[50];
|
|
41
|
+
const chipInk = (0, accentText_1.onFilled)(chipBg, colors.white, colors.black);
|
|
42
|
+
const chipHoverBg = (0, outlineRung_1.resolveHoverTint)(colors.gray[200], chipBg);
|
|
43
|
+
const chipHoverInk = (0, accentText_1.onFilled)(chipHoverBg, colors.white, colors.black);
|
|
44
|
+
const dotInactiveInk = (0, outlineRung_1.liftToContrast)(colors.gray[400], chipBg, outlineRung_1.AA_NON_TEXT);
|
|
37
45
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", w: "100%", h: "auto", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Flex, { w: `${slides.length * 100}%`, transform: `translateX(-${(currentIndex * 100) / slides.length}%)`, transition: "transform 0.5s ease", children: [...slides]
|
|
38
46
|
.sort((a, b) => a.order - b.order)
|
|
39
47
|
.map((image, idx) => ((0, jsx_runtime_1.jsx)(react_2.Box, { w: `${100 / slides.length}%`, h: "auto", flexShrink: 0, display: "flex", justifyContent: "center", alignItems: "center", children: (0, jsx_runtime_1.jsx)(react_2.AspectRatio, { ratio: ratio, w: "100%", children: (0, jsx_runtime_1.jsx)(react_2.Image, { src: isMobile && image.mobilePreviewUrl
|
|
40
48
|
? image.mobilePreviewUrl
|
|
41
|
-
: image.previewUrl, alt: `Slide ${idx + 1}`, objectFit: "cover", w: "100%", h: "100%", loading: "lazy" }) }) }, image.id))) }), isArrow && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, {
|
|
49
|
+
: image.previewUrl, alt: `Slide ${idx + 1}`, objectFit: "cover", w: "100%", h: "100%", loading: "lazy" }) }) }, image.id))) }), isArrow && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, {}), "aria-label": "Previous Slide", onClick: prevSlide, position: "absolute", top: "50%", left: "1rem", transform: "translateY(-50%)", zIndex: 2, variant: "ghost", borderRadius: "full", bg: chipBg, color: chipInk, _hover: { bg: chipHoverBg, color: chipHoverInk } }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, {}), "aria-label": "Next Slide", onClick: nextSlide, position: "absolute", top: "50%", right: "1rem", transform: "translateY(-50%)", zIndex: 2, variant: "ghost", borderRadius: "full", bg: chipBg, color: chipInk, _hover: { bg: chipHoverBg, color: chipHoverInk } })] })), slides.length > 1 && ((0, jsx_runtime_1.jsx)(react_2.Flex, { position: "absolute", bottom: "1rem", left: "50%", transform: "translateX(-50%)", gap: "0.5rem", zIndex: 2, bg: chipBg, px: "0.6rem", py: "0.4rem", borderRadius: "full", children: slides.map((_, idx) => ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", w: { base: "0.5rem", md: "0.8rem" }, h: { base: "0.5rem", md: "0.8rem" }, border: "none", p: 0, bg: idx === currentIndex ? chipInk : dotInactiveInk, borderRadius: "full", cursor: "pointer", onClick: () => setCurrentIndex(idx), "aria-label": `Go to slide ${idx + 1}`, "aria-current": idx === currentIndex, transition: "all 0.3s", _focusVisible: { outline: `2px solid ${chipInk}`, outlineOffset: "2px" } }, idx))) }))] }));
|
|
42
50
|
};
|
|
43
51
|
exports.default = Slider;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StageItemProps } from "./StageProgressProps";
|
|
3
|
+
/** Renders one chevron/bar/pill stage — for variant="stepper", StageProgress renders StepperStage internally instead. */
|
|
3
4
|
declare const StageItem: React.FC<StageItemProps>;
|
|
4
5
|
export default StageItem;
|
|
@@ -26,6 +26,7 @@ const clipFor = (index, total, a) => {
|
|
|
26
26
|
return `polygon(0 0, 100% 0, 100% 100%, 0 100%, ${a}px 50%)`;
|
|
27
27
|
return `polygon(0 0, calc(100% - ${a}px) 0, 100% 50%, calc(100% - ${a}px) 100%, 0 100%, ${a}px 50%)`;
|
|
28
28
|
};
|
|
29
|
+
/** Renders one chevron/bar/pill stage — for variant="stepper", StageProgress renders StepperStage internally instead. */
|
|
29
30
|
const StageItem = ({ label, index, total, state, variant = "chevron", size = "md", colorScheme = "primary", onClick, isReadOnly = false, disabled = false, showCheck = false, minWidth, scrollIntoViewWhenActive = true, tooltipThreshold = 20, }) => {
|
|
30
31
|
var _a;
|
|
31
32
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StageProgressProps } from "./StageProgressProps";
|
|
3
|
+
/** Multi-stage pipeline tracker (chevron/bar/pills/stepper) — stepper ignores tooltipThreshold and minStageWidth. */
|
|
3
4
|
declare const StageProgress: React.FC<StageProgressProps>;
|
|
4
5
|
export default StageProgress;
|
|
@@ -16,6 +16,7 @@ const gapFor = {
|
|
|
16
16
|
pills: "8px",
|
|
17
17
|
stepper: "0",
|
|
18
18
|
};
|
|
19
|
+
/** Multi-stage pipeline tracker (chevron/bar/pills/stepper) — stepper ignores tooltipThreshold and minStageWidth. */
|
|
19
20
|
const StageProgress = ({ stages, variant = "chevron", value, onChange, size = "md", colorScheme = "primary", markCompleted = true, showCheck = false, isReadOnly = false, isLoading = false, minStageWidth, scrollActiveIntoView = true, tooltipThreshold = 20, }) => {
|
|
20
21
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
21
22
|
if (isLoading) {
|
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { CustomThemeProps } from "../../Theme/themeProps";
|
|
2
|
+
/** Size preset keying each renderer's own pixel/spacing lookup table. */
|
|
2
3
|
export type StageSize = "sm" | "md" | "lg";
|
|
4
|
+
/** Palette key: brand colors resolve direct, others (success/error/warning/info) via theme.colors.semantic. */
|
|
3
5
|
export type StageColorScheme = "primary" | "secondary" | "tertiary" | "success" | "error" | "warning" | "info";
|
|
6
|
+
/** Per-stage render state; StageProgress derives it from index vs. the active stage. */
|
|
4
7
|
export type StageState = "completed" | "active" | "upcoming";
|
|
5
8
|
/** Visual style of the tracker. */
|
|
6
9
|
export type StageVariant = "chevron" | "bar" | "pills" | "stepper";
|
|
10
|
+
/** One entry in StageProgressProps.stages — the ordered pipeline this tracker renders. */
|
|
7
11
|
export interface Stage {
|
|
12
|
+
/** Compared to `value` via strict `===`; a numeric id vs a string `value` never matches. */
|
|
8
13
|
id: string | number;
|
|
14
|
+
/** Truncates with an ellipsis (or a tooltip) under chevron/bar/pills; wraps to 2 lines under stepper. */
|
|
9
15
|
label: string;
|
|
10
16
|
/** Disable selecting this stage individually. */
|
|
11
17
|
disabled?: boolean;
|
|
12
18
|
}
|
|
19
|
+
/** Top-level props for StageProgress; per-item rendering is delegated to StageItemProps/StepperStageProps. */
|
|
13
20
|
export interface StageProgressProps {
|
|
14
21
|
/** Ordered list of pipeline stages. */
|
|
15
22
|
stages: Stage[];
|
|
16
23
|
/** Visual style. Default "chevron". */
|
|
17
24
|
variant?: StageVariant;
|
|
18
|
-
/** id
|
|
25
|
+
/** Must exactly match a stage.id — no match silently renders every stage as "upcoming" (nothing active). */
|
|
19
26
|
value?: string | number;
|
|
20
|
-
/**
|
|
27
|
+
/** Skipped when isReadOnly, or when that specific stage's own `disabled` is true. */
|
|
21
28
|
onChange?: (id: string | number, stage: Stage, index: number) => void;
|
|
29
|
+
/** Default "md"; also sets the loading skeleton's row height. */
|
|
22
30
|
size?: StageSize;
|
|
31
|
+
/** Default "primary"; resolved per stage via resolveStagePalette, not applied directly. */
|
|
23
32
|
colorScheme?: StageColorScheme;
|
|
24
33
|
/** Render stages before the active one in a distinct "done" style. Default true. */
|
|
25
34
|
markCompleted?: boolean;
|
|
@@ -29,56 +38,88 @@ export interface StageProgressProps {
|
|
|
29
38
|
isReadOnly?: boolean;
|
|
30
39
|
/** Show the loading skeleton row instead of stages. */
|
|
31
40
|
isLoading?: boolean;
|
|
32
|
-
/**
|
|
41
|
+
/** Ignored for variant="stepper" (fixed per-size circle width there) — applies to chevron/bar/pills only. */
|
|
33
42
|
minStageWidth?: string;
|
|
34
43
|
/** Auto-scroll the active stage into view. Default true. */
|
|
35
44
|
scrollActiveIntoView?: boolean;
|
|
36
|
-
/**
|
|
45
|
+
/** Also only applies to chevron/bar/pills — variant="stepper" never shows a tooltip, however long the label. */
|
|
37
46
|
tooltipThreshold?: number;
|
|
38
47
|
}
|
|
48
|
+
/** Props for one chevron/bar/pills stage; variant="stepper" renders StepperStage/StepperStageProps instead. */
|
|
39
49
|
export interface StageItemProps {
|
|
50
|
+
/** Ellipsis-truncates in the fixed-width box; see tooltipThreshold for when a tooltip also appears. */
|
|
40
51
|
label: string;
|
|
52
|
+
/** 0-based position; with total, picks the chevron's first/last point shape. */
|
|
41
53
|
index: number;
|
|
54
|
+
/** Stage count; with index, drives first/last chevron-point and bar-corner rounding. */
|
|
42
55
|
total: number;
|
|
43
56
|
state: StageState;
|
|
44
57
|
/** "chevron" | "bar" | "pills" (stepper has its own renderer). */
|
|
45
58
|
variant?: Exclude<StageVariant, "stepper">;
|
|
59
|
+
/** Default "md"; keys this stage's own pixel/spacing lookup table. */
|
|
46
60
|
size?: StageSize;
|
|
61
|
+
/** Default "primary"; passed straight into resolveStagePalette for this stage. */
|
|
47
62
|
colorScheme?: StageColorScheme;
|
|
63
|
+
/** Called with no args — StageProgress wraps id/stage/index into this closure itself. */
|
|
48
64
|
onClick?: () => void;
|
|
65
|
+
/** Disables all interactivity without dimming opacity (unlike disabled). */
|
|
49
66
|
isReadOnly?: boolean;
|
|
67
|
+
/** Disables just this stage and dims it to 0.55 opacity. */
|
|
50
68
|
disabled?: boolean;
|
|
69
|
+
/** Adds a check icon before the label only when this stage is completed. */
|
|
51
70
|
showCheck?: boolean;
|
|
71
|
+
/** Falls back to this size's own fixed minW when unset, not to content width. */
|
|
52
72
|
minWidth?: string;
|
|
73
|
+
/** Only scrolls when this item's own state is "active" — a no-op otherwise. */
|
|
53
74
|
scrollIntoViewWhenActive?: boolean;
|
|
75
|
+
/** Character count (not pixels) above which the label swaps to a hover tooltip. */
|
|
54
76
|
tooltipThreshold?: number;
|
|
55
77
|
}
|
|
78
|
+
/** Props for one stepper-variant node; leftDone/rightDone fill the connector line per side. */
|
|
56
79
|
export interface StepperStageProps {
|
|
80
|
+
/** Wraps up to 2 lines (noOfLines=2) instead of truncating; ignores tooltipThreshold entirely. */
|
|
57
81
|
label: string;
|
|
58
82
|
/** 1-based step number shown inside the circle. */
|
|
59
83
|
number: number;
|
|
60
84
|
state: StageState;
|
|
85
|
+
/** Default "md"; keys this node's own circle/font/minWidth lookup table. */
|
|
61
86
|
size?: StageSize;
|
|
87
|
+
/** Default "primary"; passed straight into resolveStagePalette for this node. */
|
|
62
88
|
colorScheme?: StageColorScheme;
|
|
89
|
+
/** Called with no args — StageProgress's own onChange(id, stage, index) is wrapped upstream. */
|
|
63
90
|
onClick?: () => void;
|
|
91
|
+
/** Disables interactivity without dimming opacity (unlike disabled). */
|
|
64
92
|
isReadOnly?: boolean;
|
|
93
|
+
/** Disables this node and dims it to 0.55 opacity. */
|
|
65
94
|
disabled?: boolean;
|
|
95
|
+
/** Defaults true here (unlike StageItem's false); StageProgress always overrides it explicitly. */
|
|
66
96
|
showCheck?: boolean;
|
|
97
|
+
/** Hides (not shortens) the left connector line entirely, regardless of leftDone. */
|
|
67
98
|
isFirst: boolean;
|
|
99
|
+
/** Hides (not shortens) the right connector line entirely, regardless of rightDone. */
|
|
68
100
|
isLast: boolean;
|
|
69
101
|
/** Connector entering this node is part of a completed segment. */
|
|
70
102
|
leftDone: boolean;
|
|
71
103
|
/** Connector leaving this node is part of a completed segment. */
|
|
72
104
|
rightDone: boolean;
|
|
105
|
+
/** Only scrolls when this node's own state is "active" — a no-op otherwise. */
|
|
73
106
|
scrollIntoViewWhenActive?: boolean;
|
|
74
107
|
}
|
|
108
|
+
/** Color set for one scheme's states, returned by resolveStagePalette (soft/strong/muted + text). */
|
|
75
109
|
export interface StagePalette {
|
|
110
|
+
/** Background for "completed" stages, and the active stepper circle's outer glow ring. */
|
|
76
111
|
soft: string;
|
|
112
|
+
/** Text/icon color for "completed" stages, contrast-walked against soft, not a fixed rung. */
|
|
77
113
|
softText: string;
|
|
114
|
+
/** Background for "active" stages, and the hover fill for completed/upcoming stages. */
|
|
78
115
|
strong: string;
|
|
116
|
+
/** Text/icon color on strong; picked between white/black per scheme to clear AA. */
|
|
79
117
|
onStrong: string;
|
|
118
|
+
/** Hover-only background for an already-"active" stage; other states hover to strong instead. */
|
|
80
119
|
hover: string;
|
|
120
|
+
/** Background for "upcoming" stages; also the unfilled stepper circle's border and idle connector line. */
|
|
81
121
|
muted: string;
|
|
122
|
+
/** Text color for "upcoming" stages, chevron/bar/pills and stepper alike. */
|
|
82
123
|
mutedText: string;
|
|
83
124
|
}
|
|
84
125
|
/** Resolve a chevron palette for a given color scheme from the theme. */
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveStagePalette = void 0;
|
|
4
4
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
5
|
+
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
5
6
|
/** Exhaustive by construction: a new scheme that maps nowhere is a compile error. */
|
|
6
7
|
const scaleFor = (colors, scheme) => scheme === "primary" || scheme === "secondary" || scheme === "tertiary"
|
|
7
8
|
? colors[scheme]
|
|
8
9
|
: colors.semantic[scheme];
|
|
9
10
|
/** Resolve a chevron palette for a given color scheme from the theme. */
|
|
10
11
|
const resolveStagePalette = (theme, colorScheme = "primary") => {
|
|
11
|
-
const { gray
|
|
12
|
+
const { gray } = theme.colors;
|
|
12
13
|
const scale = scaleFor(theme.colors, colorScheme);
|
|
13
|
-
const
|
|
14
|
-
const
|
|
14
|
+
const solid = (0, filledSurface_1.resolveFilledSurface)(scale, theme.colors);
|
|
15
|
+
const strong = solid.fill;
|
|
16
|
+
const onStrong = solid.color;
|
|
15
17
|
const soft = scale[100];
|
|
16
18
|
// A fixed [700] fails AA against [100] for some hues (orange 3.30, borderline green 3.58) —
|
|
17
19
|
// walk the scale's own rungs against this specific tint instead.
|
|
@@ -21,7 +23,7 @@ const resolveStagePalette = (theme, colorScheme = "primary") => {
|
|
|
21
23
|
softText,
|
|
22
24
|
strong,
|
|
23
25
|
onStrong,
|
|
24
|
-
hover:
|
|
26
|
+
hover: solid.hoverFill,
|
|
25
27
|
muted: gray[100],
|
|
26
28
|
mutedText: gray[500],
|
|
27
29
|
};
|
|
@@ -34,7 +34,7 @@ const StepperStage = ({ label, number, state, size = "md", colorScheme = "primar
|
|
|
34
34
|
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { ref: ref, direction: "column", align: "center", flex: "1", minWidth: s.minW, flexShrink: 0, as: (interactive ? "button" : "div"), type: interactive ? "button" : undefined, "data-group": "", border: "none", bg: "transparent", cursor: interactive ? "pointer" : "default", opacity: disabled ? 0.55 : 1, onClick: interactive ? onClick : undefined, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", width: "100%", children: [line(leftDone, isFirst), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: s.circle, borderRadius: "full", flexShrink: 0, bg: circleBg, color: circleColor, border: "2px solid", borderColor: circleBorder, fontSize: s.font, fontWeight: 600, transition: "all 0.18s ease", "aria-current": state === "active" ? "step" : undefined, sx: state === "active"
|
|
35
35
|
? { boxShadow: `0 0 0 4px ${palette.soft}` }
|
|
36
36
|
: undefined, _groupHover: interactive
|
|
37
|
-
? { borderColor: palette.strong,
|
|
38
|
-
: undefined, children: showCheck && state === "completed" ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: s.icon }) : number }), line(rightDone, isLast)] }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 2, px: 1, fontSize: s.label, fontWeight: state === "active" ? 600 : 500, color: state === "upcoming" ? palette.mutedText : palette.softText, textAlign: "center", noOfLines: 2, _groupHover: interactive ? {
|
|
37
|
+
? { borderColor: palette.strong, bg: palette.strong, color: palette.onStrong }
|
|
38
|
+
: undefined, children: showCheck && state === "completed" ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: s.icon }) : number }), line(rightDone, isLast)] }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 2, px: 1, borderRadius: "sm", fontSize: s.label, fontWeight: state === "active" ? 600 : 500, color: state === "upcoming" ? palette.mutedText : palette.softText, textAlign: "center", noOfLines: 2, transition: "background 0.18s ease, color 0.18s ease", _groupHover: interactive ? { bg: palette.strong, color: palette.onStrong } : undefined, children: label })] }));
|
|
39
39
|
};
|
|
40
40
|
exports.default = StepperStage;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { SwitchProps } from "./SwitchProps";
|
|
2
|
+
/** Renders as clickable <li> items with no role or keyboard handling — mouse-only; not an accessible substitute for ToggleSwitch or SegmentedControl. */
|
|
2
3
|
export default function Switch({ leftText, rightText, leftIcon, rightIcon, onSwitchToggle, switchActive, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,7 @@ exports.default = Switch;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("@chakra-ui/react");
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
|
+
/** Renders as clickable <li> items with no role or keyboard handling — mouse-only; not an accessible substitute for ToggleSwitch or SegmentedControl. */
|
|
7
8
|
function Switch({ leftText, rightText, leftIcon, rightIcon, onSwitchToggle, switchActive, }) {
|
|
8
9
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
9
10
|
// Read the palette directly: it is already swapped for the active mode, so pairing the rungs
|