@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,7 +1,7 @@
|
|
|
1
1
|
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
2
|
import t from "./Box.module.css.mjs";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/layout/Box/Box.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
bg: t.surfaceBg,
|
|
7
7
|
surface: t.surfaceSurface,
|
|
@@ -154,5 +154,4 @@ function m(m) {
|
|
|
154
154
|
...q
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
//#endregion
|
|
158
157
|
export { m as Box, d as sizeValue, u as spaceVar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Box/Box.module.css
|
|
2
2
|
var e = "_root_j2f2v_11", t = "_p_j2f2v_35", n = "_px_j2f2v_37", r = "_py_j2f2v_39", i = "_pt_j2f2v_41", a = "_pr_j2f2v_45", o = "_pb_j2f2v_47", s = "_pl_j2f2v_49", c = "_m_j2f2v_55", l = "_mx_j2f2v_57", u = "_my_j2f2v_59", d = "_mt_j2f2v_61", f = "_mr_j2f2v_63", p = "_mb_j2f2v_65", m = "_ml_j2f2v_67", h = "_width_j2f2v_73", g = "_height_j2f2v_75", _ = "_minWidth_j2f2v_77", v = "_maxWidth_j2f2v_79", y = "_minHeight_j2f2v_81", b = "_maxHeight_j2f2v_83", x = "_surfaceBg_j2f2v_89", S = "_surfaceSurface_j2f2v_91", C = "_surfaceRaised_j2f2v_93", w = "_surfaceSunken_j2f2v_95", T = "_softNeutral_j2f2v_103", E = "_softPrimary_j2f2v_105", D = "_softAccent_j2f2v_107", O = "_softSuccess_j2f2v_109", k = "_softWarning_j2f2v_111", A = "_softDanger_j2f2v_113", j = "_softInfo_j2f2v_115", M = "_solidNeutral_j2f2v_123", N = "_solidPrimary_j2f2v_125", P = "_solidAccent_j2f2v_127", F = "_solidSuccess_j2f2v_129", I = "_solidWarning_j2f2v_131", L = "_solidDanger_j2f2v_133", R = "_solidInfo_j2f2v_135", z = "_radiusNone_j2f2v_141", B = "_radiusXs_j2f2v_143", V = "_radiusSm_j2f2v_145", H = "_radiusMd_j2f2v_147", U = "_radiusLg_j2f2v_149", W = "_radiusXl_j2f2v_151", G = "_radius2xl_j2f2v_153", K = "_radiusPill_j2f2v_155", q = "_shadowNone_j2f2v_161", J = "_shadowXs_j2f2v_163", Y = "_shadowSm_j2f2v_165", X = "_shadowMd_j2f2v_167", Z = "_shadowLg_j2f2v_169", Q = "_shadowXl_j2f2v_171", $ = "_borderDefault_j2f2v_177", ee = "_borderStrong_j2f2v_179", te = "_displayBlock_j2f2v_197", ne = "_displayInline_j2f2v_199", re = "_displayInlineBlock_j2f2v_201", ie = "_displayFlex_j2f2v_203", ae = "_displayInlineFlex_j2f2v_205", oe = "_displayGrid_j2f2v_207", se = "_displayInlineGrid_j2f2v_209", ce = "_displayContents_j2f2v_211", le = "_displayNone_j2f2v_213", ue = "_positionStatic_j2f2v_219", de = "_positionRelative_j2f2v_221", fe = "_positionAbsolute_j2f2v_223", pe = "_positionFixed_j2f2v_225", me = "_positionSticky_j2f2v_227", he = "_overflowVisible_j2f2v_233", ge = "_overflowHidden_j2f2v_235", _e = "_overflowAuto_j2f2v_237", ve = "_overflowScroll_j2f2v_239", ye = "_overflowClip_j2f2v_241", be = "_textStart_j2f2v_247", xe = "_textCenter_j2f2v_249", Se = "_textEnd_j2f2v_251", Ce = "_textJustify_j2f2v_253", we = {
|
|
3
3
|
root: e,
|
|
4
4
|
p: t,
|
|
@@ -79,5 +79,4 @@ var e = "_root_j2f2v_11", t = "_p_j2f2v_35", n = "_px_j2f2v_37", r = "_py_j2f2v_
|
|
|
79
79
|
textEnd: Se,
|
|
80
80
|
textJustify: Ce
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { $ as borderDefault, ee as borderStrong, we as default, te as displayBlock, ce as displayContents, ie as displayFlex, oe as displayGrid, ne as displayInline, re as displayInlineBlock, ae as displayInlineFlex, se as displayInlineGrid, le as displayNone, g as height, c as m, b as maxHeight, v as maxWidth, p as mb, y as minHeight, _ as minWidth, m as ml, f as mr, d as mt, l as mx, u as my, _e as overflowAuto, ye as overflowClip, ge as overflowHidden, ve as overflowScroll, he as overflowVisible, t as p, o as pb, s as pl, fe as positionAbsolute, pe as positionFixed, de as positionRelative, ue as positionStatic, me as positionSticky, a as pr, i as pt, n as px, r as py, G as radius2xl, U as radiusLg, H as radiusMd, z as radiusNone, K as radiusPill, V as radiusSm, W as radiusXl, B as radiusXs, e as root, Z as shadowLg, X as shadowMd, q as shadowNone, Y as shadowSm, Q as shadowXl, J as shadowXs, D as softAccent, A as softDanger, j as softInfo, T as softNeutral, E as softPrimary, O as softSuccess, k as softWarning, P as solidAccent, L as solidDanger, R as solidInfo, M as solidNeutral, N as solidPrimary, F as solidSuccess, I as solidWarning, x as surfaceBg, C as surfaceRaised, w as surfaceSunken, S as surfaceSurface, xe as textCenter, Se as textEnd, Ce as textJustify, be as textStart, h as width };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
2
|
import t from "./Container.module.css.mjs";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/layout/Container/Container.tsx
|
|
5
5
|
var r = {
|
|
6
6
|
xs: t["size-xs"],
|
|
7
7
|
sm: t["size-sm"],
|
|
@@ -44,5 +44,4 @@ var r = {
|
|
|
44
44
|
...p,
|
|
45
45
|
className: e(t.root, r[s], l && t.fluid, i[c], d !== void 0 && a[d], u && t.centerContent, f)
|
|
46
46
|
});
|
|
47
|
-
//#endregion
|
|
48
47
|
export { o as Container };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Container/Container.module.css
|
|
2
2
|
var e = "_root_ck5mc_15", t = "_fluid_ck5mc_65", n = "_centerContent_ck5mc_155", r = {
|
|
3
3
|
root: e,
|
|
4
4
|
"size-xs": "_size-xs_ck5mc_41",
|
|
@@ -39,5 +39,4 @@ var e = "_root_ck5mc_15", t = "_fluid_ck5mc_65", n = "_centerContent_ck5mc_155",
|
|
|
39
39
|
"py-24": "_py-24_ck5mc_149",
|
|
40
40
|
centerContent: n
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { n as centerContent, r as default, t as fluid, e as root };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
2
|
import t from "./Divider.module.css.mjs";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/components/layout/Divider/Divider.tsx
|
|
5
5
|
var i = {
|
|
6
6
|
solid: t.solid,
|
|
7
7
|
dashed: t.dashed,
|
|
@@ -73,5 +73,4 @@ function l({ orientation: l = "horizontal", variant: u = "solid", thickness: d =
|
|
|
73
73
|
style: D
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { l as Divider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Divider/Divider.module.css
|
|
2
2
|
var e = "_root_z4fkr_9", t = "_horizontal_z4fkr_47", n = "_vertical_z4fkr_61", r = "_plain_z4fkr_77", i = "_solid_z4fkr_99", a = "_dashed_z4fkr_105", o = "_dotted_z4fkr_111", s = "_thin_z4fkr_121", c = "_thick_z4fkr_127", l = "_toneNeutral_z4fkr_143", u = "_toneStrong_z4fkr_151", d = "_tonePrimary_z4fkr_159", f = "_toneAccent_z4fkr_167", p = "_toneSuccess_z4fkr_175", m = "_toneWarning_z4fkr_183", h = "_toneDanger_z4fkr_191", g = "_toneInfo_z4fkr_199", _ = "_insetStart_z4fkr_211", v = "_insetEnd_z4fkr_217", y = "_insetBoth_z4fkr_223", b = "_labeled_z4fkr_255", x = "_line_z4fkr_285", S = "_labelStart_z4fkr_319", C = "_labelEnd_z4fkr_325", w = "_labelCenter_z4fkr_331", T = "_label_z4fkr_255", E = {
|
|
3
3
|
root: e,
|
|
4
4
|
horizontal: t,
|
|
@@ -27,5 +27,4 @@ var e = "_root_z4fkr_9", t = "_horizontal_z4fkr_47", n = "_vertical_z4fkr_61", r
|
|
|
27
27
|
labelCenter: w,
|
|
28
28
|
label: T
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
export { a as dashed, E as default, o as dotted, t as horizontal, y as insetBoth, v as insetEnd, _ as insetStart, T as label, w as labelCenter, C as labelEnd, S as labelStart, b as labeled, x as line, r as plain, e as root, i as solid, c as thick, s as thin, f as toneAccent, h as toneDanger, g as toneInfo, l as toneNeutral, d as tonePrimary, u as toneStrong, p as toneSuccess, m as toneWarning, n as vertical };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../utils/
|
|
1
|
+
const e=require("../../../utils/cx.cjs.js"),t=require("../../../utils/responsive.cjs.js"),n=require("./Flex.module.css.cjs.js");let r=require("react/jsx-runtime");var i={start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`},a={start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`},o={start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`,stretch:`stretch`},s={auto:n.default.selfAuto,start:n.default.selfStart,center:n.default.selfCenter,end:n.default.selfEnd,stretch:n.default.selfStretch,baseline:n.default.selfBaseline},c=t.responsiveClasses(n.default,`dir`),l=t.responsiveClasses(n.default,`wrap`),u=t.responsiveClasses(n.default,`align`),d=t.responsiveClasses(n.default,`justify`),f=t.responsiveClasses(n.default,`content`),p=t.responsiveClasses(n.default,`rowGap`),m=t.responsiveClasses(n.default,`columnGap`),h=e=>`var(--space-${e})`;function g({as:s,direction:g,wrap:_,align:v,justify:y,alignContent:b,gap:x,rowGap:S,columnGap:C,inline:w=!1,fullWidth:T=!1,className:E,style:D,...O}){let k=s??`div`,A={},j=[];return t.responsiveVars(`flex-dir`,g,String,c,A,j),t.responsiveVars(`flex-wrap`,_,String,l,A,j),t.responsiveVars(`flex-align`,v,e=>i[e],u,A,j),t.responsiveVars(`flex-justify`,y,e=>a[e],d,A,j),t.responsiveVars(`flex-content`,b,e=>o[e],f,A,j),t.cascadedVars(`flex-row-gap`,t.mapCascaded(t.firstCascaded(S,x),h),p,A,j),t.cascadedVars(`flex-column-gap`,t.mapCascaded(t.firstCascaded(C,x),h),m,A,j),(0,r.jsx)(k,{className:e.cx(n.default.root,w&&n.default.inline,T&&n.default.fullWidth,...j,E),style:{...A,...D},...O})}var _=e=>String(typeof e==`boolean`?+!!e:e);function v({as:t,grow:i,shrink:a,basis:o,order:c,alignSelf:l,className:u,style:d,...f}){let p=t??`div`,m={};return i!==void 0&&(m[`--flex-item-grow`]=_(i)),a!==void 0&&(m[`--flex-item-shrink`]=_(a)),o!==void 0&&(m[`--flex-item-basis`]=typeof o==`number`?`${o}px`:o),c!==void 0&&(m[`--flex-item-order`]=String(c)),(0,r.jsx)(p,{className:e.cx(i!==void 0&&n.default.itemGrow,a!==void 0&&n.default.itemShrink,o!==void 0&&n.default.itemBasis,c!==void 0&&n.default.itemOrder,l&&s[l],u)||void 0,style:{...m,...d},...f})}g.Item=v,exports.Flex=g,exports.FlexItem=v;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
|
+
import { cascadedVars as t, firstCascaded as n, mapCascaded as r, responsiveClasses as i, responsiveVars as a } from "../../../utils/responsive.mjs";
|
|
3
3
|
import o from "./Flex.module.css.mjs";
|
|
4
4
|
import { jsx as s } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/layout/Flex/Flex.tsx
|
|
6
6
|
var c = {
|
|
7
7
|
start: "flex-start",
|
|
8
8
|
center: "center",
|
|
@@ -31,11 +31,11 @@ var c = {
|
|
|
31
31
|
end: o.selfEnd,
|
|
32
32
|
stretch: o.selfStretch,
|
|
33
33
|
baseline: o.selfBaseline
|
|
34
|
-
}, f =
|
|
35
|
-
function b({ as:
|
|
36
|
-
let M =
|
|
37
|
-
return
|
|
38
|
-
className:
|
|
34
|
+
}, f = i(o, "dir"), p = i(o, "wrap"), m = i(o, "align"), h = i(o, "justify"), g = i(o, "content"), _ = i(o, "rowGap"), v = i(o, "columnGap"), y = (e) => `var(--space-${e})`;
|
|
35
|
+
function b({ as: i, direction: d, wrap: b, align: x, justify: S, alignContent: C, gap: w, rowGap: T, columnGap: E, inline: D = !1, fullWidth: O = !1, className: k, style: A, ...j }) {
|
|
36
|
+
let M = i ?? "div", N = {}, P = [];
|
|
37
|
+
return a("flex-dir", d, String, f, N, P), a("flex-wrap", b, String, p, N, P), a("flex-align", x, (e) => c[e], m, N, P), a("flex-justify", S, (e) => l[e], h, N, P), a("flex-content", C, (e) => u[e], g, N, P), t("flex-row-gap", r(n(T, w), y), _, N, P), t("flex-column-gap", r(n(E, w), y), v, N, P), /* @__PURE__ */ s(M, {
|
|
38
|
+
className: e(o.root, D && o.inline, O && o.fullWidth, ...P, k),
|
|
39
39
|
style: {
|
|
40
40
|
...N,
|
|
41
41
|
...A
|
|
@@ -44,10 +44,10 @@ function b({ as: r, direction: d, wrap: b, align: x, justify: S, alignContent: C
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
var x = (e) => String(typeof e == "boolean" ? +!!e : e);
|
|
47
|
-
function S({ as:
|
|
48
|
-
let p =
|
|
49
|
-
return
|
|
50
|
-
className:
|
|
47
|
+
function S({ as: t, grow: n, shrink: r, basis: i, order: a, alignSelf: c, className: l, style: u, ...f }) {
|
|
48
|
+
let p = t ?? "div", m = {};
|
|
49
|
+
return n !== void 0 && (m["--flex-item-grow"] = x(n)), r !== void 0 && (m["--flex-item-shrink"] = x(r)), i !== void 0 && (m["--flex-item-basis"] = typeof i == "number" ? `${i}px` : i), a !== void 0 && (m["--flex-item-order"] = String(a)), /* @__PURE__ */ s(p, {
|
|
50
|
+
className: e(n !== void 0 && o.itemGrow, r !== void 0 && o.itemShrink, i !== void 0 && o.itemBasis, a !== void 0 && o.itemOrder, c && d[c], l) || void 0,
|
|
51
51
|
style: {
|
|
52
52
|
...m,
|
|
53
53
|
...u
|
|
@@ -56,5 +56,4 @@ function S({ as: e, grow: t, shrink: n, basis: r, order: i, alignSelf: c, classN
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
b.Item = S;
|
|
59
|
-
//#endregion
|
|
60
59
|
export { b as Flex, S as FlexItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Flex/Flex.module.css
|
|
2
2
|
var e = "_root_3o466_15", t = "_inline_3o466_23", n = "_fullWidth_3o466_31", r = "_dirBase_3o466_43", i = "_wrapBase_3o466_49", a = "_alignBase_3o466_55", o = "_justifyBase_3o466_61", s = "_contentBase_3o466_67", c = "_rowGapBase_3o466_73", l = "_columnGapBase_3o466_79", u = "_dirSm_3o466_89", d = "_wrapSm_3o466_95", f = "_alignSm_3o466_101", p = "_justifySm_3o466_107", m = "_contentSm_3o466_113", h = "_rowGapSm_3o466_119", g = "_columnGapSm_3o466_125", _ = "_dirMd_3o466_137", v = "_wrapMd_3o466_143", y = "_alignMd_3o466_149", b = "_justifyMd_3o466_155", x = "_contentMd_3o466_161", S = "_rowGapMd_3o466_167", C = "_columnGapMd_3o466_173", w = "_dirLg_3o466_185", T = "_wrapLg_3o466_191", E = "_alignLg_3o466_197", D = "_justifyLg_3o466_203", O = "_contentLg_3o466_209", k = "_rowGapLg_3o466_215", A = "_columnGapLg_3o466_221", j = "_dirXl_3o466_233", M = "_wrapXl_3o466_239", N = "_alignXl_3o466_245", P = "_justifyXl_3o466_251", F = "_contentXl_3o466_257", I = "_rowGapXl_3o466_263", L = "_columnGapXl_3o466_269", R = "_dir2xl_3o466_281", z = "_wrap2xl_3o466_287", B = "_align2xl_3o466_293", V = "_justify2xl_3o466_299", H = "_content2xl_3o466_305", U = "_rowGap2xl_3o466_311", W = "_columnGap2xl_3o466_317", G = "_itemGrow_3o466_335", K = "_itemShrink_3o466_341", q = "_itemBasis_3o466_347", J = "_itemOrder_3o466_357", Y = "_selfAuto_3o466_365", X = "_selfStart_3o466_371", Z = "_selfCenter_3o466_377", Q = "_selfEnd_3o466_383", $ = "_selfStretch_3o466_389", ee = "_selfBaseline_3o466_395", te = {
|
|
3
3
|
root: e,
|
|
4
4
|
inline: t,
|
|
@@ -56,5 +56,4 @@ var e = "_root_3o466_15", t = "_inline_3o466_23", n = "_fullWidth_3o466_31", r =
|
|
|
56
56
|
selfStretch: $,
|
|
57
57
|
selfBaseline: ee
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { B as align2xl, a as alignBase, E as alignLg, y as alignMd, f as alignSm, N as alignXl, W as columnGap2xl, l as columnGapBase, A as columnGapLg, C as columnGapMd, g as columnGapSm, L as columnGapXl, H as content2xl, s as contentBase, O as contentLg, x as contentMd, m as contentSm, F as contentXl, te as default, R as dir2xl, r as dirBase, w as dirLg, _ as dirMd, u as dirSm, j as dirXl, n as fullWidth, t as inline, q as itemBasis, G as itemGrow, J as itemOrder, K as itemShrink, V as justify2xl, o as justifyBase, D as justifyLg, b as justifyMd, p as justifySm, P as justifyXl, e as root, U as rowGap2xl, c as rowGapBase, k as rowGapLg, S as rowGapMd, h as rowGapSm, I as rowGapXl, Y as selfAuto, ee as selfBaseline, Z as selfCenter, Q as selfEnd, X as selfStart, $ as selfStretch, z as wrap2xl, i as wrapBase, T as wrapLg, v as wrapMd, d as wrapSm, M as wrapXl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../utils/
|
|
1
|
+
const e=require("../../../utils/cx.cjs.js"),t=require("../../../utils/responsive.cjs.js"),n=require("./Grid.module.css.cjs.js");let r=require("react/jsx-runtime");var i=t.RESPONSIVE_KEYS;function a(e,n,r){for(let i of t.changedKeys(r))e[`--${n}-${i}`]=r[i]}var o=e=>`var(--space-${e})`,s=e=>typeof e==`number`?`repeat(${e}, minmax(0, 1fr))`:e,c={start:n.default.alignStart,center:n.default.alignCenter,end:n.default.alignEnd,stretch:n.default.alignStretch,baseline:n.default.alignBaseline},l={start:n.default.justifyStart,center:n.default.justifyCenter,end:n.default.justifyEnd,stretch:n.default.justifyStretch},u={row:n.default.flowRow,column:n.default.flowColumn,dense:n.default.flowDense,"row dense":n.default.flowRowDense,"column dense":n.default.flowColumnDense};function d(e,n){let r=t.cascade(e),a=t.cascade(n),s={};for(let e of i){let t=r[e]??a[e];s[e]=t===void 0?void 0:o(t)}return s}function f({as:i,columns:o,minItemWidth:f,rows:p,autoRows:m,gap:h,rowGap:g,columnGap:_,align:v,justify:y,flow:b,inline:x=!1,className:S,style:C,...w}){let T=i??`div`,E={};return f===void 0?a(E,`grid-cols`,t.mapCascaded(t.cascade(o),s)):E[`--grid-cols-base`]=`repeat(auto-fill, minmax(min(${f}, 100%), 1fr))`,a(E,`grid-rows`,t.mapCascaded(t.cascade(p),s)),a(E,`grid-rgap`,d(g,h)),a(E,`grid-cgap`,d(_,h)),m!==void 0&&(E[`--grid-auto-rows`]=m),(0,r.jsx)(T,{className:e.cx(n.default.grid,x&&n.default.inline,v&&c[v],y&&l[y],b&&u[b],S),style:{...E,...C},...w})}var p=e=>String(e);function m(e,n,r){let a=t.cascade(e),o=e!==void 0||n!==void 0||r!==void 0,s={},c={};for(let e of i){let t=a[e];o?t===`full`?(s[e]=`1`,c[e]=`-1`):t===void 0?(s[e]=n===void 0?`auto`:p(n),c[e]=r===void 0?`auto`:p(r)):n===void 0&&r!==void 0?(s[e]=`span ${t}`,c[e]=p(r)):(s[e]=n===void 0?`auto`:p(n),c[e]=`span ${t}`):s[e]=c[e]=void 0}return{start:s,end:c}}function h({as:t,colSpan:i,rowSpan:o,colStart:s,colEnd:c,rowStart:l,rowEnd:u,className:d,style:f,...p}){let h=t??`div`,g={},_=m(i,s,c);a(g,`gi-cs`,_.start),a(g,`gi-ce`,_.end);let v=m(o,l,u);return a(g,`gi-rs`,v.start),a(g,`gi-re`,v.end),(0,r.jsx)(h,{className:e.cx(n.default.item,d),style:{...g,...f},...p})}f.Item=h,exports.Grid=f,exports.GridItem=h;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
|
+
import { RESPONSIVE_KEYS as t, cascade as n, changedKeys as r, mapCascaded as i } from "../../../utils/responsive.mjs";
|
|
3
3
|
import a from "./Grid.module.css.mjs";
|
|
4
4
|
import { jsx as o } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
var s =
|
|
7
|
-
function c(e, t,
|
|
8
|
-
for (let i of n
|
|
5
|
+
// src/components/layout/Grid/Grid.tsx
|
|
6
|
+
var s = t;
|
|
7
|
+
function c(e, t, n) {
|
|
8
|
+
for (let i of r(n)) e[`--${t}-${i}`] = n[i];
|
|
9
9
|
}
|
|
10
10
|
var l = (e) => `var(--space-${e})`, u = (e) => typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e, d = {
|
|
11
11
|
start: a.alignStart,
|
|
@@ -25,18 +25,18 @@ var l = (e) => `var(--space-${e})`, u = (e) => typeof e == "number" ? `repeat(${
|
|
|
25
25
|
"row dense": a.flowRowDense,
|
|
26
26
|
"column dense": a.flowColumnDense
|
|
27
27
|
};
|
|
28
|
-
function m(e,
|
|
29
|
-
let r =
|
|
28
|
+
function m(e, t) {
|
|
29
|
+
let r = n(e), i = n(t), a = {};
|
|
30
30
|
for (let e of s) {
|
|
31
31
|
let t = r[e] ?? i[e];
|
|
32
32
|
a[e] = t === void 0 ? void 0 : l(t);
|
|
33
33
|
}
|
|
34
34
|
return a;
|
|
35
35
|
}
|
|
36
|
-
function h({ as:
|
|
37
|
-
let E =
|
|
38
|
-
return s === void 0 ? c(D, "grid-cols",
|
|
39
|
-
className:
|
|
36
|
+
function h({ as: t, columns: r, minItemWidth: s, rows: l, autoRows: h, gap: g, rowGap: _, columnGap: v, align: y, justify: b, flow: x, inline: S = !1, className: C, style: w, ...T }) {
|
|
37
|
+
let E = t ?? "div", D = {};
|
|
38
|
+
return s === void 0 ? c(D, "grid-cols", i(n(r), u)) : D["--grid-cols-base"] = `repeat(auto-fill, minmax(min(${s}, 100%), 1fr))`, c(D, "grid-rows", i(n(l), u)), c(D, "grid-rgap", m(_, g)), c(D, "grid-cgap", m(v, g)), h !== void 0 && (D["--grid-auto-rows"] = h), /* @__PURE__ */ o(E, {
|
|
39
|
+
className: e(a.grid, S && a.inline, y && d[y], b && f[b], x && p[x], C),
|
|
40
40
|
style: {
|
|
41
41
|
...D,
|
|
42
42
|
...w
|
|
@@ -45,23 +45,23 @@ function h({ as: e, columns: n, minItemWidth: s, rows: l, autoRows: h, gap: g, r
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
var g = (e) => String(e);
|
|
48
|
-
function _(e,
|
|
49
|
-
let i =
|
|
48
|
+
function _(e, t, r) {
|
|
49
|
+
let i = n(e), a = e !== void 0 || t !== void 0 || r !== void 0, o = {}, c = {};
|
|
50
50
|
for (let e of s) {
|
|
51
|
-
let
|
|
52
|
-
a ?
|
|
51
|
+
let n = i[e];
|
|
52
|
+
a ? n === "full" ? (o[e] = "1", c[e] = "-1") : n === void 0 ? (o[e] = t === void 0 ? "auto" : g(t), c[e] = r === void 0 ? "auto" : g(r)) : t === void 0 && r !== void 0 ? (o[e] = `span ${n}`, c[e] = g(r)) : (o[e] = t === void 0 ? "auto" : g(t), c[e] = `span ${n}`) : o[e] = c[e] = void 0;
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
55
|
start: o,
|
|
56
56
|
end: c
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function v({ as:
|
|
60
|
-
let m =
|
|
59
|
+
function v({ as: t, colSpan: n, rowSpan: r, colStart: i, colEnd: s, rowStart: l, rowEnd: u, className: d, style: f, ...p }) {
|
|
60
|
+
let m = t ?? "div", h = {}, g = _(n, i, s);
|
|
61
61
|
c(h, "gi-cs", g.start), c(h, "gi-ce", g.end);
|
|
62
|
-
let v = _(
|
|
62
|
+
let v = _(r, l, u);
|
|
63
63
|
return c(h, "gi-rs", v.start), c(h, "gi-re", v.end), /* @__PURE__ */ o(m, {
|
|
64
|
-
className:
|
|
64
|
+
className: e(a.item, d),
|
|
65
65
|
style: {
|
|
66
66
|
...h,
|
|
67
67
|
...f
|
|
@@ -70,5 +70,4 @@ function v({ as: e, colSpan: t, rowSpan: n, colStart: r, colEnd: s, rowStart: l,
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
h.Item = v;
|
|
73
|
-
//#endregion
|
|
74
73
|
export { h as Grid, v as GridItem };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Grid/Grid.module.css
|
|
2
2
|
var e = "_grid_17fyi_17", t = "_inline_17fyi_93", n = "_alignStart_17fyi_193", r = "_alignCenter_17fyi_195", i = "_alignEnd_17fyi_197", a = "_alignStretch_17fyi_199", o = "_alignBaseline_17fyi_201", s = "_justifyStart_17fyi_207", c = "_justifyCenter_17fyi_209", l = "_justifyEnd_17fyi_211", u = "_justifyStretch_17fyi_213", d = "_flowRow_17fyi_219", f = "_flowColumn_17fyi_221", p = "_flowDense_17fyi_223", m = "_flowRowDense_17fyi_225", h = "_flowColumnDense_17fyi_227", g = "_item_17fyi_17", _ = {
|
|
3
3
|
grid: e,
|
|
4
4
|
inline: t,
|
|
@@ -18,5 +18,4 @@ var e = "_grid_17fyi_17", t = "_inline_17fyi_93", n = "_alignStart_17fyi_193", r
|
|
|
18
18
|
flowColumnDense: h,
|
|
19
19
|
item: g
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { o as alignBaseline, r as alignCenter, i as alignEnd, n as alignStart, a as alignStretch, _ as default, f as flowColumn, h as flowColumnDense, p as flowDense, d as flowRow, m as flowRowDense, e as grid, t as inline, g as item, c as justifyCenter, l as justifyEnd, s as justifyStart, u as justifyStretch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../hooks/useControllableState.cjs.js"),t=require("
|
|
1
|
+
"use client";const e=require("../../../hooks/useControllableState.cjs.js"),t=require("../../../hooks/useMergedRef.cjs.js"),n=require("../../../utils/cx.cjs.js"),r=require("../../utilities/LocaleProvider/LocaleProvider.cjs.js"),i=require("./ResizablePanels.module.css.cjs.js");let a=require("react"),o=require("react/jsx-runtime");var s=(0,a.createContext)(null),c=(0,a.createContext)(0);function l(e){let t=(0,a.useContext)(s);if(!t)throw Error(`${e} must be a direct child of <ResizablePanels>.`);return t}var u=e=>Math.round(e*100)/100,d=(e,t,n)=>Math.min(n,Math.max(t,e));function f(e){let t=e.reduce((e,t)=>e+(t??0),0),n=e.filter(e=>e===void 0).length,r=n>0?Math.max(0,100-t)/n:0,i=e.map(e=>e??r),a=i.reduce((e,t)=>e+t,0)||1;return i.map(e=>u(e/a*100))}var p=({orientation:r=`horizontal`,layout:l,defaultLayout:p,onLayoutChange:h,keyboardStep:g=5,className:_,children:v,ref:y,...b})=>{let x=(0,a.useRef)(null),S=t.useMergedRef(x,y),C=(0,a.useId)(),[w,T]=(0,a.useState)(!1),E=a.Children.toArray(v).filter(e=>(0,a.isValidElement)(e)&&e.type===m),D=E.map((e,t)=>({min:e.props.minSize??10,max:e.props.maxSize??100,collapsible:e.props.collapsible??!1,collapsed:e.props.collapsedSize??0,label:e.props.label,id:e.props.id??`${C}-panel-${t}`})),[O,k]=e.useControllableState({value:l,defaultValue:p??f(E.map(e=>e.props.defaultSize)),onChange:h}),A=(0,a.useRef)(new Map),j=(e,t,{snap:n=!0}={})=>{let r=e,i=e+1,a=D[r],o=D[i];if(!a||!o)return;let s=O[r]+O[i],c=(e,t)=>t.collapsible&&e<t.min?n&&e<(t.min+t.collapsed)/2?t.collapsed:t.min:d(e,t.min,t.max),l=c(t,a),f=c(s-l,o);if(l=s-f,(l>a.max||l<a.min&&!(a.collapsible&&l===a.collapsed))&&(l=d(l,a.min,a.max),f=s-l),u(l)===u(O[r])&&u(f)===u(O[i]))return;a.collapsible&&l<=a.collapsed&&O[r]>a.collapsed&&A.current.set(r,O[r]);let p=O.slice();p[r]=u(l),p[i]=u(f),k(p)},M=e=>{let t=D[e];if(!t?.collapsible)return;let n=O[e];if(n<=t.collapsed){let n=A.current.get(e)??Math.max(t.min,100/D.length);j(e,n,{snap:!1})}else{A.current.set(e,n);let r=O[e]+O[e+1],i=O.slice();i[e]=t.collapsed,i[e+1]=u(r-t.collapsed),k(i)}},N=-1,P=a.Children.map(v,e=>((0,a.isValidElement)(e)&&e.type===m&&(N+=1),(0,o.jsx)(c.Provider,{value:Math.max(0,N),children:e})));return(0,o.jsx)(s.Provider,{value:{orientation:r,layout:O,panels:D,resize:j,toggleCollapse:M,keyboardStep:g,groupRef:x,setResizing:T},children:(0,o.jsx)(`div`,{...b,ref:S,className:n.cx(i.default.group,_),"data-orientation":r,"data-resizing":w?``:void 0,children:P})})},m=({defaultSize:e,minSize:t,maxSize:r,collapsible:s,collapsedSize:u,label:d,className:f,style:p,children:m,...h})=>{let g=l(`ResizablePanels.Panel`),_=(0,a.useContext)(c),v=g.panels[_],y=g.layout[_]??0,b=!!v?.collapsible&&y<=v.collapsed,x=b&&y===0;return(0,o.jsx)(`div`,{role:`group`,...h,id:v?.id,"aria-label":h[`aria-label`]??d,className:n.cx(i.default.panel,f),style:{...p,flex:`${y} 1 0px`},"data-collapsed":b?``:void 0,inert:x||void 0,"aria-hidden":x||void 0,children:m})},h=({className:e,onKeyDown:t,onPointerDown:s,onPointerMove:u,onPointerUp:d,onPointerCancel:f,onDoubleClick:p,"aria-label":m,...h})=>{let g=l(`ResizablePanels.Handle`),_=r.useMessages().resizablePanels,v=(0,a.useContext)(c),y=g.panels[v],b=g.layout[v]??0,x=g.orientation===`horizontal`,S=(0,a.useRef)(null),C=e=>{if(s?.(e),e.defaultPrevented||e.button!==0||!g.groupRef.current)return;e.preventDefault();let t=g.groupRef.current,n=t.getBoundingClientRect(),r=0;for(let e of Array.from(t.children))if(e.getAttribute(`role`)===`separator`){let t=e.getBoundingClientRect();r+=x?t.width:t.height}let i=(x?n.width:n.height)-r;S.current={start:x?e.clientX:e.clientY,size:b,perPx:i>0?100/i:0,rtl:x&&getComputedStyle(t).direction===`rtl`};try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}e.currentTarget.focus({preventScroll:!0}),g.setResizing(!0)},w=e=>{u?.(e);let t=S.current;if(!t)return;let n=((x?e.clientX:e.clientY)-t.start)*t.perPx;g.resize(v,t.size+(t.rtl?-n:n))},T=()=>{S.current&&(S.current=null,g.setResizing(!1))},E=e=>{if(t?.(e),e.defaultPrevented||!y)return;let n=x&&getComputedStyle(e.currentTarget).direction===`rtl`,r=g.keyboardStep,i=x?n?`ArrowLeft`:`ArrowRight`:`ArrowDown`,a=x?n?`ArrowRight`:`ArrowLeft`:`ArrowUp`;switch(e.key){case i:e.preventDefault(),g.resize(v,b+r,{snap:!1});return;case a:e.preventDefault(),y.collapsible&&b<=y.min&&b>y.collapsed?g.toggleCollapse(v):g.resize(v,Math.max(b-r,y.min),{snap:!1});return;case`Home`:e.preventDefault(),g.resize(v,y.min,{snap:!1});return;case`End`:e.preventDefault(),g.resize(v,y.max,{snap:!1});return;case`Enter`:e.preventDefault(),g.toggleCollapse(v)}};return(0,o.jsx)(`div`,{role:`separator`,tabIndex:0,"aria-orientation":x?`vertical`:`horizontal`,"aria-valuenow":Math.round(b),"aria-valuemin":y?.collapsible?Math.round(y.collapsed):Math.round(y?.min??0),"aria-valuemax":Math.round(y?.max??100),"aria-controls":y?.id,"aria-label":m??(y?.label?_.resizePanel(y.label):_.handle),...h,className:n.cx(i.default.handle,e),"data-orientation":g.orientation,onPointerDown:C,onPointerMove:w,onPointerUp:e=>{d?.(e),T()},onPointerCancel:e=>{f?.(e),T()},onLostPointerCapture:T,onDoubleClick:e=>{p?.(e),e.defaultPrevented||g.toggleCollapse(v)},onKeyDown:E,children:(0,o.jsx)(`span`,{className:i.default.grip,"aria-hidden":`true`})})},g=Object.assign(p,{Panel:m,Handle:h});exports.ResizablePanel=m,exports.ResizablePanels=g,exports.ResizablePanelsHandle=h;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { useControllableState as e } from "../../../hooks/useControllableState.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useMergedRef as t } from "../../../hooks/useMergedRef.mjs";
|
|
4
|
+
import { cx as n } from "../../../utils/cx.mjs";
|
|
5
|
+
import { useMessages as r } from "../../utilities/LocaleProvider/LocaleProvider.mjs";
|
|
5
6
|
import i from "./ResizablePanels.module.css.mjs";
|
|
6
7
|
import { Children as a, createContext as o, isValidElement as s, useContext as c, useId as l, useRef as u, useState as d } from "react";
|
|
7
8
|
import { jsx as f } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
+
// src/components/layout/ResizablePanels/ResizablePanels.tsx
|
|
9
10
|
var p = o(null), m = o(0);
|
|
10
11
|
function h(e) {
|
|
11
12
|
let t = c(p);
|
|
@@ -17,8 +18,8 @@ function v(e) {
|
|
|
17
18
|
let t = e.reduce((e, t) => e + (t ?? 0), 0), n = e.filter((e) => e === void 0).length, r = n > 0 ? Math.max(0, 100 - t) / n : 0, i = e.map((e) => e ?? r), a = i.reduce((e, t) => e + t, 0) || 1;
|
|
18
19
|
return i.map((e) => g(e / a * 100));
|
|
19
20
|
}
|
|
20
|
-
var y = ({ orientation:
|
|
21
|
-
let T = u(null), E =
|
|
21
|
+
var y = ({ orientation: r = "horizontal", layout: o, defaultLayout: c, onLayoutChange: h, keyboardStep: y = 5, className: x, children: S, ref: C, ...w }) => {
|
|
22
|
+
let T = u(null), E = t(T, C), D = l(), [O, k] = d(!1), A = a.toArray(S).filter((e) => s(e) && e.type === b), j = A.map((e, t) => ({
|
|
22
23
|
min: e.props.minSize ?? 10,
|
|
23
24
|
max: e.props.maxSize ?? 100,
|
|
24
25
|
collapsible: e.props.collapsible ?? !1,
|
|
@@ -55,7 +56,7 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
55
56
|
})));
|
|
56
57
|
return /* @__PURE__ */ f(p.Provider, {
|
|
57
58
|
value: {
|
|
58
|
-
orientation:
|
|
59
|
+
orientation: r,
|
|
59
60
|
layout: M,
|
|
60
61
|
panels: j,
|
|
61
62
|
resize: F,
|
|
@@ -67,20 +68,20 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
67
68
|
children: /* @__PURE__ */ f("div", {
|
|
68
69
|
...w,
|
|
69
70
|
ref: E,
|
|
70
|
-
className:
|
|
71
|
-
"data-orientation":
|
|
71
|
+
className: n(i.group, x),
|
|
72
|
+
"data-orientation": r,
|
|
72
73
|
"data-resizing": O ? "" : void 0,
|
|
73
74
|
children: R
|
|
74
75
|
})
|
|
75
76
|
});
|
|
76
|
-
}, b = ({ defaultSize: e, minSize: t, maxSize:
|
|
77
|
+
}, b = ({ defaultSize: e, minSize: t, maxSize: r, collapsible: a, collapsedSize: o, label: s, className: l, style: u, children: d, ...p }) => {
|
|
77
78
|
let g = h("ResizablePanels.Panel"), _ = c(m), v = g.panels[_], y = g.layout[_] ?? 0, b = !!v?.collapsible && y <= v.collapsed, x = b && y === 0;
|
|
78
79
|
return /* @__PURE__ */ f("div", {
|
|
79
80
|
role: "group",
|
|
80
81
|
...p,
|
|
81
82
|
id: v?.id,
|
|
82
83
|
"aria-label": p["aria-label"] ?? s,
|
|
83
|
-
className:
|
|
84
|
+
className: n(i.panel, l),
|
|
84
85
|
style: {
|
|
85
86
|
...u,
|
|
86
87
|
flex: `${y} 1 0px`
|
|
@@ -90,8 +91,8 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
90
91
|
"aria-hidden": x || void 0,
|
|
91
92
|
children: d
|
|
92
93
|
});
|
|
93
|
-
}, x = ({ className: e, onKeyDown:
|
|
94
|
-
let _ = h("ResizablePanels.Handle"), v =
|
|
94
|
+
}, x = ({ className: e, onKeyDown: t, onPointerDown: a, onPointerMove: o, onPointerUp: s, onPointerCancel: l, onDoubleClick: d, "aria-label": p, ...g }) => {
|
|
95
|
+
let _ = h("ResizablePanels.Handle"), v = r().resizablePanels, y = c(m), b = _.panels[y], x = _.layout[y] ?? 0, S = _.orientation === "horizontal", C = u(null), w = (e) => {
|
|
95
96
|
if (a?.(e), e.defaultPrevented || e.button !== 0 || !_.groupRef.current) return;
|
|
96
97
|
e.preventDefault();
|
|
97
98
|
let t = _.groupRef.current, n = t.getBoundingClientRect(), r = 0;
|
|
@@ -119,8 +120,8 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
119
120
|
}, E = () => {
|
|
120
121
|
C.current && (C.current = null, _.setResizing(!1));
|
|
121
122
|
}, D = (e) => {
|
|
122
|
-
if (
|
|
123
|
-
let
|
|
123
|
+
if (t?.(e), e.defaultPrevented || !b) return;
|
|
124
|
+
let n = S && getComputedStyle(e.currentTarget).direction === "rtl", r = _.keyboardStep, i = S ? n ? "ArrowLeft" : "ArrowRight" : "ArrowDown", a = S ? n ? "ArrowRight" : "ArrowLeft" : "ArrowUp";
|
|
124
125
|
switch (e.key) {
|
|
125
126
|
case i:
|
|
126
127
|
e.preventDefault(), _.resize(y, x + r, { snap: !1 });
|
|
@@ -147,7 +148,7 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
147
148
|
"aria-controls": b?.id,
|
|
148
149
|
"aria-label": p ?? (b?.label ? v.resizePanel(b.label) : v.handle),
|
|
149
150
|
...g,
|
|
150
|
-
className:
|
|
151
|
+
className: n(i.handle, e),
|
|
151
152
|
"data-orientation": _.orientation,
|
|
152
153
|
onPointerDown: w,
|
|
153
154
|
onPointerMove: T,
|
|
@@ -171,5 +172,4 @@ var y = ({ orientation: t = "horizontal", layout: o, defaultLayout: c, onLayoutC
|
|
|
171
172
|
Panel: b,
|
|
172
173
|
Handle: x
|
|
173
174
|
});
|
|
174
|
-
//#endregion
|
|
175
175
|
export { b as ResizablePanel, S as ResizablePanels, x as ResizablePanelsHandle };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/ResizablePanels/ResizablePanels.module.css
|
|
2
2
|
var e = "_group_26c6b_11", t = "_panel_26c6b_38", n = "_handle_26c6b_49", r = "_grip_26c6b_86", i = {
|
|
3
3
|
group: e,
|
|
4
4
|
panel: t,
|
|
5
5
|
handle: n,
|
|
6
6
|
grip: r
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { i as default, r as grip, e as group, n as handle, t as panel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../hooks/useMergedRef.cjs.js"),t=require("../../../utils/cx.cjs.js"),n=require("./ScrollArea.module.css.cjs.js");let r=require("react"),i=require("react/jsx-runtime");var a={sm:n.default.sm,md:n.default.md},o=({children:o,type:s=`auto`,scrollbars:c=`vertical`,size:l=`md`,maxHeight:u,shadows:d=!0,hideDelay:f=800,viewportRef:p,viewportClassName:m,onViewportScroll:h,className:g,style:_,tabIndex:v,role:y,"aria-label":b,"aria-labelledby":x,ref:S,...C})=>{let w=(0,r.useRef)(null),T=e.useMergedRef(w,S),E=(0,r.useRef)(null),D=(0,r.useRef)(null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),A=(0,r.useRef)(null),j=(0,r.useRef)(null),M=e.useMergedRef(E,p),N=c!==`horizontal`,P=c!==`vertical`,F=!!(b||x),I=(0,r.useRef)({rtl:!1,minThumb:24}),L=(0,r.useCallback)(()=>{let e=E.current,t=A.current??j.current;if(e&&(I.current.rtl=getComputedStyle(e).direction===`rtl`),t){let e=parseFloat(getComputedStyle(t).getPropertyValue(`--_min-thumb`));e>0&&(I.current.minThumb=e)}},[]),R=(0,r.useCallback)(()=>{let e=w.current,t=E.current;if(!e||!t)return;let{rtl:n,minThumb:r}=I.current,i=t.scrollHeight-t.clientHeight,a=t.scrollWidth-t.clientWidth,o=N&&i>1,s=P&&a>1,c=t.scrollTop,l=Math.abs(t.scrollLeft),u=(t,n)=>{n?e.setAttribute(t,``):e.removeAttribute(t)};u(`data-overflow-y`,o),u(`data-overflow-x`,s),u(`data-scroll-top`,o&&c>1),u(`data-scroll-bottom`,o&&c<i-1),u(`data-scroll-start`,s&&l>1),u(`data-scroll-end`,s&&l<a-1),v===void 0&&(o||s?t.tabIndex=0:t.removeAttribute(`tabindex`));let d=(e,t,i,a,o,s,c)=>{if(!e||!t)return;let l=c===`y`?e.clientHeight:e.clientWidth,u=a>0?Math.max(r,Math.min(l,i/a*l)):l,d=s>0?o/s*(l-u):0;t.style.setProperty(`--_thumb-size`,`${u}px`);let f=c===`x`&&n?-d:d;t.style.transform=c===`y`?`translateY(${f}px)`:`translateX(${f}px)`};d(O.current,A.current,t.clientHeight,t.scrollHeight,c,i,`y`),d(k.current,j.current,t.clientWidth,t.scrollWidth,l,a,`x`)},[N,P,v]);(0,r.useLayoutEffect)(()=>{L(),R();let e=E.current,t=D.current;if(!e||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{L(),R()});return n.observe(e),t&&n.observe(t),()=>n.disconnect()},[L,R]);let z=(0,r.useRef)(void 0);(0,r.useEffect)(()=>()=>window.clearTimeout(z.current),[]);let B=()=>{let e=w.current;!e||s!==`hover`&&s!==`scroll`||(e.setAttribute(`data-scrolling`,``),window.clearTimeout(z.current),z.current=window.setTimeout(()=>e.removeAttribute(`data-scrolling`),f))},V=(0,r.useRef)(h);V.current=h,(0,r.useEffect)(()=>{let e=E.current;if(!e)return;let t=e=>{R(),B(),V.current?.(e)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[R,s,f]);let H=(0,r.useRef)(null),U=e=>t=>{let n=E.current,r=t.currentTarget,i=e===`y`?A.current:j.current;if(!n||!i||t.button!==0)return;if(t.preventDefault(),t.target===i){let a=e===`y`?r.clientHeight:r.clientWidth,o=e===`y`?i.offsetHeight:i.offsetWidth,s=e===`y`?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth;H.current={axis:e,start:e===`y`?t.clientY:t.clientX,scroll:e===`y`?n.scrollTop:n.scrollLeft,ratio:s/Math.max(1,a-o)};try{r.setPointerCapture(t.pointerId)}catch{}w.current?.setAttribute(`data-dragging`,``);return}let a=i.getBoundingClientRect();if(e===`y`){let e=t.clientY<a.top?-1:1;n.scrollBy({top:e*n.clientHeight*.9})}else{let e=t.clientX<a.left;n.scrollBy({left:(e?-1:1)*n.clientWidth*.9})}},W=e=>{let t=H.current,n=E.current;if(!t||!n)return;let r=(t.axis===`y`?e.clientY:e.clientX)-t.start;t.axis===`y`?n.scrollTop=t.scroll+r*t.ratio:n.scrollLeft=t.scroll+r*t.ratio},G=()=>{H.current=null,w.current?.removeAttribute(`data-dragging`)},K=e=>({className:n.default.scrollbar,"data-orientation":e===`y`?`vertical`:`horizontal`,"aria-hidden":!0,onPointerDown:U(e),onPointerMove:W,onPointerUp:G,onPointerCancel:G}),q=u===void 0?_:{..._,"--_max-h":typeof u==`number`?`${u}px`:u};return(0,i.jsxs)(`div`,{...C,ref:T,className:t.cx(n.default.root,a[l],d&&n.default.shadows,g),style:q,"data-type":s,"data-scrollbars":c,children:[(0,i.jsx)(`div`,{ref:M,className:t.cx(n.default.viewport,m),role:y??(F?`region`:void 0),"aria-label":b,"aria-labelledby":x,tabIndex:v,children:(0,i.jsx)(`div`,{ref:D,className:n.default.content,children:o})}),N&&(0,i.jsx)(`div`,{ref:O,...K(`y`),children:(0,i.jsx)(`div`,{ref:A,className:n.default.thumb})}),P&&(0,i.jsx)(`div`,{ref:k,...K(`x`),children:(0,i.jsx)(`div`,{ref:j,className:n.default.thumb})})]})};exports.ScrollArea=o;
|
|
1
|
+
"use client";const e=require("../../../hooks/useMergedRef.cjs.js"),t=require("../../../utils/cx.cjs.js"),n=require("./ScrollArea.module.css.cjs.js");let r=require("react"),i=require("react/jsx-runtime");var a={sm:n.default.sm,md:n.default.md},o=({children:o,type:s=`auto`,scrollbars:c=`vertical`,size:l=`md`,maxHeight:u,shadows:d=!0,hideDelay:f=800,viewportRef:p,viewportClassName:m,onViewportScroll:h,className:g,style:_,tabIndex:v,role:y,"aria-label":b,"aria-labelledby":x,ref:S,...C})=>{let w=(0,r.useRef)(null),T=e.useMergedRef(w,S),E=(0,r.useRef)(null),D=(0,r.useRef)(null),O=(0,r.useRef)(null),k=(0,r.useRef)(null),A=(0,r.useRef)(null),j=(0,r.useRef)(null),M=e.useMergedRef(E,p),N=c!==`horizontal`,P=c!==`vertical`,F=!!(b||x),I=(0,r.useRef)({rtl:!1,minThumb:24}),L=(0,r.useCallback)(()=>{let e=E.current,t=A.current??j.current;if(e&&(I.current.rtl=getComputedStyle(e).direction===`rtl`),t){let e=parseFloat(getComputedStyle(t).getPropertyValue(`--_min-thumb`));e>0&&(I.current.minThumb=e)}},[]),R=(0,r.useCallback)(()=>{let e=w.current,t=E.current;if(!e||!t)return;let{rtl:n,minThumb:r}=I.current,i=t.scrollHeight-t.clientHeight,a=t.scrollWidth-t.clientWidth,o=N&&i>1,s=P&&a>1,c=t.scrollTop,l=Math.abs(t.scrollLeft),u=(t,n)=>{n?e.setAttribute(t,``):e.removeAttribute(t)};u(`data-overflow-y`,o),u(`data-overflow-x`,s),u(`data-scroll-top`,o&&c>1),u(`data-scroll-bottom`,o&&c<i-1),u(`data-scroll-start`,s&&l>1),u(`data-scroll-end`,s&&l<a-1),v===void 0&&(o||s?t.tabIndex=0:t.removeAttribute(`tabindex`));let d=(e,t,i,a,o,s,c)=>{if(!e||!t)return;let l=c===`y`?e.clientHeight:e.clientWidth,u=a>0?Math.max(r,Math.min(l,i/a*l)):l,d=s>0?o/s*(l-u):0;t.style.setProperty(`--_thumb-size`,`${u}px`);let f=c===`x`&&n?-d:d;t.style.transform=c===`y`?`translateY(${f}px)`:`translateX(${f}px)`};d(O.current,A.current,t.clientHeight,t.scrollHeight,c,i,`y`),d(k.current,j.current,t.clientWidth,t.scrollWidth,l,a,`x`)},[N,P,v]);(0,r.useLayoutEffect)(()=>{L(),R();let e=E.current,t=D.current;if(!e||typeof ResizeObserver>`u`)return;let n=new ResizeObserver(()=>{L(),R()});return n.observe(e),t&&n.observe(t),()=>n.disconnect()},[L,R]);let z=(0,r.useRef)(void 0);(0,r.useEffect)(()=>()=>window.clearTimeout(z.current),[]);let B=()=>{let e=w.current;!e||s!==`hover`&&s!==`scroll`||(e.setAttribute(`data-scrolling`,``),window.clearTimeout(z.current),z.current=window.setTimeout(()=>e.removeAttribute(`data-scrolling`),f))},V=(0,r.useRef)(h);V.current=h,(0,r.useEffect)(()=>{let e=E.current;if(!e)return;let t=e=>{R(),B(),V.current?.(e)};return e.addEventListener(`scroll`,t,{passive:!0}),()=>e.removeEventListener(`scroll`,t)},[R,s,f]);let H=(0,r.useRef)(null),U=e=>t=>{let n=E.current,r=t.currentTarget,i=e===`y`?A.current:j.current;if(!n||!i||t.button!==0)return;if(t.preventDefault(),t.target===i){let a=e===`y`?r.clientHeight:r.clientWidth,o=e===`y`?i.offsetHeight:i.offsetWidth,s=e===`y`?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth;H.current={axis:e,start:e===`y`?t.clientY:t.clientX,scroll:e===`y`?n.scrollTop:n.scrollLeft,ratio:s/Math.max(1,a-o)};try{r.setPointerCapture(t.pointerId)}catch{}w.current?.setAttribute(`data-dragging`,``);return}let a=i.getBoundingClientRect();if(e===`y`){let e=t.clientY<a.top?-1:1;n.scrollBy({top:e*n.clientHeight*.9})}else{let e=t.clientX<a.left;n.scrollBy({left:(e?-1:1)*n.clientWidth*.9})}},W=e=>{let t=H.current,n=E.current;if(!t||!n)return;let r=(t.axis===`y`?e.clientY:e.clientX)-t.start;t.axis===`y`?n.scrollTop=t.scroll+r*t.ratio:n.scrollLeft=t.scroll+r*t.ratio},G=()=>{H.current=null,w.current?.removeAttribute(`data-dragging`)},K=e=>({className:n.default.scrollbar,"data-orientation":e===`y`?`vertical`:`horizontal`,"aria-hidden":!0,onPointerDown:U(e),onPointerMove:W,onPointerUp:G,onPointerCancel:G}),q=u===void 0?_:{..._,"--_max-h":typeof u==`number`?`${u}px`:u};return(0,i.jsxs)(`div`,{...C,ref:T,className:t.cx(n.default.root,a[l],d&&n.default.shadows,g),style:q,"data-type":s,"data-scrollbars":c,children:[(0,i.jsx)(`div`,{ref:M,className:t.cx(n.default.viewport,m),role:y??(F?`region`:void 0),"aria-label":b,"aria-labelledby":x,tabIndex:v,children:(0,i.jsx)(`div`,{ref:D,className:n.default.content,children:o})}),N&&(0,i.jsx)(`div`,{ref:O,...K(`y`),children:(0,i.jsx)(`div`,{ref:A,className:n.default.thumb})}),P&&(0,i.jsx)(`div`,{ref:k,...K(`x`),children:(0,i.jsx)(`div`,{ref:j,className:n.default.thumb})})]})};exports.ScrollArea=o;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { useMergedRef as e } from "../../../hooks/useMergedRef.mjs";
|
|
2
3
|
import { cx as t } from "../../../utils/cx.mjs";
|
|
3
4
|
import n from "./ScrollArea.module.css.mjs";
|
|
4
5
|
import { useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o } from "react";
|
|
5
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
-
|
|
7
|
+
// src/components/layout/ScrollArea/ScrollArea.tsx
|
|
7
8
|
var l = {
|
|
8
9
|
sm: n.sm,
|
|
9
10
|
md: n.md
|
|
@@ -148,5 +149,4 @@ var l = {
|
|
|
148
149
|
]
|
|
149
150
|
});
|
|
150
151
|
};
|
|
151
|
-
//#endregion
|
|
152
152
|
export { u as ScrollArea };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/ScrollArea/ScrollArea.module.css
|
|
2
2
|
var e = "_root_r9tlp_19", t = "_sm_r9tlp_49", n = "_md_r9tlp_59", r = "_viewport_r9tlp_69", i = "_content_r9tlp_149", a = "_scrollbar_r9tlp_163", o = "_thumb_r9tlp_237", s = "_shadows_r9tlp_355", c = {
|
|
3
3
|
root: e,
|
|
4
4
|
sm: t,
|
|
@@ -9,5 +9,4 @@ var e = "_root_r9tlp_19", t = "_sm_r9tlp_49", n = "_md_r9tlp_59", r = "_viewport
|
|
|
9
9
|
thumb: o,
|
|
10
10
|
shadows: s
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { i as content, c as default, n as md, e as root, a as scrollbar, s as shadows, t as sm, o as thumb, r as viewport };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../utils/
|
|
1
|
+
const e=require("../../../utils/cx.cjs.js"),t=require("../../../utils/responsive.cjs.js"),n=require("./Stack.module.css.cjs.js");let r=require("react"),i=require("react/jsx-runtime");var a={start:`flex-start`,center:`center`,end:`flex-end`,stretch:`stretch`,baseline:`baseline`},o={start:`flex-start`,center:`center`,end:`flex-end`,between:`space-between`,around:`space-around`,evenly:`space-evenly`},s=t.responsiveClasses(n.default,`dir`),c=t.responsiveClasses(n.default,`gap`),l=t.responsiveClasses(n.default,`wrap`),u=t.responsiveClasses(n.default,`align`),d=t.responsiveClasses(n.default,`justify`),f={sm:n.default.stackBelowSm,md:n.default.stackBelowMd,lg:n.default.stackBelowLg},p=e=>`var(--space-${e})`;function m(m){let{as:h,direction:g=`column`,gap:_=4,align:v=`stretch`,justify:y=`start`,wrap:b=!1,divider:x,dividerSemantics:S=`decorative`,fullWidth:C=!1,stackBelow:w,className:T,style:E,children:D,role:O,...k}=m,A=h??`div`,j=h===`ul`||h===`ol`,M=t.isResponsiveObject(g),N=g===`row`||g===`row-reverse`,P=r.Children.toArray(D).filter(e=>e!=null&&typeof e!=`boolean`),F=x!=null&&x!==!1,I=e=>{if(x===!0){let t=S===`separator`&&!j&&!w&&!M;return(0,i.jsx)(j?`li`:`div`,{className:n.default.divider,...t?{role:`separator`,"aria-orientation":N?`vertical`:`horizontal`}:{"aria-hidden":!0}},e)}return j?(0,i.jsx)(`li`,{className:n.default.dividerSlot,"aria-hidden":`true`,children:x},e):(0,i.jsx)(r.Fragment,{children:x},e)},L=F?P.flatMap((e,t)=>{let n=(0,r.isValidElement)(e)&&e.key!=null?String(e.key):String(t);return t===0?[e]:[I(`stack-divider-${n}`),e]}):P,R={},z=[];return t.responsiveVars(`stack-dir`,g,String,s,R,z),t.responsiveVars(`stack-gap`,_,p,c,R,z),t.responsiveVars(`stack-wrap`,b,e=>e?`wrap`:`nowrap`,l,R,z),t.responsiveVars(`stack-align`,v,e=>a[e],u,R,z),t.responsiveVars(`stack-justify`,y,e=>o[e],d,R,z),(0,i.jsx)(A,{...k,role:O??(j?`list`:void 0),className:e.cx(n.default.root,...z,C&&n.default.fullWidth,j&&n.default.list,N&&w&&f[w],T),style:{...R,...E},children:L})}function h({reverse:e=!1,...t}){return(0,i.jsx)(m,{...t,direction:e?`row-reverse`:`row`})}function g({reverse:e=!1,...t}){return(0,i.jsx)(m,{...t,direction:e?`column-reverse`:`column`})}exports.HStack=h,exports.Stack=m,exports.VStack=g;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { cx as e } from "../../../utils/cx.mjs";
|
|
2
|
+
import { isResponsiveObject as t, responsiveClasses as n, responsiveVars as r } from "../../../utils/responsive.mjs";
|
|
3
3
|
import i from "./Stack.module.css.mjs";
|
|
4
4
|
import { Children as a, Fragment as o, isValidElement as s } from "react";
|
|
5
5
|
import { jsx as c } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/components/layout/Stack/Stack.tsx
|
|
7
7
|
var l = {
|
|
8
8
|
start: "flex-start",
|
|
9
9
|
center: "center",
|
|
@@ -17,13 +17,13 @@ var l = {
|
|
|
17
17
|
between: "space-between",
|
|
18
18
|
around: "space-around",
|
|
19
19
|
evenly: "space-evenly"
|
|
20
|
-
}, d =
|
|
20
|
+
}, d = n(i, "dir"), f = n(i, "gap"), p = n(i, "wrap"), m = n(i, "align"), h = n(i, "justify"), g = {
|
|
21
21
|
sm: i.stackBelowSm,
|
|
22
22
|
md: i.stackBelowMd,
|
|
23
23
|
lg: i.stackBelowLg
|
|
24
24
|
}, _ = (e) => `var(--space-${e})`;
|
|
25
|
-
function v(
|
|
26
|
-
let { as: v, direction: y = "column", gap: b = 4, align: x = "stretch", justify: S = "start", wrap: C = !1, divider: w, dividerSemantics: T = "decorative", fullWidth: E = !1, stackBelow: D, className: O, style: k, children: A, role: j, ...M } =
|
|
25
|
+
function v(n) {
|
|
26
|
+
let { as: v, direction: y = "column", gap: b = 4, align: x = "stretch", justify: S = "start", wrap: C = !1, divider: w, dividerSemantics: T = "decorative", fullWidth: E = !1, stackBelow: D, className: O, style: k, children: A, role: j, ...M } = n, N = v ?? "div", P = v === "ul" || v === "ol", F = t(y), I = y === "row" || y === "row-reverse", L = a.toArray(A).filter((e) => e != null && typeof e != "boolean"), R = w != null && w !== !1, z = (e) => {
|
|
27
27
|
if (w === !0) {
|
|
28
28
|
let t = T === "separator" && !P && !D && !F;
|
|
29
29
|
return /* @__PURE__ */ c(P ? "li" : "div", {
|
|
@@ -43,10 +43,10 @@ function v(t) {
|
|
|
43
43
|
let n = s(e) && e.key != null ? String(e.key) : String(t);
|
|
44
44
|
return t === 0 ? [e] : [z(`stack-divider-${n}`), e];
|
|
45
45
|
}) : L, V = {}, H = [];
|
|
46
|
-
return
|
|
46
|
+
return r("stack-dir", y, String, d, V, H), r("stack-gap", b, _, f, V, H), r("stack-wrap", C, (e) => e ? "wrap" : "nowrap", p, V, H), r("stack-align", x, (e) => l[e], m, V, H), r("stack-justify", S, (e) => u[e], h, V, H), /* @__PURE__ */ c(N, {
|
|
47
47
|
...M,
|
|
48
48
|
role: j ?? (P ? "list" : void 0),
|
|
49
|
-
className:
|
|
49
|
+
className: e(i.root, ...H, E && i.fullWidth, P && i.list, I && D && g[D], O),
|
|
50
50
|
style: {
|
|
51
51
|
...V,
|
|
52
52
|
...k
|
|
@@ -66,5 +66,4 @@ function b({ reverse: e = !1, ...t }) {
|
|
|
66
66
|
direction: e ? "column-reverse" : "column"
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
//#endregion
|
|
70
69
|
export { y as HStack, v as Stack, b as VStack };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/layout/Stack/Stack.module.css
|
|
2
2
|
var e = "_root_1737j_15", t = "_dirBase_1737j_29", n = "_gapBase_1737j_35", r = "_wrapBase_1737j_41", i = "_alignBase_1737j_47", a = "_justifyBase_1737j_53", o = "_dirSm_1737j_63", s = "_gapSm_1737j_69", c = "_wrapSm_1737j_75", l = "_alignSm_1737j_81", u = "_justifySm_1737j_87", d = "_dirMd_1737j_99", f = "_gapMd_1737j_105", p = "_wrapMd_1737j_111", m = "_alignMd_1737j_117", h = "_justifyMd_1737j_123", g = "_dirLg_1737j_135", _ = "_gapLg_1737j_141", v = "_wrapLg_1737j_147", y = "_alignLg_1737j_153", b = "_justifyLg_1737j_159", x = "_dirXl_1737j_171", S = "_gapXl_1737j_177", C = "_wrapXl_1737j_183", w = "_alignXl_1737j_189", T = "_justifyXl_1737j_195", E = "_dir2xl_1737j_207", D = "_gap2xl_1737j_213", O = "_wrap2xl_1737j_219", k = "_align2xl_1737j_225", A = "_justify2xl_1737j_231", j = "_fullWidth_1737j_243", M = "_list_1737j_253", N = "_divider_1737j_273", P = "_dividerSlot_1737j_299", F = "_stackBelowSm_1737j_313", I = "_stackBelowMd_1737j_325", L = "_stackBelowLg_1737j_337", R = {
|
|
3
3
|
root: e,
|
|
4
4
|
dirBase: t,
|
|
@@ -39,5 +39,4 @@ var e = "_root_1737j_15", t = "_dirBase_1737j_29", n = "_gapBase_1737j_35", r =
|
|
|
39
39
|
stackBelowMd: I,
|
|
40
40
|
stackBelowLg: L
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { k as align2xl, i as alignBase, y as alignLg, m as alignMd, l as alignSm, w as alignXl, R as default, E as dir2xl, t as dirBase, g as dirLg, d as dirMd, o as dirSm, x as dirXl, N as divider, P as dividerSlot, j as fullWidth, D as gap2xl, n as gapBase, _ as gapLg, f as gapMd, s as gapSm, S as gapXl, A as justify2xl, a as justifyBase, b as justifyLg, h as justifyMd, u as justifySm, T as justifyXl, M as list, e as root, L as stackBelowLg, I as stackBelowMd, F as stackBelowSm, O as wrap2xl, r as wrapBase, v as wrapLg, p as wrapMd, c as wrapSm, C as wrapXl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("../../../hooks/useControllableState.cjs.js"),t=require("
|
|
1
|
+
"use client";const e=require("../../../hooks/useControllableState.cjs.js"),t=require("../../../utils/cx.cjs.js"),n=require("../../../utils/flattenChildren.cjs.js"),r=require("../../primitives/Button/Button.cjs.js"),i=require("../../primitives/Icon/icons.cjs.js"),a=require("../../utilities/VisuallyHidden/VisuallyHidden.cjs.js"),o=require("../Link/Link.cjs.js"),s=require("./Breadcrumbs.module.css.cjs.js"),c=require("../../utilities/LocaleProvider/LocaleProvider.cjs.js");let l=require("react"),u=require("react/jsx-runtime");var d=globalThis.process?.env?.NODE_ENV!==`production`,f=(0,l.createContext)(null),p=(0,l.createContext)(null),m={sm:s.default.sm,md:s.default.md,lg:s.default.lg},h={sm:`xs`,md:`sm`,lg:`md`},g=`a[href], button:not([disabled]), [tabindex]:not([tabindex='-1'])`;function _({children:a,"aria-label":o,size:d=`md`,separator:_,linkAs:v,maxItems:y,itemsBeforeCollapse:b=1,itemsAfterCollapse:x=1,expanded:S,defaultExpanded:C=!1,onExpandedChange:w,expandLabel:T,className:E,...D}){let O=c.useMessages(),k=T??O.breadcrumbs.expand,A=o??O.breadcrumbs.nav,[j,M]=e.useControllableState({value:S,defaultValue:C,onChange:w}),N=(0,l.useRef)(null),P=(0,l.useRef)(!1),F=n.flattenChildren(a),I=F.length,L=Math.max(0,Math.floor(b)),R=Math.max(1,Math.floor(x)),z=!j&&y!==void 0&&I>y&&L+R<I,B=z?I-L-R:0,V=(0,l.useMemo)(()=>({size:d,linkAs:v,separator:_??(0,u.jsx)(i.ChevronRightIcon,{size:h[d],className:s.default.chevron})}),[d,v,_]);(0,l.useLayoutEffect)(()=>{if(!j||!P.current)return;P.current=!1;let e=N.current?.children[L];if(!e)return;let t=e.querySelector(g);t?t.focus():(e.tabIndex=-1,e.focus())},[j,L]);let H=(e,t)=>(0,u.jsx)(p.Provider,{value:{isLast:t===I-1},children:e},e.key??t),U=[];return F.forEach((e,t)=>{let n=z&&t>=L&&t<I-R;z&&t===L&&U.push((0,u.jsxs)(`li`,{className:s.default.item,children:[(0,u.jsx)(r.IconButton,{variant:`ghost`,tone:`neutral`,size:`sm`,"aria-label":k(B),className:s.default.expand,onClick:()=>{P.current=!0,M(!0),requestAnimationFrame(()=>{P.current=!1})},children:(0,u.jsx)(i.MoreHorizontalIcon,{})}),(0,u.jsx)(`span`,{className:s.default.separator,"aria-hidden":`true`,children:V.separator})]},`breadcrumbs-expand`)),n||U.push(H(e,t))}),(0,u.jsx)(`nav`,{...D,"aria-label":A,className:t.cx(s.default.root,m[d],E),children:(0,u.jsx)(f.Provider,{value:V,children:(0,u.jsx)(`ol`,{ref:N,className:s.default.list,children:U})})})}var v=e=>{let t=e.currentTarget;t.dataset.title===void 0&&(t.scrollWidth>t.clientWidth?t.title=t.textContent??``:t.removeAttribute(`title`))};function y(e){let{href:n,as:r,linkProps:c,icon:m,current:g,title:_,children:y,className:b,"aria-label":x,...S}=e,C=(0,l.useContext)(f),w=(0,l.useContext)(p)?.isLast??!0,T=g??w,E=C?.size??`md`,D=y==null||y===!1||y===``,O=r??C?.linkAs,k=!T&&(n!==void 0||c!==void 0&&O!==void 0);d&&!T&&n===void 0&&c!==void 0&&O===void 0&&console.warn("[Breadcrumbs.Item] `linkProps` without `href` needs a link component (`as` on the item or `linkAs` on Breadcrumbs); rendering plain text.");let A=!k&&x!==void 0,j=(0,u.jsxs)(`span`,{className:s.default.content,children:[m!=null&&(0,u.jsx)(`span`,{className:s.default.icon,"aria-hidden":`true`,children:m}),!D&&(0,u.jsx)(`span`,{className:s.default.text,title:_,"data-title":_===void 0?void 0:``,"aria-hidden":A?!0:void 0,onPointerEnter:v,children:y}),A&&(0,u.jsx)(a.VisuallyHidden,{children:x})]}),M;if(k){let e={...c,...n===void 0?null:{href:n},as:O,variant:`subtle`,tone:`neutral`,size:E,underline:`none`,"aria-label":x,className:t.cx(s.default.link,D&&s.default.iconOnly),children:j};M=(0,u.jsx)(o.Link,{...e})}else M=(0,u.jsx)(`span`,{className:t.cx(T?s.default.current:s.default.plain,D&&s.default.iconOnly),"aria-current":T?`page`:void 0,children:j});return(0,u.jsxs)(`li`,{...S,className:t.cx(s.default.item,b),children:[M,!w&&(0,u.jsx)(`span`,{className:s.default.separator,"aria-hidden":`true`,children:C?.separator??(0,u.jsx)(i.ChevronRightIcon,{size:h[E],className:s.default.chevron})})]})}var b=Object.assign(_,{Item:y});exports.BreadcrumbItem=y,exports.Breadcrumbs=b;
|