pixelize-design-library 2.4.2-beta.60 → 2.4.2-beta.62
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/CHANGELOG.md +191 -10
- package/COMPONENT-GOTCHAS.md +160 -5
- package/DESIGN-GUIDE.md +9 -1
- package/dist/Components/Accordion/Accordion.js +2 -2
- package/dist/Components/AddressCard/AddressCard.js +2 -1
- package/dist/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
- package/dist/Components/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +1 -1
- package/dist/Components/AudioRecorder/AudioRecorder.js +2 -1
- package/dist/Components/Avatar/Avatar.d.ts +2 -1
- package/dist/Components/Avatar/Avatar.js +5 -3
- package/dist/Components/Backdrop/Backdrop.js +1 -1
- package/dist/Components/BagBar/BagBar.js +2 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
- package/dist/Components/CalendarGrid/CalendarGrid.js +5 -5
- package/dist/Components/CalendarGrid/calendarMath.js +18 -6
- package/dist/Components/Card/PaymentCard/PaymentCard.js +6 -5
- package/dist/Components/CartItem/CartItem.js +2 -1
- package/dist/Components/Checkbox/Checkbox.d.ts +18 -3
- package/dist/Components/Checkbox/Checkbox.js +9 -7
- package/dist/Components/CheckoutKit/selectable.js +1 -1
- package/dist/Components/ChoiceCard/ChoiceCard.d.ts +3 -0
- package/dist/Components/ChoiceCard/ChoiceCard.js +16 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.d.ts +3 -0
- package/dist/Components/ChoiceCard/ChoiceCardGroup.js +6 -0
- package/dist/Components/ChoiceCard/ChoiceCardProps.d.ts +28 -0
- package/dist/Components/ChoiceCard/ChoiceCardProps.js +2 -0
- package/dist/Components/CircularProgress/CircularProgress.js +4 -8
- package/dist/Components/CircularProgress/CircularProgressProps.d.ts +5 -3
- package/dist/Components/CircularProgress/arc.d.ts +9 -1
- package/dist/Components/CircularProgress/arc.js +15 -1
- package/dist/Components/Common/FormLabel.js +1 -1
- package/dist/Components/Common/FormattedDescription.js +1 -1
- package/dist/Components/Common/HelperText.d.ts +5 -4
- package/dist/Components/Common/HelperText.js +10 -7
- package/dist/Components/Common/fieldStyles.d.ts +4 -4
- package/dist/Components/Common/fieldStyles.js +2 -1
- package/dist/Components/ContactForm/ContactForm.js +1 -1
- package/dist/Components/CopyButton/CopyButton.js +12 -5
- package/dist/Components/CouponField/CouponField.js +4 -3
- package/dist/Components/CustomModulesTable/CustomModulesTableProps.d.ts +18 -0
- package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/Components/DatePicker/CalendarPanel.js +2 -2
- package/dist/Components/DatePicker/DatePicker.js +8 -2
- package/dist/Components/DatePicker/RangeDatePicker.d.ts +9 -3
- package/dist/Components/DatePicker/RangeDatePicker.js +6 -5
- package/dist/Components/DatePicker/SingleDatePicker.d.ts +9 -5
- package/dist/Components/DatePicker/SingleDatePicker.js +7 -4
- package/dist/Components/DatePicker/ThemeDatePicker.d.ts +8 -4
- package/dist/Components/DatePicker/ThemeDatePicker.js +9 -6
- package/dist/Components/DatePicker/TimeOnlyPicker.d.ts +9 -5
- package/dist/Components/DatePicker/TimeOnlyPicker.js +6 -4
- package/dist/Components/DatePicker/TimePickerInput.d.ts +2 -2
- package/dist/Components/DatePicker/TimePickerInput.js +6 -5
- package/dist/Components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/Components/DescriptionList/DescriptionList.js +3 -3
- package/dist/Components/DescriptionList/DescriptionListProps.d.ts +3 -3
- package/dist/Components/Dropdown/DropDown.js +12 -4
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
- package/dist/Components/EmptyState/EmptyState.js +2 -2
- package/dist/Components/EmptyState/EmptyStateProps.d.ts +3 -3
- package/dist/Components/FileUpload/FileUpload.js +21 -15
- package/dist/Components/FileUpload/useObjectUrl.d.ts +1 -0
- package/dist/Components/FileUpload/useObjectUrl.js +14 -0
- package/dist/Components/FileUploader/FileUploader.js +9 -3
- package/dist/Components/FileUploader/FileUploaderProps.d.ts +8 -0
- package/dist/Components/FilterBar/FilterBar.d.ts +1 -1
- package/dist/Components/FilterBar/FilterBar.js +2 -2
- package/dist/Components/FilterBar/FilterBarProps.d.ts +3 -3
- package/dist/Components/FilterSidebar/FilterSidebar.js +10 -6
- package/dist/Components/Form/FormWrapper.js +1 -1
- package/dist/Components/FormField/FormField.d.ts +3 -0
- package/dist/Components/FormField/FormField.js +57 -0
- package/dist/Components/FormField/FormFieldProps.d.ts +33 -0
- package/dist/Components/FormField/FormFieldProps.js +2 -0
- package/dist/Components/Header/HeaderActions.js +2 -2
- package/dist/Components/Header/components/mobileMenu.js +1 -1
- package/dist/Components/IconButton/IconButton.d.ts +5 -0
- package/dist/Components/IconButton/IconButton.js +24 -0
- package/dist/Components/IconButton/IconButtonProps.d.ts +10 -0
- package/dist/Components/IconButton/IconButtonProps.js +2 -0
- package/dist/Components/Input/PhoneNumberInput.js +14 -0
- package/dist/Components/Input/PhoneNumberInputProps.d.ts +1 -0
- package/dist/Components/KanbanBoard/AccountCard.js +3 -2
- package/dist/Components/KanbanBoard/AccountRow.js +1 -1
- package/dist/Components/KanbanBoard/KanbanBoard.js +56 -39
- package/dist/Components/KanbanBoard/MeasuredItem.js +6 -14
- package/dist/Components/KanbanBoard/boardStore.d.ts +8 -0
- package/dist/Components/KanbanBoard/boardStore.js +27 -0
- package/dist/Components/Kbd/Kbd.js +1 -1
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +1 -1
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/MediaGallery/MediaGallery.js +1 -1
- package/dist/Components/MediaGallery/MediaLightbox.js +2 -1
- package/dist/Components/MediaGallery/glass.js +2 -1
- package/dist/Components/MediaViewer/MediaViewer.js +1 -1
- package/dist/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
- package/dist/Components/MediaViewer/components/MediaImageViewer.js +1 -1
- package/dist/Components/MediaViewer/components/MediaScrubber.js +5 -1
- package/dist/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
- package/dist/Components/MediaViewer/components/PlaybackTimeline.d.ts +20 -0
- package/dist/Components/MediaViewer/components/PlaybackTimeline.js +47 -0
- package/dist/Components/MediaViewer/components/TileChip.js +1 -1
- package/dist/Components/Modal/Modal.js +1 -1
- package/dist/Components/MoreItems/MoreItems.js +2 -2
- package/dist/Components/NavLauncher/LauncherTabs.d.ts +18 -0
- package/dist/Components/NavLauncher/LauncherTabs.js +64 -0
- package/dist/Components/NavLauncher/NavLauncher.d.ts +1 -1
- package/dist/Components/NavLauncher/NavLauncher.js +203 -53
- package/dist/Components/NavLauncher/NavLauncherProps.d.ts +23 -4
- package/dist/Components/NavLauncher/NewTabLink.d.ts +2 -2
- package/dist/Components/NavLauncher/NewTabLink.js +7 -3
- package/dist/Components/NavLauncher/launcherParts.d.ts +4 -1
- package/dist/Components/NavLauncher/launcherParts.js +16 -8
- package/dist/Components/NavLauncher/resultNavigation.d.ts +3 -0
- package/dist/Components/NavLauncher/resultNavigation.js +65 -0
- package/dist/Components/NavLauncher/revealStyles.d.ts +1 -1
- package/dist/Components/NavLauncher/revealStyles.js +2 -2
- package/dist/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/Components/NavigationBar/NavigationBarProps.d.ts +1 -0
- package/dist/Components/NoteTextArea/NoteTextArea.js +18 -4
- package/dist/Components/NoteTextArea/NoteTextAreaProps.d.ts +12 -0
- package/dist/Components/Notification/Notification.js +17 -3
- package/dist/Components/Notification/NotificationProps.d.ts +17 -1
- package/dist/Components/NotificationBell/NotificationBell.js +5 -1
- package/dist/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/Components/OffersList/OffersList.js +2 -1
- package/dist/Components/OptionChip/OptionChip.js +3 -2
- package/dist/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/Components/OrderSummary/OrderSummary.js +5 -5
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +18 -6
- package/dist/Components/OrgSwitcher/OrgSwitcherProps.d.ts +4 -0
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +7 -1
- package/dist/Components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/Components/PageHeader/PageHeader.js +2 -2
- package/dist/Components/PageHeader/PageHeaderProps.d.ts +3 -3
- package/dist/Components/Pagination/Pagination.d.ts +5 -0
- package/dist/Components/Pagination/Pagination.js +48 -0
- package/dist/Components/Pagination/PaginationProps.d.ts +46 -0
- package/dist/Components/Pagination/PaginationProps.js +9 -0
- package/dist/Components/Pagination/pageWindow.d.ts +4 -0
- package/dist/Components/Pagination/pageWindow.js +22 -0
- package/dist/Components/PaymentOption/PaymentOption.js +1 -1
- package/dist/Components/PersonChip/PersonChip.js +2 -2
- package/dist/Components/PinInput/PinInput.d.ts +1 -1
- package/dist/Components/PinInput/PinInput.js +17 -2
- package/dist/Components/PinInput/PinInputProps.d.ts +9 -1
- package/dist/Components/PincodeChecker/PincodeChecker.js +4 -4
- package/dist/Components/PlanPill/PlanPill.js +2 -1
- package/dist/Components/PriceBlock/PriceBlock.js +3 -3
- package/dist/Components/Primitives/Primitives.d.ts +2 -2
- package/dist/Components/Primitives/Primitives.js +2 -3
- package/dist/Components/ProductBadges/ProductBadges.js +2 -1
- package/dist/Components/ProductCard/ProductCard.js +1 -1
- package/dist/Components/ProductCard/ProductCardAction.js +2 -2
- package/dist/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/Components/ProductCard/cardMetrics.d.ts +1 -1
- package/dist/Components/ProductCard/cardMetrics.js +5 -1
- package/dist/Components/ProfileCard/ProfileCardProps.d.ts +11 -0
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +3 -2
- package/dist/Components/QuantityStepper/QuantityStepper.js +2 -1
- package/dist/Components/RadioButton/RadioButton.d.ts +11 -2
- package/dist/Components/RadioButton/RadioButton.js +9 -6
- package/dist/Components/RangeSlider/RangeSlider.js +3 -3
- package/dist/Components/Rating/Rating.js +2 -1
- package/dist/Components/Reorder/Reorder.js +3 -2
- package/dist/Components/ReviewList/ReviewList.js +3 -3
- package/dist/Components/ReviewSummary/ReviewSummary.js +3 -3
- package/dist/Components/SaveBar/SaveBar.d.ts +1 -1
- package/dist/Components/SaveBar/SaveBar.js +2 -2
- package/dist/Components/SaveBar/SaveBarProps.d.ts +3 -3
- package/dist/Components/Search/Search.js +2 -9
- package/dist/Components/Search/ctrlShortcut.d.ts +1 -0
- package/dist/Components/Search/ctrlShortcut.js +29 -0
- package/dist/Components/SearchSelect/SearchSelect.js +117 -30
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +8 -2
- package/dist/Components/SegmentedControl/SegmentedControl.js +9 -5
- package/dist/Components/Select/SelectPopup.js +6 -4
- package/dist/Components/SelectSearch/SelectSearch.js +5 -4
- package/dist/Components/SettingRow/SettingRow.js +1 -1
- package/dist/Components/SideBar/SecondaryBar.js +2 -1
- package/dist/Components/SideBar/SideBar.js +82 -21
- package/dist/Components/SideBar/components/MenuItemBox.d.ts +2 -2
- package/dist/Components/SideBar/components/MenuItemBox.js +4 -3
- package/dist/Components/SideBar/components/MenuItems.d.ts +2 -2
- package/dist/Components/SideBar/components/MenuItems.js +3 -3
- package/dist/Components/SideBar/components/OtherApps.js +5 -1
- package/dist/Components/SideBar/components/OverflowTooltipText.js +4 -5
- package/dist/Components/SideBar/components/PinnedSection.js +2 -2
- package/dist/Components/SideBar/components/TextTruncation.js +11 -6
- package/dist/Components/SideBar/sidebarScale.d.ts +1 -1
- package/dist/Components/SideBar/sidebarScale.js +2 -1
- package/dist/Components/SignInActivityTable/SignInActivityTableProps.d.ts +8 -0
- package/dist/Components/Skeletons/SkeletonProps.d.ts +5 -2
- package/dist/Components/Skeletons/Skeletons.d.ts +1 -1
- package/dist/Components/Skeletons/Skeletons.js +4 -2
- package/dist/Components/SkipLink/SkipLink.d.ts +4 -0
- package/dist/Components/SkipLink/SkipLink.js +54 -0
- package/dist/Components/SkipLink/SkipLinkProps.d.ts +8 -0
- package/dist/Components/SkipLink/SkipLinkProps.js +2 -0
- package/dist/Components/Slider/Slider.d.ts +2 -2
- package/dist/Components/Slider/Slider.js +11 -4
- package/dist/Components/SpecTable/SpecTable.js +2 -1
- package/dist/Components/StageProgress/StageItem.js +2 -5
- package/dist/Components/StageProgress/StageProgress.js +2 -1
- package/dist/Components/StageProgress/StageProgressProps.d.ts +1 -1
- package/dist/Components/StageProgress/StepperStage.js +2 -6
- package/dist/Components/StageProgress/centerInStrip.d.ts +2 -0
- package/dist/Components/StageProgress/centerInStrip.js +15 -0
- package/dist/Components/StatCard/StatCard.d.ts +1 -1
- package/dist/Components/StatCard/StatCard.js +5 -4
- package/dist/Components/StatCard/StatCardProps.d.ts +3 -3
- package/dist/Components/StickyBuyBar/StickyBuyBar.js +1 -1
- package/dist/Components/Table/components/TableActions.js +40 -24
- package/dist/Components/Table/components/TableBody.js +25 -40
- package/dist/Components/Table/components/rowMeasurer.d.ts +8 -0
- package/dist/Components/Table/components/rowMeasurer.js +71 -0
- package/dist/Components/Table/filters/TableFilters.js +2 -13
- package/dist/Components/Table/hooks/useTable.js +12 -9
- package/dist/Components/Tabs/components/CountBadge.js +3 -3
- package/dist/Components/Tabs/components/Tab.d.ts +2 -1
- package/dist/Components/Tabs/components/Tab.js +4 -3
- package/dist/Components/Tabs/components/TabList.js +16 -1
- package/dist/Components/Tag/Tag.d.ts +2 -2
- package/dist/Components/Tag/Tag.js +15 -12
- package/dist/Components/Tag/Tag.styles.js +6 -4
- package/dist/Components/TagInput/TagInput.d.ts +3 -0
- package/dist/Components/TagInput/TagInput.js +99 -0
- package/dist/Components/TagInput/TagInputProps.d.ts +46 -0
- package/dist/Components/TagInput/TagInputProps.js +2 -0
- package/dist/Components/TagInput/tagEntries.d.ts +15 -0
- package/dist/Components/TagInput/tagEntries.js +45 -0
- package/dist/Components/TimePicker/TimePicker.d.ts +3 -0
- package/dist/Components/TimePicker/TimePicker.js +50 -0
- package/dist/Components/TimePicker/TimePickerProps.d.ts +44 -0
- package/dist/Components/TimePicker/TimePickerProps.js +2 -0
- package/dist/Components/TimePicker/timeParts.d.ts +10 -0
- package/dist/Components/TimePicker/timeParts.js +36 -0
- package/dist/Components/Timeline/Timeline.js +11 -9
- package/dist/Components/Toaster/Toaster.js +2 -1
- package/dist/Components/Toggle/TableToggle.js +4 -3
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +3 -2
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +6 -5
- package/dist/Components/ToolTip/ToolTip.js +86 -8
- package/dist/Components/UpgradeButton/UpgradeButton.js +4 -2
- package/dist/Components/UserDetails/UserDetails.js +7 -1
- package/dist/Components/VisuallyHidden/VisuallyHidden.d.ts +15 -0
- package/dist/Components/VisuallyHidden/VisuallyHidden.js +21 -0
- package/dist/Components/VisuallyHidden/VisuallyHiddenProps.d.ts +3 -0
- package/dist/Components/VisuallyHidden/VisuallyHiddenProps.js +2 -0
- package/dist/Components/WizardDialog/WizardDialog.js +10 -5
- package/dist/Components/WizardDialog/WizardDialogProps.d.ts +4 -0
- package/dist/Components/WorkspaceWindow/WorkspaceTrayPreview.js +5 -1
- package/dist/Components/WorkspaceWindow/WorkspaceWindow.js +15 -2
- package/dist/Components/WorkspaceWindow/WorkspaceWindowProps.d.ts +2 -1
- package/dist/Hooks/sharedResizeObserver.d.ts +6 -0
- package/dist/Hooks/sharedResizeObserver.js +77 -0
- package/dist/Hooks/useIsTruncated.js +3 -4
- package/dist/Theme/chakra/Menu.styles.d.ts +1 -1
- package/dist/Theme/chakra/common.web.d.ts +1 -0
- package/dist/Theme/chakra/componentStyles.d.ts +1 -1
- package/dist/Theme/chakra/createBrandTheme.d.ts +3 -0
- package/dist/Theme/chakra/createBrandTheme.js +34 -4
- package/dist/Theme/chakra/focusRing.styles.d.ts +2 -0
- package/dist/Theme/chakra/focusRing.styles.js +5 -1
- package/dist/Theme/chakra/fonts.web.d.ts +2 -0
- package/dist/Theme/chakra/motion.d.ts +14 -0
- package/dist/Theme/chakra/motion.js +26 -1
- package/dist/Theme/index.d.ts +2 -1
- package/dist/Theme/index.js +12 -9
- package/dist/Theme/provider/PixelizeThemeProvider.d.ts +4 -1
- package/dist/Theme/provider/PixelizeThemeProvider.js +21 -12
- package/dist/Theme/provider/ThemeSwitcher.js +3 -2
- package/dist/Theme/themeProps.d.ts +3 -0
- package/dist/Theme/tokens/brands/emerald/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/index.d.ts +1 -1
- package/dist/Theme/tokens/brands/index.js +14 -13
- package/dist/Theme/tokens/brands/lavender/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/meadow/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/radiant/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/skyline/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/slate/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/storefront/palette.dark.js +2 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +28 -24
- package/dist/Theme/tokens/builders/color.js +11 -7
- package/dist/Theme/tokens/builders/filledSurface.d.ts +3 -1
- package/dist/Theme/tokens/builders/filledSurface.js +7 -7
- package/dist/Theme/tokens/builders/lazy.d.ts +5 -0
- package/dist/Theme/tokens/builders/lazy.js +55 -0
- package/dist/Theme/tokens/builders/memo.d.ts +9 -0
- package/dist/Theme/tokens/builders/memo.js +28 -0
- package/dist/Theme/tokens/builders/memoByReads.d.ts +2 -0
- package/dist/Theme/tokens/builders/memoByReads.js +50 -0
- package/dist/Theme/tokens/builders/outlineRung.js +10 -2
- package/dist/Theme/tokens/builders/tone.js +5 -4
- package/dist/Theme/tokens/primitives/borderWidths.d.ts +6 -0
- package/dist/Theme/tokens/primitives/borderWidths.js +5 -0
- package/dist/Theme/tokens/primitives/index.d.ts +8 -3
- package/dist/Theme/tokens/primitives/index.js +8 -1
- package/dist/Theme/tokens/primitives/motion.d.ts +25 -2
- package/dist/Theme/tokens/primitives/motion.js +23 -5
- package/dist/Theme/tokens/primitives/optionRowSizes.d.ts +1 -1
- package/dist/Theme/tokens/primitives/optionRowSizes.js +2 -1
- package/dist/Theme/tokens/primitives/radii.d.ts +15 -0
- package/dist/Theme/tokens/primitives/radii.js +14 -0
- package/dist/Theme/tokens/primitives/shadows.d.ts +5 -1
- package/dist/Theme/tokens/primitives/shadows.js +5 -1
- package/dist/Theme/tokens/primitives/states.d.ts +1 -0
- package/dist/Theme/tokens/primitives/states.js +4 -0
- package/dist/Theme/tokens/primitives/typography.d.ts +17 -0
- package/dist/Theme/tokens/primitives/typography.js +21 -1
- package/dist/Theme/tokens/primitives/zIndices.d.ts +1 -0
- package/dist/Theme/tokens/primitives/zIndices.js +1 -0
- package/dist/Utils/formatDate.d.ts +25 -0
- package/dist/Utils/formatDate.js +144 -0
- package/dist/esm/Components/Accordion/Accordion.js +2 -2
- package/dist/esm/Components/AddressCard/AddressCard.js +2 -1
- package/dist/esm/Components/Apexcharts/ApexLineChart/ApexLineChart.js +1 -1
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +1 -1
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +1 -1
- package/dist/esm/Components/AudioRecorder/AudioRecorder.js +2 -1
- package/dist/esm/Components/Avatar/Avatar.js +6 -4
- package/dist/esm/Components/Backdrop/Backdrop.js +1 -1
- package/dist/esm/Components/BagBar/BagBar.js +2 -1
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
- package/dist/esm/Components/CalendarGrid/CalendarGrid.js +6 -6
- package/dist/esm/Components/CalendarGrid/calendarMath.js +18 -6
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +6 -5
- package/dist/esm/Components/CartItem/CartItem.js +2 -1
- package/dist/esm/Components/Checkbox/Checkbox.js +8 -5
- package/dist/esm/Components/CheckoutKit/selectable.js +1 -1
- package/dist/esm/Components/ChoiceCard/ChoiceCard.js +14 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCardGroup.js +4 -0
- package/dist/esm/Components/ChoiceCard/ChoiceCardProps.js +1 -0
- package/dist/esm/Components/CircularProgress/CircularProgress.js +5 -9
- package/dist/esm/Components/CircularProgress/arc.js +13 -0
- package/dist/esm/Components/Common/FormLabel.js +1 -1
- package/dist/esm/Components/Common/FormattedDescription.js +1 -1
- package/dist/esm/Components/Common/HelperText.js +11 -8
- package/dist/esm/Components/Common/fieldStyles.js +2 -1
- package/dist/esm/Components/ContactForm/ContactForm.js +1 -1
- package/dist/esm/Components/CopyButton/CopyButton.js +14 -7
- package/dist/esm/Components/CouponField/CouponField.js +4 -3
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +2 -2
- package/dist/esm/Components/DatePicker/DatePicker.js +8 -2
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +8 -6
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +7 -4
- package/dist/esm/Components/DatePicker/ThemeDatePicker.js +7 -4
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +5 -3
- package/dist/esm/Components/DatePicker/TimePickerInput.js +8 -6
- package/dist/esm/Components/DescriptionList/DescriptionList.js +3 -3
- package/dist/esm/Components/Dropdown/DropDown.js +12 -4
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +2 -1
- package/dist/esm/Components/EmptyState/EmptyState.js +2 -2
- package/dist/esm/Components/FileUpload/FileUpload.js +21 -15
- package/dist/esm/Components/FileUpload/useObjectUrl.js +10 -0
- package/dist/esm/Components/FileUploader/FileUploader.js +9 -3
- package/dist/esm/Components/FilterBar/FilterBar.js +2 -2
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +10 -6
- package/dist/esm/Components/Form/FormWrapper.js +1 -1
- package/dist/esm/Components/FormField/FormField.js +52 -0
- package/dist/esm/Components/FormField/FormFieldProps.js +1 -0
- package/dist/esm/Components/Header/HeaderActions.js +2 -2
- package/dist/esm/Components/Header/components/mobileMenu.js +1 -1
- package/dist/esm/Components/IconButton/IconButton.js +21 -0
- package/dist/esm/Components/IconButton/IconButtonProps.js +1 -0
- package/dist/esm/Components/Input/PhoneNumberInput.js +15 -1
- package/dist/esm/Components/KanbanBoard/AccountCard.js +3 -2
- package/dist/esm/Components/KanbanBoard/AccountRow.js +1 -1
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +56 -39
- package/dist/esm/Components/KanbanBoard/MeasuredItem.js +6 -14
- package/dist/esm/Components/KanbanBoard/boardStore.js +22 -0
- package/dist/esm/Components/Kbd/Kbd.js +1 -1
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +1 -1
- package/dist/esm/Components/Loading/Loading.js +1 -1
- package/dist/esm/Components/MediaGallery/MediaGallery.js +2 -2
- package/dist/esm/Components/MediaGallery/MediaLightbox.js +2 -1
- package/dist/esm/Components/MediaGallery/glass.js +2 -1
- package/dist/esm/Components/MediaViewer/MediaViewer.js +1 -1
- package/dist/esm/Components/MediaViewer/components/MediaAudioPlayer.js +7 -7
- package/dist/esm/Components/MediaViewer/components/MediaImageViewer.js +1 -1
- package/dist/esm/Components/MediaViewer/components/MediaScrubber.js +5 -1
- package/dist/esm/Components/MediaViewer/components/MediaVideoPlayer.js +7 -7
- package/dist/esm/Components/MediaViewer/components/PlaybackTimeline.js +38 -0
- package/dist/esm/Components/MediaViewer/components/TileChip.js +1 -1
- package/dist/esm/Components/Modal/Modal.js +1 -1
- package/dist/esm/Components/MoreItems/MoreItems.js +2 -2
- package/dist/esm/Components/NavLauncher/LauncherTabs.js +58 -0
- package/dist/esm/Components/NavLauncher/NavLauncher.js +204 -54
- package/dist/esm/Components/NavLauncher/NewTabLink.js +4 -3
- package/dist/esm/Components/NavLauncher/launcherParts.js +15 -8
- package/dist/esm/Components/NavLauncher/resultNavigation.js +61 -0
- package/dist/esm/Components/NavLauncher/revealStyles.js +2 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +18 -4
- package/dist/esm/Components/Notification/Notification.js +17 -3
- package/dist/esm/Components/NotificationBell/NotificationBell.js +2 -1
- package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/esm/Components/OffersList/OffersList.js +2 -1
- package/dist/esm/Components/OptionChip/OptionChip.js +3 -2
- package/dist/esm/Components/OrderStatusTimeline/OrderStatusTimeline.js +2 -1
- package/dist/esm/Components/OrderSummary/OrderSummary.js +5 -5
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +16 -7
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +7 -1
- package/dist/esm/Components/PageHeader/PageHeader.js +2 -2
- package/dist/esm/Components/Pagination/Pagination.js +42 -0
- package/dist/esm/Components/Pagination/PaginationProps.js +6 -0
- package/dist/esm/Components/Pagination/pageWindow.js +16 -0
- package/dist/esm/Components/PaymentOption/PaymentOption.js +1 -1
- package/dist/esm/Components/PersonChip/PersonChip.js +2 -2
- package/dist/esm/Components/PinInput/PinInput.js +14 -2
- package/dist/esm/Components/PincodeChecker/PincodeChecker.js +4 -4
- package/dist/esm/Components/PlanPill/PlanPill.js +2 -1
- package/dist/esm/Components/PriceBlock/PriceBlock.js +3 -3
- package/dist/esm/Components/Primitives/Primitives.js +1 -1
- package/dist/esm/Components/ProductBadges/ProductBadges.js +2 -1
- package/dist/esm/Components/ProductCard/ProductCard.js +1 -1
- package/dist/esm/Components/ProductCard/ProductCardAction.js +3 -3
- package/dist/esm/Components/ProductCard/ProductCardSwatches.js +2 -1
- package/dist/esm/Components/ProductCard/cardMetrics.js +2 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +3 -2
- package/dist/esm/Components/QuantityStepper/QuantityStepper.js +2 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +7 -4
- package/dist/esm/Components/RangeSlider/RangeSlider.js +3 -3
- package/dist/esm/Components/Rating/Rating.js +2 -1
- package/dist/esm/Components/Reorder/Reorder.js +3 -2
- package/dist/esm/Components/ReviewList/ReviewList.js +3 -3
- package/dist/esm/Components/ReviewSummary/ReviewSummary.js +3 -3
- package/dist/esm/Components/SaveBar/SaveBar.js +2 -2
- package/dist/esm/Components/Search/Search.js +2 -9
- package/dist/esm/Components/Search/ctrlShortcut.js +25 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +120 -33
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +11 -6
- package/dist/esm/Components/Select/SelectPopup.js +6 -4
- package/dist/esm/Components/SelectSearch/SelectSearch.js +5 -4
- package/dist/esm/Components/SettingRow/SettingRow.js +1 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +2 -1
- package/dist/esm/Components/SideBar/SideBar.js +83 -22
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +4 -3
- package/dist/esm/Components/SideBar/components/MenuItems.js +4 -4
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/esm/Components/SideBar/components/OverflowTooltipText.js +4 -5
- package/dist/esm/Components/SideBar/components/PinnedSection.js +2 -2
- package/dist/esm/Components/SideBar/components/TextTruncation.js +9 -7
- package/dist/esm/Components/SideBar/sidebarScale.js +2 -1
- package/dist/esm/Components/Skeletons/Skeletons.js +4 -2
- package/dist/esm/Components/SkipLink/SkipLink.js +50 -0
- package/dist/esm/Components/SkipLink/SkipLinkProps.js +1 -0
- package/dist/esm/Components/Slider/Slider.js +11 -4
- package/dist/esm/Components/SpecTable/SpecTable.js +2 -1
- package/dist/esm/Components/StageProgress/StageItem.js +2 -5
- package/dist/esm/Components/StageProgress/StageProgress.js +2 -1
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -6
- package/dist/esm/Components/StageProgress/centerInStrip.js +11 -0
- package/dist/esm/Components/StatCard/StatCard.js +5 -4
- package/dist/esm/Components/StickyBuyBar/StickyBuyBar.js +2 -2
- package/dist/esm/Components/Table/components/TableActions.js +42 -26
- package/dist/esm/Components/Table/components/TableBody.js +25 -40
- package/dist/esm/Components/Table/components/rowMeasurer.js +66 -0
- package/dist/esm/Components/Table/filters/TableFilters.js +3 -14
- package/dist/esm/Components/Table/hooks/useTable.js +12 -9
- package/dist/esm/Components/Tabs/components/CountBadge.js +3 -3
- package/dist/esm/Components/Tabs/components/Tab.js +5 -4
- package/dist/esm/Components/Tabs/components/TabList.js +16 -1
- package/dist/esm/Components/Tag/Tag.js +11 -8
- package/dist/esm/Components/Tag/Tag.styles.js +6 -4
- package/dist/esm/Components/TagInput/TagInput.js +94 -0
- package/dist/esm/Components/TagInput/TagInputProps.js +1 -0
- package/dist/esm/Components/TagInput/tagEntries.js +39 -0
- package/dist/esm/Components/TimePicker/TimePicker.js +45 -0
- package/dist/esm/Components/TimePicker/TimePickerProps.js +1 -0
- package/dist/esm/Components/TimePicker/timeParts.js +26 -0
- package/dist/esm/Components/Timeline/Timeline.js +11 -9
- package/dist/esm/Components/Toaster/Toaster.js +2 -1
- package/dist/esm/Components/Toggle/TableToggle.js +4 -3
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +7 -5
- package/dist/esm/Components/ToolTip/ToolTip.js +89 -11
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +4 -2
- package/dist/esm/Components/UserDetails/UserDetails.js +7 -1
- package/dist/esm/Components/VisuallyHidden/VisuallyHidden.js +18 -0
- package/dist/esm/Components/VisuallyHidden/VisuallyHiddenProps.js +1 -0
- package/dist/esm/Components/WizardDialog/WizardDialog.js +11 -6
- package/dist/esm/Components/WorkspaceWindow/WorkspaceTrayPreview.js +2 -1
- package/dist/esm/Components/WorkspaceWindow/WorkspaceWindow.js +13 -3
- package/dist/esm/Hooks/sharedResizeObserver.js +73 -0
- package/dist/esm/Hooks/useIsTruncated.js +3 -4
- package/dist/esm/Theme/chakra/createBrandTheme.js +34 -4
- package/dist/esm/Theme/chakra/focusRing.styles.js +3 -0
- package/dist/esm/Theme/chakra/motion.js +25 -0
- package/dist/esm/Theme/index.js +12 -9
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +22 -13
- package/dist/esm/Theme/provider/ThemeSwitcher.js +3 -2
- package/dist/esm/Theme/tokens/brands/emerald/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/index.js +14 -13
- package/dist/esm/Theme/tokens/brands/lavender/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/meadow/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/radiant/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/rosewood/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/skyline/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/slate/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/storefront/palette.dark.js +2 -1
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +28 -24
- package/dist/esm/Theme/tokens/builders/color.js +10 -6
- package/dist/esm/Theme/tokens/builders/filledSurface.js +7 -7
- package/dist/esm/Theme/tokens/builders/lazy.js +49 -0
- package/dist/esm/Theme/tokens/builders/memo.js +21 -0
- package/dist/esm/Theme/tokens/builders/memoByReads.js +46 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +10 -2
- package/dist/esm/Theme/tokens/builders/tone.js +5 -4
- package/dist/esm/Theme/tokens/primitives/borderWidths.js +2 -0
- package/dist/esm/Theme/tokens/primitives/index.js +5 -3
- package/dist/esm/Theme/tokens/primitives/motion.js +20 -4
- package/dist/esm/Theme/tokens/primitives/optionRowSizes.js +2 -1
- package/dist/esm/Theme/tokens/primitives/radii.js +13 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +3 -1
- package/dist/esm/Theme/tokens/primitives/states.js +1 -0
- package/dist/esm/Theme/tokens/primitives/typography.js +20 -0
- package/dist/esm/Theme/tokens/primitives/zIndices.js +1 -0
- package/dist/esm/Utils/formatDate.js +138 -0
- package/dist/esm/index.js +18 -2
- package/dist/index.d.ts +34 -5
- package/dist/index.js +47 -4
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useRowHover = exports.stretchedLink = exports.useRowFocus = exports.titleInset = exports.activeRowSurface = exports.activeRowStyle = exports.ROW_CONTAINER = exports.WIDE_ROW = exports.isPlainClick = exports.ITEM_SELECTOR = void 0;
|
|
6
|
+
exports.useRowHover = exports.stretchedLink = exports.useRowFocus = exports.titleInset = exports.activeRowSurface = exports.activeRowStyle = exports.ROW_CONTAINER = exports.WIDE_ROW = exports.isPlainClick = exports.useTouchDensity = exports.TouchDensity = exports.ITEM_SELECTOR = void 0;
|
|
7
7
|
exports.CountBadge = CountBadge;
|
|
8
8
|
exports.NewTag = NewTag;
|
|
9
9
|
exports.SectionHeader = SectionHeader;
|
|
@@ -33,6 +33,10 @@ const NewTabLink_1 = __importDefault(require("./NewTabLink"));
|
|
|
33
33
|
const PinToggle_1 = __importDefault(require("./PinToggle"));
|
|
34
34
|
const revealStyles_1 = require("./revealStyles");
|
|
35
35
|
exports.ITEM_SELECTOR = "[data-launcher-item]";
|
|
36
|
+
const TouchDensityContext = (0, react_2.createContext)(false);
|
|
37
|
+
exports.TouchDensity = TouchDensityContext.Provider;
|
|
38
|
+
const useTouchDensity = () => (0, react_2.useContext)(TouchDensityContext);
|
|
39
|
+
exports.useTouchDensity = useTouchDensity;
|
|
36
40
|
const isPlainClick = (event) => event.button === 0 &&
|
|
37
41
|
!event.metaKey &&
|
|
38
42
|
!event.ctrlKey &&
|
|
@@ -138,6 +142,7 @@ function Highlight({ text, query }) {
|
|
|
138
142
|
}
|
|
139
143
|
function RowActions({ children }) {
|
|
140
144
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
145
|
+
const isTouch = (0, exports.useTouchDensity)();
|
|
141
146
|
const revealed = REVEALED.replace(/ &/g, " > &");
|
|
142
147
|
return ((0, jsx_runtime_1.jsx)(react_1.Flex, { sx: {
|
|
143
148
|
[NARROW_ROW]: {
|
|
@@ -146,7 +151,7 @@ function RowActions({ children }) {
|
|
|
146
151
|
borderRadius: "6px",
|
|
147
152
|
},
|
|
148
153
|
},
|
|
149
|
-
}, position: "absolute", top: "7px", right: "4px", h: "19px", align: "center", gap: "2px", zIndex: 1, children: children }));
|
|
154
|
+
}, position: "absolute", top: isTouch ? "12px" : "7px", right: "4px", h: "19px", align: "center", gap: "2px", zIndex: 1, children: children }));
|
|
150
155
|
}
|
|
151
156
|
function RowTip({ text }) {
|
|
152
157
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -157,19 +162,21 @@ function ModuleRow({ module, keyScreens, isPinned, onTogglePin, pinId, labels, l
|
|
|
157
162
|
const hover = (0, exports.useRowHover)();
|
|
158
163
|
const focus = (0, exports.useRowFocus)();
|
|
159
164
|
const ring = (0, focusRing_styles_1.focusVisibleStyles)(colors);
|
|
165
|
+
const isTouch = (0, exports.useTouchDensity)();
|
|
160
166
|
const base = typeof module.badge === "number" || module.badge ? 24 : 0;
|
|
161
167
|
const open = base + (onTogglePin ? 46 : 24);
|
|
162
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, "data-nav-cell": true, position: "relative", align: "flex-start", gap: "10px", minH: "34px", pl: "8px", pr: "4px", pt: "7px", pb: "5px", borderRadius: "8px", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: hover._hover, _focusWithin: hover._focusWithin, sx: { ...focus.sx, ...exports.ROW_CONTAINER }, children: [(0, jsx_runtime_1.jsx)(RowIcon, { icon: module.icon, size: 16, mt: "2px" }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { direction: "column", flex: 1, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "6px", h: "19px", minW: 0, sx: (0, exports.titleInset)(base, open), children: [(0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: module.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: module.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": onTogglePin ? pinId : undefined, onClick: link.onPlainClick, minW: 0, fontSize: "13.5px", fontWeight: 500, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("8px"), children: module.label }) }), module.isNew ? (0, jsx_runtime_1.jsx)(NewTag, { label: labels.newBadge }) : null] }), keyScreens.length ? ((0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: keyScreens.map((screen) => screen.label).join(" · "), placement: "bottom-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { role: "group", "aria-label": `${module.label} ${labels.screens}`, position: "relative", zIndex: 1, w: "fit-content", maxW: "100%", fontSize: "11.5px", lineHeight: "15px", color: colors.textMuted, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: keyScreens.map((screen, i) => ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [i > 0 ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": true, mx: "5px", opacity: 0.7, children: "\u00B7" })) : null, (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, onClick: link.onPlainClick, color: "inherit", borderRadius: "sm", position: "relative", zIndex: 1, _hover: {
|
|
168
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, "data-nav-cell": true, position: "relative", align: "flex-start", gap: "10px", minH: isTouch ? "44px" : "34px", pl: "8px", pr: "4px", pt: isTouch ? "12px" : "7px", pb: isTouch ? "8px" : "5px", borderRadius: "8px", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: hover._hover, _focusWithin: hover._focusWithin, sx: { ...focus.sx, ...exports.ROW_CONTAINER }, children: [(0, jsx_runtime_1.jsx)(RowIcon, { icon: module.icon, size: 16, mt: "2px" }), (0, jsx_runtime_1.jsxs)(react_1.Flex, { direction: "column", flex: 1, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", gap: "6px", h: "19px", minW: 0, sx: (0, exports.titleInset)(base, open), children: [(0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: module.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: module.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": onTogglePin ? pinId : undefined, onClick: link.onPlainClick, minW: 0, fontSize: "13.5px", fontWeight: 500, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("8px"), children: module.label }) }), module.isNew ? (0, jsx_runtime_1.jsx)(NewTag, { label: labels.newBadge }) : null] }), keyScreens.length ? ((0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: keyScreens.map((screen) => screen.label).join(" · "), placement: "bottom-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { role: "group", "aria-label": `${module.label} ${labels.screens}`, position: "relative", zIndex: 1, w: "fit-content", maxW: "100%", fontSize: "11.5px", lineHeight: "15px", color: colors.textMuted, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", children: keyScreens.map((screen, i) => ((0, jsx_runtime_1.jsxs)(react_2.Fragment, { children: [i > 0 ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": true, mx: "5px", opacity: 0.7, children: "\u00B7" })) : null, (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, onClick: link.onPlainClick, color: "inherit", borderRadius: "sm", position: "relative", zIndex: 1, _hover: {
|
|
163
169
|
textDecoration: "underline",
|
|
164
170
|
textUnderlineOffset: "2px",
|
|
165
|
-
}, sx: ring, children: screen.label })] }, screen.id))) }) })) : null] }), (0, jsx_runtime_1.jsxs)(RowActions, { children: [(0, jsx_runtime_1.jsx)(CountBadge, { value: module.badge }), onTogglePin ? ((0, jsx_runtime_1.jsx)(PinToggle_1.default, { isPinned: isPinned, label: isPinned ? labels.unpin(module.label) : labels.pin(module.label), title: "", onToggle: onTogglePin })) : null, (0, jsx_runtime_1.jsx)(NewTabLink_1.default, { href: module.href, label: labels.openInNewTab(module.label), linkAs: link.linkAs })] }), onTogglePin ? ((0, jsx_runtime_1.jsx)(RowTip, { text: isPinned ? labels.unpinTip : labels.pinTip })) : null] }));
|
|
171
|
+
}, sx: ring, children: screen.label })] }, screen.id))) }) })) : null] }), (0, jsx_runtime_1.jsxs)(RowActions, { children: [(0, jsx_runtime_1.jsx)(CountBadge, { value: module.badge }), onTogglePin ? ((0, jsx_runtime_1.jsx)(PinToggle_1.default, { isPinned: isPinned, label: isPinned ? labels.unpin(module.label) : labels.pin(module.label), title: "", onToggle: onTogglePin })) : null, (0, jsx_runtime_1.jsx)(NewTabLink_1.default, { href: module.href, label: labels.openInNewTab(module.label), tip: labels.newTabTip, linkAs: link.linkAs })] }), onTogglePin ? ((0, jsx_runtime_1.jsx)(RowTip, { text: isPinned ? labels.unpinTip : labels.pinTip })) : null] }));
|
|
166
172
|
}
|
|
167
173
|
function RailRow({ screen, module, link, isStrong = false, trailing, pinId, }) {
|
|
168
174
|
var _a;
|
|
169
175
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
170
176
|
const hover = (0, exports.useRowHover)();
|
|
171
177
|
const focus = (0, exports.useRowFocus)();
|
|
172
|
-
|
|
178
|
+
const isTouch = (0, exports.useTouchDensity)();
|
|
179
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, position: "relative", align: "center", gap: "10px", h: isTouch ? "44px" : "32px", pl: "8px", pr: "4px", borderRadius: "8px", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: hover._hover, _focusWithin: hover._focusWithin, sx: focus.sx, children: [(0, jsx_runtime_1.jsx)(RowIcon, { icon: (_a = screen.icon) !== null && _a !== void 0 ? _a : module.icon, size: 15 }), (0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: screen.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": pinId, onClick: link.onPlainClick, flex: 1, minW: 0, fontSize: "13px", fontWeight: isStrong ? 500 : 400, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("8px"), children: screen.label }) }), (0, jsx_runtime_1.jsx)(react_1.Flex, { position: "relative", zIndex: 1, align: "center", gap: "2px", children: trailing })] }));
|
|
173
180
|
}
|
|
174
181
|
function PinTextButton({ label, text, onToggle }) {
|
|
175
182
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
@@ -184,13 +191,14 @@ function PinnedTile({ screen, module, link, labels, onTogglePin, }) {
|
|
|
184
191
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
185
192
|
const Icon = (_a = screen.icon) !== null && _a !== void 0 ? _a : module.icon;
|
|
186
193
|
const focus = (0, exports.useRowFocus)(true);
|
|
187
|
-
|
|
194
|
+
const isTouch = (0, exports.useTouchDensity)();
|
|
195
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { "data-group": true, "data-nav-cell": true, position: "relative", align: "center", gap: "8px", h: isTouch ? "44px" : "36px", pl: "9px", pr: "4px", borderRadius: "9px", borderWidth: "1px", borderColor: colors.boxborder[200], bg: colors.surfaceRaised, transition: (0, motion_1.transitionFor)(["border-color", "background-color"]), _hover: { borderColor: colors.gray[300] }, sx: focus.sx, children: [Icon ? ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", display: "inline-flex", flexShrink: 0, color: colors.accentText, children: (0, jsx_runtime_1.jsx)(Icon, { size: 15, strokeWidth: 1.8, "aria-hidden": true }) })) : null, (0, jsx_runtime_1.jsx)(OverflowToolTip_1.default, { label: screen.label, placement: "top-start", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: link.linkAs, href: screen.href, "data-launcher-item": true, ...focus.primary, "data-pin-id": onTogglePin ? screen.id : undefined, onClick: link.onPlainClick, flex: 1, minW: 0, fontSize: "13px", fontWeight: 500, color: colors.text[900], noOfLines: 1, borderRadius: "sm", sx: (0, exports.stretchedLink)("9px"), children: screen.label }) }), (0, jsx_runtime_1.jsx)(CountBadge, { value: screen.badge, size: "tile" }), onTogglePin ? ((0, jsx_runtime_1.jsx)(react_1.Box, { position: "relative", zIndex: 1, flexShrink: 0, w: "0", overflow: "hidden", transition: (0, motion_1.transitionFor)(["width"]), _groupHover: { w: "22px" }, _groupFocusWithin: { w: "22px" }, children: (0, jsx_runtime_1.jsx)(PinToggle_1.default, { isPinned: true, size: 12, label: labels.unpin(screen.label), title: labels.unpinTip, onToggle: onTogglePin }) })) : null] }));
|
|
188
196
|
}
|
|
189
|
-
function AppsSection({ apps, hues, currentAppId, heading, onSelect, }) {
|
|
197
|
+
function AppsSection({ apps, hues, currentAppId, heading, hideHeading = false, onSelect, }) {
|
|
190
198
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
191
199
|
const rows = (0, rowStates_1.listRowBackgrounds)(colors);
|
|
192
200
|
const rowRing = (0, exports.activeRowSurface)(colors);
|
|
193
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(SectionHeader, { label: heading, isRail: true, hasCount: false }), (0, jsx_runtime_1.jsx)(react_1.Box, { as: "ul", listStyleType: "none", m: 0, p: 0, "aria-label": heading, children: apps.map((app, index) => {
|
|
201
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [hideHeading ? null : (0, jsx_runtime_1.jsx)(SectionHeader, { label: heading, isRail: true, hasCount: false }), (0, jsx_runtime_1.jsx)(react_1.Box, { as: "ul", listStyleType: "none", m: 0, p: 0, "aria-label": heading, children: apps.map((app, index) => {
|
|
194
202
|
var _a;
|
|
195
203
|
const isCurrent = app.id === currentAppId;
|
|
196
204
|
const interactive = !isCurrent && !app.locked;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type ResultKey = "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "Home" | "End" | "PageUp" | "PageDown";
|
|
2
|
+
/** Next flat result index for a key, following the visual grid: rows by `columns` inside a group, reading order across columns. */
|
|
3
|
+
export declare const moveResult: (sizes: readonly number[], columns: number, index: number, key: ResultKey, pageRows?: number) => number;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moveResult = void 0;
|
|
4
|
+
const locate = (sizes, index) => {
|
|
5
|
+
let start = 0;
|
|
6
|
+
for (let group = 0; group < sizes.length; group += 1) {
|
|
7
|
+
if (index < start + sizes[group])
|
|
8
|
+
return { group, pos: index - start, start };
|
|
9
|
+
start += sizes[group];
|
|
10
|
+
}
|
|
11
|
+
return {
|
|
12
|
+
group: sizes.length - 1,
|
|
13
|
+
pos: 0,
|
|
14
|
+
start: start - sizes[sizes.length - 1],
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const startOf = (sizes, group) => sizes.slice(0, group).reduce((sum, size) => sum + size, 0);
|
|
18
|
+
const stepVertical = (sizes, columns, index, down, wrap) => {
|
|
19
|
+
const { group, pos, start } = locate(sizes, index);
|
|
20
|
+
const size = sizes[group];
|
|
21
|
+
const column = pos % columns;
|
|
22
|
+
if (down) {
|
|
23
|
+
if (pos + columns < size)
|
|
24
|
+
return index + columns;
|
|
25
|
+
if (Math.floor(pos / columns) < Math.floor((size - 1) / columns))
|
|
26
|
+
return start + size - 1;
|
|
27
|
+
const next = group + 1 < sizes.length ? group + 1 : wrap ? 0 : -1;
|
|
28
|
+
if (next < 0)
|
|
29
|
+
return index;
|
|
30
|
+
return startOf(sizes, next) + Math.min(column, sizes[next] - 1);
|
|
31
|
+
}
|
|
32
|
+
if (pos - columns >= 0)
|
|
33
|
+
return index - columns;
|
|
34
|
+
const prev = group > 0 ? group - 1 : wrap ? sizes.length - 1 : -1;
|
|
35
|
+
if (prev < 0)
|
|
36
|
+
return index;
|
|
37
|
+
const lastRow = Math.floor((sizes[prev] - 1) / columns);
|
|
38
|
+
return (startOf(sizes, prev) + Math.min(sizes[prev] - 1, lastRow * columns + column));
|
|
39
|
+
};
|
|
40
|
+
/** Next flat result index for a key, following the visual grid: rows by `columns` inside a group, reading order across columns. */
|
|
41
|
+
const moveResult = (sizes, columns, index, key, pageRows = 1) => {
|
|
42
|
+
const total = sizes.reduce((sum, size) => sum + size, 0);
|
|
43
|
+
if (total === 0)
|
|
44
|
+
return 0;
|
|
45
|
+
switch (key) {
|
|
46
|
+
case "ArrowDown":
|
|
47
|
+
case "ArrowUp":
|
|
48
|
+
return stepVertical(sizes, columns, index, key === "ArrowDown", true);
|
|
49
|
+
case "ArrowRight":
|
|
50
|
+
return Math.min(total - 1, index + 1);
|
|
51
|
+
case "ArrowLeft":
|
|
52
|
+
return Math.max(0, index - 1);
|
|
53
|
+
case "Home":
|
|
54
|
+
return 0;
|
|
55
|
+
case "End":
|
|
56
|
+
return total - 1;
|
|
57
|
+
default: {
|
|
58
|
+
let next = index;
|
|
59
|
+
for (let i = 0; i < pageRows; i += 1)
|
|
60
|
+
next = stepVertical(sizes, columns, next, key === "PageDown", false);
|
|
61
|
+
return next;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
exports.moveResult = moveResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SystemStyleObject } from "@chakra-ui/react";
|
|
2
2
|
import type { PaletteProps } from "../../Theme/tokens/types";
|
|
3
|
-
/** Shows a row affordance on row hover, row focus-within or its own keyboard focus, and always on touch. */
|
|
3
|
+
/** Shows a row affordance on row hover, row focus-within or its own keyboard focus, and always on touch, where it also grows to a 32px hit area. */
|
|
4
4
|
export declare const revealStyles: (colors: PaletteProps) => SystemStyleObject;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.revealStyles = void 0;
|
|
4
4
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
5
5
|
const motion_1 = require("../../Theme/chakra/motion");
|
|
6
|
-
/** Shows a row affordance on row hover, row focus-within or its own keyboard focus, and always on touch. */
|
|
6
|
+
/** Shows a row affordance on row hover, row focus-within or its own keyboard focus, and always on touch, where it also grows to a 32px hit area. */
|
|
7
7
|
const revealStyles = (colors) => {
|
|
8
8
|
const ring = (0, focusRing_styles_1.focusVisibleStyles)(colors);
|
|
9
9
|
return {
|
|
@@ -12,7 +12,7 @@ const revealStyles = (colors) => {
|
|
|
12
12
|
_groupHover: { opacity: 1 },
|
|
13
13
|
_groupFocusWithin: { opacity: 1 },
|
|
14
14
|
"[data-reveal=true] &": { opacity: 1 },
|
|
15
|
-
"@media (hover: none)": { opacity: 1 },
|
|
15
|
+
"@media (hover: none)": { opacity: 1, minWidth: "32px", width: "32px", height: "32px" },
|
|
16
16
|
...(0, motion_1.reducedMotionSx)(),
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -12,6 +12,7 @@ const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
|
12
12
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
13
13
|
const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
|
|
14
14
|
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
15
|
+
const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
|
|
15
16
|
const PersonChip_1 = __importDefault(require("../PersonChip/PersonChip"));
|
|
16
17
|
const lucide_react_1 = require("lucide-react");
|
|
17
18
|
// Roomy enough to hover without aiming: the glyph is only 1.25rem.
|
|
@@ -44,7 +45,7 @@ function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavO
|
|
|
44
45
|
px: "0.625rem",
|
|
45
46
|
py: "0.5rem",
|
|
46
47
|
fontWeight: 500,
|
|
47
|
-
fontSize: "
|
|
48
|
+
fontSize: "xs-plus",
|
|
48
49
|
color: theme.colors.text[900],
|
|
49
50
|
gap: theme.space["2"],
|
|
50
51
|
transition: "background 0.12s",
|
|
@@ -52,7 +53,7 @@ function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavO
|
|
|
52
53
|
_focus: { bg: menuHoverBg },
|
|
53
54
|
_active: { bg: rowBackgrounds.selectedActive },
|
|
54
55
|
};
|
|
55
|
-
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] }) })), leading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leading, (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": "true", mx: 2, w: "1px", h: "1.625rem", bg: theme.colors.boxborder[200] })] })), (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: "
|
|
56
|
+
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", gap: 2, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", gap: 1.5, alignItems: "center", flex: "1 1 0%", 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, flexShrink: 0, 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", flexShrink: 0, 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] }) })), leading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [leading, (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", "aria-hidden": "true", mx: 2, w: "1px", h: "1.625rem", flexShrink: 0, bg: theme.colors.boxborder[200] })] })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: typeof navigationBarText.text === "string" ? navigationBarText.text : "", overflowOnly: true, placement: "bottom", children: (0, jsx_runtime_1.jsx)(react_1.Text, { flex: "1 1 0%", w: 0, minW: 0, isTruncated: true, color: (0, accentText_1.accentTextOnCanvas)(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "xl", 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, sx: { "& > *": { 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)(Avatar_1.default, { size: "sm", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsx)(react_1.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
|
|
56
57
|
// Without a cap one long title stretches the whole dropdown; titles truncate instead.
|
|
57
58
|
maxW: "18rem", bg: theme.colors.surfaceRaised,
|
|
58
59
|
// NOTE: Chakra's MenuItem inherits --menu-bg hardcoded to #fff via dead _dark — set it or items stay white.
|
|
@@ -6,6 +6,7 @@ export type NavbarProps = {
|
|
|
6
6
|
userName: string;
|
|
7
7
|
userRole?: string;
|
|
8
8
|
navMenu: MenuProps[];
|
|
9
|
+
/** Right-cluster slot before the avatar (org switcher, bell, launcher trigger). Its child may shrink; give icon buttons `flexShrink={0}`. */
|
|
9
10
|
moreIcon?: ReactNode;
|
|
10
11
|
handleNavOnClick: (url: string) => void;
|
|
11
12
|
handleLogout: () => void;
|
|
@@ -9,6 +9,13 @@ const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
|
|
|
9
9
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
10
10
|
const fieldStyles_1 = require("../Common/fieldStyles");
|
|
11
11
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
12
|
+
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
13
|
+
const onActivationKey = (activate) => (e) => {
|
|
14
|
+
if (e.key !== "Enter" && e.key !== " ")
|
|
15
|
+
return;
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
activate();
|
|
18
|
+
};
|
|
12
19
|
const countWords = (text = "") => {
|
|
13
20
|
const t = text.trim();
|
|
14
21
|
if (!t)
|
|
@@ -19,6 +26,7 @@ const countWords = (text = "") => {
|
|
|
19
26
|
const NoteTextArea = (0, react_1.forwardRef)(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, customPlaceholder = "Add a note...", cancelButtonHide = false, titleAriaLabel = "Note title", noteAriaLabel = customPlaceholder, }, ref) {
|
|
20
27
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
21
28
|
const noteAreaRef = (0, react_1.useRef)(null);
|
|
29
|
+
const fileInputRef = (0, react_1.useRef)(null);
|
|
22
30
|
const mergedNoteRef = (0, react_2.useMergeRefs)(noteAreaRef, ref);
|
|
23
31
|
const fileInputId = `note-text-area-file-${(0, react_1.useId)().replace(/:/g, "")}`;
|
|
24
32
|
const [isActive, setIsActive] = (0, react_1.useState)(false);
|
|
@@ -83,6 +91,7 @@ const NoteTextArea = (0, react_1.forwardRef)(function NoteTextArea({ width = "10
|
|
|
83
91
|
setFiles([]);
|
|
84
92
|
}
|
|
85
93
|
};
|
|
94
|
+
const openFilePicker = () => { var _a; return (_a = fileInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); };
|
|
86
95
|
const handleCloseTextArea = () => {
|
|
87
96
|
setIsActive(false);
|
|
88
97
|
handleCancel === null || handleCancel === void 0 ? void 0 : handleCancel(!isActive);
|
|
@@ -124,15 +133,20 @@ const NoteTextArea = (0, react_1.forwardRef)(function NoteTextArea({ width = "10
|
|
|
124
133
|
const isOverLimit = noteWordCount > maxNoteWordCount;
|
|
125
134
|
const collapsedHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[50], theme.colors.background[50]);
|
|
126
135
|
const activeControlHoverBg = (0, outlineRung_1.resolveHoverTint)(theme.colors.gray[100], theme.colors.gray[50]);
|
|
127
|
-
|
|
136
|
+
// NOTE: drawn inset because the rounded shell clips overflow.
|
|
137
|
+
const placeholderFocusRing = {
|
|
138
|
+
outline: "2px solid transparent",
|
|
139
|
+
boxShadow: (0, focusRing_styles_1.insetFocusRingShadow)(theme.colors),
|
|
140
|
+
};
|
|
141
|
+
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: (0, motion_1.transitionFor)(["border-color"]), children: [!isActive && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 3, gap: 2, align: "center", cursor: "text", role: "button", tabIndex: 0, onClick: handleTextArea, onKeyDown: onActivationKey(handleTextArea), _focusVisible: placeholderFocusRing, bg: theme.colors.background[50], borderRadius: fieldStyles_1.FIELD_RADIUS, minH: "2.5rem", transition: (0, motion_1.transitionFor)(["background-color"]), _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, { value: titleValue, onChange: (e) => {
|
|
128
142
|
if (e.target.value.length === 0)
|
|
129
143
|
setTitleShow(false);
|
|
130
144
|
setTitleValue(e.target.value);
|
|
131
|
-
}, placeholder: "Add a title...", "aria-label": titleAriaLabel, variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "
|
|
145
|
+
}, placeholder: "Add a title...", "aria-label": titleAriaLabel, variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "sm", color: theme.colors.text[700], _placeholder: {
|
|
132
146
|
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
133
|
-
} }), (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: mergedNoteRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, "aria-label": noteAriaLabel, variant: "unstyled", resize: "none", minH: "76px", fontSize: "
|
|
147
|
+
} }), (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: mergedNoteRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, "aria-label": noteAriaLabel, variant: "unstyled", resize: "none", minH: "76px", fontSize: "xs", color: theme.colors.text[700], _placeholder: {
|
|
134
148
|
color: (0, placeholderInk_1.placeholderInk)(theme.colors),
|
|
135
|
-
}, 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",
|
|
149
|
+
}, 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: "span", role: "button", tabIndex: 0, "aria-label": "Attach files", onClick: openFilePicker, onKeyDown: onActivationKey(openFilePicker), _focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors), cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: (0, motion_1.transitionFor)(["background-color"]), _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: (0, motion_1.transitionFor)(["background-color"]), _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", { ref: fileInputRef, id: fileInputId, type: "file", style: { display: "none" }, onChange: (e) => {
|
|
136
150
|
const newFiles = Array.from(e.target.files || []);
|
|
137
151
|
const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
|
|
138
152
|
const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
|
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
/** Plain Chakra Textarea + title + file attach, not a rich text editor — no formatting toolbar despite the "note" naming. Use Editor for HTML content. */
|
|
2
2
|
export type NoteTextAreaProps = {
|
|
3
3
|
width?: number | string;
|
|
4
|
+
/** Save click with note, title and files; `resetState` is never passed. */
|
|
4
5
|
handleSubmit: (noteValue: string, titleValue: string, file: File[], resetState: void) => void;
|
|
6
|
+
/** Seeds the note only while isEditable is true; not a controlled value. */
|
|
5
7
|
value?: string;
|
|
8
|
+
/** Seeds and reveals the title input only while isEditable is true. */
|
|
6
9
|
title?: string;
|
|
10
|
+
/** Seeds the attachments only while isEditable is true. */
|
|
7
11
|
file?: File[];
|
|
12
|
+
/** Edit mode: opens expanded, seeds value/title/file, and keeps them after saving. */
|
|
8
13
|
isEditable?: boolean;
|
|
14
|
+
/** Fires on Cancel; its argument is always false. */
|
|
9
15
|
handleCancel?: (isActive: boolean) => void;
|
|
10
16
|
/** Any transition to false while isEditable is not true clears the note, title and files — including after a failed save, not just success. */
|
|
11
17
|
saveButtonLoading?: boolean;
|
|
18
|
+
/** Per-file byte limit, default 1 MB; larger files are skipped with an error line. */
|
|
12
19
|
maxFileSize?: number;
|
|
20
|
+
/** Error prefix; the formatted limit and a full stop are appended. */
|
|
13
21
|
maxFilesSizeError?: string;
|
|
22
|
+
/** Disables Save past this many words (default 15); the counter shows note words only. */
|
|
14
23
|
maxNoteWordCount?: number;
|
|
24
|
+
/** Note text after each edit; whitespace-only input is rejected and not reported. */
|
|
15
25
|
onChange?: (value: string) => void;
|
|
26
|
+
/** Collapsed prompt and textarea placeholder; also the default noteAriaLabel. */
|
|
16
27
|
customPlaceholder?: string;
|
|
28
|
+
/** Hides Cancel; the composer then collapses only after a save completes. */
|
|
17
29
|
cancelButtonHide?: boolean;
|
|
18
30
|
/** Accessible name for the title input. Defaults to `"Note title"`. */
|
|
19
31
|
titleAriaLabel?: string;
|
|
@@ -12,6 +12,10 @@ const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
|
12
12
|
const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
|
|
13
13
|
const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
|
|
14
14
|
const Avatar_1 = __importDefault(require("../Avatar/Avatar"));
|
|
15
|
+
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
16
|
+
const motion_1 = require("../../Theme/chakra/motion");
|
|
17
|
+
const CARD_TRANSITION = "box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease";
|
|
18
|
+
const DISMISS_TRANSITION = "background-color 0.2s ease, color 0.2s ease, transform 0.2s ease";
|
|
15
19
|
/** Date-driven countdown card ("due in 3 days" / "overdue by 2 hours"). For inbox-style rows use `NotificationItem`, which cannot render a future date. */
|
|
16
20
|
const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
|
|
17
21
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -104,15 +108,25 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
|
|
|
104
108
|
return ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", children: (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "4" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "14px", width: "60%" })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { align: "center", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.SkeletonCircle, { size: "8" }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 1, flex: "1", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "16px", width: "70%" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "50%" })] })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: borderColor }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { justify: "space-between", w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "40%" }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { height: "12px", width: "30%" })] })] }) }));
|
|
105
109
|
}
|
|
106
110
|
// 🧩 Normal render
|
|
107
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md", transform: "translateY(-2px)" }, transition:
|
|
111
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md", transform: "translateY(-2px)" }, transition: CARD_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), position: "relative", children: [onClose && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
|
|
108
112
|
if (e.key === "Enter" || e.key === " ") {
|
|
109
113
|
e.preventDefault();
|
|
110
114
|
onClose();
|
|
111
115
|
}
|
|
112
|
-
}, tabIndex: 0, p: 1, borderRadius: "md", _hover: {
|
|
116
|
+
}, role: "button", "aria-label": "Dismiss notification", tabIndex: 0, p: 1, borderRadius: "md", _hover: {
|
|
113
117
|
bg: closeTone.bg,
|
|
114
118
|
color: closeTone.fg,
|
|
115
119
|
transform: "scale(1.1)",
|
|
116
|
-
}, transition:
|
|
120
|
+
}, transition: DISMISS_TRANSITION, sx: (0, motion_1.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 16 }) })), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: TimeIcon, color: dueLabelColor, boxSize: 4 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: dueLabelColor, fontWeight: 600, children: timeLabel })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { align: "center", spacing: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(Avatar_1.default, { size: "sm", name: notification.host || notification.title, src: notification.avatarUrl || undefined }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "start", spacing: 0, flex: "1", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: 700, fontSize: "md", color: titleColor, cursor: "pointer", _hover: { textColor: theme.colors.accentText }, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(notification.id, notification.type), ...(onClick && {
|
|
121
|
+
role: "button",
|
|
122
|
+
tabIndex: 0,
|
|
123
|
+
onKeyDown: (e) => {
|
|
124
|
+
if (e.key !== "Enter" && e.key !== " ")
|
|
125
|
+
return;
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
onClick(notification.id, notification.type);
|
|
128
|
+
},
|
|
129
|
+
_focusVisible: (0, focusRing_styles_1.focusVisibleRing)(theme.colors),
|
|
130
|
+
}), children: notification.title }), notification.description && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: textColor, children: notification.description }))] })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: borderColor }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { justify: "space-between", w: "100%", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Calendar, color: metaColor, boxSize: 4 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: metaColor, children: formattedStartDateTime })] }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.User, color: metaColor, boxSize: 4 }), notification.host && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: metaColor, children: notification.host }))] }), showStatus && ((0, jsx_runtime_1.jsx)(react_2.Box, { boxSize: "3", bg: getStatusColor(), borderRadius: "full" }))] })] })] }));
|
|
117
131
|
};
|
|
118
132
|
exports.default = Notification;
|
|
@@ -1,32 +1,48 @@
|
|
|
1
1
|
/** The event/task/call record a Notification card renders; startDate/dueDate/endDate drive its countdown text. */
|
|
2
2
|
export type NotificationData = {
|
|
3
|
+
/** Echoed back to onClick together with `type`. */
|
|
3
4
|
id: number;
|
|
5
|
+
/** Card heading; also the avatar's initials when `host` is empty. */
|
|
4
6
|
title: string;
|
|
7
|
+
/** Avatar image; initials from `host` or `title` show without it. */
|
|
5
8
|
avatarUrl?: string;
|
|
9
|
+
/** Date-parsable string shown in en-US; meetings add the time, others the year. */
|
|
6
10
|
startDate: string;
|
|
11
|
+
/** Countdown target, preferred over endDate; the label only recomputes when the dates change. */
|
|
7
12
|
dueDate?: string;
|
|
13
|
+
/** Countdown target used only when dueDate is absent. */
|
|
8
14
|
endDate?: string;
|
|
15
|
+
/** Shown in the footer and used for the avatar's initials. */
|
|
9
16
|
host?: string;
|
|
10
17
|
description?: string;
|
|
11
|
-
/**
|
|
18
|
+
/** @deprecated Never read; the status dot colour comes from dueDate/endDate date math. */
|
|
12
19
|
status?: string;
|
|
20
|
+
/** Prefixes the countdown label ("Task due in 3 days") and is echoed to onClick. */
|
|
13
21
|
type: "task" | "meeting" | "call";
|
|
14
22
|
};
|
|
15
23
|
/** Props for the `Notification` countdown card. */
|
|
16
24
|
export type NotificationProps = {
|
|
17
25
|
notification: NotificationData;
|
|
26
|
+
/** Shows a dismiss control (also Enter/Space); the card never hides itself. */
|
|
18
27
|
onClose?: () => void;
|
|
28
|
+
/** Adds a dot coloured by urgency: overdue, under an hour, under a day, later. */
|
|
19
29
|
showStatus?: boolean;
|
|
20
30
|
/** Fires only when the title text is clicked — the avatar, description and card body are not clickable. */
|
|
21
31
|
onClick?: (id: number, type: "task" | "meeting" | "call") => void;
|
|
32
|
+
/** Renders a skeleton card in place of the notification. */
|
|
22
33
|
isLoading?: boolean;
|
|
34
|
+
/** Per-card colour overrides; raw values here do not follow dark mode. */
|
|
23
35
|
colors?: NotificationColor;
|
|
24
36
|
};
|
|
25
37
|
/** Optional per-card palette override for Notification; any field left unset falls back to theme tokens. */
|
|
26
38
|
export type NotificationColor = {
|
|
39
|
+
/** Card surface; the default title, due-label and meta inks are contrast-lifted against it. */
|
|
27
40
|
bgColor?: string;
|
|
41
|
+
/** Card border and both dividers. */
|
|
28
42
|
borderColor?: string;
|
|
43
|
+
/** Description text only. */
|
|
29
44
|
textColor?: string;
|
|
45
|
+
/** Replaces the contrast-lifted title ink, so check AA contrast yourself. */
|
|
30
46
|
titleColor?: string;
|
|
31
47
|
/** warningColor/errorColor/successColor only paint the status dot, and only when showStatus is true — otherwise inert. */
|
|
32
48
|
warningColor?: string;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
7
|
const react_1 = require("react");
|
|
5
8
|
const lucide_react_1 = require("lucide-react");
|
|
6
9
|
const Primitives_1 = require("../Primitives/Primitives");
|
|
10
|
+
const IconButton_1 = __importDefault(require("../IconButton/IconButton"));
|
|
7
11
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
12
|
const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
|
|
9
13
|
const tone_1 = require("../../Theme/tokens/builders/tone");
|
|
@@ -30,6 +34,6 @@ const NotificationBell = (0, react_1.forwardRef)(function NotificationBell({ cou
|
|
|
30
34
|
const badgeOffset = BADGE_OFFSET[size];
|
|
31
35
|
const countSurface = showCount ? (0, filledSurface_1.resolveFilledSurface)((0, tone_1.toneScale)(colors, tone), colors) : null;
|
|
32
36
|
const dotFill = showFallbackDot ? (0, tone_1.toneInk)(colors, dotTone) : undefined;
|
|
33
|
-
return ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { position: "relative", display: "inline-flex", children: [(0, jsx_runtime_1.jsx)(
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { position: "relative", display: "inline-flex", children: [(0, jsx_runtime_1.jsx)(IconButton_1.default, { ref: ref, "aria-label": ariaLabel, "aria-expanded": isOpen, "aria-haspopup": "dialog", icon: (0, jsx_runtime_1.jsx)(Primitives_1.Icon, { as: icon, boxSize: `${ICON_BOX[size]}px` }), variant: "ghost", size: size, onClick: onClick }), showCount && countSurface ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { as: "span", "data-testid": "notification-bell-count", position: "absolute", top: badgeOffset, right: badgeOffset, minW: "1.1rem", h: "1.1rem", px: "0.25rem", borderRadius: "full", display: "flex", alignItems: "center", justifyContent: "center", fontSize: "0.625rem", fontWeight: 700, lineHeight: 1, bg: countSurface.fill, color: countSurface.color, boxShadow: `0 0 0 2px ${ring}`, children: (0, notificationHelpers_1.formatCount)(count, max) })) : null, showFallbackDot ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { as: "span", "data-testid": "notification-bell-dot", position: "absolute", top: badgeOffset, right: badgeOffset, boxSize: "0.5rem", borderRadius: "full", bg: dotFill, boxShadow: `0 0 0 2px ${ring}` })) : null] }));
|
|
34
38
|
});
|
|
35
39
|
exports.default = NotificationBell;
|
|
@@ -28,7 +28,7 @@ const NotificationItem = ({ item, onClick, actions, actionsAlwaysVisible = false
|
|
|
28
28
|
const rowShadow = unreadIndicator === "bar" && unread ? `inset 2px 0 0 ${ink}` : undefined;
|
|
29
29
|
const hasTile = Boolean(item.icon) || Boolean(item.actor);
|
|
30
30
|
// Never nested inside the row's own clickable button — a real <button> can't contain another.
|
|
31
|
-
const tileAndText = ((0, jsx_runtime_1.jsxs)(Primitives_1.Flex, { align: "flex-start", gap: 3, flex: "1", minW: 0, textAlign: "left", children: [hasTile ? ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { position: "relative", flexShrink: 0, boxSize: TILE_SIZE, children: [(0, jsx_runtime_1.jsx)(Primitives_1.Flex, { boxSize: TILE_SIZE, align: "center", justify: "center", borderRadius: "lg", bg: tile.bg, border: "1px solid", borderColor: tile.border, children: item.icon ? (0, jsx_runtime_1.jsx)(Primitives_1.Icon, { as: item.icon, boxSize: "0.875rem", color: tile.fg, "aria-hidden": true }) : null }), item.actor ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { position: "absolute", bottom: "-2px", right: "-2px", borderRadius: "full", border: "2px solid", borderColor: colors.background[50], children: (0, jsx_runtime_1.jsx)(Avatar_1.default, { name: (_b = item.actor.name) !== null && _b !== void 0 ? _b : "?", src: (_c = item.actor.avatarUrl) !== null && _c !== void 0 ? _c : undefined, size: "2xs" }) })) : null] })) : null, (0, jsx_runtime_1.jsxs)(Primitives_1.Box, { flex: "1", minW: 0, children: [item.eyebrow ? ((0, jsx_runtime_1.jsx)(Primitives_1.Text, { fontSize: "
|
|
31
|
+
const tileAndText = ((0, jsx_runtime_1.jsxs)(Primitives_1.Flex, { align: "flex-start", gap: 3, flex: "1", minW: 0, textAlign: "left", children: [hasTile ? ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { position: "relative", flexShrink: 0, boxSize: TILE_SIZE, children: [(0, jsx_runtime_1.jsx)(Primitives_1.Flex, { boxSize: TILE_SIZE, align: "center", justify: "center", borderRadius: "lg", bg: tile.bg, border: "1px solid", borderColor: tile.border, children: item.icon ? (0, jsx_runtime_1.jsx)(Primitives_1.Icon, { as: item.icon, boxSize: "0.875rem", color: tile.fg, "aria-hidden": true }) : null }), item.actor ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { position: "absolute", bottom: "-2px", right: "-2px", borderRadius: "full", border: "2px solid", borderColor: colors.background[50], children: (0, jsx_runtime_1.jsx)(Avatar_1.default, { name: (_b = item.actor.name) !== null && _b !== void 0 ? _b : "?", src: (_c = item.actor.avatarUrl) !== null && _c !== void 0 ? _c : undefined, size: "2xs" }) })) : null] })) : null, (0, jsx_runtime_1.jsxs)(Primitives_1.Box, { flex: "1", minW: 0, children: [item.eyebrow ? ((0, jsx_runtime_1.jsx)(Primitives_1.Text, { fontSize: "xs-minus", fontWeight: 600, color: colors.text[500], textTransform: "uppercase", children: item.eyebrow })) : null, (0, jsx_runtime_1.jsxs)(Primitives_1.Flex, { align: "center", gap: 1.5, children: [unreadIndicator === "dot" && unread ? (0, jsx_runtime_1.jsx)(Primitives_1.Box, { boxSize: "0.375rem", borderRadius: "full", bg: ink, flexShrink: 0 }) : null, (0, jsx_runtime_1.jsx)(Primitives_1.Text, { fontSize: "sm", fontWeight: unread ? 700 : 500, color: colors.header[900], noOfLines: 2, children: item.title })] }), item.body ? ((0, jsx_runtime_1.jsx)(Primitives_1.Text, { mt: 0.5, fontSize: "xs-plus", color: colors.text[600], noOfLines: 2, children: item.body })) : null, preview, (0, jsx_runtime_1.jsx)(Primitives_1.Text, { mt: 1, fontSize: "xs", color: colors.text[500], children: (0, notificationHelpers_1.formatRelativeTime)(item.timestamp) })] })] }));
|
|
32
32
|
return ((0, jsx_runtime_1.jsxs)(Primitives_1.Flex, { role: "group", position: "relative", align: "flex-start", gap: 2, px: 3, py: 2.5, bg: rowTint, boxShadow: rowShadow, _hover: { bg: rowTint !== null && rowTint !== void 0 ? rowTint : colors.backgroundColor.secondary }, children: [(0, jsx_runtime_1.jsxs)(Primitives_1.Box, { flex: "1", minW: 0, children: [onClick ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { as: "button", type: "button", onClick: onClick, display: "flex", w: "100%", textAlign: "left", borderRadius: "md", sx: (0, focusRing_styles_1.focusVisibleStyles)(colors), children: tileAndText })) : (tileAndText), groupCount && groupCount > 1 ? ((0, jsx_runtime_1.jsx)(Button_1.default, { label: `Show ${groupCount} updates`, variant: "link", size: "xs", colorScheme: "primary", mt: 1, pl: hasTile ? `calc(${TILE_SIZE} + 0.75rem)` : 0, onClick: onExpandGroup })) : null] }), trailing, actions ? ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { opacity: actionsAlwaysVisible ? 1 : 0, _groupHover: { opacity: 1 }, _groupFocusWithin: { opacity: 1 }, flexShrink: 0, children: actions })) : null] }));
|
|
33
33
|
};
|
|
34
34
|
exports.default = NotificationItem;
|
|
@@ -20,7 +20,7 @@ function NotificationList({ items, toItem, groupBy = "day", collapseGroups = fal
|
|
|
20
20
|
const sections = groupBy === "day" ? (0, notificationHelpers_1.sectionizeByDay)(items, (row) => toItem(row).timestamp, dayLabels) : [{ label: "", rows: items }];
|
|
21
21
|
return ((0, jsx_runtime_1.jsx)(Primitives_1.Box, { "aria-label": ariaLabel, role: ariaLabel ? "region" : undefined, children: sections.map((section, sectionIndex) => {
|
|
22
22
|
const groups = (0, notificationHelpers_1.groupConsecutive)(section.rows, (row) => (collapseGroups ? toItem(row).groupKey : undefined));
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { children: [section.label ? (renderSectionHeader ? (renderSectionHeader(section.label)) : ((0, jsx_runtime_1.jsx)(Primitives_1.Text, { position: "sticky", top: 0, zIndex: 1, px: 3, py: 1.5, fontSize: "
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(Primitives_1.Box, { children: [section.label ? (renderSectionHeader ? (renderSectionHeader(section.label)) : ((0, jsx_runtime_1.jsx)(Primitives_1.Text, { position: "sticky", top: 0, zIndex: 1, px: 3, py: 1.5, fontSize: "xs-minus", fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.04em", color: colors.text[500], bg: colors.backgroundColor.main, children: section.label }))) : null, groups.map((group, groupIndex) => {
|
|
24
24
|
var _a;
|
|
25
25
|
const groupId = `${section.label}-${(_a = group.key) !== null && _a !== void 0 ? _a : `__row${groupIndex}`}`;
|
|
26
26
|
const isCollapsedRun = collapseGroups && group.rows.length > 1 && !expandedGroups.has(groupId);
|
|
@@ -6,6 +6,7 @@ const react_2 = require("@chakra-ui/react");
|
|
|
6
6
|
const lucide_react_1 = require("lucide-react");
|
|
7
7
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
8
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
9
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
9
10
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
10
11
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
11
12
|
const COPIED_MS = 1600;
|
|
@@ -77,7 +78,7 @@ const OffersList = ({ offers, bestOfferId, isOpen, defaultOpen = false, onOpenCh
|
|
|
77
78
|
height: "1px",
|
|
78
79
|
background: colors.background[200],
|
|
79
80
|
},
|
|
80
|
-
}, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, flexShrink: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx:
|
|
81
|
+
}, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 600, color: colors.header[900], children: offer.title }), (0, jsx_runtime_1.jsx)(react_2.Text, { mt: 0.5, fontSize: "sm", lineHeight: 1.45, color: colors.textMuted, children: offer.detail })] }), code ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 1, flexShrink: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", px: 2.5, py: 1, borderRadius: "md", bg: colors.background[200], color: colors.header[900], fontSize: "xs", fontWeight: 700, letterSpacing: "0.06em", sx: typography_1.NUMERIC_TEXT, children: code }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", type: "button", align: "center", gap: 1.5, minH: "2.75rem", px: 3, borderRadius: "lg", fontSize: "sm", fontWeight: 600, color: colors.accentText, "aria-label": copied ? undefined : copy.copyCode(code), onClick: () => copyCode(offer, code), transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: colors.background[200] }, sx: { ...(0, focusRing_styles_1.focusVisibleStyles)(colors), ...(0, motion_2.reducedMotionSx)() }, children: [copied ? (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 16, "aria-hidden": true }) : null, (0, jsx_runtime_1.jsx)("span", { children: copied ? copy.copied : copy.copy })] })] })) : null] }, offer.id));
|
|
81
82
|
}) }) }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { "aria-live": "polite", children: message })] }));
|
|
82
83
|
};
|
|
83
84
|
exports.default = OffersList;
|
|
@@ -6,6 +6,7 @@ const react_2 = require("@chakra-ui/react");
|
|
|
6
6
|
const lucide_react_1 = require("lucide-react");
|
|
7
7
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
8
8
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
9
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
9
10
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
10
11
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
11
12
|
const optionInk_1 = require("./optionInk");
|
|
@@ -87,11 +88,11 @@ const OptionChip = (0, react_1.forwardRef)(function OptionChip({ label, selected
|
|
|
87
88
|
whiteSpace: "nowrap",
|
|
88
89
|
boxShadow: invalid && !selected ? errorRing(colors) : "none",
|
|
89
90
|
};
|
|
90
|
-
const content = ((0, jsx_runtime_1.jsxs)(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckGrow, { selected: selected }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx:
|
|
91
|
+
const content = ((0, jsx_runtime_1.jsxs)(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(CheckGrow, { selected: selected }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx: typography_1.NUMERIC_TEXT, children: label })] }));
|
|
91
92
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...base, ...surface, sx: {
|
|
92
93
|
...motion,
|
|
93
94
|
"&:hover:not(:disabled):not([aria-checked=true])": unavailable ? undefined : { backgroundColor: tone.hoverFill },
|
|
94
95
|
...(unavailable ? { "&::after": { content: '""', ...strikeLayer(band("currentColor", "0.5px")) } } : {}),
|
|
95
|
-
}, children: [content, isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", mt: "0.125rem", fontSize: "
|
|
96
|
+
}, children: [content, isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", mt: "0.125rem", fontSize: "xs-minus", fontWeight: 500, color: tone.hint, sx: typography_1.NUMERIC_TEXT, children: hint })) : null, !isPack && hint ? ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", position: "absolute", top: "-0.375rem", right: "-0.25rem", px: "0.375rem", py: "px", borderRadius: "full", bg: colors.surfaceRaised, color: colors.text[800], fontSize: "0.625rem", fontWeight: 600, lineHeight: "1rem", boxShadow: `0 0 0 1px ${colors.boxborder[200]}`, pointerEvents: "none", children: hint })) : null] }));
|
|
96
97
|
});
|
|
97
98
|
exports.default = OptionChip;
|
|
@@ -5,6 +5,7 @@ const react_1 = require("@chakra-ui/react");
|
|
|
5
5
|
const lucide_react_1 = require("lucide-react");
|
|
6
6
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
7
7
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
8
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
8
9
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
9
10
|
const accentText_1 = require("../../Theme/tokens/builders/accentText");
|
|
10
11
|
const DEFAULT_LABELS = { done: "Completed", current: "In progress", upcoming: "Upcoming" };
|
|
@@ -34,7 +35,7 @@ const Marker = ({ state, colors }) => {
|
|
|
34
35
|
};
|
|
35
36
|
const StepText = ({ step, copy, align, colors, }) => {
|
|
36
37
|
const active = step.state !== "upcoming";
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { textAlign: align, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Text, { as: "span", display: "block", fontSize: "sm", fontWeight: active ? 700 : 500, lineHeight: 1.4, color: active ? colors.header[900] : colors.textMuted, children: [(0, jsx_runtime_1.jsxs)(react_1.VisuallyHidden, { children: [copy[step.state], ": "] }), step.label] }), step.date && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, sx:
|
|
38
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { textAlign: align, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Text, { as: "span", display: "block", fontSize: "sm", fontWeight: active ? 700 : 500, lineHeight: 1.4, color: active ? colors.header[900] : colors.textMuted, children: [(0, jsx_runtime_1.jsxs)(react_1.VisuallyHidden, { children: [copy[step.state], ": "] }), step.label] }), step.date && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, sx: typography_1.NUMERIC_TEXT, children: step.date })), step.detail && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: step.detail }))] }));
|
|
38
39
|
};
|
|
39
40
|
/** Order tracking steps: filled check, ringed dot and hollow ring markers, each backed by spoken state text. */
|
|
40
41
|
const OrderStatusTimeline = ({ steps, orientation = "vertical", labels, "aria-label": ariaLabel = "Order status", "data-testid": testId, }) => {
|