@vjdesigns/vjdesigns-ui 2.4.0 → 2.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/LICENSE +15 -0
- package/README.md +45 -1
- package/dist/ai/llms-full.txt +133 -76
- package/dist/ai/registry.json +82 -61
- package/dist/components/data-display/Accordion/Accordion.cjs.js +1 -1
- package/dist/components/data-display/Accordion/Accordion.mjs +22 -22
- package/dist/components/data-display/Accordion/Accordion.module.css.mjs +1 -2
- package/dist/components/data-display/Avatar/Avatar.cjs.js +1 -1
- package/dist/components/data-display/Avatar/Avatar.mjs +92 -92
- package/dist/components/data-display/Avatar/Avatar.module.css.mjs +1 -2
- package/dist/components/data-display/Badge/Badge.cjs.js +1 -1
- package/dist/components/data-display/Badge/Badge.mjs +2 -2
- package/dist/components/data-display/Badge/Badge.module.css.mjs +1 -2
- package/dist/components/data-display/Card/Card.cjs.js +1 -1
- package/dist/components/data-display/Card/Card.mjs +2 -2
- package/dist/components/data-display/Card/Card.module.css.mjs +1 -2
- package/dist/components/data-display/Carousel/Carousel.cjs.js +1 -1
- package/dist/components/data-display/Carousel/Carousel.mjs +42 -42
- package/dist/components/data-display/Carousel/Carousel.module.css.mjs +1 -2
- package/dist/components/data-display/Chat/Chat.cjs.js +1 -1
- package/dist/components/data-display/Chat/Chat.mjs +114 -118
- package/dist/components/data-display/Chat/Chat.module.css.mjs +1 -2
- package/dist/components/data-display/Chat/streams.mjs +1 -2
- package/dist/components/data-display/Chip/Chip.cjs.js +1 -1
- package/dist/components/data-display/Chip/Chip.mjs +50 -54
- package/dist/components/data-display/Chip/Chip.module.css.mjs +1 -2
- package/dist/components/data-display/CodeBlock/CodeBlock.cjs.js +4 -4
- package/dist/components/data-display/CodeBlock/CodeBlock.mjs +113 -113
- package/dist/components/data-display/CodeBlock/CodeBlock.module.css.mjs +1 -2
- package/dist/components/data-display/CodeBlock/tokenize.mjs +1 -2
- package/dist/components/data-display/DataGrid/DataGrid.cjs.js +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.d.ts +14 -3
- package/dist/components/data-display/DataGrid/DataGrid.mjs +352 -267
- package/dist/components/data-display/DataGrid/DataGrid.module.css.cjs.js +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.module.css.mjs +6 -5
- package/dist/components/data-display/DataGrid/dataGridUtils.cjs.js +1 -1
- package/dist/components/data-display/DataGrid/dataGridUtils.d.ts +18 -0
- package/dist/components/data-display/DataGrid/dataGridUtils.mjs +100 -32
- package/dist/components/data-display/EmptyState/EmptyState.cjs.js +1 -1
- package/dist/components/data-display/EmptyState/EmptyState.mjs +53 -53
- package/dist/components/data-display/EmptyState/EmptyState.module.css.mjs +1 -2
- package/dist/components/data-display/Image/Image.cjs.js +1 -1
- package/dist/components/data-display/Image/Image.mjs +6 -6
- package/dist/components/data-display/Image/Image.module.css.mjs +1 -2
- package/dist/components/data-display/List/List.cjs.js +1 -1
- package/dist/components/data-display/List/List.mjs +68 -68
- package/dist/components/data-display/List/List.module.css.mjs +1 -2
- package/dist/components/data-display/Stat/Stat.cjs.js +1 -1
- package/dist/components/data-display/Stat/Stat.mjs +112 -112
- package/dist/components/data-display/Stat/Stat.module.css.mjs +1 -2
- package/dist/components/data-display/Table/Table.cjs.js +1 -1
- package/dist/components/data-display/Table/Table.mjs +187 -183
- package/dist/components/data-display/Table/Table.module.css.mjs +1 -2
- package/dist/components/data-display/Table/useTable.cjs.js +1 -1
- package/dist/components/data-display/Table/useTable.mjs +2 -2
- package/dist/components/data-display/Timeline/Timeline.cjs.js +1 -1
- package/dist/components/data-display/Timeline/Timeline.mjs +64 -64
- package/dist/components/data-display/Timeline/Timeline.module.css.mjs +1 -2
- package/dist/components/data-display/TreeView/TreeView.cjs.js +1 -1
- package/dist/components/data-display/TreeView/TreeView.mjs +107 -119
- package/dist/components/data-display/TreeView/TreeView.module.css.mjs +1 -2
- package/dist/components/data-display/TreeView/treeUtils.mjs +1 -2
- package/dist/components/data-display/VirtualList/VirtualList.cjs.js +1 -1
- package/dist/components/data-display/VirtualList/VirtualList.mjs +2 -2
- package/dist/components/data-display/VirtualList/VirtualList.module.css.mjs +1 -2
- package/dist/components/feedback/Alert/Alert.cjs.js +1 -1
- package/dist/components/feedback/Alert/Alert.mjs +56 -56
- package/dist/components/feedback/Alert/Alert.module.css.mjs +1 -2
- package/dist/components/feedback/Banner/Banner.cjs.js +1 -1
- package/dist/components/feedback/Banner/Banner.mjs +48 -48
- package/dist/components/feedback/Banner/Banner.module.css.mjs +1 -2
- package/dist/components/feedback/ErrorSummary/ErrorSummary.cjs.js +1 -1
- package/dist/components/feedback/ErrorSummary/ErrorSummary.mjs +10 -10
- package/dist/components/feedback/ErrorSummary/ErrorSummary.module.css.mjs +1 -2
- package/dist/components/feedback/Progress/Progress.cjs.js +1 -1
- package/dist/components/feedback/Progress/Progress.mjs +2 -2
- package/dist/components/feedback/Progress/Progress.module.css.mjs +1 -2
- package/dist/components/feedback/Skeleton/Skeleton.cjs.js +1 -1
- package/dist/components/feedback/Skeleton/Skeleton.mjs +73 -73
- package/dist/components/feedback/Skeleton/Skeleton.module.css.mjs +1 -2
- package/dist/components/feedback/Spinner/Spinner.cjs.js +1 -1
- package/dist/components/feedback/Spinner/Spinner.mjs +29 -29
- package/dist/components/feedback/Spinner/Spinner.module.css.mjs +1 -2
- package/dist/components/feedback/Toast/Toast.cjs.js +1 -1
- package/dist/components/feedback/Toast/Toast.mjs +42 -42
- package/dist/components/feedback/Toast/Toast.module.css.mjs +1 -2
- package/dist/components/feedback/Toast/ToastItem.cjs.js +1 -1
- package/dist/components/feedback/Toast/ToastItem.mjs +10 -10
- package/dist/components/feedback/Toast/ToastProvider.cjs.js +1 -1
- package/dist/components/feedback/Toast/ToastProvider.mjs +11 -11
- package/dist/components/feedback/Toast/ToastViewport.cjs.js +1 -1
- package/dist/components/feedback/Toast/ToastViewport.mjs +30 -30
- package/dist/components/feedback/Toast/toastStore.mjs +1 -2
- package/dist/components/feedback/Toast/toastTiming.cjs.js +1 -1
- package/dist/components/feedback/Toast/toastTiming.mjs +2 -2
- package/dist/components/feedback/Toast/useToast.cjs.js +1 -1
- package/dist/components/feedback/Toast/useToast.mjs +2 -2
- package/dist/components/feedback/Toast/useToastAnnouncer.cjs.js +1 -1
- package/dist/components/feedback/Toast/useToastAnnouncer.mjs +2 -2
- package/dist/components/forms/CheckBox/CheckBox.cjs.js +1 -1
- package/dist/components/forms/CheckBox/CheckBox.mjs +2 -2
- package/dist/components/forms/CheckBox/CheckBox.module.css.mjs +1 -2
- package/dist/components/forms/ColorPicker/ColorInput.cjs.js +1 -1
- package/dist/components/forms/ColorPicker/ColorInput.mjs +43 -43
- package/dist/components/forms/ColorPicker/ColorPicker.cjs.js +1 -1
- package/dist/components/forms/ColorPicker/ColorPicker.mjs +153 -153
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.mjs +1 -2
- package/dist/components/forms/ColorPicker/colorUtils.mjs +1 -2
- package/dist/components/forms/Combobox/Combobox.cjs.js +1 -1
- package/dist/components/forms/Combobox/Combobox.mjs +200 -213
- package/dist/components/forms/Combobox/Combobox.module.css.mjs +1 -2
- package/dist/components/forms/Combobox/ComboboxPopup.cjs.js +1 -1
- package/dist/components/forms/Combobox/ComboboxPopup.mjs +164 -121
- package/dist/components/forms/Combobox/comboboxUtils.cjs.js +1 -1
- package/dist/components/forms/Combobox/comboboxUtils.d.ts +4 -1
- package/dist/components/forms/Combobox/comboboxUtils.mjs +21 -20
- package/dist/components/forms/DatePicker/Calendar.cjs.js +1 -1
- package/dist/components/forms/DatePicker/Calendar.mjs +60 -66
- package/dist/components/forms/DatePicker/Calendar.module.css.mjs +1 -2
- package/dist/components/forms/DatePicker/DatePicker.cjs.js +1 -1
- package/dist/components/forms/DatePicker/DatePicker.mjs +72 -74
- package/dist/components/forms/DatePicker/DatePicker.module.css.mjs +1 -2
- package/dist/components/forms/DatePicker/DateRangePicker.cjs.js +1 -1
- package/dist/components/forms/DatePicker/DateRangePicker.mjs +117 -117
- package/dist/components/forms/DatePicker/DateRangePicker.module.css.mjs +1 -2
- package/dist/components/forms/DatePicker/dateUtils.mjs +1 -2
- package/dist/components/forms/DateTimePicker/DateTimePicker.cjs.js +1 -1
- package/dist/components/forms/DateTimePicker/DateTimePicker.mjs +19 -19
- package/dist/components/forms/DateTimePicker/DateTimePicker.module.css.mjs +1 -2
- package/dist/components/forms/Field/Field.cjs.js +1 -1
- package/dist/components/forms/Field/Field.mjs +14 -14
- package/dist/components/forms/Field/Field.module.css.mjs +1 -2
- package/dist/components/forms/Field/FieldContext.cjs.js +1 -1
- package/dist/components/forms/Field/FieldContext.mjs +2 -2
- package/dist/components/forms/FileUpload/FileUpload.cjs.js +1 -1
- package/dist/components/forms/FileUpload/FileUpload.mjs +250 -255
- package/dist/components/forms/FileUpload/FileUpload.module.css.mjs +1 -2
- package/dist/components/forms/Input/Input.cjs.js +1 -1
- package/dist/components/forms/Input/Input.mjs +35 -35
- package/dist/components/forms/Input/Input.module.css.mjs +1 -2
- package/dist/components/forms/NumberInput/NumberInput.cjs.js +1 -1
- package/dist/components/forms/NumberInput/NumberInput.mjs +137 -142
- package/dist/components/forms/NumberInput/NumberInput.module.css.mjs +1 -2
- package/dist/components/forms/PasswordInput/PasswordInput.cjs.js +1 -1
- package/dist/components/forms/PasswordInput/PasswordInput.mjs +142 -142
- package/dist/components/forms/PasswordInput/PasswordInput.module.css.mjs +1 -2
- package/dist/components/forms/PinInput/PinInput.cjs.js +1 -1
- package/dist/components/forms/PinInput/PinInput.mjs +12 -12
- package/dist/components/forms/PinInput/PinInput.module.css.mjs +1 -2
- package/dist/components/forms/Radio/Radio.cjs.js +1 -1
- package/dist/components/forms/Radio/Radio.mjs +2 -2
- package/dist/components/forms/Radio/Radio.module.css.mjs +1 -2
- package/dist/components/forms/Rating/Rating.cjs.js +1 -1
- package/dist/components/forms/Rating/Rating.mjs +110 -109
- package/dist/components/forms/Rating/Rating.module.css.mjs +1 -2
- package/dist/components/forms/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/forms/SearchInput/SearchInput.mjs +118 -126
- package/dist/components/forms/SearchInput/SearchInput.module.css.mjs +1 -2
- package/dist/components/forms/SegmentedControl/SegmentedControl.cjs.js +1 -1
- package/dist/components/forms/SegmentedControl/SegmentedControl.mjs +46 -43
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.mjs +1 -2
- package/dist/components/forms/Select/Select.cjs.js +1 -1
- package/dist/components/forms/Select/Select.mjs +2 -2
- package/dist/components/forms/Select/Select.module.css.mjs +1 -2
- package/dist/components/forms/Slider/Slider.cjs.js +1 -1
- package/dist/components/forms/Slider/Slider.mjs +2 -2
- package/dist/components/forms/Slider/Slider.module.css.mjs +1 -2
- package/dist/components/forms/Switch/Switch.cjs.js +1 -1
- package/dist/components/forms/Switch/Switch.mjs +39 -39
- package/dist/components/forms/Switch/Switch.module.css.mjs +1 -2
- package/dist/components/forms/TagInput/TagInput.cjs.js +1 -1
- package/dist/components/forms/TagInput/TagInput.mjs +197 -203
- package/dist/components/forms/TagInput/TagInput.module.css.mjs +1 -2
- package/dist/components/forms/Textarea/Textarea.cjs.js +1 -1
- package/dist/components/forms/Textarea/Textarea.mjs +59 -59
- package/dist/components/forms/Textarea/Textarea.module.css.mjs +1 -2
- package/dist/components/forms/TimePicker/TimePicker.cjs.js +1 -1
- package/dist/components/forms/TimePicker/TimePicker.mjs +14 -16
- package/dist/components/forms/TimePicker/TimePicker.module.css.mjs +1 -2
- package/dist/components/forms/TimePicker/timeUtils.cjs.js +1 -1
- package/dist/components/forms/TimePicker/timeUtils.d.ts +4 -1
- package/dist/components/forms/TimePicker/timeUtils.mjs +43 -38
- package/dist/components/forms/ToggleGroup/ToggleGroup.cjs.js +1 -1
- package/dist/components/forms/ToggleGroup/ToggleGroup.mjs +10 -10
- package/dist/components/forms/ToggleGroup/ToggleGroup.module.css.mjs +1 -2
- package/dist/components/layout/Box/Box.mjs +1 -2
- package/dist/components/layout/Box/Box.module.css.mjs +1 -2
- package/dist/components/layout/Container/Container.mjs +1 -2
- package/dist/components/layout/Container/Container.module.css.mjs +1 -2
- package/dist/components/layout/Divider/Divider.mjs +1 -2
- package/dist/components/layout/Divider/Divider.module.css.mjs +1 -2
- package/dist/components/layout/Flex/Flex.cjs.js +1 -1
- package/dist/components/layout/Flex/Flex.mjs +12 -13
- package/dist/components/layout/Flex/Flex.module.css.mjs +1 -2
- package/dist/components/layout/Grid/Grid.cjs.js +1 -1
- package/dist/components/layout/Grid/Grid.mjs +20 -21
- package/dist/components/layout/Grid/Grid.module.css.mjs +1 -2
- package/dist/components/layout/ResizablePanels/ResizablePanels.cjs.js +1 -1
- package/dist/components/layout/ResizablePanels/ResizablePanels.mjs +17 -17
- package/dist/components/layout/ResizablePanels/ResizablePanels.module.css.mjs +1 -2
- package/dist/components/layout/ScrollArea/ScrollArea.cjs.js +1 -1
- package/dist/components/layout/ScrollArea/ScrollArea.mjs +2 -2
- package/dist/components/layout/ScrollArea/ScrollArea.module.css.mjs +1 -2
- package/dist/components/layout/Stack/Stack.cjs.js +1 -1
- package/dist/components/layout/Stack/Stack.mjs +8 -9
- package/dist/components/layout/Stack/Stack.module.css.mjs +1 -2
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.mjs +41 -41
- package/dist/components/navigation/Breadcrumbs/Breadcrumbs.module.css.mjs +1 -2
- package/dist/components/navigation/ContextMenu/ContextMenu.cjs.js +1 -1
- package/dist/components/navigation/ContextMenu/ContextMenu.mjs +48 -48
- package/dist/components/navigation/ContextMenu/ContextMenu.module.css.mjs +1 -2
- package/dist/components/navigation/Link/Link.cjs.js +1 -1
- package/dist/components/navigation/Link/Link.mjs +6 -7
- package/dist/components/navigation/Link/Link.module.css.mjs +1 -2
- package/dist/components/navigation/Menu/Menu.cjs.js +1 -1
- package/dist/components/navigation/Menu/Menu.mjs +11 -11
- package/dist/components/navigation/Menu/Menu.module.css.mjs +1 -2
- package/dist/components/navigation/Menu/MenuContent.cjs.js +1 -1
- package/dist/components/navigation/Menu/MenuContent.mjs +46 -46
- package/dist/components/navigation/Menu/MenuContext.cjs.js +1 -1
- package/dist/components/navigation/Menu/MenuContext.mjs +2 -2
- package/dist/components/navigation/Menu/MenuItem.cjs.js +1 -1
- package/dist/components/navigation/Menu/MenuItem.mjs +35 -39
- package/dist/components/navigation/Menu/MenuSub.cjs.js +1 -1
- package/dist/components/navigation/Menu/MenuSub.mjs +16 -20
- package/dist/components/navigation/Menu/useMenuRoot.cjs.js +1 -1
- package/dist/components/navigation/Menu/useMenuRoot.mjs +2 -2
- package/dist/components/navigation/Navbar/Navbar.cjs.js +1 -1
- package/dist/components/navigation/Navbar/Navbar.mjs +111 -111
- package/dist/components/navigation/Navbar/Navbar.module.css.mjs +1 -2
- package/dist/components/navigation/Pagination/Pagination.cjs.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.mjs +31 -35
- package/dist/components/navigation/Pagination/Pagination.module.css.mjs +1 -2
- package/dist/components/navigation/Sidebar/Sidebar.cjs.js +1 -1
- package/dist/components/navigation/Sidebar/Sidebar.mjs +52 -52
- package/dist/components/navigation/Sidebar/Sidebar.module.css.mjs +1 -2
- package/dist/components/navigation/Sidebar/SidebarContext.cjs.js +1 -1
- package/dist/components/navigation/Sidebar/SidebarContext.mjs +2 -2
- package/dist/components/navigation/Sidebar/SidebarParts.cjs.js +1 -1
- package/dist/components/navigation/Sidebar/SidebarParts.mjs +76 -80
- package/dist/components/navigation/SkipLink/SkipLink.cjs.js +1 -1
- package/dist/components/navigation/SkipLink/SkipLink.mjs +12 -12
- package/dist/components/navigation/SkipLink/SkipLink.module.css.mjs +1 -2
- package/dist/components/navigation/Stepper/Stepper.cjs.js +1 -1
- package/dist/components/navigation/Stepper/Stepper.mjs +46 -46
- package/dist/components/navigation/Stepper/Stepper.module.css.mjs +1 -2
- package/dist/components/navigation/Tabs/Tabs.cjs.js +1 -1
- package/dist/components/navigation/Tabs/Tabs.mjs +2 -2
- package/dist/components/navigation/Tabs/Tabs.module.css.mjs +1 -2
- package/dist/components/overlays/CommandPalette/CommandPalette.cjs.js +1 -1
- package/dist/components/overlays/CommandPalette/CommandPalette.mjs +206 -206
- package/dist/components/overlays/CommandPalette/CommandPalette.module.css.mjs +1 -2
- package/dist/components/overlays/CommandPalette/CommandPaletteContext.cjs.js +1 -1
- package/dist/components/overlays/CommandPalette/CommandPaletteContext.mjs +2 -2
- package/dist/components/overlays/CommandPalette/CommandPaletteParts.cjs.js +1 -1
- package/dist/components/overlays/CommandPalette/CommandPaletteParts.mjs +104 -104
- package/dist/components/overlays/CommandPalette/commandPaletteUtils.cjs.js +1 -1
- package/dist/components/overlays/CommandPalette/commandPaletteUtils.mjs +62 -60
- package/dist/components/overlays/Drawer/Drawer.cjs.js +1 -1
- package/dist/components/overlays/Drawer/Drawer.mjs +31 -31
- package/dist/components/overlays/Drawer/Drawer.module.css.mjs +1 -2
- package/dist/components/overlays/Drawer/DrawerContent.cjs.js +1 -1
- package/dist/components/overlays/Drawer/DrawerContent.mjs +99 -99
- package/dist/components/overlays/Drawer/DrawerContext.cjs.js +1 -1
- package/dist/components/overlays/Drawer/DrawerContext.mjs +2 -2
- package/dist/components/overlays/Drawer/DrawerParts.cjs.js +1 -1
- package/dist/components/overlays/Drawer/DrawerParts.mjs +18 -18
- package/dist/components/overlays/Drawer/internal.mjs +1 -2
- package/dist/components/overlays/Drawer/useDragToClose.cjs.js +1 -1
- package/dist/components/overlays/Drawer/useDragToClose.mjs +2 -2
- package/dist/components/overlays/HoverCard/HoverCard.cjs.js +1 -1
- package/dist/components/overlays/HoverCard/HoverCard.mjs +31 -31
- package/dist/components/overlays/HoverCard/HoverCard.module.css.mjs +1 -2
- package/dist/components/overlays/Modal/ConfirmModal.cjs.js +1 -1
- package/dist/components/overlays/Modal/ConfirmModal.mjs +21 -23
- package/dist/components/overlays/Modal/Modal.cjs.js +1 -1
- package/dist/components/overlays/Modal/Modal.mjs +47 -47
- package/dist/components/overlays/Modal/Modal.module.css.mjs +1 -2
- package/dist/components/overlays/Modal/ModalContent.cjs.js +1 -1
- package/dist/components/overlays/Modal/ModalContent.mjs +24 -24
- package/dist/components/overlays/Modal/ModalContext.cjs.js +1 -1
- package/dist/components/overlays/Modal/ModalContext.mjs +2 -2
- package/dist/components/overlays/Modal/useScrollRegion.cjs.js +1 -1
- package/dist/components/overlays/Modal/useScrollRegion.mjs +2 -2
- package/dist/components/overlays/Popover/Popover.cjs.js +1 -1
- package/dist/components/overlays/Popover/Popover.mjs +40 -40
- package/dist/components/overlays/Popover/Popover.module.css.mjs +1 -2
- package/dist/components/overlays/Popover/PopoverContent.cjs.js +1 -1
- package/dist/components/overlays/Popover/PopoverContent.mjs +39 -39
- package/dist/components/overlays/Popover/PopoverContext.cjs.js +1 -1
- package/dist/components/overlays/Popover/PopoverContext.mjs +2 -2
- package/dist/components/overlays/Tooltip/Tooltip.cjs.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.mjs +100 -95
- package/dist/components/overlays/Tooltip/Tooltip.module.css.mjs +1 -2
- package/dist/components/primitives/Button/Button.cjs.js +1 -1
- package/dist/components/primitives/Button/Button.mjs +59 -63
- package/dist/components/primitives/Button/Button.module.css.mjs +1 -2
- package/dist/components/primitives/Icon/Icon.cjs.js +1 -1
- package/dist/components/primitives/Icon/Icon.mjs +5 -6
- package/dist/components/primitives/Icon/Icon.module.css.mjs +1 -2
- package/dist/components/primitives/Icon/IconSvg.mjs +1 -2
- package/dist/components/primitives/Icon/icons.mjs +1 -2
- package/dist/components/primitives/Kbd/Kbd.cjs.js +1 -1
- package/dist/components/primitives/Kbd/Kbd.mjs +30 -30
- package/dist/components/primitives/Kbd/Kbd.module.css.mjs +1 -2
- package/dist/components/primitives/Typography/Typography.mjs +1 -2
- package/dist/components/primitives/Typography/Typography.module.css.mjs +1 -2
- package/dist/components/utilities/LocaleProvider/LocaleProvider.cjs.js +1 -1
- package/dist/components/utilities/LocaleProvider/LocaleProvider.mjs +11 -11
- package/dist/components/utilities/LocaleProvider/LocaleProvider.module.css.mjs +1 -2
- package/dist/components/utilities/Portal/Portal.cjs.js +1 -1
- package/dist/components/utilities/Portal/Portal.mjs +2 -2
- package/dist/components/utilities/Theme/Theme.cjs.js +1 -1
- package/dist/components/utilities/Theme/Theme.mjs +13 -13
- package/dist/components/utilities/Theme/Theme.module.css.mjs +1 -2
- package/dist/components/utilities/VisuallyHidden/VisuallyHidden.mjs +1 -2
- package/dist/components/utilities/VisuallyHidden/VisuallyHidden.module.css.mjs +1 -2
- package/dist/hooks/elementSource.cjs.js +1 -1
- package/dist/hooks/elementSource.mjs +4 -3
- package/dist/hooks/useClipboard.cjs.js +1 -1
- package/dist/hooks/useClipboard.mjs +2 -2
- package/dist/hooks/useControllableState.cjs.js +1 -1
- package/dist/hooks/useControllableState.mjs +2 -2
- package/dist/hooks/useDisclosure.cjs.js +1 -1
- package/dist/hooks/useDisclosure.mjs +2 -2
- package/dist/hooks/useDismiss.cjs.js +1 -1
- package/dist/hooks/useDismiss.mjs +2 -2
- package/dist/hooks/useElementObservers.cjs.js +1 -1
- package/dist/hooks/useElementObservers.mjs +2 -2
- package/dist/hooks/useEnvironment.cjs.js +1 -1
- package/dist/hooks/useEnvironment.mjs +2 -2
- package/dist/hooks/useFloatingPosition.cjs.js +1 -1
- package/dist/hooks/useFloatingPosition.mjs +2 -2
- package/dist/hooks/useFocusTrap.cjs.js +1 -1
- package/dist/hooks/useFocusTrap.mjs +4 -15
- package/dist/hooks/useFormReset.cjs.js +1 -1
- package/dist/hooks/useFormReset.mjs +2 -2
- package/dist/hooks/useFormValidation.cjs.js +1 -1
- package/dist/hooks/useFormValidation.mjs +2 -2
- package/dist/hooks/useHotkeys.cjs.js +1 -1
- package/dist/hooks/useHotkeys.mjs +2 -2
- package/dist/hooks/useInertOutside.cjs.js +1 -1
- package/dist/hooks/useInertOutside.mjs +5 -9
- package/dist/hooks/useMediaQuery.cjs.js +1 -1
- package/dist/hooks/useMediaQuery.mjs +2 -2
- package/dist/hooks/useMergedRef.cjs.js +1 -1
- package/dist/hooks/useMergedRef.mjs +2 -2
- package/dist/hooks/useOverlayLayer.cjs.js +1 -1
- package/dist/hooks/useOverlayLayer.mjs +3 -3
- package/dist/hooks/useResponsiveValue.cjs.js +1 -1
- package/dist/hooks/useResponsiveValue.mjs +2 -2
- package/dist/hooks/useScrollLock.cjs.js +1 -1
- package/dist/hooks/useScrollLock.mjs +2 -2
- package/dist/hooks/useStorage.cjs.js +1 -1
- package/dist/hooks/useStorage.mjs +2 -2
- package/dist/hooks/useTiming.cjs.js +1 -1
- package/dist/hooks/useTiming.mjs +10 -15
- package/dist/hooks/useVirtualizer.cjs.js +1 -1
- package/dist/hooks/useVirtualizer.d.ts +13 -0
- package/dist/hooks/useVirtualizer.mjs +93 -54
- package/dist/i18n/en.mjs +1 -2
- package/dist/i18n/merge.mjs +1 -2
- package/dist/i18n/plural.mjs +1 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +114 -114
- package/dist/locales/ar.mjs +1 -2
- package/dist/locales/bn.mjs +1 -2
- package/dist/locales/cs.mjs +1 -2
- package/dist/locales/da.mjs +1 -2
- package/dist/locales/de.mjs +1 -2
- package/dist/locales/el.mjs +1 -2
- package/dist/locales/es.mjs +1 -2
- package/dist/locales/fa.mjs +1 -2
- package/dist/locales/fi.mjs +1 -2
- package/dist/locales/fr.mjs +1 -2
- package/dist/locales/he.mjs +1 -2
- package/dist/locales/hi.mjs +1 -2
- package/dist/locales/hu.mjs +1 -2
- package/dist/locales/id.mjs +1 -2
- package/dist/locales/it.mjs +1 -2
- package/dist/locales/ja.mjs +1 -2
- package/dist/locales/ko.mjs +1 -2
- package/dist/locales/nb.mjs +1 -2
- package/dist/locales/nl.mjs +1 -2
- package/dist/locales/pl.mjs +1 -2
- package/dist/locales/pt-BR.mjs +1 -2
- package/dist/locales/ro.mjs +1 -2
- package/dist/locales/ru.mjs +1 -2
- package/dist/locales/sv.mjs +1 -2
- package/dist/locales/th.mjs +1 -2
- package/dist/locales/tr.mjs +1 -2
- package/dist/locales/uk.mjs +1 -2
- package/dist/locales/ur.mjs +1 -2
- package/dist/locales/vi.mjs +1 -2
- package/dist/locales/zh-Hans.mjs +1 -2
- package/dist/locales/zh-Hant.mjs +1 -2
- package/dist/types/common.mjs +1 -2
- package/dist/utils/announce.cjs.js +1 -1
- package/dist/utils/announce.mjs +3 -4
- package/dist/utils/brandPalette.mjs +1 -2
- package/dist/utils/clipboard.mjs +1 -2
- package/dist/utils/cx.mjs +1 -2
- package/dist/utils/fillSlot.cjs.js +1 -1
- package/dist/utils/fillSlot.mjs +2 -2
- package/dist/utils/flattenChildren.mjs +1 -2
- package/dist/utils/hotkeys.mjs +1 -2
- package/dist/utils/intl.cjs.js +1 -0
- package/dist/utils/intl.d.ts +10 -0
- package/dist/utils/intl.mjs +15 -0
- package/dist/utils/refs.mjs +1 -2
- package/dist/utils/responsive.mjs +1 -2
- package/dist/utils/slot.mjs +1 -2
- package/dist/utils/validators.mjs +1 -2
- package/dist/vjdesigns-ui.css +1 -1
- package/dist/vjdesigns-ui.css.d.ts +2 -0
- package/package.json +24 -14
|
@@ -1,153 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { useControllableState as e } from "../../../hooks/useControllableState.mjs";
|
|
2
3
|
import { useDismiss as t } from "../../../hooks/useDismiss.mjs";
|
|
3
4
|
import { useFloatingPosition as n } from "../../../hooks/useFloatingPosition.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { cx as r } from "../../../utils/cx.mjs";
|
|
6
|
+
import { assignRef as i } from "../../../utils/refs.mjs";
|
|
7
|
+
import { KbdShortcut as ee } from "../../primitives/Kbd/Kbd.mjs";
|
|
6
8
|
import { Portal as te } from "../../utilities/Portal/Portal.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function p(e, t) {
|
|
9
|
+
import a from "./Tooltip.module.css.mjs";
|
|
10
|
+
import { Children as o, cloneElement as ne, createContext as s, isValidElement as c, useCallback as l, useContext as re, useEffect as u, useId as ie, useLayoutEffect as ae, useMemo as d, useRef as f, useState as p } from "react";
|
|
11
|
+
import { Fragment as oe, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
|
+
// src/components/overlays/Tooltip/Tooltip.tsx
|
|
13
|
+
function g(e, t) {
|
|
13
14
|
if (e !== "start" && e !== "end") return e;
|
|
14
15
|
let n = t ? getComputedStyle(t).direction === "rtl" : !1;
|
|
15
16
|
return e === "end" === n ? "left" : "right";
|
|
16
17
|
}
|
|
17
|
-
var
|
|
18
|
-
neutral:
|
|
19
|
-
primary:
|
|
20
|
-
},
|
|
18
|
+
var se = {
|
|
19
|
+
neutral: a.neutral,
|
|
20
|
+
primary: a.primary
|
|
21
|
+
}, _ = {
|
|
21
22
|
delay: 400,
|
|
22
23
|
closeDelay: 100,
|
|
23
24
|
skipDelayDuration: 300
|
|
24
|
-
},
|
|
25
|
-
function
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
}, v = s(_);
|
|
26
|
+
function y({ delay: e = _.delay, closeDelay: t = _.closeDelay, skipDelayDuration: n = _.skipDelayDuration, children: r }) {
|
|
27
|
+
let i = d(() => ({
|
|
28
|
+
delay: e,
|
|
29
|
+
closeDelay: t,
|
|
30
|
+
skipDelayDuration: n
|
|
31
|
+
}), [
|
|
32
|
+
e,
|
|
33
|
+
t,
|
|
34
|
+
n
|
|
35
|
+
]);
|
|
36
|
+
return /* @__PURE__ */ m(v.Provider, {
|
|
37
|
+
value: i,
|
|
32
38
|
children: r
|
|
33
39
|
});
|
|
34
40
|
}
|
|
35
|
-
var
|
|
41
|
+
var b = {
|
|
36
42
|
active: null,
|
|
37
43
|
lastClosedAt: -Infinity
|
|
38
44
|
};
|
|
39
|
-
function
|
|
45
|
+
function x(...e) {
|
|
40
46
|
return e.filter(Boolean).join(" ") || void 0;
|
|
41
47
|
}
|
|
42
|
-
function
|
|
48
|
+
function ce(e) {
|
|
43
49
|
try {
|
|
44
50
|
return e.matches(":focus-visible");
|
|
45
51
|
} catch {
|
|
46
52
|
return !0;
|
|
47
53
|
}
|
|
48
54
|
}
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
let
|
|
52
|
-
value:
|
|
53
|
-
defaultValue:
|
|
54
|
-
onChange:
|
|
55
|
-
}),
|
|
56
|
-
|
|
55
|
+
var le = globalThis.process?.env?.NODE_ENV !== "production", S = "a[href], button, input, select, textarea, summary, [tabindex]:not([tabindex=\"-1\"]), [contenteditable]:not([contenteditable=\"false\"])";
|
|
56
|
+
function C({ children: s, content: d, shortcut: _, placement: y = "top", offset: C = 8, open: ue, defaultOpen: de = !1, onOpenChange: fe, delay: w, closeDelay: pe, disabled: T = !1, showArrow: me = !0, tone: he = "neutral", relationship: ge = "description", className: _e, style: ve, id: ye }) {
|
|
57
|
+
let E = re(v), D = w ?? E.delay, O = pe ?? E.closeDelay, be = ie(), k = ye ?? `tooltip-${be}`, [A, j] = e({
|
|
58
|
+
value: ue,
|
|
59
|
+
defaultValue: de,
|
|
60
|
+
onChange: fe
|
|
61
|
+
}), M = A && !T, N = f(null), P = f(null), [F, xe] = p(null), I = f(!1), L = f(!1), R = f(void 0), z = l(() => {
|
|
62
|
+
R.current !== void 0 && clearTimeout(R.current), R.current = void 0;
|
|
57
63
|
}, []);
|
|
58
|
-
|
|
59
|
-
let
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
64
|
+
u(() => z, [z]);
|
|
65
|
+
let B = l((e) => {
|
|
66
|
+
z(), j(e);
|
|
67
|
+
}, [z, j]), V = () => {
|
|
68
|
+
z(), T || (b.active !== null || Date.now() - b.lastClosedAt < E.skipDelayDuration || D <= 0 ? B(!0) : R.current = setTimeout(() => B(!0), D));
|
|
69
|
+
}, H = () => {
|
|
70
|
+
z(), I.current || L.current || (O <= 0 ? B(!1) : R.current = setTimeout(() => B(!1), O));
|
|
65
71
|
};
|
|
66
|
-
|
|
67
|
-
if (!
|
|
68
|
-
let e = { close: () =>
|
|
69
|
-
return
|
|
70
|
-
|
|
72
|
+
u(() => {
|
|
73
|
+
if (!M) return;
|
|
74
|
+
let e = { close: () => B(!1) };
|
|
75
|
+
return b.active && b.active.close(), b.active = e, () => {
|
|
76
|
+
b.active === e && (b.active = null), b.lastClosedAt = Date.now();
|
|
71
77
|
};
|
|
72
|
-
}, [
|
|
73
|
-
active:
|
|
78
|
+
}, [M, B]), t([N, P], {
|
|
79
|
+
active: M,
|
|
74
80
|
outsidePress: !1,
|
|
75
|
-
onDismiss: () =>
|
|
81
|
+
onDismiss: () => B(!1)
|
|
76
82
|
});
|
|
77
|
-
let [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}, [
|
|
81
|
-
let
|
|
82
|
-
open:
|
|
83
|
-
placement:
|
|
84
|
-
offset:
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
}, []),
|
|
94
|
-
|
|
83
|
+
let [Se, Ce] = p(() => g(y, null));
|
|
84
|
+
ae(() => {
|
|
85
|
+
M && Ce(g(y, N.current));
|
|
86
|
+
}, [M, y]);
|
|
87
|
+
let U = n(N, F, {
|
|
88
|
+
open: M,
|
|
89
|
+
placement: Se,
|
|
90
|
+
offset: C
|
|
91
|
+
}), we = U.placement.split("-")[0], W = U.arrow ? U.arrow.x ?? U.arrow.y ?? null : null;
|
|
92
|
+
u(() => {
|
|
93
|
+
le && F && F.querySelector(S) && console.warn("[Tooltip] `content` contains focusable elements. Tooltips can't receive focus, so keyboard users can't reach them. Use a Popover for interactive content.");
|
|
94
|
+
}, [F, d]);
|
|
95
|
+
let G = o.only(s), K = f(void 0);
|
|
96
|
+
K.current = c(G) ? G.props.ref : void 0;
|
|
97
|
+
let Te = l((e) => {
|
|
98
|
+
N.current = e, i(K.current, e);
|
|
99
|
+
}, []), q = l((e) => {
|
|
100
|
+
P.current = e, xe(e);
|
|
95
101
|
}, []);
|
|
96
|
-
if (!
|
|
97
|
-
let J =
|
|
102
|
+
if (!c(G)) return s;
|
|
103
|
+
let J = G.props, Y = d != null && d !== !1 && d !== "" && !T, X = _ !== void 0 && _.length > 0, Z = `${k}-content`, Q = `${k}-shortcut`, $ = { ref: Te };
|
|
98
104
|
Y && ($.onPointerEnter = (e) => {
|
|
99
|
-
J.onPointerEnter?.(e), e.pointerType !== "touch" && (
|
|
105
|
+
J.onPointerEnter?.(e), e.pointerType !== "touch" && (I.current = !0, M ? z() : V());
|
|
100
106
|
}, $.onPointerLeave = (e) => {
|
|
101
|
-
J.onPointerLeave?.(e), e.pointerType !== "touch" && (
|
|
107
|
+
J.onPointerLeave?.(e), e.pointerType !== "touch" && (I.current = !1, M ? H() : L.current || z());
|
|
102
108
|
}, $.onFocus = (e) => {
|
|
103
|
-
J.onFocus?.(e),
|
|
109
|
+
J.onFocus?.(e), ce(e.currentTarget) && (L.current = !0, M || V());
|
|
104
110
|
}, $.onBlur = (e) => {
|
|
105
|
-
J.onBlur?.(e),
|
|
106
|
-
},
|
|
111
|
+
J.onBlur?.(e), L.current && (L.current = !1, I.current || B(!1));
|
|
112
|
+
}, ge === "label" ? ($["aria-labelledby"] = x(J["aria-labelledby"], Z), X && ($["aria-describedby"] = x(J["aria-describedby"], Q))) : $["aria-describedby"] = x(J["aria-describedby"], k));
|
|
107
113
|
let Ee = {
|
|
108
|
-
...
|
|
109
|
-
...
|
|
110
|
-
"--_tooltip-offset": `${
|
|
111
|
-
...
|
|
114
|
+
...ve,
|
|
115
|
+
...U.style,
|
|
116
|
+
"--_tooltip-offset": `${C}px`,
|
|
117
|
+
...W === null ? null : { "--_arrow-pos": `${W}px` }
|
|
112
118
|
};
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
ref:
|
|
115
|
-
id:
|
|
119
|
+
return /* @__PURE__ */ h(oe, { children: [ne(G, $), Y && /* @__PURE__ */ m(te, { children: /* @__PURE__ */ m("div", {
|
|
120
|
+
ref: q,
|
|
121
|
+
id: k,
|
|
116
122
|
role: "tooltip",
|
|
117
|
-
hidden: !
|
|
118
|
-
"data-side":
|
|
119
|
-
className:
|
|
123
|
+
hidden: !M,
|
|
124
|
+
"data-side": we,
|
|
125
|
+
className: r(a.tooltip, se[he], _e),
|
|
120
126
|
style: Ee,
|
|
121
127
|
onPointerEnter: (e) => {
|
|
122
|
-
e.pointerType !== "touch" && (
|
|
128
|
+
e.pointerType !== "touch" && (I.current = !0, z());
|
|
123
129
|
},
|
|
124
130
|
onPointerLeave: (e) => {
|
|
125
|
-
e.pointerType !== "touch" && (
|
|
131
|
+
e.pointerType !== "touch" && (I.current = !1, H());
|
|
126
132
|
},
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
className:
|
|
133
|
+
children: /* @__PURE__ */ h("div", {
|
|
134
|
+
className: a.bubble,
|
|
129
135
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ m("span", {
|
|
131
137
|
id: Z,
|
|
132
|
-
className:
|
|
133
|
-
children:
|
|
138
|
+
className: a.content,
|
|
139
|
+
children: d
|
|
134
140
|
}),
|
|
135
|
-
X && /* @__PURE__ */
|
|
141
|
+
X && /* @__PURE__ */ m("span", {
|
|
136
142
|
id: Q,
|
|
137
|
-
className:
|
|
138
|
-
children: /* @__PURE__ */
|
|
143
|
+
className: a.shortcut,
|
|
144
|
+
children: /* @__PURE__ */ m(ee, {
|
|
139
145
|
keys: _,
|
|
140
146
|
size: "sm",
|
|
141
147
|
variant: "outline"
|
|
142
148
|
})
|
|
143
149
|
}),
|
|
144
|
-
|
|
145
|
-
className:
|
|
150
|
+
me && /* @__PURE__ */ m("span", {
|
|
151
|
+
className: a.arrow,
|
|
146
152
|
"aria-hidden": "true"
|
|
147
153
|
})
|
|
148
154
|
]
|
|
149
155
|
})
|
|
150
156
|
}) })] });
|
|
151
157
|
}
|
|
152
|
-
|
|
153
|
-
export { x as Tooltip, _ as TooltipProvider };
|
|
158
|
+
export { C as Tooltip, y as TooltipProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/overlays/Tooltip/Tooltip.module.css
|
|
2
2
|
var e = "_tooltip_r0vss_11", t = "_bubble_r0vss_5", n = "_content_r0vss_153", r = "_neutral_r0vss_217", i = "_primary_r0vss_229", a = "_shortcut_r0vss_247", o = "_arrow_r0vss_267", s = {
|
|
3
3
|
tooltip: e,
|
|
4
4
|
bubble: t,
|
|
@@ -9,5 +9,4 @@ var e = "_tooltip_r0vss_11", t = "_bubble_r0vss_5", n = "_content_r0vss_153", r
|
|
|
9
9
|
shortcut: a,
|
|
10
10
|
arrow: o
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { o as arrow, t as bubble, n as content, s as default, r as neutral, i as primary, a as shortcut, e as tooltip };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("
|
|
1
|
+
"use client";const e=require("../../../utils/announce.cjs.js"),t=require("../../../utils/cx.cjs.js"),n=require("../../feedback/Spinner/Spinner.cjs.js"),r=require("./Button.module.css.cjs.js"),i=require("../../utilities/LocaleProvider/LocaleProvider.cjs.js");let a=require("react"),o=require("react/jsx-runtime");var s={solid:r.default.solid,soft:r.default.soft,outline:r.default.outline,ghost:r.default.ghost,link:r.default.link,inverse:r.default.inverse},c={neutral:r.default.neutral,primary:r.default.primary,accent:r.default.accent,success:r.default.success,warning:r.default.warning,danger:r.default.danger,info:r.default.info},l={xs:r.default.xs,sm:r.default.sm,md:r.default.md,lg:r.default.lg},u={none:r.default.radiusNone,xs:r.default.radiusXs,sm:r.default.radiusSm,md:r.default.radiusMd,lg:r.default.radiusLg,xl:r.default.radiusXl,"2xl":r.default.radius2xl,pill:r.default.radiusPill},d={0:r.default.gap0,1:r.default.gap1,2:r.default.gap2,3:r.default.gap3,4:r.default.gap4,5:r.default.gap5,6:r.default.gap6,8:r.default.gap8,10:r.default.gap10,12:r.default.gap12,16:r.default.gap16,20:r.default.gap20,24:r.default.gap24},f={xs:`sm`,sm:`sm`,md:`md`,lg:`lg`},p=(0,a.createContext)(null),m=({iconOnly:d=!1,variant:m,tone:h,size:g,radius:_,disabled:v,loading:y=!1,loadingText:b,loadingLabel:x,fullWidth:S,compact:C=!1,startIcon:w,endIcon:T,children:E,className:D,href:O,as:k,type:A,ref:j,onClick:M,"aria-disabled":N,"aria-busy":P,...F})=>{let I=i.useMessages(),L=x??I.button.loading,R=(0,a.useContext)(p),z=m??R?.variant??`solid`,B=h??R?.tone??`primary`,V=g??R?.size??`md`,H=_??R?.radius,U=v??R?.disabled??!1,W=N===!0||N===`true`,G=!d&&(S??R?.fullWidth??!1),K=U||W||y,q=y&&!d&&b!=null,J=t.cx(r.default.root,s[z],c[B],l[V],H?u[H]:r.default.radiusDefault,d&&r.default.iconOnly,C&&!d&&r.default.compact,G&&r.default.fullWidth,!K&&r.default.interactive,y&&r.default.loading,(U||W)&&r.default.disabled,D),Y=(0,a.useRef)(y);(0,a.useEffect)(()=>{y&&!Y.current&&e.announce(typeof b==`string`?b:L),Y.current=y},[y,b,L]);let X=e=>{K?(e.preventDefault(),e.stopPropagation()):M?.(e)},Z=(0,o.jsxs)(`span`,{className:r.default.inner,children:[(0,o.jsx)(`span`,{className:r.default.content,"aria-hidden":q?!0:void 0,children:d?(0,o.jsx)(`span`,{className:r.default.icon,"aria-hidden":`true`,children:E}):(0,o.jsxs)(o.Fragment,{children:[w!=null&&(0,o.jsx)(`span`,{className:r.default.icon,"aria-hidden":`true`,children:w}),E!=null&&(0,o.jsx)(`span`,{className:r.default.label,children:E}),T!=null&&(0,o.jsx)(`span`,{className:r.default.icon,"aria-hidden":`true`,children:T})]})}),y&&(0,o.jsxs)(`span`,{className:r.default.loadingLayer,children:[(0,o.jsx)(n.Spinner,{decorative:!0,size:f[V],className:r.default.spinner}),q&&(0,o.jsx)(`span`,{className:r.default.label,children:b})]})]});if(k!==void 0){if(K){let{to:e,href:t,...n}=F;return(0,o.jsx)(`a`,{...n,ref:j,className:J,role:`link`,"aria-disabled":!0,"aria-busy":y?!0:P,onClick:X,children:Z})}return(0,o.jsx)(k,{...F,ref:j,className:J,type:A,"aria-disabled":N,"aria-busy":P,onClick:X,children:Z})}return O===void 0?(0,o.jsx)(`button`,{...F,ref:j,type:A??`button`,className:J,disabled:U,"aria-disabled":y?!0:N,"aria-busy":y?!0:P,onClick:X,children:Z}):(0,o.jsx)(`a`,{...F,ref:j,className:J,href:K?void 0:O,type:A,role:K?`link`:F.role,"aria-disabled":K?!0:N,"aria-busy":y?!0:P,onClick:X,children:Z})};function h(e){return(0,o.jsx)(m,{...e})}function g(e){return(0,o.jsx)(m,{...e,iconOnly:!0})}var _=({attached:e=!1,orientation:n=`horizontal`,gap:i=2,size:s,variant:c,tone:l,radius:u,disabled:f,fullWidth:m,className:h,children:g,..._})=>{let v=(0,a.useMemo)(()=>({size:s,variant:c,tone:l,radius:u,disabled:f,fullWidth:m}),[s,c,l,u,f,m]),y=n===`vertical`;return(0,o.jsx)(`div`,{role:`group`,"data-orientation":n,..._,className:t.cx(r.default.group,y&&r.default.groupVertical,e?y?r.default.attachedVertical:r.default.attachedHorizontal:d[i],e&&r.default.attached,m&&r.default.groupFullWidth,h),children:(0,o.jsx)(p.Provider,{value:v,children:g})})};exports.Button=h,exports.ButtonGroup=_,exports.IconButton=g;
|
|
@@ -1,107 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { announce as e } from "../../../utils/announce.mjs";
|
|
2
3
|
import { cx as t } from "../../../utils/cx.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import i from "
|
|
4
|
+
import { Spinner as n } from "../../feedback/Spinner/Spinner.mjs";
|
|
5
|
+
import r from "./Button.module.css.mjs";
|
|
6
|
+
import { useMessages as i } from "../../utilities/LocaleProvider/LocaleProvider.mjs";
|
|
6
7
|
import { createContext as a, useContext as o, useEffect as s, useMemo as c, useRef as l } from "react";
|
|
7
8
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
+
// src/components/primitives/Button/Button.tsx
|
|
9
10
|
var p = {
|
|
10
|
-
solid:
|
|
11
|
-
soft:
|
|
12
|
-
outline:
|
|
13
|
-
ghost:
|
|
14
|
-
link:
|
|
15
|
-
inverse:
|
|
11
|
+
solid: r.solid,
|
|
12
|
+
soft: r.soft,
|
|
13
|
+
outline: r.outline,
|
|
14
|
+
ghost: r.ghost,
|
|
15
|
+
link: r.link,
|
|
16
|
+
inverse: r.inverse
|
|
16
17
|
}, m = {
|
|
17
|
-
neutral:
|
|
18
|
-
primary:
|
|
19
|
-
accent:
|
|
20
|
-
success:
|
|
21
|
-
warning:
|
|
22
|
-
danger:
|
|
23
|
-
info:
|
|
18
|
+
neutral: r.neutral,
|
|
19
|
+
primary: r.primary,
|
|
20
|
+
accent: r.accent,
|
|
21
|
+
success: r.success,
|
|
22
|
+
warning: r.warning,
|
|
23
|
+
danger: r.danger,
|
|
24
|
+
info: r.info
|
|
24
25
|
}, h = {
|
|
25
|
-
xs:
|
|
26
|
-
sm:
|
|
27
|
-
md:
|
|
28
|
-
lg:
|
|
26
|
+
xs: r.xs,
|
|
27
|
+
sm: r.sm,
|
|
28
|
+
md: r.md,
|
|
29
|
+
lg: r.lg
|
|
29
30
|
}, g = {
|
|
30
|
-
none:
|
|
31
|
-
xs:
|
|
32
|
-
sm:
|
|
33
|
-
md:
|
|
34
|
-
lg:
|
|
35
|
-
xl:
|
|
36
|
-
"2xl":
|
|
37
|
-
pill:
|
|
31
|
+
none: r.radiusNone,
|
|
32
|
+
xs: r.radiusXs,
|
|
33
|
+
sm: r.radiusSm,
|
|
34
|
+
md: r.radiusMd,
|
|
35
|
+
lg: r.radiusLg,
|
|
36
|
+
xl: r.radiusXl,
|
|
37
|
+
"2xl": r.radius2xl,
|
|
38
|
+
pill: r.radiusPill
|
|
38
39
|
}, _ = {
|
|
39
|
-
0:
|
|
40
|
-
1:
|
|
41
|
-
2:
|
|
42
|
-
3:
|
|
43
|
-
4:
|
|
44
|
-
5:
|
|
45
|
-
6:
|
|
46
|
-
8:
|
|
47
|
-
10:
|
|
48
|
-
12:
|
|
49
|
-
16:
|
|
50
|
-
20:
|
|
51
|
-
24:
|
|
40
|
+
0: r.gap0,
|
|
41
|
+
1: r.gap1,
|
|
42
|
+
2: r.gap2,
|
|
43
|
+
3: r.gap3,
|
|
44
|
+
4: r.gap4,
|
|
45
|
+
5: r.gap5,
|
|
46
|
+
6: r.gap6,
|
|
47
|
+
8: r.gap8,
|
|
48
|
+
10: r.gap10,
|
|
49
|
+
12: r.gap12,
|
|
50
|
+
16: r.gap16,
|
|
51
|
+
20: r.gap20,
|
|
52
|
+
24: r.gap24
|
|
52
53
|
}, v = {
|
|
53
54
|
xs: "sm",
|
|
54
55
|
sm: "sm",
|
|
55
56
|
md: "md",
|
|
56
57
|
lg: "lg"
|
|
57
58
|
}, y = a(null), b = ({ iconOnly: a = !1, variant: c, tone: _, size: b, radius: x, disabled: S, loading: C = !1, loadingText: w, loadingLabel: T, fullWidth: ee, compact: te = !1, startIcon: E, endIcon: D, children: O, className: k, href: A, as: j, type: M, ref: N, onClick: P, "aria-disabled": F, "aria-busy": I, ...L }) => {
|
|
58
|
-
let R =
|
|
59
|
+
let R = i(), z = T ?? R.button.loading, B = o(y), V = c ?? B?.variant ?? "solid", H = _ ?? B?.tone ?? "primary", U = b ?? B?.size ?? "md", W = x ?? B?.radius, G = S ?? B?.disabled ?? !1, K = F === !0 || F === "true", q = !a && (ee ?? B?.fullWidth ?? !1), J = G || K || C, Y = C && !a && w != null, X = t(r.root, p[V], m[H], h[U], W ? g[W] : r.radiusDefault, a && r.iconOnly, te && !a && r.compact, q && r.fullWidth, !J && r.interactive, C && r.loading, (G || K) && r.disabled, k), Z = l(C);
|
|
59
60
|
s(() => {
|
|
60
|
-
C && !Z.current &&
|
|
61
|
+
C && !Z.current && e(typeof w == "string" ? w : z), Z.current = C;
|
|
61
62
|
}, [
|
|
62
63
|
C,
|
|
63
64
|
w,
|
|
64
65
|
z
|
|
65
66
|
]);
|
|
66
67
|
let Q = (e) => {
|
|
67
|
-
|
|
68
|
-
e.preventDefault(), e.stopPropagation();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
P?.(e);
|
|
68
|
+
J ? (e.preventDefault(), e.stopPropagation()) : P?.(e);
|
|
72
69
|
}, $ = /* @__PURE__ */ f("span", {
|
|
73
|
-
className:
|
|
70
|
+
className: r.inner,
|
|
74
71
|
children: [/* @__PURE__ */ d("span", {
|
|
75
|
-
className:
|
|
72
|
+
className: r.content,
|
|
76
73
|
"aria-hidden": Y ? !0 : void 0,
|
|
77
74
|
children: a ? /* @__PURE__ */ d("span", {
|
|
78
|
-
className:
|
|
75
|
+
className: r.icon,
|
|
79
76
|
"aria-hidden": "true",
|
|
80
77
|
children: O
|
|
81
78
|
}) : /* @__PURE__ */ f(u, { children: [
|
|
82
79
|
E != null && /* @__PURE__ */ d("span", {
|
|
83
|
-
className:
|
|
80
|
+
className: r.icon,
|
|
84
81
|
"aria-hidden": "true",
|
|
85
82
|
children: E
|
|
86
83
|
}),
|
|
87
84
|
O != null && /* @__PURE__ */ d("span", {
|
|
88
|
-
className:
|
|
85
|
+
className: r.label,
|
|
89
86
|
children: O
|
|
90
87
|
}),
|
|
91
88
|
D != null && /* @__PURE__ */ d("span", {
|
|
92
|
-
className:
|
|
89
|
+
className: r.icon,
|
|
93
90
|
"aria-hidden": "true",
|
|
94
91
|
children: D
|
|
95
92
|
})
|
|
96
93
|
] })
|
|
97
94
|
}), C && /* @__PURE__ */ f("span", {
|
|
98
|
-
className:
|
|
99
|
-
children: [/* @__PURE__ */ d(
|
|
95
|
+
className: r.loadingLayer,
|
|
96
|
+
children: [/* @__PURE__ */ d(n, {
|
|
100
97
|
decorative: !0,
|
|
101
98
|
size: v[U],
|
|
102
|
-
className:
|
|
99
|
+
className: r.spinner
|
|
103
100
|
}), Y && /* @__PURE__ */ d("span", {
|
|
104
|
-
className:
|
|
101
|
+
className: r.label,
|
|
105
102
|
children: w
|
|
106
103
|
})]
|
|
107
104
|
})]
|
|
@@ -163,7 +160,7 @@ function S(e) {
|
|
|
163
160
|
iconOnly: !0
|
|
164
161
|
});
|
|
165
162
|
}
|
|
166
|
-
var C = ({ attached: e = !1, orientation: n = "horizontal", gap:
|
|
163
|
+
var C = ({ attached: e = !1, orientation: n = "horizontal", gap: i = 2, size: a, variant: o, tone: s, radius: l, disabled: u, fullWidth: f, className: p, children: m, ...h }) => {
|
|
167
164
|
let g = c(() => ({
|
|
168
165
|
size: a,
|
|
169
166
|
variant: o,
|
|
@@ -183,12 +180,11 @@ var C = ({ attached: e = !1, orientation: n = "horizontal", gap: r = 2, size: a,
|
|
|
183
180
|
role: "group",
|
|
184
181
|
"data-orientation": n,
|
|
185
182
|
...h,
|
|
186
|
-
className: t(
|
|
183
|
+
className: t(r.group, v && r.groupVertical, e ? v ? r.attachedVertical : r.attachedHorizontal : _[i], e && r.attached, f && r.groupFullWidth, p),
|
|
187
184
|
children: /* @__PURE__ */ d(y.Provider, {
|
|
188
185
|
value: g,
|
|
189
186
|
children: m
|
|
190
187
|
})
|
|
191
188
|
});
|
|
192
189
|
};
|
|
193
|
-
//#endregion
|
|
194
190
|
export { x as Button, C as ButtonGroup, S as IconButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/primitives/Button/Button.module.css
|
|
2
2
|
var e = "_root_18uhu_17", t = "_interactive_18uhu_123", n = "_inner_18uhu_135", r = "_content_18uhu_157", i = "_loadingLayer_18uhu_159", a = "_label_18uhu_177", o = "_icon_18uhu_189", s = "_xs_18uhu_219", c = "_sm_18uhu_235", l = "_md_18uhu_251", u = "_lg_18uhu_267", d = "_radiusDefault_18uhu_287", f = "_radiusNone_18uhu_293", p = "_radiusXs_18uhu_299", m = "_radiusSm_18uhu_305", h = "_radiusMd_18uhu_311", g = "_radiusLg_18uhu_317", _ = "_radiusXl_18uhu_323", v = "_radius2xl_18uhu_329", y = "_radiusPill_18uhu_335", b = "_primary_18uhu_357", x = "_accent_18uhu_395", S = "_success_18uhu_431", C = "_warning_18uhu_463", w = "_danger_18uhu_495", T = "_info_18uhu_527", E = "_neutral_18uhu_563", D = "_solid_18uhu_561", O = "_soft_18uhu_429", k = "_outline_18uhu_619", A = "_ghost_18uhu_629", j = "_inverse_18uhu_643", M = "_link_18uhu_655", N = "_iconOnly_18uhu_791", P = "_compact_18uhu_819", F = "_fullWidth_18uhu_831", I = "_loading_18uhu_159", L = "_spinner_18uhu_861", R = "_disabled_18uhu_871", z = "_group_18uhu_911", B = "_groupVertical_18uhu_925", V = "_groupFullWidth_18uhu_937", H = "_gap0_18uhu_955", U = "_gap1_18uhu_961", W = "_gap2_18uhu_967", G = "_gap3_18uhu_973", K = "_gap4_18uhu_979", q = "_gap5_18uhu_985", J = "_gap6_18uhu_991", Y = "_gap8_18uhu_997", X = "_gap10_18uhu_1003", Z = "_gap12_18uhu_1009", Q = "_gap16_18uhu_1015", $ = "_gap20_18uhu_1021", ee = "_gap24_18uhu_1027", te = "_attached_18uhu_1037", ne = "_attachedHorizontal_18uhu_1067", re = "_attachedVertical_18uhu_1109", ie = {
|
|
3
3
|
root: e,
|
|
4
4
|
interactive: t,
|
|
@@ -59,5 +59,4 @@ var e = "_root_18uhu_17", t = "_interactive_18uhu_123", n = "_inner_18uhu_135",
|
|
|
59
59
|
attachedHorizontal: ne,
|
|
60
60
|
attachedVertical: re
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { x as accent, te as attached, ne as attachedHorizontal, re as attachedVertical, P as compact, r as content, w as danger, ie as default, R as disabled, F as fullWidth, H as gap0, U as gap1, X as gap10, Z as gap12, Q as gap16, W as gap2, $ as gap20, ee as gap24, G as gap3, K as gap4, q as gap5, J as gap6, Y as gap8, A as ghost, z as group, V as groupFullWidth, B as groupVertical, o as icon, N as iconOnly, T as info, n as inner, t as interactive, j as inverse, a as label, u as lg, M as link, I as loading, i as loadingLayer, l as md, E as neutral, k as outline, b as primary, v as radius2xl, d as radiusDefault, g as radiusLg, h as radiusMd, f as radiusNone, y as radiusPill, m as radiusSm, _ as radiusXl, p as radiusXs, e as root, c as sm, O as soft, D as solid, L as spinner, S as success, C as warning, s as xs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./icons.cjs.js"),t=require("./IconSvg.cjs.js");let n=require("react/jsx-runtime");var r=({name:r,children:i,...a})=>(0,n.jsx)(t.IconSvg,{"data-icon":r,...a,children:r?e.iconPaths[r]:i});exports.Icon=r;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { iconPaths as e } from "./icons.mjs";
|
|
2
|
+
import { IconSvg as t } from "./IconSvg.mjs";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
var r = ({ name: r, children: i, ...a }) => /* @__PURE__ */ n(
|
|
4
|
+
// src/components/primitives/Icon/Icon.tsx
|
|
5
|
+
var r = ({ name: r, children: i, ...a }) => /* @__PURE__ */ n(t, {
|
|
6
6
|
"data-icon": r,
|
|
7
7
|
...a,
|
|
8
|
-
children: r ?
|
|
8
|
+
children: r ? e[r] : i
|
|
9
9
|
});
|
|
10
|
-
//#endregion
|
|
11
10
|
export { r as Icon };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/primitives/Icon/Icon.module.css
|
|
2
2
|
var e = "_root_u20i7_1", t = "_xs_u20i7_17", n = "_sm_u20i7_25", r = "_md_u20i7_33", i = "_lg_u20i7_41", a = "_xl_u20i7_49", o = "_size2xl_u20i7_57", s = "_neutral_u20i7_71", c = "_muted_u20i7_77", l = "_primary_u20i7_83", u = "_accent_u20i7_89", d = "_success_u20i7_95", f = "_warning_u20i7_101", p = "_danger_u20i7_107", m = "_info_u20i7_113", h = "_spin_u20i7_125", g = {
|
|
3
3
|
root: e,
|
|
4
4
|
xs: t,
|
|
@@ -17,5 +17,4 @@ var e = "_root_u20i7_1", t = "_xs_u20i7_17", n = "_sm_u20i7_25", r = "_md_u20i7_
|
|
|
17
17
|
info: m,
|
|
18
18
|
spin: h
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { u as accent, p as danger, g as default, m as info, i as lg, r as md, c as muted, s as neutral, l as primary, e as root, o as size2xl, n as sm, h as spin, d as success, f as warning, a as xl, t as xs };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
2
|
import t from "./Icon.module.css.mjs";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/primitives/Icon/IconSvg.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
xs: t.xs,
|
|
7
7
|
sm: t.sm,
|
|
@@ -43,5 +43,4 @@ var r = {
|
|
|
43
43
|
children: d
|
|
44
44
|
});
|
|
45
45
|
};
|
|
46
|
-
//#endregion
|
|
47
46
|
export { a as IconSvg };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconSvg as e } from "./IconSvg.mjs";
|
|
2
2
|
import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/components/primitives/Icon/icons.tsx
|
|
4
4
|
var i = ({ x: e, y: t, r = 1.25 }) => /* @__PURE__ */ n("circle", {
|
|
5
5
|
cx: e,
|
|
6
6
|
cy: t,
|
|
@@ -281,5 +281,4 @@ function $(t, r) {
|
|
|
281
281
|
return i.displayName = t, i;
|
|
282
282
|
}
|
|
283
283
|
var ye = /* @__PURE__ */ $("CheckIcon", o), be = /* @__PURE__ */ $("CloseIcon", s), xe = /* @__PURE__ */ $("PlusIcon", c), Se = /* @__PURE__ */ $("MinusIcon", l), Ce = /* @__PURE__ */ $("ChevronUpIcon", O), we = /* @__PURE__ */ $("ChevronDownIcon", k), Te = /* @__PURE__ */ $("ChevronLeftIcon", A), Ee = /* @__PURE__ */ $("ChevronRightIcon", j), De = /* @__PURE__ */ $("ArrowUpIcon", M), Oe = /* @__PURE__ */ $("ArrowDownIcon", N), ke = /* @__PURE__ */ $("ArrowLeftIcon", P), Ae = /* @__PURE__ */ $("ArrowRightIcon", F), je = /* @__PURE__ */ $("ChevronsLeftIcon", I), Me = /* @__PURE__ */ $("ChevronsRightIcon", L), Ne = /* @__PURE__ */ $("SearchIcon", u), Pe = /* @__PURE__ */ $("MenuIcon", d), Fe = /* @__PURE__ */ $("MoreHorizontalIcon", f), Ie = /* @__PURE__ */ $("MoreVerticalIcon", p), Le = /* @__PURE__ */ $("InfoIcon", R), Re = /* @__PURE__ */ $("WarningIcon", z), ze = /* @__PURE__ */ $("ErrorIcon", B), Be = /* @__PURE__ */ $("SuccessIcon", ne), Ve = /* @__PURE__ */ $("HelpIcon", V), He = /* @__PURE__ */ $("NoteIcon", U), Ue = /* @__PURE__ */ $("OfflineIcon", W), We = /* @__PURE__ */ $("EyeIcon", G), Ge = /* @__PURE__ */ $("EyeOffIcon", K), Ke = /* @__PURE__ */ $("CalendarIcon", q), qe = /* @__PURE__ */ $("ClockIcon", J), Je = /* @__PURE__ */ $("UploadIcon", m), Ye = /* @__PURE__ */ $("DownloadIcon", h), Xe = /* @__PURE__ */ $("TrashIcon", g), Ze = /* @__PURE__ */ $("EditIcon", _), Qe = /* @__PURE__ */ $("CopyIcon", v), $e = /* @__PURE__ */ $("ExternalLinkIcon", y), et = /* @__PURE__ */ $("LinkIcon", b), tt = /* @__PURE__ */ $("HomeIcon", Y), nt = /* @__PURE__ */ $("UserIcon", X), rt = /* @__PURE__ */ $("UsersIcon", Z), it = /* @__PURE__ */ $("SettingsIcon", Q), at = /* @__PURE__ */ $("BellIcon", re), ot = /* @__PURE__ */ $("StarIcon", ie), st = /* @__PURE__ */ $("StarFilledIcon", ae), ct = /* @__PURE__ */ $("HeartIcon", se), lt = /* @__PURE__ */ $("HeartFilledIcon", ce), ut = /* @__PURE__ */ $("FilterIcon", x), dt = /* @__PURE__ */ $("SortIcon", S), ft = /* @__PURE__ */ $("RefreshIcon", C), pt = /* @__PURE__ */ $("PauseIcon", w), mt = /* @__PURE__ */ $("PlayIcon", T), ht = /* @__PURE__ */ $("EyeDropperIcon", E), gt = /* @__PURE__ */ $("GripIcon", D), _t = /* @__PURE__ */ $("SunIcon", le), vt = /* @__PURE__ */ $("MoonIcon", ue), yt = /* @__PURE__ */ $("LockIcon", de), bt = /* @__PURE__ */ $("MailIcon", fe), xt = /* @__PURE__ */ $("FileIcon", pe), St = /* @__PURE__ */ $("FolderIcon", me), Ct = /* @__PURE__ */ $("FolderOpenIcon", he), wt = /* @__PURE__ */ $("ImageIcon", ge), Tt = /* @__PURE__ */ $("LoaderIcon", H);
|
|
284
|
-
//#endregion
|
|
285
284
|
export { Oe as ArrowDownIcon, ke as ArrowLeftIcon, Ae as ArrowRightIcon, De as ArrowUpIcon, at as BellIcon, Ke as CalendarIcon, ye as CheckIcon, we as ChevronDownIcon, Te as ChevronLeftIcon, Ee as ChevronRightIcon, Ce as ChevronUpIcon, je as ChevronsLeftIcon, Me as ChevronsRightIcon, qe as ClockIcon, be as CloseIcon, Qe as CopyIcon, Ye as DownloadIcon, Ze as EditIcon, ze as ErrorIcon, $e as ExternalLinkIcon, ht as EyeDropperIcon, We as EyeIcon, Ge as EyeOffIcon, xt as FileIcon, ut as FilterIcon, St as FolderIcon, Ct as FolderOpenIcon, gt as GripIcon, lt as HeartFilledIcon, ct as HeartIcon, Ve as HelpIcon, tt as HomeIcon, wt as ImageIcon, Le as InfoIcon, et as LinkIcon, Tt as LoaderIcon, yt as LockIcon, bt as MailIcon, Pe as MenuIcon, Se as MinusIcon, vt as MoonIcon, Fe as MoreHorizontalIcon, Ie as MoreVerticalIcon, He as NoteIcon, Ue as OfflineIcon, pt as PauseIcon, mt as PlayIcon, xe as PlusIcon, ft as RefreshIcon, Ne as SearchIcon, it as SettingsIcon, dt as SortIcon, st as StarFilledIcon, ot as StarIcon, Be as SuccessIcon, _t as SunIcon, Xe as TrashIcon, Je as UploadIcon, nt as UserIcon, rt as UsersIcon, Re as WarningIcon, ve as iconNames, _e as iconPaths };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../
|
|
1
|
+
"use client";const e=require("../../../utils/cx.cjs.js"),t=require("../../utilities/VisuallyHidden/VisuallyHidden.cjs.js"),n=require("./Kbd.module.css.cjs.js"),r=require("../../utilities/LocaleProvider/LocaleProvider.cjs.js"),i=require("../../../i18n/en.cjs.js");let a=require("react"),o=require("react/jsx-runtime");var s=(e,t)=>({symbol:e,name:t}),c={mod:{mac:s(`⌘`,`command`),other:s(`Ctrl`,`control`)},cmd:{mac:s(`⌘`,`command`),other:s(`Win`,`windows`)},meta:{mac:s(`⌘`,`command`),other:s(`Win`,`windows`),linux:s(`Super`,`super`)},ctrl:{mac:s(`⌃`,`control`),other:s(`Ctrl`,`control`)},alt:{mac:s(`⌥`,`option`),other:s(`Alt`,`alt`)},option:{mac:s(`⌥`,`option`),other:s(`Alt`,`alt`)},shift:{mac:s(`⇧`,`shift`),other:s(`Shift`,`shift`)},enter:{mac:s(`↩`,`return`),other:s(`Enter`,`enter`)},return:{mac:s(`↩`,`return`),other:s(`Enter`,`enter`)},esc:{mac:s(`esc`,`escape`),other:s(`Esc`,`escape`)},tab:{mac:s(`⇥`,`tab`),other:s(`Tab`,`tab`)},space:{mac:s(`Space`,`space`),other:s(`Space`,`space`)},backspace:{mac:s(`⌫`,`delete`),other:s(`Backspace`,`backspace`)},delete:{mac:s(`⌦`,`forwardDelete`),other:s(`Del`,`delete`)},capslock:{mac:s(`⇪`,`capsLock`),other:s(`Caps Lock`,`capsLock`)},up:{mac:s(`↑`,`up`),other:s(`↑`,`up`)},down:{mac:s(`↓`,`down`),other:s(`↓`,`down`)},left:{mac:s(`←`,`left`),other:s(`←`,`left`)},right:{mac:s(`→`,`right`),other:s(`→`,`right`)},pageup:{mac:s(`⇞`,`pageUp`),other:s(`PgUp`,`pageUp`)},pagedown:{mac:s(`⇟`,`pageDown`),other:s(`PgDn`,`pageDown`)},home:{mac:s(`↖`,`home`),other:s(`Home`,`home`)},end:{mac:s(`↘`,`end`),other:s(`End`,`end`)}},l=e=>Object.prototype.hasOwnProperty.call(c,e);function u(e,t,n=i.en.kbd.keys){let r=e.toLowerCase();if(l(r)){let e=c[r],i=t===`mac`?e.mac:t===`linux`&&e.linux?e.linux:e.other;return{symbol:i.symbol,label:n[i.name]}}let a=e.length===1?e.toUpperCase():e;return{symbol:a,label:a}}var d=`windows`;function f(){if(typeof navigator>`u`)return d;let e=navigator,t=e.userAgentData?.platform||e.platform||e.userAgent||``;return/mac|iphone|ipad|ipod/i.test(t)?`mac`:/linux|cros|x11/i.test(t)&&!/android/i.test(t)?`linux`:`windows`}var p=()=>()=>{};function m(e){let t=(0,a.useSyncExternalStore)(p,f,()=>d);return e??t}var h={sm:n.default.sm,md:n.default.md,lg:n.default.lg},g={outline:n.default.outline,soft:n.default.soft,solid:n.default.solid};function _({display:e}){return e.symbol===e.label?(0,o.jsx)(o.Fragment,{children:e.symbol}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,title:e.label,className:n.default.symbol,children:e.symbol}),(0,o.jsx)(t.VisuallyHidden,{children:e.label})]})}function v({size:t=`md`,variant:i=`outline`,keyName:a,platform:s,className:c,children:l,...d}){let f=r.useMessages(),p=m(s);return(0,o.jsx)(`kbd`,{...d,className:e.cx(n.default.key,h[t],g[i],c),children:a===void 0?l:(0,o.jsx)(_,{display:u(a,p,f.kbd.keys)})})}function y({keys:t,separator:i=`+`,thenLabel:s,size:c=`md`,variant:l=`outline`,platform:u,className:d,...f}){let p=r.useMessages(),g=s??p.kbd.then,_=m(u),y=i===`then`;return(0,o.jsx)(`kbd`,{...f,className:e.cx(n.default.combo,h[c],y&&n.default.sequence,d),children:t.map((e,t)=>(0,o.jsxs)(a.Fragment,{children:[t>0&&(0,o.jsx)(`span`,{className:n.default.separator,children:y?` ${g} `:`+`}),(0,o.jsx)(v,{size:c,variant:l,keyName:e,platform:_})]},`${t}-${e}`))})}exports.Kbd=v,exports.KbdShortcut=y,exports.getKeyDisplay=u,exports.useKbdPlatform=m;
|