pixelize-design-library 2.4.2-beta.61 → 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 +153 -0
- package/COMPONENT-GOTCHAS.md +119 -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/NavigationBar/NavigationBar.js +2 -2
- 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/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/NavigationBar/NavigationBar.js +2 -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/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 +33 -5
- package/dist/index.js +47 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -18,6 +18,65 @@ next major.
|
|
|
18
18
|
|
|
19
19
|
### Added
|
|
20
20
|
|
|
21
|
+
- **`formatDate` / `formatDateTime` / `formatDateRange`**: Intl-based date text, en-IN by default ("09 Oct 2026"),
|
|
22
|
+
with `locale`, `timeZone`, `year: "never"`, `time: "12h" | "24h"` and a `fallback` (default "—") for null or
|
|
23
|
+
invalid input instead of "Invalid Date". A bare `YYYY-MM-DD` is that calendar day in every zone; ranges write a
|
|
24
|
+
shared month and year once. Output is the same across browser and Node ICU versions (no "Sept", no thin or
|
|
25
|
+
narrow spaces).
|
|
26
|
+
- **`TimePicker`**: inline hour, minute and AM/PM selects as a field (label, required, error, helper), with
|
|
27
|
+
`use24Hour`, `minuteStep`, `baseDate` and `name`. Same look as DatePicker's time selects. `TimePickerProps` now
|
|
28
|
+
describes this component; the old `date`, `dateFormat` and `disabled` fields still type-check as deprecated
|
|
29
|
+
aliases.
|
|
30
|
+
- **`TagInput`**: free-text chips. Enter or comma adds, Backspace removes the last, a pasted list splits on commas
|
|
31
|
+
and new lines; optional `validate`, `maxTags` and `allowDuplicates`. Same look as `MultiSelect`, without its
|
|
32
|
+
email lock.
|
|
33
|
+
- **`IconButton`** is now owned: it renders exactly what the Chakra `IconButton` rendered (same props, theme,
|
|
34
|
+
sizes `xs 24 · sm 32 · md 40 · lg 48 · xl 56`, `isLoading` keeps the box) and, in development, warns once per
|
|
35
|
+
mount when it has neither `aria-label` nor `aria-labelledby`. `aria-label` is optional in its type.
|
|
36
|
+
- **`FormField`**: label, required asterisk, helper text and error message around any one control. A single
|
|
37
|
+
child element receives `id`, `aria-labelledby`, `aria-describedby`, `aria-invalid` and `aria-required`, or pass
|
|
38
|
+
a function that places them on a composite. `TextInput` inside inherits the error and required state.
|
|
39
|
+
`layout="horizontal"` puts the label in a `labelWidth` column (default 12rem) from `md` up. Root attributes
|
|
40
|
+
and `ref` land on the root `div`.
|
|
41
|
+
- **`VisuallyHidden`**: text for screen readers only, pinned to the viewport so a hidden live region can never
|
|
42
|
+
extend a scrolled page. It takes `as`, `ref`, every attribute and style prop.
|
|
43
|
+
- **`SkipLink`**: a "Skip to main content" link that paints nothing until keyboard focus, then shows top-left on
|
|
44
|
+
the `skipLink` layer. Activating it focuses `#targetId` (default `main-content`) without changing the URL hash.
|
|
45
|
+
- **`Pagination`**: standalone, controlled page navigation. Numbered pages collapse behind ellipses (first
|
|
46
|
+
and last always show, `siblingCount` defaults to 1), with previous and next buttons and an optional
|
|
47
|
+
rows-per-page picker (`pageSizeOptions` + `pageSize` + `onPageSizeChange`). `page` is 1-based; the count
|
|
48
|
+
comes from `pageCount` or from `totalItems` + `pageSize`. `size` follows the Button scale, `isDisabled`
|
|
49
|
+
disables the pager, `labels` overrides the names. It renders a named `nav` of real buttons and the
|
|
50
|
+
current page carries `aria-current="page"`. `Table` keeps its own pager unchanged.
|
|
51
|
+
- **`ChoiceCard` / `ChoiceCardGroup`**: radio cards for picking one of a few options that each need a line of
|
|
52
|
+
explanation. Group: `value` / `defaultValue` / `onValueChange`; card: `label`, `description`, `icon`,
|
|
53
|
+
`disabled`. One tab stop; arrows, Home and End move focus and selection. Same look as `PaymentOption`.
|
|
54
|
+
- **Plain HTML attributes on the page primitives**: `PageHeader`, `StatCard`, `SaveBar`, `EmptyState`,
|
|
55
|
+
`DescriptionList`, `FilterBar` and `Skeletons` pass `id`, `className`, `style`, `data-*`, `aria-*` and
|
|
56
|
+
event handlers to their root element; the component's own props still win and Chakra style props are
|
|
57
|
+
still not accepted.
|
|
58
|
+
- **`ref` forwarding**: `Checkbox`, `RadioButton`, `ToggleSwitch` and `DatePicker` (single, range and time,
|
|
59
|
+
including the deep-imported `SingleDatePicker` / `RangeDatePicker` / `TimeOnlyPicker`) forward to their
|
|
60
|
+
native `<input>`; `SegmentedControl` to its `role="radiogroup"` root; `Tab` to its `role="tab"` button;
|
|
61
|
+
`Avatar` and `Tag` to their root element.
|
|
62
|
+
- **`PinInput` `error`, `errorMessage`, `helperText` and `isDisabled`**: the message renders under the
|
|
63
|
+
cells and every digit gets `aria-invalid` / `aria-describedby`.
|
|
64
|
+
- **`WizardDialog` / `Wizard` `finishDisabled` and `finishBlockedReason`**: disable Finish on the last
|
|
65
|
+
step (a pending upload, say) and show why beside it; the reason is Finish's `aria-describedby`.
|
|
66
|
+
Back and the stepper keep working; nothing changes when they are not passed.
|
|
67
|
+
- **`CircularProgress` `size` takes a px number** (clamped to 24..160) as well as `sm | md | lg`; stroke
|
|
68
|
+
and label scale with it (`CircularProgressDiameter` type). The presets render exactly as before.
|
|
69
|
+
- **Token foundation** (web premium/perf campaign; nothing changes on screen until you use them):
|
|
70
|
+
`RADIUS_ROLE` (radius by surface role), `BORDER_WIDTHS` (px hairline), `DISABLED_OPACITY` (0.5),
|
|
71
|
+
`NUMERIC_TEXT` (tabular figures), `zIndices.popoverNested` (1510), `fontSizes["xs-minus"]` (11px) and
|
|
72
|
+
`fontSizes["xs-plus"]` (13px), and `TEXT_STYLES` bound as Chakra `textStyles` (`title`, `heading`,
|
|
73
|
+
`subheading`, `body`, `ui`, `label`, `caption`, `overline`). Motion: `MOTION_MS.enter` / `.exit`
|
|
74
|
+
(200ms), `MOTION_BEZIER`, `MOTION_EASE_OUT`, `MOTION_EASE_IN`, `MOTION_LOOP_MS`, `motionTransition()`;
|
|
75
|
+
`transitionFor` takes an optional curve. `shadowsFor(mode)` returns the shadow ramp a theme carries.
|
|
76
|
+
Opt-in `reducedMotion="global"` on `PixelizeThemeProvider` and `createBrandTheme` adds one
|
|
77
|
+
document-wide `prefers-reduced-motion` rule; `pz-motion-keep` (`MOTION_KEEP_CLASS`) opts an element out.
|
|
78
|
+
The default is unchanged. `CustomThemeProps` gains `zIndices.popoverNested` and the two font sizes, so
|
|
79
|
+
code that hand-builds a full `CustomThemeProps` needs those keys.
|
|
21
80
|
- **HRMS library requests** — a navigation launcher, key caps, a merge-field `Editor`, a wizard and
|
|
22
81
|
smaller gaps found by the HRMS migration:
|
|
23
82
|
- `NavLauncher` — full-height navigation launcher (browse modules, pins, Frequent, Recent, search
|
|
@@ -205,6 +264,52 @@ next major.
|
|
|
205
264
|
|
|
206
265
|
### Changed
|
|
207
266
|
|
|
267
|
+
- **Performance, no visual change** (web premium/perf campaign):
|
|
268
|
+
- Theme colour math is memoised (`resolveFilledSurface`, `liftToContrast`, `softenToContrast`,
|
|
269
|
+
`resolveSoftTone`, luminance) in bounded, content-keyed caches: the hot calls are 5-20x faster and
|
|
270
|
+
restyling 50 `Button`s and 50 `Checkbox`es dropped from about 1.4 ms to 0.15 ms.
|
|
271
|
+
- Brand palettes (`lightPalettes`, `darkPalettes`, `palettes`, `<brand>Dark`) and the eight
|
|
272
|
+
non-default light themes are built on first read instead of at import; keys, key order, values and
|
|
273
|
+
object identity are unchanged, and importing the theme module is about 2x faster. The `ThemeSwitcher`
|
|
274
|
+
brand picker no longer builds every brand's Chakra theme when it mounts.
|
|
275
|
+
- Themes from `createBrandTheme` cache each component style function's output per theme, keyed on the
|
|
276
|
+
props that function reads: output is identical and style resolution per component render is about 2x
|
|
277
|
+
faster.
|
|
278
|
+
- Switching light/dark no longer blocks: the switcher repaints first and the app re-themes in an
|
|
279
|
+
interruptible render. Document `color-scheme`, `data-mode` and the `--color-*` variables follow the
|
|
280
|
+
new palette together, never ahead of it. `PixelizeThemeProvider` memoises its Chakra subtree, so the urgent
|
|
281
|
+
half of a switch re-renders only the switcher.
|
|
282
|
+
- `KanbanBoard` adopts a new `data` prop during render instead of in an effect, so a board whose data
|
|
283
|
+
follows the theme renders once per theme flip instead of twice.
|
|
284
|
+
- `Table`: passing an equal `columns` array again no longer re-renders every visible row; column
|
|
285
|
+
search popovers and row action menus mount their popover only while open (closed rows register no
|
|
286
|
+
global listeners); virtualised rows are measured through one shared `ResizeObserver` with no forced
|
|
287
|
+
layout read on mount.
|
|
288
|
+
- `ToolTip` mounts Chakra's tooltip only after the first hover or focus of its trigger; until then
|
|
289
|
+
(and while disabled or without a label) it renders just the child, with no document listeners.
|
|
290
|
+
- `SideBar`: the swipe-to-close drag no longer re-renders the sidebar or creates a CSS rule per
|
|
291
|
+
pointer move; row labels share one `ResizeObserver` and pause measuring while the rail width
|
|
292
|
+
animates, and their tooltips arm on first use. `useIsTruncated` uses a single shared
|
|
293
|
+
`ResizeObserver`; its signature is unchanged.
|
|
294
|
+
- `SearchSelect` option rows are memoised, so hovering, ArrowDown and toggling an option re-render only
|
|
295
|
+
the rows whose state changed (300 options: 300 row renders per hover to 1-2), and the menu's
|
|
296
|
+
scroll-driven position is an inline style instead of a new Emotion class per position.
|
|
297
|
+
- `KanbanBoard`: hovering a column and expanding a card no longer re-render the whole board (4 x 30
|
|
298
|
+
board, hover sweep: 960 card renders to 0); virtualized cards share one `ResizeObserver`.
|
|
299
|
+
- `Search` instances share one window `keydown` listener for Ctrl+K (it was one per instance);
|
|
300
|
+
with several on a page the last mounted still takes focus.
|
|
301
|
+
- `Dropdown` and `SelectSearch` add their outside-click `document` listener only while open, so closed
|
|
302
|
+
instances cost nothing on every page click.
|
|
303
|
+
- `MediaVideoPlayer` and `MediaAudioPlayer` no longer re-render the whole player on each `timeupdate`;
|
|
304
|
+
only the scrubber and the time readout update.
|
|
305
|
+
- `RangeSlider`, `MediaImageViewer` (pan/zoom), `FilterSidebar` (range slider), the media scrubber and
|
|
306
|
+
the `Dropdown` menu position apply per-frame values as inline styles, so dragging, panning and
|
|
307
|
+
scrolling no longer insert a CSS rule per value (40 slider moves used to leave 160 rules behind).
|
|
308
|
+
- `Notification` and `UpgradeButton`: the card and dismiss control transition named properties instead
|
|
309
|
+
of `all` (same 0.2s ease), and both drop their transitions, the shimmer sweep and the hover lift under
|
|
310
|
+
`prefers-reduced-motion`.
|
|
311
|
+
- `CalendarGrid` reuses `Intl.DateTimeFormat` instances per locale and options (was about 70 per
|
|
312
|
+
month render). `Toaster` cards no longer hold a permanent `will-change` layer.
|
|
208
313
|
- **`PageHeader` `actionsLayout` defaults to `"auto"`**: at `md` and up the actions wrap below the
|
|
209
314
|
title when they do not fit (before, they squeezed the title). Identical whenever title and
|
|
210
315
|
actions fit on one row; pass `actionsLayout="inline"` for the old behaviour.
|
|
@@ -270,6 +375,49 @@ next major.
|
|
|
270
375
|
|
|
271
376
|
### Fixed
|
|
272
377
|
|
|
378
|
+
- **Field helper text no longer leaves a dangling `<id>-helptext` in `aria-describedby`** when a field with an
|
|
379
|
+
explicit `id` sits inside a consumer `FormControl` (`TextInput` and every field rendering
|
|
380
|
+
`FieldMessage`/`HelperText`).
|
|
381
|
+
- **`SearchSelect` and `Select` (`native={false}`) multi rows**: the decorative checkbox is no longer a focusable,
|
|
382
|
+
unnamed control nested in the option; the row's `role="option"` with `aria-selected` is the single accessible
|
|
383
|
+
control. No visual change.
|
|
384
|
+
- **`SearchSelect`'s open listbox and `Select`'s popup dialog have an accessible name**, from `label`, then
|
|
385
|
+
`aria-label`, then `placeholder`.
|
|
386
|
+
- **`WorkspaceWindow`'s dialog is named by its visible title**; while a window is open the page behind it is
|
|
387
|
+
`aria-hidden`, as for any modal.
|
|
388
|
+
- **`CustomModulesTable`'s edit-module field is named** by `labels.moduleNamePlaceholder`.
|
|
389
|
+
- **`StageProgress` no longer scrolls the page when it mounts**: the active stage was revealed with
|
|
390
|
+
`scrollIntoView`, which also scrolled every ancestor, so a tracker below the fold pulled the page down
|
|
391
|
+
to it. The active stage is now centred inside the stage strip only (`scrollActiveIntoView` still
|
|
392
|
+
turns that off).
|
|
393
|
+
- **`Tabs` no longer scrolls the page when it mounts**: the selected tab was revealed with
|
|
394
|
+
`scrollIntoView`, which also scrolled every scrolling ancestor, so a page with tabs below the fold
|
|
395
|
+
jumped to them on load. The first reveal now scrolls only the tab list; later focus and selection
|
|
396
|
+
moves behave as before.
|
|
397
|
+
- **The legacy `DatePicker` behind Table's filter pane opens from the keyboard**: Enter or ArrowDown on the
|
|
398
|
+
focused field opens the calendar (it was mouse-only).
|
|
399
|
+
- **Keyboard access for click-only elements** (WCAG 2.1.1): `NoteTextArea` (the collapsed placeholder and
|
|
400
|
+
the attach control, now a named button "Attach files"), `Notification` (the title when `onClick` is
|
|
401
|
+
passed; the dismiss control is announced as "Dismiss notification"), `OrganizationDetails` ("Set as
|
|
402
|
+
Default"), `UserDetails` (member rows, the selected one marked `aria-current`), `FileUploader` (the drop
|
|
403
|
+
target opens the picker from the keyboard; it was the only way to add files), `KanbanBoard` (both
|
|
404
|
+
add-column affordances) and the `SearchSelect` `insideSelect` prefix and menu (Enter/Space, arrow
|
|
405
|
+
keys, Home/End, Escape). Each takes Tab, activates on Enter and Space, and shows the library focus
|
|
406
|
+
ring on keyboard focus only; resting looks are unchanged.
|
|
407
|
+
- **`ProductCard` no longer throws "Rendered more hooks than during the previous render"** when `isLoading`
|
|
408
|
+
goes from `true` to `false` (a hook sat below the loading early return).
|
|
409
|
+
- **`KanbanBoard` no longer logs React's "Cannot update during an existing state transition"** when a
|
|
410
|
+
card is expanded in a virtualized column.
|
|
411
|
+
- **`PhoneNumberInput` follows a changed `value`.** It used to read `value` once on mount; a form reset
|
|
412
|
+
or a loaded record now updates the field, and a leading dial code (the `onChange` shape) is stripped,
|
|
413
|
+
so echoing `onChange` back into `value` is safe.
|
|
414
|
+
- **`CopyButton variant="menu-item"` is keyboard-operable** (focusable, Enter and Space copy, focus
|
|
415
|
+
ring), and every variant announces the copied label through a polite live region.
|
|
416
|
+
- **`Slider` no longer auto-advances while hovered or focused, nor under reduced motion** (WCAG 2.2.2);
|
|
417
|
+
the slide transition is instant under reduced motion. The default interval is unchanged.
|
|
418
|
+
- **`FileUpload` no longer leaks a blob URL per image thumbnail per render.** Each file gets one URL,
|
|
419
|
+
revoked when the file is removed or the component unmounts.
|
|
420
|
+
- **`Table` column search shows the current search when reopened**, instead of stale text.
|
|
273
421
|
- **`NavigationBar` right cluster no longer overflows onto the avatar at phone widths.** The title
|
|
274
422
|
truncates first (overflow-only tooltip when it is a string); the `moreIcon` cluster can shrink, while
|
|
275
423
|
the sidebar toggle, back button and avatar menu never do. (HRMS, beta.60 launcher trigger overflow)
|
|
@@ -517,6 +665,11 @@ next major.
|
|
|
517
665
|
|
|
518
666
|
Nothing is removed yet — each of these still ships its full implementation.
|
|
519
667
|
|
|
668
|
+
- `UploadedFile.type` (FileUploader) — never set; read the extension from `name`.
|
|
669
|
+
- `ProfileCard` `color` — no visual effect; Card styles never read a colour scheme.
|
|
670
|
+
- `NotificationData.status` — never read; the status dot colour comes from `dueDate`/`endDate`.
|
|
671
|
+
- `CustomModulesTableLabels.loading` — never rendered; the loading state shows skeleton bars only.
|
|
672
|
+
- `WorkspaceWindow` `onMedium` and `onMaximize` — never called; the window has no such controls.
|
|
520
673
|
- `NavLauncher` `openShortcutHint` and `LauncherLabels.hintOpenMenu` — no longer rendered (the launcher
|
|
521
674
|
is already open when its footer shows); bind the open chord in the app only.
|
|
522
675
|
- `SelectV2` — use `Select` with `native={false}`; it is already a thin wrapper over it.
|
package/COMPONENT-GOTCHAS.md
CHANGED
|
@@ -157,7 +157,8 @@ visible at the call site, or declare the handler with both parameters. Grep for
|
|
|
157
157
|
|
|
158
158
|
### `Slider` is an image carousel, not a numeric range input
|
|
159
159
|
|
|
160
|
-
`Slider` auto-advances a set of images/content on a timer
|
|
160
|
+
`Slider` auto-advances a set of images/content on a timer (paused while hovered or focused, never
|
|
161
|
+
under reduced motion) — no numeric value, min/max, or step. The
|
|
161
162
|
range-input slider is a separate component named `RangeSlider`, because this library's `Slider`
|
|
162
163
|
already owns the name. `RangeSlider` used to be a Chakra passthrough on the `Primitives` barrel; it
|
|
163
164
|
is now the library's own themed component, with a real dual-thumb mode and a `marks` prop.
|
|
@@ -319,6 +320,53 @@ not enough when the overlay sits inside a transition wrapper — the wrapper kee
|
|
|
319
320
|
|
|
320
321
|
## Known gotchas (silent failures)
|
|
321
322
|
|
|
323
|
+
### `withTheme` mounts a full provider stack per wrapped instance
|
|
324
|
+
|
|
325
|
+
Each wrapped component gets its own `ChakraProvider` (CSS reset, global styles, CSS variables), `ToasterProvider` and `ColorModeScript`. Wrap the app root once with `PixelizeThemeProvider`; never wrap list items or repeated rows.
|
|
326
|
+
|
|
327
|
+
### `SearchSelect` with `insideSelect` shows a second `role="listbox"` while open
|
|
328
|
+
|
|
329
|
+
A test that finds the main dropdown with `getByRole("listbox")` must now pick it by id (`<id>-listbox`).
|
|
330
|
+
|
|
331
|
+
### `ChoiceCardGroup`'s children must be `ChoiceCard` elements, and the prop is `disabled`
|
|
332
|
+
|
|
333
|
+
A wrapper component hides each card's `value` and `disabled` from the roving tab stop, so with nothing
|
|
334
|
+
selected the group has no Tab stop at all (same rule as `PaymentOptionGroup` / `AddressCardGroup`). The
|
|
335
|
+
card's prop is `disabled`, not `isDisabled`: the shared machinery reads `disabled` off the child element.
|
|
336
|
+
The group is a column only.
|
|
337
|
+
|
|
338
|
+
### `Pagination` never resets `page` for you
|
|
339
|
+
|
|
340
|
+
An out-of-range `page` (a filter shrank the result) is displayed clamped but never reported, and changing
|
|
341
|
+
rows per page does not reset `page` either. Reset it yourself, in `onPageSizeChange` and when the filters change.
|
|
342
|
+
|
|
343
|
+
### Four components with a behaviour their props do not hint at
|
|
344
|
+
|
|
345
|
+
- `WorkspaceTrayPreview` `onOpenChange(false)` also fires when the pointer leaves before the card ever opened; track your own open state from `true`.
|
|
346
|
+
- `Notification`'s countdown is computed when its dates change and never ticks; remount or change a date to refresh it. Overdue labels read "overdue by N hours ago".
|
|
347
|
+
- `NoteTextArea` checks `maxNoteWordCount` against the title only until the note is next edited, so a long title can be saved; `handleCancel` always receives `false`.
|
|
348
|
+
- `VerifyEmailOtp` fields set `autocomplete="off"`, so browser or OS one-time-code autofill never offers the code.
|
|
349
|
+
|
|
350
|
+
### Where `ref` lands, and what does not take one
|
|
351
|
+
|
|
352
|
+
`Checkbox`, `RadioButton`, `ToggleSwitch` and `DatePicker` (every mode) forward to the native `<input>`.
|
|
353
|
+
`SegmentedControl` forwards to the radiogroup `<div>`, not a segment; `Tab` to its tab `<button>` (`Tabs`
|
|
354
|
+
itself takes no ref); `Avatar` to the outer box; `Tag` to its root, which is a `<button>` only for
|
|
355
|
+
`display="dot"` with `onTagClick`, so type that ref as `HTMLElement`. `PinInput`, `FileUpload`,
|
|
356
|
+
`SettingRow` and `Tabs` do not forward a ref.
|
|
357
|
+
|
|
358
|
+
### Root attributes on the page primitives, and `Skeletons` props that are ignored
|
|
359
|
+
|
|
360
|
+
`PageHeader`, `StatCard`, `SaveBar`, `EmptyState`, `DescriptionList`, `FilterBar` and `Skeletons` put
|
|
361
|
+
`className`, `style`, `id`, `data-*` and `aria-*` on their outermost element. `StatCard` applies
|
|
362
|
+
`aria-label` only when `onClick` makes it a button; `DescriptionList`'s loading grid keeps its own
|
|
363
|
+
`aria-label="Loading"`. `Skeletons` still accepts `alignSelf` and `flexShrink` in its type but never
|
|
364
|
+
applies them; wrap it in a `Box` to position it.
|
|
365
|
+
|
|
366
|
+
### `Table` `HeaderActions` item with `customComponent` and `onClick` is mouse-only unless the custom component is focusable
|
|
367
|
+
|
|
368
|
+
The wrapper is deliberately not a button; make the custom component a button, or the action cannot be reached from the keyboard.
|
|
369
|
+
|
|
322
370
|
### Defaults changed in 2.4.2-beta.44 — read this first when upgrading from beta.43
|
|
323
371
|
|
|
324
372
|
| Component | beta.43 → beta.44 | Restore the old look |
|
|
@@ -465,6 +513,25 @@ so the two schemes were indistinguishable. It is now `primary`'s hue turned 60°
|
|
|
465
513
|
which is near-grey and has almost no hue to turn — use a semantic scheme (`blue`, `teal`, `purple`)
|
|
466
514
|
there if the two categories must read apart.
|
|
467
515
|
|
|
516
|
+
### Brand palettes and non-default themes are lazy; library style functions may return cached objects
|
|
517
|
+
|
|
518
|
+
Before its first read, a brand palette or a non-default light theme is an object of getters. Reading
|
|
519
|
+
any key turns it into plain data; spread, `Object.keys`, JSON and assignment behave as before, but
|
|
520
|
+
`Object.getOwnPropertyDescriptor` reports an accessor until then. Style functions in a library
|
|
521
|
+
theme's `theme.components` receive props through a tracking Proxy and may return a cached object, so
|
|
522
|
+
never mutate what they return.
|
|
523
|
+
|
|
524
|
+
### Reduced motion is per component unless the app passes `reducedMotion="global"`
|
|
525
|
+
|
|
526
|
+
The library's own animations honour `prefers-reduced-motion` one component at a time. For one
|
|
527
|
+
document-wide rule, pass `reducedMotion="global"` to `PixelizeThemeProvider` (or `createBrandTheme`);
|
|
528
|
+
transitions and animations then collapse to one near-instant pass. Add `pz-motion-keep`
|
|
529
|
+
(`MOTION_KEEP_CLASS`) to any loop that is essential feedback; Chakra spinners and progress bars are
|
|
530
|
+
kept automatically.
|
|
531
|
+
|
|
532
|
+
A popup opened inside another popup takes `zIndex="popoverNested"` (1510), never `skipLink` (1600).
|
|
533
|
+
`fontSize="xs-plus"` is 13px, the control size; use it instead of a `13px` literal.
|
|
534
|
+
|
|
468
535
|
### Your own overlay painted `background[50]` sinks into the dark canvas
|
|
469
536
|
|
|
470
537
|
In dark mode `background[50]` equals the page canvas on 8 of 9 brands. Library dialogs, drawers,
|
|
@@ -961,6 +1028,13 @@ only-when-truncated (the opposite of the prop's contract).
|
|
|
961
1028
|
**Apply:** give `overflowOnly`/`OverflowToolTip` exactly one real element as `children` (e.g. a
|
|
962
1029
|
single `Text noOfLines`), never a Fragment or bare text.
|
|
963
1030
|
|
|
1031
|
+
### `ToolTip` mounts Chakra's tooltip only after the first hover or focus
|
|
1032
|
+
|
|
1033
|
+
Until the trigger is hovered or focused (or `isOpen`/`defaultIsOpen` is set), `ToolTip` renders just the
|
|
1034
|
+
child, with no tooltip element and no document listeners. A test that mocks Chakra's `Tooltip` and
|
|
1035
|
+
expects it mounted at render time must hover or focus the trigger first
|
|
1036
|
+
(`fireEvent.pointerEnter(trigger)` or `userEvent.hover`).
|
|
1037
|
+
|
|
964
1038
|
### `Toaster`'s `showToast({ children })` is a dead prop, and its two `onClose`s are different functions
|
|
965
1039
|
|
|
966
1040
|
`children` is `@deprecated` and never read — only `title`/`description`/`actions` render. The `onClose` you pass to `showToast` is wired to
|
|
@@ -1146,6 +1220,9 @@ wrong-type file. Exceeding `maxFiles` silently truncates the list with no error.
|
|
|
1146
1220
|
|
|
1147
1221
|
**Apply:** need real file bytes or enforced validation → use `FileUpload`, not `FileUploader`.
|
|
1148
1222
|
|
|
1223
|
+
Each image's `previewUrl` is a `blob:` URL that `FileUploader` never revokes. Call
|
|
1224
|
+
`URL.revokeObjectURL` when you drop the entry or unmount. (`FileUpload` revokes its own thumbnail URLs.)
|
|
1225
|
+
|
|
1149
1226
|
### `DatePicker`'s `pickerType` does nothing when `isRange` is set, and no variant has a seconds control
|
|
1150
1227
|
|
|
1151
1228
|
`RangeDatePicker` never reads `pickerType` — whether time inputs show is controlled entirely by
|
|
@@ -1395,6 +1472,13 @@ It spreads after the built-in `bg`/`_hover` that encode `isExpanded` state — p
|
|
|
1395
1472
|
**Apply:** style around the defaults via `customStyles` (merged through `sx`) when the highlight
|
|
1396
1473
|
must survive.
|
|
1397
1474
|
|
|
1475
|
+
### `Table`: memoise `columns` if users can hide or reorder columns without `savePreferences`
|
|
1476
|
+
|
|
1477
|
+
A new `columns` identity re-applies the column defaults and discards those local changes. Passing an
|
|
1478
|
+
equal array again no longer costs a re-render, but the reset still happens.
|
|
1479
|
+
|
|
1480
|
+
**Apply:** define `columns` at module level or in `useMemo`.
|
|
1481
|
+
|
|
1398
1482
|
### `Table`'s `LeftFilterPane` Clear All only re-applies filters in `"sidebar"` mode
|
|
1399
1483
|
|
|
1400
1484
|
`handleClear` calls `onClear` unconditionally, but only calls `onApply(cleared)` when
|
|
@@ -1764,3 +1848,37 @@ text. Column widths come from the rendered DOM, never from label length, so sizi
|
|
|
1764
1848
|
|
|
1765
1849
|
**Apply:** set `labelText` on every node label; put an `isTruncated` `Text` inside the node if it
|
|
1766
1850
|
can outgrow the column.
|
|
1851
|
+
|
|
1852
|
+
### `FormField`, `IconButton`, `SkipLink`: what their props do not hint at
|
|
1853
|
+
|
|
1854
|
+
- **`FormField` + library fields:** `TextInput` inherits FormField's `error` and `isRequired` because it checks
|
|
1855
|
+
for a parent `FormControl`. `InputTextArea`, `NumberInput`, `Select`, the date pickers and `PhoneNumberInput`
|
|
1856
|
+
wrap themselves in their own and do **not**: pass `error`/`isRequired` to those directly, and never give a
|
|
1857
|
+
wrapped field its own `label` as well, or it renders two.
|
|
1858
|
+
- **`FormField isRequired` sets native `required` on Chakra-based controls** (as Chakra's `FormControl` does), so
|
|
1859
|
+
the browser blocks an empty submit. Add `noValidate` to the `<form>` if you validate yourself. Native children
|
|
1860
|
+
get `aria-required` only.
|
|
1861
|
+
- **`FormField` children:** pass one element or a function. A Fragment is rendered untouched and gets no wiring.
|
|
1862
|
+
`id` is the control's id (the root takes none); a child's own `id` is adopted when FormField has none.
|
|
1863
|
+
- **`IconButton` warns once per mount in development without `aria-label`/`aria-labelledby`.** `title` does not
|
|
1864
|
+
count. Size the icon yourself (xs 12 · sm 14 · md 16 · lg 18): the button does not resize it.
|
|
1865
|
+
- **`SkipLink`** must be the first focusable element on the page. Its target gains `tabindex="-1"` if it is not
|
|
1866
|
+
focusable, and keeps it. A missing target falls back to the browser's hash jump (and warns in development).
|
|
1867
|
+
|
|
1868
|
+
### `formatDate`, `TimePicker`, `TagInput`: what their props do not hint at
|
|
1869
|
+
|
|
1870
|
+
- `formatDate` reads a bare `YYYY-MM-DD` as that calendar day, not UTC midnight. Pass a `Date` only when you mean
|
|
1871
|
+
an instant. Epoch *seconds* are not detected: multiply by 1000 first.
|
|
1872
|
+
- `TimePicker` fires `onChange` with a `Date` on the day of `value` (else `baseDate`, else today). It never clears
|
|
1873
|
+
to `null`, so put a Clear action beside it if one is needed.
|
|
1874
|
+
- For free-text chips that are not email addresses use `TagInput`: same look as `MultiSelect`, any text, with
|
|
1875
|
+
your own `validate`.
|
|
1876
|
+
|
|
1877
|
+
### `Select` / `SearchSelect` multi rows have no checkbox role
|
|
1878
|
+
|
|
1879
|
+
Query rows with `getAllByRole("option")` and check `aria-selected`. The row's checkbox is decorative and no longer
|
|
1880
|
+
exposes `role="checkbox"`, so `getByRole("checkbox")` finds nothing inside the popup.
|
|
1881
|
+
|
|
1882
|
+
### Page behind an open `WorkspaceWindow` is `aria-hidden`
|
|
1883
|
+
|
|
1884
|
+
While a window is open (not minimized) role queries for background elements need `{ hidden: true }` or a test id.
|
|
@@ -22,13 +22,13 @@ const Accordion = ({ allowMultiple, allowToggle, index, onChange, reduceMotion,
|
|
|
22
22
|
var _a;
|
|
23
23
|
return ((0, jsx_runtime_1.jsx)(react_2.AccordionItem, { border: "1px solid", borderColor: border, borderRadius: "xl", bg: colors.background[50], boxShadow: "none", mb: 3, overflow: "hidden", _last: { mb: 0 }, ...item.itemProps, sx: (_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.itemStyle, children: ({ isExpanded }) => {
|
|
24
24
|
var _a, _b, _c;
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsxs)(react_2.AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "
|
|
25
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("h2", { children: (0, jsx_runtime_1.jsxs)(react_2.AccordionButton, { px: 4, py: 3, gap: 3, fontSize: "sm", fontWeight: 600, color: headingColor, bg: isExpanded ? expandedBg : "transparent", transition: (0, motion_1.transitionFor)(["background-color"]), _hover: { bg: isExpanded ? expandedBg : softHover }, _focusVisible: focusRing, ...item.buttonProps, sx: {
|
|
26
26
|
...(0, motion_2.reducedMotionSx)(),
|
|
27
27
|
...(_a = item.customStyles) === null || _a === void 0 ? void 0 : _a.buttonStyle,
|
|
28
28
|
"&:hover": {
|
|
29
29
|
...(_b = item.customStyles) === null || _b === void 0 ? void 0 : _b.hoverbuttonStyle,
|
|
30
30
|
},
|
|
31
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "lg", color: isExpanded ? colors.accentText : colors.textMuted, bg: isExpanded ? colors.primary.opacity[16] : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: (0, motion_1.transitionFor)(["transform", "color", "background-color"], "base"), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "
|
|
31
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", flex: "1", textAlign: "left", children: item.header }), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "1.5rem", flexShrink: 0, borderRadius: "lg", color: isExpanded ? colors.accentText : colors.textMuted, bg: isExpanded ? colors.primary.opacity[16] : "transparent", transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)", transition: (0, motion_1.transitionFor)(["transform", "color", "background-color"], "base"), sx: (0, motion_2.reducedMotionSx)(), children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.AccordionPanel, { px: 4, pt: 1, pb: 4, fontSize: "sm", lineHeight: "1.5", color: bodyColor, ...item.panelProps, sx: (_c = item.customStyles) === null || _c === void 0 ? void 0 : _c.panelStyle, children: item.content })] }));
|
|
32
32
|
} }, idx));
|
|
33
33
|
}) }));
|
|
34
34
|
};
|
|
@@ -7,6 +7,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_2 = require("@chakra-ui/react");
|
|
9
9
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
10
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
10
11
|
const selectable_1 = require("../CheckoutKit/selectable");
|
|
11
12
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
12
13
|
const Tag_1 = __importDefault(require("../Tag/Tag"));
|
|
@@ -20,6 +21,6 @@ const AddressCard = ({ value, name, phone, lines, tag, isDefault = false, note,
|
|
|
20
21
|
const copy = { ...DEFAULT_LABELS, ...labels };
|
|
21
22
|
const { isSelected, interactive, inGroup, ringed, props } = (0, selectable_1.useSelectable)({ value, selected, disabled, onSelect });
|
|
22
23
|
const selectable = inGroup || !!onSelect;
|
|
23
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", "data-testid": testId, "data-selected": isSelected || undefined, ...(0, selectable_1.selectableSurface)(colors, { selected: isSelected && selectable, disabled, interactive, ringed }), children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...props, "data-radio": true, "aria-disabled": selectable && disabled ? true : undefined, "aria-labelledby": props.role ? nameId : undefined, "aria-describedby": props.role ? bodyId : undefined, gap: 3, p: 4, pb: onEdit || onRemove ? 2 : 4, borderRadius: "
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", "data-testid": testId, "data-selected": isSelected || undefined, ...(0, selectable_1.selectableSurface)(colors, { selected: isSelected && selectable, disabled, interactive, ringed }), children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...props, "data-radio": true, "aria-disabled": selectable && disabled ? true : undefined, "aria-labelledby": props.role ? nameId : undefined, "aria-describedby": props.role ? bodyId : undefined, gap: 3, p: 4, pb: onEdit || onRemove ? 2 : 4, borderRadius: "2xl", cursor: interactive ? "pointer" : "default", outline: "none", align: "flex-start", children: [selectable && ((0, jsx_runtime_1.jsx)(react_2.Box, { mt: 0.5, children: (0, jsx_runtime_1.jsx)(selectable_1.RadioIndicator, { selected: isSelected }) })), (0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", gap: 1, flex: 1, minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, wrap: "wrap", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", id: nameId, fontSize: "sm", fontWeight: 700, lineHeight: 1.4, color: colors.header[900], children: name }), tag && (0, jsx_runtime_1.jsx)(Tag_1.default, { label: tag, size: "xs", tone: "neutral" }), isDefault && (0, jsx_runtime_1.jsx)(Tag_1.default, { label: copy.default, size: "xs", tone: "neutral" })] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { id: bodyId, children: [lines.map((line) => ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "block", fontSize: "sm", lineHeight: 1.5, color: colors.text[800], children: line }, line))), phone && ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "block", mt: 1, fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, sx: typography_1.NUMERIC_TEXT, children: phone })), note && ((0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "block", mt: 1, fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: note }))] })] })] }), (onEdit || onRemove) && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 1, pl: selectable ? "2.75rem" : 1, pr: 2, pb: 2, children: [onEdit && ((0, jsx_runtime_1.jsx)(Button_1.default, { variant: "ghost", colorScheme: "gray", size: "sm", onClick: onEdit, "aria-label": `${copy.edit} address: ${name}`, children: copy.edit })), onRemove && ((0, jsx_runtime_1.jsx)(Button_1.default, { variant: "ghost", colorScheme: "gray", size: "sm", onClick: onRemove, "aria-label": `${copy.remove} address: ${name}`, children: copy.remove }))] }))] }));
|
|
24
25
|
};
|
|
25
26
|
exports.default = AddressCard;
|
|
@@ -137,7 +137,7 @@ const ApexLineChart = ({ data, labels, title, height, width, lineColors, titlePo
|
|
|
137
137
|
showSeries,
|
|
138
138
|
palette,
|
|
139
139
|
]);
|
|
140
|
-
return ((0, jsx_runtime_1.jsxs)("div", { ref: wrapperRef, children: [title && isSmall && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: title, placement: "top", hasArrow: true, fontSize: "
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)("div", { ref: wrapperRef, children: [title && isSmall && ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: title, placement: "top", hasArrow: true, fontSize: "xs", isDisabled: !isTruncated, children: (0, jsx_runtime_1.jsx)("div", { ref: titleRef, style: {
|
|
141
141
|
textAlign: "left",
|
|
142
142
|
color: resolvedTitleStyle === null || resolvedTitleStyle === void 0 ? void 0 : resolvedTitleStyle.color,
|
|
143
143
|
fontSize: computedFontSize,
|
|
@@ -229,7 +229,7 @@ const AppSwitcher = ({ apps, currentAppId, onSelect, onOpenChange, isSearchable,
|
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
handlePanelKeyDown(e);
|
|
232
|
-
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Grip, { size: s.icon + 1 }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: width, maxW: "calc(100vw - 1.5rem)", textAlign: "start", onKeyDown: handlePanelKeyDown, bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}`, _focus: { outline: "none", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}` }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, px: 3, pt: 3, pb: showSearch ? 2 : 1, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "
|
|
232
|
+
}, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Grip, { size: s.icon + 1 }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: width, maxW: "calc(100vw - 1.5rem)", textAlign: "start", onKeyDown: handlePanelKeyDown, bg: theme.colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}`, _focus: { outline: "none", boxShadow: `0 10px 30px ${theme.colors.boxShadow.default}` }, children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, px: 3, pt: 3, pb: showSearch ? 2 : 1, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs-minus", fontWeight: 600, letterSpacing: "0.08em", textTransform: "uppercase", color: theme.colors.textMuted, children: HEADING }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1" }), hint && (0, jsx_runtime_1.jsx)(Kbd_1.default, { size: "xs", children: hint })] }), showSearch && ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, pb: 2, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 15, color: theme.colors.textMuted }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { ref: searchRef, value: query, onChange: (e) => setQuery(e.target.value), placeholder: "Search apps", borderRadius: "lg", "aria-label": "Search apps", onKeyDown: (e) => {
|
|
233
233
|
if (e.key === "ArrowDown" && visible.length > 0) {
|
|
234
234
|
e.preventDefault();
|
|
235
235
|
focusItem(0);
|
|
@@ -16,7 +16,7 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
16
16
|
const SelectV2_1 = __importDefault(require("../SelectV2/SelectV2"));
|
|
17
17
|
const FieldLabel = ({ children }) => {
|
|
18
18
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight:
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", fontWeight: 500, color: colors.textMuted, mb: 2, children: children }));
|
|
20
20
|
};
|
|
21
21
|
const brandSwatch = (name, colors) => ((0, jsx_runtime_1.jsx)(react_2.Box, { w: "14px", h: "14px", borderRadius: "full", bg: brands_1.lightPalettes[name].primary[500], border: "1px solid", borderColor: (0, outlineRung_1.ruleInk)(colors.boxborder[200], [colors.backgroundColor.light, colors.backgroundColor.tertiary], outlineRung_1.CHROME_RULE) }));
|
|
22
22
|
const AppearanceSettings = ({ brand, fontSize, onBrandChange, onFontSizeChange, showBrand = true, showColorMode = true, showFontSize = true, size = "sm", labels, }) => {
|
|
@@ -9,6 +9,7 @@ const react_1 = require("react");
|
|
|
9
9
|
const react_2 = require("@chakra-ui/react");
|
|
10
10
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
11
11
|
const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
12
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
12
13
|
const DEFAULT_LABELS = {
|
|
13
14
|
start: "Start recording",
|
|
14
15
|
stop: "Stop recording",
|
|
@@ -164,6 +165,6 @@ const AudioRecorder = ({ onRecorded, maxDurationSec, isDisabled = false, labels
|
|
|
164
165
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 3, children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: isRecording ? text.stop : text.start, size: "sm", colorScheme: isRecording ? "red" : undefined, variant: isRecording ? "solid" : "outline", "aria-pressed": isRecording, isDisabled: isRecording ? false : isDisabled || blocked, onClick: isRecording ? stop : () => void start() }), isRecording ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { "data-testid": "audio-recorder-dot", boxSize: "0.5rem", borderRadius: "full", bg: colors.semanticText.error, "aria-hidden": true, sx: {
|
|
165
166
|
"@media (prefers-reduced-motion: no-preference)": { animation: "audio-recorder-pulse 1.2s ease-in-out infinite" },
|
|
166
167
|
"@keyframes audio-recorder-pulse": { "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.35 } },
|
|
167
|
-
} }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", role: "timer", fontSize: "
|
|
168
|
+
} }), (0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", role: "timer", fontSize: "sm", color: colors.header[900], sx: typography_1.NUMERIC_TEXT, children: (0, exports.formatElapsed)(elapsedMs) })] })) : null] }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { role: "status", "aria-live": "polite", children: announcement }), status === "denied" || status === "unsupported" ? ((0, jsx_runtime_1.jsx)(react_2.Text, { role: "alert", mt: 1, fontSize: "xs", color: colors.semanticText.error, children: status === "denied" ? text.permissionDenied : text.unsupported })) : null] }));
|
|
168
169
|
};
|
|
169
170
|
exports.default = AudioRecorder;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { AvatarProps } from "./AvatarProps";
|
|
2
|
-
|
|
2
|
+
/** Initials or image avatar with an optional status dot; `ref` is the outer box. */
|
|
3
|
+
declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
4
|
export default Avatar;
|
|
@@ -13,12 +13,14 @@ const STATUS_TONE = {
|
|
|
13
13
|
const STATUS_LABEL = {
|
|
14
14
|
online: "Online", away: "Away", busy: "Busy", offline: "Offline",
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
/** Initials or image avatar with an optional status dot; `ref` is the outer box. */
|
|
17
|
+
const Avatar = (0, react_1.forwardRef)(function Avatar({ name, src, size = "md", status, ariaLabel, getInitials, "data-testid": testId }, ref) {
|
|
17
18
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
18
19
|
const [imageFailed, setImageFailed] = (0, react_1.useState)(false);
|
|
19
20
|
const px = avatarSizing_1.SIZE_PX[size];
|
|
20
21
|
const showImage = Boolean(src) && !imageFailed;
|
|
21
22
|
const { bg, color } = (0, avatarColorway_1.resolveAvatarColorway)(name, colors);
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", boxSize: `${px}px`, flexShrink: 0, "data-testid": testId, children: [showImage ? ((0, jsx_runtime_1.jsx)(react_2.Image, { src: src, alt: name, boxSize: `${px}px`, borderRadius: "full", objectFit: "cover", onError: () => setImageFailed(true) })) : ((0, jsx_runtime_1.jsx)(react_2.Flex, { role: "img", "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : name, align: "center", justify: "center", boxSize: `${px}px`, borderRadius: "full", bg: bg, color: color, fontSize: avatarSizing_1.FONT_SIZE[size], fontWeight: 600, userSelect: "none", children: (getInitials !== null && getInitials !== void 0 ? getInitials : avatarColorway_1.initialsFor)(name) })), status ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", bottom: "0", right: "0", boxSize: avatarSizing_1.DOT_SIZE[size], borderRadius: "full", bg: (0, tone_1.toneInk)(colors, STATUS_TONE[status]), border: "2px solid", borderColor: colors.background[50] }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { children: STATUS_LABEL[status] })] })) : null] }));
|
|
23
|
-
};
|
|
23
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { ref: ref, position: "relative", boxSize: `${px}px`, flexShrink: 0, "data-testid": testId, children: [showImage ? ((0, jsx_runtime_1.jsx)(react_2.Image, { src: src, alt: name, boxSize: `${px}px`, borderRadius: "full", objectFit: "cover", onError: () => setImageFailed(true) })) : ((0, jsx_runtime_1.jsx)(react_2.Flex, { role: "img", "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : name, align: "center", justify: "center", boxSize: `${px}px`, borderRadius: "full", bg: bg, color: color, fontSize: avatarSizing_1.FONT_SIZE[size], fontWeight: 600, userSelect: "none", children: (getInitials !== null && getInitials !== void 0 ? getInitials : avatarColorway_1.initialsFor)(name) })), status ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", bottom: "0", right: "0", boxSize: avatarSizing_1.DOT_SIZE[size], borderRadius: "full", bg: (0, tone_1.toneInk)(colors, STATUS_TONE[status]), border: "2px solid", borderColor: colors.background[50] }), (0, jsx_runtime_1.jsx)(react_2.VisuallyHidden, { children: STATUS_LABEL[status] })] })) : null] }));
|
|
24
|
+
});
|
|
25
|
+
Avatar.displayName = "Avatar";
|
|
24
26
|
exports.default = Avatar;
|
|
@@ -30,5 +30,5 @@ function Backdrop({ open, variant = "dim", loader = false, text, invisible = fal
|
|
|
30
30
|
inset: 0,
|
|
31
31
|
zIndex: Number(zIndex !== null && zIndex !== void 0 ? zIndex : (container ? 10 : 1300)),
|
|
32
32
|
pointerEvents: allowBackgroundInteraction ? "none" : "auto",
|
|
33
|
-
}, children: (0, jsx_runtime_1.jsx)(react_1.Box, { role: loader ? "status" : "presentation", "aria-live": loader ? "polite" : undefined, "aria-busy": loader || undefined, "aria-label": label, onClick: allowBackgroundInteraction ? undefined : onClick, position: "absolute", inset: "0", bg: scrim, backdropFilter: !isDim && !invisible ? overlay_styles_1.OVERLAY_BLUR : undefined, color: colors.white, display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", gap: 3, pointerEvents: allowBackgroundInteraction ? "none" : "auto", cursor: onClick && !allowBackgroundInteraction ? "pointer" : undefined, sx: { WebkitTapHighlightColor: "transparent", ...(0, motion_1.reducedMotionSx)() }, children: children !== null && children !== void 0 ? children : (loader ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spinner_1.default, { size: "lg", boxSize: SPINNER_BOX, thickness: SPINNER_THICKNESS, color: colors.white, label: text ? "" : "Loading" }), text && (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "
|
|
33
|
+
}, children: (0, jsx_runtime_1.jsx)(react_1.Box, { role: loader ? "status" : "presentation", "aria-live": loader ? "polite" : undefined, "aria-busy": loader || undefined, "aria-label": label, onClick: allowBackgroundInteraction ? undefined : onClick, position: "absolute", inset: "0", bg: scrim, backdropFilter: !isDim && !invisible ? overlay_styles_1.OVERLAY_BLUR : undefined, color: colors.white, display: "flex", alignItems: "center", justifyContent: "center", flexDirection: "column", gap: 3, pointerEvents: allowBackgroundInteraction ? "none" : "auto", cursor: onClick && !allowBackgroundInteraction ? "pointer" : undefined, sx: { WebkitTapHighlightColor: "transparent", ...(0, motion_1.reducedMotionSx)() }, children: children !== null && children !== void 0 ? children : (loader ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spinner_1.default, { size: "lg", boxSize: SPINNER_BOX, thickness: SPINNER_THICKNESS, color: colors.white, label: text ? "" : "Loading" }), text && (0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "sm", children: text })] })) : null) }) }));
|
|
34
34
|
}
|
|
@@ -10,6 +10,7 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
|
10
10
|
const scrim_1 = require("../../Theme/tokens/builders/scrim");
|
|
11
11
|
const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
|
|
12
12
|
const motion_1 = require("../../Theme/tokens/primitives/motion");
|
|
13
|
+
const typography_1 = require("../../Theme/tokens/primitives/typography");
|
|
13
14
|
const motion_2 = require("../../Theme/chakra/motion");
|
|
14
15
|
const price_1 = require("../../Utils/price");
|
|
15
16
|
const Button_1 = __importDefault(require("../Button/Button"));
|
|
@@ -23,7 +24,7 @@ const BagBar = ({ total, note, onViewDetails, ctaLabel, onCta, ctaDisabled = fal
|
|
|
23
24
|
const { colors } = (0, useCustomTheme_1.useCustomTheme)();
|
|
24
25
|
const copy = { ...DEFAULT_LABELS, ...labels };
|
|
25
26
|
const sticky = position === "bottom";
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "section", "aria-label": copy.region, align: "center", justify: "space-between", gap: 4, px: 4, pt: 3, pb: SAFE_BOTTOM, borderTopRadius: "
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { as: "section", "aria-label": copy.region, align: "center", justify: "space-between", gap: 4, px: 4, pt: 3, pb: SAFE_BOTTOM, borderTopRadius: "3xl", bg: `${colors.surfaceRaised}${GLASS_ALPHA}`, backdropFilter: BLUR, position: sticky ? "sticky" : "static", bottom: sticky ? 0 : undefined, zIndex: sticky ? zIndex : undefined, boxShadow: sticky ? `0 -12px 32px -16px ${(0, scrim_1.overlayScrim)(colors)}` : "none", "data-testid": testId, sx: { WebkitBackdropFilter: BLUR, [NO_BLUR_SUPPORT]: { backgroundColor: colors.surfaceRaised } }, children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "baseline", gap: 2, wrap: "wrap", children: [(0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xs", fontWeight: 600, color: colors.textMuted, children: copy.total }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", fontSize: "xl", fontWeight: 700, lineHeight: 1.2, letterSpacing: "-0.02em", color: colors.header[900], sx: typography_1.NUMERIC_TEXT, "data-testid": "bag-bar-total", children: (0, price_1.formatPrice)(total, { currency, locale }) })] }), note && ((0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", display: "block", fontSize: "xs", lineHeight: 1.4, color: colors.textMuted, children: note })), onViewDetails && ((0, jsx_runtime_1.jsxs)(react_1.Box, { as: "button", type: "button", onClick: onViewDetails, display: "inline-flex", alignItems: "center", gap: 1, position: "relative", fontSize: "xs", fontWeight: 600, color: colors.accentText, borderRadius: "sm", transition: (0, motion_1.transitionFor)(["opacity"]), _hover: { opacity: 0.8 }, sx: {
|
|
27
28
|
...(0, focusRing_styles_1.focusVisibleStyles)(colors),
|
|
28
29
|
...(0, motion_2.reducedMotionSx)(),
|
|
29
30
|
"&::before": { content: '""', position: "absolute", inset: "-0.75rem -0.5rem" },
|
|
@@ -73,7 +73,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
|
|
|
73
73
|
px: "0.625rem",
|
|
74
74
|
py: "0.5rem",
|
|
75
75
|
borderRadius: "lg",
|
|
76
|
-
fontSize: "
|
|
76
|
+
fontSize: "xs-plus",
|
|
77
77
|
fontWeight: 500,
|
|
78
78
|
color: theme.colors.text[700],
|
|
79
79
|
transition: "background 0.12s",
|
|
@@ -52,7 +52,7 @@ const EventChip = ({ event, colors, surface, onEventClick, segment }) => {
|
|
|
52
52
|
alignItems: "center",
|
|
53
53
|
h: CHIP_HEIGHT,
|
|
54
54
|
px: 2,
|
|
55
|
-
fontSize: "
|
|
55
|
+
fontSize: "xs",
|
|
56
56
|
fontWeight: 500,
|
|
57
57
|
lineHeight: 1,
|
|
58
58
|
textAlign: "left",
|
|
@@ -154,7 +154,7 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
154
154
|
body = ((0, jsx_runtime_1.jsx)(react_2.Flex, { direction: "column", gap: 1, mt: 2, children: dayEvents.map((event) => ((0, jsx_runtime_1.jsx)(EventChip, { event: event, colors: colors, surface: surface, onEventClick: onEventClick }, event.id))) }));
|
|
155
155
|
}
|
|
156
156
|
else {
|
|
157
|
-
body = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { position: "relative", mt: 1, h: `calc(${layout.visibleLanes} * ${LANE_HEIGHT})`, children: ownSegments.map((s) => ((0, jsx_runtime_1.jsx)(EventChip, { event: s.event, colors: colors, surface: surface, onEventClick: onEventClick, segment: s }, s.event.id))) }), hidden > 0 ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", "aria-label": text.moreLabel(hidden, (0, calendarMath_1.formatFullDate)(day, locale)), onClick: () => drillIntoDay(day), px: 1, fontSize: "
|
|
157
|
+
body = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { position: "relative", mt: 1, h: `calc(${layout.visibleLanes} * ${LANE_HEIGHT})`, children: ownSegments.map((s) => ((0, jsx_runtime_1.jsx)(EventChip, { event: s.event, colors: colors, surface: surface, onEventClick: onEventClick, segment: s }, s.event.id))) }), hidden > 0 ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", "aria-label": text.moreLabel(hidden, (0, calendarMath_1.formatFullDate)(day, locale)), onClick: () => drillIntoDay(day), px: 1, fontSize: "xs", fontWeight: 600, color: colors.header[900], textAlign: "left", textDecoration: "underline", sx: (0, focusRing_styles_1.focusVisibleStyles)(colors), children: text.more(hidden) })) : null] }));
|
|
158
158
|
}
|
|
159
159
|
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { role: "gridcell", ref: (el) => {
|
|
160
160
|
if (el)
|
|
@@ -162,10 +162,10 @@ const CalendarGrid = ({ view, date, events, onViewChange, onDateChange, onEventC
|
|
|
162
162
|
else
|
|
163
163
|
cellRefs.current.delete(key);
|
|
164
164
|
}, "data-date": key, "aria-label": label, "aria-current": isToday ? "date" : undefined, tabIndex: active ? 0 : -1, onFocus: () => setFocusedKey(key), onKeyDown: (e) => handleCellKeyDown(e, day), position: "relative", minH: MIN_CELL_HEIGHT[view], p: 1, bg: surface, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, outline: "none", _focusVisible: {
|
|
165
|
-
boxShadow:
|
|
166
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "
|
|
165
|
+
boxShadow: (0, focusRing_styles_1.insetFocusRingShadow)(colors),
|
|
166
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.Text, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", minW: "1.5rem", h: "1.5rem", px: 1, borderRadius: "full", fontSize: "xs-plus", fontWeight: isToday ? 700 : 500, color: isToday ? colors.accentText : inMonth ? colors.header[900] : colors.textMuted, boxShadow: isToday ? `inset 0 0 0 1.5px ${colors.accentText}` : undefined, "aria-hidden": true, children: day.getDate() }), body] }, key));
|
|
167
167
|
};
|
|
168
|
-
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", wrap: "wrap", gap: 2, mb: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, children: [onDateChange ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: text.today, size: "sm", variant: "outline", onClick: () => onDateChange((0, calendarMath_1.startOfDay)(new Date())) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.previous, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, -1)) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.next, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, 1)) })] })) : null, (0, jsx_runtime_1.jsx)(react_2.Text, { as: "h2", fontSize: "
|
|
168
|
+
return ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", wrap: "wrap", gap: 2, mb: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, children: [onDateChange ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.default, { label: text.today, size: "sm", variant: "outline", onClick: () => onDateChange((0, calendarMath_1.startOfDay)(new Date())) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.previous, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, -1)) }), (0, jsx_runtime_1.jsx)(Button_1.default, { "aria-label": text.next, size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { size: 16, "aria-hidden": true }), onClick: () => onDateChange((0, calendarMath_1.shiftAnchor)(view, anchor, 1)) })] })) : null, (0, jsx_runtime_1.jsx)(react_2.Text, { as: "h2", fontSize: "md", fontWeight: 600, color: colors.header[900], children: title })] }), onViewChange ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { role: "group", "aria-label": text[view], gap: 1, children: VIEWS.map((v) => ((0, jsx_runtime_1.jsx)(Button_1.default, { label: text[v], size: "sm", variant: v === view ? "solid" : "outline", "aria-pressed": v === view, onClick: () => onViewChange(v) }, v))) })) : null] }), (0, jsx_runtime_1.jsx)(react_2.Box, { overflowX: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Box, { role: "grid", "aria-label": title, "aria-busy": isLoading || undefined, "data-view": view, minW: view === "day" ? undefined : "42rem", borderTop: "1px solid", borderLeft: "1px solid", borderColor: border, borderRadius: "lg", overflow: "hidden", children: [(0, jsx_runtime_1.jsx)(react_2.Grid, { role: "row", templateColumns: template, children: headerDays.map((i) => ((0, jsx_runtime_1.jsx)(react_2.Box, { role: "columnheader", "aria-label": weekdayLong[i], px: 2, py: 1, fontSize: "xs", fontWeight: 600, color: colors.textMuted, bg: colors.backgroundColor.main, borderRight: "1px solid", borderBottom: "1px solid", borderColor: border, children: weekdayShort[i] }, i))) }), weeks.map((week, weekIndex) => {
|
|
169
169
|
const layout = (0, calendarMath_1.layoutWeek)(week, shownEvents, maxLanes);
|
|
170
170
|
return ((0, jsx_runtime_1.jsx)(react_2.Grid, { role: "row", templateColumns: template, children: week.map((day, col) => renderCell(day, col, weekIndex, layout)) }, (0, calendarMath_1.dayKey)(week[0])));
|
|
171
171
|
})] }) })] }));
|