@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
|
@@ -11,7 +11,11 @@ function s(e, ...t) {
|
|
|
11
11
|
o && !r && console.warn("[" + e + "] Give it a name: label, aria-label, or aria-labelledby.");
|
|
12
12
|
}, [e, r]);
|
|
13
13
|
}
|
|
14
|
-
var c = (e, t, n) => Math.min(n, Math.max(t, e)), l = (e, t, n) => n > t ? (c(e, t, n) - t) / (n - t) * 100 : 0, u = (e, t, n) => `${Math.round(l(e, n, t))}%`, d = (e) => e == null || Number.isNaN(e)
|
|
14
|
+
var c = (e, t, n) => Math.min(n, Math.max(t, e)), l = (e, t, n) => n > t ? (c(e, t, n) - t) / (n - t) * 100 : 0, u = (e, t, n) => `${Math.round(l(e, n, t))}%`, d = (e) => e == null || Number.isNaN(e);
|
|
15
|
+
function f(e, t, n) {
|
|
16
|
+
return e === void 0 || !t?.length ? n : t.find((t) => t.upTo === void 0 || e <= t.upTo)?.tone ?? n;
|
|
17
|
+
}
|
|
18
|
+
var p = {
|
|
15
19
|
neutral: t.toneNeutral,
|
|
16
20
|
primary: t.tonePrimary,
|
|
17
21
|
accent: t.toneAccent,
|
|
@@ -19,7 +23,7 @@ var c = (e, t, n) => Math.min(n, Math.max(t, e)), l = (e, t, n) => n > t ? (c(e,
|
|
|
19
23
|
warning: t.toneWarning,
|
|
20
24
|
danger: t.toneDanger,
|
|
21
25
|
info: t.toneInfo
|
|
22
|
-
},
|
|
26
|
+
}, m = {
|
|
23
27
|
none: t.radiusNone,
|
|
24
28
|
xs: t.radiusXs,
|
|
25
29
|
sm: t.radiusSm,
|
|
@@ -28,12 +32,12 @@ var c = (e, t, n) => Math.min(n, Math.max(t, e)), l = (e, t, n) => n > t ? (c(e,
|
|
|
28
32
|
xl: t.radiusXl,
|
|
29
33
|
"2xl": t.radius2xl,
|
|
30
34
|
pill: t.radiusPill
|
|
31
|
-
},
|
|
35
|
+
}, h = {
|
|
32
36
|
sm: t.barSm,
|
|
33
37
|
md: t.barMd,
|
|
34
38
|
lg: t.barLg
|
|
35
39
|
};
|
|
36
|
-
function
|
|
40
|
+
function g({ value: e, min: t, max: n, semantic: r, valueText: i, formatValue: a, showValue: o }) {
|
|
37
41
|
let s = d(e), f = s ? void 0 : c(e, t, n), p = f === void 0 ? 0 : l(f, t, n), m = o && f !== void 0 ? (a ?? u)(f, n, t) : void 0, h = i ?? (a && f !== void 0 ? a(f, n, t) : void 0);
|
|
38
42
|
return {
|
|
39
43
|
indeterminate: s,
|
|
@@ -49,46 +53,46 @@ function h({ value: e, min: t, max: n, semantic: r, valueText: i, formatValue: a
|
|
|
49
53
|
}
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
|
-
function
|
|
53
|
-
s("Progress",
|
|
54
|
-
let
|
|
56
|
+
function _({ value: n, min: o = 0, max: c = 100, tone: u = "primary", toneSteps: d, size: _ = "md", radius: v = "pill", striped: y = !1, animated: b = !1, label: x, showValue: S = !1, formatValue: C, valueText: w, semantic: T = "progressbar", buffer: E, className: D, "aria-labelledby": O, ...k }) {
|
|
57
|
+
s("Progress", x, k["aria-label"], O);
|
|
58
|
+
let A = r(), { indeterminate: j, percent: M, displayValue: N, rangeProps: P } = g({
|
|
55
59
|
value: n,
|
|
56
60
|
min: o,
|
|
57
61
|
max: c,
|
|
58
|
-
semantic:
|
|
59
|
-
valueText:
|
|
60
|
-
formatValue:
|
|
61
|
-
showValue:
|
|
62
|
-
}),
|
|
62
|
+
semantic: T,
|
|
63
|
+
valueText: w,
|
|
64
|
+
formatValue: C,
|
|
65
|
+
showValue: S
|
|
66
|
+
}), F = f(j ? void 0 : M, d, u), I = E === void 0 || j ? void 0 : l(E, o, c), L = !!x || N !== void 0;
|
|
63
67
|
return /* @__PURE__ */ a("div", {
|
|
64
|
-
...
|
|
65
|
-
...
|
|
66
|
-
"aria-labelledby":
|
|
67
|
-
"data-indeterminate":
|
|
68
|
-
className: e(t.bar,
|
|
69
|
-
children: [
|
|
68
|
+
...k,
|
|
69
|
+
...P,
|
|
70
|
+
"aria-labelledby": O ?? (x ? A : void 0),
|
|
71
|
+
"data-indeterminate": j || void 0,
|
|
72
|
+
className: e(t.bar, p[F], h[_], m[v], j && t.indeterminate, (y || b) && t.striped, b && t.animated, D),
|
|
73
|
+
children: [L && /* @__PURE__ */ a("div", {
|
|
70
74
|
className: t.header,
|
|
71
|
-
children: [
|
|
72
|
-
id:
|
|
75
|
+
children: [x && /* @__PURE__ */ i("span", {
|
|
76
|
+
id: A,
|
|
73
77
|
className: t.label,
|
|
74
|
-
children:
|
|
75
|
-
}),
|
|
78
|
+
children: x
|
|
79
|
+
}), N !== void 0 && /* @__PURE__ */ i("span", {
|
|
76
80
|
className: t.value,
|
|
77
|
-
children:
|
|
81
|
+
children: N
|
|
78
82
|
})]
|
|
79
83
|
}), /* @__PURE__ */ a("div", {
|
|
80
84
|
className: t.track,
|
|
81
|
-
children: [
|
|
85
|
+
children: [I !== void 0 && /* @__PURE__ */ i("div", {
|
|
82
86
|
className: t.buffer,
|
|
83
|
-
style: { inlineSize: `${
|
|
87
|
+
style: { inlineSize: `${I}%` }
|
|
84
88
|
}), /* @__PURE__ */ i("div", {
|
|
85
89
|
className: t.fill,
|
|
86
|
-
style:
|
|
90
|
+
style: j ? void 0 : { inlineSize: `${M}%` }
|
|
87
91
|
})]
|
|
88
92
|
})]
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
|
-
var
|
|
95
|
+
var v = [
|
|
92
96
|
"primary",
|
|
93
97
|
"warning",
|
|
94
98
|
"success",
|
|
@@ -97,7 +101,7 @@ var _ = [
|
|
|
97
101
|
"accent",
|
|
98
102
|
"info"
|
|
99
103
|
];
|
|
100
|
-
function
|
|
104
|
+
function y({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue: f = u, valueText: g, semantic: _ = "meter", size: y = "md", radius: b = "pill", showLegend: x = !0, className: S, "aria-label": C, "aria-labelledby": w, "aria-describedby": T, ...E }) {
|
|
101
105
|
s("ProgressSegments", l, C, w);
|
|
102
106
|
let D = r(), O = r(), k = Math.max(0, o), A = n.map((e, t) => {
|
|
103
107
|
let n = c(e.value, 0, k);
|
|
@@ -105,12 +109,12 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
105
109
|
...e,
|
|
106
110
|
amount: n,
|
|
107
111
|
percent: o > 0 ? n / o * 100 : 0,
|
|
108
|
-
tone: e.tone ??
|
|
112
|
+
tone: e.tone ?? v[t % v.length]
|
|
109
113
|
};
|
|
110
|
-
}), j = A.reduce((e, t) => e + t.amount, 0), M = g ?? [A.map((e) => `${e.label} ${
|
|
114
|
+
}), j = A.reduce((e, t) => e + t.amount, 0), M = g ?? [A.map((e) => `${e.label} ${f(e.amount, o, 0)}`).join(", "), `${f(j, o, 0)} total`].filter(Boolean).join("; "), N = !!l || d;
|
|
111
115
|
return /* @__PURE__ */ a("div", {
|
|
112
116
|
...E,
|
|
113
|
-
className: e(t.segments,
|
|
117
|
+
className: e(t.segments, h[y], m[b], S),
|
|
114
118
|
children: [
|
|
115
119
|
N && /* @__PURE__ */ a("div", {
|
|
116
120
|
className: t.header,
|
|
@@ -120,11 +124,11 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
120
124
|
children: l
|
|
121
125
|
}), d && /* @__PURE__ */ i("span", {
|
|
122
126
|
className: t.value,
|
|
123
|
-
children:
|
|
127
|
+
children: f(j, o, 0)
|
|
124
128
|
})]
|
|
125
129
|
}),
|
|
126
130
|
/* @__PURE__ */ i("div", {
|
|
127
|
-
role:
|
|
131
|
+
role: _,
|
|
128
132
|
"aria-valuemin": 0,
|
|
129
133
|
"aria-valuemax": o,
|
|
130
134
|
"aria-valuenow": j,
|
|
@@ -134,7 +138,7 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
134
138
|
"aria-describedby": e(T, x && O) || void 0,
|
|
135
139
|
className: e(t.track, t.segmentTrack),
|
|
136
140
|
children: A.map((n, r) => n.percent > 0 ? /* @__PURE__ */ i("div", {
|
|
137
|
-
className: e(t.segment,
|
|
141
|
+
className: e(t.segment, p[n.tone]),
|
|
138
142
|
style: { inlineSize: `${n.percent}%` }
|
|
139
143
|
}, `${n.label}-${r}`) : null)
|
|
140
144
|
}),
|
|
@@ -147,7 +151,7 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
147
151
|
children: [
|
|
148
152
|
/* @__PURE__ */ i("span", {
|
|
149
153
|
"aria-hidden": "true",
|
|
150
|
-
className: e(t.swatch,
|
|
154
|
+
className: e(t.swatch, p[n.tone])
|
|
151
155
|
}),
|
|
152
156
|
/* @__PURE__ */ i("span", {
|
|
153
157
|
className: t.legendLabel,
|
|
@@ -155,7 +159,7 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
155
159
|
}),
|
|
156
160
|
/* @__PURE__ */ i("span", {
|
|
157
161
|
className: t.legendValue,
|
|
158
|
-
children:
|
|
162
|
+
children: f(n.amount, o, 0)
|
|
159
163
|
})
|
|
160
164
|
]
|
|
161
165
|
}, `${n.label}-${r}`))
|
|
@@ -163,76 +167,76 @@ function v({ segments: n, max: o = 100, label: l, showValue: d = !1, formatValue
|
|
|
163
167
|
]
|
|
164
168
|
});
|
|
165
169
|
}
|
|
166
|
-
var
|
|
170
|
+
var b = {
|
|
167
171
|
sm: 32,
|
|
168
172
|
md: 48,
|
|
169
173
|
lg: 64,
|
|
170
174
|
xl: 96
|
|
171
|
-
},
|
|
175
|
+
}, x = {
|
|
172
176
|
sm: t.ringSm,
|
|
173
177
|
md: t.ringMd,
|
|
174
178
|
lg: t.ringLg,
|
|
175
179
|
xl: t.ringXl
|
|
176
|
-
},
|
|
180
|
+
}, S = {
|
|
177
181
|
sm: 4,
|
|
178
182
|
md: 5,
|
|
179
183
|
lg: 6,
|
|
180
184
|
xl: 8
|
|
181
185
|
};
|
|
182
|
-
function
|
|
183
|
-
s("CircularProgress",
|
|
184
|
-
let
|
|
186
|
+
function C({ value: n, min: o = 0, max: c = 100, tone: l = "primary", toneSteps: u, size: d = "md", thickness: m, label: h, showValue: _ = !1, formatValue: v, valueText: y, semantic: C = "progressbar", children: w, className: T, style: E, "aria-labelledby": D, ...O }) {
|
|
187
|
+
s("CircularProgress", h, O["aria-label"], D);
|
|
188
|
+
let k = r(), { indeterminate: A, percent: j, displayValue: M, rangeProps: N } = g({
|
|
185
189
|
value: n,
|
|
186
190
|
min: o,
|
|
187
191
|
max: c,
|
|
188
|
-
semantic:
|
|
189
|
-
valueText:
|
|
190
|
-
formatValue:
|
|
191
|
-
showValue:
|
|
192
|
-
}),
|
|
192
|
+
semantic: C,
|
|
193
|
+
valueText: y,
|
|
194
|
+
formatValue: v,
|
|
195
|
+
showValue: _ && d !== "sm"
|
|
196
|
+
}), P = f(A ? void 0 : j, u, l), F = typeof d == "number", I = F ? d : b[d], L = Math.min(I / 2, m ?? (F ? Math.max(3, Math.round(d / 10)) : S[d])), R = I / 2, z = (I - L) / 2, B = w ?? M;
|
|
193
197
|
return /* @__PURE__ */ a("div", {
|
|
194
|
-
...
|
|
195
|
-
...
|
|
196
|
-
"aria-labelledby":
|
|
197
|
-
"data-indeterminate":
|
|
198
|
-
className: e(t.circular,
|
|
199
|
-
style:
|
|
200
|
-
"--pg-ring-size": `${
|
|
201
|
-
...
|
|
202
|
-
} :
|
|
198
|
+
...O,
|
|
199
|
+
...N,
|
|
200
|
+
"aria-labelledby": D ?? (h ? k : void 0),
|
|
201
|
+
"data-indeterminate": A || void 0,
|
|
202
|
+
className: e(t.circular, p[P], !F && x[d], A && t.indeterminate, T),
|
|
203
|
+
style: F ? {
|
|
204
|
+
"--pg-ring-size": `${d}px`,
|
|
205
|
+
...E
|
|
206
|
+
} : E,
|
|
203
207
|
children: [/* @__PURE__ */ a("div", {
|
|
204
208
|
className: t.ring,
|
|
205
209
|
children: [/* @__PURE__ */ a("svg", {
|
|
206
210
|
className: t.ringSvg,
|
|
207
|
-
viewBox: `0 0 ${
|
|
211
|
+
viewBox: `0 0 ${I} ${I}`,
|
|
208
212
|
"aria-hidden": "true",
|
|
209
213
|
focusable: "false",
|
|
210
214
|
children: [/* @__PURE__ */ i("circle", {
|
|
211
215
|
className: t.ringTrack,
|
|
212
|
-
cx:
|
|
213
|
-
cy:
|
|
214
|
-
r:
|
|
215
|
-
strokeWidth:
|
|
216
|
+
cx: R,
|
|
217
|
+
cy: R,
|
|
218
|
+
r: z,
|
|
219
|
+
strokeWidth: L
|
|
216
220
|
}), /* @__PURE__ */ i("circle", {
|
|
217
|
-
className: e(t.ringFill, !
|
|
218
|
-
cx:
|
|
219
|
-
cy:
|
|
220
|
-
r:
|
|
221
|
-
strokeWidth:
|
|
221
|
+
className: e(t.ringFill, !A && j === 0 && t.ringEmpty),
|
|
222
|
+
cx: R,
|
|
223
|
+
cy: R,
|
|
224
|
+
r: z,
|
|
225
|
+
strokeWidth: L,
|
|
222
226
|
pathLength: 100,
|
|
223
227
|
strokeDasharray: "100 100",
|
|
224
|
-
transform: `rotate(-90 ${
|
|
225
|
-
style: { strokeDashoffset:
|
|
228
|
+
transform: `rotate(-90 ${R} ${R})`,
|
|
229
|
+
style: { strokeDashoffset: A ? 72 : 100 - j }
|
|
226
230
|
})]
|
|
227
|
-
}),
|
|
231
|
+
}), B != null && /* @__PURE__ */ i("div", {
|
|
228
232
|
className: t.ringCenter,
|
|
229
|
-
children:
|
|
233
|
+
children: B
|
|
230
234
|
})]
|
|
231
|
-
}),
|
|
232
|
-
id:
|
|
235
|
+
}), h && /* @__PURE__ */ i("span", {
|
|
236
|
+
id: k,
|
|
233
237
|
className: t.ringLabel,
|
|
234
|
-
children:
|
|
238
|
+
children: h
|
|
235
239
|
})]
|
|
236
240
|
});
|
|
237
241
|
}
|
|
238
|
-
export {
|
|
242
|
+
export { C as CircularProgress, _ as Progress, y as ProgressSegments, u as formatProgressPercent, f as resolveProgressTone };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/feedback/Progress/Progress.module.css
|
|
2
|
-
var e = "
|
|
2
|
+
var e = "_tonePrimary_koq35_23", t = "_toneNeutral_koq35_35", n = "_toneAccent_koq35_49", r = "_toneSuccess_koq35_61", i = "_toneWarning_koq35_73", a = "_toneDanger_koq35_85", o = "_toneInfo_koq35_97", s = "_radiusNone_koq35_117", c = "_radiusXs_koq35_119", l = "_radiusSm_koq35_121", u = "_radiusMd_koq35_123", d = "_radiusLg_koq35_125", f = "_radiusXl_koq35_127", p = "_radius2xl_koq35_129", m = "_radiusPill_koq35_131", h = "_barSm_koq35_143", g = "_barMd_koq35_145", _ = "_barLg_koq35_147", v = "_bar_koq35_143", y = "_segments_koq35_161", b = "_header_koq35_179", x = "_label_koq35_193", S = "_value_koq35_209", C = "_track_koq35_231", w = "_fill_koq35_251", T = "_buffer_koq35_253", E = "_striped_koq35_297", D = "_animated_koq35_325", O = "_stripes_koq35_1", k = "_indeterminate_koq35_355", A = "_sweep_koq35_1", j = "_segmentTrack_koq35_419", M = "_segment_koq35_161", N = "_legend_koq35_455", P = "_legendItem_koq35_473", F = "_swatch_koq35_489", I = "_legendLabel_koq35_529", L = "_legendValue_koq35_537", R = "_ringSm_koq35_559", z = "_ringMd_koq35_561", B = "_ringLg_koq35_563", V = "_ringXl_koq35_565", H = "_circular_koq35_569", U = "_ring_koq35_559", W = "_ringSvg_koq35_605", G = "_ringTrack_koq35_621", K = "_ringFill_koq35_631", q = "_ringEmpty_koq35_651", J = "_ringCenter_koq35_659", Y = "_ringLabel_koq35_697", X = "_spin_koq35_1", Z = "_pulse_koq35_1", Q = {
|
|
3
3
|
tonePrimary: e,
|
|
4
4
|
toneNeutral: t,
|
|
5
5
|
toneAccent: n,
|
|
@@ -3,166 +3,202 @@ import { useControllableState as e } from "../../../hooks/useControllableState.m
|
|
|
3
3
|
import { useFormReset as t } from "../../../hooks/useFormReset.mjs";
|
|
4
4
|
import { cx as n } from "../../../utils/cx.mjs";
|
|
5
5
|
import { CheckIcon as r, MinusIcon as i } from "../../primitives/Icon/icons.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { jsx as
|
|
6
|
+
import { FieldContext as a, useFieldContext as o, useFieldControl as s } from "../Field/FieldContext.mjs";
|
|
7
|
+
import c from "./CheckBox.module.css.mjs";
|
|
8
|
+
import { createContext as l, useCallback as u, useContext as d, useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
|
|
9
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
10
10
|
// src/components/forms/CheckBox/CheckBox.tsx
|
|
11
|
-
var
|
|
12
|
-
sm:
|
|
13
|
-
md:
|
|
14
|
-
lg:
|
|
15
|
-
}, _ = {
|
|
16
|
-
neutral: s.toneNeutral,
|
|
17
|
-
primary: s.tonePrimary,
|
|
18
|
-
accent: s.toneAccent,
|
|
19
|
-
success: s.toneSuccess,
|
|
20
|
-
warning: s.toneWarning,
|
|
21
|
-
danger: s.toneDanger,
|
|
22
|
-
info: s.toneInfo
|
|
23
|
-
}, v = {
|
|
24
|
-
end: s.labelEnd,
|
|
25
|
-
start: s.labelStart
|
|
11
|
+
var v = {
|
|
12
|
+
sm: c.sm,
|
|
13
|
+
md: c.md,
|
|
14
|
+
lg: c.lg
|
|
26
15
|
}, y = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
neutral: c.toneNeutral,
|
|
17
|
+
primary: c.tonePrimary,
|
|
18
|
+
accent: c.toneAccent,
|
|
19
|
+
success: c.toneSuccess,
|
|
20
|
+
warning: c.toneWarning,
|
|
21
|
+
danger: c.toneDanger,
|
|
22
|
+
info: c.toneInfo
|
|
23
|
+
}, b = {
|
|
24
|
+
end: c.labelEnd,
|
|
25
|
+
start: c.labelStart
|
|
26
|
+
}, x = {
|
|
27
|
+
vertical: c.vertical,
|
|
28
|
+
horizontal: c.horizontal
|
|
29
|
+
}, S = l(null);
|
|
30
|
+
function C({ checked: a, defaultChecked: o = !1, onCheckedChange: l, indeterminate: h = !1, label: x, description: C, size: w, tone: T, invalid: E, disabled: D, required: ee, readOnly: te, labelPosition: O = "end", value: k, name: A, id: j, className: M, style: N, ref: P, onChange: F, onClick: I, "aria-describedby": L, ...R }) {
|
|
31
|
+
let z = d(S), B = f(), V = f(), H = s({
|
|
32
|
+
id: j ?? (z ? B : void 0),
|
|
33
|
+
invalid: E ?? z?.invalid,
|
|
34
|
+
required: ee,
|
|
35
|
+
disabled: D ?? (z?.disabled || void 0),
|
|
36
|
+
readOnly: te ?? (z?.readOnly || void 0),
|
|
37
|
+
size: w ?? z?.size,
|
|
38
|
+
"aria-describedby": [C ? V : void 0, L].filter(Boolean).join(" ") || void 0
|
|
39
|
+
}), U = H.id ?? B, W = H.size ?? "md", G = T ?? z?.tone ?? "primary", { disabled: K, readOnly: q, invalid: J } = H, Y = z ? [
|
|
40
|
+
C ? V : void 0,
|
|
41
|
+
z.itemDescribedBy,
|
|
42
|
+
L
|
|
43
|
+
].filter(Boolean).join(" ") || void 0 : H.ariaProps["aria-describedby"], [X, Z] = e({
|
|
44
44
|
value: a,
|
|
45
|
-
defaultValue:
|
|
46
|
-
onChange:
|
|
45
|
+
defaultValue: o,
|
|
46
|
+
onChange: l
|
|
47
47
|
});
|
|
48
|
-
t(() => $.current, () =>
|
|
49
|
-
let Q =
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
t(() => $.current, () => z ? z.reset() : Z(o ?? !1), z ? !0 : a === void 0);
|
|
49
|
+
let Q = k ?? "on", ne = z ? z.value.includes(Q) : X, re = z?.register;
|
|
50
|
+
p(() => re?.(Q, U, !!K), [
|
|
51
|
+
re,
|
|
52
|
+
Q,
|
|
53
|
+
U,
|
|
54
|
+
K
|
|
55
|
+
]);
|
|
56
|
+
let $ = m(null);
|
|
57
|
+
p(() => {
|
|
58
|
+
$.current && ($.current.indeterminate = h);
|
|
52
59
|
});
|
|
53
|
-
let
|
|
54
|
-
if ($.current = e, typeof
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
if (
|
|
60
|
+
let ie = u((e) => {
|
|
61
|
+
if ($.current = e, typeof P == "function") return P(e);
|
|
62
|
+
P && (P.current = e);
|
|
63
|
+
}, [P]), ae = (e) => {
|
|
64
|
+
I?.(e), q && e.preventDefault();
|
|
65
|
+
}, oe = (e) => {
|
|
66
|
+
if (F?.(e), q) return;
|
|
60
67
|
let t = e.target.checked;
|
|
61
|
-
|
|
68
|
+
z ? (z.toggle(Q, t), l?.(t)) : Z(t);
|
|
62
69
|
};
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
className: n(
|
|
65
|
-
style:
|
|
66
|
-
"data-disabled":
|
|
67
|
-
"data-invalid":
|
|
68
|
-
"data-readonly":
|
|
69
|
-
children: [/* @__PURE__ */
|
|
70
|
-
className:
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
-
...
|
|
73
|
-
ref:
|
|
70
|
+
return /* @__PURE__ */ _("div", {
|
|
71
|
+
className: n(c.root, v[W], y[G], b[O], M),
|
|
72
|
+
style: N,
|
|
73
|
+
"data-disabled": K || void 0,
|
|
74
|
+
"data-invalid": J || void 0,
|
|
75
|
+
"data-readonly": q || void 0,
|
|
76
|
+
children: [/* @__PURE__ */ _("span", {
|
|
77
|
+
className: c.controlWrap,
|
|
78
|
+
children: [/* @__PURE__ */ g("input", {
|
|
79
|
+
...R,
|
|
80
|
+
ref: ie,
|
|
74
81
|
type: "checkbox",
|
|
75
|
-
id:
|
|
76
|
-
name:
|
|
82
|
+
id: U,
|
|
83
|
+
name: A ?? z?.name,
|
|
77
84
|
value: Q,
|
|
78
85
|
checked: ne,
|
|
79
|
-
disabled:
|
|
80
|
-
required:
|
|
81
|
-
"aria-describedby":
|
|
82
|
-
"aria-invalid":
|
|
83
|
-
"aria-errormessage":
|
|
84
|
-
"aria-readonly":
|
|
85
|
-
className:
|
|
86
|
-
onClick:
|
|
87
|
-
onChange:
|
|
88
|
-
}), /* @__PURE__ */
|
|
89
|
-
className:
|
|
86
|
+
disabled: K,
|
|
87
|
+
required: z ? void 0 : H.required,
|
|
88
|
+
"aria-describedby": Y,
|
|
89
|
+
"aria-invalid": H.ariaProps["aria-invalid"],
|
|
90
|
+
"aria-errormessage": z ? void 0 : H.ariaProps["aria-errormessage"],
|
|
91
|
+
"aria-readonly": q || void 0,
|
|
92
|
+
className: c.input,
|
|
93
|
+
onClick: ae,
|
|
94
|
+
onChange: oe
|
|
95
|
+
}), /* @__PURE__ */ _("span", {
|
|
96
|
+
className: c.control,
|
|
90
97
|
"aria-hidden": "true",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
-
className: n(
|
|
98
|
+
children: [/* @__PURE__ */ g(r, {
|
|
99
|
+
className: n(c.mark, c.check),
|
|
93
100
|
strokeWidth: 3.5
|
|
94
|
-
}), /* @__PURE__ */
|
|
95
|
-
className: n(
|
|
101
|
+
}), /* @__PURE__ */ g(i, {
|
|
102
|
+
className: n(c.mark, c.minus),
|
|
96
103
|
strokeWidth: 3.5
|
|
97
104
|
})]
|
|
98
105
|
})]
|
|
99
|
-
}), (
|
|
100
|
-
className:
|
|
101
|
-
children: [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
}), (x || C) && /* @__PURE__ */ _("span", {
|
|
107
|
+
className: c.text,
|
|
108
|
+
children: [x && /* @__PURE__ */ g("label", {
|
|
109
|
+
id: `${U}-label`,
|
|
110
|
+
htmlFor: U,
|
|
111
|
+
className: c.label,
|
|
112
|
+
children: x
|
|
113
|
+
}), C && /* @__PURE__ */ g("span", {
|
|
114
|
+
id: V,
|
|
115
|
+
className: c.description,
|
|
108
116
|
children: C
|
|
109
117
|
})]
|
|
110
118
|
})]
|
|
111
119
|
});
|
|
112
120
|
}
|
|
113
|
-
function
|
|
114
|
-
let
|
|
115
|
-
invalid:
|
|
116
|
-
disabled:
|
|
117
|
-
readOnly:
|
|
118
|
-
size:
|
|
119
|
-
"aria-describedby": [
|
|
120
|
-
}), [
|
|
121
|
+
function w({ value: t, defaultValue: r = [], onValueChange: i, name: l, orientation: d = "vertical", size: p, tone: m, disabled: y, readOnly: b, invalid: w, label: T, description: E, selectAll: D, className: ee, children: te, "aria-labelledby": O, "aria-describedby": k, ...A }) {
|
|
122
|
+
let j = o(), M = f(), N = f(), P = f(), F = s({
|
|
123
|
+
invalid: w,
|
|
124
|
+
disabled: y,
|
|
125
|
+
readOnly: b,
|
|
126
|
+
size: p,
|
|
127
|
+
"aria-describedby": [E ? N : void 0, k].filter(Boolean).join(" ") || void 0
|
|
128
|
+
}), [I, L] = e({
|
|
121
129
|
value: t,
|
|
122
130
|
defaultValue: r,
|
|
123
131
|
onChange: i
|
|
124
|
-
}),
|
|
125
|
-
|
|
126
|
-
}, [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
}), R = u((e, t) => {
|
|
133
|
+
L((n) => t ? n.includes(e) ? n : [...n, e] : n.filter((t) => t !== e));
|
|
134
|
+
}, [L]), [z, B] = h(() => /* @__PURE__ */ new Map()), V = D != null && D !== !1, H = u((e, t, n) => (B((r) => new Map(r).set(e, {
|
|
135
|
+
id: t,
|
|
136
|
+
disabled: n
|
|
137
|
+
})), () => B((n) => {
|
|
138
|
+
if (n.get(e)?.id !== t) return n;
|
|
139
|
+
let r = new Map(n);
|
|
140
|
+
return r.delete(e), r;
|
|
141
|
+
})), []), U = [...z].filter(([, e]) => !e.disabled).map(([e]) => e), W = U.length > 0 && U.every((e) => I.includes(e)), G = [...z.keys()].some((e) => I.includes(e)), K = (e) => L((t) => e ? [...t, ...U.filter((e) => !t.includes(e))] : t.filter((e) => !U.includes(e))), q = j?.isGroup === !0 && !O && !T, J = [O, T ? M : void 0].filter(Boolean).join(" ") || void 0, Y = [E ? N : void 0, k].filter(Boolean).join(" ") || void 0, X = {
|
|
142
|
+
name: l,
|
|
143
|
+
value: I,
|
|
144
|
+
toggle: R,
|
|
145
|
+
size: F.size,
|
|
146
|
+
tone: m,
|
|
147
|
+
disabled: F.disabled,
|
|
148
|
+
readOnly: F.readOnly,
|
|
149
|
+
invalid: F.invalid,
|
|
135
150
|
reset: () => {
|
|
136
|
-
t === void 0 &&
|
|
151
|
+
t === void 0 && L(r ?? []);
|
|
137
152
|
},
|
|
138
|
-
itemDescribedBy:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
role:
|
|
143
|
-
"aria-labelledby":
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
value: z,
|
|
153
|
+
itemDescribedBy: q ? Y : void 0,
|
|
154
|
+
register: V ? H : void 0
|
|
155
|
+
}, Z = /* @__PURE__ */ g("div", {
|
|
156
|
+
className: n(c.options, x[d], V && c.selectAllOptions),
|
|
157
|
+
role: V ? "group" : void 0,
|
|
158
|
+
"aria-labelledby": V ? `${P}-label` : void 0,
|
|
159
|
+
children: /* @__PURE__ */ g(S.Provider, {
|
|
160
|
+
value: X,
|
|
161
|
+
children: te
|
|
162
|
+
})
|
|
163
|
+
});
|
|
164
|
+
return /* @__PURE__ */ _("div", {
|
|
165
|
+
...A,
|
|
166
|
+
role: q ? void 0 : "group",
|
|
167
|
+
"aria-labelledby": q ? void 0 : J,
|
|
168
|
+
"aria-describedby": q ? Y : F.ariaProps["aria-describedby"],
|
|
169
|
+
className: n(c.group, v[F.size ?? "md"], ee),
|
|
170
|
+
"data-disabled": F.disabled || void 0,
|
|
171
|
+
"aria-disabled": F.disabled || void 0,
|
|
172
|
+
children: [(T || E) && /* @__PURE__ */ _("div", {
|
|
173
|
+
className: c.groupHeader,
|
|
174
|
+
children: [T && /* @__PURE__ */ g("span", {
|
|
175
|
+
id: M,
|
|
176
|
+
className: c.groupLabel,
|
|
163
177
|
children: T
|
|
164
|
-
})
|
|
165
|
-
|
|
178
|
+
}), E && /* @__PURE__ */ g("span", {
|
|
179
|
+
id: N,
|
|
180
|
+
className: c.description,
|
|
181
|
+
children: E
|
|
182
|
+
})]
|
|
183
|
+
}), V ? /* @__PURE__ */ _("div", {
|
|
184
|
+
className: c.selectAll,
|
|
185
|
+
children: [/* @__PURE__ */ g(a.Provider, {
|
|
186
|
+
value: null,
|
|
187
|
+
children: /* @__PURE__ */ g(C, {
|
|
188
|
+
id: P,
|
|
189
|
+
label: D,
|
|
190
|
+
checked: W,
|
|
191
|
+
indeterminate: G && !W,
|
|
192
|
+
onCheckedChange: K,
|
|
193
|
+
"aria-controls": [...z.values()].map((e) => e.id).join(" ") || void 0,
|
|
194
|
+
size: F.size,
|
|
195
|
+
tone: m,
|
|
196
|
+
disabled: F.disabled || U.length === 0,
|
|
197
|
+
readOnly: F.readOnly,
|
|
198
|
+
invalid: F.invalid
|
|
199
|
+
})
|
|
200
|
+
}), Z]
|
|
201
|
+
}) : Z]
|
|
166
202
|
});
|
|
167
203
|
}
|
|
168
|
-
export {
|
|
204
|
+
export { C as CheckBox, w as CheckBoxGroup };
|