@astryxdesign/core 0.7.17-canary.gffd1fc0 → 0.7.17
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 +334 -0
- package/README.md +26 -9
- package/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +6 -8
- package/dist/AppShell/AppShell.d.ts +7 -3
- package/dist/AppShell/AppShell.d.ts.map +1 -1
- package/dist/AppShell/AppShell.js +74 -36
- package/dist/AppShell/unreadWidthPoint.d.ts +29 -0
- package/dist/AppShell/unreadWidthPoint.d.ts.map +1 -0
- package/dist/AppShell/unreadWidthPoint.js +134 -0
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +5 -1
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Badge/Badge.js +2 -2
- package/dist/Banner/Banner.d.ts +6 -4
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +32 -29
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +3 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +11 -7
- package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetSwitcher.js +57 -2
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts +5 -0
- package/dist/BottomSheet/BottomSheetSwitcherContext.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +6 -14
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +12 -1
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +45 -7
- package/dist/Calendar/Calendar.js +8 -2
- package/dist/Calendar/styles.d.ts +10 -6
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +7 -3
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +23 -4
- package/dist/Chat/ChatComposer.d.ts +1 -1
- package/dist/Chat/ChatComposer.d.ts.map +1 -1
- package/dist/Chat/ChatComposer.js +4 -4
- package/dist/Chat/ChatComposerDrawer.d.ts.map +1 -1
- package/dist/Chat/ChatComposerDrawer.js +8 -4
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +7 -0
- package/dist/Chat/ChatPastedTextToken.d.ts.map +1 -1
- package/dist/Chat/ChatPastedTextToken.js +3 -9
- package/dist/Chat/ChatSendButton.d.ts.map +1 -1
- package/dist/Chat/ChatSendButton.js +3 -0
- package/dist/Chat/ChatSystemMessage.d.ts.map +1 -1
- package/dist/Chat/ChatSystemMessage.js +1 -0
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +8 -0
- package/dist/Chat/pastedTextLabel.d.ts +4 -0
- package/dist/Chat/pastedTextLabel.d.ts.map +1 -0
- package/dist/Chat/pastedTextLabel.js +21 -0
- package/dist/Chat/useChatPasteAsToken.d.ts.map +1 -1
- package/dist/Chat/useChatPasteAsToken.js +8 -8
- package/dist/Chat/useTriggerMenu.d.ts.map +1 -1
- package/dist/Chat/useTriggerMenu.js +3 -3
- package/dist/CheckboxInput/CheckboxInput.d.ts +2 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +69 -18
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +8 -1
- package/dist/Code/Code.d.ts.map +1 -1
- package/dist/Code/Code.js +5 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +39 -12
- package/dist/CodeBlock/highlightRanges.d.ts.map +1 -1
- package/dist/CodeBlock/highlightRanges.js +6 -5
- package/dist/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/Collapsible/Collapsible.js +2 -0
- package/dist/CommandPalette/CommandPaletteItem.d.ts.map +1 -1
- package/dist/CommandPalette/CommandPaletteItem.js +1 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +8 -1
- package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/ContextMenu/ContextMenu.js +32 -5
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +1 -0
- package/dist/DateInput/PickerWheel.d.ts.map +1 -1
- package/dist/DateInput/PickerWheel.js +3 -2
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +2 -1
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +8 -8
- package/dist/DateInput/usePointerDragScroll.d.ts.map +1 -1
- package/dist/DateInput/usePointerDragScroll.js +5 -2
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +7 -0
- package/dist/DateTimeInput/TouchDateTimeField.d.ts.map +1 -1
- package/dist/DateTimeInput/TouchDateTimeField.js +2 -1
- package/dist/DateTimeInput/nativePickerSegmentStyles.d.ts +2 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +104 -18
- package/dist/Dialog/DialogContext.d.ts +5 -4
- package/dist/Dialog/DialogContext.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/Dialog/DialogHeader.js +38 -12
- package/dist/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/Drawer/DrawerHeader.js +23 -8
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +23 -17
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +3 -2
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +3 -3
- package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuSubMenu.js +19 -2
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts +6 -3
- package/dist/DropdownMenu/lazyMenuBottomSheet.d.ts.map +1 -1
- package/dist/DropdownMenu/lazyMenuBottomSheet.js +31 -7
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts +24 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.d.ts.map +1 -0
- package/dist/DropdownMenu/menuRowCorners.stylex.js +29 -0
- package/dist/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/EmptyState/EmptyState.js +2 -2
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +2 -2
- package/dist/Field/inputDisabledFocus.d.ts +4 -0
- package/dist/Field/inputDisabledFocus.d.ts.map +1 -1
- package/dist/Field/inputDisabledFocus.js +5 -0
- package/dist/Field/inputStyles.stylex.d.ts +31 -4
- package/dist/Field/inputStyles.stylex.d.ts.map +1 -1
- package/dist/Field/inputStyles.stylex.js +30 -5
- package/dist/Grid/Grid.d.ts +2 -1
- package/dist/Grid/Grid.d.ts.map +1 -1
- package/dist/Grid/Grid.js +5 -2
- package/dist/Heading/Heading.d.ts +1 -1
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +15 -1
- package/dist/Icon/Icon.d.ts +1 -1
- package/dist/Icon/Icon.d.ts.map +1 -1
- package/dist/Icon/Icon.js +32 -2
- package/dist/Indicator/CheckboxIndicator.d.ts.map +1 -1
- package/dist/Indicator/CheckboxIndicator.js +12 -6
- package/dist/Indicator/RadioIndicator.d.ts.map +1 -1
- package/dist/Indicator/RadioIndicator.js +18 -4
- package/dist/Indicator/indicatorRegistry.d.ts +3 -26
- package/dist/Indicator/indicatorRegistry.d.ts.map +1 -1
- package/dist/Indicator/indicatorRegistry.js +2 -11
- package/dist/Indicator/themeIndicators.d.ts +15 -0
- package/dist/Indicator/themeIndicators.d.ts.map +1 -0
- package/dist/Indicator/themeIndicators.js +21 -0
- package/dist/Indicator/types.d.ts +14 -0
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/Indicator/useThemeIndicator.d.ts +3 -0
- package/dist/Indicator/useThemeIndicator.d.ts.map +1 -0
- package/dist/Indicator/useThemeIndicator.js +19 -0
- package/dist/Item/Item.d.ts +6 -2
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +30 -2
- package/dist/Kbd/Kbd.d.ts.map +1 -1
- package/dist/Kbd/Kbd.js +9 -2
- package/dist/Layer/layerExitCopy.d.ts.map +1 -1
- package/dist/Layer/layerExitCopy.js +1 -1
- package/dist/Layer/layerSlideRules.d.ts +23 -15
- package/dist/Layer/layerSlideRules.d.ts.map +1 -1
- package/dist/Layer/layerSlideRules.js +54 -54
- package/dist/Layer/useLayer.d.ts +41 -29
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +199 -126
- package/dist/Layer/useLayerKeyboardClearance.d.ts +5 -5
- package/dist/Layer/useLayerKeyboardClearance.d.ts.map +1 -1
- package/dist/Layer/useLayerKeyboardClearance.js +5 -5
- package/dist/Layout/LayoutContainerContext.d.ts +4 -0
- package/dist/Layout/LayoutContainerContext.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerContext.js +20 -0
- package/dist/Layout/LayoutContainerScope.d.ts +15 -0
- package/dist/Layout/LayoutContainerScope.d.ts.map +1 -0
- package/dist/Layout/LayoutContainerScope.js +23 -0
- package/dist/Layout/LayoutContent.d.ts +2 -1
- package/dist/Layout/LayoutContent.d.ts.map +1 -1
- package/dist/Layout/LayoutContent.js +7 -2
- package/dist/Layout/LayoutFooter.d.ts.map +1 -1
- package/dist/Layout/LayoutFooter.js +5 -1
- package/dist/Layout/LayoutHeader.d.ts.map +1 -1
- package/dist/Layout/LayoutHeader.js +5 -1
- package/dist/Layout/containerCorners.stylex.d.ts +15 -7
- package/dist/Layout/containerCorners.stylex.d.ts.map +1 -1
- package/dist/Layout/containerCorners.stylex.js +16 -7
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +324 -6
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +14 -6
- package/dist/List/ListContext.d.ts +38 -1
- package/dist/List/ListContext.d.ts.map +1 -1
- package/dist/List/ListContext.js +50 -2
- package/dist/List/ListItem.js +2 -2
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +85 -96
- package/dist/Markdown/plugins/HeadingLinksRenderer.d.ts.map +1 -1
- package/dist/Markdown/plugins/HeadingLinksRenderer.js +12 -5
- package/dist/Markdown/plugins/protocol.js +3 -3
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +11 -3
- package/dist/MobileNav/MobileNav.d.ts +1 -1
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +6 -3
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +33 -9
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +5 -2
- package/dist/NavMenu/NavHeadingMenuItem.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenuItem.js +1 -0
- package/dist/NavMenu/NavMenuContext.d.ts +7 -0
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +9 -0
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +8 -2
- package/dist/Outline/Outline.d.ts +7 -3
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +11 -3
- package/dist/Outline/useScrollSpy.d.ts +1 -1
- package/dist/Outline/useScrollSpy.d.ts.map +1 -1
- package/dist/Outline/useScrollSpy.js +6 -2
- package/dist/OverflowList/OverflowList.d.ts.map +1 -1
- package/dist/OverflowList/OverflowList.js +51 -25
- package/dist/Pagination/Pagination.d.ts.map +1 -1
- package/dist/Pagination/Pagination.js +33 -13
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Popover/Popover.js +5 -1
- package/dist/Popover/popoverAnchor.d.ts +11 -0
- package/dist/Popover/popoverAnchor.d.ts.map +1 -0
- package/dist/Popover/popoverAnchor.js +33 -0
- package/dist/Popover/usePopover.d.ts +20 -3
- package/dist/Popover/usePopover.d.ts.map +1 -1
- package/dist/Popover/usePopover.js +110 -10
- package/dist/PowerSearch/PowerSearch.d.ts +1 -0
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +46 -9
- package/dist/PowerSearch/PowerSearchEditPopover.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchEditPopover.js +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchFilterEditor.js +7 -1
- package/dist/PowerSearch/PowerSearchToken.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchToken.js +7 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts +2 -4
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +6 -13
- package/dist/ProgressBar/ProgressBar.d.ts +5 -4
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +26 -26
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +51 -0
- package/dist/RadioList/RadioListItem.d.ts.map +1 -1
- package/dist/RadioList/RadioListItem.js +1 -1
- package/dist/Resizable/ResizeHandle.d.ts +1 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +1 -1
- package/dist/Resizable/resizableModel.d.ts +45 -3
- package/dist/Resizable/resizableModel.d.ts.map +1 -1
- package/dist/Resizable/resizableModel.js +91 -3
- package/dist/Resizable/resizeGesture.d.ts +3 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -1
- package/dist/Resizable/resizeGesture.js +6 -0
- package/dist/Resizable/useResizable.d.ts +1 -33
- package/dist/Resizable/useResizable.d.ts.map +1 -1
- package/dist/Resizable/useResizable.js +8 -72
- package/dist/SegmentedControl/SegmentedControlItem.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlItem.js +1 -0
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts +27 -5
- package/dist/SegmentedControl/useSegmentedTouchTracking.d.ts.map +1 -1
- package/dist/SegmentedControl/useSegmentedTouchTracking.js +70 -8
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +34 -14
- package/dist/Selector/hooks.d.ts +5 -0
- package/dist/Selector/hooks.d.ts.map +1 -1
- package/dist/Selector/hooks.js +72 -16
- package/dist/Selector/useSelectorPresentation.d.ts.map +1 -1
- package/dist/Selector/useSelectorPresentation.js +9 -3
- package/dist/SideNav/SideNavHeading.d.ts.map +1 -1
- package/dist/SideNav/SideNavHeading.js +18 -5
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +47 -33
- package/dist/Stepper/Step.d.ts.map +1 -1
- package/dist/Stepper/Step.js +21 -12
- package/dist/Swipe/useSwipeAction.js +3 -3
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +64 -46
- package/dist/Switch/useSwitchTouch.d.ts +22 -1
- package/dist/Switch/useSwitchTouch.d.ts.map +1 -1
- package/dist/Switch/useSwitchTouch.js +54 -3
- package/dist/TabList/Tab.d.ts.map +1 -1
- package/dist/TabList/Tab.js +3 -3
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +37 -18
- package/dist/Table/Table.d.ts +4 -3
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +32 -14
- package/dist/Table/TableBody.d.ts.map +1 -1
- package/dist/Table/TableBody.js +5 -1
- package/dist/Table/TableCell.d.ts.map +1 -1
- package/dist/Table/TableCell.js +6 -0
- package/dist/Table/TableHeaderCell.d.ts +1 -1
- package/dist/Table/TableHeaderCell.d.ts.map +1 -1
- package/dist/Table/TableHeaderCell.js +42 -9
- package/dist/Table/TableRow.d.ts.map +1 -1
- package/dist/Table/TableRow.js +9 -1
- package/dist/Table/TableRowPlacementContext.d.ts +18 -0
- package/dist/Table/TableRowPlacementContext.d.ts.map +1 -0
- package/dist/Table/TableRowPlacementContext.js +41 -0
- package/dist/Table/TableSelectionToolbar.d.ts.map +1 -1
- package/dist/Table/TableSelectionToolbar.js +7 -0
- package/dist/Table/columnUtils.d.ts +5 -0
- package/dist/Table/columnUtils.d.ts.map +1 -1
- package/dist/Table/columnUtils.js +9 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.d.ts.map +1 -1
- package/dist/Table/plugins/rowIndex/useTableRowIndex.js +2 -2
- package/dist/Table/plugins/sortable/useTableSortable.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortable.js +8 -3
- package/dist/Table/plugins/sortable/useTableSortableState.d.ts.map +1 -1
- package/dist/Table/plugins/sortable/useTableSortableState.js +10 -6
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +5 -1
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +76 -15
- package/dist/Table/table.stylex.d.ts +31 -5
- package/dist/Table/table.stylex.d.ts.map +1 -1
- package/dist/Table/table.stylex.js +33 -5
- package/dist/Table/types.d.ts +3 -1
- package/dist/Table/types.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.d.ts +35 -1
- package/dist/Text/TruncationTooltip.d.ts.map +1 -1
- package/dist/Text/TruncationTooltip.js +115 -0
- package/dist/Text/text.stylex.d.ts +2 -2
- package/dist/Text/useTruncation.d.ts.map +1 -1
- package/dist/Text/useTruncation.js +23 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +15 -1
- package/dist/TextInput/TextInput.d.ts +9 -3
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +19 -18
- package/dist/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/dist/Thumbnail/Thumbnail.js +13 -4
- package/dist/Timer/Timer.d.ts.map +1 -1
- package/dist/Timer/Timer.js +10 -7
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +55 -4
- package/dist/Toast/Toast.d.ts +1 -6
- package/dist/Toast/Toast.d.ts.map +1 -1
- package/dist/Toast/Toast.js +77 -44
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +48 -21
- package/dist/Toast/types.d.ts +8 -0
- package/dist/Toast/types.d.ts.map +1 -1
- package/dist/Toast/useToast.d.ts.map +1 -1
- package/dist/Toast/useToast.js +14 -7
- package/dist/ToggleButton/ToggleButton.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButton.js +14 -9
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +6 -2
- package/dist/Tokenizer/Tokenizer.d.ts +2 -2
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +102 -62
- package/dist/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/Toolbar/Toolbar.js +33 -5
- package/dist/Tooltip/Tooltip.d.ts +12 -1
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +31 -1
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -1
- package/dist/TopNav/TopNav.d.ts.map +1 -1
- package/dist/TopNav/TopNav.js +24 -8
- package/dist/TopNav/TopNavContext.d.ts +13 -0
- package/dist/TopNav/TopNavContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavContext.js +27 -1
- package/dist/TopNav/TopNavHeading.d.ts.map +1 -1
- package/dist/TopNav/TopNavHeading.js +21 -9
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +25 -17
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuFeaturedCard.js +13 -2
- package/dist/TopNav/TopNavMegaMenuItem.d.ts +9 -1
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +14 -2
- package/dist/TopNav/TopNavMenu.d.ts +8 -0
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +20 -5
- package/dist/TopNav/TopNavRenderContext.d.ts +13 -0
- package/dist/TopNav/TopNavRenderContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavRenderContext.js +24 -9
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -1
- package/dist/TreeList/TreeListItem.d.ts.map +1 -1
- package/dist/TreeList/TreeListItem.js +20 -2
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +2 -1
- package/dist/Typeahead/Typeahead.d.ts.map +1 -1
- package/dist/Typeahead/Typeahead.js +24 -9
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -0
- package/dist/astryx.css +215 -56
- package/dist/gestures/GestureHost.d.ts +7 -0
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +37 -0
- package/dist/hooks/anchoredHint.d.ts.map +1 -1
- package/dist/hooks/anchoredHint.js +0 -1
- package/dist/hooks/computeOverflow.d.ts.map +1 -1
- package/dist/hooks/computeOverflow.js +7 -0
- package/dist/hooks/focusableSelector.d.ts +16 -9
- package/dist/hooks/focusableSelector.d.ts.map +1 -1
- package/dist/hooks/focusableSelector.js +53 -2
- package/dist/hooks/scrollEdgeFade.d.ts +34 -0
- package/dist/hooks/scrollEdgeFade.d.ts.map +1 -0
- package/dist/hooks/scrollEdgeFade.js +173 -0
- package/dist/hooks/statusButtonPress.d.ts +15 -0
- package/dist/hooks/statusButtonPress.d.ts.map +1 -0
- package/dist/hooks/statusButtonPress.js +19 -0
- package/dist/hooks/useAnnounce.d.ts.map +1 -1
- package/dist/hooks/useAnnounce.js +2 -1
- package/dist/hooks/useFocusTrap.d.ts +26 -16
- package/dist/hooks/useFocusTrap.d.ts.map +1 -1
- package/dist/hooks/useFocusTrap.js +75 -112
- package/dist/hooks/useGroupPressTracking.d.ts +1 -1
- package/dist/hooks/useGroupPressTracking.js +1 -1
- package/dist/hooks/useOverflow.d.ts +25 -2
- package/dist/hooks/useOverflow.d.ts.map +1 -1
- package/dist/hooks/useOverflow.js +137 -8
- package/dist/hooks/useResolvedRequired.d.ts +27 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -1
- package/dist/hooks/useResolvedRequired.js +30 -1
- package/dist/hooks/useTreeFocus.d.ts.map +1 -1
- package/dist/hooks/useTreeFocus.js +4 -2
- package/dist/hooks/useTypeahead.d.ts.map +1 -1
- package/dist/hooks/useTypeahead.js +8 -8
- package/dist/i18n/InternationalizationContext.d.ts +13 -6
- package/dist/i18n/InternationalizationContext.d.ts.map +1 -1
- package/dist/i18n/InternationalizationContext.js +11 -6
- package/dist/i18n/InternationalizationProvider.d.ts.map +1 -1
- package/dist/i18n/InternationalizationProvider.js +7 -0
- package/dist/i18n/defaultTranslator.d.ts +17 -0
- package/dist/i18n/defaultTranslator.d.ts.map +1 -0
- package/dist/i18n/defaultTranslator.js +18 -0
- package/dist/i18n/firstStrongDirection.d.ts +3 -2
- package/dist/i18n/firstStrongDirection.d.ts.map +1 -1
- package/dist/i18n/firstStrongDirection.js +50 -12
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/ChatPastedTextToken.generated.js +1 -2
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts +8 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.d.ts.map +1 -0
- package/dist/i18n/generated-english/Chat/pastedTextLabel.generated.js +12 -0
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Chat/useTriggerMenu.generated.js +1 -0
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/CodeBlock/CodeBlock.generated.js +2 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.js +2 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/MultiSelector/MultiSelector.generated.js +1 -0
- package/dist/i18n/generated-english/Slider/Slider.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Slider/Slider.generated.js +2 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextArea/TextArea.generated.js +1 -0
- package/dist/i18n/generated-english/TextInput/TextInput.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/TextInput/TextInput.generated.js +1 -0
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Timestamp/Timestamp.generated.js +2 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/Tokenizer.generated.js +1 -0
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +9 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +9 -0
- package/dist/i18n/publicContext.d.ts.map +1 -1
- package/dist/i18n/publicContext.js +4 -2
- package/dist/i18n/translatingContext.d.ts +2 -0
- package/dist/i18n/translatingContext.d.ts.map +1 -0
- package/dist/i18n/translatingContext.js +25 -0
- package/dist/i18n/useComponentTranslator.d.ts.map +1 -1
- package/dist/i18n/useComponentTranslator.js +3 -2
- package/dist/i18n/useListFormatter.d.ts.map +1 -1
- package/dist/i18n/useListFormatter.js +3 -2
- package/dist/i18n/useTranslator.d.ts.map +1 -1
- package/dist/i18n/useTranslator.js +3 -2
- package/dist/internal/touch.d.ts +2 -0
- package/dist/internal/touch.d.ts.map +1 -1
- package/dist/internal/touch.js +5 -1
- package/dist/keyboard/keyboardHeight.d.ts +34 -3
- package/dist/keyboard/keyboardHeight.d.ts.map +1 -1
- package/dist/keyboard/keyboardHeight.js +101 -24
- package/dist/keyboard/keyboardTarget.d.ts +19 -16
- package/dist/keyboard/keyboardTarget.d.ts.map +1 -1
- package/dist/keyboard/keyboardTarget.js +529 -72
- package/dist/keyboard/useMobileKeyboard.d.ts.map +1 -1
- package/dist/keyboard/useMobileKeyboard.js +1 -8
- package/dist/palette/color.d.ts +23 -0
- package/dist/palette/color.d.ts.map +1 -0
- package/dist/palette/color.js +126 -0
- package/dist/palette/generator.d.ts +69 -0
- package/dist/palette/generator.d.ts.map +1 -0
- package/dist/palette/generator.js +778 -0
- package/dist/palette/index.d.ts +12 -0
- package/dist/palette/index.d.ts.map +1 -0
- package/dist/palette/index.js +13 -0
- package/dist/palette/mapping.d.ts +319 -0
- package/dist/palette/mapping.d.ts.map +1 -0
- package/dist/palette/mapping.js +1312 -0
- package/dist/palette/themePalette.d.ts +20 -0
- package/dist/palette/themePalette.d.ts.map +1 -0
- package/dist/palette/themePalette.js +145 -0
- package/dist/palette/types.d.ts +178 -0
- package/dist/palette/types.d.ts.map +1 -0
- package/dist/palette/types.js +1 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts +5 -0
- package/dist/privateAttributes/mediaDarkPage.d.ts.map +1 -0
- package/dist/privateAttributes/mediaDarkPage.js +27 -0
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts +2 -1
- package/dist/privateAttributes/pressGroupItem.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/pressGroupItem.stylex.js +2 -1
- package/dist/privateAttributes/scheme.d.ts +10 -0
- package/dist/privateAttributes/scheme.d.ts.map +1 -0
- package/dist/privateAttributes/scheme.js +34 -0
- package/dist/privateAttributes/travelling.stylex.d.ts.map +1 -1
- package/dist/privateAttributes/travelling.stylex.js +2 -2
- package/dist/theme/MediaDarkPage.d.ts +18 -0
- package/dist/theme/MediaDarkPage.d.ts.map +1 -0
- package/dist/theme/MediaDarkPage.js +35 -0
- package/dist/theme/MediaTheme.d.ts.map +1 -1
- package/dist/theme/MediaTheme.js +9 -1
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +99 -31
- package/dist/theme/defineTheme.d.ts +31 -6
- package/dist/theme/defineTheme.d.ts.map +1 -1
- package/dist/theme/defineTheme.js +65 -29
- package/dist/theme/derivedVarRegistry.d.ts +19 -0
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +49 -4
- package/dist/theme/expandRadiusScale.d.ts +1 -2
- package/dist/theme/expandRadiusScale.d.ts.map +1 -1
- package/dist/theme/expandRadiusScale.js +1 -5
- package/dist/theme/generateThemeRules.d.ts +10 -3
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +310 -207
- package/dist/theme/index.d.ts +2 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +2 -1
- package/dist/theme/invertedSurfaceSide.d.ts +17 -0
- package/dist/theme/invertedSurfaceSide.d.ts.map +1 -0
- package/dist/theme/invertedSurfaceSide.js +47 -0
- package/dist/theme/resolveThemeValues.d.ts +5 -2
- package/dist/theme/resolveThemeValues.d.ts.map +1 -1
- package/dist/theme/resolveThemeValues.js +7 -1
- package/dist/theme/statusRoleDefaults.d.ts +43 -0
- package/dist/theme/statusRoleDefaults.d.ts.map +1 -0
- package/dist/theme/statusRoleDefaults.js +196 -0
- package/dist/theme/statusRoleDerivation.d.ts +4 -0
- package/dist/theme/statusRoleDerivation.d.ts.map +1 -1
- package/dist/theme/statusRoleDerivation.js +3 -1
- package/dist/theme/syntax/SyntaxTheme.d.ts.map +1 -1
- package/dist/theme/syntax/SyntaxTheme.js +7 -0
- package/dist/theme/themeAdaptations.d.ts +24 -1
- package/dist/theme/themeAdaptations.d.ts.map +1 -1
- package/dist/theme/themeAdaptations.js +48 -5
- package/dist/theme/tokenDefaults.d.ts +3 -0
- package/dist/theme/tokenDefaults.d.ts.map +1 -0
- package/dist/theme/tokenDefaults.js +30 -0
- package/dist/theme/tokenValues.d.ts +26 -0
- package/dist/theme/tokenValues.d.ts.map +1 -0
- package/dist/theme/tokenValues.js +180 -0
- package/dist/theme/tokens.d.ts +3 -2
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +7 -161
- package/dist/theme/tokens.stylex.d.ts +4 -4
- package/dist/theme/tokens.stylex.d.ts.map +1 -1
- package/dist/theme/tokens.stylex.js +7 -5
- package/dist/theme/useTheme.d.ts +40 -3
- package/dist/theme/useTheme.d.ts.map +1 -1
- package/dist/theme/useTheme.js +137 -32
- package/dist/utils/devWarning.d.ts +17 -0
- package/dist/utils/devWarning.d.ts.map +1 -1
- package/dist/utils/devWarning.js +20 -0
- package/dist/utils/focusOutline.stylex.d.ts.map +1 -1
- package/dist/utils/focusOutline.stylex.js +7 -4
- package/dist/utils/focusReturn.d.ts +110 -0
- package/dist/utils/focusReturn.d.ts.map +1 -1
- package/dist/utils/focusReturn.js +418 -12
- package/dist/utils/hitArea.d.ts +28 -0
- package/dist/utils/hitArea.d.ts.map +1 -1
- package/dist/utils/hitArea.js +52 -18
- package/dist/utils/inputStream.d.ts +27 -0
- package/dist/utils/inputStream.d.ts.map +1 -1
- package/dist/utils/inputStream.js +72 -5
- package/dist/utils/nodeType.d.ts +2 -0
- package/dist/utils/nodeType.d.ts.map +1 -1
- package/dist/utils/nodeType.js +10 -0
- package/dist/utils/timeFormat.d.ts +14 -4
- package/dist/utils/timeFormat.d.ts.map +1 -1
- package/dist/utils/timeFormat.js +42 -4
- package/dist/utils/touchPresentation.d.ts +2 -2
- package/dist/utils/touchPresentation.d.ts.map +1 -1
- package/dist/utils/touchPresentation.js +10 -7
- package/dist/utils/touchPresentation.stylex.d.ts +4 -3
- package/dist/utils/touchPresentation.stylex.d.ts.map +1 -1
- package/dist/utils/touchPresentation.stylex.js +3 -3
- package/dist/utils/touchQueries.d.ts +3 -2
- package/dist/utils/touchQueries.d.ts.map +1 -1
- package/dist/utils/touchQueries.js +3 -2
- package/dist/utils/typeaheadMatch.d.ts +13 -0
- package/dist/utils/typeaheadMatch.d.ts.map +1 -1
- package/dist/utils/typeaheadMatch.js +15 -1
- package/dist/virtualization/useInlineListWindow.d.ts.map +1 -1
- package/dist/virtualization/useInlineListWindow.js +38 -22
- package/locales/en.json +36 -0
- package/locales/pseudo.json +27 -0
- package/package.json +10 -5
- package/scripts/agent-doc-state.mjs +71 -4
- package/src/AlertDialog/AlertDialog.doc.mjs +5 -1
- package/src/AlertDialog/AlertDialog.tsx +34 -7
- package/src/AppShell/AppShell.doc.mjs +22 -0
- package/src/AppShell/AppShell.tsx +112 -65
- package/src/AppShell/unreadWidthPoint.ts +162 -0
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +6 -1
- package/src/Badge/Badge.tsx +5 -2
- package/src/Banner/Banner.doc.mjs +15 -0
- package/src/Banner/Banner.tsx +56 -45
- package/src/BottomSheet/BottomSheet.doc.mjs +6 -3
- package/src/BottomSheet/BottomSheet.tsx +3 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +15 -7
- package/src/BottomSheet/BottomSheetSwitcher.tsx +73 -1
- package/src/BottomSheet/BottomSheetSwitcherContext.ts +5 -0
- package/src/BottomSheet/bottomSheetStack.ts +6 -14
- package/src/Breadcrumbs/BreadcrumbItem.tsx +14 -1
- package/src/Button/Button.doc.mjs +9 -3
- package/src/Button/Button.tsx +65 -11
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.tsx +32 -20
- package/src/Calendar/styles.ts +12 -3
- package/src/Card/Card.doc.mjs +2 -2
- package/src/Card/Card.tsx +22 -3
- package/src/Chat/Chat.doc.mjs +1 -1
- package/src/Chat/ChatComposer.doc.mjs +3 -3
- package/src/Chat/ChatComposer.tsx +11 -5
- package/src/Chat/ChatComposerDrawer.tsx +11 -7
- package/src/Chat/ChatDictationButton.tsx +12 -0
- package/src/Chat/ChatMessageBubble.tsx +2 -2
- package/src/Chat/ChatPastedTextToken.tsx +3 -9
- package/src/Chat/ChatSendButton.tsx +5 -0
- package/src/Chat/ChatSystemMessage.tsx +1 -0
- package/src/Chat/ChatToolCalls.tsx +16 -0
- package/src/Chat/pastedTextLabel.ts +23 -0
- package/src/Chat/useChatPasteAsToken.ts +9 -8
- package/src/Chat/useTriggerMenu.tsx +4 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +20 -0
- package/src/CheckboxInput/CheckboxInput.tsx +83 -26
- package/src/CheckboxList/CheckboxList.doc.mjs +15 -0
- package/src/CheckboxList/CheckboxListItem.doc.mjs +3 -3
- package/src/Citation/Citation.tsx +16 -1
- package/src/Code/Code.tsx +3 -0
- package/src/CodeBlock/CodeBlock.doc.mjs +7 -0
- package/src/CodeBlock/CodeBlock.tsx +60 -13
- package/src/CodeBlock/highlightRanges.ts +7 -5
- package/src/Collapsible/Collapsible.tsx +2 -0
- package/src/CommandPalette/CommandPaletteItem.tsx +1 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +30 -2
- package/src/ComplexSelector/ComplexSelector.tsx +19 -1
- package/src/ContextMenu/ContextMenu.doc.mjs +5 -1
- package/src/ContextMenu/ContextMenu.tsx +44 -5
- package/src/ContextMenu/ContextMenuItem.doc.mjs +55 -5
- package/src/DateInput/MonthScroller.tsx +1 -0
- package/src/DateInput/PickerWheel.tsx +1 -0
- package/src/DateInput/TouchDateField.tsx +2 -0
- package/src/DateInput/Wheel.tsx +1 -0
- package/src/DateInput/usePointerDragScroll.ts +6 -2
- package/src/DateRangeInput/DateRangeInput.tsx +16 -0
- package/src/DateTimeInput/TouchDateTimeField.tsx +2 -0
- package/src/Dialog/Dialog.doc.mjs +11 -1
- package/src/Dialog/Dialog.tsx +116 -19
- package/src/Dialog/DialogContext.ts +5 -4
- package/src/Dialog/DialogHeader.tsx +50 -12
- package/src/Drawer/DrawerHeader.tsx +31 -6
- package/src/DropdownMenu/DropdownMenu.doc.mjs +20 -1
- package/src/DropdownMenu/DropdownMenu.tsx +29 -22
- package/src/DropdownMenu/DropdownMenuCheckboxItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuItem.doc.mjs +5 -5
- package/src/DropdownMenu/DropdownMenuItem.tsx +3 -1
- package/src/DropdownMenu/DropdownMenuRadioItem.doc.mjs +4 -4
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +3 -2
- package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +3 -3
- package/src/DropdownMenu/DropdownMenuSubMenu.tsx +23 -1
- package/src/DropdownMenu/lazyMenuBottomSheet.ts +37 -9
- package/src/DropdownMenu/menuRowCorners.stylex.ts +40 -0
- package/src/EmptyState/EmptyState.tsx +2 -0
- package/src/Field/Field.doc.mjs +1 -1
- package/src/Field/FieldLabel.doc.mjs +3 -3
- package/src/Field/FieldLabel.tsx +9 -2
- package/src/Field/inputDisabledFocus.ts +18 -0
- package/src/Field/inputStyles.stylex.ts +52 -1
- package/src/Grid/Grid.doc.mjs +6 -3
- package/src/Grid/Grid.tsx +5 -2
- package/src/Heading/Heading.tsx +24 -1
- package/src/Icon/Icon.doc.mjs +1 -1
- package/src/Icon/Icon.tsx +40 -2
- package/src/Indicator/CheckboxIndicator.tsx +11 -6
- package/src/Indicator/Indicator.doc.mjs +1 -1
- package/src/Indicator/RadioIndicator.tsx +31 -4
- package/src/Indicator/indicatorRegistry.ts +7 -23
- package/src/Indicator/themeIndicators.ts +29 -0
- package/src/Indicator/types.ts +14 -0
- package/src/Indicator/useThemeIndicator.ts +24 -0
- package/src/Item/Item.doc.mjs +3 -3
- package/src/Item/Item.tsx +48 -7
- package/src/Kbd/Kbd.doc.mjs +6 -2
- package/src/Kbd/Kbd.tsx +16 -1
- package/src/Layer/layerExitCopy.ts +0 -1
- package/src/Layer/layerSlideRules.ts +62 -74
- package/src/Layer/useLayer.doc.mjs +2 -2
- package/src/Layer/useLayer.tsx +293 -137
- package/src/Layer/useLayerKeyboardClearance.ts +9 -12
- package/src/Layout/Layout.doc.mjs +3 -3
- package/src/Layout/LayoutContainerContext.ts +27 -0
- package/src/Layout/LayoutContainerScope.tsx +32 -0
- package/src/Layout/LayoutContent.tsx +5 -2
- package/src/Layout/LayoutFooter.tsx +3 -1
- package/src/Layout/LayoutHeader.tsx +3 -1
- package/src/Layout/containerCorners.stylex.ts +44 -7
- package/src/Lightbox/Lightbox.tsx +460 -8
- package/src/Link/Link.doc.mjs +18 -0
- package/src/Link/Link.tsx +3 -1
- package/src/List/List.tsx +14 -2
- package/src/List/ListContext.tsx +60 -1
- package/src/List/ListItem.doc.mjs +11 -9
- package/src/List/ListItem.tsx +4 -4
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.tsx +189 -190
- package/src/Markdown/plugins/HeadingLinksRenderer.tsx +14 -4
- package/src/Markdown/plugins/protocol.ts +3 -3
- package/src/MetadataList/MetadataListItem.tsx +18 -3
- package/src/MobileNav/MobileNav.doc.mjs +134 -52
- package/src/MobileNav/MobileNav.tsx +13 -9
- package/src/MultiSelector/MultiSelector.doc.mjs +2 -2
- package/src/MultiSelector/MultiSelector.tsx +51 -8
- package/src/NavMenu/NavHeadingMenu.tsx +5 -1
- package/src/NavMenu/NavHeadingMenuItem.tsx +1 -0
- package/src/NavMenu/NavMenu.doc.mjs +105 -2
- package/src/NavMenu/NavMenuContext.tsx +13 -0
- package/src/NumberInput/NumberInput.doc.mjs +12 -10
- package/src/NumberInput/NumberInput.tsx +19 -11
- package/src/Outline/Outline.doc.mjs +26 -8
- package/src/Outline/Outline.tsx +35 -5
- package/src/Outline/useScrollSpy.ts +8 -3
- package/src/OverflowList/OverflowList.doc.mjs +15 -0
- package/src/OverflowList/OverflowList.tsx +62 -26
- package/src/Pagination/Pagination.doc.mjs +12 -0
- package/src/Pagination/Pagination.tsx +40 -6
- package/src/Popover/Popover.doc.mjs +10 -0
- package/src/Popover/Popover.tsx +8 -4
- package/src/Popover/popoverAnchor.ts +47 -0
- package/src/Popover/usePopover.doc.mjs +16 -2
- package/src/Popover/usePopover.tsx +152 -16
- package/src/PowerSearch/PowerSearch.doc.mjs +8 -8
- package/src/PowerSearch/PowerSearch.tsx +65 -12
- package/src/PowerSearch/PowerSearchEditPopover.tsx +1 -0
- package/src/PowerSearch/PowerSearchFilterEditor.tsx +12 -0
- package/src/PowerSearch/PowerSearchToken.tsx +12 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +14 -19
- package/src/ProgressBar/ProgressBar.doc.mjs +2 -2
- package/src/ProgressBar/ProgressBar.tsx +44 -30
- package/src/RadioList/RadioList.tsx +63 -0
- package/src/RadioList/RadioListItem.tsx +4 -1
- package/src/Resizable/ResizeHandle.tsx +2 -3
- package/src/Resizable/resizableModel.ts +105 -3
- package/src/Resizable/resizeGesture.ts +14 -0
- package/src/Resizable/useResizable.ts +14 -75
- package/src/SegmentedControl/SegmentedControlItem.tsx +1 -0
- package/src/SegmentedControl/useSegmentedTouchTracking.ts +76 -12
- package/src/Selector/Selector.doc.mjs +34 -7
- package/src/Selector/Selector.tsx +55 -25
- package/src/Selector/SelectorOption.doc.mjs +5 -5
- package/src/Selector/hooks.ts +92 -17
- package/src/Selector/useSelectorPresentation.ts +18 -3
- package/src/SideNav/SideNavHeading.tsx +15 -4
- package/src/SideNav/SideNavItem.doc.mjs +10 -10
- package/src/Slider/Slider.tsx +4 -1
- package/src/Spinner/Spinner.tsx +56 -41
- package/src/Stepper/Step.tsx +18 -3
- package/src/Stepper/Stepper.doc.mjs +14 -2
- package/src/Swipe/useSwipeAction.ts +3 -3
- package/src/Switch/Switch.doc.mjs +61 -5
- package/src/Switch/Switch.tsx +72 -35
- package/src/Switch/useSwitchTouch.ts +68 -3
- package/src/TabList/Tab.tsx +6 -0
- package/src/Table/BaseTable.tsx +73 -35
- package/src/Table/Table.doc.mjs +109 -5
- package/src/Table/Table.tsx +42 -17
- package/src/Table/TableBody.tsx +10 -1
- package/src/Table/TableCell.tsx +6 -0
- package/src/Table/TableHeaderCell.tsx +52 -7
- package/src/Table/TableRow.tsx +8 -1
- package/src/Table/TableRowPlacementContext.ts +58 -0
- package/src/Table/TableSelectionToolbar.tsx +12 -0
- package/src/Table/columnUtils.ts +9 -1
- package/src/Table/plugins/columnSettings/useTableColumnSettingsState.doc.mjs +1 -1
- package/src/Table/plugins/rowIndex/useTableRowIndex.tsx +1 -0
- package/src/Table/plugins/sortable/useTableSortable.tsx +15 -2
- package/src/Table/plugins/sortable/useTableSortableState.doc.mjs +5 -5
- package/src/Table/plugins/sortable/useTableSortableState.tsx +15 -8
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +8 -0
- package/src/Table/plugins/tree/useTableTreeData.tsx +90 -14
- package/src/Table/table.stylex.ts +44 -5
- package/src/Table/types.ts +3 -1
- package/src/Table/useTableColumnResize.doc.mjs +3 -3
- package/src/Table/useTableColumnSettings.doc.mjs +3 -3
- package/src/Table/useTableFilterState.doc.mjs +6 -3
- package/src/Table/useTableFiltering.doc.mjs +71 -4
- package/src/Table/useTableInfiniteScroll.doc.mjs +2 -2
- package/src/Table/useTablePagination.doc.mjs +24 -3
- package/src/Table/useTableSelection.doc.mjs +30 -6
- package/src/Table/useTableSelectionState.doc.mjs +30 -2
- package/src/Table/useTableSortable.doc.mjs +104 -17
- package/src/Table/useTableStickyColumns.doc.mjs +3 -3
- package/src/Table/useTableTreeData.doc.mjs +2 -2
- package/src/Text/Heading.doc.mjs +2 -2
- package/src/Text/Text.doc.mjs +1 -1
- package/src/Text/TruncationTooltip.tsx +168 -1
- package/src/Text/useTruncation.ts +20 -4
- package/src/TextArea/TextArea.doc.mjs +5 -5
- package/src/TextArea/TextArea.tsx +20 -1
- package/src/TextInput/TextInput.doc.mjs +5 -5
- package/src/TextInput/TextInput.tsx +23 -18
- package/src/Thumbnail/Thumbnail.tsx +2 -1
- package/src/Timer/Timer.tsx +21 -6
- package/src/Timestamp/Timestamp.tsx +67 -4
- package/src/Toast/Toast.doc.mjs +15 -5
- package/src/Toast/Toast.tsx +83 -62
- package/src/Toast/ToastViewport.tsx +62 -23
- package/src/Toast/types.ts +8 -0
- package/src/Toast/useToast.doc.mjs +80 -15
- package/src/Toast/useToast.tsx +18 -7
- package/src/ToggleButton/ToggleButton.doc.mjs +1 -1
- package/src/ToggleButton/ToggleButton.tsx +25 -2
- package/src/Token/Token.tsx +5 -1
- package/src/Tokenizer/Tokenizer.doc.mjs +15 -3
- package/src/Tokenizer/Tokenizer.tsx +130 -75
- package/src/Toolbar/Toolbar.tsx +55 -4
- package/src/Tooltip/Tooltip.tsx +34 -0
- package/src/Tooltip/useTooltip.tsx +26 -0
- package/src/TopNav/TopNav.doc.mjs +1 -1
- package/src/TopNav/TopNav.tsx +13 -3
- package/src/TopNav/TopNavContext.ts +31 -1
- package/src/TopNav/TopNavHeading.tsx +22 -9
- package/src/TopNav/TopNavMegaMenu.tsx +27 -18
- package/src/TopNav/TopNavMegaMenuFeaturedCard.tsx +14 -2
- package/src/TopNav/TopNavMegaMenuItem.doc.mjs +26 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +26 -2
- package/src/TopNav/TopNavMenu.doc.mjs +19 -8
- package/src/TopNav/TopNavMenu.tsx +34 -2
- package/src/TopNav/TopNavRenderContext.ts +30 -9
- package/src/TreeList/TreeList.tsx +12 -0
- package/src/TreeList/TreeListItem.tsx +26 -5
- package/src/Typeahead/BaseTypeahead.doc.mjs +6 -0
- package/src/Typeahead/BaseTypeahead.tsx +2 -0
- package/src/Typeahead/Typeahead.doc.mjs +15 -2
- package/src/Typeahead/Typeahead.tsx +37 -13
- package/src/Typeahead/TypeaheadItem.tsx +12 -0
- package/src/gestures/GestureHost.ts +34 -0
- package/src/gestures/README.md +9 -6
- package/src/hooks/anchoredHint.tsx +1 -2
- package/src/hooks/computeOverflow.ts +10 -0
- package/src/hooks/focusableSelector.ts +59 -2
- package/src/hooks/scrollEdgeFade.ts +129 -0
- package/src/hooks/statusButtonPress.ts +26 -0
- package/src/hooks/useAnnounce.ts +2 -1
- package/src/hooks/useFocusTrap.ts +110 -141
- package/src/hooks/useGroupPressTracking.ts +1 -1
- package/src/hooks/useOverflow.ts +227 -13
- package/src/hooks/useResolvedRequired.ts +50 -1
- package/src/hooks/useTreeFocus.ts +8 -4
- package/src/hooks/useTypeahead.ts +12 -10
- package/src/i18n/InternationalizationContext.ts +16 -7
- package/src/i18n/InternationalizationProvider.doc.mjs +1 -1
- package/src/i18n/InternationalizationProvider.tsx +12 -0
- package/src/i18n/defaultTranslator.ts +25 -0
- package/src/i18n/firstStrongDirection.ts +54 -13
- package/src/i18n/generated-english/Chat/ChatPastedTextToken.generated.ts +1 -2
- package/src/i18n/generated-english/Chat/pastedTextLabel.generated.ts +13 -0
- package/src/i18n/generated-english/Chat/useTriggerMenu.generated.ts +1 -0
- package/src/i18n/generated-english/CodeBlock/CodeBlock.generated.ts +2 -1
- package/src/i18n/generated-english/Markdown/plugins/HeadingLinksRenderer.generated.ts +2 -1
- package/src/i18n/generated-english/MultiSelector/MultiSelector.generated.ts +1 -0
- package/src/i18n/generated-english/Slider/Slider.generated.ts +2 -1
- package/src/i18n/generated-english/TextArea/TextArea.generated.ts +1 -0
- package/src/i18n/generated-english/TextInput/TextInput.generated.ts +1 -0
- package/src/i18n/generated-english/Timestamp/Timestamp.generated.ts +2 -1
- package/src/i18n/generated-english/Tokenizer/Tokenizer.generated.ts +1 -0
- package/src/i18n/generated-locales/en.generated.ts +11 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +11 -0
- package/src/i18n/publicContext.ts +4 -2
- package/src/i18n/translatingContext.ts +28 -0
- package/src/i18n/useComponentTranslator.ts +3 -2
- package/src/i18n/useListFormatter.ts +3 -2
- package/src/i18n/useTranslator.ts +3 -2
- package/src/internal/touch.ts +7 -0
- package/src/keyboard/README.md +58 -16
- package/src/keyboard/keyboardHeight.ts +138 -26
- package/src/keyboard/keyboardTarget.ts +667 -71
- package/src/keyboard/useMobileKeyboard.ts +1 -7
- package/src/palette/color.ts +205 -0
- package/src/palette/generator.ts +1134 -0
- package/src/palette/index.ts +35 -0
- package/src/palette/mapping.ts +1630 -0
- package/src/palette/themePalette.ts +175 -0
- package/src/palette/types.ts +194 -0
- package/src/privateAttributes/mediaDarkPage.ts +27 -0
- package/src/privateAttributes/pressGroupItem.stylex.ts +2 -1
- package/src/privateAttributes/scheme.ts +37 -0
- package/src/privateAttributes/travelling.stylex.ts +6 -4
- package/src/reset.css +1 -1
- package/src/theme/MediaDarkPage.tsx +41 -0
- package/src/theme/MediaTheme.tsx +8 -1
- package/src/theme/Theme.doc.mjs +4 -4
- package/src/theme/Theme.tsx +140 -35
- package/src/theme/defineTheme.ts +103 -40
- package/src/theme/derivedVarRegistry.ts +61 -4
- package/src/theme/expandRadiusScale.ts +1 -5
- package/src/theme/generateThemeRules.ts +398 -342
- package/src/theme/index.ts +2 -4
- package/src/theme/invertedSurfaceSide.ts +65 -0
- package/src/theme/resolveThemeValues.ts +8 -2
- package/src/theme/statusRoleDefaults.ts +330 -0
- package/src/theme/statusRoleDerivation.ts +2 -1
- package/src/theme/syntax/SyntaxTheme.tsx +12 -0
- package/src/theme/themeAdaptations.ts +53 -5
- package/src/theme/tokenDefaults.ts +44 -0
- package/src/theme/tokenValues.ts +193 -0
- package/src/theme/tokens.stylex.ts +7 -5
- package/src/theme/tokens.ts +14 -176
- package/src/theme/useTheme.ts +164 -35
- package/src/utils/devWarning.ts +24 -0
- package/src/utils/focusOutline.stylex.ts +7 -4
- package/src/utils/focusReturn.ts +578 -16
- package/src/utils/hitArea.ts +70 -33
- package/src/utils/inputStream.ts +81 -5
- package/src/utils/nodeType.ts +10 -0
- package/src/utils/timeFormat.ts +54 -4
- package/src/utils/touchPresentation.stylex.ts +7 -6
- package/src/utils/touchPresentation.ts +10 -7
- package/src/utils/touchQueries.ts +3 -2
- package/src/utils/typeaheadMatch.ts +20 -1
- package/src/virtualization/useInlineListWindow.ts +57 -33
|
@@ -102,6 +102,11 @@ export interface ChatComposerDrawerProps extends BaseProps<HTMLDivElement> {
|
|
|
102
102
|
'data-testid'?: string;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// The composer's own corner: the copy of --radius-chat that ChatComposer sets
|
|
106
|
+
// on its root, which a theme replaces through `chat-composer` borderRadius.
|
|
107
|
+
// Outside a composer the drawer takes --radius-chat itself.
|
|
108
|
+
const composerRadius = `var(--_chat-composer-radius, ${radiusVars['--radius-chat']})`;
|
|
109
|
+
|
|
105
110
|
const styles = stylex.create({
|
|
106
111
|
root: {
|
|
107
112
|
position: 'relative',
|
|
@@ -111,11 +116,10 @@ const styles = stylex.create({
|
|
|
111
116
|
overflow: 'hidden',
|
|
112
117
|
paddingInline: spacingVars['--spacing-4'],
|
|
113
118
|
paddingBlockStart: spacingVars['--spacing-3'],
|
|
114
|
-
// The drawer tucks behind the composer
|
|
115
|
-
// top corners
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
marginBlockEnd: `calc(-1 * ${radiusVars['--radius-chat']})`,
|
|
119
|
+
// The drawer tucks behind the composer body by one corner radius, so its
|
|
120
|
+
// top corners and the tuck follow the composer's corner.
|
|
121
|
+
paddingBlockEnd: `calc(${spacingVars['--spacing-3']} + ${composerRadius})`,
|
|
122
|
+
marginBlockEnd: `calc(-1 * ${composerRadius})`,
|
|
119
123
|
// Surface base with a muted tint layered on top, both in the element's
|
|
120
124
|
// own background layer. The muted backgroundImage composites over the
|
|
121
125
|
// surface backgroundColor and — by CSS rule — paints behind all in-flow
|
|
@@ -125,8 +129,8 @@ const styles = stylex.create({
|
|
|
125
129
|
// opaque or translucent.
|
|
126
130
|
backgroundColor: colorVars['--color-background-surface'],
|
|
127
131
|
backgroundImage: `linear-gradient(${colorVars['--color-background-muted']}, ${colorVars['--color-background-muted']})`,
|
|
128
|
-
borderStartStartRadius:
|
|
129
|
-
borderStartEndRadius:
|
|
132
|
+
borderStartStartRadius: composerRadius,
|
|
133
|
+
borderStartEndRadius: composerRadius,
|
|
130
134
|
},
|
|
131
135
|
|
|
132
136
|
// Toggle row — both the collapsed summary and bar handle live in the same
|
|
@@ -33,6 +33,11 @@ import {
|
|
|
33
33
|
useComponentTranslator,
|
|
34
34
|
} from '../i18n/useComponentTranslator';
|
|
35
35
|
import english from '../i18n/generated-english/Chat/ChatDictationButton.generated';
|
|
36
|
+
import {devPropError} from '../utils/devWarning';
|
|
37
|
+
|
|
38
|
+
// Bundlers replace this value at build time. The declaration lets a product
|
|
39
|
+
// without Node's types type-check this file.
|
|
40
|
+
declare const process: {readonly env: {readonly NODE_ENV?: string}};
|
|
36
41
|
|
|
37
42
|
registerEnglishFallback(english);
|
|
38
43
|
|
|
@@ -119,6 +124,13 @@ export function ChatDictationButton({
|
|
|
119
124
|
style,
|
|
120
125
|
...rest
|
|
121
126
|
}: ChatDictationButtonProps) {
|
|
127
|
+
if (process.env.NODE_ENV !== 'production' && dictation == null) {
|
|
128
|
+
throw devPropError(
|
|
129
|
+
'ChatDictationButton',
|
|
130
|
+
'dictation',
|
|
131
|
+
'is required: the value of useSpeechRecognition(), for example dictation={dictation}.',
|
|
132
|
+
);
|
|
133
|
+
}
|
|
122
134
|
const t = useComponentTranslator();
|
|
123
135
|
|
|
124
136
|
if (isHiddenWhenUnsupported && !dictation.isSupported) {
|
|
@@ -109,8 +109,8 @@ const styles = stylex.create({
|
|
|
109
109
|
display: 'flex',
|
|
110
110
|
flexDirection: 'column',
|
|
111
111
|
maxWidth: 'max(80%, 280px)',
|
|
112
|
-
//
|
|
113
|
-
//
|
|
112
|
+
// The chat radius follows the container radius unless a theme makes chat
|
|
113
|
+
// rounder or squarer than its cards.
|
|
114
114
|
borderRadius: radiusVars['--radius-chat'],
|
|
115
115
|
fontFamily: typographyVars['--font-family-body'],
|
|
116
116
|
fontSize: typeScaleVars['--text-body-size'],
|
|
@@ -27,8 +27,8 @@ import {
|
|
|
27
27
|
import {Badge} from '../Badge';
|
|
28
28
|
import {Button} from '../Button';
|
|
29
29
|
import {HoverCard} from '../HoverCard';
|
|
30
|
-
import type {TranslatorFn} from '../i18n';
|
|
31
30
|
import {useTapStop} from '../Layer/useTouchTrigger';
|
|
31
|
+
import {formatPastedTextLabel} from './pastedTextLabel';
|
|
32
32
|
import {
|
|
33
33
|
registerEnglishFallback,
|
|
34
34
|
useComponentTranslator,
|
|
@@ -77,6 +77,7 @@ const styles = stylex.create({
|
|
|
77
77
|
},
|
|
78
78
|
meta: {
|
|
79
79
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
80
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
80
81
|
color: colorVars['--color-text-secondary'],
|
|
81
82
|
},
|
|
82
83
|
});
|
|
@@ -85,13 +86,6 @@ const styles = stylex.create({
|
|
|
85
86
|
// Helpers
|
|
86
87
|
// =============================================================================
|
|
87
88
|
|
|
88
|
-
function formatLabel(text: string, t: TranslatorFn): string {
|
|
89
|
-
return t('@astryx.chat.pastedText.label', {
|
|
90
|
-
lines: text.split('\n').length,
|
|
91
|
-
chars: text.length,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
89
|
// =============================================================================
|
|
96
90
|
// Component
|
|
97
91
|
// =============================================================================
|
|
@@ -101,7 +95,7 @@ export function ChatPastedTextToken({
|
|
|
101
95
|
onExpand,
|
|
102
96
|
}: ChatPastedTextTokenProps) {
|
|
103
97
|
const t = useComponentTranslator();
|
|
104
|
-
const label =
|
|
98
|
+
const label = formatPastedTextLabel(text, t);
|
|
105
99
|
// A tap on the token, by finger or pen, asks for its preview, so it stops
|
|
106
100
|
// there: cancelling the mouse press the browser makes of it keeps the
|
|
107
101
|
// composer around the token from taking focus and the caret, which on a
|
|
@@ -27,6 +27,7 @@ import {useChatComposerContext} from './ChatContext';
|
|
|
27
27
|
import type {BaseProps} from '../BaseProps';
|
|
28
28
|
import {composeEventHandlers, mergeProps} from '../utils';
|
|
29
29
|
import {themeProps} from '../utils/themeProps';
|
|
30
|
+
import {radiusVars} from '../theme/tokens.stylex';
|
|
30
31
|
import {
|
|
31
32
|
registerEnglishFallback,
|
|
32
33
|
useComponentTranslator,
|
|
@@ -63,6 +64,10 @@ export interface ChatSendButtonProps extends BaseProps<HTMLButtonElement> {
|
|
|
63
64
|
|
|
64
65
|
const styles = stylex.create({
|
|
65
66
|
root: {
|
|
67
|
+
// Declared on the button itself, so it stays circular inside a composer,
|
|
68
|
+
// whose concentric radius reaches other buttons by inheritance. A theme
|
|
69
|
+
// that sets the button or send-button radius still wins.
|
|
70
|
+
'--_button-radius': radiusVars['--radius-full'],
|
|
66
71
|
borderRadius: 'var(--_button-radius, var(--radius-full))',
|
|
67
72
|
flexShrink: 0,
|
|
68
73
|
},
|
|
@@ -73,6 +73,7 @@ const styles = stylex.create({
|
|
|
73
73
|
paddingBlock: spacingVars['--spacing-1'],
|
|
74
74
|
fontFamily: typographyVars['--font-family-body'],
|
|
75
75
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
76
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
76
77
|
fontWeight: fontWeightVars['--font-weight-normal'],
|
|
77
78
|
color: colorVars['--color-text-secondary'],
|
|
78
79
|
textAlign: 'center',
|
|
@@ -44,6 +44,11 @@ import {
|
|
|
44
44
|
useComponentTranslator,
|
|
45
45
|
} from '../i18n/useComponentTranslator';
|
|
46
46
|
import english from '../i18n/generated-english/Chat/ChatToolCalls.generated';
|
|
47
|
+
import {devPropError} from '../utils/devWarning';
|
|
48
|
+
|
|
49
|
+
// Bundlers replace this value at build time. The declaration lets a product
|
|
50
|
+
// without Node's types type-check this file.
|
|
51
|
+
declare const process: {readonly env: {readonly NODE_ENV?: string}};
|
|
47
52
|
|
|
48
53
|
registerEnglishFallback(english);
|
|
49
54
|
|
|
@@ -107,6 +112,10 @@ const styles = stylex.create({
|
|
|
107
112
|
root: {
|
|
108
113
|
display: 'flex',
|
|
109
114
|
flexDirection: 'column',
|
|
115
|
+
// A message column aligns its children to the start, so the root sizes
|
|
116
|
+
// to its content and a long target never shrinks. The cap lets each row
|
|
117
|
+
// shrink to the column, so its target truncates.
|
|
118
|
+
maxWidth: '100%',
|
|
110
119
|
marginBlockStart: spacingVars['--spacing-2'],
|
|
111
120
|
},
|
|
112
121
|
groupHeader: {
|
|
@@ -567,6 +576,13 @@ export function ChatToolCalls(props: ChatToolCallsProps) {
|
|
|
567
576
|
ref,
|
|
568
577
|
...rest
|
|
569
578
|
} = props;
|
|
579
|
+
if (process.env.NODE_ENV !== 'production' && !Array.isArray(calls)) {
|
|
580
|
+
throw devPropError(
|
|
581
|
+
'ChatToolCalls',
|
|
582
|
+
'calls',
|
|
583
|
+
"must be an array of tool calls, for example calls={[{name: 'search', status: 'complete'}]}.",
|
|
584
|
+
);
|
|
585
|
+
}
|
|
570
586
|
|
|
571
587
|
const autoDefault = defaultIsExpanded ?? false;
|
|
572
588
|
const [internalExpanded, setInternalExpanded] = useState(autoDefault);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file pastedTextLabel.ts
|
|
5
|
+
* @input Pasted text and the provider-bound translator
|
|
6
|
+
* @output formatPastedTextLabel, the line and character count label
|
|
7
|
+
* @position Chat-internal helper shared by ChatPastedTextToken and the default
|
|
8
|
+
* token of useChatPasteAsToken, so the chip and the token read the same.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {registerEnglishFallback} from '../i18n/englishFallback';
|
|
12
|
+
import english from '../i18n/generated-english/Chat/pastedTextLabel.generated';
|
|
13
|
+
import type {TranslatorFn} from '../i18n/useTranslator';
|
|
14
|
+
|
|
15
|
+
registerEnglishFallback(english);
|
|
16
|
+
|
|
17
|
+
/** The count label for pasted text: "240 chars", or "3 lines, 302 chars". */
|
|
18
|
+
export function formatPastedTextLabel(text: string, t: TranslatorFn): string {
|
|
19
|
+
return t('@astryx.chat.pastedText.label', {
|
|
20
|
+
lines: text.split('\n').length,
|
|
21
|
+
chars: text.length,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
import {useCallback} from 'react';
|
|
21
21
|
import type {ClipboardEvent} from 'react';
|
|
22
|
+
import {useComponentTranslator} from '../i18n/useComponentTranslator';
|
|
23
|
+
import type {TranslatorFn} from '../i18n/useTranslator';
|
|
24
|
+
import {formatPastedTextLabel} from './pastedTextLabel';
|
|
22
25
|
import type {
|
|
23
26
|
ChatComposerInputHandle,
|
|
24
27
|
ChatComposerToken,
|
|
@@ -57,13 +60,10 @@ export interface UseChatPasteAsTokenReturn {
|
|
|
57
60
|
// Default token factory
|
|
58
61
|
// =============================================================================
|
|
59
62
|
|
|
60
|
-
function defaultToToken(text: string): ChatComposerToken {
|
|
61
|
-
const lines = text.split('\n').length;
|
|
62
|
-
const chars = text.length;
|
|
63
|
-
const label = lines > 1 ? `${lines} lines, ${chars} chars` : `${chars} chars`;
|
|
63
|
+
function defaultToToken(text: string, t: TranslatorFn): ChatComposerToken {
|
|
64
64
|
return {
|
|
65
65
|
value: text,
|
|
66
|
-
label,
|
|
66
|
+
label: formatPastedTextLabel(text, t),
|
|
67
67
|
variant: 'neutral' as const,
|
|
68
68
|
};
|
|
69
69
|
}
|
|
@@ -75,19 +75,20 @@ function defaultToToken(text: string): ChatComposerToken {
|
|
|
75
75
|
export function useChatPasteAsToken({
|
|
76
76
|
inputRef,
|
|
77
77
|
threshold = 200,
|
|
78
|
-
toToken
|
|
78
|
+
toToken,
|
|
79
79
|
}: UseChatPasteAsTokenOptions): UseChatPasteAsTokenReturn {
|
|
80
|
+
const t = useComponentTranslator();
|
|
80
81
|
const onPaste = useCallback(
|
|
81
82
|
(_event: ClipboardEvent<HTMLDivElement>, text: string): boolean => {
|
|
82
83
|
if (text.length <= threshold) {
|
|
83
84
|
return false;
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
const token = toToken(text);
|
|
87
|
+
const token = toToken ? toToken(text) : defaultToToken(text, t);
|
|
87
88
|
inputRef.current?.insertToken(token);
|
|
88
89
|
return true;
|
|
89
90
|
},
|
|
90
|
-
[inputRef, threshold, toToken],
|
|
91
|
+
[inputRef, threshold, toToken, t],
|
|
91
92
|
);
|
|
92
93
|
|
|
93
94
|
return {onPaste};
|
|
@@ -161,12 +161,14 @@ const styles = stylex.create({
|
|
|
161
161
|
padding: spacingVars['--spacing-3'],
|
|
162
162
|
textAlign: 'center' as const,
|
|
163
163
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
164
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
164
165
|
color: colorVars['--color-text-secondary'],
|
|
165
166
|
},
|
|
166
167
|
loadingState: {
|
|
167
168
|
padding: spacingVars['--spacing-3'],
|
|
168
169
|
textAlign: 'center' as const,
|
|
169
170
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
171
|
+
lineHeight: typeScaleVars['--text-supporting-leading'],
|
|
170
172
|
color: colorVars['--color-text-secondary'],
|
|
171
173
|
},
|
|
172
174
|
groupHeading: {
|
|
@@ -928,7 +930,8 @@ export function useTriggerMenu(
|
|
|
928
930
|
return null;
|
|
929
931
|
}
|
|
930
932
|
|
|
931
|
-
const emptyText =
|
|
933
|
+
const emptyText =
|
|
934
|
+
activeTrigger.emptySearchText ?? t('@astryx.chatTriggerMenu.noResults');
|
|
932
935
|
|
|
933
936
|
let listContent: ReactNode;
|
|
934
937
|
if (state.isLoading) {
|
|
@@ -169,6 +169,16 @@ export const docs = {
|
|
|
169
169
|
default: 'var(--color-overlay-pressed)',
|
|
170
170
|
private: true,
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
name: '--_checkbox-input-gap',
|
|
174
|
+
description:
|
|
175
|
+
'Room between the box and its label; set by gap on the checkbox-input target',
|
|
176
|
+
default: 'var(--spacing-2)',
|
|
177
|
+
private: true,
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
derived: [
|
|
181
|
+
{property: 'gap', vars: ['--_checkbox-input-gap'], replaces: true},
|
|
172
182
|
],
|
|
173
183
|
},
|
|
174
184
|
usage: {
|
|
@@ -425,6 +435,16 @@ export const docsZh = {
|
|
|
425
435
|
default: 'var(--color-overlay-pressed)',
|
|
426
436
|
private: true,
|
|
427
437
|
},
|
|
438
|
+
{
|
|
439
|
+
name: '--_checkbox-input-gap',
|
|
440
|
+
description:
|
|
441
|
+
'复选框与其标签之间的间距;由 checkbox-input 目标上的 gap 设置',
|
|
442
|
+
default: 'var(--spacing-2)',
|
|
443
|
+
private: true,
|
|
444
|
+
},
|
|
445
|
+
],
|
|
446
|
+
derived: [
|
|
447
|
+
{property: 'gap', vars: ['--_checkbox-input-gap'], replaces: true},
|
|
428
448
|
],
|
|
429
449
|
},
|
|
430
450
|
};
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CheckboxInput.tsx
|
|
7
|
-
* @input Uses React, useId, ChangeEvent, FieldLabel, FieldStatus, IconType, InputStatus, useTooltip,
|
|
7
|
+
* @input Uses React, useId, ChangeEvent, FieldLabel, FieldStatus, IconType, InputStatus, useTooltip, useIsHydrating
|
|
8
|
+
* (only while a disabled message can show),
|
|
8
9
|
* CheckboxRowPressContext (a row around the checkbox that owns its press)
|
|
9
10
|
* @output Exports CheckboxInput component, CheckboxInputProps
|
|
10
11
|
* @position Core implementation; consumed by index.ts, tested by CheckboxInput.test.tsx
|
|
@@ -29,6 +30,7 @@ import {
|
|
|
29
30
|
type MouseEvent as ReactMouseEvent,
|
|
30
31
|
type PointerEvent as ReactPointerEvent,
|
|
31
32
|
type ReactNode,
|
|
33
|
+
type RefObject,
|
|
32
34
|
} from 'react';
|
|
33
35
|
import * as stylex from '@stylexjs/stylex';
|
|
34
36
|
import {
|
|
@@ -46,7 +48,9 @@ import {FieldStatus} from '../FieldStatus/FieldStatus';
|
|
|
46
48
|
import type {IconType} from '../Icon';
|
|
47
49
|
import type {InputStatus} from '../Field/types';
|
|
48
50
|
import {Spinner} from '../Spinner/Spinner';
|
|
51
|
+
import {VisuallyHidden} from '../VisuallyHidden/VisuallyHidden';
|
|
49
52
|
import {useTooltip} from '../Tooltip/useTooltip';
|
|
53
|
+
import {useIsHydrating} from '../hooks/useIsHydrating';
|
|
50
54
|
import {mergeProps} from '../utils/mergeProps';
|
|
51
55
|
import {rtlStyles} from '../utils/rtlStyles';
|
|
52
56
|
import {withholdCallerHandlers} from '../utils/disabledInteraction';
|
|
@@ -60,6 +64,7 @@ import {useIndicator} from '../Indicator/useIndicator';
|
|
|
60
64
|
import {themeProps} from '../utils/themeProps';
|
|
61
65
|
|
|
62
66
|
import {useMergedRefs} from '../hooks/useMergedRefs';
|
|
67
|
+
import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect';
|
|
63
68
|
import {useTouchHitArea} from '../utils/touchHitArea';
|
|
64
69
|
import {pressBoxProps} from '../privateAttributes/pressBox.stylex';
|
|
65
70
|
import {indicatorPressPaintStyles} from '../privateAttributes/press.stylex';
|
|
@@ -81,7 +86,11 @@ const styles = stylex.create({
|
|
|
81
86
|
container: {
|
|
82
87
|
display: 'flex',
|
|
83
88
|
alignItems: 'center',
|
|
84
|
-
gap
|
|
89
|
+
// The room between the box and its label. A theme sets it with gap on
|
|
90
|
+
// the `checkbox-input` target, which the compiler hands to this row as
|
|
91
|
+
// --_checkbox-input-gap (derivedVarRegistry): the target is the outer
|
|
92
|
+
// field, which also holds the status message below the row.
|
|
93
|
+
gap: `var(--_checkbox-input-gap, ${spacingVars['--spacing-2']})`,
|
|
85
94
|
},
|
|
86
95
|
containerLabelHidden: {
|
|
87
96
|
gap: 0,
|
|
@@ -98,6 +107,10 @@ const styles = stylex.create({
|
|
|
98
107
|
// The row paints every press, so the indicator draws no `:active` fill.
|
|
99
108
|
'--_indicator-active-press': 'transparent',
|
|
100
109
|
},
|
|
110
|
+
// The slot is as big as the indicator it holds. So a box a theme sizes,
|
|
111
|
+
// or a replacement indicator, sets the row's spacing, and the pressed layer
|
|
112
|
+
// fits it. The hidden input keeps the full size for its hit area
|
|
113
|
+
// (wrapperSizeStyles), centered on the box.
|
|
101
114
|
checkboxWrapper: {
|
|
102
115
|
position: 'relative',
|
|
103
116
|
display: 'flex',
|
|
@@ -384,13 +397,13 @@ export function CheckboxInput({
|
|
|
384
397
|
// native disabled attribute (spec:AST-085 FR1). Value mutation is blocked by
|
|
385
398
|
// the click and onChange guards on the input.
|
|
386
399
|
const showsDisabledMessage = isDisabled && !!disabledMessage;
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
400
|
+
// The disabled reason describes the input from the first markup on. The
|
|
401
|
+
// server and hydrating markup has no tooltip layer, so a visually hidden
|
|
402
|
+
// copy carries the reason's id there; every later render gives that id to
|
|
403
|
+
// the tooltip's text instead, so the reason renders once. The tooltip mounts
|
|
404
|
+
// only while it can show, so a checkbox with no reason runs none of its work.
|
|
405
|
+
const disabledMessageID = useId();
|
|
406
|
+
const isHydrating = useIsHydrating();
|
|
394
407
|
|
|
395
408
|
// The checkbox visual is an indicator: a theme can restyle it through the
|
|
396
409
|
// canonical `checkbox-indicator` target or replace the component outright.
|
|
@@ -414,13 +427,10 @@ export function CheckboxInput({
|
|
|
414
427
|
// stops.
|
|
415
428
|
const watchRowHitArea = useTouchHitArea(hasHitArea);
|
|
416
429
|
// The disabled-message tooltip listens for hover and focus on the whole
|
|
417
|
-
// row, a larger trigger
|
|
418
|
-
//
|
|
419
|
-
|
|
420
|
-
const rowRef = useMergedRefs(
|
|
421
|
-
disabledMessageTooltip.interactionRef,
|
|
422
|
-
watchRowHitArea,
|
|
423
|
-
);
|
|
430
|
+
// row, a larger trigger, and anchors on the checkbox itself, so it shows
|
|
431
|
+
// next to the control.
|
|
432
|
+
const rowElementRef = useRef<HTMLDivElement>(null);
|
|
433
|
+
const rowRef = useMergedRefs(rowElementRef, watchRowHitArea);
|
|
424
434
|
// Where a press on the row itself began. A browser can move a tap's click
|
|
425
435
|
// onto the row's edge, so the band is judged from the press.
|
|
426
436
|
const pressPointRef = useRef<{x: number; y: number} | null>(null);
|
|
@@ -488,7 +498,7 @@ export function CheckboxInput({
|
|
|
488
498
|
describedByParts.push(statusMessageID);
|
|
489
499
|
}
|
|
490
500
|
if (showsDisabledMessage) {
|
|
491
|
-
describedByParts.push(
|
|
501
|
+
describedByParts.push(disabledMessageID);
|
|
492
502
|
}
|
|
493
503
|
const ariaDescribedBy =
|
|
494
504
|
describedByParts.length > 0 ? describedByParts.join(' ') : undefined;
|
|
@@ -534,7 +544,6 @@ export function CheckboxInput({
|
|
|
534
544
|
{...(isDisabled ? undefined : pressBoxProps)}
|
|
535
545
|
{...stylex.props(
|
|
536
546
|
styles.checkboxWrapper,
|
|
537
|
-
wrapperSizeStyles[size],
|
|
538
547
|
!isDisabled && styles.indicatorPressOverlay,
|
|
539
548
|
// Under a row that owns the press, the row's own overlay paints
|
|
540
549
|
// instead of the owner's press paint.
|
|
@@ -552,12 +561,7 @@ export function CheckboxInput({
|
|
|
552
561
|
// pointer events. It runs no caller handler except `onFocus` and
|
|
553
562
|
// `onBlur`.
|
|
554
563
|
{...withholdCallerHandlers(rest, isDisabled)}
|
|
555
|
-
ref={useMergedRefs(
|
|
556
|
-
ref,
|
|
557
|
-
indeterminateRef,
|
|
558
|
-
disabledMessageTooltip.positionRef,
|
|
559
|
-
inputRef,
|
|
560
|
-
)}
|
|
564
|
+
ref={useMergedRefs(ref, indeterminateRef, inputRef)}
|
|
561
565
|
id={id}
|
|
562
566
|
type="checkbox"
|
|
563
567
|
// Withhold the name while disabled: the input stays focusable (not
|
|
@@ -656,10 +660,63 @@ export function CheckboxInput({
|
|
|
656
660
|
variant="detached"
|
|
657
661
|
/>
|
|
658
662
|
)}
|
|
659
|
-
{
|
|
660
|
-
|
|
663
|
+
{isDisabled && disabledMessage ? (
|
|
664
|
+
<>
|
|
665
|
+
{isHydrating ? (
|
|
666
|
+
<VisuallyHidden id={disabledMessageID}>
|
|
667
|
+
{disabledMessage}
|
|
668
|
+
</VisuallyHidden>
|
|
669
|
+
) : null}
|
|
670
|
+
<DisabledMessageTooltip
|
|
671
|
+
message={disabledMessage}
|
|
672
|
+
messageID={isHydrating ? undefined : disabledMessageID}
|
|
673
|
+
rowRef={rowElementRef}
|
|
674
|
+
inputRef={inputRef}
|
|
675
|
+
/>
|
|
676
|
+
</>
|
|
677
|
+
) : null}
|
|
661
678
|
</div>
|
|
662
679
|
);
|
|
663
680
|
}
|
|
664
681
|
|
|
682
|
+
interface DisabledMessageTooltipProps {
|
|
683
|
+
readonly message: string;
|
|
684
|
+
/** The id the input's description names, once hydration is over. */
|
|
685
|
+
readonly messageID: string | undefined;
|
|
686
|
+
readonly rowRef: RefObject<HTMLElement | null>;
|
|
687
|
+
readonly inputRef: RefObject<HTMLElement | null>;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* A disabled checkbox's message as a tooltip: hover or focus anywhere on the
|
|
692
|
+
* row opens it above the checkbox. Its text carries the id that describes the
|
|
693
|
+
* input.
|
|
694
|
+
*/
|
|
695
|
+
function DisabledMessageTooltip({
|
|
696
|
+
message,
|
|
697
|
+
messageID,
|
|
698
|
+
rowRef,
|
|
699
|
+
inputRef,
|
|
700
|
+
}: DisabledMessageTooltipProps): ReactNode {
|
|
701
|
+
const tooltip = useTooltip({
|
|
702
|
+
placement: 'above',
|
|
703
|
+
// The container row is not naturally focusable; focusin bubbles up from the
|
|
704
|
+
// native checkbox, so always attach focus listeners.
|
|
705
|
+
focusTrigger: 'always',
|
|
706
|
+
});
|
|
707
|
+
const {interactionRef, positionRef} = tooltip;
|
|
708
|
+
// Attaches the tooltip to the row and the checkbox, which the parent
|
|
709
|
+
// renders.
|
|
710
|
+
useIsomorphicLayoutEffect(() => {
|
|
711
|
+
interactionRef(rowRef.current);
|
|
712
|
+
positionRef(inputRef.current);
|
|
713
|
+
return () => {
|
|
714
|
+
interactionRef(null);
|
|
715
|
+
positionRef(null);
|
|
716
|
+
};
|
|
717
|
+
}, [interactionRef, positionRef, rowRef, inputRef]);
|
|
718
|
+
// The span names the reason for the input's aria-describedby.
|
|
719
|
+
return tooltip.renderTooltip(<span id={messageID}>{message}</span>);
|
|
720
|
+
}
|
|
721
|
+
|
|
665
722
|
CheckboxInput.displayName = 'CheckboxInput';
|
|
@@ -234,6 +234,11 @@ export const docs = {
|
|
|
234
234
|
description:
|
|
235
235
|
'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.',
|
|
236
236
|
},
|
|
237
|
+
{
|
|
238
|
+
guidance: true,
|
|
239
|
+
description:
|
|
240
|
+
'Pass an option description that is longer than one line as a node: description={<Text type="supporting">…</Text>}. A string description shows on one line, and the row cuts the remaining text with an ellipsis.',
|
|
241
|
+
},
|
|
237
242
|
{
|
|
238
243
|
guidance: true,
|
|
239
244
|
description:
|
|
@@ -286,6 +291,11 @@ export const docsZh = {
|
|
|
286
291
|
description:
|
|
287
292
|
'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.',
|
|
288
293
|
},
|
|
294
|
+
{
|
|
295
|
+
guidance: true,
|
|
296
|
+
description:
|
|
297
|
+
'Pass an option description that is longer than one line as a node: description={<Text type="supporting">…</Text>}. A string description shows on one line, and the row cuts the remaining text with an ellipsis.',
|
|
298
|
+
},
|
|
289
299
|
{
|
|
290
300
|
guidance: true,
|
|
291
301
|
description:
|
|
@@ -328,6 +338,11 @@ export const docsDense = {
|
|
|
328
338
|
description:
|
|
329
339
|
'Turn on dividers (hasDividers) when items have helper text underneath; without them the labels and descriptions blur together.',
|
|
330
340
|
},
|
|
341
|
+
{
|
|
342
|
+
guidance: true,
|
|
343
|
+
description:
|
|
344
|
+
'Pass an option description that is longer than one line as a node: description={<Text type="supporting">…</Text>}. A string description shows on one line, and the row cuts the remaining text with an ellipsis.',
|
|
345
|
+
},
|
|
331
346
|
{
|
|
332
347
|
guidance: true,
|
|
333
348
|
description:
|
|
@@ -33,7 +33,7 @@ export const docs = {
|
|
|
33
33
|
name: 'description',
|
|
34
34
|
type: 'ReactNode',
|
|
35
35
|
description:
|
|
36
|
-
"Secondary content below the label. String or ReactNode.
|
|
36
|
+
"Secondary content below the label: a string shows on one line and the row cuts long text with an ellipsis, so for full text pass a node, for example description={<Text type=\"supporting\">…</Text>}. String or ReactNode. The description is the checkbox's accessible description through aria-describedby, so assistive technology can tell it is the explanation for that choice.",
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
name: 'endContent',
|
|
@@ -130,7 +130,7 @@ export const docsZh = {
|
|
|
130
130
|
name: 'description',
|
|
131
131
|
type: 'ReactNode',
|
|
132
132
|
description:
|
|
133
|
-
'
|
|
133
|
+
'标签下方的辅助内容:字符串只显示一行,过长时以省略号截断;要显示完整文本,请传入节点,例如 description={<Text type="supporting">…</Text>}。可为字符串或 ReactNode。会通过 aria-describedby 作为复选框的无障碍描述暴露,便于辅助技术识别它是该选项的说明。',
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
name: 'endContent',
|
|
@@ -188,7 +188,7 @@ export const docsDense = {
|
|
|
188
188
|
value:
|
|
189
189
|
'Identity key. Required when parent CheckboxList has a value array (throws without it).',
|
|
190
190
|
description:
|
|
191
|
-
"Secondary content below label. String or ReactNode. Exposed as the checkbox's accessible description via aria-describedby.",
|
|
191
|
+
"Secondary content below label: a string shows on one line (ellipsis); for full text pass a node, e.g. <Text type=\"supporting\">. String or ReactNode. Exposed as the checkbox's accessible description via aria-describedby.",
|
|
192
192
|
endContent: 'Content rendered after label area.',
|
|
193
193
|
isDisabled: 'Whether this individual item is disabled.',
|
|
194
194
|
isLoading:
|
|
@@ -39,6 +39,11 @@ import {
|
|
|
39
39
|
useComponentTranslator,
|
|
40
40
|
} from '../i18n/useComponentTranslator';
|
|
41
41
|
import english from '../i18n/generated-english/Citation/Citation.generated';
|
|
42
|
+
import {devPropError} from '../utils/devWarning';
|
|
43
|
+
|
|
44
|
+
// Bundlers replace this value at build time. The declaration lets a product
|
|
45
|
+
// without Node's types type-check this file.
|
|
46
|
+
declare const process: {readonly env: {readonly NODE_ENV?: string}};
|
|
42
47
|
|
|
43
48
|
registerEnglishFallback(english);
|
|
44
49
|
|
|
@@ -77,7 +82,10 @@ const styles = stylex.create({
|
|
|
77
82
|
display: 'inline-flex',
|
|
78
83
|
alignItems: 'center',
|
|
79
84
|
gap: spacingVars['--spacing-1'],
|
|
80
|
-
|
|
85
|
+
// A flex chip takes its baseline from its first item. An icon has no text
|
|
86
|
+
// baseline, so its bottom edge sat on the line and the chip rode above
|
|
87
|
+
// it. Centred, it sits on the line with or without an icon.
|
|
88
|
+
verticalAlign: 'middle',
|
|
81
89
|
height: spacingVars['--spacing-5'],
|
|
82
90
|
fontSize: typeScaleVars['--text-supporting-size'],
|
|
83
91
|
fontWeight: typeScaleVars['--text-supporting-weight'],
|
|
@@ -194,6 +202,13 @@ export function Citation({
|
|
|
194
202
|
'data-testid': testId,
|
|
195
203
|
...rest
|
|
196
204
|
}: CitationProps): React.ReactElement {
|
|
205
|
+
if (process.env.NODE_ENV !== 'production' && source == null) {
|
|
206
|
+
throw devPropError(
|
|
207
|
+
'Citation',
|
|
208
|
+
'source',
|
|
209
|
+
"is required, for example source={{title: 'Annual report', url: 'https://example.com/report'}}. Citation does not read children.",
|
|
210
|
+
);
|
|
211
|
+
}
|
|
197
212
|
const t = useComponentTranslator();
|
|
198
213
|
const title = source.title ?? String(number);
|
|
199
214
|
const href =
|
package/src/Code/Code.tsx
CHANGED
|
@@ -112,6 +112,9 @@ export function Code({
|
|
|
112
112
|
return (
|
|
113
113
|
<code
|
|
114
114
|
ref={ref}
|
|
115
|
+
// Code keeps its own direction inside right-to-left text; a caller can
|
|
116
|
+
// still pass another dir.
|
|
117
|
+
dir="ltr"
|
|
115
118
|
{...props}
|
|
116
119
|
{...mergeProps(
|
|
117
120
|
themeProps('code', {color, size}),
|
|
@@ -224,6 +224,13 @@ export const docs = {
|
|
|
224
224
|
default: '2ch',
|
|
225
225
|
private: true,
|
|
226
226
|
},
|
|
227
|
+
{
|
|
228
|
+
name: '--_codeblock-direction',
|
|
229
|
+
description:
|
|
230
|
+
"The page's direction where the block sits, so the gutter, its divider and the diff marker mirror with the page while the code viewport stays left to right.",
|
|
231
|
+
default: 'ltr',
|
|
232
|
+
private: true,
|
|
233
|
+
},
|
|
227
234
|
],
|
|
228
235
|
componentIcons: [
|
|
229
236
|
{
|