pixelize-design-library 2.4.2-beta.4 → 2.4.2-beta.40
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 +1087 -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 +16 -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/MenuPopoverContent.js +2 -2
- 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/MenuPopoverContent.js +2 -2
- 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,3 +1,4 @@
|
|
|
1
|
+
/** No `options` prop — typed text is validated as an email, not picked from a list; use `SearchSelect isMultiple`. */
|
|
1
2
|
export type MultiSelectProps = {
|
|
2
3
|
value: MultiSelctOPtions[];
|
|
3
4
|
onValueChange: (options: MultiSelctOPtions[]) => void;
|
|
@@ -17,6 +18,7 @@ export type MultiSelectProps = {
|
|
|
17
18
|
errorMessage?: string;
|
|
18
19
|
helperText?: string;
|
|
19
20
|
};
|
|
21
|
+
/** One entered chip — id is a generated key, label is the email text the user typed. */
|
|
20
22
|
export type MultiSelctOPtions = {
|
|
21
23
|
id: string;
|
|
22
24
|
label: string;
|
|
@@ -6,17 +6,16 @@ const react_1 = require("@chakra-ui/react");
|
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
7
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
8
8
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
9
|
+
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
9
10
|
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
10
11
|
const lucide_react_1 = require("lucide-react");
|
|
11
12
|
// Roomy enough to hover without aiming: the glyph is only 1.25rem.
|
|
12
13
|
const SIDEBAR_TOGGLE_HIT = "2.5rem";
|
|
13
14
|
function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, sideBarToggole, onSideBarToggole, forceSideBarToggle = false, onSideBarPeek, }) {
|
|
14
15
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const menuHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.primary[50], theme.colors.backgroundColor.light);
|
|
16
|
+
const rowBackgrounds = (0, rowStates_1.listRowBackgrounds)(theme.colors);
|
|
17
|
+
const menuHoverBg = rowBackgrounds.active;
|
|
18
18
|
const barHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[100], theme.colors.backgroundColor.light);
|
|
19
|
-
const menuHoverInk = (0, accentText_1.accentTextOnCanvas)(theme.colors.primary, menuHoverBg);
|
|
20
19
|
const dangerTone = (0, statusTone_1.resolveStatusTone)(theme.colors.semantic.error, (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main) ? "dark" : "light");
|
|
21
20
|
// Shared rounded pill affordance for the bar's icon controls.
|
|
22
21
|
const iconButtonStyle = {
|
|
@@ -44,21 +43,21 @@ function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavO
|
|
|
44
43
|
color: theme.colors.text[900],
|
|
45
44
|
gap: theme.space["2"],
|
|
46
45
|
transition: "background 0.12s",
|
|
47
|
-
_hover: { bg: menuHoverBg
|
|
48
|
-
_focus: { bg: menuHoverBg
|
|
49
|
-
_active: { bg:
|
|
46
|
+
_hover: { bg: menuHoverBg },
|
|
47
|
+
_focus: { bg: menuHoverBg },
|
|
48
|
+
_active: { bg: rowBackgrounds.selectedActive },
|
|
50
49
|
};
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", gap: 1.5, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && ((0, jsx_runtime_1.jsx)(react_1.Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }))] }), (0, jsx_runtime_1.jsx)(react_1.Flex, { minW: 0, flexShrink: 1, children: (0, jsx_runtime_1.jsxs)(react_1.Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), (0, jsx_runtime_1.jsxs)(react_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_1.MenuButton, { as: react_1.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "sm", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsx)(react_1.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
|
|
52
51
|
// Without a cap one long title stretches the whole dropdown; titles truncate instead.
|
|
53
52
|
maxW: "18rem", bg: theme.colors.backgroundColor.light,
|
|
54
53
|
// Chakra's MenuItem renders `background: var(--menu-bg)` at rest; its MenuList
|
|
55
54
|
// baseStyle hardcodes that var to "#fff" (gated behind `_dark`, which this theme-swap
|
|
56
55
|
// app never triggers). The `bg` prop above only recolors the list itself, not the
|
|
57
56
|
// inherited var, so items fall back to white until hover/focus — set the var too.
|
|
58
|
-
sx: { "--menu-bg": theme.colors.backgroundColor.light },
|
|
57
|
+
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [(0, jsx_runtime_1.jsx)(react_1.Center, { pt: 4, pb: 2, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "xl", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsxs)(react_1.Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
|
|
59
58
|
var _a, _b, _c, _d;
|
|
60
59
|
return ((0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), (0, jsx_runtime_1.jsx)(react_1.Box, { minW: 0, isTruncated: true, title: String((_a = menu.title) !== null && _a !== void 0 ? _a : ""), children: menu.title })] }, `${String((_d = (_c = (_b = menu.id) !== null && _b !== void 0 ? _b : menu.url) !== null && _c !== void 0 ? _c : menu.title) !== null && _d !== void 0 ? _d : idx)}-${idx}`));
|
|
61
|
-
}) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.
|
|
60
|
+
}) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: handleLogout, sx: {
|
|
62
61
|
...menuItemStyle,
|
|
63
62
|
color: theme.colors.semanticText.error,
|
|
64
63
|
_hover: { bg: dangerTone.bg, color: dangerTone.fg },
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
/** Props for the top navbar — user menu, nav items, and the toggle/peek affordances shared with SideBar. */
|
|
2
3
|
export type NavbarProps = {
|
|
4
|
+
/** Prop name is spelled exactly this way ("Avathar") — not a typo to correct at the call site. */
|
|
3
5
|
userAvathar?: string;
|
|
4
6
|
userName: string;
|
|
5
7
|
userRole?: string;
|
|
@@ -27,6 +29,7 @@ export type NavbarProps = {
|
|
|
27
29
|
*/
|
|
28
30
|
onSideBarPeek?: () => void;
|
|
29
31
|
};
|
|
32
|
+
/** One navMenu entry (id/title/url/icon) — unrelated to Chakra's own MenuProps despite the shared name. */
|
|
30
33
|
export type MenuProps = {
|
|
31
34
|
id?: string | number;
|
|
32
35
|
title: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { NoteTextAreaProps } from "./NoteTextAreaProps";
|
|
2
|
+
/** Self-contained note composer (optional title + textarea + Save); its `ref` only ever reaches the title input, never the primary textarea. */
|
|
2
3
|
export default function NoteTextArea({ width, handleSubmit, handleCancel, value, title, file, isEditable, saveButtonLoading, maxFileSize, maxFilesSizeError, maxNoteWordCount, onChange, ref: inputRef, customPlaceholder, cancelButtonHide, }: NoteTextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,6 +6,8 @@ const react_1 = require("react");
|
|
|
6
6
|
const react_2 = require("@chakra-ui/react");
|
|
7
7
|
const lucide_react_1 = require("lucide-react");
|
|
8
8
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
9
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
10
|
+
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
9
11
|
const fieldStyles_1 = require("../Common/fieldStyles");
|
|
10
12
|
const countWords = (text = "") => {
|
|
11
13
|
const t = text.trim();
|
|
@@ -13,6 +15,7 @@ const countWords = (text = "") => {
|
|
|
13
15
|
return 0;
|
|
14
16
|
return t.split(/\s+/).length;
|
|
15
17
|
};
|
|
18
|
+
/** Self-contained note composer (optional title + textarea + Save); its `ref` only ever reaches the title input, never the primary textarea. */
|
|
16
19
|
function NoteTextArea({ width = "100%", handleSubmit, handleCancel, value, title, file, isEditable = false, saveButtonLoading, maxFileSize = 1 * 1024 * 1024, maxFilesSizeError = "Some files are too large. Maximum allowed size is", maxNoteWordCount = 15, onChange, ref: inputRef, customPlaceholder = "Add a note...", cancelButtonHide = false, }) {
|
|
17
20
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
18
21
|
const noteAreaRef = (0, react_1.useRef)(null);
|
|
@@ -117,14 +120,17 @@ function NoteTextArea({ width = "100%", handleSubmit, handleCancel, value, title
|
|
|
117
120
|
};
|
|
118
121
|
const noteWordCount = countWords(noteValue);
|
|
119
122
|
const isOverLimit = noteWordCount > maxNoteWordCount;
|
|
120
|
-
|
|
123
|
+
const collapsedHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[50], theme.colors.background[50]);
|
|
124
|
+
const activeControlHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[100], theme.colors.gray[50]);
|
|
125
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { w: width, borderRadius: fieldStyles_1.FIELD_RADIUS, overflow: "hidden", border: "1px solid", borderColor: isActive ? theme.colors.primary[500] : theme.colors.boxborder[500], bg: isActive ? theme.colors.gray[50] : theme.colors.background[50], transition: "border-color 0.2s", children: [!isActive && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 3, gap: 2, align: "center", cursor: "text", onClick: handleTextArea, bg: theme.colors.background[50], borderRadius: fieldStyles_1.FIELD_RADIUS, minH: "2.5rem", transition: "background 0.15s", _hover: { bg: collapsedHoverBg }, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.SquarePen, { size: 16, color: theme.colors.textMuted }), (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", children: customPlaceholder })] })), isActive && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { bg: theme.colors.background[50], children: [titleShow && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Input, { ref: inputRef, value: titleValue, onChange: (e) => {
|
|
121
126
|
if (e.target.value.length === 0)
|
|
122
127
|
setTitleShow(false);
|
|
123
128
|
setTitleValue(e.target.value);
|
|
124
129
|
}, placeholder: "Add a title...", variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "0.875rem", color: theme.colors.text[700], _placeholder: {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
131
|
+
} }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: (0, jsx_runtime_1.jsx)(react_2.Textarea, { ref: noteAreaRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: {
|
|
132
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
133
|
+
}, style: { overflow: "hidden" }, p: 0 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { px: 3, py: 2.5, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "label", htmlFor: "file-upload", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: "background 0.15s", _hover: { bg: activeControlHoverBg }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Paperclip, { size: 16 }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: "background 0.15s", _hover: { bg: activeControlHoverBg }, children: "+ Add a title" })) : ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), (0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), (0, jsx_runtime_1.jsx)("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
|
|
128
134
|
const newFiles = Array.from(e.target.files || []);
|
|
129
135
|
const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
|
|
130
136
|
const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LegacyRef } from "react";
|
|
2
|
+
/** Plain Chakra Textarea + title + file attach, not a rich text editor — no formatting toolbar despite the "note" naming. Use Editor for HTML content. */
|
|
2
3
|
export type NoteTextAreaProps = {
|
|
3
4
|
width?: number | string;
|
|
4
5
|
handleSubmit: (noteValue: string, titleValue: string, file: File[], resetState: void) => void;
|
|
@@ -7,6 +8,7 @@ export type NoteTextAreaProps = {
|
|
|
7
8
|
file?: File[];
|
|
8
9
|
isEditable?: boolean;
|
|
9
10
|
handleCancel?: (isActive: boolean) => void;
|
|
11
|
+
/** Any transition to false while isEditable is not true clears the note, title and files — including after a failed save, not just success. */
|
|
10
12
|
saveButtonLoading?: boolean;
|
|
11
13
|
maxFileSize?: number;
|
|
12
14
|
maxFilesSizeError?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { NotificationProps } from "./NotificationProps";
|
|
2
|
+
/** Self-contained event/task card with its own loading skeleton — not the app's toast/alert system; for status messages use Toaster (overlays). */
|
|
2
3
|
declare const Notification: ({ notification, onClose, showStatus, onClick, isLoading, colors, }: NotificationProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default Notification;
|
|
@@ -7,6 +7,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
7
7
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
8
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
9
9
|
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
10
|
+
/** Self-contained event/task card with its own loading skeleton — not the app's toast/alert system; for status messages use Toaster (overlays). */
|
|
10
11
|
const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
|
|
11
12
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12
13
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** The event/task/call record a Notification card renders; startDate/dueDate/endDate drive its countdown text. */
|
|
1
2
|
export type NotificationData = {
|
|
2
3
|
id: number;
|
|
3
4
|
title: string;
|
|
@@ -7,22 +8,27 @@ export type NotificationData = {
|
|
|
7
8
|
endDate?: string;
|
|
8
9
|
host?: string;
|
|
9
10
|
description?: string;
|
|
11
|
+
/** Accepted but never read by Notification — the status dot's color comes from date math (dueDate/endDate), not this field. */
|
|
10
12
|
status?: string;
|
|
11
13
|
type: "task" | "meeting" | "call";
|
|
12
14
|
};
|
|
15
|
+
/** Wraps a NotificationData record with the click/close handlers and optional color overrides that render it. */
|
|
13
16
|
export type NotificationProps = {
|
|
14
17
|
notification: NotificationData;
|
|
15
18
|
onClose?: () => void;
|
|
16
19
|
showStatus?: boolean;
|
|
20
|
+
/** Fires only when the title text is clicked — the avatar, description and card body are not clickable. */
|
|
17
21
|
onClick?: (id: number, type: "task" | "meeting" | "call") => void;
|
|
18
22
|
isLoading?: boolean;
|
|
19
23
|
colors?: NotificationColor;
|
|
20
24
|
};
|
|
25
|
+
/** Optional per-card palette override for Notification; any field left unset falls back to theme tokens. */
|
|
21
26
|
export type NotificationColor = {
|
|
22
27
|
bgColor?: string;
|
|
23
28
|
borderColor?: string;
|
|
24
29
|
textColor?: string;
|
|
25
30
|
titleColor?: string;
|
|
31
|
+
/** warningColor/errorColor/successColor only paint the status dot, and only when showStatus is true — otherwise inert. */
|
|
26
32
|
warningColor?: string;
|
|
27
33
|
errorColor?: string;
|
|
28
34
|
successColor?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Labelled numeric field; unlike most fields here, `isRequired` propagates natively via `FormControl`, not just the label asterisk. */
|
|
1
2
|
declare const NumberInput: import("react").ForwardRefExoticComponent<Pick<import("@chakra-ui/react").NumberInputProps, "maxW" | "defaultValue" | "onBlur" | "onChange" | "size" | "max" | "min" | "step" | "name" | "value" | "precision" | "clampValueOnBlur" | "keepWithinRange" | "allowMouseWheel"> & {
|
|
2
3
|
NumberIncrementStepperBg?: string;
|
|
3
4
|
NumberIncrementStepperActive?: import("./NumberInputProps").ActiveStyle;
|
|
@@ -4,7 +4,10 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const react_2 = require("react");
|
|
6
6
|
const FormLabel_1 = require("../Common/FormLabel");
|
|
7
|
+
/** Labelled numeric field; unlike most fields here, `isRequired` propagates natively via `FormControl`, not just the label asterisk. */
|
|
7
8
|
const NumberInput = (0, react_2.forwardRef)(function NumberInput({ defaultValue, min, max, precision, step, clampValueOnBlur, keepWithinRange, value, onChange, onBlur, name, size, maxW, allowMouseWheel, NumberIncrementStepperBg, NumberIncrementStepperActive, NumberIncrementStepperChildren, NumberDecrementStepperBg, NumberDecrementStepperChildren, NumberDecrementStepperActive, label, isInformation, informationMessage, isRequired, id, width = "100%", minW, ...props }, ref) {
|
|
8
|
-
|
|
9
|
+
const generatedId = (0, react_2.useId)();
|
|
10
|
+
const resolvedId = id !== null && id !== void 0 ? id : generatedId;
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.FormControl, { w: width, minW: minW, maxW: maxW, id: resolvedId, isRequired: isRequired, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: resolvedId, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_1.NumberInput, { defaultValue: defaultValue, min: min, max: max, step: step, precision: precision, clampValueOnBlur: clampValueOnBlur, keepWithinRange: keepWithinRange, value: value, onChange: onChange, onBlur: onBlur, name: name, size: size, maxW: maxW, allowMouseWheel: allowMouseWheel, ...props, children: [(0, jsx_runtime_1.jsx)(react_1.NumberInputField, { ref: ref }), (0, jsx_runtime_1.jsxs)(react_1.NumberInputStepper, { children: [(0, jsx_runtime_1.jsx)(react_1.NumberIncrementStepper, { bg: NumberIncrementStepperBg, _active: NumberIncrementStepperActive, children: NumberIncrementStepperChildren }), (0, jsx_runtime_1.jsx)(react_1.NumberDecrementStepper, { bg: NumberDecrementStepperBg, _active: NumberDecrementStepperActive, children: NumberDecrementStepperChildren })] })] })] }));
|
|
9
12
|
});
|
|
10
13
|
exports.default = NumberInput;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NumberInput = void 0;
|
|
4
|
+
const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
4
5
|
exports.NumberInput = {
|
|
5
|
-
baseStyle: {
|
|
6
|
+
baseStyle: ({ theme }) => ({
|
|
6
7
|
field: {
|
|
7
8
|
fontWeight: 500,
|
|
8
9
|
fontSize: "0.875rem",
|
|
@@ -12,10 +13,10 @@ exports.NumberInput = {
|
|
|
12
13
|
borderRadius: "lg",
|
|
13
14
|
transition: "border-color 0.2s, box-shadow 0.2s",
|
|
14
15
|
_placeholder: {
|
|
15
|
-
|
|
16
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
16
17
|
},
|
|
17
18
|
},
|
|
18
|
-
},
|
|
19
|
+
}),
|
|
19
20
|
sizes: {
|
|
20
21
|
md: {
|
|
21
22
|
field: {
|
|
@@ -34,11 +35,11 @@ exports.NumberInput = {
|
|
|
34
35
|
const primary = theme.colors.primary[500];
|
|
35
36
|
return {
|
|
36
37
|
field: {
|
|
37
|
-
bg: theme.colors.
|
|
38
|
+
bg: theme.colors.background[50],
|
|
38
39
|
border: "0.063rem solid",
|
|
39
40
|
borderColor,
|
|
40
41
|
_placeholder: {
|
|
41
|
-
color: theme.colors
|
|
42
|
+
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
42
43
|
},
|
|
43
44
|
_hover: {
|
|
44
45
|
borderColor: primary,
|
|
@@ -68,7 +69,7 @@ exports.NumberInput = {
|
|
|
68
69
|
boxShadow: 'inherit',
|
|
69
70
|
},
|
|
70
71
|
_disabled: {
|
|
71
|
-
bg: theme.colors.
|
|
72
|
+
bg: theme.colors.background[100],
|
|
72
73
|
opacity: 1,
|
|
73
74
|
cursor: "not-allowed",
|
|
74
75
|
_hover: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { NumberInputProps as chakraNumbetInpurProps } from "@chakra-ui/react";
|
|
2
|
+
/** Picks a safe subset of Chakra's NumberInput props and adds label/stepper-color props of its own. */
|
|
2
3
|
export type NumberInputProps = Pick<chakraNumbetInpurProps, "defaultValue" | "min" | "max" | "precision" | "step" | "clampValueOnBlur" | "keepWithinRange" | "value" | "onChange" | "size" | "maxW" | "allowMouseWheel" | "onBlur" | "name"> & {
|
|
4
|
+
/** NumberIncrementStepperChildren/NumberDecrementStepperChildren accept only a string, not an icon — omit them to keep Chakra's default chevrons. */
|
|
3
5
|
NumberIncrementStepperBg?: string;
|
|
4
6
|
NumberIncrementStepperActive?: ActiveStyle;
|
|
5
7
|
NumberIncrementStepperChildren?: string;
|
|
@@ -15,6 +17,7 @@ export type NumberInputProps = Pick<chakraNumbetInpurProps, "defaultValue" | "mi
|
|
|
15
17
|
minW?: string;
|
|
16
18
|
maxW?: string;
|
|
17
19
|
};
|
|
20
|
+
/** Background applied to a stepper button's `_active` (pressed) state. */
|
|
18
21
|
export type ActiveStyle = {
|
|
19
22
|
bg: string;
|
|
20
23
|
};
|
|
@@ -8,6 +8,8 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
8
8
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
9
9
|
const chartColorsFromTheme_1 = require("../../Theme/tokens/builders/chartColorsFromTheme");
|
|
10
10
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
11
|
+
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
12
|
+
const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
|
|
11
13
|
const OrgSwitcherProps_1 = require("./OrgSwitcherProps");
|
|
12
14
|
const sizeMap = {
|
|
13
15
|
sm: { h: "32px", avatar: "22px", font: "0.8rem", sub: "0.65rem", px: 2 },
|
|
@@ -25,8 +27,14 @@ const Avatar = ({ org, boxSize, fontSize, }) => {
|
|
|
25
27
|
const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSearchable, searchThreshold = 6, triggerVariant = "ghost", size = "md", maxWidth = "200px", menuMinWidth = "280px", placeholder = "Select organization", ariaLabel = "Switch organization", showRole = true, }) => {
|
|
26
28
|
var _a;
|
|
27
29
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
30
|
+
const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(theme.colors), [theme.colors]);
|
|
28
31
|
const s = sizeMap[size];
|
|
29
32
|
const { isOpen, onOpen, onClose } = (0, react_2.useDisclosure)();
|
|
33
|
+
const requestExclusiveOpen = (0, useExclusiveOverlay_1.useExclusiveOverlay)(isOpen, onClose);
|
|
34
|
+
const handlePopoverOpen = () => {
|
|
35
|
+
requestExclusiveOpen();
|
|
36
|
+
onOpen();
|
|
37
|
+
};
|
|
30
38
|
const [query, setQuery] = (0, react_1.useState)("");
|
|
31
39
|
const searchRef = (0, react_1.useRef)(null);
|
|
32
40
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(0);
|
|
@@ -71,7 +79,7 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
71
79
|
const triggerStyles = triggerVariant === "outline"
|
|
72
80
|
? { border: "1px solid", borderColor: theme.colors.boxborder[500], bg: theme.colors.background[50] }
|
|
73
81
|
: triggerVariant === "subtle"
|
|
74
|
-
? { bg: theme.colors.
|
|
82
|
+
? { bg: theme.colors.background[50] }
|
|
75
83
|
: { bg: "transparent" };
|
|
76
84
|
// `gray[100]` hover on a "transparent" trigger reads against whatever's actually behind it —
|
|
77
85
|
// this control lives in a navbar-like shell, so `backgroundColor.light` is that surface. For a
|
|
@@ -84,7 +92,7 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
84
92
|
if (org.id !== value)
|
|
85
93
|
onChange(org.id, org);
|
|
86
94
|
};
|
|
87
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen:
|
|
95
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onOpen: handlePopoverOpen, onClose: () => {
|
|
88
96
|
onClose();
|
|
89
97
|
setQuery("");
|
|
90
98
|
}, placement: "bottom-start", initialFocusRef: showSearch ? searchRef : firstOptionRef, isLazy: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", "aria-label": ariaLabel, align: "center", gap: s.px === 2 ? "8px" : "10px", h: s.h, px: s.px, borderRadius: "lg", cursor: isLoading ? "default" : "pointer", opacity: isLoading ? 0.6 : 1, pointerEvents: isLoading ? "none" : "auto", transition: "background 0.15s ease", _hover: { bg: triggerVariant === "ghost" ? triggerHoverBg : undefined }, ...triggerStyles, children: [selected ? ((0, jsx_runtime_1.jsx)(Avatar, { org: selected, boxSize: s.avatar, fontSize: s.sub })) : ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: s.avatar, borderRadius: "lg", bg: theme.colors.gray[100], color: (0, accentText_1.accentTextOnCanvas)(theme.colors.gray, theme.colors.gray[100]), flexShrink: 0, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 14 }) })), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: 600, color: theme.colors.gray[700], maxW: maxWidth, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", textAlign: "left", children: (_a = selected === null || selected === void 0 ? void 0 : selected.name) !== null && _a !== void 0 ? _a : placeholder }), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "1.5px", color: theme.colors.accentText, flexShrink: 0 })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.ChevronsUpDown, size: 16, color: theme.colors.textMuted, flexShrink: 0 }))] }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { minW: menuMinWidth, w: "auto",
|
|
@@ -99,18 +107,14 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
|
|
|
99
107
|
}
|
|
100
108
|
}, borderRadius: "lg" })] }) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { role: "listbox", "aria-label": "Organizations", maxH: "320px", overflowY: "auto", py: 1, onKeyDown: handleListKeyDown, children: [filtered.map((org, idx) => {
|
|
101
109
|
const isActive = org.id === value;
|
|
102
|
-
// Active row's hover repeated its own resting `primary[50]` fill — a zero-delta
|
|
103
|
-
// hover, invisible by construction. `resolveHoverTint` walks a fill away from a
|
|
104
|
-
// backdrop until distinguishable, so handing it its own resting bg as the backdrop
|
|
105
|
-
// is enough to make hover read as a real state change on both active and inactive rows.
|
|
106
110
|
const rowHoverBg = isActive
|
|
107
|
-
?
|
|
108
|
-
:
|
|
111
|
+
? rowBackgrounds.selectedActive
|
|
112
|
+
: rowBackgrounds.active;
|
|
109
113
|
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", role: "option", "aria-selected": isActive, ref: (el) => {
|
|
110
114
|
optionRefs.current[idx] = el;
|
|
111
115
|
if (idx === 0)
|
|
112
116
|
firstOptionRef.current = el;
|
|
113
|
-
}, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "100%", textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, cursor: "pointer", bg: isActive ?
|
|
114
|
-
}), filtered.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: theme.colors.
|
|
117
|
+
}, tabIndex: idx === activeIndex ? 0 : -1, align: "center", gap: "10px", w: "100%", textAlign: "left", border: "none", fontFamily: "inherit", px: 3, py: 2, cursor: "pointer", bg: isActive ? rowBackgrounds.selected : "transparent", transition: "background 0.12s ease", _hover: { bg: rowHoverBg }, onClick: () => handleSelect(org), children: [(0, jsx_runtime_1.jsx)(Avatar, { org: org, boxSize: s.avatar, fontSize: s.sub }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.font, fontWeight: isActive ? 600 : 500, color: theme.colors.text[900], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.name }), showRole && org.role && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: s.sub, color: theme.colors.text[500], overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", children: org.role }))] }), isActive && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: lucide_react_1.Check, size: 16, color: theme.colors.accentText, flexShrink: 0 }))] }, org.id));
|
|
118
|
+
}), filtered.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: theme.colors.textMuted, textAlign: "center", py: 6, children: "No organizations found" }))] })] }) })] }));
|
|
115
119
|
};
|
|
116
120
|
exports.default = OrgSwitcher;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ChartMode } from "../../Theme/tokens/builders/chartColorsFromTheme";
|
|
2
|
+
/** One organization in the switcher's list; `id` is matched against `value` to find the active one. */
|
|
2
3
|
export interface OrgOption {
|
|
3
4
|
id: string | number;
|
|
4
5
|
/** Organization display name. */
|
|
@@ -8,13 +9,15 @@ export interface OrgOption {
|
|
|
8
9
|
/** Optional logo image URL. Falls back to an initial-based avatar. */
|
|
9
10
|
logoUrl?: string;
|
|
10
11
|
}
|
|
12
|
+
/** Trigger size; looked up in a fixed sizeMap for height, avatar and font sizing. */
|
|
11
13
|
export type OrgSwitcherSize = "sm" | "md" | "lg";
|
|
14
|
+
/** Session-scoped org switcher (trigger+popover) — not an admin screen; see OrganizationDetails for create/rename/delete/default. Closed prop list, no ...rest/ref on the trigger button. */
|
|
12
15
|
export interface OrgSwitcherProps {
|
|
13
16
|
/** Organizations to choose from. */
|
|
14
17
|
organizations: OrgOption[];
|
|
15
18
|
/** id of the currently active organization. */
|
|
16
19
|
value?: string | number;
|
|
17
|
-
/**
|
|
20
|
+
/** Not fired when the clicked org already matches value — only on an actual change. */
|
|
18
21
|
onChange: (id: string | number, org: OrgOption) => void;
|
|
19
22
|
/** Shows an inline spinner and disables interaction (e.g. while switching). */
|
|
20
23
|
isLoading?: boolean;
|
|
@@ -24,6 +27,7 @@ export interface OrgSwitcherProps {
|
|
|
24
27
|
searchThreshold?: number;
|
|
25
28
|
/** Trigger styling. "ghost" suits a navbar; "outline"/"subtle" for forms. */
|
|
26
29
|
triggerVariant?: "ghost" | "outline" | "subtle";
|
|
30
|
+
/** Default "md". */
|
|
27
31
|
size?: OrgSwitcherSize;
|
|
28
32
|
/** Max width of the trigger label before truncation. */
|
|
29
33
|
maxWidth?: string;
|
|
@@ -39,6 +43,7 @@ export interface OrgSwitcherProps {
|
|
|
39
43
|
export declare const AVATAR_COLORS: readonly string[];
|
|
40
44
|
/** Chart hues are tuned to sit apart from each other, not to carry a label. */
|
|
41
45
|
export declare const AVATAR_INK = "#ffffff";
|
|
46
|
+
/** Deterministic hash of the name, not random or brand-derived — same org name always gets the same fixed-palette color. */
|
|
42
47
|
export declare const avatarColor: (seed: string, mode?: ChartMode) => string;
|
|
43
48
|
/**
|
|
44
49
|
* Fallback-avatar initials, up to 2 characters. A single letter reads well for one
|
|
@@ -9,6 +9,7 @@ exports.AVATAR_COLORS = [
|
|
|
9
9
|
];
|
|
10
10
|
/** Chart hues are tuned to sit apart from each other, not to carry a label. */
|
|
11
11
|
exports.AVATAR_INK = "#ffffff";
|
|
12
|
+
/** Deterministic hash of the name, not random or brand-derived — same org name always gets the same fixed-palette color. */
|
|
12
13
|
const avatarColor = (seed, mode = "light") => {
|
|
13
14
|
let hash = 0;
|
|
14
15
|
for (let i = 0; i < seed.length; i += 1) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OrganizationDetailsProps } from "./OrganizationDetailsProps";
|
|
3
|
+
/** Admin panel for the org list — rename/delete/create/invites/default; not a session switcher. */
|
|
3
4
|
declare const OrganizationDetails: React.FC<OrganizationDetailsProps>;
|
|
4
5
|
export default OrganizationDetails;
|
|
@@ -9,6 +9,7 @@ const react_2 = require("@chakra-ui/react");
|
|
|
9
9
|
const lucide_react_1 = require("lucide-react");
|
|
10
10
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
11
11
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
12
|
+
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
12
13
|
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
13
14
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
14
15
|
const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
|
|
@@ -52,6 +53,7 @@ const DEFAULT_LABELS = {
|
|
|
52
53
|
copyright: "Pixelize Corp. All rights reserved.",
|
|
53
54
|
termsOfService: "Terms of Service",
|
|
54
55
|
};
|
|
56
|
+
/** Admin panel for the org list — rename/delete/create/invites/default; not a session switcher. */
|
|
55
57
|
const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoading = false, switchingOrgIds = [], respondingOrgIds = [], editingOrgIds = [], isCreating = false, userName, userAvatarUrl, onSetDefault, onAcceptInvite, onDeclineInvite, onDeleteOrganization, onDeleteRequest, onCreateOrganization, onEditOrganization, onBack, footerSlot, labels: labelOverrides, }) => {
|
|
56
58
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
57
59
|
const labels = (0, react_1.useMemo)(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
|
|
@@ -72,7 +74,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
|
|
|
72
74
|
const pageBg = colors.backgroundColor.main;
|
|
73
75
|
const primary50 = colors.primary[50];
|
|
74
76
|
const primary100 = colors.primary[100];
|
|
75
|
-
const
|
|
77
|
+
const primarySolid = (0, filledSurface_1.resolveFilledSurface)(colors.primary, colors);
|
|
76
78
|
const onPrimary50 = (0, accentText_1.accentTextOnCanvas)(colors.primary, colors.primary[50]);
|
|
77
79
|
const cardSx = {
|
|
78
80
|
backgroundColor: surface,
|
|
@@ -158,7 +160,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
|
|
|
158
160
|
width: "100%",
|
|
159
161
|
};
|
|
160
162
|
const hasOrganizations = activeOrganizations.length > 0 || invitedOrganizations.length > 0;
|
|
161
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg:
|
|
163
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primarySolid.fill, color: primarySolid.color, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
|
|
162
164
|
? `${labels.greeting.replace(/User!?/, "")}${userName}!`.trim()
|
|
163
165
|
: labels.greeting }), (0, jsx_runtime_1.jsx)(react_2.Avatar, { size: "xs", name: userName, src: userAvatarUrl })] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...cardSx, p: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 16, color: colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { size: 16, color: colors.semanticText.warning }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, (0, jsx_runtime_1.jsx)(CreateOrgModal_1.default, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
|
|
164
166
|
await (onCreateOrganization === null || onCreateOrganization === void 0 ? void 0 : onCreateOrganization(values));
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
/** One organization row — active or invited — rendered as a card in OrganizationDetails' grid. */
|
|
2
3
|
export type OrganizationItem = {
|
|
3
4
|
orgId: number;
|
|
4
5
|
company_name: string;
|
|
5
6
|
company_url?: string;
|
|
6
7
|
/** 1 when this org is the user's default org. */
|
|
7
8
|
default: number;
|
|
8
|
-
/**
|
|
9
|
+
/** Not read by OrganizationDetails — active vs. invited comes from which array the item is placed in. */
|
|
9
10
|
uiInvite: number;
|
|
10
|
-
/**
|
|
11
|
+
/** Distinct from `default` above — only gates delete-protection, not the Default badge/set-default flow. */
|
|
11
12
|
defaultOrg: number;
|
|
12
13
|
roleName?: string;
|
|
13
14
|
/** True when the current user owns this org; the app computes ownership. */
|
|
14
15
|
isOwner?: boolean;
|
|
15
|
-
/** Overrides the role-name check for
|
|
16
|
+
/** Overrides the role-name check for rename; omitted, defaults to roleName === "Super Admin". */
|
|
16
17
|
canRename?: boolean;
|
|
17
|
-
/**
|
|
18
|
+
/** Same default-if-omitted as canRename; defaultOrg === 1 still blocks delete regardless. */
|
|
18
19
|
canDelete?: boolean;
|
|
19
20
|
/**
|
|
20
21
|
* Why delete is unavailable for this organization, shown on the disabled
|
|
@@ -22,13 +23,16 @@ export type OrganizationItem = {
|
|
|
22
23
|
*/
|
|
23
24
|
deleteDisabledReason?: string;
|
|
24
25
|
};
|
|
26
|
+
/** Local form state for CreateOrgModal — the shape onSubmit receives when the create form is confirmed. */
|
|
25
27
|
export type CreateOrgFormValues = {
|
|
26
28
|
company_name: string;
|
|
27
29
|
company_address: string;
|
|
28
30
|
phone?: string;
|
|
31
|
+
/** Never populated by the built-in CreateOrgModal — dead unless your own submit handler sets it. */
|
|
29
32
|
default?: number;
|
|
30
33
|
defaultOrg?: number;
|
|
31
34
|
};
|
|
35
|
+
/** All copy in OrganizationDetails is overridable here; unset fields fall back to its built-in DEFAULT_LABELS. */
|
|
32
36
|
export type OrganizationDetailsLabels = {
|
|
33
37
|
greeting?: string;
|
|
34
38
|
manageSubtitle?: string;
|
|
@@ -66,11 +70,13 @@ export type OrganizationDetailsLabels = {
|
|
|
66
70
|
copyright?: string;
|
|
67
71
|
termsOfService?: string;
|
|
68
72
|
};
|
|
73
|
+
/** Payload for the public onCreateOrganization callback — company_address/phone optional here, unlike CreateOrgFormValues. */
|
|
69
74
|
export interface CreateOrganizationValues {
|
|
70
75
|
company_name: string;
|
|
71
76
|
company_address?: string;
|
|
72
77
|
phone?: string;
|
|
73
78
|
}
|
|
79
|
+
/** Admin panel for the org list — rename/delete/create/invites/default; not a session switcher (see OrgSwitcher for picking the active org). */
|
|
74
80
|
export interface OrganizationDetailsProps {
|
|
75
81
|
activeOrganizations: OrganizationItem[];
|
|
76
82
|
invitedOrganizations: OrganizationItem[];
|
|
@@ -84,7 +90,9 @@ export interface OrganizationDetailsProps {
|
|
|
84
90
|
editingOrgIds?: number[];
|
|
85
91
|
userName?: string;
|
|
86
92
|
userAvatarUrl?: string;
|
|
93
|
+
/** Not awaited internally despite the Promise signature — drive switchingOrgIds yourself. */
|
|
87
94
|
onSetDefault?: (orgId: number) => void | Promise<void>;
|
|
95
|
+
/** Same as onSetDefault — not awaited internally; respondingOrgIds is entirely consumer-managed. */
|
|
88
96
|
onAcceptInvite?: (orgId: number) => void | Promise<void>;
|
|
89
97
|
onDeclineInvite?: (orgId: number) => void | Promise<void>;
|
|
90
98
|
/**
|
|
@@ -98,13 +106,16 @@ export interface OrganizationDetailsProps {
|
|
|
98
106
|
* both the modal and `onDeleteOrganization`; omit it to keep the built-in flow.
|
|
99
107
|
*/
|
|
100
108
|
onDeleteRequest?: (orgId: number) => void | Promise<void>;
|
|
109
|
+
/** Rejecting/throwing here leaves the modal open with no built-in error UI — same for onDeleteOrganization/onEditOrganization; show your own toast. */
|
|
101
110
|
onCreateOrganization?: (values: CreateOrganizationValues) => void | Promise<void>;
|
|
102
111
|
/** Called when the user confirms a new name for an organization */
|
|
103
112
|
onEditOrganization?: (orgId: number, newName: string) => void | Promise<void>;
|
|
113
|
+
/** Back icon renders only when this is provided, not merely disabled when omitted. */
|
|
104
114
|
onBack?: () => void;
|
|
105
115
|
footerSlot?: ReactNode;
|
|
106
116
|
labels?: OrganizationDetailsLabels;
|
|
107
117
|
}
|
|
118
|
+
/** Props for the internal create-org modal; `labels` needs only the subset of OrganizationDetailsLabels it renders. */
|
|
108
119
|
export interface CreateOrgModalProps {
|
|
109
120
|
isOpen: boolean;
|
|
110
121
|
onClose: () => void;
|
|
@@ -112,6 +123,7 @@ export interface CreateOrgModalProps {
|
|
|
112
123
|
onSubmit: (values: CreateOrgFormValues) => void | Promise<void>;
|
|
113
124
|
labels: Required<Pick<OrganizationDetailsLabels, "createOrganization" | "companyName" | "companyAddress" | "phone" | "cancel" | "submit" | "requiredField" | "invalidPhone">>;
|
|
114
125
|
}
|
|
126
|
+
/** Props for the internal delete-confirm modal; same narrowed-labels pattern as CreateOrgModalProps. */
|
|
115
127
|
export interface DeleteOrgModalProps {
|
|
116
128
|
isOpen: boolean;
|
|
117
129
|
onClose: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface PdfViewerProps {
|
|
3
|
-
/**
|
|
3
|
+
/** Rendered via a native browser <embed> — no fallback UI if the browser can't show PDFs inline. */
|
|
4
4
|
pdfUrl: string;
|
|
5
5
|
/** File name shown in the toolbar. */
|
|
6
6
|
fileName?: string;
|
|
@@ -11,5 +11,6 @@ export interface PdfViewerProps {
|
|
|
11
11
|
/** Border radius of the frame. */
|
|
12
12
|
borderRadius?: string;
|
|
13
13
|
}
|
|
14
|
+
/** Always-inline PDF embed panel (never a modal) — for a modal previewer of images/video/other too, use FilePreview. */
|
|
14
15
|
declare const PdfViewer: React.FC<PdfViewerProps>;
|
|
15
16
|
export default PdfViewer;
|