altum 0.0.1
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 +24 -0
- package/LICENSE +21 -0
- package/README.md +53 -0
- package/dist/base/ButtonBase/ButtonBase.js +1 -0
- package/dist/base/ButtonBase/ButtonBase.module.css.js +1 -0
- package/dist/base/ChartBase/ChartBase.js +1 -0
- package/dist/base/ChartBase/ChartBase.module.css.js +1 -0
- package/dist/base/ChartBase/ChartBase.utils.js +1 -0
- package/dist/base/DialogBase/DialogBase.js +1 -0
- package/dist/base/DialogBase/DialogBase.module.css.js +1 -0
- package/dist/base/FieldBase/FieldBase.js +1 -0
- package/dist/base/FieldBase/FieldBase.module.css.js +1 -0
- package/dist/base/ListOptionBase/ListOptionBase.js +1 -0
- package/dist/base/ListOptionBase/ListOptionBase.module.css.js +1 -0
- package/dist/base/MediaRowBase/MediaRowBase.js +1 -0
- package/dist/base/MediaRowBase/MediaRowBase.module.css.js +1 -0
- package/dist/base/ToggleControlBase/ToggleControlBase.js +1 -0
- package/dist/base/ToggleControlBase/ToggleControlBase.module.css.js +1 -0
- package/dist/components/Accordion/Accordion.js +1 -0
- package/dist/components/Accordion/Accordion.module.css.js +1 -0
- package/dist/components/ActionList/ActionList.js +1 -0
- package/dist/components/ActionList/ActionList.module.css.js +1 -0
- package/dist/components/ActionSheetTrigger/ActionSheetTrigger.js +1 -0
- package/dist/components/ActionSheetTrigger/ActionSheetTrigger.module.css.js +1 -0
- package/dist/components/ActionSheetTrigger/actionSheetContext.js +1 -0
- package/dist/components/Alert/Alert.js +1 -0
- package/dist/components/Alert/Alert.module.css.js +1 -0
- package/dist/components/AspectRatio/AspectRatio.js +1 -0
- package/dist/components/AspectRatio/AspectRatio.module.css.js +1 -0
- package/dist/components/Attachment/Attachment.js +1 -0
- package/dist/components/Attachment/Attachment.module.css.js +1 -0
- package/dist/components/Avatar/Avatar.js +1 -0
- package/dist/components/Avatar/Avatar.module.css.js +1 -0
- package/dist/components/Backdrop/Backdrop.js +1 -0
- package/dist/components/Backdrop/Backdrop.module.css.js +1 -0
- package/dist/components/Badge/Badge.js +1 -0
- package/dist/components/Badge/Badge.module.css.js +1 -0
- package/dist/components/BarChart/BarChart.js +1 -0
- package/dist/components/BarChart/BarChart.module.css.js +1 -0
- package/dist/components/Box/Box.js +1 -0
- package/dist/components/Box/Box.module.css.js +1 -0
- package/dist/components/Bubble/Bubble.js +1 -0
- package/dist/components/Bubble/Bubble.module.css.js +1 -0
- package/dist/components/Button/Button.js +1 -0
- package/dist/components/Button/Button.module.css.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.module.css.js +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.js +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.module.css.js +1 -0
- package/dist/components/Calendar/Calendar.context.js +1 -0
- package/dist/components/Calendar/Calendar.js +1 -0
- package/dist/components/Calendar/Calendar.module.css.js +1 -0
- package/dist/components/Calendar/Calendar.slots.js +1 -0
- package/dist/components/Calendar/Calendar.types.js +1 -0
- package/dist/components/Calendar/Calendar.utils.js +1 -0
- package/dist/components/Calendar/Calendar.views.js +1 -0
- package/dist/components/Calendar/calendar.schedule.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.EventBar.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.EventBar.module.css.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.MonthView.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.Schedule.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.Schedule.module.css.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.Schedule.types.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.Schedule.utils.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.ScheduleView.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.TaskChip.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.TimedEvent.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.TimedEvent.module.css.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.YearView.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.chrome.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.context.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.module.css.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.utils.js +1 -0
- package/dist/components/CalendarBoard/CalendarBoard.views.js +1 -0
- package/dist/components/CalendarBoard/calendarBoardHoverStore.js +1 -0
- package/dist/components/Card/Card.js +1 -0
- package/dist/components/Card/Card.module.css.js +1 -0
- package/dist/components/Checkbox/Checkbox.js +1 -0
- package/dist/components/Chip/Chip.js +1 -0
- package/dist/components/Chip/Chip.module.css.js +1 -0
- package/dist/components/Collapse/Collapse.js +1 -0
- package/dist/components/Collapse/Collapse.module.css.js +1 -0
- package/dist/components/ColorSwatchGroup/ColorSwatchGroup.js +1 -0
- package/dist/components/ColorSwatchGroup/ColorSwatchGroup.module.css.js +1 -0
- package/dist/components/CommandPalette/CommandPalette.js +1 -0
- package/dist/components/CommandPalette/CommandPalette.module.css.js +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.module.css.js +1 -0
- package/dist/components/Container/Container.js +1 -0
- package/dist/components/Container/Container.module.css.js +1 -0
- package/dist/components/ContextMenu/ContextMenu.js +1 -0
- package/dist/components/ContextMenu/ContextMenu.module.css.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.Filter.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.List.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.Shell.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.Shell.module.css.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.context.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.js +1 -0
- package/dist/components/CustomSelect/CustomSelect.module.css.js +1 -0
- package/dist/components/CustomSelect/useCustomSelectComboboxKeyboard.js +1 -0
- package/dist/components/DatePicker/DatePicker.js +1 -0
- package/dist/components/DatePicker/DatePicker.utils.js +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.module.css.js +1 -0
- package/dist/components/DayStripCalendar/DayStripCalendar.js +1 -0
- package/dist/components/DayStripCalendar/DayStripCalendar.module.css.js +1 -0
- package/dist/components/DescriptionList/DescriptionList.js +1 -0
- package/dist/components/DescriptionList/DescriptionList.module.css.js +1 -0
- package/dist/components/DonutChart/DonutChart.js +1 -0
- package/dist/components/DonutChart/DonutChart.module.css.js +1 -0
- package/dist/components/Dropdown/Dropdown.js +1 -0
- package/dist/components/Dropdown/Dropdown.module.css.js +1 -0
- package/dist/components/Dropdown/DropdownMobileSheet.js +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +1 -0
- package/dist/components/EmptyState/EmptyState.js +1 -0
- package/dist/components/EmptyState/EmptyState.module.css.js +1 -0
- package/dist/components/FieldLabel/FieldLabel.js +1 -0
- package/dist/components/FieldLabel/FieldLabel.module.css.js +1 -0
- package/dist/components/Fieldset/Fieldset.js +1 -0
- package/dist/components/Fieldset/Fieldset.module.css.js +1 -0
- package/dist/components/FileList/FileList.js +1 -0
- package/dist/components/FileList/FileList.module.css.js +1 -0
- package/dist/components/FocusTrap/FocusTrap.js +1 -0
- package/dist/components/FormMessage/FormMessage.js +1 -0
- package/dist/components/FormMessage/FormMessage.module.css.js +1 -0
- package/dist/components/GrabHandle/GrabHandle.js +1 -0
- package/dist/components/GrabHandle/GrabHandle.module.css.js +1 -0
- package/dist/components/Grid/Grid.js +1 -0
- package/dist/components/Grid/Grid.module.css.js +1 -0
- package/dist/components/Grid/Grid.utils.js +1 -0
- package/dist/components/ImageCrop/ImageCrop.js +1 -0
- package/dist/components/ImageCrop/ImageCrop.module.css.js +1 -0
- package/dist/components/ImageCrop/ImageCrop.utils.js +1 -0
- package/dist/components/ImageGallery/ImageGallery.js +1 -0
- package/dist/components/ImageGallery/ImageGallery.module.css.js +1 -0
- package/dist/components/ImageLightbox/ImageLightbox.js +1 -0
- package/dist/components/ImageLightbox/ImageLightbox.module.css.js +1 -0
- package/dist/components/Item/Item.js +1 -0
- package/dist/components/Item/Item.module.css.js +1 -0
- package/dist/components/Kbd/Kbd.js +1 -0
- package/dist/components/Kbd/Kbd.module.css.js +1 -0
- package/dist/components/Layout/ControlRow.js +1 -0
- package/dist/components/Layout/Inline.js +1 -0
- package/dist/components/Layout/Layout.js +1 -0
- package/dist/components/Layout/Layout.module.css.js +1 -0
- package/dist/components/Layout/Layout.types.js +1 -0
- package/dist/components/Layout/LayoutItem.js +1 -0
- package/dist/components/Layout/Split.js +1 -0
- package/dist/components/Layout/Stack.js +1 -0
- package/dist/components/Layout/flexPrimitives.module.css.js +1 -0
- package/dist/components/Layout/layoutClasses.js +1 -0
- package/dist/components/LineChart/LineChart.js +1 -0
- package/dist/components/LineChart/LineChart.module.css.js +1 -0
- package/dist/components/Link/Link.js +1 -0
- package/dist/components/Link/Link.module.css.js +1 -0
- package/dist/components/Listbox/Listbox.js +1 -0
- package/dist/components/Listbox/Listbox.module.css.js +1 -0
- package/dist/components/LocaleProvider/LocaleProvider.js +1 -0
- package/dist/components/Marker/Marker.js +1 -0
- package/dist/components/Marker/Marker.module.css.js +1 -0
- package/dist/components/MaskedField/MaskedField.js +1 -0
- package/dist/components/MaskedField/MaskedField.module.css.js +1 -0
- package/dist/components/MaskedField/MaskedField.utils.js +1 -0
- package/dist/components/Media/Media.js +1 -0
- package/dist/components/Media/Media.module.css.js +1 -0
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Modal/Modal.module.css.js +1 -0
- package/dist/components/Notification/Notification.js +1 -0
- package/dist/components/Notification/Notification.module.css.js +1 -0
- package/dist/components/Notification/toast.js +1 -0
- package/dist/components/NumberField/NumberField.js +1 -0
- package/dist/components/NumberField/NumberField.module.css.js +1 -0
- package/dist/components/OverflowActions/OverflowActions.js +1 -0
- package/dist/components/OverflowActions/OverflowActions.module.css.js +1 -0
- package/dist/components/OverflowGroup/OverflowGroup.js +1 -0
- package/dist/components/OverflowGroup/OverflowGroup.module.css.js +1 -0
- package/dist/components/Overlay/Overlay.Dismiss.js +1 -0
- package/dist/components/Overlay/Overlay.Focus.js +1 -0
- package/dist/components/Overlay/Overlay.Positioner.js +1 -0
- package/dist/components/Overlay/Overlay.Root.js +1 -0
- package/dist/components/Overlay/Overlay.js +1 -0
- package/dist/components/Overlay/Overlay.module.css.js +1 -0
- package/dist/components/Overlay/Overlay.types.js +1 -0
- package/dist/components/Pagination/Pagination.js +1 -0
- package/dist/components/Pagination/Pagination.module.css.js +1 -0
- package/dist/components/PasswordField/PasswordField.js +1 -0
- package/dist/components/PasswordField/PasswordField.module.css.js +1 -0
- package/dist/components/PinInput/PinInput.js +1 -0
- package/dist/components/PinInput/PinInput.module.css.js +1 -0
- package/dist/components/Popover/Popover.js +1 -0
- package/dist/components/Popover/Popover.module.css.js +1 -0
- package/dist/components/Progress/Progress.js +1 -0
- package/dist/components/Progress/Progress.module.css.js +1 -0
- package/dist/components/PullToRefresh/PullToRefresh.js +1 -0
- package/dist/components/PullToRefresh/PullToRefresh.module.css.js +1 -0
- package/dist/components/Radio/Radio.js +1 -0
- package/dist/components/Rating/Rating.js +1 -0
- package/dist/components/Rating/Rating.module.css.js +1 -0
- package/dist/components/RelativeTime/RelativeTime.js +1 -0
- package/dist/components/SafeArea/SafeArea.js +1 -0
- package/dist/components/SafeArea/SafeArea.module.css.js +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +1 -0
- package/dist/components/ScrollArea/ScrollArea.module.css.js +1 -0
- package/dist/components/SearchField/SearchField.js +1 -0
- package/dist/components/SearchField/SearchField.module.css.js +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.module.css.js +1 -0
- package/dist/components/Select/Select.js +1 -0
- package/dist/components/Select/Select.module.css.js +1 -0
- package/dist/components/SelectionGroup/SelectionGroup.js +1 -0
- package/dist/components/SelectionGroup/SelectionGroup.module.css.js +1 -0
- package/dist/components/Separator/Separator.js +1 -0
- package/dist/components/Separator/Separator.module.css.js +1 -0
- package/dist/components/Sheet/Sheet.js +1 -0
- package/dist/components/Sheet/Sheet.module.css.js +1 -0
- package/dist/components/Sidebar/Sidebar.js +1 -0
- package/dist/components/Sidebar/Sidebar.module.css.js +1 -0
- package/dist/components/Skeleton/Skeleton.js +1 -0
- package/dist/components/Skeleton/Skeleton.module.css.js +1 -0
- package/dist/components/SkipLink/SkipLink.js +1 -0
- package/dist/components/SkipLink/SkipLink.module.css.js +1 -0
- package/dist/components/Slider/Slider.js +1 -0
- package/dist/components/Slider/Slider.module.css.js +1 -0
- package/dist/components/SortableList/SortableList.js +1 -0
- package/dist/components/SortableList/SortableList.module.css.js +1 -0
- package/dist/components/SortableList/SortableList.types.js +1 -0
- package/dist/components/SortableList/useSortableListDnD.js +1 -0
- package/dist/components/Spinner/Spinner.js +1 -0
- package/dist/components/Spinner/Spinner.module.css.js +1 -0
- package/dist/components/StatBadge/StatBadge.js +1 -0
- package/dist/components/StatBadge/StatBadge.module.css.js +1 -0
- package/dist/components/Steps/Steps.js +1 -0
- package/dist/components/Steps/Steps.module.css.js +1 -0
- package/dist/components/SuggestField/SuggestField.js +1 -0
- package/dist/components/SuggestField/SuggestField.module.css.js +1 -0
- package/dist/components/SwipeToAction/SwipeActionButtons.js +1 -0
- package/dist/components/SwipeToAction/SwipeToAction.js +1 -0
- package/dist/components/SwipeToAction/SwipeToAction.module.css.js +1 -0
- package/dist/components/SwipeToAction/SwipeToAction.utils.js +1 -0
- package/dist/components/Switch/Switch.js +1 -0
- package/dist/components/Switch/Switch.module.css.js +1 -0
- package/dist/components/Table/Table.js +1 -0
- package/dist/components/Table/Table.module.css.js +1 -0
- package/dist/components/Table/Table.slots.js +1 -0
- package/dist/components/Table/TableContext.js +1 -0
- package/dist/components/Table/TableRow.js +1 -0
- package/dist/components/Table/TableRowActions.js +1 -0
- package/dist/components/Table/TableView.js +1 -0
- package/dist/components/Tabs/Tabs.js +1 -0
- package/dist/components/Tabs/Tabs.module.css.js +1 -0
- package/dist/components/Text/Text.js +1 -0
- package/dist/components/Text/Text.module.css.js +1 -0
- package/dist/components/TextField/TextField.js +1 -0
- package/dist/components/TextField/TextField.module.css.js +1 -0
- package/dist/components/TextareaField/TextareaField.js +1 -0
- package/dist/components/TextareaField/TextareaField.module.css.js +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.js +1 -0
- package/dist/components/ThemeProvider/ThemeProvider.module.css.js +1 -0
- package/dist/components/TimePicker/TimePicker.js +1 -0
- package/dist/components/TimePicker/TimePicker.module.css.js +1 -0
- package/dist/components/Timeline/Timeline.js +1 -0
- package/dist/components/Timeline/Timeline.module.css.js +1 -0
- package/dist/components/Title/Title.js +1 -0
- package/dist/components/Title/Title.module.css.js +1 -0
- package/dist/components/Tooltip/Tooltip.js +1 -0
- package/dist/components/Tooltip/Tooltip.module.css.js +1 -0
- package/dist/components/UploadZone/UploadZone.js +1 -0
- package/dist/components/UploadZone/UploadZone.module.css.js +1 -0
- package/dist/components/VirtualList/VirtualList.js +1 -0
- package/dist/components/VirtualList/VirtualList.module.css.js +1 -0
- package/dist/components/VirtualList/VirtualList.utils.js +1 -0
- package/dist/components/VirtualList/VirtualListInner.js +1 -0
- package/dist/components/VirtualList/VirtualListItemCell.js +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.module.css.js +1 -0
- package/dist/entries/hooks.js +1 -0
- package/dist/entries/icons.js +1 -0
- package/dist/entries/utils.js +1 -0
- package/dist/hooks/useBodyScrollLock.js +1 -0
- package/dist/hooks/useControlledState.js +1 -0
- package/dist/hooks/useDocumentKeyDown.js +1 -0
- package/dist/hooks/useEscapeKey.js +1 -0
- package/dist/hooks/useFocusRestore.js +1 -0
- package/dist/hooks/useFocusTrap.js +1 -0
- package/dist/hooks/useForm.js +1 -0
- package/dist/hooks/useInertSiblings.js +1 -0
- package/dist/hooks/useLongPress.js +1 -0
- package/dist/hooks/useMediaQuery.js +1 -0
- package/dist/hooks/useOutsideClick.js +1 -0
- package/dist/hooks/useOverlay.js +1 -0
- package/dist/hooks/useOverlayPanel.js +1 -0
- package/dist/hooks/usePrefersReducedMotion.js +1 -0
- package/dist/icons/icons/IconAlarm.js +10 -0
- package/dist/icons/icons/IconAlignCenter.js +3 -0
- package/dist/icons/icons/IconAlignJustify.js +3 -0
- package/dist/icons/icons/IconAlignLeft.js +3 -0
- package/dist/icons/icons/IconAlignRight.js +3 -0
- package/dist/icons/icons/IconAnchor.js +5 -0
- package/dist/icons/icons/IconArchive.js +5 -0
- package/dist/icons/icons/IconArrowDown.js +3 -0
- package/dist/icons/icons/IconArrowLeft.js +3 -0
- package/dist/icons/icons/IconArrowRight.js +3 -0
- package/dist/icons/icons/IconArrowThinDown.js +3 -0
- package/dist/icons/icons/IconArrowThinLeft.js +2 -0
- package/dist/icons/icons/IconArrowThinRight.js +3 -0
- package/dist/icons/icons/IconArrowThinUp.js +2 -0
- package/dist/icons/icons/IconArrowUp.js +3 -0
- package/dist/icons/icons/IconArticle.js +4 -0
- package/dist/icons/icons/IconBackspace.js +3 -0
- package/dist/icons/icons/IconBasket.js +4 -0
- package/dist/icons/icons/IconBasketball.js +7 -0
- package/dist/icons/icons/IconBatteryEmpty.js +2 -0
- package/dist/icons/icons/IconBatteryFull.js +4 -0
- package/dist/icons/icons/IconBatteryLow.js +3 -0
- package/dist/icons/icons/IconBatteryMedium.js +3 -0
- package/dist/icons/icons/IconBell.js +8 -0
- package/dist/icons/icons/IconBlog.js +4 -0
- package/dist/icons/icons/IconBluetooth.js +4 -0
- package/dist/icons/icons/IconBold.js +3 -0
- package/dist/icons/icons/IconBookmark.js +3 -0
- package/dist/icons/icons/IconBookmarks.js +4 -0
- package/dist/icons/icons/IconBox.js +5 -0
- package/dist/icons/icons/IconBriefcase.js +4 -0
- package/dist/icons/icons/IconBrightnessLow.js +10 -0
- package/dist/icons/icons/IconBrightnessMax.js +9 -0
- package/dist/icons/icons/IconBrightnessMedium.js +9 -0
- package/dist/icons/icons/IconBroadcast.js +10 -0
- package/dist/icons/icons/IconBrowser.js +2 -0
- package/dist/icons/icons/IconBrowserUpload.js +5 -0
- package/dist/icons/icons/IconBrush.js +7 -0
- package/dist/icons/icons/IconCalendar.js +4 -0
- package/dist/icons/icons/IconCamcorder.js +3 -0
- package/dist/icons/icons/IconCamera.js +8 -0
- package/dist/icons/icons/IconCard.js +3 -0
- package/dist/icons/icons/IconCart.js +6 -0
- package/dist/icons/icons/IconChecklist.js +6 -0
- package/dist/icons/icons/IconCheckmark.js +2 -0
- package/dist/icons/icons/IconChevronDown.js +2 -0
- package/dist/icons/icons/IconChevronLeft.js +2 -0
- package/dist/icons/icons/IconChevronRight.js +2 -0
- package/dist/icons/icons/IconChevronUp.js +2 -0
- package/dist/icons/icons/IconClipboard.js +4 -0
- package/dist/icons/icons/IconClock.js +3 -0
- package/dist/icons/icons/IconClockwise.js +4 -0
- package/dist/icons/icons/IconCloud.js +6 -0
- package/dist/icons/icons/IconCloudDownload.js +9 -0
- package/dist/icons/icons/IconCloudUpload.js +9 -0
- package/dist/icons/icons/IconCode.js +4 -0
- package/dist/icons/icons/IconContract.js +8 -0
- package/dist/icons/icons/IconContract2.js +4 -0
- package/dist/icons/icons/IconConversation.js +7 -0
- package/dist/icons/icons/IconCopy.js +5 -0
- package/dist/icons/icons/IconCrop.js +6 -0
- package/dist/icons/icons/IconCross.js +3 -0
- package/dist/icons/icons/IconCrosshair.js +4 -0
- package/dist/icons/icons/IconCutlery.js +7 -0
- package/dist/icons/icons/IconDeviceDesktop.js +4 -0
- package/dist/icons/icons/IconDeviceMobile.js +3 -0
- package/dist/icons/icons/IconDeviceTablet.js +3 -0
- package/dist/icons/icons/IconDirection.js +3 -0
- package/dist/icons/icons/IconDisc.js +8 -0
- package/dist/icons/icons/IconDocument.js +5 -0
- package/dist/icons/icons/IconDocumentDelete.js +5 -0
- package/dist/icons/icons/IconDocumentEdit.js +4 -0
- package/dist/icons/icons/IconDocumentNew.js +2 -0
- package/dist/icons/icons/IconDocumentRemove.js +3 -0
- package/dist/icons/icons/IconDot.js +2 -0
- package/dist/icons/icons/IconDots2.js +4 -0
- package/dist/icons/icons/IconDots3.js +5 -0
- package/dist/icons/icons/IconDownload.js +3 -0
- package/dist/icons/icons/IconDragHandle.js +1 -0
- package/dist/icons/icons/IconDuplicate.js +3 -0
- package/dist/icons/icons/IconEnter.js +4 -0
- package/dist/icons/icons/IconExit.js +4 -0
- package/dist/icons/icons/IconExpand.js +8 -0
- package/dist/icons/icons/IconExpand2.js +4 -0
- package/dist/icons/icons/IconExperiment.js +7 -0
- package/dist/icons/icons/IconExport.js +6 -0
- package/dist/icons/icons/IconFeed.js +6 -0
- package/dist/icons/icons/IconFlag.js +6 -0
- package/dist/icons/icons/IconFlashlight.js +4 -0
- package/dist/icons/icons/IconFolder.js +2 -0
- package/dist/icons/icons/IconFolderOpen.js +3 -0
- package/dist/icons/icons/IconForward.js +5 -0
- package/dist/icons/icons/IconGaming.js +14 -0
- package/dist/icons/icons/IconGear.js +21 -0
- package/dist/icons/icons/IconGraduation.js +6 -0
- package/dist/icons/icons/IconGraphBar.js +3 -0
- package/dist/icons/icons/IconGraphLine.js +4 -0
- package/dist/icons/icons/IconGraphPie.js +4 -0
- package/dist/icons/icons/IconHeadset.js +8 -0
- package/dist/icons/icons/IconHeart.js +8 -0
- package/dist/icons/icons/IconHelp.js +12 -0
- package/dist/icons/icons/IconHome.js +4 -0
- package/dist/icons/icons/IconHourglass.js +6 -0
- package/dist/icons/icons/IconInbox.js +6 -0
- package/dist/icons/icons/IconInformation.js +6 -0
- package/dist/icons/icons/IconItalic.js +3 -0
- package/dist/icons/icons/IconJewel.js +4 -0
- package/dist/icons/icons/IconLifting.js +3 -0
- package/dist/icons/icons/IconLightbulb.js +7 -0
- package/dist/icons/icons/IconLink.js +6 -0
- package/dist/icons/icons/IconLinkBroken.js +8 -0
- package/dist/icons/icons/IconList.js +7 -0
- package/dist/icons/icons/IconLoading.js +12 -0
- package/dist/icons/icons/IconLocation.js +5 -0
- package/dist/icons/icons/IconLock.js +2 -0
- package/dist/icons/icons/IconLockOpen.js +3 -0
- package/dist/icons/icons/IconMail.js +9 -0
- package/dist/icons/icons/IconMap.js +8 -0
- package/dist/icons/icons/IconMediaLoop.js +3 -0
- package/dist/icons/icons/IconMediaNext.js +3 -0
- package/dist/icons/icons/IconMediaPause.js +2 -0
- package/dist/icons/icons/IconMediaPlay.js +2 -0
- package/dist/icons/icons/IconMediaPrevious.js +3 -0
- package/dist/icons/icons/IconMediaRecord.js +3 -0
- package/dist/icons/icons/IconMediaShuffle.js +8 -0
- package/dist/icons/icons/IconMediaStop.js +2 -0
- package/dist/icons/icons/IconMedical.js +4 -0
- package/dist/icons/icons/IconMenu.js +3 -0
- package/dist/icons/icons/IconMessage.js +5 -0
- package/dist/icons/icons/IconMeter.js +5 -0
- package/dist/icons/icons/IconMicrophone.js +8 -0
- package/dist/icons/icons/IconMinus.js +1 -0
- package/dist/icons/icons/IconMonitor.js +2 -0
- package/dist/icons/icons/IconMove.js +7 -0
- package/dist/icons/icons/IconMusic.js +8 -0
- package/dist/icons/icons/IconNetwork1.js +6 -0
- package/dist/icons/icons/IconNetwork2.js +6 -0
- package/dist/icons/icons/IconNetwork3.js +8 -0
- package/dist/icons/icons/IconNetwork4.js +7 -0
- package/dist/icons/icons/IconNetwork5.js +4 -0
- package/dist/icons/icons/IconPamphlet.js +6 -0
- package/dist/icons/icons/IconPaperclip.js +5 -0
- package/dist/icons/icons/IconPencil.js +4 -0
- package/dist/icons/icons/IconPhone.js +7 -0
- package/dist/icons/icons/IconPhoto.js +4 -0
- package/dist/icons/icons/IconPhotoGroup.js +6 -0
- package/dist/icons/icons/IconPill.js +8 -0
- package/dist/icons/icons/IconPin.js +8 -0
- package/dist/icons/icons/IconPlus.js +2 -0
- package/dist/icons/icons/IconPower.js +4 -0
- package/dist/icons/icons/IconPreview.js +8 -0
- package/dist/icons/icons/IconPreviewOff.js +8 -0
- package/dist/icons/icons/IconPrint.js +5 -0
- package/dist/icons/icons/IconPulse.js +4 -0
- package/dist/icons/icons/IconQuestion.js +6 -0
- package/dist/icons/icons/IconReply.js +4 -0
- package/dist/icons/icons/IconReplyAll.js +6 -0
- package/dist/icons/icons/IconReturn.js +3 -0
- package/dist/icons/icons/IconRetweet.js +5 -0
- package/dist/icons/icons/IconRocket.js +11 -0
- package/dist/icons/icons/IconScale.js +6 -0
- package/dist/icons/icons/IconSearch.js +6 -0
- package/dist/icons/icons/IconShoppingBag.js +3 -0
- package/dist/icons/icons/IconSkip.js +5 -0
- package/dist/icons/icons/IconStack.js +5 -0
- package/dist/icons/icons/IconStar.js +5 -0
- package/dist/icons/icons/IconStopwatch.js +6 -0
- package/dist/icons/icons/IconStore.js +6 -0
- package/dist/icons/icons/IconSuitcase.js +3 -0
- package/dist/icons/icons/IconSwap.js +5 -0
- package/dist/icons/icons/IconTag.js +4 -0
- package/dist/icons/icons/IconTagDelete.js +5 -0
- package/dist/icons/icons/IconTags.js +7 -0
- package/dist/icons/icons/IconThumbsDown.js +7 -0
- package/dist/icons/icons/IconThumbsUp.js +7 -0
- package/dist/icons/icons/IconTicket.js +8 -0
- package/dist/icons/icons/IconTimeReverse.js +5 -0
- package/dist/icons/icons/IconToDo.js +5 -0
- package/dist/icons/icons/IconToggles.js +9 -0
- package/dist/icons/icons/IconTrash.js +6 -0
- package/dist/icons/icons/IconTrophy.js +7 -0
- package/dist/icons/icons/IconUpload.js +4 -0
- package/dist/icons/icons/IconUser.js +5 -0
- package/dist/icons/icons/IconUserGroup.js +9 -0
- package/dist/icons/icons/IconUserId.js +7 -0
- package/dist/icons/icons/IconVibrate.js +7 -0
- package/dist/icons/icons/IconViewApps.js +14 -0
- package/dist/icons/icons/IconViewList.js +5 -0
- package/dist/icons/icons/IconViewListLarge.js +6 -0
- package/dist/icons/icons/IconViewThumb.js +6 -0
- package/dist/icons/icons/IconVolumeFull.js +8 -0
- package/dist/icons/icons/IconVolumeLow.js +5 -0
- package/dist/icons/icons/IconVolumeMedium.js +6 -0
- package/dist/icons/icons/IconVolumeOff.js +6 -0
- package/dist/icons/icons/IconWallet.js +5 -0
- package/dist/icons/icons/IconWarning.js +4 -0
- package/dist/icons/icons/IconWeb.js +12 -0
- package/dist/icons/icons/IconWeight.js +3 -0
- package/dist/icons/icons/IconWifi.js +7 -0
- package/dist/icons/icons/IconWrong.js +3 -0
- package/dist/icons/icons/IconZoomIn.js +5 -0
- package/dist/icons/icons/IconZoomOut.js +4 -0
- package/dist/index.js +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/localeContext.js +1 -0
- package/dist/locales/ru.js +1 -0
- package/dist/locales/translate.js +1 -0
- package/dist/utils/a11y.js +1 -0
- package/dist/utils/anchorPosition.js +1 -0
- package/dist/utils/arrayMove.js +1 -0
- package/dist/utils/autoHeight.js +1 -0
- package/dist/utils/cn.js +1 -0
- package/dist/utils/composeEvents.js +1 -0
- package/dist/utils/composeRefs.js +1 -0
- package/dist/utils/controlTrack.js +1 -0
- package/dist/utils/controlTrack.module.css.js +1 -0
- package/dist/utils/cssSize.js +1 -0
- package/dist/utils/focus.js +1 -0
- package/dist/utils/formControl.js +1 -0
- package/dist/utils/hoverTriggerGroup.js +1 -0
- package/dist/utils/keyboard.js +1 -0
- package/dist/utils/keyboardShortcut.js +1 -0
- package/dist/utils/listboxOptions.js +1 -0
- package/dist/utils/mergeStyles.js +1 -0
- package/dist/utils/overlayDismiss.js +1 -0
- package/dist/utils/overlayEscapeStack.js +1 -0
- package/dist/utils/overlayPurpose.js +1 -0
- package/dist/utils/overlayStack.js +1 -0
- package/dist/utils/overlayZIndex.js +1 -0
- package/dist/utils/portal.js +1 -0
- package/dist/utils/renderChildren.js +1 -0
- package/dist/utils/slot.js +1 -0
- package/dist/utils/spacing.js +1 -0
- package/dist/utils/transform.js +1 -0
- package/docs/COMPONENTS.md +207 -0
- package/docs/ICONS.md +22 -0
- package/docs/LAYOUT.md +282 -0
- package/docs/THEMING.md +308 -0
- package/package.json +127 -0
- package/types/entries/hooks.d.ts +329 -0
- package/types/entries/icons.d.ts +1621 -0
- package/types/entries/utils.d.ts +519 -0
- package/types/index.d.ts +6083 -0
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode, ButtonHTMLAttributes, CSSProperties, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Нормализует размер для CSS-свойств width/height/gap.
|
|
6
|
+
*
|
|
7
|
+
* @param value - Число интерпретируется как px; строка передаётся как есть (`100%`, `1rem`, `auto`).
|
|
8
|
+
* @returns CSS-значение для inline-стиля или CSS Modules.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* toCssSize(24); // "24px"
|
|
12
|
+
* toCssSize('100%'); // "100%"
|
|
13
|
+
*/
|
|
14
|
+
declare function toCssSize(value: number | string): string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Переставляет элемент массива с одной позиции на другую (immutable).
|
|
18
|
+
*
|
|
19
|
+
* @template T - Тип элементов массива.
|
|
20
|
+
* @param items - Исходный массив (не мутируется).
|
|
21
|
+
* @param fromIndex - Индекс перемещаемого элемента.
|
|
22
|
+
* @param toIndex - Целевой индекс после перемещения.
|
|
23
|
+
* @returns Новый массив с переставленным элементом или `null`, если индексы
|
|
24
|
+
* совпадают, выходят за границы или массив пуст.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* moveArrayItem(['a', 'b', 'c'], 0, 2); // ['b', 'c', 'a']
|
|
28
|
+
*/
|
|
29
|
+
declare function moveArrayItem<T>(items: readonly T[], fromIndex: number, toIndex: number): T[] | null;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Извлекает горизонтальное смещение translateX из inline-строки `transform`.
|
|
33
|
+
* Поддерживает `translateX(...)`, `matrix(...)` и `matrix3d(...)` через DOMMatrix.
|
|
34
|
+
*
|
|
35
|
+
* @param transform - Значение CSS `transform`; `none` или пустая строка → `0`.
|
|
36
|
+
* @returns Смещение по оси X в пикселях; при ошибке парсинга — `0`.
|
|
37
|
+
*/
|
|
38
|
+
declare function getTranslateXFromTransform(transform: string): number;
|
|
39
|
+
|
|
40
|
+
/** Сторона якоря плавающего слоя. */
|
|
41
|
+
type AnchorSide = 'top' | 'bottom' | 'left' | 'right';
|
|
42
|
+
/** Выравнивание вдоль стороны якоря. */
|
|
43
|
+
type AnchorAlign = 'start' | 'center' | 'end';
|
|
44
|
+
|
|
45
|
+
type AnchorPositionStyle = {
|
|
46
|
+
position: 'fixed';
|
|
47
|
+
top: number;
|
|
48
|
+
left: number;
|
|
49
|
+
};
|
|
50
|
+
type AnchorPositionResult = AnchorPositionStyle & {
|
|
51
|
+
/** Фактически выбранная сторона после flip по доступному месту. */
|
|
52
|
+
side: AnchorSide;
|
|
53
|
+
/** Фактически выбранное выравнивание после flip по доступному месту. */
|
|
54
|
+
align: AnchorAlign;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Свободное место по сторонам trigger (viewport), с учётом gap и отступа от края.
|
|
58
|
+
*/
|
|
59
|
+
declare function getAnchorSideSpace(trigger: DOMRect, gap?: number, edgePadding?: number): Record<AnchorSide, number>;
|
|
60
|
+
/**
|
|
61
|
+
* Выбирает сторону относительно trigger: `preferred` — приоритет;
|
|
62
|
+
* если места не хватает — противоположная; если ни одна не вмещает —
|
|
63
|
+
* сторона с большим запасом (как в Dropdown).
|
|
64
|
+
*
|
|
65
|
+
* @param preferred - Желаемая сторона.
|
|
66
|
+
* @param trigger - Bounding box якоря (viewport).
|
|
67
|
+
* @param contentWidth - Ширина плавающего слоя.
|
|
68
|
+
* @param contentHeight - Высота плавающего слоя.
|
|
69
|
+
* @param gap - Зазор между trigger и слоем.
|
|
70
|
+
* @param edgePadding - Минимальный отступ от края viewport при оценке места.
|
|
71
|
+
*/
|
|
72
|
+
declare function resolvePreferredSide(preferred: AnchorSide, trigger: DOMRect, contentWidth: number, contentHeight: number, gap?: number, edgePadding?: number): AnchorSide;
|
|
73
|
+
/**
|
|
74
|
+
* Фиксированная позиция плавающего слоя относительно trigger (Popover / Overlay).
|
|
75
|
+
* `side` — приоритет; при нехватке места flip на противоположную сторону.
|
|
76
|
+
* `align` — приоритет; при нехватке места flip `start` ↔ `end`.
|
|
77
|
+
* Затем clamp к краям viewport с отступом 8px.
|
|
78
|
+
*
|
|
79
|
+
* @param trigger - Якорь.
|
|
80
|
+
* @param content - Измеряемый контент (нужны актуальные размеры).
|
|
81
|
+
* @param side - Предпочтительная сторона относительно trigger.
|
|
82
|
+
* @param align - Выравнивание вдоль стороны.
|
|
83
|
+
* @param gap - Зазор между trigger и content в px (`8` по умолчанию).
|
|
84
|
+
*/
|
|
85
|
+
declare function computeAnchorPosition(trigger: HTMLElement, content: HTMLElement, side: AnchorSide, align: AnchorAlign, gap?: number): AnchorPositionResult;
|
|
86
|
+
/**
|
|
87
|
+
* Прижимает прямоугольник к viewport с отступом от краёв.
|
|
88
|
+
*/
|
|
89
|
+
declare function clampToViewport(left: number, top: number, width: number, height: number, padding?: number): {
|
|
90
|
+
left: number;
|
|
91
|
+
top: number;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Элемент списка выбора (Listbox, Select, SuggestField).
|
|
96
|
+
* Значение `value` — стабильный идентификатор; подпись может быть JSX.
|
|
97
|
+
*/
|
|
98
|
+
interface ListboxOption {
|
|
99
|
+
value: string;
|
|
100
|
+
/** Подпись опции: строка или произвольный JSX */
|
|
101
|
+
label: ReactNode;
|
|
102
|
+
/** Текст для фильтрации / aria / отображения в инпуте, если `label` — JSX */
|
|
103
|
+
textValue?: string;
|
|
104
|
+
disabled?: boolean;
|
|
105
|
+
/** Id группы из {@link ListboxGroup}; при совпадении опция попадает в эту группу */
|
|
106
|
+
groupId?: string;
|
|
107
|
+
/** Value родителя для каскада; без `parent` — корень */
|
|
108
|
+
parent?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Доп. DOM-атрибуты видимой кнопки опции (`data-*`, `aria-*`, `title`, …).
|
|
111
|
+
* Служебные attrs Listbox (`id`, `role`, `aria-selected`, …) имеют приоритет.
|
|
112
|
+
*/
|
|
113
|
+
buttonProps?: Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'type' | 'role' | 'id' | 'disabled' | 'tabIndex' | 'aria-selected' | 'aria-disabled' | 'onClick' | 'onMouseDown' | 'onMouseEnter' | 'onFocus'>;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Метаданные группы опций (заголовок). Сами опции — в плоском `options` через `groupId`.
|
|
117
|
+
*/
|
|
118
|
+
interface ListboxGroup {
|
|
119
|
+
id: string;
|
|
120
|
+
label: ReactNode;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Разрешённая группа с опциями для рендера.
|
|
124
|
+
*/
|
|
125
|
+
interface ResolvedListboxGroup {
|
|
126
|
+
id: string;
|
|
127
|
+
label: ReactNode | null;
|
|
128
|
+
options: ListboxOption[];
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Собирает опции по группам: порядок групп из `groups`, внутри — порядок в `options`.
|
|
132
|
+
* Опции без валидного `groupId` — в хвосте без заголовка (`label: null`).
|
|
133
|
+
*
|
|
134
|
+
* @param options - Плоский список опций.
|
|
135
|
+
* @param groups - Метаданные групп (id + label).
|
|
136
|
+
*/
|
|
137
|
+
declare function resolveListboxGroups(options: ListboxOption[], groups: ListboxGroup[] | undefined): ResolvedListboxGroup[];
|
|
138
|
+
/**
|
|
139
|
+
* Плоский порядок опций с учётом групп (для highlight-индексов).
|
|
140
|
+
*/
|
|
141
|
+
declare function flattenResolvedListboxGroups(resolved: ResolvedListboxGroup[]): ListboxOption[];
|
|
142
|
+
/**
|
|
143
|
+
* Путь root→leaf по value листа (или промежуточного узла).
|
|
144
|
+
* Если value не найден — пустой массив.
|
|
145
|
+
*/
|
|
146
|
+
declare function getListboxPath(options: ListboxOption[], leafValue: string | undefined): ListboxOption[];
|
|
147
|
+
/**
|
|
148
|
+
* Пользовательская функция фильтрации опций по строке запроса.
|
|
149
|
+
*
|
|
150
|
+
* @template T - Тип опции, расширяющий {@link ListboxOption}.
|
|
151
|
+
*/
|
|
152
|
+
type ListboxFilterFn<T extends ListboxOption = ListboxOption> = (option: T, query: string) => boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Возвращает текстовое представление опции для поиска, aria и поля ввода.
|
|
155
|
+
* Приоритет: `textValue` → строковый/числовой `label` → `value`.
|
|
156
|
+
*
|
|
157
|
+
* @param option - Опция списка.
|
|
158
|
+
* @returns Нормализованная строка для сравнения и отображения.
|
|
159
|
+
*/
|
|
160
|
+
declare function getListboxOptionText(option: ListboxOption): string;
|
|
161
|
+
/**
|
|
162
|
+
* Фильтр по умолчанию: подстрока без учёта регистра в textValue/label и value.
|
|
163
|
+
* Пустой или состоящий из пробелов query — все опции проходят фильтр.
|
|
164
|
+
*/
|
|
165
|
+
declare const defaultListboxFilterFn: ListboxFilterFn;
|
|
166
|
+
interface FilterListboxOptionsParams<T extends ListboxOption> {
|
|
167
|
+
options: T[];
|
|
168
|
+
query: string;
|
|
169
|
+
/** Если false — не фильтровать (показать все). По умолчанию true. */
|
|
170
|
+
enabled?: boolean;
|
|
171
|
+
filterFn?: ListboxFilterFn<T>;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Фильтрует опции по строке запроса с возможностью отключить фильтрацию.
|
|
175
|
+
*
|
|
176
|
+
* @param params - Опции, query, флаг enabled и кастомная filterFn.
|
|
177
|
+
* @returns Отфильтрованный массив; при `enabled: false` или пустом query — исходный список.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* filterListboxOptions({ options, query: 'моск' });
|
|
181
|
+
*/
|
|
182
|
+
declare function filterListboxOptions<T extends ListboxOption>({ options, query, enabled, filterFn, }: FilterListboxOptionsParams<T>): T[];
|
|
183
|
+
/**
|
|
184
|
+
* Ищет опцию по значению `value`.
|
|
185
|
+
*
|
|
186
|
+
* @param options - Список опций.
|
|
187
|
+
* @param value - Искомое значение; `undefined` или пустая строка → `undefined`.
|
|
188
|
+
* @returns Найденная опция или `undefined`.
|
|
189
|
+
*/
|
|
190
|
+
declare function findListboxOption<T extends ListboxOption>(options: T[], value: string | undefined): T | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Текст для поля ввода / триггера: подпись совпавшей опции или сырое значение.
|
|
193
|
+
*
|
|
194
|
+
* @param options - Список опций.
|
|
195
|
+
* @param value - Текущее выбранное значение.
|
|
196
|
+
* @returns Пустая строка, если value не задан; иначе textValue/label опции или само value.
|
|
197
|
+
*/
|
|
198
|
+
declare function getListboxDisplayValue<T extends ListboxOption>(options: T[], value: string | undefined): string;
|
|
199
|
+
/**
|
|
200
|
+
* Находит опцию при точном совпадении query с label/textValue или value (без учёта регистра).
|
|
201
|
+
* Используется для автоподстановки при Enter / blur.
|
|
202
|
+
*
|
|
203
|
+
* @param options - Список опций.
|
|
204
|
+
* @param query - Строка ввода пользователя.
|
|
205
|
+
* @returns Совпавшая опция или `undefined`, если query пустой.
|
|
206
|
+
*/
|
|
207
|
+
declare function matchListboxOption<T extends ListboxOption>(options: T[], query: string): T | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Стабильный DOM-id опции для связи listbox ↔ option (aria-activedescendant).
|
|
210
|
+
*
|
|
211
|
+
* @param listboxId - Базовый id контейнера listbox.
|
|
212
|
+
* @param index - Индекс опции в текущем плоском списке.
|
|
213
|
+
* @returns Строка вида `{listboxId}-option-{index}`.
|
|
214
|
+
*/
|
|
215
|
+
declare function getListboxOptionDomId(listboxId: string, index: number): string;
|
|
216
|
+
/**
|
|
217
|
+
* Смещает индекс подсветки (стрелки вверх/вниз) с пропуском disabled-опций.
|
|
218
|
+
*
|
|
219
|
+
* @param currentIndex - Текущий индекс; вне диапазона трактуется как «до начала» или «после конца».
|
|
220
|
+
* @param length - Число опций в списке.
|
|
221
|
+
* @param direction - `1` — вниз, `-1` — вверх.
|
|
222
|
+
* @param options - Опциональный предикат disabled по индексу.
|
|
223
|
+
* @returns Новый индекс или `-1`, если все опции disabled или список пуст.
|
|
224
|
+
*/
|
|
225
|
+
declare function moveListboxHighlight(currentIndex: number, length: number, direction: 1 | -1, options?: {
|
|
226
|
+
isDisabled?: (index: number) => boolean;
|
|
227
|
+
}): number;
|
|
228
|
+
/**
|
|
229
|
+
* Ищет первый или последний enabled-индекс в списке (Home / End).
|
|
230
|
+
*
|
|
231
|
+
* @param length - Число опций.
|
|
232
|
+
* @param from - `'start'` — с начала, `'end'` — с конца.
|
|
233
|
+
* @param isDisabled - Опциональный предикат disabled по индексу.
|
|
234
|
+
* @returns Индекс или `-1`, если список пуст или все disabled.
|
|
235
|
+
*/
|
|
236
|
+
declare function findEnabledListboxIndex(length: number, from: 'start' | 'end', isDisabled?: (index: number) => boolean): number;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Подгоняет высоту элемента под `scrollHeight` (textarea, contentEditable).
|
|
240
|
+
* Сбрасывает height в `auto`, затем выставляет px-значение с учётом min/max.
|
|
241
|
+
* При превышении maxHeight включает вертикальный скролл.
|
|
242
|
+
*
|
|
243
|
+
* @param element - DOM-элемент с изменяемым контентом.
|
|
244
|
+
* @param options - Минимальная высота в px и опциональный maxHeight (число или CSS-строка).
|
|
245
|
+
*/
|
|
246
|
+
declare function adjustElementHeight(element: HTMLElement, options?: {
|
|
247
|
+
minHeightPx?: number;
|
|
248
|
+
maxHeight?: number | string;
|
|
249
|
+
}): void;
|
|
250
|
+
/**
|
|
251
|
+
* Вычисляет минимальную высоту textarea в px для заданного числа строк.
|
|
252
|
+
* Учитывает line-height, padding и border из computed styles.
|
|
253
|
+
*
|
|
254
|
+
* @param element - Textarea (должен быть в DOM для корректных computed styles).
|
|
255
|
+
* @param minRows - Минимальное число видимых строк.
|
|
256
|
+
* @returns Высота в пикселях.
|
|
257
|
+
*/
|
|
258
|
+
declare function getTextareaMinHeightPx(element: HTMLTextAreaElement, minRows: number): number;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Вычисляет производные флаги состояния поля формы из `disabled` и `readOnly`.
|
|
262
|
+
* `readOnly` игнорируется, если элемент disabled; интерактивность — только когда оба false.
|
|
263
|
+
*
|
|
264
|
+
* @param options - Пропсы disabled/readOnly контрола.
|
|
265
|
+
* @returns Объект с `disabled`, `isReadOnly` и `isInteractive`.
|
|
266
|
+
*/
|
|
267
|
+
declare function getFormControlState(options: {
|
|
268
|
+
disabled?: boolean;
|
|
269
|
+
readOnly?: boolean;
|
|
270
|
+
}): {
|
|
271
|
+
disabled: boolean;
|
|
272
|
+
isReadOnly: boolean;
|
|
273
|
+
isInteractive: boolean;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Универсальные клавиатурные шорткаты вида `mod+z`, `ctrl+shift+k`, `escape`.
|
|
278
|
+
* `mod` = Meta на Apple, Control на остальных платформах.
|
|
279
|
+
*/
|
|
280
|
+
/**
|
|
281
|
+
* Разобранное сочетание клавиш после {@link parseKeyboardShortcut}.
|
|
282
|
+
*/
|
|
283
|
+
type KeyboardShortcutParts = {
|
|
284
|
+
key: string;
|
|
285
|
+
mod: boolean;
|
|
286
|
+
ctrl: boolean;
|
|
287
|
+
meta: boolean;
|
|
288
|
+
alt: boolean;
|
|
289
|
+
shift: boolean;
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Разбирает строку шортката в структуру модификаторов и клавиши.
|
|
293
|
+
*
|
|
294
|
+
* @param shortcut - Строка вида `mod+shift+z`, `ctrl+alt+delete`, `escape`.
|
|
295
|
+
* @returns Разобранные части или `null`, если строка пустая или некорректна
|
|
296
|
+
* (нет клавиши, только модификаторы, неизвестный токен).
|
|
297
|
+
*
|
|
298
|
+
* @example
|
|
299
|
+
* parseKeyboardShortcut('mod+z'); // { mod: true, key: 'z', ... }
|
|
300
|
+
*/
|
|
301
|
+
declare function parseKeyboardShortcut(shortcut: string): KeyboardShortcutParts | null;
|
|
302
|
+
/**
|
|
303
|
+
* Проверяет, соответствует ли событие клавиатуры заданному шорткату.
|
|
304
|
+
* Учитывает платформенный `mod` и неявный Shift для символов вроде `?`.
|
|
305
|
+
*
|
|
306
|
+
* @param event - Событие keydown/keyup.
|
|
307
|
+
* @param shortcut - Строка шортката в формате {@link parseKeyboardShortcut}.
|
|
308
|
+
* @returns `true`, если клавиша и все модификаторы совпали.
|
|
309
|
+
*/
|
|
310
|
+
declare function matchesKeyboardShortcut(event: KeyboardEvent, shortcut: string): boolean;
|
|
311
|
+
/**
|
|
312
|
+
* Форматирует шорткат для отображения пользователю (⌘Z на macOS, Ctrl+Z на Windows/Linux).
|
|
313
|
+
*
|
|
314
|
+
* @param shortcut - Строка шортката.
|
|
315
|
+
* @returns Человекочитаемая подпись; при некорректной строке возвращает исходный shortcut.
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* formatKeyboardShortcut('mod+s'); // "⌘S" или "Ctrl+S"
|
|
319
|
+
*/
|
|
320
|
+
declare function formatKeyboardShortcut(shortcut: string): string;
|
|
321
|
+
/**
|
|
322
|
+
* Форматирует шорткат для атрибута `aria-keyshortcuts` (Control+Z / Meta+Z, не `mod+z`).
|
|
323
|
+
*
|
|
324
|
+
* @param shortcut - Строка шортката.
|
|
325
|
+
* @returns Строка в формате WAI-ARIA или `undefined`, если shortcut некорректен.
|
|
326
|
+
* @see https://www.w3.org/TR/wai-aria-1.2/#aria-keyshortcuts
|
|
327
|
+
*
|
|
328
|
+
* @example
|
|
329
|
+
* formatAriaKeyShortcuts('mod+z'); // "Meta+Z" или "Control+Z"
|
|
330
|
+
*/
|
|
331
|
+
declare function formatAriaKeyShortcuts(shortcut: string): string | undefined;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Допустимый ref для {@link composeRefs}: object ref, callback ref или `undefined`.
|
|
335
|
+
*
|
|
336
|
+
* @template T - Тип DOM-элемента или компонента.
|
|
337
|
+
*/
|
|
338
|
+
type PossibleRef<T> = React__default.Ref<T> | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Объединяет несколько ref в один callback ref.
|
|
341
|
+
* При монтировании/размонтировании вызывает все переданные ref с одним и тем же node.
|
|
342
|
+
*
|
|
343
|
+
* @template T - Тип элемента.
|
|
344
|
+
* @param refs - Список object/callback ref; `undefined` пропускаются.
|
|
345
|
+
* @returns Callback ref для передачи в `ref={...}`.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* const mergedRef = composeRefs(forwardedRef, localRef);
|
|
349
|
+
* <input ref={mergedRef} />
|
|
350
|
+
*/
|
|
351
|
+
declare function composeRefs<T>(...refs: Array<PossibleRef<T>>): React__default.RefCallback<T>;
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* Объединяет обработчик потребителя и внутренний: сначала внешний,
|
|
355
|
+
* внутренний — только если `event.defaultPrevented` ещё false.
|
|
356
|
+
*
|
|
357
|
+
* @template E - DOM/React-событие с флагом `defaultPrevented`.
|
|
358
|
+
* @param consumer - Обработчик с пропсов компонента.
|
|
359
|
+
* @param internal - Внутренняя логика (toggle, close, roving focus).
|
|
360
|
+
* @returns Составной handler для JSX.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* onClick={composeEventHandlers(onClick, () => toggle(value))}
|
|
364
|
+
*/
|
|
365
|
+
declare function composeEventHandlers<E extends {
|
|
366
|
+
defaultPrevented: boolean;
|
|
367
|
+
}>(consumer?: (event: E) => void, internal?: (event: E) => void): (event: E) => void;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Склеивает CSS-классы, отбрасывая falsy-значения.
|
|
371
|
+
* Дубликаты токенов удаляются (последнее вхождение сохраняется),
|
|
372
|
+
* чтобы внешний `className` мог перекрывать внутренние utility-классы при необходимости.
|
|
373
|
+
*
|
|
374
|
+
* @param parts - Фрагменты className (строки или условные значения).
|
|
375
|
+
* @returns Строка классов через пробел.
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* cn('btn', isActive && 'btn--active', className)
|
|
379
|
+
*/
|
|
380
|
+
declare function cn(...parts: Array<string | false | undefined | null>): string;
|
|
381
|
+
|
|
382
|
+
/** Variant трека ButtonGroup (`link`) или SegmentedControl (`plain`). */
|
|
383
|
+
type ControlTrackVariant = 'primary' | 'tinted' | 'secondary' | 'ghost' | 'plain' | 'link';
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Хешированные классы заливки трека (border / fill / shadow).
|
|
387
|
+
* Readonly — dashed chrome как у SegmentedControl / FieldBase.
|
|
388
|
+
* @param variant - заливка трека (`plain` у SegmentedControl, `link` у ButtonGroup).
|
|
389
|
+
* @param options.readOnly - dashed readonly-поверхность.
|
|
390
|
+
*/
|
|
391
|
+
declare function controlTrackClassName(variant: ControlTrackVariant, options?: {
|
|
392
|
+
readOnly?: boolean;
|
|
393
|
+
}): string;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Сливает внутренние и внешние inline-стили.
|
|
397
|
+
* Внешний `style` перекрывает одноимённые ключи внутренних (потребитель выигрывает).
|
|
398
|
+
*
|
|
399
|
+
* @param internal - Стили компонента (токены, layout).
|
|
400
|
+
* @param external - `style` из пропсов потребителя.
|
|
401
|
+
*/
|
|
402
|
+
declare function mergeStyles(internal?: CSSProperties | null, external?: CSSProperties | null): CSSProperties | undefined;
|
|
403
|
+
|
|
404
|
+
type AnyProps = Record<string, unknown>;
|
|
405
|
+
/**
|
|
406
|
+
* Мержит slot-пропсы в единственный React-элемент (asChild).
|
|
407
|
+
* className склеивается через {@link cn}, style — через {@link mergeStyles}
|
|
408
|
+
* (slot перекрывает decorative style child).
|
|
409
|
+
*/
|
|
410
|
+
declare function mergeSlotProps<P extends AnyProps>(slotProps: P, child: ReactElement, ref?: PossibleRef<HTMLElement>): AnyProps;
|
|
411
|
+
type SlotProps = React__default.HTMLAttributes<HTMLElement> & {
|
|
412
|
+
children?: React__default.ReactNode;
|
|
413
|
+
/** Доп. attrs для child (например `type` у button→Slot). */
|
|
414
|
+
[key: string]: unknown;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* Slot: рендерит children as-is или (при одном элементе) пробрасывает ref/props.
|
|
418
|
+
* Используется Button/Link `asChild` без лишней DOM-обёртки.
|
|
419
|
+
*
|
|
420
|
+
* @component
|
|
421
|
+
* @example
|
|
422
|
+
* <Slot className={styles.root} onClick={onClick}>
|
|
423
|
+
* <a href="/x">Перейти</a>
|
|
424
|
+
* </Slot>
|
|
425
|
+
*/
|
|
426
|
+
declare const Slot: React__default.ForwardRefExoticComponent<Omit<SlotProps, "ref"> & React__default.RefAttributes<HTMLElement>>;
|
|
427
|
+
|
|
428
|
+
/** Шкала отступов layout-компонентов → CSS variables 8pt grid. */
|
|
429
|
+
type SpacingToken = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
430
|
+
/** Токен, число (px) или произвольная CSS-строка. */
|
|
431
|
+
type SpacingValue = SpacingToken | number | string;
|
|
432
|
+
/** Промежуток в группах чипов / кнопок. */
|
|
433
|
+
type GroupGap = 'sm' | 'md' | 'lg';
|
|
434
|
+
|
|
435
|
+
declare const SPACING_TOKEN_CSS: Record<SpacingToken, string>;
|
|
436
|
+
/**
|
|
437
|
+
* Разрешает spacing-токен, число (px) или CSS-строку в значение для inline-style.
|
|
438
|
+
*/
|
|
439
|
+
declare function resolveSpacingCss(value: SpacingValue): string;
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Children как render-prop: получает slot-пропсы и ref контентного узла.
|
|
443
|
+
*/
|
|
444
|
+
type RenderChildrenFn<P> = (props: P, contentRef: React__default.RefCallback<HTMLElement>) => React__default.ReactNode;
|
|
445
|
+
/**
|
|
446
|
+
* Режим render-prop: `children` — функция `(props, contentRef) => ReactNode`.
|
|
447
|
+
* `asChild` можно опустить или передать `false`.
|
|
448
|
+
*/
|
|
449
|
+
interface EnrichedThroughFn<P> {
|
|
450
|
+
asChild?: false;
|
|
451
|
+
children: RenderChildrenFn<P>;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Режим cloneElement: единственный React-элемент получает slot-пропсы.
|
|
455
|
+
*/
|
|
456
|
+
interface EnrichedThroughChild {
|
|
457
|
+
asChild: true;
|
|
458
|
+
children: React__default.ReactElement;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* Дискриминированный union `asChild` + `children` для API вроде Overlay / Tooltip.
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* type Props = WithEnrichedChildren<{ content: React.ReactNode }, SlotProps>;
|
|
465
|
+
*/
|
|
466
|
+
type WithEnrichedChildren<T, P> = T & (EnrichedThroughFn<P> | EnrichedThroughChild);
|
|
467
|
+
type RenderChildrenOptions<P> = {
|
|
468
|
+
/** `true` — `cloneElement` единственного child; `false` — children как render-prop. */
|
|
469
|
+
asChild: boolean;
|
|
470
|
+
children: React__default.ReactNode | RenderChildrenFn<P>;
|
|
471
|
+
/** Пропсы, которые Overlay навешивает на контентный узел. */
|
|
472
|
+
props: P;
|
|
473
|
+
contentRef: PossibleRef<HTMLElement | null>;
|
|
474
|
+
};
|
|
475
|
+
/**
|
|
476
|
+
* Отрисовка children без лишней обёртки:
|
|
477
|
+
* - `asChild` — мержит `props` + `contentRef` в единственный React-элемент через `cloneElement`;
|
|
478
|
+
* - иначе — вызывает children как функцию `(props, contentRef) => ReactNode`.
|
|
479
|
+
*/
|
|
480
|
+
declare function renderChildren<P extends object>({ asChild, children, props, contentRef, }: RenderChildrenOptions<P>): React__default.ReactNode;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Именованный stacking-tier для портальных overlay (Sheet и др.).
|
|
484
|
+
* Соответствует CSS-переменным ThemeProvider `--altum-g-z-*`.
|
|
485
|
+
*
|
|
486
|
+
* - `overlay` — дефолт Sheet (между chrome и Modal)
|
|
487
|
+
* - `notification` — панель уровня тостов (над Modal / lightbox)
|
|
488
|
+
*/
|
|
489
|
+
type OverlayZIndexTier = 'overlay' | 'modal' | 'dropdown' | 'lightbox' | 'notification';
|
|
490
|
+
/**
|
|
491
|
+
* Резолв z-index для overlay-корня.
|
|
492
|
+
* `zIndex` перекрывает `zIndexTier`; если оба не заданы — `undefined` (CSS-дефолт компонента).
|
|
493
|
+
*/
|
|
494
|
+
declare function resolveOverlayZIndex(zIndexTier?: OverlayZIndexTier, zIndex?: number | string): number | string | undefined;
|
|
495
|
+
/** CSS-дефолт Sheet / overlay-панели. */
|
|
496
|
+
declare const OVERLAY_Z_INDEX_DEFAULT = "var(--altum-g-z-overlay)";
|
|
497
|
+
/**
|
|
498
|
+
* Итоговый z-index корня с учётом родительского overlay-стека
|
|
499
|
+
* (вложенный Sheet поверх elevated-панели).
|
|
500
|
+
*/
|
|
501
|
+
declare function resolveStackedOverlayZIndex(zIndexTier?: OverlayZIndexTier, zIndex?: number | string, parentStack?: string | number): string | number | undefined;
|
|
502
|
+
|
|
503
|
+
declare function useOverlayStackZIndex(): string | number | undefined;
|
|
504
|
+
declare const OverlayStackProvider: React.Provider<string | number | undefined>;
|
|
505
|
+
/**
|
|
506
|
+
* z-index портала над текущим overlay-стеком, не ниже `--altum-g-z-dropdown`.
|
|
507
|
+
* `max(var(--altum-g-z-dropdown), calc(parent + 1))` — меню внутри elevated Sheet
|
|
508
|
+
* не уходит под панель.
|
|
509
|
+
*/
|
|
510
|
+
declare function elevateAboveOverlayStack(parentZ: string | number | undefined, floorVar?: string): string | undefined;
|
|
511
|
+
|
|
512
|
+
/** Плотность интерфейса. */
|
|
513
|
+
type Density = 'default' | 'compact';
|
|
514
|
+
|
|
515
|
+
/** Вариант заливки/обводки для групповых контролов (SegmentedControl). */
|
|
516
|
+
type SurfaceVariant = 'primary' | 'tinted' | 'secondary' | 'ghost' | 'plain';
|
|
517
|
+
|
|
518
|
+
export { OVERLAY_Z_INDEX_DEFAULT, OverlayStackProvider, SPACING_TOKEN_CSS, Slot, adjustElementHeight, clampToViewport, cn, composeEventHandlers, composeRefs, computeAnchorPosition, controlTrackClassName, defaultListboxFilterFn, elevateAboveOverlayStack, filterListboxOptions, findEnabledListboxIndex, findListboxOption, flattenResolvedListboxGroups, formatAriaKeyShortcuts, formatKeyboardShortcut, getAnchorSideSpace, getFormControlState, getListboxDisplayValue, getListboxOptionDomId, getListboxOptionText, getListboxPath, getTextareaMinHeightPx, getTranslateXFromTransform, matchListboxOption, matchesKeyboardShortcut, mergeSlotProps, mergeStyles, moveArrayItem, moveListboxHighlight, parseKeyboardShortcut, renderChildren, resolveListboxGroups, resolveOverlayZIndex, resolvePreferredSide, resolveSpacingCss, resolveStackedOverlayZIndex, toCssSize, useOverlayStackZIndex };
|
|
519
|
+
export type { AnchorAlign, AnchorPositionResult, AnchorPositionStyle, AnchorSide, ControlTrackVariant, Density, EnrichedThroughChild, EnrichedThroughFn, GroupGap, KeyboardShortcutParts, ListboxFilterFn, ListboxGroup, ListboxOption, OverlayZIndexTier, PossibleRef, RenderChildrenFn, RenderChildrenOptions, ResolvedListboxGroup, SlotProps, SpacingToken, SpacingValue, SurfaceVariant, WithEnrichedChildren };
|