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
|
@@ -43,6 +43,7 @@ const lucide_react_1 = require("lucide-react");
|
|
|
43
43
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
44
44
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
45
45
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
46
|
+
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
46
47
|
const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
|
|
47
48
|
const AddUserModal_1 = __importDefault(require("./AddUserModal"));
|
|
48
49
|
const ChangeRoleModal_1 = __importDefault(require("./ChangeRoleModal"));
|
|
@@ -84,6 +85,7 @@ const DEFAULT_LABELS = {
|
|
|
84
85
|
deactivateConfirmQuestion: "Are you sure you want to deactivate this user?",
|
|
85
86
|
deactivateConfirmDescription: "will no longer have access to the organization. You can reactivate them later if needed.",
|
|
86
87
|
};
|
|
88
|
+
/** Two-pane user directory + detail panel with bundled Add/Change-Role/Deactivate modals. */
|
|
87
89
|
const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], canManageUsers = false, isUsersLoading = false, isInviteLoading = false, isDeactivateLoading = false, isAddUserLoading = false, isChangeRoleLoading = false, onSelectUser, onRefresh, onBack, onAddUserSubmit, onChangeRoleSubmit, onReinvite, onDeactivate, onAddRoleClick, addUserUpgradeNotice, labels: labelOverrides, minHeight = "90vh", }) => {
|
|
88
90
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
89
91
|
const labels = (0, react_1.useMemo)(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
|
|
@@ -93,6 +95,7 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
|
|
|
93
95
|
const [actionUserId, setActionUserId] = (0, react_1.useState)(null);
|
|
94
96
|
const border = colors.boxborder[200];
|
|
95
97
|
const surface = colors.background[50];
|
|
98
|
+
const rowBackgrounds = (0, react_1.useMemo)(() => (0, rowStates_1.listRowBackgrounds)(colors), [colors]);
|
|
96
99
|
const muted = colors.textMuted;
|
|
97
100
|
const heading = colors.text[900];
|
|
98
101
|
const avatarBg = colors.primary[100];
|
|
@@ -109,10 +112,10 @@ const UserDetails = ({ users, selectedUser, selectedUserId, roleOptions = [], ca
|
|
|
109
112
|
const renderStatusBadge = (isActive) => ((0, jsx_runtime_1.jsx)(react_2.Badge, { variant: "subtle", colorScheme: isActive ? successScheme : dangerScheme, borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, textTransform: "none", children: isActive ? labels.active : labels.inactive }));
|
|
110
113
|
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { backgroundColor: colors.backgroundColor.main, minHeight: minHeight, p: { base: 3, md: 4 }, gap: 3, flexDirection: { base: "column", lg: "row" }, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { width: { base: "100%", lg: "300px" }, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, position: "relative", order: { base: 2, lg: 1 }, overflow: "hidden", display: "flex", flexDirection: "column", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 18 }), variant: "ghost", size: "xs", color: muted, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.teamMembers }), (0, jsx_runtime_1.jsx)(react_2.Badge, { colorScheme: "gray", borderRadius: "full", fontSize: "0.65rem", px: 2, children: users.length })] }), onRefresh && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": labels.refreshList, icon: (0, jsx_runtime_1.jsx)(lucide_react_1.RefreshCw, { size: 15 }), variant: "ghost", size: "xs", color: muted, onClick: onRefresh, isLoading: isUsersLoading }))] }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: 1, overflowY: "auto", maxHeight: { base: "380px", lg: `calc(${minHeight} - 80px)` }, children: isUsersLoading ? ((0, jsx_runtime_1.jsx)(react_2.VStack, { spacing: 2, p: 3, children: Array.from({ length: 6 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, p: 2, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "9" }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: 1, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", mb: 2, width: "80%" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "9px", width: "60%" })] })] }, idx))) })) : users.length === 0 ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Users, title: labels.noUsers, size: "sm", minH: "220px" })) : ((0, jsx_runtime_1.jsx)(react_2.VStack, { spacing: 1, p: 2, align: "stretch", children: users.map((user) => {
|
|
111
114
|
const isSelected = selectedUserId != null && selectedUserId === user.id;
|
|
112
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ?
|
|
115
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { p: 2.5, w: "100%", cursor: "pointer", alignItems: "center", gap: 2.5, backgroundColor: isSelected ? rowBackgrounds.selected : "transparent", _hover: {
|
|
113
116
|
background: isSelected
|
|
114
|
-
?
|
|
115
|
-
:
|
|
117
|
+
? rowBackgrounds.selectedActive
|
|
118
|
+
: rowBackgrounds.active,
|
|
116
119
|
}, transition: "background 0.15s ease", borderRadius: "lg", position: "relative", onClick: () => onSelectUser === null || onSelectUser === void 0 ? void 0 : onSelectUser(user), children: [isSelected && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", left: 0, top: "20%", bottom: "20%", width: "3px", borderRadius: "full", bg: colors.primary[500] })), (0, jsx_runtime_1.jsx)(react_2.Avatar, { size: "sm", name: `${user.firstName} ${user.lastName}`, src: user.profile, bg: avatarBg, color: avatarColor }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: 1, overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", fontWeight: 600, noOfLines: 1, color: heading, children: [user.firstName, " ", user.lastName] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", color: muted, noOfLines: 1, children: user.email })] }), renderStatusBadge(user.isActive)] }, user.id));
|
|
117
120
|
}) })) })] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: 1, backgroundColor: surface, borderRadius: "xl", boxShadow: "sm", border: "1px solid", borderColor: border, display: "flex", flexDirection: "column", order: { base: 1, lg: 2 }, overflow: "hidden", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { justifyContent: "space-between", alignItems: "center", px: 4, py: 3, borderBottom: "1px solid", borderColor: border, children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", fontWeight: 600, color: heading, children: selectedUser ? labels.userDetails : labels.selectTeamMember }), canManageUsers && ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "sm", colorScheme: "primary", fontSize: "xs", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.UserPlus, { size: 15 }), onClick: onAddUserOpen, children: labels.addUser }))] }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: 1, overflowY: "auto", children: isUsersLoading ? ((0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, p: 4, align: "stretch", children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 4, children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "16" }), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: 1, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "18px", width: "50%", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "35%" })] })] }), Array.from({ length: 4 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "30%", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "10px", width: "80%" })] }, idx)))] })) : selectedUser ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: { base: "column", md: "row" }, alignItems: { base: "flex-start", md: "center" }, justifyContent: "space-between", gap: 4, p: 4, borderBottom: "1px solid", borderColor: border, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 4, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", children: [(0, jsx_runtime_1.jsx)(react_2.Avatar, { size: "lg", name: selectedUser.name, src: selectedUser.profilePhoto, bg: avatarBg, color: avatarColor }), selectedUser.isCurrent && ((0, jsx_runtime_1.jsx)(react_2.Badge, { position: "absolute", bottom: -1, right: -1, colorScheme: "blue", variant: "solid", fontSize: "0.6rem", borderRadius: "full", px: 2, py: 0.5, boxShadow: "sm", textTransform: "none", children: labels.you }))] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "md", mb: 1, color: heading, children: selectedUser.name }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: muted, mb: 2, children: selectedUser.role }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [renderStatusBadge(selectedUser.isActive), selectedUser.isPending && ((0, jsx_runtime_1.jsx)(react_2.Badge, { variant: "subtle", borderRadius: "full", px: 2, py: 0.5, fontSize: "0.65rem", fontWeight: 600, colorScheme: "orange", textTransform: "none", children: labels.pendingInvitation }))] })] })] }), canManageUsers &&
|
|
118
121
|
!selectedUser.isSuperAdmin && ((0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, flexWrap: "wrap", children: [!selectedUser.isCurrent && !selectedUser.isActive && ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "xs", variant: "outline", colorScheme: "blue", fontSize: "xs", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Send, { size: 13 }), isLoading: isInviteLoading, onClick: () => selectedUser.userId != null &&
|
|
@@ -1,43 +1,57 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from "react";
|
|
2
|
+
/** One assignable role offered in the Add User and Change Role selects. */
|
|
2
3
|
export type RoleOption = {
|
|
3
4
|
id: number;
|
|
4
5
|
label: string;
|
|
5
6
|
};
|
|
7
|
+
/** One row in the left-panel user list — see SelectedUserDetail for the richer shape used once selected. */
|
|
6
8
|
export type UserListItem = {
|
|
7
9
|
id: number;
|
|
8
10
|
firstName: string;
|
|
9
11
|
lastName: string;
|
|
10
12
|
email: string;
|
|
13
|
+
/** Display-only — UserDetails never reads this in the list row itself, only in SelectedUserDetail once selected. */
|
|
11
14
|
role: string;
|
|
12
15
|
profile?: string;
|
|
13
16
|
isActive: boolean;
|
|
17
|
+
/** isPending/isCurrent/isSuperAdmin here are decorative — only SelectedUserDetail's copies (after selection) drive any badge or action-bar behavior. */
|
|
14
18
|
isPending?: boolean;
|
|
15
19
|
isCurrent?: boolean;
|
|
16
20
|
isSuperAdmin?: boolean;
|
|
17
21
|
};
|
|
22
|
+
/** One label/value row in the "Personal Information" panel; icon falls back to a generic user icon when omitted. */
|
|
18
23
|
export type UserDetailRow = {
|
|
19
24
|
label: string;
|
|
20
25
|
value: string;
|
|
21
26
|
icon?: ElementType;
|
|
22
27
|
};
|
|
28
|
+
/** Right-panel shape for the selected user — distinct field names from UserListItem (name, userId); not derived from it. */
|
|
23
29
|
export type SelectedUserDetail = {
|
|
30
|
+
/** When null, Change Role and Resend Invitation silently no-op on click (no disabled state) — unlike Deactivate, which greys out. */
|
|
24
31
|
userId?: number;
|
|
25
32
|
name: string;
|
|
33
|
+
/** Feeds ChangeRoleModal's currentRole — must case-insensitively match a roleOptions[].label or the modal opens with nothing pre-selected. */
|
|
26
34
|
role: string;
|
|
35
|
+
/** Shown only inside ChangeRoleModal's header — the Personal Information panel does not render this field, only `details`. */
|
|
27
36
|
email: string;
|
|
28
37
|
profilePhoto?: string;
|
|
29
38
|
isActive: boolean;
|
|
39
|
+
/** Renders the "Pending Invitation" badge only — does not affect which action buttons show. */
|
|
30
40
|
isPending?: boolean;
|
|
41
|
+
/** Hides Resend Invitation and Deactivate (both gated on !isCurrent) and shows a "You" badge on the avatar. */
|
|
31
42
|
isCurrent?: boolean;
|
|
43
|
+
/** True hides the entire action bar (reinvite/change-role/deactivate), not just the deactivate button. */
|
|
32
44
|
isSuperAdmin?: boolean;
|
|
33
45
|
details: UserDetailRow[];
|
|
34
46
|
};
|
|
47
|
+
/** Form values submitted by the Add User modal; role stays null until the user picks one. */
|
|
35
48
|
export type AddUserFormValues = {
|
|
36
49
|
firstName: string;
|
|
37
50
|
lastName: string;
|
|
38
51
|
email: string;
|
|
39
52
|
role: RoleOption | null;
|
|
40
53
|
};
|
|
54
|
+
/** Payload from the Change Role modal — just the ids, unlike AddUserFormValues which carries the full RoleOption. */
|
|
41
55
|
export type ChangeRoleSubmitPayload = {
|
|
42
56
|
userId: number;
|
|
43
57
|
roleId: number;
|
|
@@ -83,6 +97,7 @@ export type UserDetailsLabels = {
|
|
|
83
97
|
deactivateConfirmQuestion?: string;
|
|
84
98
|
deactivateConfirmDescription?: string;
|
|
85
99
|
};
|
|
100
|
+
/** Two-pane user directory + detail panel with bundled Add/Change-Role/Deactivate modals; not a role editor — pair with RolesPermission for managing roles themselves. */
|
|
86
101
|
export interface UserDetailsProps {
|
|
87
102
|
/** Full list of users shown in the left panel. */
|
|
88
103
|
users: UserListItem[];
|
|
@@ -96,19 +111,25 @@ export interface UserDetailsProps {
|
|
|
96
111
|
canManageUsers?: boolean;
|
|
97
112
|
/** Loading flags driven by the host app's async calls. */
|
|
98
113
|
isUsersLoading?: boolean;
|
|
114
|
+
/** Spins only the Resend Invitation button, not the list or either modal. */
|
|
99
115
|
isInviteLoading?: boolean;
|
|
116
|
+
/** Unlike isAddUserLoading/isChangeRoleLoading, the confirm modal closes immediately on click — this flag can't keep it open to show a spinner. */
|
|
100
117
|
isDeactivateLoading?: boolean;
|
|
101
118
|
isAddUserLoading?: boolean;
|
|
102
119
|
isChangeRoleLoading?: boolean;
|
|
103
120
|
/** Selection + refresh. */
|
|
104
121
|
onSelectUser?: (user: UserListItem) => void;
|
|
122
|
+
/** Omitting this hides the refresh button entirely, not just disables it. */
|
|
105
123
|
onRefresh?: () => void;
|
|
106
124
|
/** Back navigation handler for the list panel header. */
|
|
107
125
|
onBack?: () => void;
|
|
108
126
|
/** Modal submit / action callbacks. */
|
|
109
127
|
onAddUserSubmit?: (values: AddUserFormValues) => void | Promise<void>;
|
|
128
|
+
/** Awaited before the modal closes — unlike onDeactivate, which fires and closes immediately. */
|
|
110
129
|
onChangeRoleSubmit?: (payload: ChangeRoleSubmitPayload) => void | Promise<void>;
|
|
130
|
+
/** Never called when selectedUser.userId is null — the button stays enabled but silently no-ops. */
|
|
111
131
|
onReinvite?: (userId: number) => void;
|
|
132
|
+
/** Not awaited — the confirm modal closes right after this fires, so a slow or failing deactivation gets no in-modal feedback. */
|
|
112
133
|
onDeactivate?: (userId: number) => void;
|
|
113
134
|
/** "Add New Role" actions inside the SearchSelect of each modal. */
|
|
114
135
|
onAddRoleClick?: () => void;
|
|
@@ -116,9 +137,10 @@ export interface UserDetailsProps {
|
|
|
116
137
|
addUserUpgradeNotice?: ReactNode;
|
|
117
138
|
/** Translated/override strings. */
|
|
118
139
|
labels?: UserDetailsLabels;
|
|
119
|
-
/**
|
|
140
|
+
/** Also feeds a calc() for the sidebar's max-height — a non-CSS-length value (e.g. "auto") silently breaks that calc. Defaults to "90vh". */
|
|
120
141
|
minHeight?: string;
|
|
121
142
|
}
|
|
143
|
+
/** Self-contained invite form (first/last/email/role) with its own validation — not a generic modal; it always renders these exact fields. */
|
|
122
144
|
export interface AddUserModalProps {
|
|
123
145
|
isOpen: boolean;
|
|
124
146
|
onClose: () => void;
|
|
@@ -127,13 +149,17 @@ export interface AddUserModalProps {
|
|
|
127
149
|
onSubmit?: (values: AddUserFormValues) => void | Promise<void>;
|
|
128
150
|
onAddRoleClick?: () => void;
|
|
129
151
|
upgradeNotice?: ReactNode;
|
|
152
|
+
/** A strict subset of UserDetailsLabels — the merged defaults from UserDetails always satisfy it. */
|
|
130
153
|
labels: Required<Pick<UserDetailsLabels, "addNewUser" | "firstName" | "lastName" | "email" | "role" | "firstNamePlaceholder" | "lastNamePlaceholder" | "emailPlaceholder" | "addNewRole" | "cancel" | "save" | "firstNameRequired" | "lastNameRequired" | "emailRequired" | "emailInvalid" | "roleRequired">>;
|
|
131
154
|
}
|
|
155
|
+
/** Reassigns one user's role only — Save stays disabled until a genuinely different role is picked (see currentRole below). */
|
|
132
156
|
export interface ChangeRoleModalProps {
|
|
133
157
|
isOpen: boolean;
|
|
134
158
|
onClose: () => void;
|
|
159
|
+
/** Submit silently no-ops when null — Save disables only for isUnchanged/no-selection, not for this. */
|
|
135
160
|
userId: number | null;
|
|
136
161
|
email?: string;
|
|
162
|
+
/** Matched to roleOptions by case-insensitive label text; no match silently pre-selects nothing and leaves Save disabled. */
|
|
137
163
|
currentRole?: string;
|
|
138
164
|
roleOptions: RoleOption[];
|
|
139
165
|
isLoading?: boolean;
|
|
@@ -141,11 +167,14 @@ export interface ChangeRoleModalProps {
|
|
|
141
167
|
onAddRoleClick?: () => void;
|
|
142
168
|
labels: Required<Pick<UserDetailsLabels, "changeRoleTitle" | "email" | "role" | "addNewRole" | "cancel" | "save" | "roleRequired">>;
|
|
143
169
|
}
|
|
170
|
+
/** Confirm dialog for deactivating one user — closes immediately on confirm (see isDeactivateLoading); not a delete, the user can be reactivated later. */
|
|
144
171
|
export interface DeactivateConfirmModalProps {
|
|
145
172
|
isOpen: boolean;
|
|
146
173
|
onClose: () => void;
|
|
147
174
|
userName?: string;
|
|
175
|
+
/** Effectively unusable — the modal always closes before an async confirm could flip this. */
|
|
148
176
|
isLoading?: boolean;
|
|
177
|
+
/** Synchronous by type — the modal closes in the same tick this fires, so it can't be awaited. */
|
|
149
178
|
onConfirm: () => void;
|
|
150
179
|
labels: Required<Pick<UserDetailsLabels, "confirmDeactivation" | "deactivateConfirmQuestion" | "deactivateConfirmDescription" | "cancel" | "deactivateUser">>;
|
|
151
180
|
}
|
|
@@ -2,10 +2,11 @@ import type { ReactNode } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* Window state for a WorkspaceWindow.
|
|
4
4
|
* - "medium": default centered dialog (Jira-style)
|
|
5
|
-
* - "maximized":
|
|
5
|
+
* - "maximized": renders IDENTICALLY to "medium" — no separate maximize size exists (see onMaximize)
|
|
6
6
|
* - "minimized": collapsed to a tray pill (rendered by WorkspaceTray, not the window)
|
|
7
7
|
*/
|
|
8
8
|
export type WorkspaceWindowState = "medium" | "maximized" | "minimized";
|
|
9
|
+
/** Props for one WorkspaceWindow instance; minimized windows render separately via WorkspaceTrayProps below. */
|
|
9
10
|
export interface WorkspaceWindowProps {
|
|
10
11
|
/** Title shown in the window's control bar. */
|
|
11
12
|
title: ReactNode;
|
|
@@ -14,6 +15,7 @@ export interface WorkspaceWindowProps {
|
|
|
14
15
|
/** Window body. */
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
onMinimize?: () => void;
|
|
18
|
+
/** Kept for back-compat only — no maximize/restore control is rendered; this is never called. */
|
|
17
19
|
onMedium?: () => void;
|
|
18
20
|
onMaximize?: () => void;
|
|
19
21
|
onClose?: () => void;
|
|
@@ -31,10 +33,12 @@ export interface WorkspaceWindowProps {
|
|
|
31
33
|
/** data-testid for the window container. */
|
|
32
34
|
testId?: string;
|
|
33
35
|
}
|
|
36
|
+
/** One minimized window in the tray; id is passed back to onRestore/onClose so callers can target the right window. */
|
|
34
37
|
export interface WorkspaceTrayItem {
|
|
35
38
|
id: string;
|
|
36
39
|
title: ReactNode;
|
|
37
40
|
}
|
|
41
|
+
/** Props for the bottom-right cluster of minimized-window pills; renders nothing when items is empty. */
|
|
38
42
|
export interface WorkspaceTrayProps {
|
|
39
43
|
/** Minimized items rendered as restore pills along the bottom. */
|
|
40
44
|
items: WorkspaceTrayItem[];
|
|
@@ -53,6 +57,7 @@ export interface WorkspaceTrayProps {
|
|
|
53
57
|
close: () => void;
|
|
54
58
|
}) => ReactNode;
|
|
55
59
|
}
|
|
60
|
+
/** Props for WorkspaceTrayPreview — despite the name, works for any hover trigger, not just tray pills. */
|
|
56
61
|
export interface WorkspaceTrayPreviewProps {
|
|
57
62
|
/**
|
|
58
63
|
* The trigger markup (typically a tray pill). The preview + trigger share one
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resetExclusiveOverlay = exports.exclusiveClose = exports.exclusiveOpen = void 0;
|
|
4
|
+
let active = null;
|
|
5
|
+
const exclusiveOpen = (id, close) => {
|
|
6
|
+
if (active && active.id !== id) {
|
|
7
|
+
active.close();
|
|
8
|
+
}
|
|
9
|
+
active = { id, close };
|
|
10
|
+
};
|
|
11
|
+
exports.exclusiveOpen = exclusiveOpen;
|
|
12
|
+
const exclusiveClose = (id) => {
|
|
13
|
+
if ((active === null || active === void 0 ? void 0 : active.id) === id) {
|
|
14
|
+
active = null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.exclusiveClose = exclusiveClose;
|
|
18
|
+
/** Test-only reset — not exported from the package root. */
|
|
19
|
+
const resetExclusiveOverlay = () => {
|
|
20
|
+
active = null;
|
|
21
|
+
};
|
|
22
|
+
exports.resetExclusiveOverlay = resetExclusiveOverlay;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExclusiveOverlay = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const exclusiveOverlay_1 = require("./exclusiveOverlay");
|
|
6
|
+
/**
|
|
7
|
+
* Register this overlay with the global dismiss coordinator. Call `requestOpen()`
|
|
8
|
+
* immediately before opening; `onClose` is invoked when another overlay opens.
|
|
9
|
+
*/
|
|
10
|
+
const useExclusiveOverlay = (isOpen, onClose) => {
|
|
11
|
+
const id = (0, react_1.useId)();
|
|
12
|
+
const onCloseRef = (0, react_1.useRef)(onClose);
|
|
13
|
+
onCloseRef.current = onClose;
|
|
14
|
+
const requestOpen = (0, react_1.useCallback)(() => {
|
|
15
|
+
(0, exclusiveOverlay_1.exclusiveOpen)(id, () => onCloseRef.current());
|
|
16
|
+
}, [id]);
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
18
|
+
if (!isOpen) {
|
|
19
|
+
(0, exclusiveOverlay_1.exclusiveClose)(id);
|
|
20
|
+
}
|
|
21
|
+
}, [isOpen, id]);
|
|
22
|
+
return requestOpen;
|
|
23
|
+
};
|
|
24
|
+
exports.useExclusiveOverlay = useExclusiveOverlay;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PaletteProps } from "./tokens/types";
|
|
2
|
-
declare const REQUIRED_GROUPS: readonly ["gradient", "primary", "secondary", "tertiary", "transparent", "black", "white", "semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink", "backgroundColor", "background", "text", "header", "placeholder", "boxShadow", "sidebar", "boxborder", "border", "table", "disabled", "accentText", "textMuted", "semanticText", "onPrimary", "onSemantic"];
|
|
2
|
+
declare const REQUIRED_GROUPS: readonly ["gradient", "primary", "secondary", "tertiary", "transparent", "black", "white", "semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan", "purple", "pink", "backgroundColor", "background", "text", "header", "placeholder", "boxShadow", "focusRing", "sidebar", "boxborder", "border", "table", "disabled", "accentText", "textMuted", "semanticText", "onPrimary", "onSemantic"];
|
|
3
3
|
type Unlisted = Exclude<keyof PaletteProps, (typeof REQUIRED_GROUPS)[number]>;
|
|
4
4
|
export type AllPaletteTokensListed = Unlisted extends never ? true : ["unlisted token", Unlisted];
|
|
5
5
|
export declare const allPaletteTokensListed: AllPaletteTokensListed;
|
|
@@ -5,8 +5,8 @@ const REQUIRED_GROUPS = [
|
|
|
5
5
|
"gradient", "primary", "secondary", "tertiary", "transparent", "black", "white",
|
|
6
6
|
"semantic", "gray", "red", "orange", "yellow", "green", "teal", "blue", "cyan",
|
|
7
7
|
"purple", "pink", "backgroundColor", "background", "text", "header", "placeholder",
|
|
8
|
-
"boxShadow", "sidebar", "boxborder", "border", "table", "disabled",
|
|
9
|
-
"textMuted", "semanticText", "onPrimary", "onSemantic",
|
|
8
|
+
"boxShadow", "focusRing", "sidebar", "boxborder", "border", "table", "disabled",
|
|
9
|
+
"accentText", "textMuted", "semanticText", "onPrimary", "onSemantic",
|
|
10
10
|
];
|
|
11
11
|
exports.allPaletteTokensListed = true;
|
|
12
12
|
const NESTED = [
|
|
@@ -17,6 +17,7 @@ const NESTED = [
|
|
|
17
17
|
]],
|
|
18
18
|
["semanticText", ["success", "error", "warning", "info"]],
|
|
19
19
|
["onSemantic", ["success", "error", "warning", "info"]],
|
|
20
|
+
["focusRing", ["ring", "halo"]],
|
|
20
21
|
["backgroundColor", ["main", "base"]],
|
|
21
22
|
["boxShadow", ["primary", "default"]],
|
|
22
23
|
];
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Menu = void 0;
|
|
4
4
|
const react_1 = require("@chakra-ui/react");
|
|
5
5
|
const anatomy_1 = require("@chakra-ui/anatomy");
|
|
6
|
+
const rowStates_1 = require("../tokens/builders/rowStates");
|
|
6
7
|
const paletteFromTheme_1 = require("./paletteFromTheme");
|
|
7
8
|
const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.menuAnatomy.keys);
|
|
8
9
|
const $bg = (0, react_1.cssVar)("menu-bg");
|
|
@@ -24,16 +25,19 @@ const $bg = (0, react_1.cssVar)("menu-bg");
|
|
|
24
25
|
const $itemBg = (0, react_1.cssVar)("menu-item-bg");
|
|
25
26
|
const baseStyle = definePartsStyle(({ theme }) => {
|
|
26
27
|
const colors = (0, paletteFromTheme_1.paletteOf)(theme);
|
|
27
|
-
const
|
|
28
|
-
const
|
|
28
|
+
const rowBgs = (0, rowStates_1.listRowBackgrounds)(colors);
|
|
29
|
+
const hoverBg = rowBgs.active;
|
|
30
|
+
const activeBg = rowBgs.selectedActive;
|
|
29
31
|
return {
|
|
30
32
|
list: {
|
|
31
33
|
[$bg.variable]: colors.backgroundColor.light,
|
|
32
34
|
bg: $bg.reference,
|
|
33
35
|
color: colors.text[900],
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
|
|
36
|
+
// A rule at CHROME_RULE weight, not Chakra's gray.200: that default read as a hard edge,
|
|
37
|
+
// which is why this shipped borderless. At 1.31:1 the edge defines the surface instead.
|
|
38
|
+
borderWidth: "1px",
|
|
39
|
+
borderStyle: "solid",
|
|
40
|
+
borderColor: colors.boxborder[200],
|
|
37
41
|
},
|
|
38
42
|
// Own CSS var (`--menu-item-bg`), NOT the list's `--menu-bg` — Chakra's stock item
|
|
39
43
|
// baseStyle rewrites `--menu-bg` itself on hover/focus, so reusing that same var name
|
|
@@ -21,8 +21,12 @@ const baseStyle = definePartsStyle(({ theme }) => {
|
|
|
21
21
|
content: {
|
|
22
22
|
[$popperBg.variable]: colors.backgroundColor.light,
|
|
23
23
|
bg: $popperBg.reference,
|
|
24
|
-
[$arrowShadowColor.variable]: colors.
|
|
24
|
+
[$arrowShadowColor.variable]: colors.boxborder[200],
|
|
25
25
|
color: colors.text[900],
|
|
26
|
+
// Matches Menu: a CHROME_RULE-weight edge, not Chakra's gray.200 hard edge.
|
|
27
|
+
borderWidth: "1px",
|
|
28
|
+
borderStyle: "solid",
|
|
29
|
+
borderColor: colors.boxborder[200],
|
|
26
30
|
},
|
|
27
31
|
};
|
|
28
32
|
});
|
|
@@ -73,6 +73,8 @@ export declare const componentStyles: {
|
|
|
73
73
|
[x: string]: string;
|
|
74
74
|
bg: string;
|
|
75
75
|
color: string;
|
|
76
|
+
borderWidth: string;
|
|
77
|
+
borderStyle: string;
|
|
76
78
|
borderColor: string;
|
|
77
79
|
};
|
|
78
80
|
item: {
|
|
@@ -143,6 +145,9 @@ export declare const componentStyles: {
|
|
|
143
145
|
[x: string]: string;
|
|
144
146
|
bg: string;
|
|
145
147
|
color: string;
|
|
148
|
+
borderWidth: string;
|
|
149
|
+
borderStyle: string;
|
|
150
|
+
borderColor: string;
|
|
146
151
|
};
|
|
147
152
|
}) | undefined;
|
|
148
153
|
sizes?: {
|
|
@@ -12,6 +12,7 @@ const Tag_styles_1 = require("../../Components/Tag/Tag.styles");
|
|
|
12
12
|
const InputTextArea_style_1 = require("../../Components/InputTextArea/InputTextArea.style");
|
|
13
13
|
const NumberInput_styles_1 = require("../../Components/NumberInput/NumberInput.styles");
|
|
14
14
|
const accentText_1 = require("../tokens/builders/accentText");
|
|
15
|
+
const filledSurface_1 = require("../tokens/builders/filledSurface");
|
|
15
16
|
const color_1 = require("../tokens/builders/color");
|
|
16
17
|
const outlineRung_1 = require("../tokens/builders/outlineRung");
|
|
17
18
|
const Drawer_styles_1 = require("./Drawer.styles");
|
|
@@ -27,6 +28,14 @@ const Avatar_styles_1 = require("./Avatar.styles");
|
|
|
27
28
|
// math (hexToRgb) throws on those on purpose (see color.ts). Guard so those scales fall back to
|
|
28
29
|
// Chakra's own original fixed rung instead of computing contrast on a color it can't parse.
|
|
29
30
|
const isHexColor = (color) => typeof color === "string" && /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(color);
|
|
31
|
+
const solidFillStyle = (palette, swatch) => {
|
|
32
|
+
const rung = (0, filledSurface_1.solidFillRung)(swatch, palette.white);
|
|
33
|
+
const bg = swatch[rung];
|
|
34
|
+
return {
|
|
35
|
+
bg,
|
|
36
|
+
color: isHexColor(bg) ? (0, filledSurface_1.labelOnFill)(bg, palette.white, palette.black) : swatch[800],
|
|
37
|
+
};
|
|
38
|
+
};
|
|
30
39
|
// Badge isn't its own component family (no Components/Badge/), so its style config lives here —
|
|
31
40
|
// Chakra's stock `solid` variant hardcodes a white label on a variable fill, same AA gap Tag had.
|
|
32
41
|
const Badge = {
|
|
@@ -34,11 +43,7 @@ const Badge = {
|
|
|
34
43
|
solid: ({ theme, colorScheme = "gray" }) => {
|
|
35
44
|
const palette = (0, paletteFromTheme_1.paletteOf)(theme);
|
|
36
45
|
const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
bg,
|
|
40
|
-
color: isHexColor(bg) ? (0, accentText_1.onFilled)(bg, palette.white, palette.black) : swatch[800],
|
|
41
|
-
};
|
|
46
|
+
return solidFillStyle(palette, swatch);
|
|
42
47
|
},
|
|
43
48
|
// Chakra's stock `subtle` picks its bg/color pair via `mode()`, keyed to Chakra's own
|
|
44
49
|
// colorMode — which this app never toggles (dark mode swaps the palette object instead), so
|
|
@@ -90,13 +95,14 @@ const Alert = defineAlertStyles({
|
|
|
90
95
|
variants: {
|
|
91
96
|
solid: defineAlertParts(({ theme, colorScheme = "gray" }) => {
|
|
92
97
|
const palette = (0, paletteFromTheme_1.paletteOf)(theme);
|
|
93
|
-
const
|
|
98
|
+
const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
|
|
99
|
+
const { bg, color } = solidFillStyle(palette, swatch);
|
|
94
100
|
if (!isHexColor(bg))
|
|
95
101
|
return { container: {} };
|
|
96
102
|
return {
|
|
97
103
|
container: {
|
|
98
104
|
[$alertBg.variable]: bg,
|
|
99
|
-
[$alertFg.variable]:
|
|
105
|
+
[$alertFg.variable]: color,
|
|
100
106
|
},
|
|
101
107
|
};
|
|
102
108
|
}),
|
|
@@ -154,8 +160,9 @@ const Skeleton = {
|
|
|
154
160
|
const Radio = {
|
|
155
161
|
baseStyle: ({ theme, colorScheme }) => {
|
|
156
162
|
const palette = (0, paletteFromTheme_1.paletteOf)(theme);
|
|
157
|
-
const
|
|
158
|
-
const
|
|
163
|
+
const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
|
|
164
|
+
const fill = swatch[(0, filledSurface_1.solidFillRung)(swatch, palette.white)];
|
|
165
|
+
const dot = (0, filledSurface_1.labelOnFill)(fill, palette.white, palette.black);
|
|
159
166
|
// A browser probe found the checked radio's hover repeating its own resting `fill` —
|
|
160
167
|
// Chakra's stock checked._hover (inherited from checkbox) lands on the SAME `bg`/`borderColor`
|
|
161
168
|
// keys we do, so extendTheme's merge is a scalar overwrite here, not a coexisting selector;
|
|
@@ -8,8 +8,9 @@ const react_1 = require("@chakra-ui/react");
|
|
|
8
8
|
const common_web_1 = __importDefault(require("./common.web"));
|
|
9
9
|
const fonts_web_1 = __importDefault(require("./fonts.web"));
|
|
10
10
|
const componentStyles_1 = require("./componentStyles");
|
|
11
|
-
const
|
|
11
|
+
const filledSurface_1 = require("../tokens/builders/filledSurface");
|
|
12
12
|
const scrollbar_1 = require("../tokens/builders/scrollbar");
|
|
13
|
+
const focusRing_styles_1 = require("./focusRing.styles");
|
|
13
14
|
/**
|
|
14
15
|
* Builds a Chakra theme from a pure brand palette.
|
|
15
16
|
*
|
|
@@ -27,6 +28,12 @@ const createBrandTheme = (palette, options = {}) => {
|
|
|
27
28
|
colors: palette,
|
|
28
29
|
...fonts_web_1.default,
|
|
29
30
|
...common_web_1.default,
|
|
31
|
+
// `shadows.outline` is what Chakra's stock `_focusVisible` reaches for on EVERY component it
|
|
32
|
+
// themes. The primitive ships one hardcoded blue (`rgba(66,153,225,.6)`), which measured
|
|
33
|
+
// 1.83:1 on the lavender canvas and 1.38:1 on a primary button — below 1.4.11's 3:1 on all
|
|
34
|
+
// nine brands, in both modes. A primitive cannot know the palette; this is the first place
|
|
35
|
+
// that does, so the palette-derived ring is bound here and every stock focus state inherits it.
|
|
36
|
+
shadows: { ...common_web_1.default.shadows, outline: (0, focusRing_styles_1.focusRingShadow)(palette) },
|
|
30
37
|
};
|
|
31
38
|
return (0, react_1.extendTheme)({
|
|
32
39
|
...brand,
|
|
@@ -81,14 +88,20 @@ const createBrandTheme = (palette, options = {}) => {
|
|
|
81
88
|
// selecting text anywhere (e.g. a table cell) shows a stray white/lavender patch on
|
|
82
89
|
// the dark canvas. Brand it instead, with WCAG-safe ink via the same `onFilled` math
|
|
83
90
|
// used for buttons/badges.
|
|
84
|
-
"::selection": {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
"::selection": (() => {
|
|
92
|
+
const solid = (0, filledSurface_1.resolveFilledSurface)(palette.primary, palette);
|
|
93
|
+
return {
|
|
94
|
+
background: solid.fill,
|
|
95
|
+
color: solid.color,
|
|
96
|
+
};
|
|
97
|
+
})(),
|
|
98
|
+
"::-moz-selection": (() => {
|
|
99
|
+
const solid = (0, filledSurface_1.resolveFilledSurface)(palette.primary, palette);
|
|
100
|
+
return {
|
|
101
|
+
background: solid.fill,
|
|
102
|
+
color: solid.color,
|
|
103
|
+
};
|
|
104
|
+
})(),
|
|
92
105
|
// `color-scheme: dark` gives WebKit/Blink a dark scrollbar by default, but it's the
|
|
93
106
|
// OS's generic dark gray, not brand-aware.
|
|
94
107
|
...(0, scrollbar_1.globalScrollbarStyles)(palette),
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { FocusRingTokens } from "../tokens/types";
|
|
2
|
+
/**
|
|
3
|
+
* WEB binding for the `focusRing` token pair. The colours are derived in
|
|
4
|
+
* `tokens/builders/focusRing.ts` (pure, shared with the mobile library); the CSS shape —
|
|
5
|
+
* box-shadow bands, the forced-colors outline — is web-only and lives here.
|
|
6
|
+
*/
|
|
7
|
+
/** Inner band, in the surface tone: separates the ring from the control's own fill. */
|
|
8
|
+
export declare const FOCUS_HALO_WIDTH = 2;
|
|
9
|
+
/** Outer edge of the brand band. The band itself is the 2px between halo and ring. */
|
|
10
|
+
export declare const FOCUS_RING_WIDTH = 4;
|
|
11
|
+
type WithFocusRing = {
|
|
12
|
+
focusRing: FocusRingTokens;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The two-tone ring as a single `box-shadow`. Drawn OUTSIDE the border box, so it costs no
|
|
16
|
+
* layout and never resizes the control — the reason this is a shadow and not an outline.
|
|
17
|
+
*/
|
|
18
|
+
export declare const focusRingShadow: (colors: WithFocusRing) => string;
|
|
19
|
+
/**
|
|
20
|
+
* `:hover`, `:active` and `:focus-visible` all score the same specificity, so which one paints
|
|
21
|
+
* comes down to source order — and in the merged style object Chakra's own Button baseStyle
|
|
22
|
+
* registers `_focusVisible` BEFORE `_hover`. A focused button that is also hovered would then
|
|
23
|
+
* drop the ring for `_hover`'s `boxShadow: "sm"`. Stacking the pseudo-classes raises the
|
|
24
|
+
* specificity above both, so the ring survives whatever else the state repaints.
|
|
25
|
+
*/
|
|
26
|
+
export declare const FOCUS_VISIBLE_OVER_STATE = "&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible";
|
|
27
|
+
/**
|
|
28
|
+
* `:focus-visible`, never `:focus` — a mouse click must not draw a ring.
|
|
29
|
+
*
|
|
30
|
+
* The transparent outline is not decoration: in Windows High Contrast / `forced-colors` mode
|
|
31
|
+
* box-shadows are dropped entirely, and a transparent outline is the one thing the OS repaints
|
|
32
|
+
* in its own focus colour. Without it, forced-colors users get no indicator at all.
|
|
33
|
+
*/
|
|
34
|
+
export declare const focusVisibleRing: (colors: WithFocusRing) => {
|
|
35
|
+
outline: string;
|
|
36
|
+
outlineOffset: string;
|
|
37
|
+
boxShadow: string;
|
|
38
|
+
};
|
|
39
|
+
/** Both selectors a control needs to keep the ring on top of its own hover/active styling. */
|
|
40
|
+
export declare const focusVisibleStyles: (colors: WithFocusRing) => {
|
|
41
|
+
_focusVisible: {
|
|
42
|
+
outline: string;
|
|
43
|
+
outlineOffset: string;
|
|
44
|
+
boxShadow: string;
|
|
45
|
+
};
|
|
46
|
+
"&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible": {
|
|
47
|
+
outline: string;
|
|
48
|
+
outlineOffset: string;
|
|
49
|
+
boxShadow: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.focusVisibleStyles = exports.focusVisibleRing = exports.FOCUS_VISIBLE_OVER_STATE = exports.focusRingShadow = exports.FOCUS_RING_WIDTH = exports.FOCUS_HALO_WIDTH = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* WEB binding for the `focusRing` token pair. The colours are derived in
|
|
6
|
+
* `tokens/builders/focusRing.ts` (pure, shared with the mobile library); the CSS shape —
|
|
7
|
+
* box-shadow bands, the forced-colors outline — is web-only and lives here.
|
|
8
|
+
*/
|
|
9
|
+
/** Inner band, in the surface tone: separates the ring from the control's own fill. */
|
|
10
|
+
exports.FOCUS_HALO_WIDTH = 2;
|
|
11
|
+
/** Outer edge of the brand band. The band itself is the 2px between halo and ring. */
|
|
12
|
+
exports.FOCUS_RING_WIDTH = 4;
|
|
13
|
+
/**
|
|
14
|
+
* The two-tone ring as a single `box-shadow`. Drawn OUTSIDE the border box, so it costs no
|
|
15
|
+
* layout and never resizes the control — the reason this is a shadow and not an outline.
|
|
16
|
+
*/
|
|
17
|
+
const focusRingShadow = (colors) => `0 0 0 ${exports.FOCUS_HALO_WIDTH}px ${colors.focusRing.halo}, ` +
|
|
18
|
+
`0 0 0 ${exports.FOCUS_RING_WIDTH}px ${colors.focusRing.ring}`;
|
|
19
|
+
exports.focusRingShadow = focusRingShadow;
|
|
20
|
+
/**
|
|
21
|
+
* `:hover`, `:active` and `:focus-visible` all score the same specificity, so which one paints
|
|
22
|
+
* comes down to source order — and in the merged style object Chakra's own Button baseStyle
|
|
23
|
+
* registers `_focusVisible` BEFORE `_hover`. A focused button that is also hovered would then
|
|
24
|
+
* drop the ring for `_hover`'s `boxShadow: "sm"`. Stacking the pseudo-classes raises the
|
|
25
|
+
* specificity above both, so the ring survives whatever else the state repaints.
|
|
26
|
+
*/
|
|
27
|
+
exports.FOCUS_VISIBLE_OVER_STATE = "&:hover:focus-visible, &:active:focus-visible, &[data-active]:focus-visible";
|
|
28
|
+
/**
|
|
29
|
+
* `:focus-visible`, never `:focus` — a mouse click must not draw a ring.
|
|
30
|
+
*
|
|
31
|
+
* The transparent outline is not decoration: in Windows High Contrast / `forced-colors` mode
|
|
32
|
+
* box-shadows are dropped entirely, and a transparent outline is the one thing the OS repaints
|
|
33
|
+
* in its own focus colour. Without it, forced-colors users get no indicator at all.
|
|
34
|
+
*/
|
|
35
|
+
const focusVisibleRing = (colors) => ({
|
|
36
|
+
outline: "2px solid transparent",
|
|
37
|
+
outlineOffset: "2px",
|
|
38
|
+
boxShadow: (0, exports.focusRingShadow)(colors),
|
|
39
|
+
});
|
|
40
|
+
exports.focusVisibleRing = focusVisibleRing;
|
|
41
|
+
/** Both selectors a control needs to keep the ring on top of its own hover/active styling. */
|
|
42
|
+
const focusVisibleStyles = (colors) => {
|
|
43
|
+
const ring = (0, exports.focusVisibleRing)(colors);
|
|
44
|
+
return { _focusVisible: ring, [exports.FOCUS_VISIBLE_OVER_STATE]: ring };
|
|
45
|
+
};
|
|
46
|
+
exports.focusVisibleStyles = focusVisibleStyles;
|