@vjdesigns/vjdesigns-ui 3.3.0 → 3.5.0
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 +169 -0
- package/README.md +854 -864
- package/dist/components/data-display/Accordion/Accordion.mjs +97 -166
- package/dist/components/data-display/Chat/Chat.d.ts +13 -2
- package/dist/components/data-display/Collapsible/Collapsible.d.ts +70 -0
- package/dist/components/data-display/Collapsible/Collapsible.mjs +102 -0
- package/dist/components/data-display/Collapsible/Collapsible.module.css.mjs +8 -0
- package/dist/components/data-display/Collapsible/index.d.ts +1 -0
- package/dist/components/feedback/Progress/Progress.d.ts +32 -2
- package/dist/components/feedback/Progress/Progress.mjs +78 -74
- package/dist/components/feedback/Progress/Progress.module.css.mjs +1 -1
- package/dist/components/forms/CheckBox/CheckBox.mjs +171 -135
- package/dist/components/forms/CheckBox/CheckBox.module.css.mjs +5 -3
- package/dist/components/forms/Radio/Radio.mjs +12 -10
- package/dist/components/forms/ToggleGroup/ToggleGroup.mjs +133 -131
- package/dist/components/navigation/Toolbar/Toolbar.mjs +106 -0
- package/dist/components/navigation/Toolbar/Toolbar.module.css.mjs +11 -0
- package/dist/components/navigation/Toolbar/ToolbarContext.mjs +4 -0
- package/dist/components/navigation/Toolbar/index.d.ts +1 -0
- package/dist/components/primitives/CopyButton/CopyButton.d.ts +39 -0
- package/dist/components/primitives/CopyButton/CopyButton.mjs +49 -0
- package/dist/components/primitives/CopyButton/index.d.ts +1 -0
- package/dist/hooks/useCollapsePresence.mjs +83 -0
- package/dist/i18n/en.mjs +5 -0
- package/dist/index.mjs +104 -101
- package/dist/locales/ar.mjs +5 -0
- package/dist/locales/bn.mjs +5 -0
- package/dist/locales/cs.mjs +5 -0
- package/dist/locales/da.mjs +5 -0
- package/dist/locales/de.mjs +5 -0
- package/dist/locales/el.mjs +5 -0
- package/dist/locales/es.mjs +5 -0
- package/dist/locales/fa.mjs +5 -0
- package/dist/locales/fi.mjs +5 -0
- package/dist/locales/fr.mjs +5 -0
- package/dist/locales/he.mjs +5 -0
- package/dist/locales/hi.mjs +5 -0
- package/dist/locales/hu.mjs +5 -0
- package/dist/locales/id.mjs +5 -0
- package/dist/locales/it.mjs +5 -0
- package/dist/locales/ja.mjs +5 -0
- package/dist/locales/ko.mjs +5 -0
- package/dist/locales/nb.mjs +5 -0
- package/dist/locales/nl.mjs +5 -0
- package/dist/locales/pl.mjs +5 -0
- package/dist/locales/pt-BR.mjs +5 -0
- package/dist/locales/ro.mjs +5 -0
- package/dist/locales/ru.mjs +5 -0
- package/dist/locales/sv.mjs +5 -0
- package/dist/locales/th.mjs +5 -0
- package/dist/locales/tr.mjs +5 -0
- package/dist/locales/uk.mjs +5 -0
- package/dist/locales/ur.mjs +5 -0
- package/dist/locales/vi.mjs +5 -0
- package/dist/locales/zh-Hans.mjs +5 -0
- package/dist/locales/zh-Hant.mjs +5 -0
- package/dist/vjdesigns-ui.css +1 -1
- package/package.json +7 -5
- package/dist/ai/llms-full.txt +0 -8498
- package/dist/ai/llms.txt +0 -198
- package/dist/ai/mcp-server.mjs +0 -212
- package/dist/ai/registry.json +0 -21048
- package/dist/components/data-display/Accordion/Accordion.cjs.js +0 -1
- package/dist/components/data-display/Accordion/Accordion.module.css.cjs.js +0 -1
- package/dist/components/data-display/Avatar/Avatar.cjs.js +0 -1
- package/dist/components/data-display/Avatar/Avatar.module.css.cjs.js +0 -1
- package/dist/components/data-display/Badge/Badge.cjs.js +0 -1
- package/dist/components/data-display/Badge/Badge.module.css.cjs.js +0 -1
- package/dist/components/data-display/Card/Card.cjs.js +0 -1
- package/dist/components/data-display/Card/Card.module.css.cjs.js +0 -1
- package/dist/components/data-display/Carousel/Carousel.cjs.js +0 -1
- package/dist/components/data-display/Carousel/Carousel.module.css.cjs.js +0 -1
- package/dist/components/data-display/Chat/Chat.cjs.js +0 -1
- package/dist/components/data-display/Chat/Chat.module.css.cjs.js +0 -1
- package/dist/components/data-display/Chat/streams.cjs.js +0 -4
- package/dist/components/data-display/Chip/Chip.cjs.js +0 -1
- package/dist/components/data-display/Chip/Chip.module.css.cjs.js +0 -1
- package/dist/components/data-display/CodeBlock/CodeBlock.cjs.js +0 -6
- package/dist/components/data-display/CodeBlock/CodeBlock.module.css.cjs.js +0 -1
- package/dist/components/data-display/CodeBlock/tokenize.cjs.js +0 -13
- package/dist/components/data-display/CodeBlock/tokenize.d.ts +0 -26
- package/dist/components/data-display/Countdown/Countdown.cjs.js +0 -1
- package/dist/components/data-display/Countdown/Countdown.module.css.cjs.js +0 -1
- package/dist/components/data-display/DataGrid/DataGrid.cjs.js +0 -1
- package/dist/components/data-display/DataGrid/DataGrid.module.css.cjs.js +0 -1
- package/dist/components/data-display/DataGrid/dataGridUtils.cjs.js +0 -1
- package/dist/components/data-display/DataGrid/dataGridUtils.d.ts +0 -46
- package/dist/components/data-display/EmptyState/EmptyState.cjs.js +0 -1
- package/dist/components/data-display/EmptyState/EmptyState.module.css.cjs.js +0 -1
- package/dist/components/data-display/Image/Image.cjs.js +0 -1
- package/dist/components/data-display/Image/Image.module.css.cjs.js +0 -1
- package/dist/components/data-display/List/List.cjs.js +0 -1
- package/dist/components/data-display/List/List.module.css.cjs.js +0 -1
- package/dist/components/data-display/Stat/Stat.cjs.js +0 -1
- package/dist/components/data-display/Stat/Stat.module.css.cjs.js +0 -1
- package/dist/components/data-display/Table/Table.cjs.js +0 -1
- package/dist/components/data-display/Table/Table.module.css.cjs.js +0 -1
- package/dist/components/data-display/Table/useTable.cjs.js +0 -1
- package/dist/components/data-display/Table/useTable.d.ts +0 -118
- package/dist/components/data-display/Timeline/Timeline.cjs.js +0 -1
- package/dist/components/data-display/Timeline/Timeline.module.css.cjs.js +0 -1
- package/dist/components/data-display/TreeView/TreeView.cjs.js +0 -1
- package/dist/components/data-display/TreeView/TreeView.module.css.cjs.js +0 -1
- package/dist/components/data-display/TreeView/treeUtils.cjs.js +0 -1
- package/dist/components/data-display/TreeView/treeUtils.d.ts +0 -82
- package/dist/components/data-display/VirtualList/VirtualList.cjs.js +0 -1
- package/dist/components/data-display/VirtualList/VirtualList.module.css.cjs.js +0 -1
- package/dist/components/feedback/Alert/Alert.cjs.js +0 -1
- package/dist/components/feedback/Alert/Alert.module.css.cjs.js +0 -1
- package/dist/components/feedback/Banner/Banner.cjs.js +0 -1
- package/dist/components/feedback/Banner/Banner.module.css.cjs.js +0 -1
- package/dist/components/feedback/ErrorSummary/ErrorSummary.cjs.js +0 -1
- package/dist/components/feedback/ErrorSummary/ErrorSummary.module.css.cjs.js +0 -1
- package/dist/components/feedback/Progress/Progress.cjs.js +0 -1
- package/dist/components/feedback/Progress/Progress.module.css.cjs.js +0 -1
- package/dist/components/feedback/Skeleton/Skeleton.cjs.js +0 -1
- package/dist/components/feedback/Skeleton/Skeleton.module.css.cjs.js +0 -1
- package/dist/components/feedback/Spinner/Spinner.cjs.js +0 -1
- package/dist/components/feedback/Spinner/Spinner.module.css.cjs.js +0 -1
- package/dist/components/feedback/Toast/Toast.cjs.js +0 -1
- package/dist/components/feedback/Toast/Toast.module.css.cjs.js +0 -1
- package/dist/components/feedback/Toast/Toast.storyHelpers.d.ts +0 -21
- package/dist/components/feedback/Toast/ToastItem.cjs.js +0 -1
- package/dist/components/feedback/Toast/ToastItem.d.ts +0 -18
- package/dist/components/feedback/Toast/ToastProvider.cjs.js +0 -1
- package/dist/components/feedback/Toast/ToastViewport.cjs.js +0 -1
- package/dist/components/feedback/Toast/ToastViewport.d.ts +0 -25
- package/dist/components/feedback/Toast/toastStore.cjs.js +0 -1
- package/dist/components/feedback/Toast/toastTiming.cjs.js +0 -1
- package/dist/components/feedback/Toast/toastTypes.d.ts +0 -136
- package/dist/components/feedback/Toast/useToast.cjs.js +0 -1
- package/dist/components/feedback/Toast/useToastAnnouncer.cjs.js +0 -1
- package/dist/components/feedback/Toast/useToastAnnouncer.d.ts +0 -15
- package/dist/components/forms/CheckBox/CheckBox.cjs.js +0 -1
- package/dist/components/forms/CheckBox/CheckBox.d.ts +0 -79
- package/dist/components/forms/CheckBox/CheckBox.module.css.cjs.js +0 -1
- package/dist/components/forms/ColorPicker/ColorInput.cjs.js +0 -1
- package/dist/components/forms/ColorPicker/ColorInput.d.ts +0 -38
- package/dist/components/forms/ColorPicker/ColorPicker.cjs.js +0 -1
- package/dist/components/forms/ColorPicker/ColorPicker.d.ts +0 -129
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.cjs.js +0 -1
- package/dist/components/forms/ColorPicker/colorUtils.cjs.js +0 -1
- package/dist/components/forms/ColorPicker/colorUtils.d.ts +0 -86
- package/dist/components/forms/Combobox/Combobox.cjs.js +0 -1
- package/dist/components/forms/Combobox/Combobox.d.ts +0 -172
- package/dist/components/forms/Combobox/Combobox.module.css.cjs.js +0 -1
- package/dist/components/forms/Combobox/ComboboxPopup.cjs.js +0 -1
- package/dist/components/forms/Combobox/ComboboxPopup.d.ts +0 -40
- package/dist/components/forms/Combobox/comboboxUtils.cjs.js +0 -1
- package/dist/components/forms/Combobox/comboboxUtils.d.ts +0 -73
- package/dist/components/forms/DatePicker/Calendar.cjs.js +0 -1
- package/dist/components/forms/DatePicker/Calendar.d.ts +0 -98
- package/dist/components/forms/DatePicker/Calendar.module.css.cjs.js +0 -1
- package/dist/components/forms/DatePicker/DatePicker.cjs.js +0 -1
- package/dist/components/forms/DatePicker/DatePicker.d.ts +0 -100
- package/dist/components/forms/DatePicker/DatePicker.module.css.cjs.js +0 -1
- package/dist/components/forms/DatePicker/DateRangePicker.cjs.js +0 -1
- package/dist/components/forms/DatePicker/DateRangePicker.d.ts +0 -124
- package/dist/components/forms/DatePicker/DateRangePicker.module.css.cjs.js +0 -1
- package/dist/components/forms/DatePicker/dateUtils.cjs.js +0 -1
- package/dist/components/forms/DatePicker/dateUtils.d.ts +0 -88
- package/dist/components/forms/DateTimePicker/DateTimePicker.cjs.js +0 -1
- package/dist/components/forms/DateTimePicker/DateTimePicker.d.ts +0 -101
- package/dist/components/forms/DateTimePicker/DateTimePicker.module.css.cjs.js +0 -1
- package/dist/components/forms/Field/Field.cjs.js +0 -1
- package/dist/components/forms/Field/Field.d.ts +0 -171
- package/dist/components/forms/Field/Field.module.css.cjs.js +0 -1
- package/dist/components/forms/Field/FieldContext.cjs.js +0 -1
- package/dist/components/forms/Field/FieldContext.d.ts +0 -74
- package/dist/components/forms/FileUpload/FileUpload.cjs.js +0 -1
- package/dist/components/forms/FileUpload/FileUpload.d.ts +0 -153
- package/dist/components/forms/FileUpload/FileUpload.module.css.cjs.js +0 -1
- package/dist/components/forms/Input/Input.cjs.js +0 -1
- package/dist/components/forms/Input/Input.d.ts +0 -98
- package/dist/components/forms/Input/Input.module.css.cjs.js +0 -1
- package/dist/components/forms/NumberInput/NumberInput.cjs.js +0 -1
- package/dist/components/forms/NumberInput/NumberInput.d.ts +0 -87
- package/dist/components/forms/NumberInput/NumberInput.module.css.cjs.js +0 -1
- package/dist/components/forms/PasswordInput/PasswordInput.cjs.js +0 -1
- package/dist/components/forms/PasswordInput/PasswordInput.d.ts +0 -117
- package/dist/components/forms/PasswordInput/PasswordInput.module.css.cjs.js +0 -1
- package/dist/components/forms/PinInput/PinInput.cjs.js +0 -1
- package/dist/components/forms/PinInput/PinInput.d.ts +0 -92
- package/dist/components/forms/PinInput/PinInput.module.css.cjs.js +0 -1
- package/dist/components/forms/Radio/Radio.cjs.js +0 -1
- package/dist/components/forms/Radio/Radio.d.ts +0 -119
- package/dist/components/forms/Radio/Radio.module.css.cjs.js +0 -1
- package/dist/components/forms/Rating/Rating.cjs.js +0 -1
- package/dist/components/forms/Rating/Rating.d.ts +0 -128
- package/dist/components/forms/Rating/Rating.module.css.cjs.js +0 -1
- package/dist/components/forms/SearchInput/SearchInput.cjs.js +0 -1
- package/dist/components/forms/SearchInput/SearchInput.d.ts +0 -124
- package/dist/components/forms/SearchInput/SearchInput.module.css.cjs.js +0 -1
- package/dist/components/forms/SegmentedControl/SegmentedControl.cjs.js +0 -1
- package/dist/components/forms/SegmentedControl/SegmentedControl.d.ts +0 -120
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.cjs.js +0 -1
- package/dist/components/forms/Select/Select.cjs.js +0 -1
- package/dist/components/forms/Select/Select.d.ts +0 -86
- package/dist/components/forms/Select/Select.module.css.cjs.js +0 -1
- package/dist/components/forms/Slider/Slider.cjs.js +0 -1
- package/dist/components/forms/Slider/Slider.d.ts +0 -84
- package/dist/components/forms/Slider/Slider.module.css.cjs.js +0 -1
- package/dist/components/forms/Switch/Switch.cjs.js +0 -1
- package/dist/components/forms/Switch/Switch.d.ts +0 -62
- package/dist/components/forms/Switch/Switch.module.css.cjs.js +0 -1
- package/dist/components/forms/TagInput/TagInput.cjs.js +0 -1
- package/dist/components/forms/TagInput/TagInput.d.ts +0 -144
- package/dist/components/forms/TagInput/TagInput.module.css.cjs.js +0 -1
- package/dist/components/forms/Textarea/Textarea.cjs.js +0 -1
- package/dist/components/forms/Textarea/Textarea.d.ts +0 -62
- package/dist/components/forms/Textarea/Textarea.module.css.cjs.js +0 -1
- package/dist/components/forms/TimePicker/TimePicker.cjs.js +0 -1
- package/dist/components/forms/TimePicker/TimePicker.d.ts +0 -116
- package/dist/components/forms/TimePicker/TimePicker.module.css.cjs.js +0 -1
- package/dist/components/forms/TimePicker/timeUtils.cjs.js +0 -1
- package/dist/components/forms/TimePicker/timeUtils.d.ts +0 -26
- package/dist/components/forms/ToggleGroup/ToggleGroup.cjs.js +0 -1
- package/dist/components/forms/ToggleGroup/ToggleGroup.d.ts +0 -153
- package/dist/components/forms/ToggleGroup/ToggleGroup.module.css.cjs.js +0 -1
- package/dist/components/layout/Box/Box.cjs.js +0 -1
- package/dist/components/layout/Box/Box.module.css.cjs.js +0 -1
- package/dist/components/layout/Container/Container.cjs.js +0 -1
- package/dist/components/layout/Container/Container.module.css.cjs.js +0 -1
- package/dist/components/layout/Divider/Divider.cjs.js +0 -1
- package/dist/components/layout/Divider/Divider.module.css.cjs.js +0 -1
- package/dist/components/layout/Flex/Flex.cjs.js +0 -1
- package/dist/components/layout/Flex/Flex.module.css.cjs.js +0 -1
- package/dist/components/layout/Grid/Grid.cjs.js +0 -1
- package/dist/components/layout/Grid/Grid.module.css.cjs.js +0 -1
- package/dist/components/layout/ResizablePanels/ResizablePanels.cjs.js +0 -1
- package/dist/components/layout/ResizablePanels/ResizablePanels.module.css.cjs.js +0 -1
- package/dist/components/layout/ScrollArea/ScrollArea.cjs.js +0 -1
- package/dist/components/layout/ScrollArea/ScrollArea.module.css.cjs.js +0 -1
- package/dist/components/layout/Stack/Stack.cjs.js +0 -1
- package/dist/components/layout/Stack/Stack.module.css.cjs.js +0 -1
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.cjs.js +0 -1
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.module.css.cjs.js +0 -1
- package/dist/components/navigation/ContextMenu/ContextMenu.cjs.js +0 -1
- package/dist/components/navigation/ContextMenu/ContextMenu.module.css.cjs.js +0 -1
- package/dist/components/navigation/Link/Link.cjs.js +0 -1
- package/dist/components/navigation/Link/Link.module.css.cjs.js +0 -1
- package/dist/components/navigation/Menu/Menu.cjs.js +0 -1
- package/dist/components/navigation/Menu/Menu.module.css.cjs.js +0 -1
- package/dist/components/navigation/Menu/MenuContent.cjs.js +0 -1
- package/dist/components/navigation/Menu/MenuContent.d.ts +0 -46
- package/dist/components/navigation/Menu/MenuContext.cjs.js +0 -1
- package/dist/components/navigation/Menu/MenuContext.d.ts +0 -84
- package/dist/components/navigation/Menu/MenuItem.cjs.js +0 -1
- package/dist/components/navigation/Menu/MenuItem.d.ts +0 -133
- package/dist/components/navigation/Menu/MenuSub.cjs.js +0 -1
- package/dist/components/navigation/Menu/MenuSub.d.ts +0 -28
- package/dist/components/navigation/Menu/useMenuRoot.cjs.js +0 -1
- package/dist/components/navigation/Menu/useMenuRoot.d.ts +0 -14
- package/dist/components/navigation/Navbar/Navbar.cjs.js +0 -1
- package/dist/components/navigation/Navbar/Navbar.module.css.cjs.js +0 -1
- package/dist/components/navigation/Pagination/Pagination.cjs.js +0 -1
- package/dist/components/navigation/Pagination/Pagination.d.ts +0 -97
- package/dist/components/navigation/Pagination/Pagination.module.css.cjs.js +0 -1
- package/dist/components/navigation/Sidebar/Sidebar.cjs.js +0 -1
- package/dist/components/navigation/Sidebar/Sidebar.module.css.cjs.js +0 -1
- package/dist/components/navigation/Sidebar/Sidebar.storyHelpers.d.ts +0 -27
- package/dist/components/navigation/Sidebar/SidebarContext.cjs.js +0 -1
- package/dist/components/navigation/Sidebar/SidebarContext.d.ts +0 -45
- package/dist/components/navigation/Sidebar/SidebarParts.cjs.js +0 -1
- package/dist/components/navigation/Sidebar/SidebarParts.d.ts +0 -179
- package/dist/components/navigation/SkipLink/SkipLink.cjs.js +0 -1
- package/dist/components/navigation/SkipLink/SkipLink.d.ts +0 -41
- package/dist/components/navigation/SkipLink/SkipLink.module.css.cjs.js +0 -1
- package/dist/components/navigation/Stepper/Stepper.cjs.js +0 -1
- package/dist/components/navigation/Stepper/Stepper.module.css.cjs.js +0 -1
- package/dist/components/navigation/Tabs/Tabs.cjs.js +0 -1
- package/dist/components/navigation/Tabs/Tabs.d.ts +0 -132
- package/dist/components/navigation/Tabs/Tabs.module.css.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/CommandPalette.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/CommandPalette.module.css.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/CommandPaletteContext.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/CommandPaletteContext.d.ts +0 -96
- package/dist/components/overlays/CommandPalette/CommandPaletteParts.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/CommandPaletteParts.d.ts +0 -115
- package/dist/components/overlays/CommandPalette/commandPaletteUtils.cjs.js +0 -1
- package/dist/components/overlays/CommandPalette/commandPaletteUtils.d.ts +0 -50
- package/dist/components/overlays/Drawer/Drawer.cjs.js +0 -1
- package/dist/components/overlays/Drawer/Drawer.module.css.cjs.js +0 -1
- package/dist/components/overlays/Drawer/Drawer.storyHelpers.d.ts +0 -16
- package/dist/components/overlays/Drawer/DrawerContent.cjs.js +0 -1
- package/dist/components/overlays/Drawer/DrawerContent.d.ts +0 -27
- package/dist/components/overlays/Drawer/DrawerContext.cjs.js +0 -1
- package/dist/components/overlays/Drawer/DrawerContext.d.ts +0 -39
- package/dist/components/overlays/Drawer/DrawerParts.cjs.js +0 -1
- package/dist/components/overlays/Drawer/DrawerParts.d.ts +0 -65
- package/dist/components/overlays/Drawer/internal.cjs.js +0 -1
- package/dist/components/overlays/Drawer/internal.d.ts +0 -1
- package/dist/components/overlays/Drawer/useDragToClose.cjs.js +0 -1
- package/dist/components/overlays/Drawer/useDragToClose.d.ts +0 -28
- package/dist/components/overlays/HoverCard/HoverCard.cjs.js +0 -1
- package/dist/components/overlays/HoverCard/HoverCard.module.css.cjs.js +0 -1
- package/dist/components/overlays/Modal/ConfirmModal.cjs.js +0 -1
- package/dist/components/overlays/Modal/Modal.cjs.js +0 -1
- package/dist/components/overlays/Modal/Modal.module.css.cjs.js +0 -1
- package/dist/components/overlays/Modal/ModalContent.cjs.js +0 -1
- package/dist/components/overlays/Modal/ModalContent.d.ts +0 -12
- package/dist/components/overlays/Modal/ModalContext.cjs.js +0 -1
- package/dist/components/overlays/Modal/ModalContext.d.ts +0 -56
- package/dist/components/overlays/Modal/useScrollRegion.cjs.js +0 -1
- package/dist/components/overlays/Modal/useScrollRegion.d.ts +0 -7
- package/dist/components/overlays/Popover/Popover.cjs.js +0 -1
- package/dist/components/overlays/Popover/Popover.module.css.cjs.js +0 -1
- package/dist/components/overlays/Popover/PopoverContent.cjs.js +0 -1
- package/dist/components/overlays/Popover/PopoverContent.d.ts +0 -41
- package/dist/components/overlays/Popover/PopoverContext.cjs.js +0 -1
- package/dist/components/overlays/Popover/PopoverContext.d.ts +0 -38
- package/dist/components/overlays/Tooltip/Tooltip.cjs.js +0 -1
- package/dist/components/overlays/Tooltip/Tooltip.module.css.cjs.js +0 -1
- package/dist/components/primitives/Button/Button.cjs.js +0 -1
- package/dist/components/primitives/Button/Button.module.css.cjs.js +0 -1
- package/dist/components/primitives/Icon/Icon.cjs.js +0 -1
- package/dist/components/primitives/Icon/Icon.module.css.cjs.js +0 -1
- package/dist/components/primitives/Icon/IconSvg.cjs.js +0 -1
- package/dist/components/primitives/Icon/IconSvg.d.ts +0 -31
- package/dist/components/primitives/Icon/icons.cjs.js +0 -1
- package/dist/components/primitives/Kbd/Kbd.cjs.js +0 -1
- package/dist/components/primitives/Kbd/Kbd.module.css.cjs.js +0 -1
- package/dist/components/primitives/Typography/Typography.cjs.js +0 -1
- package/dist/components/primitives/Typography/Typography.module.css.cjs.js +0 -1
- package/dist/components/utilities/LocaleProvider/LocaleProvider.cjs.js +0 -1
- package/dist/components/utilities/LocaleProvider/LocaleProvider.module.css.cjs.js +0 -1
- package/dist/components/utilities/Portal/Portal.cjs.js +0 -1
- package/dist/components/utilities/Theme/Theme.cjs.js +0 -1
- package/dist/components/utilities/Theme/Theme.module.css.cjs.js +0 -1
- package/dist/components/utilities/VisuallyHidden/VisuallyHidden.cjs.js +0 -1
- package/dist/components/utilities/VisuallyHidden/VisuallyHidden.module.css.cjs.js +0 -1
- package/dist/hooks/elementSource.cjs.js +0 -1
- package/dist/hooks/elementSource.d.ts +0 -16
- package/dist/hooks/index.d.ts +0 -21
- package/dist/hooks/useClipboard.cjs.js +0 -1
- package/dist/hooks/useClipboard.d.ts +0 -24
- package/dist/hooks/useControllableState.cjs.js +0 -1
- package/dist/hooks/useControllableState.d.ts +0 -15
- package/dist/hooks/useDisclosure.cjs.js +0 -1
- package/dist/hooks/useDisclosure.d.ts +0 -35
- package/dist/hooks/useDismiss.cjs.js +0 -1
- package/dist/hooks/useDismiss.d.ts +0 -33
- package/dist/hooks/useElementObservers.cjs.js +0 -1
- package/dist/hooks/useElementObservers.d.ts +0 -70
- package/dist/hooks/useEnvironment.cjs.js +0 -1
- package/dist/hooks/useEnvironment.d.ts +0 -42
- package/dist/hooks/useFloatingPosition.cjs.js +0 -1
- package/dist/hooks/useFloatingPosition.d.ts +0 -55
- package/dist/hooks/useFocusTrap.cjs.js +0 -1
- package/dist/hooks/useFocusTrap.d.ts +0 -52
- package/dist/hooks/useFormReset.cjs.js +0 -1
- package/dist/hooks/useFormReset.d.ts +0 -17
- package/dist/hooks/useFormValidation.cjs.js +0 -1
- package/dist/hooks/useFormValidation.d.ts +0 -101
- package/dist/hooks/useHotkeys.cjs.js +0 -1
- package/dist/hooks/useHotkeys.d.ts +0 -50
- package/dist/hooks/useInertOutside.cjs.js +0 -1
- package/dist/hooks/useInertOutside.d.ts +0 -23
- package/dist/hooks/useMediaQuery.cjs.js +0 -1
- package/dist/hooks/useMediaQuery.d.ts +0 -11
- package/dist/hooks/useMergedRef.cjs.js +0 -1
- package/dist/hooks/useMergedRef.d.ts +0 -7
- package/dist/hooks/useOverlayLayer.cjs.js +0 -1
- package/dist/hooks/useOverlayLayer.d.ts +0 -92
- package/dist/hooks/useResponsiveValue.cjs.js +0 -1
- package/dist/hooks/useResponsiveValue.d.ts +0 -10
- package/dist/hooks/useScrollLock.cjs.js +0 -1
- package/dist/hooks/useScrollLock.d.ts +0 -4
- package/dist/hooks/useStorage.cjs.js +0 -1
- package/dist/hooks/useStorage.d.ts +0 -21
- package/dist/hooks/useTiming.cjs.js +0 -1
- package/dist/hooks/useTiming.d.ts +0 -78
- package/dist/hooks/useVirtualizer.cjs.js +0 -1
- package/dist/hooks/useVirtualizer.d.ts +0 -90
- package/dist/i18n/en.cjs.js +0 -1
- package/dist/i18n/en.d.ts +0 -3
- package/dist/i18n/index.d.ts +0 -4
- package/dist/i18n/locales/ar.d.ts +0 -3
- package/dist/i18n/locales/bn.d.ts +0 -3
- package/dist/i18n/locales/cs.d.ts +0 -3
- package/dist/i18n/locales/da.d.ts +0 -3
- package/dist/i18n/locales/de.d.ts +0 -3
- package/dist/i18n/locales/el.d.ts +0 -3
- package/dist/i18n/locales/es.d.ts +0 -3
- package/dist/i18n/locales/fa.d.ts +0 -3
- package/dist/i18n/locales/fi.d.ts +0 -3
- package/dist/i18n/locales/fr.d.ts +0 -3
- package/dist/i18n/locales/he.d.ts +0 -3
- package/dist/i18n/locales/hi.d.ts +0 -3
- package/dist/i18n/locales/hu.d.ts +0 -3
- package/dist/i18n/locales/id.d.ts +0 -3
- package/dist/i18n/locales/it.d.ts +0 -3
- package/dist/i18n/locales/ja.d.ts +0 -3
- package/dist/i18n/locales/ko.d.ts +0 -3
- package/dist/i18n/locales/nb.d.ts +0 -3
- package/dist/i18n/locales/nl.d.ts +0 -3
- package/dist/i18n/locales/pl.d.ts +0 -3
- package/dist/i18n/locales/pt-BR.d.ts +0 -3
- package/dist/i18n/locales/ro.d.ts +0 -3
- package/dist/i18n/locales/ru.d.ts +0 -3
- package/dist/i18n/locales/sv.d.ts +0 -3
- package/dist/i18n/locales/th.d.ts +0 -3
- package/dist/i18n/locales/tr.d.ts +0 -3
- package/dist/i18n/locales/uk.d.ts +0 -3
- package/dist/i18n/locales/ur.d.ts +0 -3
- package/dist/i18n/locales/vi.d.ts +0 -3
- package/dist/i18n/locales/zh-Hans.d.ts +0 -3
- package/dist/i18n/locales/zh-Hant.d.ts +0 -3
- package/dist/i18n/merge.cjs.js +0 -1
- package/dist/i18n/merge.d.ts +0 -6
- package/dist/i18n/plural.cjs.js +0 -1
- package/dist/i18n/plural.d.ts +0 -45
- package/dist/i18n/types.d.ts +0 -1160
- package/dist/index.cjs.js +0 -1
- package/dist/index.d.ts +0 -83
- package/dist/locales/ar.cjs.js +0 -1
- package/dist/locales/ar.d.ts +0 -6
- package/dist/locales/bn.cjs.js +0 -1
- package/dist/locales/bn.d.ts +0 -6
- package/dist/locales/cs.cjs.js +0 -1
- package/dist/locales/cs.d.ts +0 -6
- package/dist/locales/da.cjs.js +0 -1
- package/dist/locales/da.d.ts +0 -6
- package/dist/locales/de.cjs.js +0 -1
- package/dist/locales/de.d.ts +0 -6
- package/dist/locales/el.cjs.js +0 -1
- package/dist/locales/el.d.ts +0 -6
- package/dist/locales/es.cjs.js +0 -1
- package/dist/locales/es.d.ts +0 -6
- package/dist/locales/fa.cjs.js +0 -1
- package/dist/locales/fa.d.ts +0 -6
- package/dist/locales/fi.cjs.js +0 -1
- package/dist/locales/fi.d.ts +0 -6
- package/dist/locales/fr.cjs.js +0 -1
- package/dist/locales/fr.d.ts +0 -6
- package/dist/locales/he.cjs.js +0 -1
- package/dist/locales/he.d.ts +0 -6
- package/dist/locales/hi.cjs.js +0 -1
- package/dist/locales/hi.d.ts +0 -6
- package/dist/locales/hu.cjs.js +0 -1
- package/dist/locales/hu.d.ts +0 -6
- package/dist/locales/id.cjs.js +0 -1
- package/dist/locales/id.d.ts +0 -6
- package/dist/locales/it.cjs.js +0 -1
- package/dist/locales/it.d.ts +0 -6
- package/dist/locales/ja.cjs.js +0 -1
- package/dist/locales/ja.d.ts +0 -6
- package/dist/locales/ko.cjs.js +0 -1
- package/dist/locales/ko.d.ts +0 -6
- package/dist/locales/nb.cjs.js +0 -1
- package/dist/locales/nb.d.ts +0 -6
- package/dist/locales/nl.cjs.js +0 -1
- package/dist/locales/nl.d.ts +0 -6
- package/dist/locales/pl.cjs.js +0 -1
- package/dist/locales/pl.d.ts +0 -6
- package/dist/locales/pt-BR.cjs.js +0 -1
- package/dist/locales/pt-BR.d.ts +0 -6
- package/dist/locales/ro.cjs.js +0 -1
- package/dist/locales/ro.d.ts +0 -6
- package/dist/locales/ru.cjs.js +0 -1
- package/dist/locales/ru.d.ts +0 -6
- package/dist/locales/sv.cjs.js +0 -1
- package/dist/locales/sv.d.ts +0 -6
- package/dist/locales/th.cjs.js +0 -1
- package/dist/locales/th.d.ts +0 -6
- package/dist/locales/tr.cjs.js +0 -1
- package/dist/locales/tr.d.ts +0 -6
- package/dist/locales/uk.cjs.js +0 -1
- package/dist/locales/uk.d.ts +0 -6
- package/dist/locales/ur.cjs.js +0 -1
- package/dist/locales/ur.d.ts +0 -6
- package/dist/locales/vi.cjs.js +0 -1
- package/dist/locales/vi.d.ts +0 -6
- package/dist/locales/zh-Hans.cjs.js +0 -1
- package/dist/locales/zh-Hans.d.ts +0 -6
- package/dist/locales/zh-Hant.cjs.js +0 -1
- package/dist/locales/zh-Hant.d.ts +0 -6
- package/dist/types/common.cjs.js +0 -1
- package/dist/types/common.d.ts +0 -31
- package/dist/types/style.d.ts +0 -7
- package/dist/utils/announce.cjs.js +0 -1
- package/dist/utils/announce.d.ts +0 -1
- package/dist/utils/brandPalette.cjs.js +0 -3
- package/dist/utils/brandPalette.d.ts +0 -146
- package/dist/utils/clipboard.cjs.js +0 -1
- package/dist/utils/clipboard.d.ts +0 -6
- package/dist/utils/cx.cjs.js +0 -1
- package/dist/utils/cx.d.ts +0 -2
- package/dist/utils/fillSlot.cjs.js +0 -1
- package/dist/utils/fillSlot.d.ts +0 -9
- package/dist/utils/flattenChildren.cjs.js +0 -1
- package/dist/utils/flattenChildren.d.ts +0 -8
- package/dist/utils/hotkeys.cjs.js +0 -1
- package/dist/utils/hotkeys.d.ts +0 -27
- package/dist/utils/index.d.ts +0 -11
- package/dist/utils/intl.cjs.js +0 -1
- package/dist/utils/intl.d.ts +0 -10
- package/dist/utils/refs.cjs.js +0 -1
- package/dist/utils/refs.d.ts +0 -15
- package/dist/utils/responsive.cjs.js +0 -1
- package/dist/utils/responsive.d.ts +0 -43
- package/dist/utils/slot.cjs.js +0 -1
- package/dist/utils/slot.d.ts +0 -11
- package/dist/utils/validators.cjs.js +0 -1
- package/dist/utils/validators.d.ts +0 -72
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import o from "
|
|
7
|
-
import
|
|
2
|
+
import { useCollapsePresence as e } from "../../../hooks/useCollapsePresence.mjs";
|
|
3
|
+
import { useMergedRef as t } from "../../../hooks/useMergedRef.mjs";
|
|
4
|
+
import { cx as n } from "../../../utils/cx.mjs";
|
|
5
|
+
import { useControllableState as r } from "../../../hooks/useControllableState.mjs";
|
|
6
|
+
import { ChevronDownIcon as i, MinusIcon as a, PlusIcon as o } from "../../primitives/Icon/icons.mjs";
|
|
7
|
+
import s from "./Accordion.module.css.mjs";
|
|
8
|
+
import { createContext as c, isValidElement as l, useCallback as u, useContext as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
8
9
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
|
-
import { flushSync as y } from "react-dom";
|
|
10
10
|
// src/components/data-display/Accordion/Accordion.tsx
|
|
11
|
-
var
|
|
12
|
-
separated:
|
|
13
|
-
contained:
|
|
14
|
-
flush:
|
|
11
|
+
var y = 6, b = {
|
|
12
|
+
separated: s.separated,
|
|
13
|
+
contained: s.contained,
|
|
14
|
+
flush: s.flush
|
|
15
|
+
}, x = {
|
|
16
|
+
sm: s.sm,
|
|
17
|
+
md: s.md,
|
|
18
|
+
lg: s.lg
|
|
15
19
|
}, S = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
lg: o.lg
|
|
20
|
+
start: s.iconStart,
|
|
21
|
+
end: s.iconEnd
|
|
19
22
|
}, C = {
|
|
20
|
-
start: o.iconStart,
|
|
21
|
-
end: o.iconEnd
|
|
22
|
-
}, w = {
|
|
23
23
|
sm: "sm",
|
|
24
24
|
md: "md",
|
|
25
25
|
lg: "md"
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
let t =
|
|
26
|
+
}, w = c(null);
|
|
27
|
+
function T(e) {
|
|
28
|
+
let t = d(w);
|
|
29
29
|
if (!t) throw Error(`<${e}> must be used inside <Accordion>.`);
|
|
30
30
|
return t;
|
|
31
31
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
let t =
|
|
32
|
+
var E = c(null);
|
|
33
|
+
function D(e) {
|
|
34
|
+
let t = d(E);
|
|
35
35
|
if (!t) throw Error(`<${e}> must be used inside <Accordion.Item>.`);
|
|
36
36
|
return t;
|
|
37
37
|
}
|
|
38
|
-
var
|
|
39
|
-
let { type: i = "single", collapsible: a = !0, value:
|
|
40
|
-
value:
|
|
38
|
+
var O = (e) => Array.isArray(e) ? e : e == null ? [] : [e], k = (e) => {
|
|
39
|
+
let { type: i = "single", collapsible: a = !0, value: o, defaultValue: c, onValueChange: l, variant: d = "separated", size: f = "md", headingLevel: p = 3, icon: v = "chevron", iconPosition: y = "end", keyboardNavigation: C = !0, regionRole: T = "auto", forceMount: E = !1, hiddenUntilFound: D = !1, disabled: k = !1, className: A, children: j, ref: M, ...N } = e, P = i === "multiple", [F, I] = r({
|
|
40
|
+
value: o,
|
|
41
41
|
defaultValue: c ?? (P ? [] : null),
|
|
42
|
-
onChange:
|
|
43
|
-
}), L = m(() =>
|
|
42
|
+
onChange: l
|
|
43
|
+
}), L = m(() => O(F), [F]), R = u((e, t) => {
|
|
44
44
|
I((n) => {
|
|
45
|
-
let r =
|
|
45
|
+
let r = O(n);
|
|
46
46
|
return t === r.includes(e) ? n : P ? t ? [...r, e] : r.filter((t) => t !== e) : t ? e : a ? null : n;
|
|
47
47
|
});
|
|
48
48
|
}, [
|
|
49
49
|
I,
|
|
50
50
|
P,
|
|
51
51
|
a
|
|
52
|
-
]), z =
|
|
52
|
+
]), z = u((e) => R(e, !L.includes(e)), [R, L]), [B, V] = g(0), H = u(() => (V((e) => e + 1), () => V((e) => e - 1)), []), U = T === "auto" ? B <= 6 : T, W = h(null), G = t(M, W), K = m(() => ({
|
|
53
53
|
rootRef: W,
|
|
54
54
|
openValues: L,
|
|
55
55
|
multiple: P,
|
|
56
56
|
collapsible: P ? !0 : a,
|
|
57
|
-
disabled:
|
|
57
|
+
disabled: k,
|
|
58
58
|
headingLevel: p,
|
|
59
59
|
size: f,
|
|
60
60
|
icon: v,
|
|
61
61
|
iconPosition: y,
|
|
62
|
-
keyboardNavigation:
|
|
62
|
+
keyboardNavigation: C,
|
|
63
63
|
isRegion: U,
|
|
64
64
|
forceMount: E,
|
|
65
65
|
hiddenUntilFound: D,
|
|
@@ -70,12 +70,12 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
|
|
|
70
70
|
L,
|
|
71
71
|
P,
|
|
72
72
|
a,
|
|
73
|
-
|
|
73
|
+
k,
|
|
74
74
|
p,
|
|
75
75
|
f,
|
|
76
76
|
v,
|
|
77
77
|
y,
|
|
78
|
-
|
|
78
|
+
C,
|
|
79
79
|
U,
|
|
80
80
|
E,
|
|
81
81
|
D,
|
|
@@ -83,21 +83,21 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
|
|
|
83
83
|
R,
|
|
84
84
|
H
|
|
85
85
|
]);
|
|
86
|
-
return /* @__PURE__ */ _(
|
|
86
|
+
return /* @__PURE__ */ _(w.Provider, {
|
|
87
87
|
value: K,
|
|
88
88
|
children: /* @__PURE__ */ _("div", {
|
|
89
89
|
...N,
|
|
90
90
|
ref: G,
|
|
91
91
|
"data-accordion-root": "",
|
|
92
92
|
"data-orientation": "vertical",
|
|
93
|
-
className:
|
|
93
|
+
className: n(s.root, b[d], x[f], S[y], A),
|
|
94
94
|
children: j
|
|
95
95
|
})
|
|
96
96
|
});
|
|
97
|
-
},
|
|
98
|
-
let c =
|
|
97
|
+
}, A = ({ value: e, disabled: t = !1, headingLevel: r, className: i, children: a, ...o }) => {
|
|
98
|
+
let c = T("Accordion.Item"), l = f(), [u, d] = g(), [h, v] = g(), { registerItem: y } = c;
|
|
99
99
|
p(() => y(), [y]);
|
|
100
|
-
let b = c.openValues.includes(e), x = c.disabled ||
|
|
100
|
+
let b = c.openValues.includes(e), x = c.disabled || t, S = m(() => ({
|
|
101
101
|
value: e,
|
|
102
102
|
open: b,
|
|
103
103
|
disabled: x,
|
|
@@ -116,36 +116,36 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
|
|
|
116
116
|
h,
|
|
117
117
|
l
|
|
118
118
|
]);
|
|
119
|
-
return /* @__PURE__ */ _(
|
|
119
|
+
return /* @__PURE__ */ _(E.Provider, {
|
|
120
120
|
value: S,
|
|
121
121
|
children: /* @__PURE__ */ _("div", {
|
|
122
|
-
...
|
|
122
|
+
...o,
|
|
123
123
|
"data-state": b ? "open" : "closed",
|
|
124
124
|
"data-disabled": x ? "" : void 0,
|
|
125
|
-
className:
|
|
125
|
+
className: n(s.item, i),
|
|
126
126
|
children: a
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
|
-
},
|
|
129
|
+
}, j = ({ size: e }) => /* @__PURE__ */ _(i, {
|
|
130
130
|
size: e,
|
|
131
|
-
className:
|
|
132
|
-
}),
|
|
133
|
-
className:
|
|
134
|
-
children: [/* @__PURE__ */ _(
|
|
131
|
+
className: s.rotating
|
|
132
|
+
}), M = ({ size: e }) => /* @__PURE__ */ v("span", {
|
|
133
|
+
className: s.plusMinus,
|
|
134
|
+
children: [/* @__PURE__ */ _(o, {
|
|
135
135
|
size: e,
|
|
136
|
-
className:
|
|
137
|
-
}), /* @__PURE__ */ _(
|
|
136
|
+
className: s.plus
|
|
137
|
+
}), /* @__PURE__ */ _(a, {
|
|
138
138
|
size: e,
|
|
139
|
-
className:
|
|
139
|
+
className: s.minus
|
|
140
140
|
})]
|
|
141
|
-
}),
|
|
142
|
-
let g =
|
|
141
|
+
}), N = ({ children: e, description: t, startIcon: r, badge: i, headingClassName: a, className: o, id: c, onClick: u, onKeyDown: d, disabled: m, ...h }) => {
|
|
142
|
+
let g = T("Accordion.Trigger"), y = D("Accordion.Trigger"), b = f(), x = `${b}-title`, S = `${b}-description`, w = `${b}-badge`, { setTriggerId: E } = y;
|
|
143
143
|
p(() => {
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
let
|
|
147
|
-
u?.(e), e.defaultPrevented ||
|
|
148
|
-
},
|
|
144
|
+
E(c);
|
|
145
|
+
}, [c, E]);
|
|
146
|
+
let O = y.disabled || !!m, k = y.open && !g.collapsible, A = (e) => {
|
|
147
|
+
u?.(e), e.defaultPrevented || O || k || g.toggle(y.value);
|
|
148
|
+
}, N = (e) => {
|
|
149
149
|
if (d?.(e), e.defaultPrevented || !g.keyboardNavigation || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
150
150
|
let t = g.rootRef.current;
|
|
151
151
|
if (!t) return;
|
|
@@ -168,160 +168,91 @@ var k = (e) => Array.isArray(e) ? e : e == null ? [] : [e], A = (r) => {
|
|
|
168
168
|
default: return;
|
|
169
169
|
}
|
|
170
170
|
e.preventDefault(), n[i]?.focus();
|
|
171
|
-
}, P =
|
|
172
|
-
F === "chevron" ? I = /* @__PURE__ */ _(
|
|
171
|
+
}, P = C[g.size], { icon: F } = g, I = null;
|
|
172
|
+
F === "chevron" ? I = /* @__PURE__ */ _(j, { size: P }) : F === "plus-minus" ? I = /* @__PURE__ */ _(M, { size: P }) : typeof F == "function" ? I = F({
|
|
173
173
|
open: y.open,
|
|
174
|
-
disabled:
|
|
175
|
-
}) :
|
|
176
|
-
className:
|
|
174
|
+
disabled: O
|
|
175
|
+
}) : l(F) && (I = /* @__PURE__ */ _("span", {
|
|
176
|
+
className: s.rotating,
|
|
177
177
|
children: F
|
|
178
178
|
}));
|
|
179
179
|
let L = F === "none" || I == null ? null : /* @__PURE__ */ _("span", {
|
|
180
|
-
className:
|
|
180
|
+
className: s.indicator,
|
|
181
181
|
"aria-hidden": "true",
|
|
182
182
|
children: I
|
|
183
|
-
}), R = i != null && i !== !1, z =
|
|
183
|
+
}), R = i != null && i !== !1, z = t != null && t !== !1 && t !== "", B = `h${y.headingLevel}`;
|
|
184
184
|
return /* @__PURE__ */ _(B, {
|
|
185
|
-
className:
|
|
185
|
+
className: n(s.heading, a),
|
|
186
186
|
children: /* @__PURE__ */ v("button", {
|
|
187
|
-
"aria-labelledby": R ? `${x} ${
|
|
187
|
+
"aria-labelledby": R ? `${x} ${w}` : x,
|
|
188
188
|
"aria-describedby": z ? S : void 0,
|
|
189
189
|
...h,
|
|
190
190
|
type: "button",
|
|
191
191
|
id: y.triggerId,
|
|
192
192
|
"data-accordion-trigger": "",
|
|
193
193
|
"data-state": y.open ? "open" : "closed",
|
|
194
|
-
"data-disabled":
|
|
194
|
+
"data-disabled": O ? "" : void 0,
|
|
195
195
|
"aria-expanded": y.open,
|
|
196
196
|
"aria-controls": y.contentId,
|
|
197
|
-
"aria-disabled": k && !
|
|
198
|
-
disabled:
|
|
199
|
-
className:
|
|
197
|
+
"aria-disabled": k && !O ? !0 : void 0,
|
|
198
|
+
disabled: O,
|
|
199
|
+
className: n(s.trigger, k && s.locked, o),
|
|
200
200
|
onClick: A,
|
|
201
|
-
onKeyDown:
|
|
201
|
+
onKeyDown: N,
|
|
202
202
|
children: [
|
|
203
203
|
g.iconPosition === "start" && L,
|
|
204
204
|
r != null && /* @__PURE__ */ _("span", {
|
|
205
|
-
className:
|
|
205
|
+
className: s.startIcon,
|
|
206
206
|
"aria-hidden": "true",
|
|
207
207
|
children: r
|
|
208
208
|
}),
|
|
209
209
|
/* @__PURE__ */ v("span", {
|
|
210
|
-
className:
|
|
210
|
+
className: s.text,
|
|
211
211
|
children: [/* @__PURE__ */ _("span", {
|
|
212
212
|
id: x,
|
|
213
|
-
className:
|
|
213
|
+
className: s.title,
|
|
214
214
|
children: e
|
|
215
215
|
}), z && /* @__PURE__ */ _("span", {
|
|
216
216
|
id: S,
|
|
217
|
-
className:
|
|
218
|
-
children:
|
|
217
|
+
className: s.description,
|
|
218
|
+
children: t
|
|
219
219
|
})]
|
|
220
220
|
}),
|
|
221
221
|
R && /* @__PURE__ */ _("span", {
|
|
222
|
-
id:
|
|
223
|
-
className:
|
|
222
|
+
id: w,
|
|
223
|
+
className: s.badge,
|
|
224
224
|
children: i
|
|
225
225
|
}),
|
|
226
226
|
g.iconPosition === "end" && L
|
|
227
227
|
]
|
|
228
228
|
})
|
|
229
229
|
});
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
let t = getComputedStyle(e), n = (e) => e.split(",").map((e) => {
|
|
233
|
-
let t = parseFloat(e);
|
|
234
|
-
return Number.isNaN(t) ? 0 : e.trim().endsWith("ms") ? t : t * 1e3;
|
|
235
|
-
}), r = n(t.transitionDuration), i = n(t.transitionDelay);
|
|
236
|
-
return Math.max(0, ...r.map((e, t) => e + (i[t] ?? i[0] ?? 0)));
|
|
237
|
-
}
|
|
238
|
-
var I = () => typeof document < "u" && !!document.body && "onbeforematch" in document.body, L = ({ forceMount: n, hiddenUntilFound: r, bodyClassName: i, className: a, children: s, id: c, ref: l, ...u }) => {
|
|
239
|
-
let f = E("Accordion.Content"), m = O("Accordion.Content"), v = n ?? f.forceMount, b = r ?? f.hiddenUntilFound, { setContentId: x } = m;
|
|
240
|
-
p(() => {
|
|
241
|
-
x(c);
|
|
242
|
-
}, [c, x]);
|
|
243
|
-
let S = m.open, C = h(null), w = e(l, C), [T, D] = g(S), [k, A] = g(S), [j, M] = g(!1), N = h(!1);
|
|
230
|
+
}, P = ({ forceMount: r, hiddenUntilFound: i, bodyClassName: a, className: o, children: c, id: l, ref: u, ...d }) => {
|
|
231
|
+
let f = T("Accordion.Content"), m = D("Accordion.Content"), h = r ?? f.forceMount, g = i ?? f.hiddenUntilFound, { setContentId: v } = m;
|
|
244
232
|
p(() => {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
return;
|
|
253
|
-
}
|
|
254
|
-
k || (C.current?.getBoundingClientRect(), A(!0));
|
|
255
|
-
} else k && A(!1);
|
|
256
|
-
}, [
|
|
257
|
-
S,
|
|
258
|
-
T,
|
|
259
|
-
k
|
|
260
|
-
]), d(() => {
|
|
261
|
-
if (S || k || !T) return;
|
|
262
|
-
let e = C.current, t = e ? F(e) : 0;
|
|
263
|
-
if (!e || t === 0) {
|
|
264
|
-
D(!1);
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
let n = () => D(!1), r = (t) => {
|
|
268
|
-
t.target === e && n();
|
|
269
|
-
};
|
|
270
|
-
e.addEventListener("transitionend", r);
|
|
271
|
-
let i = window.setTimeout(n, t + 50);
|
|
272
|
-
return () => {
|
|
273
|
-
e.removeEventListener("transitionend", r), window.clearTimeout(i);
|
|
274
|
-
};
|
|
275
|
-
}, [
|
|
276
|
-
S,
|
|
277
|
-
k,
|
|
278
|
-
T
|
|
279
|
-
]), d(() => {
|
|
280
|
-
if (!j) return;
|
|
281
|
-
let e = requestAnimationFrame(() => M(!1));
|
|
282
|
-
return () => cancelAnimationFrame(e);
|
|
283
|
-
}, [j]);
|
|
284
|
-
let [P, L] = g(!1);
|
|
285
|
-
d(() => {
|
|
286
|
-
L(b && I());
|
|
287
|
-
}, [b]), p(() => {
|
|
288
|
-
let e = C.current;
|
|
289
|
-
e && P && !T && e.setAttribute("hidden", "until-found");
|
|
290
|
-
}, [P, T]);
|
|
291
|
-
let { setItemOpen: R } = f, z = m.value, B = m.disabled;
|
|
292
|
-
d(() => {
|
|
293
|
-
let e = C.current;
|
|
294
|
-
if (!e || !P) return;
|
|
295
|
-
let t = () => {
|
|
296
|
-
B || (N.current = !0, y(() => R(z, !0)));
|
|
297
|
-
};
|
|
298
|
-
return e.addEventListener("beforematch", t), () => e.removeEventListener("beforematch", t);
|
|
299
|
-
}, [
|
|
300
|
-
P,
|
|
301
|
-
R,
|
|
302
|
-
z,
|
|
303
|
-
B
|
|
304
|
-
]);
|
|
305
|
-
let V = v || b || T;
|
|
233
|
+
v(l);
|
|
234
|
+
}, [l, v]);
|
|
235
|
+
let { setItemOpen: y } = f, b = m.value, x = e({
|
|
236
|
+
open: m.open,
|
|
237
|
+
hiddenUntilFound: g,
|
|
238
|
+
onFound: m.disabled ? void 0 : () => y(b, !0)
|
|
239
|
+
}), S = t(u, x.ref), C = h || g || x.visible;
|
|
306
240
|
return /* @__PURE__ */ _("div", {
|
|
307
241
|
role: f.isRegion ? "region" : void 0,
|
|
308
242
|
"aria-labelledby": m.triggerId,
|
|
309
|
-
...
|
|
310
|
-
ref:
|
|
243
|
+
...d,
|
|
244
|
+
ref: S,
|
|
311
245
|
id: m.contentId,
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
hidden: !T,
|
|
315
|
-
inert: T && !k ? !0 : void 0,
|
|
316
|
-
className: t(o.content, a),
|
|
246
|
+
...x.panelProps,
|
|
247
|
+
className: n(s.content, o),
|
|
317
248
|
children: /* @__PURE__ */ _("div", {
|
|
318
|
-
className:
|
|
249
|
+
className: s.clip,
|
|
319
250
|
children: /* @__PURE__ */ _("div", {
|
|
320
|
-
className:
|
|
321
|
-
children:
|
|
251
|
+
className: n(s.body, a),
|
|
252
|
+
children: C ? c : null
|
|
322
253
|
})
|
|
323
254
|
})
|
|
324
255
|
});
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
export {
|
|
256
|
+
}, F = k;
|
|
257
|
+
F.Item = A, F.Trigger = N, F.Content = P;
|
|
258
|
+
export { y as ACCORDION_AUTO_REGION_MAX, F as Accordion, P as AccordionContent, A as AccordionItem, N as AccordionTrigger };
|
|
@@ -67,8 +67,19 @@ export interface ChatProps extends Omit<ComponentPropsWithRef<"section">, "child
|
|
|
67
67
|
emptyState?: ReactNode;
|
|
68
68
|
/**
|
|
69
69
|
* Renders a message's content, e.g. through your Markdown renderer.
|
|
70
|
-
* Defaults to plain text with line breaks kept
|
|
71
|
-
*
|
|
70
|
+
* Defaults to plain text with line breaks kept, which is always safe.
|
|
71
|
+
*
|
|
72
|
+
* **Security:** treat every message as untrusted, including the model's
|
|
73
|
+
* replies (a prompt injection can make a model write anything). When you
|
|
74
|
+
* render it yourself:
|
|
75
|
+
* - Render to React elements, not an HTML string. Don't pass content to
|
|
76
|
+
* `dangerouslySetInnerHTML`, and don't enable raw HTML in your Markdown
|
|
77
|
+
* renderer. If you must render HTML, sanitize it first (e.g. DOMPurify).
|
|
78
|
+
* - Allow only `http:`, `https:`, and `mailto:` link URLs (no
|
|
79
|
+
* `javascript:` or `data:`), and give external links
|
|
80
|
+
* `rel="noopener noreferrer"`.
|
|
81
|
+
* - Don't load remote images from message content automatically: an image
|
|
82
|
+
* URL can leak data from the conversation to another server.
|
|
72
83
|
*/
|
|
73
84
|
renderContent?: (message: ChatMessage) => ReactNode;
|
|
74
85
|
/** Name of the assistant, read to screen readers ("Coach said:"). Defaults to `labels.assistant`. */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { ButtonStyleProps } from '../../primitives/Button';
|
|
3
|
+
export interface CollapsibleProps extends ComponentPropsWithRef<"div"> {
|
|
4
|
+
/** Controlled open state. */
|
|
5
|
+
open?: boolean;
|
|
6
|
+
/** Initial open state when uncontrolled. @default false */
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
/** Called with the next open state when the trigger is pressed (or find-in-page reveals the content). */
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
/** Disables the trigger, so the section stays in its current state. @default false */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** A `Collapsible.Trigger` and a `Collapsible.Content`, anywhere inside. */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A single section that shows and hides its content: the WAI-ARIA
|
|
17
|
+
* disclosure pattern. Unlike `Accordion`, it adds no layout or styling of its
|
|
18
|
+
* own, and the trigger and content can sit anywhere inside the root (e.g. a
|
|
19
|
+
* "Show more" button below a list).
|
|
20
|
+
*
|
|
21
|
+
* The trigger is a real `<button>` with `aria-expanded` and `aria-controls`.
|
|
22
|
+
* Closed content is `hidden`, so it can't be focused or read, and
|
|
23
|
+
* `hiddenUntilFound` lets the browser's find-in-page reveal it.
|
|
24
|
+
*/
|
|
25
|
+
declare function CollapsibleRoot({ open: openProp, defaultOpen, onOpenChange, disabled, className, children, ...rest }: CollapsibleProps): import("react").JSX.Element;
|
|
26
|
+
export interface CollapsibleTriggerProps extends ButtonStyleProps, Omit<ComponentPropsWithRef<"button">, keyof ButtonStyleProps> {
|
|
27
|
+
/**
|
|
28
|
+
* Render your own element instead of a `Button`, passing it the trigger's
|
|
29
|
+
* ARIA attributes, `onClick`, and `ref`. It must be a single element that
|
|
30
|
+
* renders a `<button>` (or a component that forwards these props to one).
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
asChild?: boolean;
|
|
34
|
+
/** Show a chevron after the label that turns when open. Ignored with `asChild`. @default true */
|
|
35
|
+
indicator?: boolean;
|
|
36
|
+
/** The visible label, or your element with `asChild`. */
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The button that opens and closes the content. Renders a `Button`
|
|
41
|
+
* (`variant="ghost"`, `tone="neutral"` by default) with a turning chevron,
|
|
42
|
+
* or your own element with `asChild`.
|
|
43
|
+
*/
|
|
44
|
+
declare function CollapsibleTrigger({ asChild, indicator, variant, tone, disabled: disabledProp, onClick, className, children, ref, ...rest }: CollapsibleTriggerProps): import("react").JSX.Element;
|
|
45
|
+
export interface CollapsibleContentProps extends ComponentPropsWithRef<"div"> {
|
|
46
|
+
/** Keep the children mounted while closed (still hidden), e.g. to keep form state. @default false */
|
|
47
|
+
forceMount?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Use `hidden="until-found"` where supported, so the browser's
|
|
50
|
+
* find-in-page can search the closed content and opens it on a match.
|
|
51
|
+
* Keeps the children mounted. @default false
|
|
52
|
+
*/
|
|
53
|
+
hiddenUntilFound?: boolean;
|
|
54
|
+
/** The content to show and hide. */
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The content the trigger controls. Animates its height open and closed
|
|
59
|
+
* (instantly under `prefers-reduced-motion`), then gets the `hidden`
|
|
60
|
+
* attribute. Adds no padding, so it fits any layout.
|
|
61
|
+
*/
|
|
62
|
+
declare function CollapsibleContent({ forceMount, hiddenUntilFound, id, className, children, ref, ...rest }: CollapsibleContentProps): import("react").JSX.Element;
|
|
63
|
+
type CollapsibleComponent = typeof CollapsibleRoot & {
|
|
64
|
+
Trigger: typeof CollapsibleTrigger;
|
|
65
|
+
Content: typeof CollapsibleContent;
|
|
66
|
+
};
|
|
67
|
+
/** A show/hide section (WAI-ARIA disclosure). See `CollapsibleRoot`. */
|
|
68
|
+
export declare const Collapsible: CollapsibleComponent;
|
|
69
|
+
/** Named exports, for React Server Components (which can't dot into a client module). */
|
|
70
|
+
export { CollapsibleTrigger, CollapsibleContent };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCollapsePresence as e } from "../../../hooks/useCollapsePresence.mjs";
|
|
3
|
+
import { useControllableState as t } from "../../../hooks/useControllableState.mjs";
|
|
4
|
+
import { useMergedRef as n } from "../../../hooks/useMergedRef.mjs";
|
|
5
|
+
import { cx as r } from "../../../utils/cx.mjs";
|
|
6
|
+
import { getChildRef as i, isSingleElement as a } from "../../../utils/refs.mjs";
|
|
7
|
+
import { cloneSlot as o } from "../../../utils/slot.mjs";
|
|
8
|
+
import { Button as s } from "../../primitives/Button/Button.mjs";
|
|
9
|
+
import { ChevronDownIcon as c } from "../../primitives/Icon/icons.mjs";
|
|
10
|
+
import l from "./Collapsible.module.css.mjs";
|
|
11
|
+
import { createContext as u, useContext as d, useId as f, useLayoutEffect as p, useMemo as m, useState as h } from "react";
|
|
12
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
13
|
+
// src/components/data-display/Collapsible/Collapsible.tsx
|
|
14
|
+
var _ = u(null);
|
|
15
|
+
function v(e) {
|
|
16
|
+
let t = d(_);
|
|
17
|
+
if (!t) throw Error(`${e} must be used inside <Collapsible>.`);
|
|
18
|
+
return t;
|
|
19
|
+
}
|
|
20
|
+
function y({ open: e, defaultOpen: n = !1, onOpenChange: r, disabled: i = !1, className: a, children: o, ...s }) {
|
|
21
|
+
let [c, l] = t({
|
|
22
|
+
value: e,
|
|
23
|
+
defaultValue: n,
|
|
24
|
+
onChange: r
|
|
25
|
+
}), u = f(), d = f(), [p, v] = h(), y = p ?? d, b = m(() => ({
|
|
26
|
+
open: c,
|
|
27
|
+
setOpen: l,
|
|
28
|
+
disabled: i,
|
|
29
|
+
triggerId: u,
|
|
30
|
+
contentId: y,
|
|
31
|
+
setContentId: v
|
|
32
|
+
}), [
|
|
33
|
+
c,
|
|
34
|
+
l,
|
|
35
|
+
i,
|
|
36
|
+
u,
|
|
37
|
+
y
|
|
38
|
+
]);
|
|
39
|
+
return /* @__PURE__ */ g(_.Provider, {
|
|
40
|
+
value: b,
|
|
41
|
+
children: /* @__PURE__ */ g("div", {
|
|
42
|
+
...s,
|
|
43
|
+
"data-state": c ? "open" : "closed",
|
|
44
|
+
"data-disabled": i || void 0,
|
|
45
|
+
className: a,
|
|
46
|
+
children: o
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function b({ asChild: e = !1, indicator: t = !0, variant: u = "ghost", tone: d = "neutral", disabled: f, onClick: p, className: m, children: h, ref: _, ...y }) {
|
|
51
|
+
let b = v("Collapsible.Trigger"), x = f ?? b.disabled, S = e && a(h) ? h : null, C = n(_, S ? i(S) : void 0), w = {
|
|
52
|
+
id: b.triggerId,
|
|
53
|
+
"aria-expanded": b.open,
|
|
54
|
+
"aria-controls": b.contentId,
|
|
55
|
+
"data-state": b.open ? "open" : "closed",
|
|
56
|
+
onClick: (e) => {
|
|
57
|
+
p?.(e), e.defaultPrevented || x || b.setOpen(!b.open);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return S ? o(S, {
|
|
61
|
+
...y,
|
|
62
|
+
...w,
|
|
63
|
+
disabled: x,
|
|
64
|
+
className: m
|
|
65
|
+
}, C) : /* @__PURE__ */ g(s, {
|
|
66
|
+
type: "button",
|
|
67
|
+
...y,
|
|
68
|
+
...w,
|
|
69
|
+
ref: C,
|
|
70
|
+
variant: u,
|
|
71
|
+
tone: d,
|
|
72
|
+
disabled: x,
|
|
73
|
+
className: r(l.trigger, m),
|
|
74
|
+
endIcon: t ? /* @__PURE__ */ g(c, { className: l.chevron }) : void 0,
|
|
75
|
+
children: h
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function x({ forceMount: t = !1, hiddenUntilFound: i = !1, id: a, className: o, children: s, ref: c, ...u }) {
|
|
79
|
+
let d = v("Collapsible.Content"), { setContentId: f, setOpen: m, disabled: h } = d;
|
|
80
|
+
p(() => {
|
|
81
|
+
f(a);
|
|
82
|
+
}, [a, f]);
|
|
83
|
+
let _ = e({
|
|
84
|
+
open: d.open,
|
|
85
|
+
hiddenUntilFound: i,
|
|
86
|
+
onFound: h ? void 0 : () => m(!0)
|
|
87
|
+
}), y = n(c, _.ref), b = t || i || _.visible;
|
|
88
|
+
return /* @__PURE__ */ g("div", {
|
|
89
|
+
...u,
|
|
90
|
+
ref: y,
|
|
91
|
+
id: d.contentId,
|
|
92
|
+
..._.panelProps,
|
|
93
|
+
className: r(l.content, o),
|
|
94
|
+
children: /* @__PURE__ */ g("div", {
|
|
95
|
+
className: l.clip,
|
|
96
|
+
children: b ? s : null
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
var S = y;
|
|
101
|
+
S.Trigger = b, S.Content = x;
|
|
102
|
+
export { S as Collapsible, x as CollapsibleContent, b as CollapsibleTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/components/data-display/Collapsible/Collapsible.module.css
|
|
2
|
+
var e = "_chevron_1fs2m_13", t = "_trigger_1fs2m_21", n = "_content_1fs2m_33", r = "_clip_1fs2m_79", i = {
|
|
3
|
+
chevron: e,
|
|
4
|
+
trigger: t,
|
|
5
|
+
content: n,
|
|
6
|
+
clip: r
|
|
7
|
+
};
|
|
8
|
+
export { e as chevron, r as clip, n as content, i as default, t as trigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Collapsible';
|
|
@@ -16,6 +16,26 @@ export type ProgressSemantic = "progressbar" | "meter";
|
|
|
16
16
|
export type ProgressFormatValue = (value: number, max: number, min: number) => string;
|
|
17
17
|
/** Default formatter: a whole-number percentage of the range, e.g. `"42%"`. */
|
|
18
18
|
export declare const formatProgressPercent: ProgressFormatValue;
|
|
19
|
+
/**
|
|
20
|
+
* One color band for `toneSteps`. The fill takes the `tone` of the first
|
|
21
|
+
* step whose `upTo` is at or above the current percentage. A step without
|
|
22
|
+
* `upTo` matches everything left (put it last as the catch-all).
|
|
23
|
+
*/
|
|
24
|
+
export interface ProgressToneStep {
|
|
25
|
+
/**
|
|
26
|
+
* Upper bound of this band, as a percentage of the range (0 to 100),
|
|
27
|
+
* inclusive. Leave it out on the last step to cover the rest.
|
|
28
|
+
*/
|
|
29
|
+
upTo?: number;
|
|
30
|
+
/** Fill color while the value is inside this band. */
|
|
31
|
+
tone: Tone;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Picks the tone for the current percentage from `toneSteps`, falling back to
|
|
35
|
+
* `fallback` when there are no steps, no step matches, or the value is
|
|
36
|
+
* indeterminate. Exported for custom indicators that want the same bands.
|
|
37
|
+
*/
|
|
38
|
+
export declare function resolveProgressTone(percent: number | undefined, steps: readonly ProgressToneStep[] | undefined, fallback: Tone): Tone;
|
|
19
39
|
/** Props shared by `Progress` and `CircularProgress`. */
|
|
20
40
|
interface ProgressValueProps {
|
|
21
41
|
/**
|
|
@@ -33,6 +53,16 @@ interface ProgressValueProps {
|
|
|
33
53
|
* `danger`/`warning` with a `label` and `showValue` (or `valueText`).
|
|
34
54
|
*/
|
|
35
55
|
tone?: Tone;
|
|
56
|
+
/**
|
|
57
|
+
* Change the fill color with the value. Bands are percentages of the range,
|
|
58
|
+
* checked in order; the first whose `upTo` is at or above the current
|
|
59
|
+
* percentage wins, and a step without `upTo` catches the rest. `tone` is
|
|
60
|
+
* used while indeterminate or when no step matches. Example:
|
|
61
|
+
* `[{ upTo: 40, tone: "danger" }, { upTo: 75, tone: "warning" }, { tone: "success" }]`.
|
|
62
|
+
* Color never carries meaning alone: also show the value or describe the
|
|
63
|
+
* state in `label` / `valueText`.
|
|
64
|
+
*/
|
|
65
|
+
toneSteps?: readonly ProgressToneStep[];
|
|
36
66
|
/**
|
|
37
67
|
* Visible label. Becomes the accessible name through `aria-labelledby`.
|
|
38
68
|
* Without it, pass `aria-label` (or `aria-labelledby`).
|
|
@@ -75,7 +105,7 @@ export interface ProgressProps extends ProgressValueProps, Omit<ComponentPropsWi
|
|
|
75
105
|
* or an indeterminate sweep when `value` is not set. The root carries
|
|
76
106
|
* `role="progressbar"` (or `meter`) with the ARIA range attributes.
|
|
77
107
|
*/
|
|
78
|
-
export declare function Progress({ value, min, max, tone, size, radius, striped, animated, label, showValue, formatValue, valueText, semantic, buffer, className, "aria-labelledby": ariaLabelledBy, ...rest }: ProgressProps): import("react").JSX.Element;
|
|
108
|
+
export declare function Progress({ value, min, max, tone, toneSteps, size, radius, striped, animated, label, showValue, formatValue, valueText, semantic, buffer, className, "aria-labelledby": ariaLabelledBy, ...rest }: ProgressProps): import("react").JSX.Element;
|
|
79
109
|
/** One part of a `ProgressSegments` bar. */
|
|
80
110
|
export interface ProgressSegment {
|
|
81
111
|
/** Amount this segment takes up, in the same units as `max`. */
|
|
@@ -146,5 +176,5 @@ export interface CircularProgressProps extends ProgressValueProps, Omit<Componen
|
|
|
146
176
|
* slot. Determinate when `value` is set, spinning otherwise (a calm pulse
|
|
147
177
|
* under `prefers-reduced-motion`).
|
|
148
178
|
*/
|
|
149
|
-
export declare function CircularProgress({ value, min, max, tone, size, thickness, label, showValue, formatValue, valueText, semantic, children, className, style, "aria-labelledby": ariaLabelledBy, ...rest }: CircularProgressProps): import("react").JSX.Element;
|
|
179
|
+
export declare function CircularProgress({ value, min, max, tone, toneSteps, size, thickness, label, showValue, formatValue, valueText, semantic, children, className, style, "aria-labelledby": ariaLabelledBy, ...rest }: CircularProgressProps): import("react").JSX.Element;
|
|
150
180
|
export {};
|