@mantine/core 9.5.2 → 9.6.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/cjs/_virtual/_rolldown/runtime.cjs +1 -1
- package/cjs/components/Accordion/Accordion.cjs.map +1 -1
- package/cjs/components/Accordion/AccordionChevron.cjs.map +1 -1
- package/cjs/components/Accordion/AccordionControl/AccordionControl.cjs.map +1 -1
- package/cjs/components/Accordion/AccordionItem/AccordionItem.cjs.map +1 -1
- package/cjs/components/Accordion/AccordionPanel/AccordionPanel.cjs.map +1 -1
- package/cjs/components/ActionBar/ActionBar.cjs +94 -0
- package/cjs/components/ActionBar/ActionBar.cjs.map +1 -0
- package/cjs/components/ActionBar/ActionBar.context.cjs +8 -0
- package/cjs/components/ActionBar/ActionBar.context.cjs.map +1 -0
- package/cjs/components/ActionBar/ActionBar.module.cjs +10 -0
- package/cjs/components/ActionBar/ActionBar.module.cjs.map +1 -0
- package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs +33 -0
- package/cjs/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.cjs.map +1 -0
- package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs +30 -0
- package/cjs/components/ActionBar/ActionBarDivider/ActionBarDivider.cjs.map +1 -0
- package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
- package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs +16 -15
- package/cjs/components/ActionIcon/ActionIconGroup/ActionIconGroup.cjs.map +1 -1
- package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs +15 -14
- package/cjs/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.cjs.map +1 -1
- package/cjs/components/Affix/Affix.cjs.map +1 -1
- package/cjs/components/Alert/Alert.cjs.map +1 -1
- package/cjs/components/Anchor/Anchor.cjs.map +1 -1
- package/cjs/components/AngleSlider/AngleSlider.cjs +5 -4
- package/cjs/components/AngleSlider/AngleSlider.cjs.map +1 -1
- package/cjs/components/AppShell/AppShell.cjs.map +1 -1
- package/cjs/components/AppShell/AppShellAside/AppShellAside.cjs.map +1 -1
- package/cjs/components/AppShell/AppShellFooter/AppShellFooter.cjs.map +1 -1
- package/cjs/components/AppShell/AppShellHeader/AppShellHeader.cjs.map +1 -1
- package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs +2 -1
- package/cjs/components/AppShell/AppShellMain/AppShellMain.cjs.map +1 -1
- package/cjs/components/AppShell/use-resizing/use-resizing.cjs.map +1 -1
- package/cjs/components/AspectRatio/AspectRatio.cjs +14 -13
- package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/cjs/components/Avatar/AvatarGroup/AvatarGroup.cjs.map +1 -1
- package/cjs/components/Avatar/AvatarPlaceholderIcon.cjs.map +1 -1
- package/cjs/components/BackgroundImage/BackgroundImage.cjs +14 -13
- package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
- package/cjs/components/Badge/Badge.cjs.map +1 -1
- package/cjs/components/Blockquote/Blockquote.cjs +6 -5
- package/cjs/components/Blockquote/Blockquote.cjs.map +1 -1
- package/cjs/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
- package/cjs/components/Burger/Burger.cjs.map +1 -1
- package/cjs/components/Button/Button.cjs.map +1 -1
- package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs +16 -15
- package/cjs/components/Button/ButtonGroup/ButtonGroup.cjs.map +1 -1
- package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs +15 -14
- package/cjs/components/Button/ButtonGroupSection/ButtonGroupSection.cjs.map +1 -1
- package/cjs/components/Card/Card.cjs.map +1 -1
- package/cjs/components/Cascader/Cascader.cjs +5 -4
- package/cjs/components/Cascader/Cascader.cjs.map +1 -1
- package/cjs/components/Cascader/CascaderColumns.cjs +2 -1
- package/cjs/components/Cascader/CascaderColumns.cjs.map +1 -1
- package/cjs/components/Cascader/get-cascader-columns.cjs.map +1 -1
- package/cjs/components/Cascader/use-cascader-safe-area.cjs.map +1 -1
- package/cjs/components/Cascader/use-cascader.cjs.map +1 -1
- package/cjs/components/Checkbox/CheckIcon.cjs +6 -5
- package/cjs/components/Checkbox/CheckIcon.cjs.map +1 -1
- package/cjs/components/Checkbox/Checkbox.cjs +1 -1
- package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
- package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs +2 -1
- package/cjs/components/Checkbox/CheckboxCard/CheckboxCard.cjs.map +1 -1
- package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.cjs.map +1 -1
- package/cjs/components/Checkbox/CheckboxIndicator/CheckboxIndicator.cjs.map +1 -1
- package/cjs/components/Chip/Chip.cjs.map +1 -1
- package/cjs/components/Chip/ChipGroup/ChipGroup.cjs.map +1 -1
- package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
- package/cjs/components/CloseButton/CloseIcon.cjs.map +1 -1
- package/cjs/components/Collapse/Collapse.cjs.map +1 -1
- package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
- package/cjs/components/ColorInput/EyeDropperIcon.cjs.map +1 -1
- package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/cjs/components/ColorPicker/ColorPicker.context.cjs.map +1 -1
- package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs +4 -6
- package/cjs/components/ColorPicker/ColorSlider/ColorSlider.cjs.map +1 -1
- package/cjs/components/ColorPicker/Saturation/Saturation.cjs +4 -6
- package/cjs/components/ColorPicker/Saturation/Saturation.cjs.map +1 -1
- package/cjs/components/ColorPicker/Swatches/Swatches.cjs.map +1 -1
- package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
- package/cjs/components/Combobox/Combobox.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxChevron/ComboboxChevron.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs +2 -1
- package/cjs/components/Combobox/ComboboxEmpty/ComboboxEmpty.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs +10 -9
- package/cjs/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs +2 -1
- package/cjs/components/Combobox/ComboboxFooter/ComboboxFooter.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxGroup/ComboboxGroup.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs +2 -1
- package/cjs/components/Combobox/ComboboxHeader/ComboboxHeader.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxOption/ComboboxOption.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxOptions/ComboboxOptions.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxSearch/ComboboxSearch.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs +10 -9
- package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
- package/cjs/components/Combobox/OptionsDropdown/OptionsDropdown.cjs.map +1 -1
- package/cjs/components/Combobox/OptionsDropdown/default-options-filter.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox/get-index/get-index.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox/get-index/get-virtualized-index.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox/use-combobox.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox/use-virtualized-combobox.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
- package/cjs/components/Combobox/use-pills-reorder/use-pills-reorder.cjs.map +1 -1
- package/cjs/components/ComboboxPopover/ComboboxPopover.cjs.map +1 -1
- package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs +13 -12
- package/cjs/components/ComboboxPopover/ComboboxPopoverTarget.cjs.map +1 -1
- package/cjs/components/CopyButton/CopyButton.cjs.map +1 -1
- package/cjs/components/DataList/DataList.cjs.map +1 -1
- package/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/cjs/components/Divider/Divider.cjs.map +1 -1
- package/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerBody.cjs +2 -1
- package/cjs/components/Drawer/DrawerBody.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerCloseButton.cjs +2 -1
- package/cjs/components/Drawer/DrawerCloseButton.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerContent.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerHeader.cjs +2 -1
- package/cjs/components/Drawer/DrawerHeader.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerOverlay.cjs +2 -1
- package/cjs/components/Drawer/DrawerOverlay.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerRoot.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerStack.cjs.map +1 -1
- package/cjs/components/Drawer/DrawerTitle.cjs +2 -1
- package/cjs/components/Drawer/DrawerTitle.cjs.map +1 -1
- package/cjs/components/EmptyState/EmptyState.cjs.map +1 -1
- package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs +2 -1
- package/cjs/components/EmptyState/EmptyStateActions/EmptyStateActions.cjs.map +1 -1
- package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs +2 -1
- package/cjs/components/EmptyState/EmptyStateDescription/EmptyStateDescription.cjs.map +1 -1
- package/cjs/components/Fieldset/Fieldset.cjs.map +1 -1
- package/cjs/components/FileButton/FileButton.cjs.map +1 -1
- package/cjs/components/FileInput/FileInput.cjs.map +1 -1
- package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
- package/cjs/components/FloatingIndicator/use-floating-indicator.cjs.map +1 -1
- package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
- package/cjs/components/FloatingWindow/FloatingWindowResizeHandle.cjs.map +1 -1
- package/cjs/components/FocusTrap/FocusTrap.cjs +2 -1
- package/cjs/components/FocusTrap/FocusTrap.cjs.map +1 -1
- package/cjs/components/Grid/Grid.cjs.map +1 -1
- package/cjs/components/Grid/GridCol/GridCol.cjs.map +1 -1
- package/cjs/components/Group/Group.cjs +16 -14
- package/cjs/components/Group/Group.cjs.map +1 -1
- package/cjs/components/Highlight/Highlight.cjs.map +1 -1
- package/cjs/components/HoverCard/HoverCard.cjs.map +1 -1
- package/cjs/components/HoverCard/HoverCardDropdown/HoverCardDropdown.cjs.map +1 -1
- package/cjs/components/HoverCard/HoverCardGroup/HoverCardGroup.cjs.map +1 -1
- package/cjs/components/HoverCard/HoverCardTarget/HoverCardTarget.cjs.map +1 -1
- package/cjs/components/HoverCard/use-hover-card.cjs.map +1 -1
- package/cjs/components/Image/Image.cjs.map +1 -1
- package/cjs/components/Indicator/Indicator.cjs.map +1 -1
- package/cjs/components/Input/Input.cjs +3 -3
- package/cjs/components/Input/Input.cjs.map +1 -1
- package/cjs/components/Input/Input.context.cjs.map +1 -1
- package/cjs/components/Input/InputClearButton/InputClearButton.cjs.map +1 -1
- package/cjs/components/Input/InputClearSection/InputClearSection.cjs.map +1 -1
- package/cjs/components/Input/InputDescription/InputDescription.cjs +2 -1
- package/cjs/components/Input/InputDescription/InputDescription.cjs.map +1 -1
- package/cjs/components/Input/InputError/InputError.cjs +2 -1
- package/cjs/components/Input/InputError/InputError.cjs.map +1 -1
- package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
- package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs +13 -12
- package/cjs/components/Input/InputPlaceholder/InputPlaceholder.cjs.map +1 -1
- package/cjs/components/Input/InputSuccess/InputSuccess.cjs +2 -1
- package/cjs/components/Input/InputSuccess/InputSuccess.cjs.map +1 -1
- package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
- package/cjs/components/Input/InputWrapper.context.cjs.map +1 -1
- package/cjs/components/InputBase/InputBase.cjs.map +1 -1
- package/cjs/components/JsonInput/JsonInput.cjs.map +1 -1
- package/cjs/components/Kbd/Kbd.cjs +14 -13
- package/cjs/components/Kbd/Kbd.cjs.map +1 -1
- package/cjs/components/List/List.cjs.map +1 -1
- package/cjs/components/List/ListItem/ListItem.cjs.map +1 -1
- package/cjs/components/Loader/loaders/Bars.cjs.map +1 -1
- package/cjs/components/Loader/loaders/Dots.cjs.map +1 -1
- package/cjs/components/Loader/loaders/Oval.cjs.map +1 -1
- package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
- package/cjs/components/Mark/Mark.cjs +14 -13
- package/cjs/components/Mark/Mark.cjs.map +1 -1
- package/cjs/components/Marquee/Marquee.cjs.map +1 -1
- package/cjs/components/MaskInput/MaskInput.cjs +3 -2
- package/cjs/components/MaskInput/MaskInput.cjs.map +1 -1
- package/cjs/components/MaskInput/use-mask-input-props.cjs.map +1 -1
- package/cjs/components/Menu/Menu.cjs.map +1 -1
- package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs +4 -3
- package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.cjs.map +1 -1
- package/cjs/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.context.cjs.map +1 -1
- package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs +2 -1
- package/cjs/components/Menu/MenuCheckboxItem/MenuCheckboxItem.cjs.map +1 -1
- package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs +3 -2
- package/cjs/components/Menu/MenuContextMenu/MenuContextMenu.cjs.map +1 -1
- package/cjs/components/Menu/MenuDivider/MenuDivider.cjs +2 -1
- package/cjs/components/Menu/MenuDivider/MenuDivider.cjs.map +1 -1
- package/cjs/components/Menu/MenuDropdown/MenuDropdown.cjs.map +1 -1
- package/cjs/components/Menu/MenuItem/MenuItem.cjs.map +1 -1
- package/cjs/components/Menu/MenuLabel/MenuLabel.cjs +2 -1
- package/cjs/components/Menu/MenuLabel/MenuLabel.cjs.map +1 -1
- package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.cjs.map +1 -1
- package/cjs/components/Menu/MenuRadioGroup/MenuRadioGroup.context.cjs.map +1 -1
- package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs +2 -1
- package/cjs/components/Menu/MenuRadioItem/MenuRadioItem.cjs.map +1 -1
- package/cjs/components/Menu/MenuSearch/MenuSearch.cjs.map +1 -1
- package/cjs/components/Menu/MenuSelectableItem/MenuSelectableItem.cjs.map +1 -1
- package/cjs/components/Menu/MenuSub/MenuSub.cjs.map +1 -1
- package/cjs/components/Menu/MenuSub/MenuSub.context.cjs.map +1 -1
- package/cjs/components/Menu/MenuSubDropdown/MenuSubDropdown.cjs.map +1 -1
- package/cjs/components/Menu/MenuSubItem/MenuSubItem.cjs.map +1 -1
- package/cjs/components/Menu/MenuTarget/MenuTarget.cjs.map +1 -1
- package/cjs/components/Menu/use-menu-type-ahead.cjs.map +1 -1
- package/cjs/components/Menubar/Menubar.cjs.map +1 -1
- package/cjs/components/Menubar/MenubarMenu/MenubarMenu.cjs.map +1 -1
- package/cjs/components/Menubar/MenubarTarget/MenubarTarget.cjs.map +1 -1
- package/cjs/components/Modal/Modal.cjs.map +1 -1
- package/cjs/components/Modal/ModalBody.cjs +2 -1
- package/cjs/components/Modal/ModalBody.cjs.map +1 -1
- package/cjs/components/Modal/ModalCloseButton.cjs +2 -1
- package/cjs/components/Modal/ModalCloseButton.cjs.map +1 -1
- package/cjs/components/Modal/ModalContent.cjs.map +1 -1
- package/cjs/components/Modal/ModalHeader.cjs +2 -1
- package/cjs/components/Modal/ModalHeader.cjs.map +1 -1
- package/cjs/components/Modal/ModalOverlay.cjs +2 -1
- package/cjs/components/Modal/ModalOverlay.cjs.map +1 -1
- package/cjs/components/Modal/ModalRoot.cjs.map +1 -1
- package/cjs/components/Modal/ModalStack.cjs.map +1 -1
- package/cjs/components/Modal/ModalTitle.cjs +2 -1
- package/cjs/components/Modal/ModalTitle.cjs.map +1 -1
- package/cjs/components/Modal/use-modals-stack.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBase.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseBody.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseCloseButton.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseContent.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseHeader.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseOverlay.cjs.map +1 -1
- package/cjs/components/ModalBase/ModalBaseTitle.cjs.map +1 -1
- package/cjs/components/ModalBase/use-lock-scroll.cjs.map +1 -1
- package/cjs/components/ModalBase/use-modal.cjs +2 -1
- package/cjs/components/ModalBase/use-modal.cjs.map +1 -1
- package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
- package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
- package/cjs/components/NativeSelect/NativeSelectOption.cjs.map +1 -1
- package/cjs/components/NavLink/NavLink.cjs.map +1 -1
- package/cjs/components/Notification/Notification.cjs +3 -3
- package/cjs/components/Notification/Notification.cjs.map +1 -1
- package/cjs/components/NumberInput/NumberInput.cjs +5 -3
- package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
- package/cjs/components/NumberInput/NumberInputChevron.cjs.map +1 -1
- package/cjs/components/OverflowList/OverflowList.cjs +4 -2
- package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
- package/cjs/components/OverflowList/use-dimensions.cjs.map +1 -1
- package/cjs/components/Overlay/Overlay.cjs +14 -13
- package/cjs/components/Overlay/Overlay.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.cjs +2 -1
- package/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.icons.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs +2 -1
- package/cjs/components/Pagination/PaginationDots/PaginationDots.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationEdges/PaginationEdges.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs +3 -2
- package/cjs/components/Pagination/PaginationItems/PaginationItems.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationLabel/PaginationLabel.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs.map +1 -1
- package/cjs/components/Paper/Paper.cjs +1 -1
- package/cjs/components/Paper/Paper.cjs.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
- package/cjs/components/PasswordInput/PasswordToggleIcon.cjs.map +1 -1
- package/cjs/components/Pill/Pill.cjs.map +1 -1
- package/cjs/components/Pill/PillGroup/PillGroup.cjs.map +1 -1
- package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
- package/cjs/components/PillsInput/PillsInput.context.cjs.map +1 -1
- package/cjs/components/PillsInput/PillsInputField/PillsInputField.cjs.map +1 -1
- package/cjs/components/PinInput/PinInput.cjs +6 -5
- package/cjs/components/PinInput/PinInput.cjs.map +1 -1
- package/cjs/components/Popover/Popover.cjs.map +1 -1
- package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs +3 -2
- package/cjs/components/Popover/PopoverContextMenu/PopoverContextMenu.cjs.map +1 -1
- package/cjs/components/Popover/PopoverDropdown/PopoverDropdown.cjs.map +1 -1
- package/cjs/components/Popover/PopoverTarget/PopoverTarget.cjs.map +1 -1
- package/cjs/components/Popover/use-popover.cjs +16 -12
- package/cjs/components/Popover/use-popover.cjs.map +1 -1
- package/cjs/components/Portal/Portal.cjs.map +1 -1
- package/cjs/components/Progress/Progress.cjs.map +1 -1
- package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs +2 -1
- package/cjs/components/Progress/ProgressLabel/ProgressLabel.cjs.map +1 -1
- package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs.map +1 -1
- package/cjs/components/Radio/Radio.cjs.map +1 -1
- package/cjs/components/Radio/RadioCard/RadioCard.cjs.map +1 -1
- package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
- package/cjs/components/Radio/RadioIcon.cjs.map +1 -1
- package/cjs/components/Radio/RadioIndicator/RadioIndicator.cjs.map +1 -1
- package/cjs/components/Rating/Rating.cjs +6 -3
- package/cjs/components/Rating/Rating.cjs.map +1 -1
- package/cjs/components/Rating/RatingItem/RatingItem.cjs.map +1 -1
- package/cjs/components/Rating/StarSymbol/StarIcon.cjs.map +1 -1
- package/cjs/components/Rating/StarSymbol/StarSymbol.cjs +2 -1
- package/cjs/components/Rating/StarSymbol/StarSymbol.cjs.map +1 -1
- package/cjs/components/RingProgress/Curve/Curve.cjs.map +1 -1
- package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
- package/cjs/components/RollingNumber/DigitColumn.cjs.map +1 -1
- package/cjs/components/RollingNumber/RollingNumber.cjs +12 -10
- package/cjs/components/RollingNumber/RollingNumber.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollArea.cjs +8 -6
- package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.cjs.map +1 -1
- package/cjs/components/ScrollArea/use-resize-observer.cjs.map +1 -1
- package/cjs/components/Scroller/Scroller.cjs.map +1 -1
- package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/cjs/components/Select/Select.cjs.map +1 -1
- package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
- package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
- package/cjs/components/SimpleGrid/SimpleGridVariables.cjs +10 -8
- package/cjs/components/SimpleGrid/SimpleGridVariables.cjs.map +1 -1
- package/cjs/components/Skeleton/Skeleton.cjs +14 -13
- package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
- package/cjs/components/Slider/Marks/Marks.cjs +3 -2
- package/cjs/components/Slider/Marks/Marks.cjs.map +1 -1
- package/cjs/components/Slider/RangeSlider/RangeSlider.cjs +20 -11
- package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
- package/cjs/components/Slider/Slider/Slider.cjs +6 -6
- package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
- package/cjs/components/Slider/Thumb/Thumb.cjs.map +1 -1
- package/cjs/components/Slider/Track/Track.cjs.map +1 -1
- package/cjs/components/Splitter/GripIcon.cjs.map +1 -1
- package/cjs/components/Splitter/Splitter.cjs +8 -7
- package/cjs/components/Splitter/Splitter.cjs.map +1 -1
- package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
- package/cjs/components/Stack/Stack.cjs +14 -13
- package/cjs/components/Stack/Stack.cjs.map +1 -1
- package/cjs/components/Stepper/Stepper.cjs +6 -3
- package/cjs/components/Stepper/Stepper.cjs.map +1 -1
- package/cjs/components/Stepper/Stepper.context.cjs.map +1 -1
- package/cjs/components/Stepper/Stepper.module.cjs.map +1 -1
- package/cjs/components/Stepper/StepperStep/StepperStep.cjs +3 -2
- package/cjs/components/Stepper/StepperStep/StepperStep.cjs.map +1 -1
- package/cjs/components/Switch/Switch.cjs.map +1 -1
- package/cjs/components/Switch/SwitchGroup/SwitchGroup.cjs.map +1 -1
- package/cjs/components/Table/Table.cjs +2 -2
- package/cjs/components/Table/Table.cjs.map +1 -1
- package/cjs/components/Table/TableScrollContainer.cjs.map +1 -1
- package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
- package/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/cjs/components/Tabs/TabsPanel/TabsPanel.cjs.map +1 -1
- package/cjs/components/Tabs/TabsTab/TabsTab.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/components/Text/Text.cjs +18 -17
- package/cjs/components/Text/Text.cjs.map +1 -1
- package/cjs/components/TextInput/TextInput.cjs +6 -5
- package/cjs/components/TextInput/TextInput.cjs.map +1 -1
- package/cjs/components/Textarea/Autosize.cjs.map +1 -1
- package/cjs/components/ThemeIcon/ThemeIcon.cjs +14 -13
- package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
- package/cjs/components/Timeline/Timeline.cjs.map +1 -1
- package/cjs/components/Timeline/TimelineItem/TimelineItem.cjs.map +1 -1
- package/cjs/components/Title/Title.cjs +1 -1
- package/cjs/components/Title/Title.cjs.map +1 -1
- package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/cjs/components/Tooltip/TooltipFloating/TooltipFloating.cjs.map +1 -1
- package/cjs/components/Tooltip/TooltipFloating/use-floating-tooltip.cjs.map +1 -1
- package/cjs/components/Tooltip/TooltipGroup/TooltipGroup.cjs.map +1 -1
- package/cjs/components/Tooltip/use-tooltip.cjs.map +1 -1
- package/cjs/components/Transition/Transition.cjs.map +1 -1
- package/cjs/components/Transition/use-transition.cjs.map +1 -1
- package/cjs/components/Tree/FlatTreeNode.cjs.map +1 -1
- package/cjs/components/Tree/Tree.cjs +2 -1
- package/cjs/components/Tree/Tree.cjs.map +1 -1
- package/cjs/components/Tree/TreeNode.cjs.map +1 -1
- package/cjs/components/Tree/use-tree-node-drag-drop.cjs.map +1 -1
- package/cjs/components/Tree/use-tree.cjs.map +1 -1
- package/cjs/components/TreeSelect/TreeSelect.cjs +11 -9
- package/cjs/components/TreeSelect/TreeSelect.cjs.map +1 -1
- package/cjs/components/TreeSelect/TreeSelectOption.cjs.map +1 -1
- package/cjs/components/Typography/Typography.cjs +12 -11
- package/cjs/components/Typography/Typography.cjs.map +1 -1
- package/cjs/components/Typography/Typography.module.cjs.map +1 -1
- package/cjs/components/UnstyledButton/UnstyledButton.cjs +12 -11
- package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
- package/cjs/components/VisuallyHidden/VisuallyHidden.cjs +12 -11
- package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
- package/cjs/core/Box/Box.cjs.map +1 -1
- package/cjs/core/Box/use-random-classname/use-random-classname.cjs.map +1 -1
- package/cjs/core/DirectionProvider/DirectionProvider.cjs +3 -2
- package/cjs/core/DirectionProvider/DirectionProvider.cjs.map +1 -1
- package/cjs/core/InlineStyles/InlineStyles.cjs.map +1 -1
- package/cjs/core/MantineProvider/Mantine.context.cjs.map +1 -1
- package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs +4 -2
- package/cjs/core/MantineProvider/MantineCssVariables/MantineCssVariables.cjs.map +1 -1
- package/cjs/core/MantineProvider/MantineProvider.cjs +3 -3
- package/cjs/core/MantineProvider/MantineProvider.cjs.map +1 -1
- package/cjs/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs.map +1 -1
- package/cjs/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs.map +1 -1
- package/cjs/core/MantineProvider/use-mantine-color-scheme/use-computed-color-scheme.cjs.map +1 -1
- package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs +2 -1
- package/cjs/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.cjs.map +1 -1
- package/cjs/core/MantineProvider/use-mantine-color-scheme/use-provider-color-scheme.cjs.map +1 -1
- package/cjs/core/MantineProvider/use-matches/use-matches.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/get-class-name/get-class-name.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/get-class-name/get-global-class-names/get-global-class-names.cjs.map +1 -1
- package/cjs/core/styles-api/use-styles/get-class-name/resolve-class-names/resolve-class-names.cjs.map +1 -1
- package/cjs/core/utils/create-safe-context/create-safe-context.cjs.map +1 -1
- package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs +0 -1
- package/cjs/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.cjs.map +1 -1
- package/cjs/core/utils/deep-merge/deep-merge.cjs +4 -3
- package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -1
- package/cjs/core/utils/use-hovered/use-hovered.cjs.map +1 -1
- package/cjs/index.cjs +6 -0
- package/cjs/utils/Floating/use-context-menu-handlers.cjs.map +1 -1
- package/cjs/utils/Floating/use-delayed-hover.cjs.map +1 -1
- package/cjs/utils/InlineInput/InlineInput.cjs.map +1 -1
- package/cjs/utils/InputsGroupFieldset/InputsGroupFieldset.cjs.map +1 -1
- package/esm/components/Accordion/Accordion.mjs.map +1 -1
- package/esm/components/Accordion/AccordionChevron.mjs.map +1 -1
- package/esm/components/Accordion/AccordionControl/AccordionControl.mjs.map +1 -1
- package/esm/components/Accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/esm/components/Accordion/AccordionPanel/AccordionPanel.mjs.map +1 -1
- package/esm/components/ActionBar/ActionBar.context.mjs +8 -0
- package/esm/components/ActionBar/ActionBar.context.mjs.map +1 -0
- package/esm/components/ActionBar/ActionBar.mjs +94 -0
- package/esm/components/ActionBar/ActionBar.mjs.map +1 -0
- package/esm/components/ActionBar/ActionBar.module.mjs +10 -0
- package/esm/components/ActionBar/ActionBar.module.mjs.map +1 -0
- package/esm/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.mjs +33 -0
- package/esm/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.mjs.map +1 -0
- package/esm/components/ActionBar/ActionBarDivider/ActionBarDivider.mjs +30 -0
- package/esm/components/ActionBar/ActionBarDivider/ActionBarDivider.mjs.map +1 -0
- package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
- package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs +16 -15
- package/esm/components/ActionIcon/ActionIconGroup/ActionIconGroup.mjs.map +1 -1
- package/esm/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.mjs +15 -14
- package/esm/components/ActionIcon/ActionIconGroupSection/ActionIconGroupSection.mjs.map +1 -1
- package/esm/components/Affix/Affix.mjs.map +1 -1
- package/esm/components/Alert/Alert.mjs.map +1 -1
- package/esm/components/AngleSlider/AngleSlider.mjs +5 -4
- package/esm/components/AngleSlider/AngleSlider.mjs.map +1 -1
- package/esm/components/AppShell/AppShell.mjs.map +1 -1
- package/esm/components/AppShell/AppShellMain/AppShellMain.mjs +2 -1
- package/esm/components/AppShell/AppShellMain/AppShellMain.mjs.map +1 -1
- package/esm/components/AspectRatio/AspectRatio.mjs +14 -13
- package/esm/components/AspectRatio/AspectRatio.mjs.map +1 -1
- package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/esm/components/Avatar/Avatar.mjs.map +1 -1
- package/esm/components/Avatar/AvatarGroup/AvatarGroup.mjs.map +1 -1
- package/esm/components/Avatar/AvatarPlaceholderIcon.mjs.map +1 -1
- package/esm/components/BackgroundImage/BackgroundImage.mjs +14 -13
- package/esm/components/BackgroundImage/BackgroundImage.mjs.map +1 -1
- package/esm/components/Badge/Badge.mjs.map +1 -1
- package/esm/components/Blockquote/Blockquote.mjs +6 -5
- package/esm/components/Blockquote/Blockquote.mjs.map +1 -1
- package/esm/components/Breadcrumbs/Breadcrumbs.mjs.map +1 -1
- package/esm/components/Burger/Burger.mjs.map +1 -1
- package/esm/components/Button/Button.mjs.map +1 -1
- package/esm/components/Button/ButtonGroup/ButtonGroup.mjs +16 -15
- package/esm/components/Button/ButtonGroup/ButtonGroup.mjs.map +1 -1
- package/esm/components/Button/ButtonGroupSection/ButtonGroupSection.mjs +15 -14
- package/esm/components/Button/ButtonGroupSection/ButtonGroupSection.mjs.map +1 -1
- package/esm/components/Card/Card.mjs.map +1 -1
- package/esm/components/Cascader/Cascader.mjs +5 -4
- package/esm/components/Cascader/Cascader.mjs.map +1 -1
- package/esm/components/Cascader/CascaderColumns.mjs +2 -1
- package/esm/components/Cascader/CascaderColumns.mjs.map +1 -1
- package/esm/components/Cascader/get-cascader-columns.mjs.map +1 -1
- package/esm/components/Checkbox/CheckIcon.mjs +6 -5
- package/esm/components/Checkbox/CheckIcon.mjs.map +1 -1
- package/esm/components/Checkbox/Checkbox.mjs +1 -1
- package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
- package/esm/components/Checkbox/CheckboxCard/CheckboxCard.mjs +2 -1
- package/esm/components/Checkbox/CheckboxCard/CheckboxCard.mjs.map +1 -1
- package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/esm/components/Checkbox/CheckboxIndicator/CheckboxIndicator.mjs.map +1 -1
- package/esm/components/Chip/Chip.mjs.map +1 -1
- package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
- package/esm/components/CloseButton/CloseIcon.mjs.map +1 -1
- package/esm/components/Collapse/Collapse.mjs.map +1 -1
- package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
- package/esm/components/ColorInput/EyeDropperIcon.mjs.map +1 -1
- package/esm/components/ColorPicker/ColorPicker.mjs.map +1 -1
- package/esm/components/ColorPicker/ColorSlider/ColorSlider.mjs +4 -6
- package/esm/components/ColorPicker/ColorSlider/ColorSlider.mjs.map +1 -1
- package/esm/components/ColorPicker/Saturation/Saturation.mjs +4 -6
- package/esm/components/ColorPicker/Saturation/Saturation.mjs.map +1 -1
- package/esm/components/ColorPicker/Swatches/Swatches.mjs.map +1 -1
- package/esm/components/ColorSwatch/ColorSwatch.mjs.map +1 -1
- package/esm/components/Combobox/Combobox.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxChevron/ComboboxChevron.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxEmpty/ComboboxEmpty.mjs +2 -1
- package/esm/components/Combobox/ComboboxEmpty/ComboboxEmpty.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.mjs +10 -9
- package/esm/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxFooter/ComboboxFooter.mjs +2 -1
- package/esm/components/Combobox/ComboboxFooter/ComboboxFooter.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxGroup/ComboboxGroup.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxHeader/ComboboxHeader.mjs +2 -1
- package/esm/components/Combobox/ComboboxHeader/ComboboxHeader.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs +10 -9
- package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs.map +1 -1
- package/esm/components/Combobox/OptionsDropdown/OptionsDropdown.mjs.map +1 -1
- package/esm/components/Combobox/OptionsDropdown/default-options-filter.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox/get-index/get-index.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox/get-index/get-virtualized-index.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
- package/esm/components/ComboboxPopover/ComboboxPopover.mjs.map +1 -1
- package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs +13 -12
- package/esm/components/ComboboxPopover/ComboboxPopoverTarget.mjs.map +1 -1
- package/esm/components/DataList/DataList.mjs.map +1 -1
- package/esm/components/Dialog/Dialog.mjs.map +1 -1
- package/esm/components/Divider/Divider.mjs.map +1 -1
- package/esm/components/Drawer/Drawer.mjs.map +1 -1
- package/esm/components/Drawer/DrawerBody.mjs +2 -1
- package/esm/components/Drawer/DrawerBody.mjs.map +1 -1
- package/esm/components/Drawer/DrawerCloseButton.mjs +2 -1
- package/esm/components/Drawer/DrawerCloseButton.mjs.map +1 -1
- package/esm/components/Drawer/DrawerContent.mjs.map +1 -1
- package/esm/components/Drawer/DrawerHeader.mjs +2 -1
- package/esm/components/Drawer/DrawerHeader.mjs.map +1 -1
- package/esm/components/Drawer/DrawerOverlay.mjs +2 -1
- package/esm/components/Drawer/DrawerOverlay.mjs.map +1 -1
- package/esm/components/Drawer/DrawerRoot.mjs.map +1 -1
- package/esm/components/Drawer/DrawerTitle.mjs +2 -1
- package/esm/components/Drawer/DrawerTitle.mjs.map +1 -1
- package/esm/components/EmptyState/EmptyState.mjs.map +1 -1
- package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs +2 -1
- package/esm/components/EmptyState/EmptyStateActions/EmptyStateActions.mjs.map +1 -1
- package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs +2 -1
- package/esm/components/EmptyState/EmptyStateDescription/EmptyStateDescription.mjs.map +1 -1
- package/esm/components/Fieldset/Fieldset.mjs.map +1 -1
- package/esm/components/FileInput/FileInput.mjs.map +1 -1
- package/esm/components/FloatingWindow/FloatingWindow.mjs.map +1 -1
- package/esm/components/FocusTrap/FocusTrap.mjs +2 -1
- package/esm/components/FocusTrap/FocusTrap.mjs.map +1 -1
- package/esm/components/Grid/Grid.mjs.map +1 -1
- package/esm/components/Group/Group.mjs +16 -14
- package/esm/components/Group/Group.mjs.map +1 -1
- package/esm/components/Highlight/Highlight.mjs.map +1 -1
- package/esm/components/HoverCard/HoverCard.mjs.map +1 -1
- package/esm/components/HoverCard/HoverCardGroup/HoverCardGroup.mjs.map +1 -1
- package/esm/components/HoverCard/HoverCardTarget/HoverCardTarget.mjs.map +1 -1
- package/esm/components/Indicator/Indicator.mjs.map +1 -1
- package/esm/components/Input/Input.mjs +3 -3
- package/esm/components/Input/Input.mjs.map +1 -1
- package/esm/components/Input/InputClearSection/InputClearSection.mjs.map +1 -1
- package/esm/components/Input/InputDescription/InputDescription.mjs +2 -1
- package/esm/components/Input/InputDescription/InputDescription.mjs.map +1 -1
- package/esm/components/Input/InputError/InputError.mjs +2 -1
- package/esm/components/Input/InputError/InputError.mjs.map +1 -1
- package/esm/components/Input/InputLabel/InputLabel.mjs.map +1 -1
- package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs +13 -12
- package/esm/components/Input/InputPlaceholder/InputPlaceholder.mjs.map +1 -1
- package/esm/components/Input/InputSuccess/InputSuccess.mjs +2 -1
- package/esm/components/Input/InputSuccess/InputSuccess.mjs.map +1 -1
- package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
- package/esm/components/InputBase/InputBase.mjs.map +1 -1
- package/esm/components/Kbd/Kbd.mjs +14 -13
- package/esm/components/Kbd/Kbd.mjs.map +1 -1
- package/esm/components/List/List.mjs.map +1 -1
- package/esm/components/List/ListItem/ListItem.mjs.map +1 -1
- package/esm/components/Loader/loaders/Bars.mjs.map +1 -1
- package/esm/components/Loader/loaders/Dots.mjs.map +1 -1
- package/esm/components/LoadingOverlay/LoadingOverlay.mjs.map +1 -1
- package/esm/components/Mark/Mark.mjs +14 -13
- package/esm/components/Mark/Mark.mjs.map +1 -1
- package/esm/components/Marquee/Marquee.mjs.map +1 -1
- package/esm/components/MaskInput/MaskInput.mjs +3 -2
- package/esm/components/MaskInput/MaskInput.mjs.map +1 -1
- package/esm/components/Menu/Menu.mjs.map +1 -1
- package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs +4 -3
- package/esm/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.mjs.map +1 -1
- package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs +2 -1
- package/esm/components/Menu/MenuCheckboxItem/MenuCheckboxItem.mjs.map +1 -1
- package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs +3 -2
- package/esm/components/Menu/MenuContextMenu/MenuContextMenu.mjs.map +1 -1
- package/esm/components/Menu/MenuDivider/MenuDivider.mjs +2 -1
- package/esm/components/Menu/MenuDivider/MenuDivider.mjs.map +1 -1
- package/esm/components/Menu/MenuDropdown/MenuDropdown.mjs.map +1 -1
- package/esm/components/Menu/MenuItem/MenuItem.mjs.map +1 -1
- package/esm/components/Menu/MenuLabel/MenuLabel.mjs +2 -1
- package/esm/components/Menu/MenuLabel/MenuLabel.mjs.map +1 -1
- package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs +2 -1
- package/esm/components/Menu/MenuRadioItem/MenuRadioItem.mjs.map +1 -1
- package/esm/components/Menu/MenuSelectableItem/MenuSelectableItem.mjs.map +1 -1
- package/esm/components/Menu/MenuSub/MenuSub.mjs.map +1 -1
- package/esm/components/Menu/MenuSubItem/MenuSubItem.mjs.map +1 -1
- package/esm/components/Menu/MenuTarget/MenuTarget.mjs.map +1 -1
- package/esm/components/Menubar/Menubar.mjs.map +1 -1
- package/esm/components/Menubar/MenubarMenu/MenubarMenu.mjs.map +1 -1
- package/esm/components/Menubar/MenubarTarget/MenubarTarget.mjs.map +1 -1
- package/esm/components/Modal/Modal.mjs.map +1 -1
- package/esm/components/Modal/ModalBody.mjs +2 -1
- package/esm/components/Modal/ModalBody.mjs.map +1 -1
- package/esm/components/Modal/ModalCloseButton.mjs +2 -1
- package/esm/components/Modal/ModalCloseButton.mjs.map +1 -1
- package/esm/components/Modal/ModalContent.mjs.map +1 -1
- package/esm/components/Modal/ModalHeader.mjs +2 -1
- package/esm/components/Modal/ModalHeader.mjs.map +1 -1
- package/esm/components/Modal/ModalOverlay.mjs +2 -1
- package/esm/components/Modal/ModalOverlay.mjs.map +1 -1
- package/esm/components/Modal/ModalRoot.mjs.map +1 -1
- package/esm/components/Modal/ModalTitle.mjs +2 -1
- package/esm/components/Modal/ModalTitle.mjs.map +1 -1
- package/esm/components/ModalBase/ModalBase.mjs.map +1 -1
- package/esm/components/ModalBase/ModalBaseContent.mjs.map +1 -1
- package/esm/components/ModalBase/ModalBaseOverlay.mjs.map +1 -1
- package/esm/components/ModalBase/use-modal.mjs +2 -1
- package/esm/components/ModalBase/use-modal.mjs.map +1 -1
- package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
- package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
- package/esm/components/NativeSelect/NativeSelectOption.mjs.map +1 -1
- package/esm/components/NavLink/NavLink.mjs.map +1 -1
- package/esm/components/Notification/Notification.mjs +3 -3
- package/esm/components/Notification/Notification.mjs.map +1 -1
- package/esm/components/NumberInput/NumberInput.mjs +5 -3
- package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
- package/esm/components/NumberInput/NumberInputChevron.mjs.map +1 -1
- package/esm/components/OverflowList/OverflowList.mjs +4 -2
- package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
- package/esm/components/Overlay/Overlay.mjs +14 -13
- package/esm/components/Overlay/Overlay.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.icons.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.mjs +2 -1
- package/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/esm/components/Pagination/PaginationDots/PaginationDots.mjs +2 -1
- package/esm/components/Pagination/PaginationDots/PaginationDots.mjs.map +1 -1
- package/esm/components/Pagination/PaginationEdges/PaginationEdges.mjs.map +1 -1
- package/esm/components/Pagination/PaginationItems/PaginationItems.mjs +3 -2
- package/esm/components/Pagination/PaginationItems/PaginationItems.mjs.map +1 -1
- package/esm/components/Pagination/PaginationLabel/PaginationLabel.mjs.map +1 -1
- package/esm/components/Pagination/PaginationRoot/PaginationRoot.mjs.map +1 -1
- package/esm/components/Paper/Paper.mjs +1 -1
- package/esm/components/Paper/Paper.mjs.map +1 -1
- package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
- package/esm/components/PasswordInput/PasswordToggleIcon.mjs.map +1 -1
- package/esm/components/Pill/Pill.mjs.map +1 -1
- package/esm/components/Pill/PillGroup/PillGroup.mjs.map +1 -1
- package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
- package/esm/components/PinInput/PinInput.mjs +6 -5
- package/esm/components/PinInput/PinInput.mjs.map +1 -1
- package/esm/components/Popover/Popover.mjs.map +1 -1
- package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs +3 -2
- package/esm/components/Popover/PopoverContextMenu/PopoverContextMenu.mjs.map +1 -1
- package/esm/components/Popover/PopoverDropdown/PopoverDropdown.mjs.map +1 -1
- package/esm/components/Popover/use-popover.mjs +16 -12
- package/esm/components/Popover/use-popover.mjs.map +1 -1
- package/esm/components/Progress/Progress.mjs.map +1 -1
- package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs +2 -1
- package/esm/components/Progress/ProgressLabel/ProgressLabel.mjs.map +1 -1
- package/esm/components/Progress/ProgressRoot/ProgressRoot.mjs.map +1 -1
- package/esm/components/Radio/Radio.mjs.map +1 -1
- package/esm/components/Radio/RadioCard/RadioCard.mjs.map +1 -1
- package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
- package/esm/components/Radio/RadioIcon.mjs.map +1 -1
- package/esm/components/Radio/RadioIndicator/RadioIndicator.mjs.map +1 -1
- package/esm/components/Rating/Rating.mjs +6 -3
- package/esm/components/Rating/Rating.mjs.map +1 -1
- package/esm/components/Rating/RatingItem/RatingItem.mjs.map +1 -1
- package/esm/components/Rating/StarSymbol/StarIcon.mjs.map +1 -1
- package/esm/components/Rating/StarSymbol/StarSymbol.mjs +2 -1
- package/esm/components/Rating/StarSymbol/StarSymbol.mjs.map +1 -1
- package/esm/components/RingProgress/Curve/Curve.mjs.map +1 -1
- package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
- package/esm/components/RollingNumber/DigitColumn.mjs.map +1 -1
- package/esm/components/RollingNumber/RollingNumber.mjs +12 -10
- package/esm/components/RollingNumber/RollingNumber.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollArea.mjs +8 -6
- package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.mjs.map +1 -1
- package/esm/components/Scroller/Scroller.mjs.map +1 -1
- package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/esm/components/Select/Select.mjs.map +1 -1
- package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
- package/esm/components/SimpleGrid/SimpleGrid.mjs.map +1 -1
- package/esm/components/SimpleGrid/SimpleGridVariables.mjs +10 -8
- package/esm/components/SimpleGrid/SimpleGridVariables.mjs.map +1 -1
- package/esm/components/Skeleton/Skeleton.mjs +14 -13
- package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
- package/esm/components/Slider/Marks/Marks.mjs +3 -2
- package/esm/components/Slider/Marks/Marks.mjs.map +1 -1
- package/esm/components/Slider/RangeSlider/RangeSlider.mjs +20 -11
- package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
- package/esm/components/Slider/Slider/Slider.mjs +6 -6
- package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
- package/esm/components/Slider/Thumb/Thumb.mjs.map +1 -1
- package/esm/components/Slider/Track/Track.mjs.map +1 -1
- package/esm/components/Splitter/GripIcon.mjs.map +1 -1
- package/esm/components/Splitter/Splitter.mjs +8 -7
- package/esm/components/Splitter/Splitter.mjs.map +1 -1
- package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
- package/esm/components/Stack/Stack.mjs +14 -13
- package/esm/components/Stack/Stack.mjs.map +1 -1
- package/esm/components/Stepper/Stepper.context.mjs.map +1 -1
- package/esm/components/Stepper/Stepper.mjs +6 -3
- package/esm/components/Stepper/Stepper.mjs.map +1 -1
- package/esm/components/Stepper/Stepper.module.mjs.map +1 -1
- package/esm/components/Stepper/StepperStep/StepperStep.mjs +3 -2
- package/esm/components/Stepper/StepperStep/StepperStep.mjs.map +1 -1
- package/esm/components/Switch/Switch.mjs.map +1 -1
- package/esm/components/Switch/SwitchGroup/SwitchGroup.mjs.map +1 -1
- package/esm/components/Table/Table.mjs +2 -2
- package/esm/components/Table/Table.mjs.map +1 -1
- package/esm/components/Table/TableScrollContainer.mjs.map +1 -1
- package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
- package/esm/components/Tabs/Tabs.mjs.map +1 -1
- package/esm/components/Tabs/TabsPanel/TabsPanel.mjs.map +1 -1
- package/esm/components/Tabs/TabsTab/TabsTab.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/components/Text/Text.mjs +18 -17
- package/esm/components/Text/Text.mjs.map +1 -1
- package/esm/components/TextInput/TextInput.mjs +6 -5
- package/esm/components/TextInput/TextInput.mjs.map +1 -1
- package/esm/components/ThemeIcon/ThemeIcon.mjs +14 -13
- package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
- package/esm/components/Timeline/Timeline.mjs.map +1 -1
- package/esm/components/Timeline/TimelineItem/TimelineItem.mjs.map +1 -1
- package/esm/components/Title/Title.mjs +1 -1
- package/esm/components/Title/Title.mjs.map +1 -1
- package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
- package/esm/components/Tooltip/TooltipFloating/TooltipFloating.mjs.map +1 -1
- package/esm/components/Tooltip/TooltipGroup/TooltipGroup.mjs.map +1 -1
- package/esm/components/Transition/Transition.mjs.map +1 -1
- package/esm/components/Tree/FlatTreeNode.mjs.map +1 -1
- package/esm/components/Tree/Tree.mjs +2 -1
- package/esm/components/Tree/Tree.mjs.map +1 -1
- package/esm/components/Tree/TreeNode.mjs.map +1 -1
- package/esm/components/Tree/use-tree.mjs.map +1 -1
- package/esm/components/TreeSelect/TreeSelect.mjs +11 -9
- package/esm/components/TreeSelect/TreeSelect.mjs.map +1 -1
- package/esm/components/TreeSelect/TreeSelectOption.mjs.map +1 -1
- package/esm/components/Typography/Typography.mjs +12 -11
- package/esm/components/Typography/Typography.mjs.map +1 -1
- package/esm/components/Typography/Typography.module.mjs.map +1 -1
- package/esm/components/UnstyledButton/UnstyledButton.mjs +12 -11
- package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
- package/esm/components/VisuallyHidden/VisuallyHidden.mjs +12 -11
- package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
- package/esm/core/DirectionProvider/DirectionProvider.mjs +3 -2
- package/esm/core/DirectionProvider/DirectionProvider.mjs.map +1 -1
- package/esm/core/InlineStyles/InlineStyles.mjs.map +1 -1
- package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs +4 -2
- package/esm/core/MantineProvider/MantineCssVariables/MantineCssVariables.mjs.map +1 -1
- package/esm/core/MantineProvider/MantineProvider.mjs +3 -3
- package/esm/core/MantineProvider/MantineProvider.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs.map +1 -1
- package/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.mjs.map +1 -1
- package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs +2 -1
- package/esm/core/MantineProvider/use-mantine-color-scheme/use-mantine-color-scheme.mjs.map +1 -1
- package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs +0 -1
- package/esm/core/utils/create-scoped-keydown-handler/create-scoped-keydown-handler.mjs.map +1 -1
- package/esm/core/utils/deep-merge/deep-merge.mjs +4 -3
- package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -1
- package/esm/index.mjs +4 -1
- package/esm/utils/InlineInput/InlineInput.mjs.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/AccordionChevron.d.ts +1 -1
- package/lib/components/ActionBar/ActionBar.context.d.ts +8 -0
- package/lib/components/ActionBar/ActionBar.d.ts +44 -0
- package/lib/components/ActionBar/ActionBarCloseButton/ActionBarCloseButton.d.ts +22 -0
- package/lib/components/ActionBar/ActionBarDivider/ActionBarDivider.d.ts +16 -0
- package/lib/components/ActionBar/index.d.ts +17 -0
- package/lib/components/AppShell/AppShellMediaStyles/AppShellMediaStyles.d.ts +1 -1
- package/lib/components/Avatar/AvatarPlaceholderIcon.d.ts +1 -1
- package/lib/components/Cascader/CascaderColumns.d.ts +1 -1
- package/lib/components/Checkbox/CheckIcon.d.ts +2 -2
- package/lib/components/CloseButton/CloseIcon.d.ts +1 -1
- package/lib/components/ColorInput/EyeDropperIcon.d.ts +1 -1
- package/lib/components/ColorPicker/Saturation/Saturation.d.ts +1 -1
- package/lib/components/ColorPicker/Swatches/Swatches.d.ts +1 -1
- package/lib/components/ColorPicker/Thumb/Thumb.d.ts +1 -1
- package/lib/components/Combobox/Combobox.d.ts +1 -1
- package/lib/components/Combobox/ComboboxClearButton/ComboboxClearButton.d.ts +1 -1
- package/lib/components/Combobox/ComboboxHiddenInput/ComboboxHiddenInput.d.ts +1 -1
- package/lib/components/Combobox/OptionsDropdown/OptionsDropdown.d.ts +1 -1
- package/lib/components/CopyButton/CopyButton.d.ts +1 -1
- package/lib/components/Drawer/DrawerStack.d.ts +1 -1
- package/lib/components/FocusTrap/FocusTrap.d.ts +1 -1
- package/lib/components/Grid/GridCol/GridColVariables.d.ts +1 -1
- package/lib/components/Grid/GridVariables.d.ts +1 -1
- package/lib/components/HoverCard/HoverCard.d.ts +1 -1
- package/lib/components/HoverCard/HoverCardDropdown/HoverCardDropdown.d.ts +1 -1
- package/lib/components/HoverCard/HoverCardGroup/HoverCardGroup.d.ts +1 -1
- package/lib/components/HoverCard/HoverCardTarget/HoverCardTarget.d.ts +1 -1
- package/lib/components/Input/InputClearSection/InputClearSection.d.ts +1 -1
- package/lib/components/Input/index.d.ts +1 -1
- package/lib/components/Menu/Menu.d.ts +1 -1
- package/lib/components/Menu/MenuCheckboxGroup/MenuCheckboxGroup.d.ts +1 -1
- package/lib/components/Menu/MenuRadioGroup/MenuRadioGroup.d.ts +1 -1
- package/lib/components/Menu/MenuSelectableItem/MenuSelectableItem.d.ts +1 -1
- package/lib/components/Menu/MenuSub/MenuSub.d.ts +1 -1
- package/lib/components/Menu/MenuSubTarget/MenuSubTarget.d.ts +1 -1
- package/lib/components/Menu/MenuTarget/MenuTarget.d.ts +1 -1
- package/lib/components/Menubar/MenubarDropdown/MenubarDropdown.d.ts +1 -1
- package/lib/components/Menubar/MenubarMenu/MenubarMenu.d.ts +1 -1
- package/lib/components/Menubar/MenubarTarget/MenubarTarget.d.ts +1 -1
- package/lib/components/Modal/ModalStack.d.ts +1 -1
- package/lib/components/ModalBase/ModalBase.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseBody.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseCloseButton.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseContent.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseHeader.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseOverlay.d.ts +1 -1
- package/lib/components/ModalBase/ModalBaseTitle.d.ts +1 -1
- package/lib/components/ModalBase/NativeScrollArea.d.ts +1 -1
- package/lib/components/NativeSelect/NativeSelectOption.d.ts +1 -1
- package/lib/components/NumberFormatter/NumberFormatter.d.ts +1 -1
- package/lib/components/NumberInput/NumberInputChevron.d.ts +1 -1
- package/lib/components/Pagination/Pagination.icons.d.ts +5 -5
- package/lib/components/Pagination/PaginationItems/PaginationItems.d.ts +1 -1
- package/lib/components/PasswordInput/PasswordToggleIcon.d.ts +1 -1
- package/lib/components/Popover/Popover.d.ts +2 -2
- package/lib/components/Progress/Progress.d.ts +1 -1
- package/lib/components/Radio/RadioIcon.d.ts +1 -1
- package/lib/components/Rating/RatingItem/RatingItem.d.ts +1 -1
- package/lib/components/Rating/StarSymbol/StarIcon.d.ts +1 -1
- package/lib/components/Rating/StarSymbol/StarSymbol.d.ts +1 -1
- package/lib/components/RingProgress/Curve/Curve.d.ts +1 -1
- package/lib/components/RollingNumber/DigitColumn.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaCorner/ScrollAreaCorner.d.ts +2 -2
- package/lib/components/ScrollArea/ScrollAreaRoot/ScrollAreaRoot.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbar.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarAuto.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarHover.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarScroll.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollAreaScrollbarVisible.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarX.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaScrollbar/ScrollbarY.d.ts +1 -1
- package/lib/components/ScrollArea/ScrollAreaThumb/ScrollAreaThumb.d.ts +2 -2
- package/lib/components/ScrollArea/ScrollAreaViewport/ScrollAreaViewport.d.ts +1 -1
- package/lib/components/SimpleGrid/SimpleGridVariables.d.ts +2 -2
- package/lib/components/Slider/Marks/Marks.d.ts +1 -1
- package/lib/components/Slider/SliderRoot/SliderRoot.d.ts +1 -1
- package/lib/components/Slider/Thumb/Thumb.d.ts +1 -1
- package/lib/components/Slider/Track/Track.d.ts +1 -1
- package/lib/components/Splitter/GripIcon.d.ts +2 -2
- package/lib/components/Stepper/Stepper.context.d.ts +1 -0
- package/lib/components/Stepper/Stepper.d.ts +3 -1
- package/lib/components/Table/TableDataRenderer.d.ts +1 -1
- package/lib/components/Textarea/Autosize.d.ts +1 -1
- package/lib/components/Tooltip/TooltipGroup/TooltipGroup.d.ts +1 -1
- package/lib/components/Transition/Transition.d.ts +1 -1
- package/lib/components/Tree/FlatTreeNode.d.ts +1 -1
- package/lib/components/Tree/Tree.d.ts +1 -1
- package/lib/components/Tree/TreeNode.d.ts +1 -1
- package/lib/components/TreeSelect/TreeSelectOption.d.ts +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/core/DirectionProvider/DirectionProvider.d.ts +1 -1
- package/lib/core/InlineStyles/InlineStyles.d.ts +1 -1
- package/lib/core/MantineProvider/ColorSchemeScript/ColorSchemeScript.d.ts +1 -1
- package/lib/core/MantineProvider/MantineClasses/MantineClasses.d.ts +1 -1
- package/lib/core/MantineProvider/MantineCssVariables/MantineCssVariables.d.ts +1 -1
- package/lib/core/MantineProvider/MantineProvider.d.ts +5 -5
- package/lib/core/MantineProvider/MantineThemeProvider/MantineThemeProvider.d.ts +1 -1
- package/lib/utils/Floating/FloatingArrow/FloatingArrow.d.ts +1 -1
- package/lib/utils/InlineInput/InlineInput.d.ts +1 -1
- package/lib/utils/InputsGroupFieldset/InputsGroupFieldset.d.ts +1 -1
- package/package.json +5 -5
- package/styles/ActionBar.css +13 -0
- package/styles/ActionBar.layer.css +14 -0
- package/styles/Stepper.css +30 -0
- package/styles/Stepper.layer.css +30 -0
- package/styles/Typography.css +59 -0
- package/styles/Typography.layer.css +59 -0
- package/styles.css +144 -41
- package/styles.layer.css +144 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxChevron.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxChevron/ComboboxChevron.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n Factory,\n factory,\n getSize,\n getThemeColor,\n MantineColor,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../../core';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxChevronStylesNames = 'chevron';\nexport type ComboboxChevronCSSVariables = {\n chevron: '--combobox-chevron-size' | '--combobox-chevron-color';\n};\n\nexport interface ComboboxChevronProps\n extends\n BoxProps,\n StylesApiProps<ComboboxChevronFactory>,\n ElementProps<'svg', 'opacity' | 'display'> {\n size?: MantineSize | (string & {});\n error?: React.ReactNode;\n color?: MantineColor;\n}\n\nexport type ComboboxChevronFactory = Factory<{\n props: ComboboxChevronProps;\n ref: SVGSVGElement;\n stylesNames: ComboboxChevronStylesNames;\n vars: ComboboxChevronCSSVariables;\n}>;\n\nconst defaultProps = {\n error: null,\n} satisfies Partial<ComboboxChevronProps>;\n\nconst varsResolver = createVarsResolver<ComboboxChevronFactory>((theme, { size, color }) => ({\n chevron: {\n '--combobox-chevron-size': getSize(size, 'combobox-chevron-size'),\n '--combobox-chevron-color': color ? getThemeColor(color, theme) : undefined,\n },\n}));\n\nexport const ComboboxChevron = factory<ComboboxChevronFactory>((_props) => {\n const props = useProps('ComboboxChevron', defaultProps, _props);\n const {\n size,\n error,\n style,\n className,\n classNames,\n styles,\n unstyled,\n vars,\n attributes,\n mod,\n ...others\n } = props;\n\n const getStyles = useStyles<ComboboxChevronFactory>({\n name: 'ComboboxChevron',\n classes,\n props,\n style,\n className,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'chevron',\n });\n\n return (\n <Box\n component=\"svg\"\n {...others}\n {...getStyles('chevron')}\n size={size}\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n mod={['combobox-chevron', { error }, mod]}\n >\n <path\n d=\"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </Box>\n );\n});\n\nComboboxChevron.classes = classes;\nComboboxChevron.varsResolver = varsResolver;\nComboboxChevron.displayName = '@mantine/core/ComboboxChevron';\n"],"mappings":";;;;;;;;;;;AAuCA,MAAM,eAAe,EACnB,OAAO,KACT;AAEA,MAAM,eAAe,oBAA4C,OAAO,EAAE,MAAM,aAAa,EAC3F,SAAS;CACP,2BAA2B,QAAQ,MAAM,uBAAuB;CAChE,4BAA4B,QAAQ,cAAc,OAAO,KAAK,IAAI,KAAA;AACpE,EACF,EAAE;AAEF,MAAa,kBAAkB,SAAiC,WAAW;CACzE,MAAM,QAAQ,SAAS,mBAAmB,cAAc,MAAM;CAC9D,MAAM,EACJ,MACA,OACA,OACA,WACA,YACA,QACA,UACA,MACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAkC;EAClD,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;CAChB,CAAC;CAED,OACE,oBAAC,KAAD;EACE,WAAU;EACV,GAAI;EACJ,GAAI,UAAU,SAAS;EACjB;EACN,SAAQ;EACR,MAAK;EACL,OAAM;EACN,KAAK;GAAC;GAAoB,EAAE,MAAM;GAAG;EAAG;
|
|
1
|
+
{"version":3,"file":"ComboboxChevron.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxChevron/ComboboxChevron.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n Factory,\n factory,\n getSize,\n getThemeColor,\n MantineColor,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../../core';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxChevronStylesNames = 'chevron';\nexport type ComboboxChevronCSSVariables = {\n chevron: '--combobox-chevron-size' | '--combobox-chevron-color';\n};\n\nexport interface ComboboxChevronProps\n extends\n BoxProps,\n StylesApiProps<ComboboxChevronFactory>,\n ElementProps<'svg', 'opacity' | 'display'> {\n size?: MantineSize | (string & {});\n error?: React.ReactNode;\n color?: MantineColor;\n}\n\nexport type ComboboxChevronFactory = Factory<{\n props: ComboboxChevronProps;\n ref: SVGSVGElement;\n stylesNames: ComboboxChevronStylesNames;\n vars: ComboboxChevronCSSVariables;\n}>;\n\nconst defaultProps = {\n error: null,\n} satisfies Partial<ComboboxChevronProps>;\n\nconst varsResolver = createVarsResolver<ComboboxChevronFactory>((theme, { size, color }) => ({\n chevron: {\n '--combobox-chevron-size': getSize(size, 'combobox-chevron-size'),\n '--combobox-chevron-color': color ? getThemeColor(color, theme) : undefined,\n },\n}));\n\nexport const ComboboxChevron = factory<ComboboxChevronFactory>((_props) => {\n const props = useProps('ComboboxChevron', defaultProps, _props);\n const {\n size,\n error,\n style,\n className,\n classNames,\n styles,\n unstyled,\n vars,\n attributes,\n mod,\n ...others\n } = props;\n\n const getStyles = useStyles<ComboboxChevronFactory>({\n name: 'ComboboxChevron',\n classes,\n props,\n style,\n className,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n attributes,\n rootSelector: 'chevron',\n });\n\n return (\n <Box\n component=\"svg\"\n {...others}\n {...getStyles('chevron')}\n size={size}\n viewBox=\"0 0 15 15\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n mod={['combobox-chevron', { error }, mod]}\n >\n <path\n d=\"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z\"\n fill=\"currentColor\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n />\n </Box>\n );\n});\n\nComboboxChevron.classes = classes;\nComboboxChevron.varsResolver = varsResolver;\nComboboxChevron.displayName = '@mantine/core/ComboboxChevron';\n"],"mappings":";;;;;;;;;;;AAuCA,MAAM,eAAe,EACnB,OAAO,KACT;AAEA,MAAM,eAAe,oBAA4C,OAAO,EAAE,MAAM,aAAa,EAC3F,SAAS;CACP,2BAA2B,QAAQ,MAAM,uBAAuB;CAChE,4BAA4B,QAAQ,cAAc,OAAO,KAAK,IAAI,KAAA;AACpE,EACF,EAAE;AAEF,MAAa,kBAAkB,SAAiC,WAAW;CACzE,MAAM,QAAQ,SAAS,mBAAmB,cAAc,MAAM;CAC9D,MAAM,EACJ,MACA,OACA,OACA,WACA,YACA,QACA,UACA,MACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAkC;EAClD,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;CAChB,CAAC;CAED,OACE,oBAAC,KAAD;EACE,WAAU;EACV,GAAI;EACJ,GAAI,UAAU,SAAS;EACjB;EACN,SAAQ;EACR,MAAK;EACL,OAAM;EACN,KAAK;GAAC;GAAoB,EAAE,MAAM;GAAG;EAAG;EAExC,UAAA,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,UAAS;GACT,UAAS;EACV,CAAA;CACE,CAAA;AAET,CAAC;AAED,gBAAgB,UAAUA;AAC1B,gBAAgB,eAAe;AAC/B,gBAAgB,cAAc"}
|
|
@@ -8,8 +8,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
//#region packages/@mantine/core/src/components/Combobox/ComboboxEmpty/ComboboxEmpty.tsx
|
|
9
9
|
const ComboboxEmpty = factory((props) => {
|
|
10
10
|
const { classNames, className, style, styles, vars, ...others } = useProps("ComboboxEmpty", null, props);
|
|
11
|
+
const ctx = useComboboxContext();
|
|
11
12
|
return /* @__PURE__ */ jsx(Box, {
|
|
12
|
-
...
|
|
13
|
+
...ctx.getStyles("empty", {
|
|
13
14
|
className,
|
|
14
15
|
classNames,
|
|
15
16
|
styles,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxEmpty.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxEmpty/ComboboxEmpty.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxEmptyStylesNames = 'empty';\n\nexport interface ComboboxEmptyProps\n extends BoxProps, CompoundStylesApiProps<ComboboxEmptyFactory>, ElementProps<'div'> {}\n\nexport type ComboboxEmptyFactory = Factory<{\n props: ComboboxEmptyProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxEmptyStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxEmpty = factory<ComboboxEmptyFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxEmpty',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return <Box {...ctx.getStyles('empty', { className, classNames, styles, style })} {...others} />;\n});\n\nComboboxEmpty.classes = classes;\nComboboxEmpty.displayName = '@mantine/core/ComboboxEmpty';\n"],"mappings":";;;;;;;;AAwBA,MAAa,gBAAgB,SAA+B,UAAU;CACpE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,iBACA,MACA,KACF;
|
|
1
|
+
{"version":3,"file":"ComboboxEmpty.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxEmpty/ComboboxEmpty.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxEmptyStylesNames = 'empty';\n\nexport interface ComboboxEmptyProps\n extends BoxProps, CompoundStylesApiProps<ComboboxEmptyFactory>, ElementProps<'div'> {}\n\nexport type ComboboxEmptyFactory = Factory<{\n props: ComboboxEmptyProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxEmptyStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxEmpty = factory<ComboboxEmptyFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxEmpty',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return <Box {...ctx.getStyles('empty', { className, classNames, styles, style })} {...others} />;\n});\n\nComboboxEmpty.classes = classes;\nComboboxEmpty.displayName = '@mantine/core/ComboboxEmpty';\n"],"mappings":";;;;;;;;AAwBA,MAAa,gBAAgB,SAA+B,UAAU;CACpE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,iBACA,MACA,KACF;CAEA,MAAM,MAAM,mBAAmB;CAE/B,OAAO,oBAAC,KAAD;EAAK,GAAI,IAAI,UAAU,SAAS;GAAE;GAAW;GAAY;GAAQ;EAAM,CAAC;EAAG,GAAI;CAAS,CAAA;AACjG,CAAC;AAED,cAAc,UAAUA;AACxB,cAAc,cAAc"}
|
|
@@ -21,16 +21,17 @@ const ComboboxEventsTarget = factory((props) => {
|
|
|
21
21
|
const child = getSingleElementChild(children);
|
|
22
22
|
if (!child) throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");
|
|
23
23
|
const ctx = useComboboxContext();
|
|
24
|
+
const targetProps = useComboboxTargetProps({
|
|
25
|
+
targetType,
|
|
26
|
+
withAriaAttributes,
|
|
27
|
+
withKeyboardNavigation,
|
|
28
|
+
withExpandedAttribute,
|
|
29
|
+
onKeyDown: child.props.onKeyDown,
|
|
30
|
+
onClick: child.props.onClick,
|
|
31
|
+
autoComplete
|
|
32
|
+
});
|
|
24
33
|
return cloneElement(child, {
|
|
25
|
-
...
|
|
26
|
-
targetType,
|
|
27
|
-
withAriaAttributes,
|
|
28
|
-
withKeyboardNavigation,
|
|
29
|
-
withExpandedAttribute,
|
|
30
|
-
onKeyDown: child.props.onKeyDown,
|
|
31
|
-
onClick: child.props.onClick,
|
|
32
|
-
autoComplete
|
|
33
|
-
}),
|
|
34
|
+
...targetProps,
|
|
34
35
|
...others,
|
|
35
36
|
[refProp]: useMergedRef(ref, ctx.store.targetRef, getRefProp(child))
|
|
36
37
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxEventsTarget.mjs","names":[],"sources":["../../../../src/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getRefProp, getSingleElementChild, useProps } from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport { useComboboxTargetProps } from '../use-combobox-target-props/use-combobox-target-props';\n\nexport interface ComboboxEventsTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop is used to access element ref */\n refProp?: string;\n\n /** If set, the component responds to the keyboard events @default true */\n withKeyboardNavigation?: boolean;\n\n /** If set, the target has `aria-` attributes @default true */\n withAriaAttributes?: boolean;\n\n /** If set, the target has `aria-expanded` attribute @default false */\n withExpandedAttribute?: boolean;\n\n /** Determines which events should be handled by the target element.\n * `button` target type handles `Space` and `Enter` keys to toggle dropdown opened state.\n * @default input\n * */\n targetType?: 'button' | 'input';\n\n /** Input autocomplete attribute */\n autoComplete?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n targetType: 'input',\n withKeyboardNavigation: true,\n withAriaAttributes: true,\n withExpandedAttribute: false,\n autoComplete: 'off',\n} satisfies Partial<ComboboxEventsTargetProps>;\n\nexport type ComboboxEventsTargetFactory = Factory<{\n props: ComboboxEventsTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxEventsTarget = factory<ComboboxEventsTargetFactory>((props) => {\n const {\n children,\n refProp,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n ref,\n ...others\n } = useProps('ComboboxEventsTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n const targetProps = useComboboxTargetProps({\n targetType,\n withAriaAttributes,\n withKeyboardNavigation,\n withExpandedAttribute,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (child.props as any).onClick,\n autoComplete,\n });\n\n return cloneElement(child, {\n ...targetProps,\n ...others,\n [refProp]: useMergedRef(ref, ctx.store.targetRef, getRefProp(child)),\n });\n});\n\nComboboxEventsTarget.displayName = '@mantine/core/ComboboxEventsTarget';\n"],"mappings":";;;;;;;;;;AAgCA,MAAM,eAAe;CACnB,SAAS;CACT,YAAY;CACZ,wBAAwB;CACxB,oBAAoB;CACpB,uBAAuB;CACvB,cAAc;AAChB;AAQA,MAAa,uBAAuB,SAAsC,UAAU;CAClF,MAAM,EACJ,UACA,SACA,wBACA,oBACA,uBACA,YACA,cACA,KACA,GAAG,WACD,SAAS,wBAAwB,cAAc,KAAK;CAExD,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,yKACF;CAGF,MAAM,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"file":"ComboboxEventsTarget.mjs","names":[],"sources":["../../../../src/components/Combobox/ComboboxEventsTarget/ComboboxEventsTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getRefProp, getSingleElementChild, useProps } from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport { useComboboxTargetProps } from '../use-combobox-target-props/use-combobox-target-props';\n\nexport interface ComboboxEventsTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop is used to access element ref */\n refProp?: string;\n\n /** If set, the component responds to the keyboard events @default true */\n withKeyboardNavigation?: boolean;\n\n /** If set, the target has `aria-` attributes @default true */\n withAriaAttributes?: boolean;\n\n /** If set, the target has `aria-expanded` attribute @default false */\n withExpandedAttribute?: boolean;\n\n /** Determines which events should be handled by the target element.\n * `button` target type handles `Space` and `Enter` keys to toggle dropdown opened state.\n * @default input\n * */\n targetType?: 'button' | 'input';\n\n /** Input autocomplete attribute */\n autoComplete?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n targetType: 'input',\n withKeyboardNavigation: true,\n withAriaAttributes: true,\n withExpandedAttribute: false,\n autoComplete: 'off',\n} satisfies Partial<ComboboxEventsTargetProps>;\n\nexport type ComboboxEventsTargetFactory = Factory<{\n props: ComboboxEventsTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxEventsTarget = factory<ComboboxEventsTargetFactory>((props) => {\n const {\n children,\n refProp,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n ref,\n ...others\n } = useProps('ComboboxEventsTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n const targetProps = useComboboxTargetProps({\n targetType,\n withAriaAttributes,\n withKeyboardNavigation,\n withExpandedAttribute,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (child.props as any).onClick,\n autoComplete,\n });\n\n return cloneElement(child, {\n ...targetProps,\n ...others,\n [refProp]: useMergedRef(ref, ctx.store.targetRef, getRefProp(child)),\n });\n});\n\nComboboxEventsTarget.displayName = '@mantine/core/ComboboxEventsTarget';\n"],"mappings":";;;;;;;;;;AAgCA,MAAM,eAAe;CACnB,SAAS;CACT,YAAY;CACZ,wBAAwB;CACxB,oBAAoB;CACpB,uBAAuB;CACvB,cAAc;AAChB;AAQA,MAAa,uBAAuB,SAAsC,UAAU;CAClF,MAAM,EACJ,UACA,SACA,wBACA,oBACA,uBACA,YACA,cACA,KACA,GAAG,WACD,SAAS,wBAAwB,cAAc,KAAK;CAExD,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,yKACF;CAGF,MAAM,MAAM,mBAAmB;CAC/B,MAAM,cAAc,uBAAuB;EACzC;EACA;EACA;EACA;EACA,WAAY,MAAM,MAAc;EAChC,SAAU,MAAM,MAAc;EAC9B;CACF,CAAC;CAED,OAAO,aAAa,OAAO;EACzB,GAAG;EACH,GAAG;GACF,UAAU,aAAa,KAAK,IAAI,MAAM,WAAW,WAAW,KAAK,CAAC;CACrE,CAAC;AACH,CAAC;AAED,qBAAqB,cAAc"}
|
|
@@ -8,8 +8,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
//#region packages/@mantine/core/src/components/Combobox/ComboboxFooter/ComboboxFooter.tsx
|
|
9
9
|
const ComboboxFooter = factory((props) => {
|
|
10
10
|
const { classNames, className, style, styles, vars, ...others } = useProps("ComboboxFooter", null, props);
|
|
11
|
+
const ctx = useComboboxContext();
|
|
11
12
|
return /* @__PURE__ */ jsx(Box, {
|
|
12
|
-
...
|
|
13
|
+
...ctx.getStyles("footer", {
|
|
13
14
|
className,
|
|
14
15
|
classNames,
|
|
15
16
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxFooter.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxFooter/ComboboxFooter.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxFooterStylesNames = 'footer';\n\nexport interface ComboboxFooterProps\n extends BoxProps, CompoundStylesApiProps<ComboboxFooterFactory>, ElementProps<'div'> {}\n\nexport type ComboboxFooterFactory = Factory<{\n props: ComboboxFooterProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxFooterStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxFooter = factory<ComboboxFooterFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxFooter',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return (\n <Box\n {...ctx.getStyles('footer', { className, classNames, style, styles })}\n {...others}\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n />\n );\n});\n\nComboboxFooter.classes = classes;\nComboboxFooter.displayName = '@mantine/core/ComboboxFooter';\n"],"mappings":";;;;;;;;AAwBA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,kBACA,MACA,KACF;
|
|
1
|
+
{"version":3,"file":"ComboboxFooter.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxFooter/ComboboxFooter.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxFooterStylesNames = 'footer';\n\nexport interface ComboboxFooterProps\n extends BoxProps, CompoundStylesApiProps<ComboboxFooterFactory>, ElementProps<'div'> {}\n\nexport type ComboboxFooterFactory = Factory<{\n props: ComboboxFooterProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxFooterStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxFooter = factory<ComboboxFooterFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxFooter',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return (\n <Box\n {...ctx.getStyles('footer', { className, classNames, style, styles })}\n {...others}\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n />\n );\n});\n\nComboboxFooter.classes = classes;\nComboboxFooter.displayName = '@mantine/core/ComboboxFooter';\n"],"mappings":";;;;;;;;AAwBA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,kBACA,MACA,KACF;CAEA,MAAM,MAAM,mBAAmB;CAE/B,OACE,oBAAC,KAAD;EACE,GAAI,IAAI,UAAU,UAAU;GAAE;GAAW;GAAY;GAAO;EAAO,CAAC;EACpE,GAAI;EACJ,cAAc,UAAU;GACtB,MAAM,eAAe;EACvB;CACD,CAAA;AAEL,CAAC;AAED,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxGroup.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxGroup/ComboboxGroup.tsx"],"sourcesContent":["import { useId } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxGroupStylesNames = 'group' | 'groupLabel';\n\nexport interface ComboboxGroupProps\n extends BoxProps, CompoundStylesApiProps<ComboboxGroupFactory>, ElementProps<'div'> {\n /** Group label */\n label?: React.ReactNode;\n}\n\nexport type ComboboxGroupFactory = Factory<{\n props: ComboboxGroupProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxGroupStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxGroup = factory<ComboboxGroupFactory>((props) => {\n const { classNames, className, style, styles, vars, children, label, id, ...others } = useProps(\n 'ComboboxGroup',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n const _id = useId(id);\n\n const hasLabel = label !== undefined && label !== null && label !== false && label !== '';\n\n return (\n <Box\n role=\"group\"\n aria-labelledby={hasLabel ? _id : undefined}\n {...ctx.getStyles('group', { className, classNames, style, styles })}\n {...others}\n >\n {hasLabel && (\n <div id={_id} {...ctx.getStyles('groupLabel', { classNames, styles })}>\n {label}\n </div>\n )}\n {children}\n </Box>\n );\n});\n\nComboboxGroup.classes = classes;\nComboboxGroup.displayName = '@mantine/core/ComboboxGroup';\n"],"mappings":";;;;;;;;;AA4BA,MAAa,gBAAgB,SAA+B,UAAU;CACpE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,UAAU,OAAO,IAAI,GAAG,WAAW,SACrF,iBACA,MACA,KACF;CAEA,MAAM,MAAM,mBAAmB;CAC/B,MAAM,MAAM,MAAM,EAAE;CAEpB,MAAM,WAAW,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,SAAS,UAAU;CAEvF,OACE,qBAAC,KAAD;EACE,MAAK;EACL,mBAAiB,WAAW,MAAM,KAAA;EAClC,GAAI,IAAI,UAAU,SAAS;GAAE;GAAW;GAAY;GAAO;EAAO,CAAC;EACnE,GAAI;
|
|
1
|
+
{"version":3,"file":"ComboboxGroup.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxGroup/ComboboxGroup.tsx"],"sourcesContent":["import { useId } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxGroupStylesNames = 'group' | 'groupLabel';\n\nexport interface ComboboxGroupProps\n extends BoxProps, CompoundStylesApiProps<ComboboxGroupFactory>, ElementProps<'div'> {\n /** Group label */\n label?: React.ReactNode;\n}\n\nexport type ComboboxGroupFactory = Factory<{\n props: ComboboxGroupProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxGroupStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxGroup = factory<ComboboxGroupFactory>((props) => {\n const { classNames, className, style, styles, vars, children, label, id, ...others } = useProps(\n 'ComboboxGroup',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n const _id = useId(id);\n\n const hasLabel = label !== undefined && label !== null && label !== false && label !== '';\n\n return (\n <Box\n role=\"group\"\n aria-labelledby={hasLabel ? _id : undefined}\n {...ctx.getStyles('group', { className, classNames, style, styles })}\n {...others}\n >\n {hasLabel && (\n <div id={_id} {...ctx.getStyles('groupLabel', { classNames, styles })}>\n {label}\n </div>\n )}\n {children}\n </Box>\n );\n});\n\nComboboxGroup.classes = classes;\nComboboxGroup.displayName = '@mantine/core/ComboboxGroup';\n"],"mappings":";;;;;;;;;AA4BA,MAAa,gBAAgB,SAA+B,UAAU;CACpE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,UAAU,OAAO,IAAI,GAAG,WAAW,SACrF,iBACA,MACA,KACF;CAEA,MAAM,MAAM,mBAAmB;CAC/B,MAAM,MAAM,MAAM,EAAE;CAEpB,MAAM,WAAW,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,SAAS,UAAU;CAEvF,OACE,qBAAC,KAAD;EACE,MAAK;EACL,mBAAiB,WAAW,MAAM,KAAA;EAClC,GAAI,IAAI,UAAU,SAAS;GAAE;GAAW;GAAY;GAAO;EAAO,CAAC;EACnE,GAAI;EAJN,UAAA,CAMG,YACC,oBAAC,OAAD;GAAK,IAAI;GAAK,GAAI,IAAI,UAAU,cAAc;IAAE;IAAY;GAAO,CAAC;GACjE,UAAA;EACE,CAAA,GAEN,QACE;;AAET,CAAC;AAED,cAAc,UAAUA;AACxB,cAAc,cAAc"}
|
|
@@ -8,8 +8,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
8
8
|
//#region packages/@mantine/core/src/components/Combobox/ComboboxHeader/ComboboxHeader.tsx
|
|
9
9
|
const ComboboxHeader = factory((props) => {
|
|
10
10
|
const { classNames, className, style, styles, vars, ...others } = useProps("ComboboxHeader", null, props);
|
|
11
|
+
const ctx = useComboboxContext();
|
|
11
12
|
return /* @__PURE__ */ jsx(Box, {
|
|
12
|
-
...
|
|
13
|
+
...ctx.getStyles("header", {
|
|
13
14
|
className,
|
|
14
15
|
classNames,
|
|
15
16
|
style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxHeader.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxHeader/ComboboxHeader.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxHeaderStylesNames = 'header';\n\nexport interface ComboboxHeaderProps\n extends BoxProps, CompoundStylesApiProps<ComboboxHeaderFactory>, ElementProps<'div'> {}\n\nexport type ComboboxHeaderFactory = Factory<{\n props: ComboboxHeaderProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxHeaderStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxHeader = factory<ComboboxHeaderFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxHeader',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return (\n <Box\n {...ctx.getStyles('header', { className, classNames, style, styles })}\n {...others}\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n />\n );\n});\n\nComboboxHeader.classes = classes;\nComboboxHeader.displayName = '@mantine/core/ComboboxHeader';\n"],"mappings":";;;;;;;;AAwBA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,kBACA,MACA,KACF;
|
|
1
|
+
{"version":3,"file":"ComboboxHeader.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/ComboboxHeader/ComboboxHeader.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n CompoundStylesApiProps,\n ElementProps,\n factory,\n Factory,\n useProps,\n} from '../../../core';\nimport { useComboboxContext } from '../Combobox.context';\nimport classes from '../Combobox.module.css';\n\nexport type ComboboxHeaderStylesNames = 'header';\n\nexport interface ComboboxHeaderProps\n extends BoxProps, CompoundStylesApiProps<ComboboxHeaderFactory>, ElementProps<'div'> {}\n\nexport type ComboboxHeaderFactory = Factory<{\n props: ComboboxHeaderProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxHeaderStylesNames;\n compound: true;\n}>;\n\nexport const ComboboxHeader = factory<ComboboxHeaderFactory>((props) => {\n const { classNames, className, style, styles, vars, ...others } = useProps(\n 'ComboboxHeader',\n null,\n props\n );\n\n const ctx = useComboboxContext();\n\n return (\n <Box\n {...ctx.getStyles('header', { className, classNames, style, styles })}\n {...others}\n onMouseDown={(event) => {\n event.preventDefault();\n }}\n />\n );\n});\n\nComboboxHeader.classes = classes;\nComboboxHeader.displayName = '@mantine/core/ComboboxHeader';\n"],"mappings":";;;;;;;;AAwBA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,MAAM,GAAG,WAAW,SAChE,kBACA,MACA,KACF;CAEA,MAAM,MAAM,mBAAmB;CAE/B,OACE,oBAAC,KAAD;EACE,GAAI,IAAI,UAAU,UAAU;GAAE;GAAW;GAAY;GAAO;EAAO,CAAC;EACpE,GAAI;EACJ,cAAc,UAAU;GACtB,MAAM,eAAe;EACvB;CACD,CAAA;AAEL,CAAC;AAED,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
@@ -22,16 +22,17 @@ const ComboboxTarget = factory((props) => {
|
|
|
22
22
|
const child = getSingleElementChild(children);
|
|
23
23
|
if (!child) throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");
|
|
24
24
|
const ctx = useComboboxContext();
|
|
25
|
+
const targetProps = useComboboxTargetProps({
|
|
26
|
+
targetType,
|
|
27
|
+
withAriaAttributes,
|
|
28
|
+
withKeyboardNavigation,
|
|
29
|
+
withExpandedAttribute,
|
|
30
|
+
onKeyDown: child.props.onKeyDown,
|
|
31
|
+
onClick: child.props.onClick,
|
|
32
|
+
autoComplete
|
|
33
|
+
});
|
|
25
34
|
const clonedElement = cloneElement(child, {
|
|
26
|
-
...
|
|
27
|
-
targetType,
|
|
28
|
-
withAriaAttributes,
|
|
29
|
-
withKeyboardNavigation,
|
|
30
|
-
withExpandedAttribute,
|
|
31
|
-
onKeyDown: child.props.onKeyDown,
|
|
32
|
-
onClick: child.props.onClick,
|
|
33
|
-
autoComplete
|
|
34
|
-
}),
|
|
35
|
+
...targetProps,
|
|
35
36
|
...others
|
|
36
37
|
});
|
|
37
38
|
return /* @__PURE__ */ jsx(Popover.Target, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxTarget.mjs","names":[],"sources":["../../../../src/components/Combobox/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getSingleElementChild, useProps } from '../../../core';\nimport { Popover } from '../../Popover';\nimport { useComboboxContext } from '../Combobox.context';\nimport { useComboboxTargetProps } from '../use-combobox-target-props/use-combobox-target-props';\n\nexport interface ComboboxTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop that is used to access element ref */\n refProp?: string;\n\n /** If set, the component responds to keyboard events @default true */\n withKeyboardNavigation?: boolean;\n\n /** If set, the target has `aria-` attributes @default true */\n withAriaAttributes?: boolean;\n\n /** If set, the target has `aria-expanded` attribute @default false */\n withExpandedAttribute?: boolean;\n\n /** Determines which events is handled by the target element.\n * `button` target type handles `Space` and `Enter` keys to toggle dropdown opened state.\n * @default input\n * */\n targetType?: 'button' | 'input';\n\n /** Input autocomplete attribute */\n autoComplete?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n targetType: 'input',\n withKeyboardNavigation: true,\n withAriaAttributes: true,\n withExpandedAttribute: false,\n autoComplete: 'off',\n} satisfies Partial<ComboboxTargetProps>;\n\nexport type ComboboxTargetFactory = Factory<{\n props: ComboboxTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxTarget = factory<ComboboxTargetFactory>((props) => {\n const {\n children,\n refProp,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n ref,\n ...others\n } = useProps('ComboboxTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n\n const targetProps = useComboboxTargetProps({\n targetType,\n withAriaAttributes,\n withKeyboardNavigation,\n withExpandedAttribute,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (child.props as any).onClick,\n autoComplete,\n });\n\n const clonedElement = cloneElement(child, {\n ...targetProps,\n ...others,\n });\n\n return (\n <Popover.Target refProp={refProp} ref={useMergedRef(ref, ctx.store.targetRef)}>\n {clonedElement}\n </Popover.Target>\n );\n});\n\nComboboxTarget.displayName = '@mantine/core/ComboboxTarget';\n"],"mappings":";;;;;;;;;;;AAiCA,MAAM,eAAe;CACnB,SAAS;CACT,YAAY;CACZ,wBAAwB;CACxB,oBAAoB;CACpB,uBAAuB;CACvB,cAAc;AAChB;AAQA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EACJ,UACA,SACA,wBACA,oBACA,uBACA,YACA,cACA,KACA,GAAG,WACD,SAAS,kBAAkB,cAAc,KAAK;CAElD,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,mKACF;CAGF,MAAM,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"file":"ComboboxTarget.mjs","names":[],"sources":["../../../../src/components/Combobox/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getSingleElementChild, useProps } from '../../../core';\nimport { Popover } from '../../Popover';\nimport { useComboboxContext } from '../Combobox.context';\nimport { useComboboxTargetProps } from '../use-combobox-target-props/use-combobox-target-props';\n\nexport interface ComboboxTargetProps {\n /** Target element */\n children: React.ReactNode;\n\n /** Key of the prop that is used to access element ref */\n refProp?: string;\n\n /** If set, the component responds to keyboard events @default true */\n withKeyboardNavigation?: boolean;\n\n /** If set, the target has `aria-` attributes @default true */\n withAriaAttributes?: boolean;\n\n /** If set, the target has `aria-expanded` attribute @default false */\n withExpandedAttribute?: boolean;\n\n /** Determines which events is handled by the target element.\n * `button` target type handles `Space` and `Enter` keys to toggle dropdown opened state.\n * @default input\n * */\n targetType?: 'button' | 'input';\n\n /** Input autocomplete attribute */\n autoComplete?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n targetType: 'input',\n withKeyboardNavigation: true,\n withAriaAttributes: true,\n withExpandedAttribute: false,\n autoComplete: 'off',\n} satisfies Partial<ComboboxTargetProps>;\n\nexport type ComboboxTargetFactory = Factory<{\n props: ComboboxTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxTarget = factory<ComboboxTargetFactory>((props) => {\n const {\n children,\n refProp,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n ref,\n ...others\n } = useProps('ComboboxTarget', defaultProps, props);\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n\n const targetProps = useComboboxTargetProps({\n targetType,\n withAriaAttributes,\n withKeyboardNavigation,\n withExpandedAttribute,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (child.props as any).onClick,\n autoComplete,\n });\n\n const clonedElement = cloneElement(child, {\n ...targetProps,\n ...others,\n });\n\n return (\n <Popover.Target refProp={refProp} ref={useMergedRef(ref, ctx.store.targetRef)}>\n {clonedElement}\n </Popover.Target>\n );\n});\n\nComboboxTarget.displayName = '@mantine/core/ComboboxTarget';\n"],"mappings":";;;;;;;;;;;AAiCA,MAAM,eAAe;CACnB,SAAS;CACT,YAAY;CACZ,wBAAwB;CACxB,oBAAoB;CACpB,uBAAuB;CACvB,cAAc;AAChB;AAQA,MAAa,iBAAiB,SAAgC,UAAU;CACtE,MAAM,EACJ,UACA,SACA,wBACA,oBACA,uBACA,YACA,cACA,KACA,GAAG,WACD,SAAS,kBAAkB,cAAc,KAAK;CAElD,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,mKACF;CAGF,MAAM,MAAM,mBAAmB;CAE/B,MAAM,cAAc,uBAAuB;EACzC;EACA;EACA;EACA;EACA,WAAY,MAAM,MAAc;EAChC,SAAU,MAAM,MAAc;EAC9B;CACF,CAAC;CAED,MAAM,gBAAgB,aAAa,OAAO;EACxC,GAAG;EACH,GAAG;CACL,CAAC;CAED,OACE,oBAAC,QAAQ,QAAT;EAAyB;EAAS,KAAK,aAAa,KAAK,IAAI,MAAM,SAAS;EACzE,UAAA;CACa,CAAA;AAEpB,CAAC;AAED,eAAe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsDropdown.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/OptionsDropdown/OptionsDropdown.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Primitive } from '../../../core';\nimport { CheckIcon } from '../../Checkbox';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea/ScrollArea';\nimport { Combobox } from '../Combobox';\nimport { useComboboxContext } from '../Combobox.context';\nimport { ComboboxItem, ComboboxLikeRenderOptionInput, ComboboxParsedItem } from '../Combobox.types';\nimport { defaultOptionsFilter, FilterOptionsInput } from './default-options-filter';\nimport { isEmptyComboboxData } from './is-empty-combobox-data';\nimport { isOptionsGroup } from './is-options-group';\nimport { validateOptions } from './validate-options';\nimport classes from '../Combobox.module.css';\n\nexport type OptionsFilter<Value extends Primitive = string> = (\n input: FilterOptionsInput<Value>\n) => ComboboxParsedItem<Value>[];\n\nexport interface OptionsGroup {\n group: React.ReactNode;\n items: ComboboxItem<Primitive>[];\n}\n\nexport type OptionsData = (ComboboxItem<Primitive> | OptionsGroup)[];\n\ninterface OptionProps {\n data: ComboboxItem<Primitive> | OptionsGroup;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n}\n\nfunction isValueChecked(value: Primitive | Primitive[] | undefined | null, optionValue: Primitive) {\n return Array.isArray(value) ? value.includes(optionValue) : value === optionValue;\n}\n\nfunction Option({\n data,\n withCheckIcon,\n withAlignedLabels,\n value,\n checkIconPosition,\n unstyled,\n renderOption,\n}: OptionProps) {\n if (!isOptionsGroup(data)) {\n const checked = isValueChecked(value, data.value);\n const check =\n withCheckIcon &&\n (checked ? (\n <CheckIcon className={classes.optionsDropdownCheckIcon} />\n ) : withAlignedLabels ? (\n <div className={classes.optionsDropdownCheckPlaceholder} />\n ) : null);\n\n const defaultContent = (\n <>\n {checkIconPosition === 'left' && check}\n <span>{data.label}</span>\n {checkIconPosition === 'right' && check}\n </>\n );\n\n return (\n <Combobox.Option\n value={data.value}\n disabled={data.disabled}\n className={cx({ [classes.optionsDropdownOption]: !unstyled })}\n data-reverse={checkIconPosition === 'right' || undefined}\n data-checked={checked || undefined}\n aria-selected={checked}\n active={checked}\n >\n {typeof renderOption === 'function'\n ? renderOption({ option: data, checked })\n : defaultContent}\n </Combobox.Option>\n );\n }\n\n const options = data.items.map((item) => (\n <Option\n data={item}\n value={value}\n key={`${item.value}`}\n unstyled={unstyled}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n checkIconPosition={checkIconPosition}\n renderOption={renderOption}\n />\n ));\n\n return <Combobox.Group label={data.group}>{options}</Combobox.Group>;\n}\n\nexport interface OptionsDropdownProps {\n data: OptionsData;\n filter: OptionsFilter<Primitive> | undefined;\n search: string | undefined;\n limit: number | undefined;\n withScrollArea: boolean | undefined;\n maxDropdownHeight: number | string | undefined;\n /** Overrides `floatingHeight` from the `Combobox` context, used by `Combobox`-based components */\n floatingHeight?: 'viewport';\n hidden?: boolean;\n hiddenWhenEmpty?: boolean;\n filterOptions?: boolean;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n nothingFoundMessage?: React.ReactNode;\n unstyled: boolean | undefined;\n labelId: string | undefined;\n 'aria-label': string | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n scrollAreaProps: ScrollAreaProps | undefined;\n}\n\nexport function OptionsDropdown({\n data,\n hidden,\n hiddenWhenEmpty,\n filter,\n search,\n limit,\n maxDropdownHeight,\n floatingHeight,\n withScrollArea = true,\n filterOptions = true,\n withCheckIcon = false,\n withAlignedLabels = false,\n value,\n checkIconPosition,\n nothingFoundMessage,\n unstyled,\n labelId,\n renderOption,\n scrollAreaProps,\n 'aria-label': ariaLabel,\n}: OptionsDropdownProps) {\n const ctx = useComboboxContext();\n validateOptions(data);\n\n const shouldFilter = typeof search === 'string';\n const filteredData = shouldFilter\n ? (filter || defaultOptionsFilter)({\n options: data,\n search: filterOptions ? search : '',\n limit: limit ?? Infinity,\n })\n : data;\n const isEmpty = isEmptyComboboxData(filteredData);\n\n const options = filteredData.map((item, index) => (\n <Option\n data={item}\n key={\n isOptionsGroup(item)\n ? `group-${typeof item.group === 'string' ? item.group : index}`\n : `${item.value}`\n }\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n value={value}\n checkIconPosition={checkIconPosition}\n unstyled={unstyled}\n renderOption={renderOption}\n />\n ));\n\n return (\n <Combobox.Dropdown hidden={hidden || (hiddenWhenEmpty && isEmpty)} data-composed>\n <Combobox.Options labelledBy={labelId} aria-label={ariaLabel}>\n {withScrollArea ? (\n <ScrollArea.Autosize\n mah={\n (floatingHeight ?? ctx.floatingHeight) === 'viewport'\n ? 'var(--combobox-floating-options-max-height)'\n : (maxDropdownHeight ?? 220)\n }\n type=\"scroll\"\n scrollbarSize=\"var(--combobox-padding)\"\n offsetScrollbars=\"y\"\n {...scrollAreaProps}\n >\n {options}\n </ScrollArea.Autosize>\n ) : (\n options\n )}\n {isEmpty && nothingFoundMessage && <Combobox.Empty>{nothingFoundMessage}</Combobox.Empty>}\n </Combobox.Options>\n </Combobox.Dropdown>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,SAAS,eAAe,OAAmD,aAAwB;CACjG,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS,WAAW,IAAI,UAAU;AACxE;AAEA,SAAS,OAAO,EACd,MACA,eACA,mBACA,OACA,mBACA,UACA,gBACc;CACd,IAAI,CAAC,eAAe,IAAI,GAAG;EACzB,MAAM,UAAU,eAAe,OAAO,KAAK,KAAK;EAChD,MAAM,QACJ,kBACC,UACC,oBAAC,WAAD,EAAW,WAAWA,wBAAQ,yBAA2B,CAAA,IACvD,oBACF,oBAAC,OAAD,EAAK,WAAWA,wBAAQ,gCAAkC,CAAA,IACxD;EAEN,MAAM,iBACJ,qBAAA,UAAA,EAAA,UAAA;GACG,sBAAsB,UAAU;GACjC,oBAAC,QAAD,EAAA,UAAO,KAAK,MAAY,CAAA;GACvB,sBAAsB,WAAW;EAClC,EAAA,CAAA;EAGJ,OACE,oBAAC,SAAS,QAAV;GACE,OAAO,KAAK;GACZ,UAAU,KAAK;GACf,WAAW,GAAG,GAAGA,wBAAQ,wBAAwB,CAAC,SAAS,CAAC;GAC5D,gBAAc,sBAAsB,WAAW,KAAA;GAC/C,gBAAc,WAAW,KAAA;GACzB,iBAAe;GACf,QAAQ;
|
|
1
|
+
{"version":3,"file":"OptionsDropdown.mjs","names":["classes"],"sources":["../../../../src/components/Combobox/OptionsDropdown/OptionsDropdown.tsx"],"sourcesContent":["import cx from 'clsx';\nimport { Primitive } from '../../../core';\nimport { CheckIcon } from '../../Checkbox';\nimport { ScrollArea, ScrollAreaProps } from '../../ScrollArea/ScrollArea';\nimport { Combobox } from '../Combobox';\nimport { useComboboxContext } from '../Combobox.context';\nimport { ComboboxItem, ComboboxLikeRenderOptionInput, ComboboxParsedItem } from '../Combobox.types';\nimport { defaultOptionsFilter, FilterOptionsInput } from './default-options-filter';\nimport { isEmptyComboboxData } from './is-empty-combobox-data';\nimport { isOptionsGroup } from './is-options-group';\nimport { validateOptions } from './validate-options';\nimport classes from '../Combobox.module.css';\n\nexport type OptionsFilter<Value extends Primitive = string> = (\n input: FilterOptionsInput<Value>\n) => ComboboxParsedItem<Value>[];\n\nexport interface OptionsGroup {\n group: React.ReactNode;\n items: ComboboxItem<Primitive>[];\n}\n\nexport type OptionsData = (ComboboxItem<Primitive> | OptionsGroup)[];\n\ninterface OptionProps {\n data: ComboboxItem<Primitive> | OptionsGroup;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n}\n\nfunction isValueChecked(value: Primitive | Primitive[] | undefined | null, optionValue: Primitive) {\n return Array.isArray(value) ? value.includes(optionValue) : value === optionValue;\n}\n\nfunction Option({\n data,\n withCheckIcon,\n withAlignedLabels,\n value,\n checkIconPosition,\n unstyled,\n renderOption,\n}: OptionProps) {\n if (!isOptionsGroup(data)) {\n const checked = isValueChecked(value, data.value);\n const check =\n withCheckIcon &&\n (checked ? (\n <CheckIcon className={classes.optionsDropdownCheckIcon} />\n ) : withAlignedLabels ? (\n <div className={classes.optionsDropdownCheckPlaceholder} />\n ) : null);\n\n const defaultContent = (\n <>\n {checkIconPosition === 'left' && check}\n <span>{data.label}</span>\n {checkIconPosition === 'right' && check}\n </>\n );\n\n return (\n <Combobox.Option\n value={data.value}\n disabled={data.disabled}\n className={cx({ [classes.optionsDropdownOption]: !unstyled })}\n data-reverse={checkIconPosition === 'right' || undefined}\n data-checked={checked || undefined}\n aria-selected={checked}\n active={checked}\n >\n {typeof renderOption === 'function'\n ? renderOption({ option: data, checked })\n : defaultContent}\n </Combobox.Option>\n );\n }\n\n const options = data.items.map((item) => (\n <Option\n data={item}\n value={value}\n key={`${item.value}`}\n unstyled={unstyled}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n checkIconPosition={checkIconPosition}\n renderOption={renderOption}\n />\n ));\n\n return <Combobox.Group label={data.group}>{options}</Combobox.Group>;\n}\n\nexport interface OptionsDropdownProps {\n data: OptionsData;\n filter: OptionsFilter<Primitive> | undefined;\n search: string | undefined;\n limit: number | undefined;\n withScrollArea: boolean | undefined;\n maxDropdownHeight: number | string | undefined;\n /** Overrides `floatingHeight` from the `Combobox` context, used by `Combobox`-based components */\n floatingHeight?: 'viewport';\n hidden?: boolean;\n hiddenWhenEmpty?: boolean;\n filterOptions?: boolean;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n nothingFoundMessage?: React.ReactNode;\n unstyled: boolean | undefined;\n labelId: string | undefined;\n 'aria-label': string | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n scrollAreaProps: ScrollAreaProps | undefined;\n}\n\nexport function OptionsDropdown({\n data,\n hidden,\n hiddenWhenEmpty,\n filter,\n search,\n limit,\n maxDropdownHeight,\n floatingHeight,\n withScrollArea = true,\n filterOptions = true,\n withCheckIcon = false,\n withAlignedLabels = false,\n value,\n checkIconPosition,\n nothingFoundMessage,\n unstyled,\n labelId,\n renderOption,\n scrollAreaProps,\n 'aria-label': ariaLabel,\n}: OptionsDropdownProps) {\n const ctx = useComboboxContext();\n validateOptions(data);\n\n const shouldFilter = typeof search === 'string';\n const filteredData = shouldFilter\n ? (filter || defaultOptionsFilter)({\n options: data,\n search: filterOptions ? search : '',\n limit: limit ?? Infinity,\n })\n : data;\n const isEmpty = isEmptyComboboxData(filteredData);\n\n const options = filteredData.map((item, index) => (\n <Option\n data={item}\n key={\n isOptionsGroup(item)\n ? `group-${typeof item.group === 'string' ? item.group : index}`\n : `${item.value}`\n }\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n value={value}\n checkIconPosition={checkIconPosition}\n unstyled={unstyled}\n renderOption={renderOption}\n />\n ));\n\n return (\n <Combobox.Dropdown hidden={hidden || (hiddenWhenEmpty && isEmpty)} data-composed>\n <Combobox.Options labelledBy={labelId} aria-label={ariaLabel}>\n {withScrollArea ? (\n <ScrollArea.Autosize\n mah={\n (floatingHeight ?? ctx.floatingHeight) === 'viewport'\n ? 'var(--combobox-floating-options-max-height)'\n : (maxDropdownHeight ?? 220)\n }\n type=\"scroll\"\n scrollbarSize=\"var(--combobox-padding)\"\n offsetScrollbars=\"y\"\n {...scrollAreaProps}\n >\n {options}\n </ScrollArea.Autosize>\n ) : (\n options\n )}\n {isEmpty && nothingFoundMessage && <Combobox.Empty>{nothingFoundMessage}</Combobox.Empty>}\n </Combobox.Options>\n </Combobox.Dropdown>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkCA,SAAS,eAAe,OAAmD,aAAwB;CACjG,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS,WAAW,IAAI,UAAU;AACxE;AAEA,SAAS,OAAO,EACd,MACA,eACA,mBACA,OACA,mBACA,UACA,gBACc;CACd,IAAI,CAAC,eAAe,IAAI,GAAG;EACzB,MAAM,UAAU,eAAe,OAAO,KAAK,KAAK;EAChD,MAAM,QACJ,kBACC,UACC,oBAAC,WAAD,EAAW,WAAWA,wBAAQ,yBAA2B,CAAA,IACvD,oBACF,oBAAC,OAAD,EAAK,WAAWA,wBAAQ,gCAAkC,CAAA,IACxD;EAEN,MAAM,iBACJ,qBAAA,UAAA,EAAA,UAAA;GACG,sBAAsB,UAAU;GACjC,oBAAC,QAAD,EAAA,UAAO,KAAK,MAAY,CAAA;GACvB,sBAAsB,WAAW;EAClC,EAAA,CAAA;EAGJ,OACE,oBAAC,SAAS,QAAV;GACE,OAAO,KAAK;GACZ,UAAU,KAAK;GACf,WAAW,GAAG,GAAGA,wBAAQ,wBAAwB,CAAC,SAAS,CAAC;GAC5D,gBAAc,sBAAsB,WAAW,KAAA;GAC/C,gBAAc,WAAW,KAAA;GACzB,iBAAe;GACf,QAAQ;GAEP,UAAA,OAAO,iBAAiB,aACrB,aAAa;IAAE,QAAQ;IAAM;GAAQ,CAAC,IACtC;EACW,CAAA;CAErB;CAEA,MAAM,UAAU,KAAK,MAAM,KAAK,SAC9B,oBAAC,QAAD;EACE,MAAM;EACC;EAEG;EACK;EACI;EACA;EACL;CACf,GANM,GAAG,KAAK,OAMd,CACF;CAED,OAAO,oBAAC,SAAS,OAAV;EAAgB,OAAO,KAAK;EAAQ,UAAA;CAAwB,CAAA;AACrE;AA0BA,SAAgB,gBAAgB,EAC9B,MACA,QACA,iBACA,QACA,QACA,OACA,mBACA,gBACA,iBAAiB,MACjB,gBAAgB,MAChB,gBAAgB,OAChB,oBAAoB,OACpB,OACA,mBACA,qBACA,UACA,SACA,cACA,iBACA,cAAc,aACS;CACvB,MAAM,MAAM,mBAAmB;CAC/B,gBAAgB,IAAI;CAGpB,MAAM,eADe,OAAO,WAAW,YAElC,UAAU,qBAAA,CAAsB;EAC/B,SAAS;EACT,QAAQ,gBAAgB,SAAS;EACjC,OAAO,SAAS;CAClB,CAAC,IACD;CACJ,MAAM,UAAU,oBAAoB,YAAY;CAEhD,MAAM,UAAU,aAAa,KAAK,MAAM,UACtC,oBAAC,QAAD;EACE,MAAM;EAMS;EACI;EACZ;EACY;EACT;EACI;CACf,GAVG,eAAe,IAAI,IACf,SAAS,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,UACvD,GAAG,KAAK,OAQf,CACF;CAED,OACE,oBAAC,SAAS,UAAV;EAAmB,QAAQ,UAAW,mBAAmB;EAAU,iBAAA;EACjE,UAAA,qBAAC,SAAS,SAAV;GAAkB,YAAY;GAAS,cAAY;GAAnD,UAAA,CACG,iBACC,oBAAC,WAAW,UAAZ;IACE,MACG,kBAAkB,IAAI,oBAAoB,aACvC,gDACC,qBAAqB;IAE5B,MAAK;IACL,eAAc;IACd,kBAAiB;IACjB,GAAI;IAEH,UAAA;GACkB,CAAA,IAErB,SAED,WAAW,uBAAuB,oBAAC,SAAS,OAAV,EAAA,UAAiB,oBAAoC,CAAA,CACxE;;CACD,CAAA;AAEvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-options-filter.mjs","names":[],"sources":["../../../../src/components/Combobox/OptionsDropdown/default-options-filter.ts"],"sourcesContent":["import { Primitive } from '../../../core';\nimport { ComboboxItem, ComboboxParsedItem } from '../Combobox.types';\nimport { isOptionsGroup } from './is-options-group';\n\nexport interface FilterOptionsInput<Value extends Primitive = Primitive> {\n options: ComboboxParsedItem<Value>[];\n search: string;\n limit: number;\n}\n\nexport function defaultOptionsFilter({\n options,\n search,\n limit,\n}: FilterOptionsInput): ComboboxParsedItem<Primitive>[] {\n const parsedSearch = search.trim().toLowerCase();\n const result: ComboboxParsedItem<Primitive>[] = [];\n\n for (let i = 0; i < options.length; i += 1) {\n const item = options[i];\n\n if (result.length === limit) {\n return result;\n }\n\n if (isOptionsGroup(item)) {\n result.push({\n group: item.group,\n items: defaultOptionsFilter({\n options: item.items,\n search,\n limit: limit - result.length,\n }) as ComboboxItem[],\n });\n }\n\n if (!isOptionsGroup(item)) {\n if (item.label.toLowerCase().includes(parsedSearch)) {\n result.push(item);\n }\n }\n }\n\n return result;\n}\n"],"mappings":";;;AAUA,SAAgB,qBAAqB,EACnC,SACA,QACA,SACsD;CACtD,MAAM,eAAe,OAAO,KAAK,CAAC,CAAC,YAAY;CAC/C,MAAM,SAA0C,CAAC;CAEjD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,GAAG;EAC1C,MAAM,OAAO,QAAQ;EAErB,IAAI,OAAO,WAAW,OACpB,OAAO;EAGT,IAAI,eAAe,IAAI,GACrB,OAAO,KAAK;GACV,OAAO,KAAK;GACZ,OAAO,qBAAqB;IAC1B,SAAS,KAAK;IACd;IACA,OAAO,QAAQ,OAAO;GACxB,CAAC;EACH,CAAC;EAGH,IAAI,CAAC,eAAe,IAAI;
|
|
1
|
+
{"version":3,"file":"default-options-filter.mjs","names":[],"sources":["../../../../src/components/Combobox/OptionsDropdown/default-options-filter.ts"],"sourcesContent":["import { Primitive } from '../../../core';\nimport { ComboboxItem, ComboboxParsedItem } from '../Combobox.types';\nimport { isOptionsGroup } from './is-options-group';\n\nexport interface FilterOptionsInput<Value extends Primitive = Primitive> {\n options: ComboboxParsedItem<Value>[];\n search: string;\n limit: number;\n}\n\nexport function defaultOptionsFilter({\n options,\n search,\n limit,\n}: FilterOptionsInput): ComboboxParsedItem<Primitive>[] {\n const parsedSearch = search.trim().toLowerCase();\n const result: ComboboxParsedItem<Primitive>[] = [];\n\n for (let i = 0; i < options.length; i += 1) {\n const item = options[i];\n\n if (result.length === limit) {\n return result;\n }\n\n if (isOptionsGroup(item)) {\n result.push({\n group: item.group,\n items: defaultOptionsFilter({\n options: item.items,\n search,\n limit: limit - result.length,\n }) as ComboboxItem[],\n });\n }\n\n if (!isOptionsGroup(item)) {\n if (item.label.toLowerCase().includes(parsedSearch)) {\n result.push(item);\n }\n }\n }\n\n return result;\n}\n"],"mappings":";;;AAUA,SAAgB,qBAAqB,EACnC,SACA,QACA,SACsD;CACtD,MAAM,eAAe,OAAO,KAAK,CAAC,CAAC,YAAY;CAC/C,MAAM,SAA0C,CAAC;CAEjD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK,GAAG;EAC1C,MAAM,OAAO,QAAQ;EAErB,IAAI,OAAO,WAAW,OACpB,OAAO;EAGT,IAAI,eAAe,IAAI,GACrB,OAAO,KAAK;GACV,OAAO,KAAK;GACZ,OAAO,qBAAqB;IAC1B,SAAS,KAAK;IACd;IACA,OAAO,QAAQ,OAAO;GACxB,CAAC;EACH,CAAC;EAGH,IAAI,CAAC,eAAe,IAAI,GAClB;OAAA,KAAK,MAAM,YAAY,CAAC,CAAC,SAAS,YAAY,GAChD,OAAO,KAAK,IAAI;EAAA;CAGtB;CAEA,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-index.mjs","names":[],"sources":["../../../../../src/components/Combobox/use-combobox/get-index/get-index.ts"],"sourcesContent":["export function getPreviousIndex(\n currentIndex: number,\n elements: NodeListOf<HTMLDivElement> | HTMLDivElement[],\n loop: boolean\n) {\n for (let i = currentIndex - 1; i >= 0; i -= 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = elements.length - 1; i > -1; i -= 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getNextIndex(\n currentIndex: number,\n elements: NodeListOf<HTMLDivElement> | HTMLDivElement[],\n loop: boolean\n) {\n for (let i = currentIndex + 1; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = 0; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getFirstIndex(elements: NodeListOf<HTMLDivElement> | HTMLDivElement[]) {\n for (let i = 0; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n return -1;\n}\n"],"mappings":";;AAAA,SAAgB,iBACd,cACA,UACA,MACA;CACA,KAAK,IAAI,IAAI,eAAe,GAAG,KAAK,GAAG,KAAK,GAC1C,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAIX,IAAI;
|
|
1
|
+
{"version":3,"file":"get-index.mjs","names":[],"sources":["../../../../../src/components/Combobox/use-combobox/get-index/get-index.ts"],"sourcesContent":["export function getPreviousIndex(\n currentIndex: number,\n elements: NodeListOf<HTMLDivElement> | HTMLDivElement[],\n loop: boolean\n) {\n for (let i = currentIndex - 1; i >= 0; i -= 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = elements.length - 1; i > -1; i -= 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getNextIndex(\n currentIndex: number,\n elements: NodeListOf<HTMLDivElement> | HTMLDivElement[],\n loop: boolean\n) {\n for (let i = currentIndex + 1; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = 0; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getFirstIndex(elements: NodeListOf<HTMLDivElement> | HTMLDivElement[]) {\n for (let i = 0; i < elements.length; i += 1) {\n if (!elements[i].hasAttribute('data-combobox-disabled')) {\n return i;\n }\n }\n\n return -1;\n}\n"],"mappings":";;AAAA,SAAgB,iBACd,cACA,UACA,MACA;CACA,KAAK,IAAI,IAAI,eAAe,GAAG,KAAK,GAAG,KAAK,GAC1C,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAIX,IAAI,MACG;OAAA,IAAI,IAAI,SAAS,SAAS,GAAG,IAAI,IAAI,KAAK,GAC7C,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAAA;CAKb,OAAO;AACT;AAEA,SAAgB,aACd,cACA,UACA,MACA;CACA,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,SAAS,QAAQ,KAAK,GACvD,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAIX,IAAI,MACG;OAAA,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK,GACxC,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAAA;CAKb,OAAO;AACT;AAEA,SAAgB,cAAc,UAAyD;CACrF,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,QAAQ,KAAK,GACxC,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,wBAAwB,GACpD,OAAO;CAIX,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-virtualized-index.mjs","names":[],"sources":["../../../../../src/components/Combobox/use-combobox/get-index/get-virtualized-index.ts"],"sourcesContent":["interface GetIndexProps {\n currentIndex: number;\n isOptionDisabled: (index: number) => boolean;\n totalOptionsCount: number;\n loop: boolean;\n}\n\nexport function getPreviousIndex({\n currentIndex,\n isOptionDisabled,\n totalOptionsCount,\n loop,\n}: GetIndexProps) {\n for (let i = currentIndex - 1; i >= 0; i -= 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = totalOptionsCount - 1; i > -1; i -= 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getNextIndex({\n currentIndex,\n isOptionDisabled,\n totalOptionsCount,\n loop,\n}: GetIndexProps) {\n for (let i = currentIndex + 1; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = 0; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\ninterface GetFirstIndexOptions {\n totalOptionsCount: number;\n isOptionDisabled: (index: number) => boolean;\n}\n\nexport function getFirstIndex({ totalOptionsCount, isOptionDisabled }: GetFirstIndexOptions) {\n for (let i = 0; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n return -1;\n}\n"],"mappings":";;AAOA,SAAgB,iBAAiB,EAC/B,cACA,kBACA,mBACA,QACgB;CAChB,KAAK,IAAI,IAAI,eAAe,GAAG,KAAK,GAAG,KAAK,GAC1C,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAIX,IAAI;
|
|
1
|
+
{"version":3,"file":"get-virtualized-index.mjs","names":[],"sources":["../../../../../src/components/Combobox/use-combobox/get-index/get-virtualized-index.ts"],"sourcesContent":["interface GetIndexProps {\n currentIndex: number;\n isOptionDisabled: (index: number) => boolean;\n totalOptionsCount: number;\n loop: boolean;\n}\n\nexport function getPreviousIndex({\n currentIndex,\n isOptionDisabled,\n totalOptionsCount,\n loop,\n}: GetIndexProps) {\n for (let i = currentIndex - 1; i >= 0; i -= 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = totalOptionsCount - 1; i > -1; i -= 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\nexport function getNextIndex({\n currentIndex,\n isOptionDisabled,\n totalOptionsCount,\n loop,\n}: GetIndexProps) {\n for (let i = currentIndex + 1; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n if (loop) {\n for (let i = 0; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n }\n\n return currentIndex;\n}\n\ninterface GetFirstIndexOptions {\n totalOptionsCount: number;\n isOptionDisabled: (index: number) => boolean;\n}\n\nexport function getFirstIndex({ totalOptionsCount, isOptionDisabled }: GetFirstIndexOptions) {\n for (let i = 0; i < totalOptionsCount; i += 1) {\n if (!isOptionDisabled(i)) {\n return i;\n }\n }\n\n return -1;\n}\n"],"mappings":";;AAOA,SAAgB,iBAAiB,EAC/B,cACA,kBACA,mBACA,QACgB;CAChB,KAAK,IAAI,IAAI,eAAe,GAAG,KAAK,GAAG,KAAK,GAC1C,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAIX,IAAI,MACG;OAAA,IAAI,IAAI,oBAAoB,GAAG,IAAI,IAAI,KAAK,GAC/C,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAAA;CAKb,OAAO;AACT;AAEA,SAAgB,aAAa,EAC3B,cACA,kBACA,mBACA,QACgB;CAChB,KAAK,IAAI,IAAI,eAAe,GAAG,IAAI,mBAAmB,KAAK,GACzD,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAIX,IAAI,MACG;OAAA,IAAI,IAAI,GAAG,IAAI,mBAAmB,KAAK,GAC1C,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAAA;CAKb,OAAO;AACT;AAOA,SAAgB,cAAc,EAAE,mBAAmB,oBAA0C;CAC3F,KAAK,IAAI,IAAI,GAAG,IAAI,mBAAmB,KAAK,GAC1C,IAAI,CAAC,iBAAiB,CAAC,GACrB,OAAO;CAIX,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-combobox-target-props.mjs","names":[],"sources":["../../../../src/components/Combobox/use-combobox-target-props/use-combobox-target-props.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useComboboxContext } from '../Combobox.context';\n\ninterface UseComboboxTargetPropsInput {\n targetType: 'input' | 'button' | undefined;\n withAriaAttributes: boolean | undefined;\n withKeyboardNavigation: boolean | undefined;\n withExpandedAttribute: boolean | undefined;\n onKeyDown: React.KeyboardEventHandler<HTMLInputElement> | undefined;\n onClick: React.MouseEventHandler<HTMLInputElement> | undefined;\n autoComplete: string | undefined;\n}\n\nexport function useComboboxTargetProps({\n onKeyDown,\n onClick,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n}: UseComboboxTargetPropsInput) {\n const ctx = useComboboxContext();\n const [selectedOptionId, setSelectedOptionId] = useState<string | null>(null);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n\n if (ctx.readOnly) {\n return;\n }\n\n if (withKeyboardNavigation) {\n // Ignore during composition in IME\n if (event.nativeEvent.isComposing) {\n return;\n }\n\n if (event.nativeEvent.code === 'ArrowDown') {\n event.preventDefault();\n\n if (!ctx.store.dropdownOpened) {\n ctx.store.openDropdown('keyboard');\n setSelectedOptionId(ctx.store.selectActiveOption());\n ctx.store.updateSelectedOptionIndex('selected', { scrollIntoView: true });\n } else {\n setSelectedOptionId(ctx.store.selectNextOption());\n }\n }\n\n if (event.nativeEvent.code === 'ArrowUp') {\n event.preventDefault();\n\n if (!ctx.store.dropdownOpened) {\n ctx.store.openDropdown('keyboard');\n setSelectedOptionId(ctx.store.selectActiveOption());\n ctx.store.updateSelectedOptionIndex('selected', { scrollIntoView: true });\n } else {\n setSelectedOptionId(ctx.store.selectPreviousOption());\n }\n }\n\n if (event.nativeEvent.code === 'Enter' || event.nativeEvent.code === 'NumpadEnter') {\n // This is a workaround for handling differences in behavior of isComposing property in Safari\n // See: https://dninomiya.github.io/form-guide/stop-enter-submit\n // oxlint-disable-next-line typescript/no-deprecated\n if (event.nativeEvent.keyCode === 229) {\n return;\n }\n\n const selectedOptionIndex = ctx.store.getSelectedOptionIndex();\n\n if (ctx.store.dropdownOpened && selectedOptionIndex !== -1) {\n event.preventDefault();\n ctx.store.clickSelectedOption();\n } else if (targetType === 'button') {\n event.preventDefault();\n ctx.store.openDropdown('keyboard');\n }\n }\n\n if (event.key === 'Escape') {\n ctx.store.closeDropdown('keyboard');\n }\n\n if (event.nativeEvent.code === 'Space') {\n if (targetType === 'button') {\n event.preventDefault();\n ctx.store.toggleDropdown('keyboard');\n }\n }\n }\n };\n\n const ariaAttributes = withAriaAttributes\n ? {\n ...(withExpandedAttribute ? { role: 'combobox' as const } : {}),\n 'aria-haspopup': 'listbox' as const,\n 'aria-expanded': withExpandedAttribute\n ? !!(ctx.store.listId && ctx.store.dropdownOpened)\n : undefined,\n 'aria-controls':\n ctx.store.dropdownOpened && ctx.store.listId ? ctx.store.listId : undefined,\n 'aria-activedescendant': ctx.store.dropdownOpened\n ? selectedOptionId || undefined\n : undefined,\n autoComplete,\n 'data-expanded': ctx.store.dropdownOpened || undefined,\n 'data-mantine-stop-propagation': ctx.store.dropdownOpened || undefined,\n }\n : {};\n\n const handleClick = (event: React.MouseEvent<HTMLInputElement>) => {\n // Safari does not give keyboard focus to non-text-input elements (including\n // readOnly inputs rendered as buttons) on click, which prevents onKeyDown\n // from firing. Explicitly focus the target when targetType is 'button'.\n if (targetType === 'button') {\n event.currentTarget.focus();\n }\n\n onClick?.(event);\n };\n\n return {\n ...ariaAttributes,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n };\n}\n"],"mappings":";;;;AAaA,SAAgB,uBAAuB,EACrC,WACA,SACA,wBACA,oBACA,uBACA,YACA,gBAC8B;CAC9B,MAAM,MAAM,mBAAmB;CAC/B,MAAM,CAAC,kBAAkB,uBAAuB,SAAwB,IAAI;CAE5E,MAAM,iBAAiB,UAAiD;EACtE,YAAY,KAAK;EAEjB,IAAI,IAAI,UACN;EAGF,IAAI,wBAAwB;GAE1B,IAAI,MAAM,YAAY,aACpB;GAGF,IAAI,MAAM,YAAY,SAAS,aAAa;IAC1C,MAAM,eAAe;IAErB,IAAI,CAAC,IAAI,MAAM,gBAAgB;KAC7B,IAAI,MAAM,aAAa,UAAU;KACjC,oBAAoB,IAAI,MAAM,mBAAmB,CAAC;KAClD,IAAI,MAAM,0BAA0B,YAAY,EAAE,gBAAgB,KAAK,CAAC;IAC1E,OACE,oBAAoB,IAAI,MAAM,iBAAiB,CAAC;GAEpD;GAEA,IAAI,MAAM,YAAY,SAAS,WAAW;IACxC,MAAM,eAAe;IAErB,IAAI,CAAC,IAAI,MAAM,gBAAgB;KAC7B,IAAI,MAAM,aAAa,UAAU;KACjC,oBAAoB,IAAI,MAAM,mBAAmB,CAAC;KAClD,IAAI,MAAM,0BAA0B,YAAY,EAAE,gBAAgB,KAAK,CAAC;IAC1E,OACE,oBAAoB,IAAI,MAAM,qBAAqB,CAAC;GAExD;GAEA,IAAI,MAAM,YAAY,SAAS,WAAW,MAAM,YAAY,SAAS,eAAe;IAIlF,IAAI,MAAM,YAAY,YAAY,KAChC;IAGF,MAAM,sBAAsB,IAAI,MAAM,uBAAuB;IAE7D,IAAI,IAAI,MAAM,kBAAkB,wBAAwB,IAAI;KAC1D,MAAM,eAAe;KACrB,IAAI,MAAM,oBAAoB;IAChC,OAAO,IAAI,eAAe,UAAU;KAClC,MAAM,eAAe;KACrB,IAAI,MAAM,aAAa,UAAU;IACnC;GACF;GAEA,IAAI,MAAM,QAAQ,UAChB,IAAI,MAAM,cAAc,UAAU;GAGpC,IAAI,MAAM,YAAY,SAAS;
|
|
1
|
+
{"version":3,"file":"use-combobox-target-props.mjs","names":[],"sources":["../../../../src/components/Combobox/use-combobox-target-props/use-combobox-target-props.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useComboboxContext } from '../Combobox.context';\n\ninterface UseComboboxTargetPropsInput {\n targetType: 'input' | 'button' | undefined;\n withAriaAttributes: boolean | undefined;\n withKeyboardNavigation: boolean | undefined;\n withExpandedAttribute: boolean | undefined;\n onKeyDown: React.KeyboardEventHandler<HTMLInputElement> | undefined;\n onClick: React.MouseEventHandler<HTMLInputElement> | undefined;\n autoComplete: string | undefined;\n}\n\nexport function useComboboxTargetProps({\n onKeyDown,\n onClick,\n withKeyboardNavigation,\n withAriaAttributes,\n withExpandedAttribute,\n targetType,\n autoComplete,\n}: UseComboboxTargetPropsInput) {\n const ctx = useComboboxContext();\n const [selectedOptionId, setSelectedOptionId] = useState<string | null>(null);\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n onKeyDown?.(event);\n\n if (ctx.readOnly) {\n return;\n }\n\n if (withKeyboardNavigation) {\n // Ignore during composition in IME\n if (event.nativeEvent.isComposing) {\n return;\n }\n\n if (event.nativeEvent.code === 'ArrowDown') {\n event.preventDefault();\n\n if (!ctx.store.dropdownOpened) {\n ctx.store.openDropdown('keyboard');\n setSelectedOptionId(ctx.store.selectActiveOption());\n ctx.store.updateSelectedOptionIndex('selected', { scrollIntoView: true });\n } else {\n setSelectedOptionId(ctx.store.selectNextOption());\n }\n }\n\n if (event.nativeEvent.code === 'ArrowUp') {\n event.preventDefault();\n\n if (!ctx.store.dropdownOpened) {\n ctx.store.openDropdown('keyboard');\n setSelectedOptionId(ctx.store.selectActiveOption());\n ctx.store.updateSelectedOptionIndex('selected', { scrollIntoView: true });\n } else {\n setSelectedOptionId(ctx.store.selectPreviousOption());\n }\n }\n\n if (event.nativeEvent.code === 'Enter' || event.nativeEvent.code === 'NumpadEnter') {\n // This is a workaround for handling differences in behavior of isComposing property in Safari\n // See: https://dninomiya.github.io/form-guide/stop-enter-submit\n // oxlint-disable-next-line typescript/no-deprecated\n if (event.nativeEvent.keyCode === 229) {\n return;\n }\n\n const selectedOptionIndex = ctx.store.getSelectedOptionIndex();\n\n if (ctx.store.dropdownOpened && selectedOptionIndex !== -1) {\n event.preventDefault();\n ctx.store.clickSelectedOption();\n } else if (targetType === 'button') {\n event.preventDefault();\n ctx.store.openDropdown('keyboard');\n }\n }\n\n if (event.key === 'Escape') {\n ctx.store.closeDropdown('keyboard');\n }\n\n if (event.nativeEvent.code === 'Space') {\n if (targetType === 'button') {\n event.preventDefault();\n ctx.store.toggleDropdown('keyboard');\n }\n }\n }\n };\n\n const ariaAttributes = withAriaAttributes\n ? {\n ...(withExpandedAttribute ? { role: 'combobox' as const } : {}),\n 'aria-haspopup': 'listbox' as const,\n 'aria-expanded': withExpandedAttribute\n ? !!(ctx.store.listId && ctx.store.dropdownOpened)\n : undefined,\n 'aria-controls':\n ctx.store.dropdownOpened && ctx.store.listId ? ctx.store.listId : undefined,\n 'aria-activedescendant': ctx.store.dropdownOpened\n ? selectedOptionId || undefined\n : undefined,\n autoComplete,\n 'data-expanded': ctx.store.dropdownOpened || undefined,\n 'data-mantine-stop-propagation': ctx.store.dropdownOpened || undefined,\n }\n : {};\n\n const handleClick = (event: React.MouseEvent<HTMLInputElement>) => {\n // Safari does not give keyboard focus to non-text-input elements (including\n // readOnly inputs rendered as buttons) on click, which prevents onKeyDown\n // from firing. Explicitly focus the target when targetType is 'button'.\n if (targetType === 'button') {\n event.currentTarget.focus();\n }\n\n onClick?.(event);\n };\n\n return {\n ...ariaAttributes,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n };\n}\n"],"mappings":";;;;AAaA,SAAgB,uBAAuB,EACrC,WACA,SACA,wBACA,oBACA,uBACA,YACA,gBAC8B;CAC9B,MAAM,MAAM,mBAAmB;CAC/B,MAAM,CAAC,kBAAkB,uBAAuB,SAAwB,IAAI;CAE5E,MAAM,iBAAiB,UAAiD;EACtE,YAAY,KAAK;EAEjB,IAAI,IAAI,UACN;EAGF,IAAI,wBAAwB;GAE1B,IAAI,MAAM,YAAY,aACpB;GAGF,IAAI,MAAM,YAAY,SAAS,aAAa;IAC1C,MAAM,eAAe;IAErB,IAAI,CAAC,IAAI,MAAM,gBAAgB;KAC7B,IAAI,MAAM,aAAa,UAAU;KACjC,oBAAoB,IAAI,MAAM,mBAAmB,CAAC;KAClD,IAAI,MAAM,0BAA0B,YAAY,EAAE,gBAAgB,KAAK,CAAC;IAC1E,OACE,oBAAoB,IAAI,MAAM,iBAAiB,CAAC;GAEpD;GAEA,IAAI,MAAM,YAAY,SAAS,WAAW;IACxC,MAAM,eAAe;IAErB,IAAI,CAAC,IAAI,MAAM,gBAAgB;KAC7B,IAAI,MAAM,aAAa,UAAU;KACjC,oBAAoB,IAAI,MAAM,mBAAmB,CAAC;KAClD,IAAI,MAAM,0BAA0B,YAAY,EAAE,gBAAgB,KAAK,CAAC;IAC1E,OACE,oBAAoB,IAAI,MAAM,qBAAqB,CAAC;GAExD;GAEA,IAAI,MAAM,YAAY,SAAS,WAAW,MAAM,YAAY,SAAS,eAAe;IAIlF,IAAI,MAAM,YAAY,YAAY,KAChC;IAGF,MAAM,sBAAsB,IAAI,MAAM,uBAAuB;IAE7D,IAAI,IAAI,MAAM,kBAAkB,wBAAwB,IAAI;KAC1D,MAAM,eAAe;KACrB,IAAI,MAAM,oBAAoB;IAChC,OAAO,IAAI,eAAe,UAAU;KAClC,MAAM,eAAe;KACrB,IAAI,MAAM,aAAa,UAAU;IACnC;GACF;GAEA,IAAI,MAAM,QAAQ,UAChB,IAAI,MAAM,cAAc,UAAU;GAGpC,IAAI,MAAM,YAAY,SAAS,SACzB;QAAA,eAAe,UAAU;KAC3B,MAAM,eAAe;KACrB,IAAI,MAAM,eAAe,UAAU;IACrC;;EAEJ;CACF;CAEA,MAAM,iBAAiB,qBACnB;EACE,GAAI,wBAAwB,EAAE,MAAM,WAAoB,IAAI,CAAC;EAC7D,iBAAiB;EACjB,iBAAiB,wBACb,CAAC,EAAE,IAAI,MAAM,UAAU,IAAI,MAAM,kBACjC,KAAA;EACJ,iBACE,IAAI,MAAM,kBAAkB,IAAI,MAAM,SAAS,IAAI,MAAM,SAAS,KAAA;EACpE,yBAAyB,IAAI,MAAM,iBAC/B,oBAAoB,KAAA,IACpB,KAAA;EACJ;EACA,iBAAiB,IAAI,MAAM,kBAAkB,KAAA;EAC7C,iCAAiC,IAAI,MAAM,kBAAkB,KAAA;CAC/D,IACA,CAAC;CAEL,MAAM,eAAe,UAA8C;EAIjE,IAAI,eAAe,UACjB,MAAM,cAAc,MAAM;EAG5B,UAAU,KAAK;CACjB;CAEA,OAAO;EACL,GAAG;EACH,WAAW;EACX,SAAS;CACX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxPopover.mjs","names":["comboboxClasses"],"sources":["../../../src/components/ComboboxPopover/ComboboxPopover.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport cx from 'clsx';\nimport { useUncontrolled } from '@mantine/hooks';\nimport {\n Factory,\n genericFactory,\n Primitive,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n} from '../../core';\nimport { CheckIcon } from '../Checkbox';\nimport {\n Combobox,\n ComboboxData,\n ComboboxItem,\n ComboboxLikeRenderOptionInput,\n ComboboxLikeStylesNames,\n ComboboxProps,\n defaultOptionsFilter,\n getOptionsLockup,\n getParsedComboboxData,\n isOptionsGroup,\n OptionsDropdown,\n OptionsFilter,\n useCombobox,\n} from '../Combobox';\nimport { ComboboxParsedItem } from '../Combobox/Combobox.types';\nimport { isEmptyComboboxData } from '../Combobox/OptionsDropdown/is-empty-combobox-data';\nimport { ScrollArea, ScrollAreaProps } from '../ScrollArea';\nimport { ComboboxPopoverValue } from './ComboboxPopover.types';\nimport { ComboboxPopoverTarget } from './ComboboxPopoverTarget';\nimport comboboxClasses from '../Combobox/Combobox.module.css';\n\nfunction isValueChecked(value: Primitive | Primitive[] | undefined | null, optionValue: Primitive) {\n return Array.isArray(value) ? value.includes(optionValue) : value === optionValue;\n}\n\ninterface OptionProps {\n data: ComboboxParsedItem<Primitive>;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n}\n\nfunction Option({\n data,\n withCheckIcon,\n withAlignedLabels,\n value,\n checkIconPosition,\n unstyled,\n renderOption,\n}: OptionProps) {\n if (isOptionsGroup(data)) {\n const options = data.items.map((item) => (\n <Option\n data={item}\n value={value}\n key={`${item.value}`}\n unstyled={unstyled}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n checkIconPosition={checkIconPosition}\n renderOption={renderOption}\n />\n ));\n return <Combobox.Group label={data.group}>{options}</Combobox.Group>;\n }\n\n const checked = isValueChecked(value, data.value);\n const check =\n withCheckIcon &&\n (checked ? (\n <CheckIcon className={comboboxClasses.optionsDropdownCheckIcon} />\n ) : withAlignedLabels ? (\n <div className={comboboxClasses.optionsDropdownCheckPlaceholder} />\n ) : null);\n\n const defaultContent = (\n <>\n {checkIconPosition === 'left' && check}\n <span>{data.label}</span>\n {checkIconPosition === 'right' && check}\n </>\n );\n\n return (\n <Combobox.Option\n value={data.value}\n disabled={data.disabled}\n className={cx({ [comboboxClasses.optionsDropdownOption]: !unstyled })}\n data-reverse={checkIconPosition === 'right' || undefined}\n data-checked={checked || undefined}\n aria-selected={checked}\n active={checked}\n >\n {typeof renderOption === 'function'\n ? renderOption({ option: data, checked })\n : defaultContent}\n </Combobox.Option>\n );\n}\n\ninterface SearchableDropdownProps {\n data: ComboboxParsedItem<Primitive>[];\n filter: OptionsFilter<Primitive> | undefined;\n search: string;\n limit: number | undefined;\n nothingFoundMessage: React.ReactNode | undefined;\n withScrollArea: boolean | undefined;\n maxDropdownHeight: number | string | undefined;\n value: Primitive | Primitive[] | null;\n checkIconPosition: 'left' | 'right' | undefined;\n withCheckIcon: boolean | undefined;\n withAlignedLabels: boolean | undefined;\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n scrollAreaProps: ScrollAreaProps | undefined;\n onSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nfunction SearchableDropdown({\n data,\n filter,\n search,\n limit,\n nothingFoundMessage,\n withScrollArea = true,\n maxDropdownHeight,\n value,\n checkIconPosition,\n withCheckIcon = false,\n withAlignedLabels = false,\n unstyled,\n renderOption,\n scrollAreaProps,\n onSearchChange,\n}: SearchableDropdownProps) {\n const filteredData = (filter || defaultOptionsFilter)({\n options: data,\n search,\n limit: limit ?? Infinity,\n });\n const isEmpty = isEmptyComboboxData(filteredData);\n\n const options = filteredData.map((item, index) => (\n <Option\n data={item}\n key={\n isOptionsGroup(item)\n ? `group-${typeof item.group === 'string' ? item.group : index}`\n : `${item.value}`\n }\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n value={value}\n checkIconPosition={checkIconPosition}\n unstyled={unstyled}\n renderOption={renderOption}\n />\n ));\n\n return (\n <Combobox.Dropdown data-composed>\n <Combobox.Search value={search} onChange={onSearchChange} placeholder=\"Search...\" />\n <Combobox.Options>\n {withScrollArea ? (\n <ScrollArea.Autosize\n mah={maxDropdownHeight ?? 220}\n type=\"scroll\"\n scrollbarSize=\"var(--combobox-padding)\"\n offsetScrollbars=\"y\"\n {...scrollAreaProps}\n >\n {options}\n </ScrollArea.Autosize>\n ) : (\n options\n )}\n {isEmpty && nothingFoundMessage && <Combobox.Empty>{nothingFoundMessage}</Combobox.Empty>}\n </Combobox.Options>\n </Combobox.Dropdown>\n );\n}\n\nexport type ComboboxPopoverStylesNames = ComboboxLikeStylesNames | 'search';\n\nexport interface ComboboxPopoverProps<\n Multiple extends boolean = false,\n Value extends Primitive = string,\n> extends StylesApiProps<ComboboxPopoverFactory> {\n /** If set, multiple items can be selected at the same time */\n multiple?: Multiple;\n\n /** Controlled component value */\n value?: ComboboxPopoverValue<Multiple, Value>;\n\n /** Uncontrolled component default value */\n defaultValue?: ComboboxPopoverValue<Multiple, Value>;\n\n /** Called when value changes */\n onChange?: (value: ComboboxPopoverValue<Multiple, Value>) => void;\n\n /** Data used to generate options */\n data?: ComboboxData<Value>;\n\n /** Controlled dropdown opened state */\n dropdownOpened?: boolean;\n\n /** Uncontrolled dropdown initial opened state */\n defaultDropdownOpened?: boolean;\n\n /** Called when dropdown opens */\n onDropdownOpen?: () => void;\n\n /** Called when dropdown closes */\n onDropdownClose?: () => void;\n\n /** Called when option is submitted from dropdown with mouse click or Enter key */\n onOptionSubmit?: (value: Value) => void;\n\n /** Props passed down to Combobox component */\n comboboxProps?: ComboboxProps;\n\n /** Function based on which items are filtered and sorted */\n filter?: OptionsFilter<Value>;\n\n /** Maximum number of options displayed at a time @default Infinity */\n limit?: number;\n\n /** Determines whether the options should be wrapped with ScrollArea.AutoSize @default true */\n withScrollArea?: boolean;\n\n /** max-height of the dropdown @default 250 */\n maxDropdownHeight?: number | string;\n\n /** If set, the first option is selected when dropdown opens @default false */\n selectFirstOptionOnDropdownOpen?: boolean;\n\n /** Displays check icon near the selected option label @default true */\n withCheckIcon?: boolean;\n\n /** Aligns unchecked labels with the checked one @default false */\n withAlignedLabels?: boolean;\n\n /** Position of the check icon relative to the option label @default 'left' */\n checkIconPosition?: 'left' | 'right';\n\n /** Message displayed when no options match the search query or when there is no data */\n nothingFoundMessage?: React.ReactNode;\n\n /** Allows searching through options @default false */\n searchable?: boolean;\n\n /** Controlled search value */\n searchValue?: string;\n\n /** Default search value */\n defaultSearchValue?: string;\n\n /** Called when search changes */\n onSearchChange?: (value: string) => void;\n\n /** Allows deselecting the selected option by clicking it (only for single mode) @default true */\n allowDeselect?: boolean;\n\n /** A function to render content of the option, replaces the default content of the option */\n renderOption?: (item: ComboboxLikeRenderOptionInput<ComboboxItem>) => React.ReactNode;\n\n /** Props passed down to the underlying ScrollArea component in the dropdown */\n scrollAreaProps?: ScrollAreaProps;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: Omit<React.ComponentProps<'input'>, 'value'>;\n\n /** Hidden input name for form submission */\n name?: string;\n\n /** Hidden input form for form submission */\n form?: string;\n\n /** Content of the component */\n children?: React.ReactNode;\n\n /** Divider used to separate values in the hidden input value attribute @default ',' */\n hiddenInputValuesDivider?: string;\n}\n\nexport type ComboboxPopoverFactory = Factory<{\n props: ComboboxPopoverProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxPopoverStylesNames;\n signature: <Multiple extends boolean = false, Value extends Primitive = string>(\n props: ComboboxPopoverProps<Multiple, Value>\n ) => React.JSX.Element;\n staticComponents: {\n Target: typeof ComboboxPopoverTarget;\n };\n}>;\n\nconst defaultProps = {\n withCheckIcon: true,\n allowDeselect: true,\n checkIconPosition: 'left',\n hiddenInputValuesDivider: ',',\n} satisfies Partial<ComboboxPopoverProps>;\n\nexport const ComboboxPopover = genericFactory<ComboboxPopoverFactory>((_props) => {\n const props = useProps('ComboboxPopover', defaultProps as any, _props);\n const {\n classNames,\n styles,\n unstyled,\n vars,\n children,\n multiple,\n value,\n defaultValue,\n onChange,\n data,\n dropdownOpened,\n defaultDropdownOpened,\n onDropdownOpen,\n onDropdownClose,\n onOptionSubmit,\n comboboxProps,\n filter,\n limit,\n withScrollArea,\n maxDropdownHeight,\n selectFirstOptionOnDropdownOpen,\n withCheckIcon,\n withAlignedLabels,\n checkIconPosition,\n nothingFoundMessage,\n searchable,\n searchValue,\n defaultSearchValue,\n onSearchChange,\n allowDeselect,\n renderOption,\n scrollAreaProps,\n hiddenInputProps,\n name,\n form,\n hiddenInputValuesDivider,\n attributes,\n ...others\n } = props;\n\n const parsedData = useMemo(() => getParsedComboboxData(data), [data]);\n const optionsLockup = useMemo(() => getOptionsLockup(parsedData), [parsedData]);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: multiple ? ([] as any) : null,\n onChange,\n });\n\n const [_searchValue, setSearchValue] = useUncontrolled({\n value: searchValue,\n defaultValue: defaultSearchValue,\n finalValue: '',\n onChange: onSearchChange,\n });\n\n const combobox = useCombobox({\n opened: dropdownOpened,\n defaultOpened: defaultDropdownOpened,\n onDropdownOpen: () => {\n onDropdownOpen?.();\n if (searchable) {\n combobox.focusSearchInput();\n }\n if (selectFirstOptionOnDropdownOpen) {\n combobox.selectFirstOption();\n }\n },\n onDropdownClose: () => {\n onDropdownClose?.();\n combobox.resetSelectedOption();\n if (searchable) {\n combobox.focusTarget();\n }\n },\n });\n\n const handleSearchChange = (val: string) => {\n setSearchValue(val);\n combobox.resetSelectedOption();\n };\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ComboboxPopoverFactory>({\n props,\n styles,\n classNames,\n });\n\n const handleOptionSubmit = (val: string) => {\n onOptionSubmit?.(val as any);\n const option = optionsLockup[val];\n\n if (multiple) {\n const currentValue = Array.isArray(_value) ? _value : [];\n if (currentValue.includes(option.value)) {\n setValue(currentValue.filter((v: any) => v !== option.value) as any);\n } else {\n setValue([...currentValue, option.value] as any);\n }\n combobox.updateSelectedOptionIndex('selected');\n } else {\n const nextValue = allowDeselect && `${option.value}` === `${_value}` ? null : option.value;\n setValue(nextValue as any);\n combobox.closeDropdown();\n }\n\n if (searchable) {\n handleSearchChange('');\n }\n };\n\n return (\n <>\n <Combobox\n store={combobox}\n __staticSelector=\"ComboboxPopover\"\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n attributes={attributes}\n onOptionSubmit={handleOptionSubmit}\n {...comboboxProps}\n {...others}\n >\n {children}\n {searchable ? (\n <SearchableDropdown\n data={parsedData as any}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={_searchValue}\n limit={limit}\n nothingFoundMessage={nothingFoundMessage}\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n value={_value}\n checkIconPosition={checkIconPosition}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n unstyled={unstyled}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n onSearchChange={(event) => {\n handleSearchChange(event.currentTarget.value);\n }}\n />\n ) : (\n <OptionsDropdown\n data={parsedData as any}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={undefined}\n limit={limit}\n hiddenWhenEmpty={!nothingFoundMessage}\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n filterOptions={false}\n value={_value}\n checkIconPosition={checkIconPosition}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n nothingFoundMessage={nothingFoundMessage}\n unstyled={unstyled}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n labelId={undefined}\n aria-label={undefined}\n />\n )}\n </Combobox>\n <Combobox.HiddenInput\n name={name}\n value={_value}\n form={form}\n valuesDivider={hiddenInputValuesDivider}\n {...hiddenInputProps}\n />\n </>\n );\n});\n\nComboboxPopover.classes = Combobox.classes;\nComboboxPopover.displayName = '@mantine/core/ComboboxPopover';\nComboboxPopover.Target = ComboboxPopoverTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCA,SAAS,eAAe,OAAmD,aAAwB;CACjG,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS,WAAW,IAAI,UAAU;AACxE;AAYA,SAAS,OAAO,EACd,MACA,eACA,mBACA,OACA,mBACA,UACA,gBACc;CACd,IAAI,eAAe,IAAI,GAAG;EACxB,MAAM,UAAU,KAAK,MAAM,KAAK,SAC9B,oBAAC,QAAD;GACE,MAAM;GACC;GAEG;GACK;GACI;GACA;GACL;EACf,GANM,GAAG,KAAK,OAMd,CACF;EACD,OAAO,oBAAC,SAAS,OAAV;GAAgB,OAAO,KAAK;aAAQ;EAAwB,CAAA;CACrE;CAEA,MAAM,UAAU,eAAe,OAAO,KAAK,KAAK;CAChD,MAAM,QACJ,kBACC,UACC,oBAAC,WAAD,EAAW,WAAWA,wBAAgB,yBAA2B,CAAA,IAC/D,oBACF,oBAAC,OAAD,EAAK,WAAWA,wBAAgB,gCAAkC,CAAA,IAChE;CAEN,MAAM,iBACJ,qBAAA,YAAA,EAAA,UAAA;EACG,sBAAsB,UAAU;EACjC,oBAAC,QAAD,EAAA,UAAO,KAAK,MAAY,CAAA;EACvB,sBAAsB,WAAW;CAClC,EAAA,CAAA;CAGJ,OACE,oBAAC,SAAS,QAAV;EACE,OAAO,KAAK;EACZ,UAAU,KAAK;EACf,WAAW,GAAG,GAAGA,wBAAgB,wBAAwB,CAAC,SAAS,CAAC;EACpE,gBAAc,sBAAsB,WAAW,KAAA;EAC/C,gBAAc,WAAW,KAAA;EACzB,iBAAe;EACf,QAAQ;YAEP,OAAO,iBAAiB,aACrB,aAAa;GAAE,QAAQ;GAAM;EAAQ,CAAC,IACtC;CACW,CAAA;AAErB;AAoBA,SAAS,mBAAmB,EAC1B,MACA,QACA,QACA,OACA,qBACA,iBAAiB,MACjB,mBACA,OACA,mBACA,gBAAgB,OAChB,oBAAoB,OACpB,UACA,cACA,iBACA,kBAC0B;CAC1B,MAAM,gBAAgB,UAAU,qBAAA,CAAsB;EACpD,SAAS;EACT;EACA,OAAO,SAAS;CAClB,CAAC;CACD,MAAM,UAAU,oBAAoB,YAAY;CAEhD,MAAM,UAAU,aAAa,KAAK,MAAM,UACtC,oBAAC,QAAD;EACE,MAAM;EAMS;EACI;EACZ;EACY;EACT;EACI;CACf,GAVG,eAAe,IAAI,IACf,SAAS,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,UACvD,GAAG,KAAK,OAQf,CACF;CAED,OACE,qBAAC,SAAS,UAAV;EAAmB,iBAAA;YAAnB,CACE,oBAAC,SAAS,QAAV;GAAiB,OAAO;GAAQ,UAAU;GAAgB,aAAY;EAAa,CAAA,GACnF,qBAAC,SAAS,SAAV,EAAA,UAAA,CACG,iBACC,oBAAC,WAAW,UAAZ;GACE,KAAK,qBAAqB;GAC1B,MAAK;GACL,eAAc;GACd,kBAAiB;GACjB,GAAI;aAEH;EACkB,CAAA,IAErB,SAED,WAAW,uBAAuB,oBAAC,SAAS,OAAV,EAAA,UAAiB,oBAAoC,CAAA,CACxE,EAAA,CAAA,CACD;;AAEvB;AAqHA,MAAM,eAAe;CACnB,eAAe;CACf,eAAe;CACf,mBAAmB;CACnB,0BAA0B;AAC5B;AAEA,MAAa,kBAAkB,gBAAwC,WAAW;CAChF,MAAM,QAAQ,SAAS,mBAAmB,cAAqB,MAAM;CACrE,MAAM,EACJ,YACA,QACA,UACA,MACA,UACA,UACA,OACA,cACA,UACA,MACA,gBACA,uBACA,gBACA,iBACA,gBACA,eACA,QACA,OACA,gBACA,mBACA,iCACA,eACA,mBACA,mBACA,qBACA,YACA,aACA,oBACA,gBACA,eACA,cACA,iBACA,kBACA,MACA,MACA,0BACA,YACA,GAAG,WACD;CAEJ,MAAM,aAAa,cAAc,sBAAsB,IAAI,GAAG,CAAC,IAAI,CAAC;CACpE,MAAM,gBAAgB,cAAc,iBAAiB,UAAU,GAAG,CAAC,UAAU,CAAC;CAE9E,MAAM,CAAC,QAAQ,YAAY,gBAAgB;EACzC;EACA;EACA,YAAY,WAAY,CAAC,IAAY;EACrC;CACF,CAAC;CAED,MAAM,CAAC,cAAc,kBAAkB,gBAAgB;EACrD,OAAO;EACP,cAAc;EACd,YAAY;EACZ,UAAU;CACZ,CAAC;CAED,MAAM,WAAW,YAAY;EAC3B,QAAQ;EACR,eAAe;EACf,sBAAsB;GACpB,iBAAiB;GACjB,IAAI,YACF,SAAS,iBAAiB;GAE5B,IAAI,iCACF,SAAS,kBAAkB;EAE/B;EACA,uBAAuB;GACrB,kBAAkB;GAClB,SAAS,oBAAoB;GAC7B,IAAI,YACF,SAAS,YAAY;EAEzB;CACF,CAAC;CAED,MAAM,sBAAsB,QAAgB;EAC1C,eAAe,GAAG;EAClB,SAAS,oBAAoB;CAC/B;CAEA,MAAM,EAAE,oBAAoB,mBAAmB,qBAA6C;EAC1F;EACA;EACA;CACF,CAAC;CAED,MAAM,sBAAsB,QAAgB;EAC1C,iBAAiB,GAAU;EAC3B,MAAM,SAAS,cAAc;EAE7B,IAAI,UAAU;GACZ,MAAM,eAAe,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC;GACvD,IAAI,aAAa,SAAS,OAAO,KAAK,GACpC,SAAS,aAAa,QAAQ,MAAW,MAAM,OAAO,KAAK,CAAQ;QAEnE,SAAS,CAAC,GAAG,cAAc,OAAO,KAAK,CAAQ;GAEjD,SAAS,0BAA0B,UAAU;EAC/C,OAAO;GACL,MAAM,YAAY,iBAAiB,GAAG,OAAO,YAAY,GAAG,WAAW,OAAO,OAAO;GACrF,SAAS,SAAgB;GACzB,SAAS,cAAc;EACzB;EAEA,IAAI,YACF,mBAAmB,EAAE;CAEzB;CAEA,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,UAAD;EACE,OAAO;EACP,kBAAiB;EACjB,YAAY;EACZ,QAAQ;EACE;EACE;EACZ,gBAAgB;EAChB,GAAI;EACJ,GAAI;YATN,CAWG,UACA,aACC,oBAAC,oBAAD;GACE,MAAM;GACE;GACR,QAAQ;GACD;GACc;GACL;GACG;GACnB,OAAO;GACY;GACJ;GACI;GACT;GACI;GACG;GACjB,iBAAiB,UAAU;IACzB,mBAAmB,MAAM,cAAc,KAAK;GAC9C;EACD,CAAA,IAED,oBAAC,iBAAD;GACE,MAAM;GACE;GACR,QAAQ,KAAA;GACD;GACP,iBAAiB,CAAC;GACF;GACG;GACnB,eAAe;GACf,OAAO;GACY;GACJ;GACI;GACE;GACX;GACI;GACG;GACjB,SAAS,KAAA;GACT,cAAY,KAAA;EACb,CAAA,CAEK;KACV,oBAAC,SAAS,aAAV;EACQ;EACN,OAAO;EACD;EACN,eAAe;EACf,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,gBAAgB,UAAU,SAAS;AACnC,gBAAgB,cAAc;AAC9B,gBAAgB,SAAS"}
|
|
1
|
+
{"version":3,"file":"ComboboxPopover.mjs","names":["comboboxClasses"],"sources":["../../../src/components/ComboboxPopover/ComboboxPopover.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport cx from 'clsx';\nimport { useUncontrolled } from '@mantine/hooks';\nimport {\n Factory,\n genericFactory,\n Primitive,\n StylesApiProps,\n useProps,\n useResolvedStylesApi,\n} from '../../core';\nimport { CheckIcon } from '../Checkbox';\nimport {\n Combobox,\n ComboboxData,\n ComboboxItem,\n ComboboxLikeRenderOptionInput,\n ComboboxLikeStylesNames,\n ComboboxProps,\n defaultOptionsFilter,\n getOptionsLockup,\n getParsedComboboxData,\n isOptionsGroup,\n OptionsDropdown,\n OptionsFilter,\n useCombobox,\n} from '../Combobox';\nimport { ComboboxParsedItem } from '../Combobox/Combobox.types';\nimport { isEmptyComboboxData } from '../Combobox/OptionsDropdown/is-empty-combobox-data';\nimport { ScrollArea, ScrollAreaProps } from '../ScrollArea';\nimport { ComboboxPopoverValue } from './ComboboxPopover.types';\nimport { ComboboxPopoverTarget } from './ComboboxPopoverTarget';\nimport comboboxClasses from '../Combobox/Combobox.module.css';\n\nfunction isValueChecked(value: Primitive | Primitive[] | undefined | null, optionValue: Primitive) {\n return Array.isArray(value) ? value.includes(optionValue) : value === optionValue;\n}\n\ninterface OptionProps {\n data: ComboboxParsedItem<Primitive>;\n withCheckIcon?: boolean;\n withAlignedLabels?: boolean;\n value?: Primitive | Primitive[] | null;\n checkIconPosition?: 'left' | 'right';\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n}\n\nfunction Option({\n data,\n withCheckIcon,\n withAlignedLabels,\n value,\n checkIconPosition,\n unstyled,\n renderOption,\n}: OptionProps) {\n if (isOptionsGroup(data)) {\n const options = data.items.map((item) => (\n <Option\n data={item}\n value={value}\n key={`${item.value}`}\n unstyled={unstyled}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n checkIconPosition={checkIconPosition}\n renderOption={renderOption}\n />\n ));\n return <Combobox.Group label={data.group}>{options}</Combobox.Group>;\n }\n\n const checked = isValueChecked(value, data.value);\n const check =\n withCheckIcon &&\n (checked ? (\n <CheckIcon className={comboboxClasses.optionsDropdownCheckIcon} />\n ) : withAlignedLabels ? (\n <div className={comboboxClasses.optionsDropdownCheckPlaceholder} />\n ) : null);\n\n const defaultContent = (\n <>\n {checkIconPosition === 'left' && check}\n <span>{data.label}</span>\n {checkIconPosition === 'right' && check}\n </>\n );\n\n return (\n <Combobox.Option\n value={data.value}\n disabled={data.disabled}\n className={cx({ [comboboxClasses.optionsDropdownOption]: !unstyled })}\n data-reverse={checkIconPosition === 'right' || undefined}\n data-checked={checked || undefined}\n aria-selected={checked}\n active={checked}\n >\n {typeof renderOption === 'function'\n ? renderOption({ option: data, checked })\n : defaultContent}\n </Combobox.Option>\n );\n}\n\ninterface SearchableDropdownProps {\n data: ComboboxParsedItem<Primitive>[];\n filter: OptionsFilter<Primitive> | undefined;\n search: string;\n limit: number | undefined;\n nothingFoundMessage: React.ReactNode | undefined;\n withScrollArea: boolean | undefined;\n maxDropdownHeight: number | string | undefined;\n value: Primitive | Primitive[] | null;\n checkIconPosition: 'left' | 'right' | undefined;\n withCheckIcon: boolean | undefined;\n withAlignedLabels: boolean | undefined;\n unstyled: boolean | undefined;\n renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;\n scrollAreaProps: ScrollAreaProps | undefined;\n onSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nfunction SearchableDropdown({\n data,\n filter,\n search,\n limit,\n nothingFoundMessage,\n withScrollArea = true,\n maxDropdownHeight,\n value,\n checkIconPosition,\n withCheckIcon = false,\n withAlignedLabels = false,\n unstyled,\n renderOption,\n scrollAreaProps,\n onSearchChange,\n}: SearchableDropdownProps) {\n const filteredData = (filter || defaultOptionsFilter)({\n options: data,\n search,\n limit: limit ?? Infinity,\n });\n const isEmpty = isEmptyComboboxData(filteredData);\n\n const options = filteredData.map((item, index) => (\n <Option\n data={item}\n key={\n isOptionsGroup(item)\n ? `group-${typeof item.group === 'string' ? item.group : index}`\n : `${item.value}`\n }\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n value={value}\n checkIconPosition={checkIconPosition}\n unstyled={unstyled}\n renderOption={renderOption}\n />\n ));\n\n return (\n <Combobox.Dropdown data-composed>\n <Combobox.Search value={search} onChange={onSearchChange} placeholder=\"Search...\" />\n <Combobox.Options>\n {withScrollArea ? (\n <ScrollArea.Autosize\n mah={maxDropdownHeight ?? 220}\n type=\"scroll\"\n scrollbarSize=\"var(--combobox-padding)\"\n offsetScrollbars=\"y\"\n {...scrollAreaProps}\n >\n {options}\n </ScrollArea.Autosize>\n ) : (\n options\n )}\n {isEmpty && nothingFoundMessage && <Combobox.Empty>{nothingFoundMessage}</Combobox.Empty>}\n </Combobox.Options>\n </Combobox.Dropdown>\n );\n}\n\nexport type ComboboxPopoverStylesNames = ComboboxLikeStylesNames | 'search';\n\nexport interface ComboboxPopoverProps<\n Multiple extends boolean = false,\n Value extends Primitive = string,\n> extends StylesApiProps<ComboboxPopoverFactory> {\n /** If set, multiple items can be selected at the same time */\n multiple?: Multiple;\n\n /** Controlled component value */\n value?: ComboboxPopoverValue<Multiple, Value>;\n\n /** Uncontrolled component default value */\n defaultValue?: ComboboxPopoverValue<Multiple, Value>;\n\n /** Called when value changes */\n onChange?: (value: ComboboxPopoverValue<Multiple, Value>) => void;\n\n /** Data used to generate options */\n data?: ComboboxData<Value>;\n\n /** Controlled dropdown opened state */\n dropdownOpened?: boolean;\n\n /** Uncontrolled dropdown initial opened state */\n defaultDropdownOpened?: boolean;\n\n /** Called when dropdown opens */\n onDropdownOpen?: () => void;\n\n /** Called when dropdown closes */\n onDropdownClose?: () => void;\n\n /** Called when option is submitted from dropdown with mouse click or Enter key */\n onOptionSubmit?: (value: Value) => void;\n\n /** Props passed down to Combobox component */\n comboboxProps?: ComboboxProps;\n\n /** Function based on which items are filtered and sorted */\n filter?: OptionsFilter<Value>;\n\n /** Maximum number of options displayed at a time @default Infinity */\n limit?: number;\n\n /** Determines whether the options should be wrapped with ScrollArea.AutoSize @default true */\n withScrollArea?: boolean;\n\n /** max-height of the dropdown @default 250 */\n maxDropdownHeight?: number | string;\n\n /** If set, the first option is selected when dropdown opens @default false */\n selectFirstOptionOnDropdownOpen?: boolean;\n\n /** Displays check icon near the selected option label @default true */\n withCheckIcon?: boolean;\n\n /** Aligns unchecked labels with the checked one @default false */\n withAlignedLabels?: boolean;\n\n /** Position of the check icon relative to the option label @default 'left' */\n checkIconPosition?: 'left' | 'right';\n\n /** Message displayed when no options match the search query or when there is no data */\n nothingFoundMessage?: React.ReactNode;\n\n /** Allows searching through options @default false */\n searchable?: boolean;\n\n /** Controlled search value */\n searchValue?: string;\n\n /** Default search value */\n defaultSearchValue?: string;\n\n /** Called when search changes */\n onSearchChange?: (value: string) => void;\n\n /** Allows deselecting the selected option by clicking it (only for single mode) @default true */\n allowDeselect?: boolean;\n\n /** A function to render content of the option, replaces the default content of the option */\n renderOption?: (item: ComboboxLikeRenderOptionInput<ComboboxItem>) => React.ReactNode;\n\n /** Props passed down to the underlying ScrollArea component in the dropdown */\n scrollAreaProps?: ScrollAreaProps;\n\n /** Props passed down to the hidden input */\n hiddenInputProps?: Omit<React.ComponentProps<'input'>, 'value'>;\n\n /** Hidden input name for form submission */\n name?: string;\n\n /** Hidden input form for form submission */\n form?: string;\n\n /** Content of the component */\n children?: React.ReactNode;\n\n /** Divider used to separate values in the hidden input value attribute @default ',' */\n hiddenInputValuesDivider?: string;\n}\n\nexport type ComboboxPopoverFactory = Factory<{\n props: ComboboxPopoverProps;\n ref: HTMLDivElement;\n stylesNames: ComboboxPopoverStylesNames;\n signature: <Multiple extends boolean = false, Value extends Primitive = string>(\n props: ComboboxPopoverProps<Multiple, Value>\n ) => React.JSX.Element;\n staticComponents: {\n Target: typeof ComboboxPopoverTarget;\n };\n}>;\n\nconst defaultProps = {\n withCheckIcon: true,\n allowDeselect: true,\n checkIconPosition: 'left',\n hiddenInputValuesDivider: ',',\n} satisfies Partial<ComboboxPopoverProps>;\n\nexport const ComboboxPopover = genericFactory<ComboboxPopoverFactory>((_props) => {\n const props = useProps('ComboboxPopover', defaultProps as any, _props);\n const {\n classNames,\n styles,\n unstyled,\n vars,\n children,\n multiple,\n value,\n defaultValue,\n onChange,\n data,\n dropdownOpened,\n defaultDropdownOpened,\n onDropdownOpen,\n onDropdownClose,\n onOptionSubmit,\n comboboxProps,\n filter,\n limit,\n withScrollArea,\n maxDropdownHeight,\n selectFirstOptionOnDropdownOpen,\n withCheckIcon,\n withAlignedLabels,\n checkIconPosition,\n nothingFoundMessage,\n searchable,\n searchValue,\n defaultSearchValue,\n onSearchChange,\n allowDeselect,\n renderOption,\n scrollAreaProps,\n hiddenInputProps,\n name,\n form,\n hiddenInputValuesDivider,\n attributes,\n ...others\n } = props;\n\n const parsedData = useMemo(() => getParsedComboboxData(data), [data]);\n const optionsLockup = useMemo(() => getOptionsLockup(parsedData), [parsedData]);\n\n const [_value, setValue] = useUncontrolled({\n value,\n defaultValue,\n finalValue: multiple ? ([] as any) : null,\n onChange,\n });\n\n const [_searchValue, setSearchValue] = useUncontrolled({\n value: searchValue,\n defaultValue: defaultSearchValue,\n finalValue: '',\n onChange: onSearchChange,\n });\n\n const combobox = useCombobox({\n opened: dropdownOpened,\n defaultOpened: defaultDropdownOpened,\n onDropdownOpen: () => {\n onDropdownOpen?.();\n if (searchable) {\n combobox.focusSearchInput();\n }\n if (selectFirstOptionOnDropdownOpen) {\n combobox.selectFirstOption();\n }\n },\n onDropdownClose: () => {\n onDropdownClose?.();\n combobox.resetSelectedOption();\n if (searchable) {\n combobox.focusTarget();\n }\n },\n });\n\n const handleSearchChange = (val: string) => {\n setSearchValue(val);\n combobox.resetSelectedOption();\n };\n\n const { resolvedClassNames, resolvedStyles } = useResolvedStylesApi<ComboboxPopoverFactory>({\n props,\n styles,\n classNames,\n });\n\n const handleOptionSubmit = (val: string) => {\n onOptionSubmit?.(val as any);\n const option = optionsLockup[val];\n\n if (multiple) {\n const currentValue = Array.isArray(_value) ? _value : [];\n if (currentValue.includes(option.value)) {\n setValue(currentValue.filter((v: any) => v !== option.value) as any);\n } else {\n setValue([...currentValue, option.value] as any);\n }\n combobox.updateSelectedOptionIndex('selected');\n } else {\n const nextValue = allowDeselect && `${option.value}` === `${_value}` ? null : option.value;\n setValue(nextValue as any);\n combobox.closeDropdown();\n }\n\n if (searchable) {\n handleSearchChange('');\n }\n };\n\n return (\n <>\n <Combobox\n store={combobox}\n __staticSelector=\"ComboboxPopover\"\n classNames={resolvedClassNames}\n styles={resolvedStyles}\n unstyled={unstyled}\n attributes={attributes}\n onOptionSubmit={handleOptionSubmit}\n {...comboboxProps}\n {...others}\n >\n {children}\n {searchable ? (\n <SearchableDropdown\n data={parsedData as any}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={_searchValue}\n limit={limit}\n nothingFoundMessage={nothingFoundMessage}\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n value={_value}\n checkIconPosition={checkIconPosition}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n unstyled={unstyled}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n onSearchChange={(event) => {\n handleSearchChange(event.currentTarget.value);\n }}\n />\n ) : (\n <OptionsDropdown\n data={parsedData as any}\n filter={filter as OptionsFilter<Primitive> | undefined}\n search={undefined}\n limit={limit}\n hiddenWhenEmpty={!nothingFoundMessage}\n withScrollArea={withScrollArea}\n maxDropdownHeight={maxDropdownHeight}\n filterOptions={false}\n value={_value}\n checkIconPosition={checkIconPosition}\n withCheckIcon={withCheckIcon}\n withAlignedLabels={withAlignedLabels}\n nothingFoundMessage={nothingFoundMessage}\n unstyled={unstyled}\n renderOption={renderOption}\n scrollAreaProps={scrollAreaProps}\n labelId={undefined}\n aria-label={undefined}\n />\n )}\n </Combobox>\n <Combobox.HiddenInput\n name={name}\n value={_value}\n form={form}\n valuesDivider={hiddenInputValuesDivider}\n {...hiddenInputProps}\n />\n </>\n );\n});\n\nComboboxPopover.classes = Combobox.classes;\nComboboxPopover.displayName = '@mantine/core/ComboboxPopover';\nComboboxPopover.Target = ComboboxPopoverTarget;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkCA,SAAS,eAAe,OAAmD,aAAwB;CACjG,OAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS,WAAW,IAAI,UAAU;AACxE;AAYA,SAAS,OAAO,EACd,MACA,eACA,mBACA,OACA,mBACA,UACA,gBACc;CACd,IAAI,eAAe,IAAI,GAAG;EACxB,MAAM,UAAU,KAAK,MAAM,KAAK,SAC9B,oBAAC,QAAD;GACE,MAAM;GACC;GAEG;GACK;GACI;GACA;GACL;EACf,GANM,GAAG,KAAK,OAMd,CACF;EACD,OAAO,oBAAC,SAAS,OAAV;GAAgB,OAAO,KAAK;GAAQ,UAAA;EAAwB,CAAA;CACrE;CAEA,MAAM,UAAU,eAAe,OAAO,KAAK,KAAK;CAChD,MAAM,QACJ,kBACC,UACC,oBAAC,WAAD,EAAW,WAAWA,wBAAgB,yBAA2B,CAAA,IAC/D,oBACF,oBAAC,OAAD,EAAK,WAAWA,wBAAgB,gCAAkC,CAAA,IAChE;CAEN,MAAM,iBACJ,qBAAA,YAAA,EAAA,UAAA;EACG,sBAAsB,UAAU;EACjC,oBAAC,QAAD,EAAA,UAAO,KAAK,MAAY,CAAA;EACvB,sBAAsB,WAAW;CAClC,EAAA,CAAA;CAGJ,OACE,oBAAC,SAAS,QAAV;EACE,OAAO,KAAK;EACZ,UAAU,KAAK;EACf,WAAW,GAAG,GAAGA,wBAAgB,wBAAwB,CAAC,SAAS,CAAC;EACpE,gBAAc,sBAAsB,WAAW,KAAA;EAC/C,gBAAc,WAAW,KAAA;EACzB,iBAAe;EACf,QAAQ;EAEP,UAAA,OAAO,iBAAiB,aACrB,aAAa;GAAE,QAAQ;GAAM;EAAQ,CAAC,IACtC;CACW,CAAA;AAErB;AAoBA,SAAS,mBAAmB,EAC1B,MACA,QACA,QACA,OACA,qBACA,iBAAiB,MACjB,mBACA,OACA,mBACA,gBAAgB,OAChB,oBAAoB,OACpB,UACA,cACA,iBACA,kBAC0B;CAC1B,MAAM,gBAAgB,UAAU,qBAAA,CAAsB;EACpD,SAAS;EACT;EACA,OAAO,SAAS;CAClB,CAAC;CACD,MAAM,UAAU,oBAAoB,YAAY;CAEhD,MAAM,UAAU,aAAa,KAAK,MAAM,UACtC,oBAAC,QAAD;EACE,MAAM;EAMS;EACI;EACZ;EACY;EACT;EACI;CACf,GAVG,eAAe,IAAI,IACf,SAAS,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ,UACvD,GAAG,KAAK,OAQf,CACF;CAED,OACE,qBAAC,SAAS,UAAV;EAAmB,iBAAA;EAAnB,UAAA,CACE,oBAAC,SAAS,QAAV;GAAiB,OAAO;GAAQ,UAAU;GAAgB,aAAY;EAAa,CAAA,GACnF,qBAAC,SAAS,SAAV,EAAA,UAAA,CACG,iBACC,oBAAC,WAAW,UAAZ;GACE,KAAK,qBAAqB;GAC1B,MAAK;GACL,eAAc;GACd,kBAAiB;GACjB,GAAI;GAEH,UAAA;EACkB,CAAA,IAErB,SAED,WAAW,uBAAuB,oBAAC,SAAS,OAAV,EAAA,UAAiB,oBAAoC,CAAA,CACxE,EAAA,CAAA,CACD;;AAEvB;AAqHA,MAAM,eAAe;CACnB,eAAe;CACf,eAAe;CACf,mBAAmB;CACnB,0BAA0B;AAC5B;AAEA,MAAa,kBAAkB,gBAAwC,WAAW;CAChF,MAAM,QAAQ,SAAS,mBAAmB,cAAqB,MAAM;CACrE,MAAM,EACJ,YACA,QACA,UACA,MACA,UACA,UACA,OACA,cACA,UACA,MACA,gBACA,uBACA,gBACA,iBACA,gBACA,eACA,QACA,OACA,gBACA,mBACA,iCACA,eACA,mBACA,mBACA,qBACA,YACA,aACA,oBACA,gBACA,eACA,cACA,iBACA,kBACA,MACA,MACA,0BACA,YACA,GAAG,WACD;CAEJ,MAAM,aAAa,cAAc,sBAAsB,IAAI,GAAG,CAAC,IAAI,CAAC;CACpE,MAAM,gBAAgB,cAAc,iBAAiB,UAAU,GAAG,CAAC,UAAU,CAAC;CAE9E,MAAM,CAAC,QAAQ,YAAY,gBAAgB;EACzC;EACA;EACA,YAAY,WAAY,CAAC,IAAY;EACrC;CACF,CAAC;CAED,MAAM,CAAC,cAAc,kBAAkB,gBAAgB;EACrD,OAAO;EACP,cAAc;EACd,YAAY;EACZ,UAAU;CACZ,CAAC;CAED,MAAM,WAAW,YAAY;EAC3B,QAAQ;EACR,eAAe;EACf,sBAAsB;GACpB,iBAAiB;GACjB,IAAI,YACF,SAAS,iBAAiB;GAE5B,IAAI,iCACF,SAAS,kBAAkB;EAE/B;EACA,uBAAuB;GACrB,kBAAkB;GAClB,SAAS,oBAAoB;GAC7B,IAAI,YACF,SAAS,YAAY;EAEzB;CACF,CAAC;CAED,MAAM,sBAAsB,QAAgB;EAC1C,eAAe,GAAG;EAClB,SAAS,oBAAoB;CAC/B;CAEA,MAAM,EAAE,oBAAoB,mBAAmB,qBAA6C;EAC1F;EACA;EACA;CACF,CAAC;CAED,MAAM,sBAAsB,QAAgB;EAC1C,iBAAiB,GAAU;EAC3B,MAAM,SAAS,cAAc;EAE7B,IAAI,UAAU;GACZ,MAAM,eAAe,MAAM,QAAQ,MAAM,IAAI,SAAS,CAAC;GACvD,IAAI,aAAa,SAAS,OAAO,KAAK,GACpC,SAAS,aAAa,QAAQ,MAAW,MAAM,OAAO,KAAK,CAAQ;QAEnE,SAAS,CAAC,GAAG,cAAc,OAAO,KAAK,CAAQ;GAEjD,SAAS,0BAA0B,UAAU;EAC/C,OAAO;GACL,MAAM,YAAY,iBAAiB,GAAG,OAAO,YAAY,GAAG,WAAW,OAAO,OAAO;GACrF,SAAS,SAAgB;GACzB,SAAS,cAAc;EACzB;EAEA,IAAI,YACF,mBAAmB,EAAE;CAEzB;CAEA,OACE,qBAAA,YAAA,EAAA,UAAA,CACE,qBAAC,UAAD;EACE,OAAO;EACP,kBAAiB;EACjB,YAAY;EACZ,QAAQ;EACE;EACE;EACZ,gBAAgB;EAChB,GAAI;EACJ,GAAI;EATN,UAAA,CAWG,UACA,aACC,oBAAC,oBAAD;GACE,MAAM;GACE;GACR,QAAQ;GACD;GACc;GACL;GACG;GACnB,OAAO;GACY;GACJ;GACI;GACT;GACI;GACG;GACjB,iBAAiB,UAAU;IACzB,mBAAmB,MAAM,cAAc,KAAK;GAC9C;EACD,CAAA,IAED,oBAAC,iBAAD;GACE,MAAM;GACE;GACR,QAAQ,KAAA;GACD;GACP,iBAAiB,CAAC;GACF;GACG;GACnB,eAAe;GACf,OAAO;GACY;GACJ;GACI;GACE;GACX;GACI;GACG;GACjB,SAAS,KAAA;GACT,cAAY,KAAA;EACb,CAAA,CAEK;CACV,CAAA,GAAA,oBAAC,SAAS,aAAV;EACQ;EACN,OAAO;EACD;EACN,eAAe;EACf,GAAI;CACL,CAAA,CACD,EAAA,CAAA;AAEN,CAAC;AAED,gBAAgB,UAAU,SAAS;AACnC,gBAAgB,cAAc;AAC9B,gBAAgB,SAAS"}
|
|
@@ -17,19 +17,20 @@ const ComboboxPopoverTarget = factory((props) => {
|
|
|
17
17
|
if (!child) throw new Error("ComboboxPopover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");
|
|
18
18
|
const ctx = useComboboxContext();
|
|
19
19
|
const targetRef = useMergedRef(ref, ctx.store.targetRef, getRefProp(child));
|
|
20
|
+
const targetProps = useComboboxTargetProps({
|
|
21
|
+
targetType: "button",
|
|
22
|
+
withAriaAttributes: true,
|
|
23
|
+
withKeyboardNavigation: true,
|
|
24
|
+
withExpandedAttribute: true,
|
|
25
|
+
onKeyDown: child.props.onKeyDown,
|
|
26
|
+
onClick: (event) => {
|
|
27
|
+
ctx.store.toggleDropdown();
|
|
28
|
+
child.props.onClick?.(event);
|
|
29
|
+
},
|
|
30
|
+
autoComplete: "off"
|
|
31
|
+
});
|
|
20
32
|
const clonedElement = cloneElement(child, {
|
|
21
|
-
...
|
|
22
|
-
targetType: "button",
|
|
23
|
-
withAriaAttributes: true,
|
|
24
|
-
withKeyboardNavigation: true,
|
|
25
|
-
withExpandedAttribute: true,
|
|
26
|
-
onKeyDown: child.props.onKeyDown,
|
|
27
|
-
onClick: (event) => {
|
|
28
|
-
ctx.store.toggleDropdown();
|
|
29
|
-
child.props.onClick?.(event);
|
|
30
|
-
},
|
|
31
|
-
autoComplete: "off"
|
|
32
|
-
}),
|
|
33
|
+
...targetProps,
|
|
33
34
|
...others,
|
|
34
35
|
[refProp]: targetRef
|
|
35
36
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxPopoverTarget.mjs","names":[],"sources":["../../../src/components/ComboboxPopover/ComboboxPopoverTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getRefProp, getSingleElementChild, useProps } from '../../core';\nimport { useComboboxContext } from '../Combobox/Combobox.context';\nimport { useComboboxTargetProps } from '../Combobox/use-combobox-target-props/use-combobox-target-props';\nimport { Popover } from '../Popover';\n\nexport interface ComboboxPopoverTargetProps {\n children: React.ReactNode;\n\n /** Key of the prop that is used to access element ref @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<ComboboxPopoverTargetProps>;\n\nexport type ComboboxPopoverTargetFactory = Factory<{\n props: ComboboxPopoverTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxPopoverTarget = factory<ComboboxPopoverTargetFactory>((props) => {\n const { children, refProp, ref, ...others } = useProps(\n 'ComboboxPopoverTarget',\n defaultProps,\n props\n );\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'ComboboxPopover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n const targetRef = useMergedRef(ref, ctx.store.targetRef, getRefProp(child));\n\n const targetProps = useComboboxTargetProps({\n targetType: 'button',\n withAriaAttributes: true,\n withKeyboardNavigation: true,\n withExpandedAttribute: true,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (event) => {\n ctx.store.toggleDropdown();\n (child.props as any).onClick?.(event);\n },\n autoComplete: 'off',\n });\n\n const clonedElement = cloneElement(child, {\n ...targetProps,\n ...others,\n [refProp!]: targetRef,\n } as any);\n\n return <Popover.Target refProp={refProp}>{clonedElement}</Popover.Target>;\n});\n\nComboboxPopoverTarget.displayName = '@mantine/core/ComboboxPopoverTarget';\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAe,EACnB,SAAS,MACX;AAQA,MAAa,wBAAwB,SAAuC,UAAU;CACpF,MAAM,EAAE,UAAU,SAAS,KAAK,GAAG,WAAW,SAC5C,yBACA,cACA,KACF;CAEA,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,0KACF;CAGF,MAAM,MAAM,mBAAmB;CAC/B,MAAM,YAAY,aAAa,KAAK,IAAI,MAAM,WAAW,WAAW,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxPopoverTarget.mjs","names":[],"sources":["../../../src/components/ComboboxPopover/ComboboxPopoverTarget.tsx"],"sourcesContent":["import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport { factory, Factory, getRefProp, getSingleElementChild, useProps } from '../../core';\nimport { useComboboxContext } from '../Combobox/Combobox.context';\nimport { useComboboxTargetProps } from '../Combobox/use-combobox-target-props/use-combobox-target-props';\nimport { Popover } from '../Popover';\n\nexport interface ComboboxPopoverTargetProps {\n children: React.ReactNode;\n\n /** Key of the prop that is used to access element ref @default 'ref' */\n refProp?: string;\n}\n\nconst defaultProps = {\n refProp: 'ref',\n} satisfies Partial<ComboboxPopoverTargetProps>;\n\nexport type ComboboxPopoverTargetFactory = Factory<{\n props: ComboboxPopoverTargetProps;\n ref: HTMLElement;\n compound: true;\n}>;\n\nexport const ComboboxPopoverTarget = factory<ComboboxPopoverTargetFactory>((props) => {\n const { children, refProp, ref, ...others } = useProps(\n 'ComboboxPopoverTarget',\n defaultProps,\n props\n );\n\n const child = getSingleElementChild(children);\n if (!child) {\n throw new Error(\n 'ComboboxPopover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported'\n );\n }\n\n const ctx = useComboboxContext();\n const targetRef = useMergedRef(ref, ctx.store.targetRef, getRefProp(child));\n\n const targetProps = useComboboxTargetProps({\n targetType: 'button',\n withAriaAttributes: true,\n withKeyboardNavigation: true,\n withExpandedAttribute: true,\n onKeyDown: (child.props as any).onKeyDown,\n onClick: (event) => {\n ctx.store.toggleDropdown();\n (child.props as any).onClick?.(event);\n },\n autoComplete: 'off',\n });\n\n const clonedElement = cloneElement(child, {\n ...targetProps,\n ...others,\n [refProp!]: targetRef,\n } as any);\n\n return <Popover.Target refProp={refProp}>{clonedElement}</Popover.Target>;\n});\n\nComboboxPopoverTarget.displayName = '@mantine/core/ComboboxPopoverTarget';\n"],"mappings":";;;;;;;;;;;;AAcA,MAAM,eAAe,EACnB,SAAS,MACX;AAQA,MAAa,wBAAwB,SAAuC,UAAU;CACpF,MAAM,EAAE,UAAU,SAAS,KAAK,GAAG,WAAW,SAC5C,yBACA,cACA,KACF;CAEA,MAAM,QAAQ,sBAAsB,QAAQ;CAC5C,IAAI,CAAC,OACH,MAAM,IAAI,MACR,0KACF;CAGF,MAAM,MAAM,mBAAmB;CAC/B,MAAM,YAAY,aAAa,KAAK,IAAI,MAAM,WAAW,WAAW,KAAK,CAAC;CAE1E,MAAM,cAAc,uBAAuB;EACzC,YAAY;EACZ,oBAAoB;EACpB,wBAAwB;EACxB,uBAAuB;EACvB,WAAY,MAAM,MAAc;EAChC,UAAU,UAAU;GAClB,IAAI,MAAM,eAAe;GACzB,MAAO,MAAc,UAAU,KAAK;EACtC;EACA,cAAc;CAChB,CAAC;CAED,MAAM,gBAAgB,aAAa,OAAO;EACxC,GAAG;EACH,GAAG;GACF,UAAW;CACd,CAAQ;CAER,OAAO,oBAAC,QAAQ,QAAT;EAAyB;EAAU,UAAA;CAA8B,CAAA;AAC1E,CAAC;AAED,sBAAsB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataList.mjs","names":["classes"],"sources":["../../../src/components/DataList/DataList.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getFontSize,\n getLineHeight,\n getSpacing,\n MantineSize,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { DataListProvider } from './DataList.context';\nimport { DataListItem, DataListItemStylesNames } from './DataListItem/DataListItem';\nimport {\n DataListItemLabel,\n DataListItemLabelStylesNames,\n} from './DataListItemLabel/DataListItemLabel';\nimport {\n DataListItemValue,\n DataListItemValueStylesNames,\n} from './DataListItemValue/DataListItemValue';\nimport classes from './DataList.module.css';\n\nexport type DataListStylesNames =\n | 'root'\n | DataListItemStylesNames\n | DataListItemLabelStylesNames\n | DataListItemValueStylesNames;\n\nexport type DataListCssVariables = {\n root: '--data-list-fz' | '--data-list-lh' | '--data-list-gap' | '--data-list-label-width';\n};\n\nexport interface DataListProps\n extends BoxProps, StylesApiProps<DataListFactory>, ElementProps<'dl'> {\n /** DataList.Item components */\n children?: React.ReactNode;\n\n /** Controls `font-size` and `line-height` @default 'sm' */\n size?: MantineSize;\n\n /** Key of `theme.spacing` or any valid CSS value to set gap between items @default 'sm' */\n gap?: MantineSpacing;\n\n /** Controls arrangement of label and value within each item. `horizontal` renders label and value side by side, `vertical` stacks label on top of value @default 'horizontal' */\n orientation?: 'horizontal' | 'vertical';\n\n /** Adds border between items @default false */\n withDivider?: boolean;\n\n /** Controls min-width of the label (dt) element, any valid CSS value @default '120px' */\n labelWidth?: React.CSSProperties['minWidth'];\n}\n\nexport type DataListFactory = Factory<{\n props: DataListProps;\n ref: HTMLDListElement;\n stylesNames: DataListStylesNames;\n vars: DataListCssVariables;\n staticComponents: {\n Item: typeof DataListItem;\n ItemLabel: typeof DataListItemLabel;\n ItemValue: typeof DataListItemValue;\n };\n}>;\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DataListProps>;\n\nconst varsResolver = createVarsResolver<DataListFactory>((_, { size, gap, labelWidth }) => ({\n root: {\n '--data-list-fz': getFontSize(size),\n '--data-list-lh': getLineHeight(size),\n '--data-list-gap': getSpacing(gap),\n '--data-list-label-width':\n labelWidth !== undefined\n ? typeof labelWidth === 'number'\n ? `${labelWidth}px`\n : labelWidth\n : undefined,\n },\n}));\n\nexport const DataList = factory<DataListFactory>((_props) => {\n const props = useProps('DataList', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n gap,\n orientation,\n withDivider,\n labelWidth,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DataListFactory>({\n name: 'DataList',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <DataListProvider value={{ getStyles }}>\n <Box<any>\n {...getStyles('root')}\n component=\"dl\"\n mod={[{ orientation, 'with-divider': withDivider }, mod]}\n {...others}\n >\n {children}\n </Box>\n </DataListProvider>\n );\n});\n\nDataList.classes = classes;\nDataList.varsResolver = varsResolver;\nDataList.displayName = '@mantine/core/DataList';\nDataList.Item = DataListItem;\nDataList.ItemLabel = DataListItemLabel;\nDataList.ItemValue = DataListItemValue;\n"],"mappings":";;;;;;;;;;;;;;AAuEA,MAAM,eAAe,EACnB,aAAa,aACf;AAEA,MAAM,eAAe,oBAAqC,GAAG,EAAE,MAAM,KAAK,kBAAkB,EAC1F,MAAM;CACJ,kBAAkB,YAAY,IAAI;CAClC,kBAAkB,cAAc,IAAI;CACpC,mBAAmB,WAAW,GAAG;CACjC,2BACE,eAAe,KAAA,IACX,OAAO,eAAe,WACpB,GAAG,WAAW,MACd,aACF,KAAA;AACR,EACF,EAAE;AAEF,MAAa,WAAW,SAA0B,WAAW;CAC3D,MAAM,QAAQ,SAAS,YAAY,cAAc,MAAM;CACvD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,KACA,aACA,aACA,YACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA2B;EAC3C,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,kBAAD;EAAkB,OAAO,EAAE,UAAU;
|
|
1
|
+
{"version":3,"file":"DataList.mjs","names":["classes"],"sources":["../../../src/components/DataList/DataList.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getFontSize,\n getLineHeight,\n getSpacing,\n MantineSize,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { DataListProvider } from './DataList.context';\nimport { DataListItem, DataListItemStylesNames } from './DataListItem/DataListItem';\nimport {\n DataListItemLabel,\n DataListItemLabelStylesNames,\n} from './DataListItemLabel/DataListItemLabel';\nimport {\n DataListItemValue,\n DataListItemValueStylesNames,\n} from './DataListItemValue/DataListItemValue';\nimport classes from './DataList.module.css';\n\nexport type DataListStylesNames =\n | 'root'\n | DataListItemStylesNames\n | DataListItemLabelStylesNames\n | DataListItemValueStylesNames;\n\nexport type DataListCssVariables = {\n root: '--data-list-fz' | '--data-list-lh' | '--data-list-gap' | '--data-list-label-width';\n};\n\nexport interface DataListProps\n extends BoxProps, StylesApiProps<DataListFactory>, ElementProps<'dl'> {\n /** DataList.Item components */\n children?: React.ReactNode;\n\n /** Controls `font-size` and `line-height` @default 'sm' */\n size?: MantineSize;\n\n /** Key of `theme.spacing` or any valid CSS value to set gap between items @default 'sm' */\n gap?: MantineSpacing;\n\n /** Controls arrangement of label and value within each item. `horizontal` renders label and value side by side, `vertical` stacks label on top of value @default 'horizontal' */\n orientation?: 'horizontal' | 'vertical';\n\n /** Adds border between items @default false */\n withDivider?: boolean;\n\n /** Controls min-width of the label (dt) element, any valid CSS value @default '120px' */\n labelWidth?: React.CSSProperties['minWidth'];\n}\n\nexport type DataListFactory = Factory<{\n props: DataListProps;\n ref: HTMLDListElement;\n stylesNames: DataListStylesNames;\n vars: DataListCssVariables;\n staticComponents: {\n Item: typeof DataListItem;\n ItemLabel: typeof DataListItemLabel;\n ItemValue: typeof DataListItemValue;\n };\n}>;\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DataListProps>;\n\nconst varsResolver = createVarsResolver<DataListFactory>((_, { size, gap, labelWidth }) => ({\n root: {\n '--data-list-fz': getFontSize(size),\n '--data-list-lh': getLineHeight(size),\n '--data-list-gap': getSpacing(gap),\n '--data-list-label-width':\n labelWidth !== undefined\n ? typeof labelWidth === 'number'\n ? `${labelWidth}px`\n : labelWidth\n : undefined,\n },\n}));\n\nexport const DataList = factory<DataListFactory>((_props) => {\n const props = useProps('DataList', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n children,\n gap,\n orientation,\n withDivider,\n labelWidth,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DataListFactory>({\n name: 'DataList',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <DataListProvider value={{ getStyles }}>\n <Box<any>\n {...getStyles('root')}\n component=\"dl\"\n mod={[{ orientation, 'with-divider': withDivider }, mod]}\n {...others}\n >\n {children}\n </Box>\n </DataListProvider>\n );\n});\n\nDataList.classes = classes;\nDataList.varsResolver = varsResolver;\nDataList.displayName = '@mantine/core/DataList';\nDataList.Item = DataListItem;\nDataList.ItemLabel = DataListItemLabel;\nDataList.ItemValue = DataListItemValue;\n"],"mappings":";;;;;;;;;;;;;;AAuEA,MAAM,eAAe,EACnB,aAAa,aACf;AAEA,MAAM,eAAe,oBAAqC,GAAG,EAAE,MAAM,KAAK,kBAAkB,EAC1F,MAAM;CACJ,kBAAkB,YAAY,IAAI;CAClC,kBAAkB,cAAc,IAAI;CACpC,mBAAmB,WAAW,GAAG;CACjC,2BACE,eAAe,KAAA,IACX,OAAO,eAAe,WACpB,GAAG,WAAW,MACd,aACF,KAAA;AACR,EACF,EAAE;AAEF,MAAa,WAAW,SAA0B,WAAW;CAC3D,MAAM,QAAQ,SAAS,YAAY,cAAc,MAAM;CACvD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,UACA,KACA,aACA,aACA,YACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA2B;EAC3C,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,kBAAD;EAAkB,OAAO,EAAE,UAAU;EACnC,UAAA,oBAAC,KAAD;GACE,GAAI,UAAU,MAAM;GACpB,WAAU;GACV,KAAK,CAAC;IAAE;IAAa,gBAAgB;GAAY,GAAG,GAAG;GACvD,GAAI;GAEH;EACE,CAAA;CACW,CAAA;AAEtB,CAAC;AAED,SAAS,UAAUA;AACnB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,OAAO;AAChB,SAAS,YAAY;AACrB,SAAS,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.mjs","names":["classes"],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import {\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSize,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Affix, AffixBaseProps } from '../Affix';\nimport { CloseButton } from '../CloseButton';\nimport { Paper, PaperBaseProps } from '../Paper';\nimport { Transition, TransitionOverride } from '../Transition';\nimport classes from './Dialog.module.css';\n\nexport type DialogStylesNames = 'root' | 'closeButton';\nexport type DialogCssVariables = {\n root: '--dialog-size';\n};\n\nexport interface DialogProps\n extends\n BoxProps,\n AffixBaseProps,\n PaperBaseProps,\n StylesApiProps<DialogFactory>,\n ElementProps<'div'> {\n /** If set, the component uses `display: none` to hide the root element instead of removing the DOM node @default false */\n keepMounted?: boolean;\n\n /** If set, displays the close button @default false */\n withCloseButton?: boolean;\n\n /** Called on close button click */\n onClose?: () => void;\n\n /** Dialog content */\n children?: React.ReactNode;\n\n /** Opened state */\n opened: boolean;\n\n /** Props passed down to the underlying `Transition` component @default { transition: 'pop-top-right', duration: 200 } */\n transitionProps?: TransitionOverride;\n\n /** Controls `width` of the dialog @default 'md' */\n size?: MantineSize | (string & {}) | number;\n}\n\nexport type DialogFactory = Factory<{\n props: DialogProps;\n ref: HTMLDivElement;\n stylesNames: DialogStylesNames;\n vars: DialogCssVariables;\n}>;\n\nconst defaultProps = {\n shadow: 'md',\n p: 'md',\n withBorder: true,\n transitionProps: { transition: 'pop-top-right', duration: 200 },\n position: {\n bottom: 30,\n right: 30,\n },\n} satisfies Partial<DialogProps>;\n\nconst varsResolver = createVarsResolver<DialogFactory>((_, { size }) => ({\n root: {\n '--dialog-size': getSize(size, 'dialog-size'),\n },\n}));\n\nexport const Dialog = factory<DialogFactory>((_props) => {\n const props = useProps('Dialog', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n zIndex,\n position,\n keepMounted,\n opened,\n transitionProps,\n withCloseButton,\n withinPortal,\n children,\n onClose,\n portalProps,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DialogFactory>({\n name: 'Dialog',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Affix\n zIndex={zIndex}\n position={position}\n withinPortal={withinPortal}\n portalProps={portalProps}\n unstyled={unstyled}\n >\n <Transition keepMounted={keepMounted} mounted={opened} {...transitionProps}>\n {(transitionStyles) => (\n <Paper\n unstyled={unstyled}\n {...getStyles('root', { style: transitionStyles })}\n {...others}\n >\n {withCloseButton && (\n <CloseButton onClick={onClose} unstyled={unstyled} {...getStyles('closeButton')} />\n )}\n {children}\n </Paper>\n )}\n </Transition>\n </Affix>\n );\n});\n\nDialog.classes = classes;\nDialog.varsResolver = varsResolver;\nDialog.displayName = '@mantine/core/Dialog';\n\nexport namespace Dialog {\n export type Props = DialogProps;\n export type StylesNames = DialogStylesNames;\n export type CssVariables = DialogCssVariables;\n export type Factory = DialogFactory;\n}\n"],"mappings":";;;;;;;;;;;;;AA2DA,MAAM,eAAe;CACnB,QAAQ;CACR,GAAG;CACH,YAAY;CACZ,iBAAiB;EAAE,YAAY;EAAiB,UAAU;CAAI;CAC9D,UAAU;EACR,QAAQ;EACR,OAAO;CACT;AACF;AAEA,MAAM,eAAe,oBAAmC,GAAG,EAAE,YAAY,EACvE,MAAM,EACJ,iBAAiB,QAAQ,MAAM,aAAa,EAC9C,EACF,EAAE;AAEF,MAAa,SAAS,SAAwB,WAAW;CACvD,MAAM,QAAQ,SAAS,UAAU,cAAc,MAAM;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,QACA,UACA,aACA,QACA,iBACA,iBACA,cACA,UACA,SACA,aACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAyB;EACzC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,OAAD;EACU;EACE;EACI;EACD;EACH;
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","names":["classes"],"sources":["../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import {\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSize,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { Affix, AffixBaseProps } from '../Affix';\nimport { CloseButton } from '../CloseButton';\nimport { Paper, PaperBaseProps } from '../Paper';\nimport { Transition, TransitionOverride } from '../Transition';\nimport classes from './Dialog.module.css';\n\nexport type DialogStylesNames = 'root' | 'closeButton';\nexport type DialogCssVariables = {\n root: '--dialog-size';\n};\n\nexport interface DialogProps\n extends\n BoxProps,\n AffixBaseProps,\n PaperBaseProps,\n StylesApiProps<DialogFactory>,\n ElementProps<'div'> {\n /** If set, the component uses `display: none` to hide the root element instead of removing the DOM node @default false */\n keepMounted?: boolean;\n\n /** If set, displays the close button @default false */\n withCloseButton?: boolean;\n\n /** Called on close button click */\n onClose?: () => void;\n\n /** Dialog content */\n children?: React.ReactNode;\n\n /** Opened state */\n opened: boolean;\n\n /** Props passed down to the underlying `Transition` component @default { transition: 'pop-top-right', duration: 200 } */\n transitionProps?: TransitionOverride;\n\n /** Controls `width` of the dialog @default 'md' */\n size?: MantineSize | (string & {}) | number;\n}\n\nexport type DialogFactory = Factory<{\n props: DialogProps;\n ref: HTMLDivElement;\n stylesNames: DialogStylesNames;\n vars: DialogCssVariables;\n}>;\n\nconst defaultProps = {\n shadow: 'md',\n p: 'md',\n withBorder: true,\n transitionProps: { transition: 'pop-top-right', duration: 200 },\n position: {\n bottom: 30,\n right: 30,\n },\n} satisfies Partial<DialogProps>;\n\nconst varsResolver = createVarsResolver<DialogFactory>((_, { size }) => ({\n root: {\n '--dialog-size': getSize(size, 'dialog-size'),\n },\n}));\n\nexport const Dialog = factory<DialogFactory>((_props) => {\n const props = useProps('Dialog', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n zIndex,\n position,\n keepMounted,\n opened,\n transitionProps,\n withCloseButton,\n withinPortal,\n children,\n onClose,\n portalProps,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DialogFactory>({\n name: 'Dialog',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Affix\n zIndex={zIndex}\n position={position}\n withinPortal={withinPortal}\n portalProps={portalProps}\n unstyled={unstyled}\n >\n <Transition keepMounted={keepMounted} mounted={opened} {...transitionProps}>\n {(transitionStyles) => (\n <Paper\n unstyled={unstyled}\n {...getStyles('root', { style: transitionStyles })}\n {...others}\n >\n {withCloseButton && (\n <CloseButton onClick={onClose} unstyled={unstyled} {...getStyles('closeButton')} />\n )}\n {children}\n </Paper>\n )}\n </Transition>\n </Affix>\n );\n});\n\nDialog.classes = classes;\nDialog.varsResolver = varsResolver;\nDialog.displayName = '@mantine/core/Dialog';\n\nexport namespace Dialog {\n export type Props = DialogProps;\n export type StylesNames = DialogStylesNames;\n export type CssVariables = DialogCssVariables;\n export type Factory = DialogFactory;\n}\n"],"mappings":";;;;;;;;;;;;;AA2DA,MAAM,eAAe;CACnB,QAAQ;CACR,GAAG;CACH,YAAY;CACZ,iBAAiB;EAAE,YAAY;EAAiB,UAAU;CAAI;CAC9D,UAAU;EACR,QAAQ;EACR,OAAO;CACT;AACF;AAEA,MAAM,eAAe,oBAAmC,GAAG,EAAE,YAAY,EACvE,MAAM,EACJ,iBAAiB,QAAQ,MAAM,aAAa,EAC9C,EACF,EAAE;AAEF,MAAa,SAAS,SAAwB,WAAW;CACvD,MAAM,QAAQ,SAAS,UAAU,cAAc,MAAM;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,QACA,UACA,aACA,QACA,iBACA,iBACA,cACA,UACA,SACA,aACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAyB;EACzC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,OAAD;EACU;EACE;EACI;EACD;EACH;EAEV,UAAA,oBAAC,YAAD;GAAyB;GAAa,SAAS;GAAQ,GAAI;GACvD,WAAA,qBACA,qBAAC,OAAD;IACY;IACV,GAAI,UAAU,QAAQ,EAAE,OAAO,iBAAiB,CAAC;IACjD,GAAI;IAHN,UAAA,CAKG,mBACC,oBAAC,aAAD;KAAa,SAAS;KAAmB;KAAU,GAAI,UAAU,aAAa;IAAI,CAAA,GAEnF,QACI;;EAEC,CAAA;CACP,CAAA;AAEX,CAAC;AAED,OAAO,UAAUA;AACjB,OAAO,eAAe;AACtB,OAAO,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.mjs","names":["classes"],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSize,\n getThemeColor,\n MantineColor,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Divider.module.css';\n\nexport type DividerStylesNames = 'root' | 'label';\nexport type DividerVariant = 'solid' | 'dashed' | 'dotted';\nexport type DividerCssVariables = {\n root: '--divider-color' | '--divider-border-style' | '--divider-size';\n};\n\nexport interface DividerProps\n extends BoxProps, StylesApiProps<DividerFactory>, ElementProps<'div'> {\n /** Key of `theme.colors` or any valid CSS color value */\n color?: MantineColor;\n\n /** Controls width/height (depends on orientation) @default 'xs' */\n size?: MantineSize | number | (string & {});\n\n /** Divider label, visible only with `orientation=\"horizontal\"` */\n label?: React.ReactNode;\n\n /** Label position @default 'center' */\n labelPosition?: 'left' | 'center' | 'right';\n\n /** Divider orientation @default 'horizontal' */\n orientation?: 'horizontal' | 'vertical';\n}\n\nexport type DividerFactory = Factory<{\n props: DividerProps;\n ref: HTMLDivElement;\n stylesNames: DividerStylesNames;\n vars: DividerCssVariables;\n variant: DividerVariant;\n}>;\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DividerProps>;\n\nconst varsResolver = createVarsResolver<DividerFactory>((theme, { color, variant, size }) => ({\n root: {\n '--divider-color': color ? getThemeColor(color, theme) : undefined,\n '--divider-border-style': variant,\n '--divider-size': getSize(size, 'divider-size'),\n },\n}));\n\nexport const Divider = factory<DividerFactory>((_props) => {\n const props = useProps('Divider', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n color,\n orientation,\n label,\n labelPosition,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DividerFactory>({\n name: 'Divider',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box\n mod={[{ orientation, withLabel: !!label }, mod]}\n role=\"separator\"\n {...getStyles('root')}\n {...others}\n >\n {label && (\n <Box component=\"span\" mod={{ position: labelPosition }} {...getStyles('label')}>\n {label}\n </Box>\n )}\n </Box>\n );\n});\n\nDivider.classes = classes;\nDivider.varsResolver = varsResolver;\nDivider.displayName = '@mantine/core/Divider';\n\nexport namespace Divider {\n export type Props = DividerProps;\n export type StylesNames = DividerStylesNames;\n export type CssVariables = DividerCssVariables;\n export type Factory = DividerFactory;\n export type Variant = DividerVariant;\n}\n"],"mappings":";;;;;;;;;;;AAiDA,MAAM,eAAe,EACnB,aAAa,aACf;AAEA,MAAM,eAAe,oBAAoC,OAAO,EAAE,OAAO,SAAS,YAAY,EAC5F,MAAM;CACJ,mBAAmB,QAAQ,cAAc,OAAO,KAAK,IAAI,KAAA;CACzD,0BAA0B;CAC1B,kBAAkB,QAAQ,MAAM,cAAc;AAChD,EACF,EAAE;AAEF,MAAa,UAAU,SAAyB,WAAW;CACzD,MAAM,QAAQ,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,OACA,aACA,OACA,eACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA0B;EAC1C,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,KAAD;EACE,KAAK,CAAC;GAAE;GAAa,WAAW,CAAC,CAAC;EAAM,GAAG,GAAG;EAC9C,MAAK;EACL,GAAI,UAAU,MAAM;EACpB,GAAI;
|
|
1
|
+
{"version":3,"file":"Divider.mjs","names":["classes"],"sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSize,\n getThemeColor,\n MantineColor,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Divider.module.css';\n\nexport type DividerStylesNames = 'root' | 'label';\nexport type DividerVariant = 'solid' | 'dashed' | 'dotted';\nexport type DividerCssVariables = {\n root: '--divider-color' | '--divider-border-style' | '--divider-size';\n};\n\nexport interface DividerProps\n extends BoxProps, StylesApiProps<DividerFactory>, ElementProps<'div'> {\n /** Key of `theme.colors` or any valid CSS color value */\n color?: MantineColor;\n\n /** Controls width/height (depends on orientation) @default 'xs' */\n size?: MantineSize | number | (string & {});\n\n /** Divider label, visible only with `orientation=\"horizontal\"` */\n label?: React.ReactNode;\n\n /** Label position @default 'center' */\n labelPosition?: 'left' | 'center' | 'right';\n\n /** Divider orientation @default 'horizontal' */\n orientation?: 'horizontal' | 'vertical';\n}\n\nexport type DividerFactory = Factory<{\n props: DividerProps;\n ref: HTMLDivElement;\n stylesNames: DividerStylesNames;\n vars: DividerCssVariables;\n variant: DividerVariant;\n}>;\n\nconst defaultProps = {\n orientation: 'horizontal',\n} satisfies Partial<DividerProps>;\n\nconst varsResolver = createVarsResolver<DividerFactory>((theme, { color, variant, size }) => ({\n root: {\n '--divider-color': color ? getThemeColor(color, theme) : undefined,\n '--divider-border-style': variant,\n '--divider-size': getSize(size, 'divider-size'),\n },\n}));\n\nexport const Divider = factory<DividerFactory>((_props) => {\n const props = useProps('Divider', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n color,\n orientation,\n label,\n labelPosition,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<DividerFactory>({\n name: 'Divider',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n return (\n <Box\n mod={[{ orientation, withLabel: !!label }, mod]}\n role=\"separator\"\n {...getStyles('root')}\n {...others}\n >\n {label && (\n <Box component=\"span\" mod={{ position: labelPosition }} {...getStyles('label')}>\n {label}\n </Box>\n )}\n </Box>\n );\n});\n\nDivider.classes = classes;\nDivider.varsResolver = varsResolver;\nDivider.displayName = '@mantine/core/Divider';\n\nexport namespace Divider {\n export type Props = DividerProps;\n export type StylesNames = DividerStylesNames;\n export type CssVariables = DividerCssVariables;\n export type Factory = DividerFactory;\n export type Variant = DividerVariant;\n}\n"],"mappings":";;;;;;;;;;;AAiDA,MAAM,eAAe,EACnB,aAAa,aACf;AAEA,MAAM,eAAe,oBAAoC,OAAO,EAAE,OAAO,SAAS,YAAY,EAC5F,MAAM;CACJ,mBAAmB,QAAQ,cAAc,OAAO,KAAK,IAAI,KAAA;CACzD,0BAA0B;CAC1B,kBAAkB,QAAQ,MAAM,cAAc;AAChD,EACF,EAAE;AAEF,MAAa,UAAU,SAAyB,WAAW;CACzD,MAAM,QAAQ,SAAS,WAAW,cAAc,MAAM;CACtD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,OACA,aACA,OACA,eACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAA0B;EAC1C,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC;CAED,OACE,oBAAC,KAAD;EACE,KAAK,CAAC;GAAE;GAAa,WAAW,CAAC,CAAC;EAAM,GAAG,GAAG;EAC9C,MAAK;EACL,GAAI,UAAU,MAAM;EACpB,GAAI;EAEH,UAAA,SACC,oBAAC,KAAD;GAAK,WAAU;GAAO,KAAK,EAAE,UAAU,cAAc;GAAG,GAAI,UAAU,OAAO;GAC1E,UAAA;EACE,CAAA;CAEJ,CAAA;AAET,CAAC;AAED,QAAQ,UAAUA;AAClB,QAAQ,eAAe;AACvB,QAAQ,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.mjs","names":["classes"],"sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { use, useEffect } from 'react';\nimport { factory, Factory, getDefaultZIndex, useProps } from '../../core';\nimport { ModalBaseCloseButtonProps, ModalBaseOverlayProps } from '../ModalBase';\nimport { DrawerBody } from './DrawerBody';\nimport { DrawerCloseButton } from './DrawerCloseButton';\nimport { DrawerContent } from './DrawerContent';\nimport { DrawerHeader } from './DrawerHeader';\nimport { DrawerOverlay } from './DrawerOverlay';\nimport {\n DrawerRoot,\n DrawerRootCssVariables,\n DrawerRootProps,\n DrawerRootStylesNames,\n} from './DrawerRoot';\nimport { DrawerStack, DrawerStackContext } from './DrawerStack';\nimport { DrawerTitle } from './DrawerTitle';\nimport classes from './Drawer.module.css';\n\nexport type DrawerStylesNames = DrawerRootStylesNames;\nexport type DrawerCssVariables = DrawerRootCssVariables;\n\nexport interface DrawerProps extends DrawerRootProps {\n /** Drawer title */\n title?: React.ReactNode;\n\n /** If set, the overlay is displayed @default true */\n withOverlay?: boolean;\n\n /** Props passed down to the `Overlay` component, can be used to configure opacity, `background-color`, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Drawer content */\n children?: React.ReactNode;\n\n /** If set, the close button is displayed @default true */\n withCloseButton?: boolean;\n\n /** Props passed down to the close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n\n /** Id of the drawer in the `Drawer.Stack` */\n stackId?: string;\n}\n\nexport type DrawerFactory = Factory<{\n props: DrawerProps;\n ref: HTMLDivElement;\n stylesNames: DrawerStylesNames;\n vars: DrawerCssVariables;\n staticComponents: {\n Root: typeof DrawerRoot;\n Overlay: typeof DrawerOverlay;\n Content: typeof DrawerContent;\n Body: typeof DrawerBody;\n Header: typeof DrawerHeader;\n Title: typeof DrawerTitle;\n CloseButton: typeof DrawerCloseButton;\n Stack: typeof DrawerStack;\n };\n}>;\n\nconst defaultProps = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n withOverlay: true,\n withCloseButton: true,\n} satisfies Partial<DrawerProps>;\n\nexport const Drawer = factory<DrawerFactory>((_props) => {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n opened,\n stackId,\n zIndex,\n ...others\n } = useProps('Drawer', defaultProps, _props);\n\n const ctx = use(DrawerStackContext);\n const hasHeader = !!title || withCloseButton;\n const stackProps =\n ctx && stackId\n ? {\n closeOnEscape: ctx.currentId === stackId,\n trapFocus: ctx.currentId === stackId,\n zIndex: ctx.getZIndex(stackId),\n }\n : {};\n\n const overlayVisible =\n withOverlay === false ? false : stackId && ctx ? ctx.currentId === stackId : opened;\n\n useEffect(() => {\n if (ctx && stackId) {\n opened\n ? ctx.addModal(stackId, zIndex || getDefaultZIndex('modal'))\n : ctx.removeModal(stackId);\n }\n }, [opened, stackId, zIndex]);\n\n return (\n <DrawerRoot\n opened={opened}\n zIndex={ctx && stackId ? ctx.getZIndex(stackId) : zIndex}\n {...others}\n {...stackProps}\n >\n {withOverlay && (\n <DrawerOverlay\n visible={overlayVisible}\n transitionProps={ctx && stackId ? { duration: 0 } : undefined}\n {...overlayProps}\n />\n )}\n <DrawerContent __hidden={ctx && stackId && opened ? stackId !== ctx.currentId : false}>\n {hasHeader && (\n <DrawerHeader>\n {title && <DrawerTitle>{title}</DrawerTitle>}\n {withCloseButton && <DrawerCloseButton {...closeButtonProps} />}\n </DrawerHeader>\n )}\n\n <DrawerBody>{children}</DrawerBody>\n </DrawerContent>\n </DrawerRoot>\n );\n});\n\nDrawer.classes = classes;\nDrawer.displayName = '@mantine/core/Drawer';\nDrawer.Root = DrawerRoot;\nDrawer.Overlay = DrawerOverlay;\nDrawer.Content = DrawerContent;\nDrawer.Body = DrawerBody;\nDrawer.Header = DrawerHeader;\nDrawer.Title = DrawerTitle;\nDrawer.CloseButton = DrawerCloseButton;\nDrawer.Stack = DrawerStack;\n"],"mappings":";;;;;;;;;;;;;;;;AA6DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQ,iBAAiB,OAAO;CAChC,aAAa;CACb,iBAAiB;AACnB;AAEA,MAAa,SAAS,SAAwB,WAAW;CACvD,MAAM,EACJ,OACA,aACA,cACA,iBACA,kBACA,UACA,QACA,SACA,QACA,GAAG,WACD,SAAS,UAAU,cAAc,MAAM;CAE3C,MAAM,MAAM,IAAI,kBAAkB;CAClC,MAAM,YAAY,CAAC,CAAC,SAAS;CAC7B,MAAM,aACJ,OAAO,UACH;EACE,eAAe,IAAI,cAAc;EACjC,WAAW,IAAI,cAAc;EAC7B,QAAQ,IAAI,UAAU,OAAO;CAC/B,IACA,CAAC;CAEP,MAAM,iBACJ,gBAAgB,QAAQ,QAAQ,WAAW,MAAM,IAAI,cAAc,UAAU;CAE/E,gBAAgB;EACd,IAAI,OAAO,SACT,SACI,IAAI,SAAS,SAAS,UAAU,iBAAiB,OAAO,CAAC,IACzD,IAAI,YAAY,OAAO;CAE/B,GAAG;EAAC;EAAQ;EAAS;CAAM,CAAC;CAE5B,OACE,qBAAC,YAAD;EACU;EACR,QAAQ,OAAO,UAAU,IAAI,UAAU,OAAO,IAAI;EAClD,GAAI;EACJ,GAAI;
|
|
1
|
+
{"version":3,"file":"Drawer.mjs","names":["classes"],"sources":["../../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import { use, useEffect } from 'react';\nimport { factory, Factory, getDefaultZIndex, useProps } from '../../core';\nimport { ModalBaseCloseButtonProps, ModalBaseOverlayProps } from '../ModalBase';\nimport { DrawerBody } from './DrawerBody';\nimport { DrawerCloseButton } from './DrawerCloseButton';\nimport { DrawerContent } from './DrawerContent';\nimport { DrawerHeader } from './DrawerHeader';\nimport { DrawerOverlay } from './DrawerOverlay';\nimport {\n DrawerRoot,\n DrawerRootCssVariables,\n DrawerRootProps,\n DrawerRootStylesNames,\n} from './DrawerRoot';\nimport { DrawerStack, DrawerStackContext } from './DrawerStack';\nimport { DrawerTitle } from './DrawerTitle';\nimport classes from './Drawer.module.css';\n\nexport type DrawerStylesNames = DrawerRootStylesNames;\nexport type DrawerCssVariables = DrawerRootCssVariables;\n\nexport interface DrawerProps extends DrawerRootProps {\n /** Drawer title */\n title?: React.ReactNode;\n\n /** If set, the overlay is displayed @default true */\n withOverlay?: boolean;\n\n /** Props passed down to the `Overlay` component, can be used to configure opacity, `background-color`, styles and other properties */\n overlayProps?: ModalBaseOverlayProps;\n\n /** Drawer content */\n children?: React.ReactNode;\n\n /** If set, the close button is displayed @default true */\n withCloseButton?: boolean;\n\n /** Props passed down to the close button */\n closeButtonProps?: ModalBaseCloseButtonProps;\n\n /** Id of the drawer in the `Drawer.Stack` */\n stackId?: string;\n}\n\nexport type DrawerFactory = Factory<{\n props: DrawerProps;\n ref: HTMLDivElement;\n stylesNames: DrawerStylesNames;\n vars: DrawerCssVariables;\n staticComponents: {\n Root: typeof DrawerRoot;\n Overlay: typeof DrawerOverlay;\n Content: typeof DrawerContent;\n Body: typeof DrawerBody;\n Header: typeof DrawerHeader;\n Title: typeof DrawerTitle;\n CloseButton: typeof DrawerCloseButton;\n Stack: typeof DrawerStack;\n };\n}>;\n\nconst defaultProps = {\n closeOnClickOutside: true,\n withinPortal: true,\n lockScroll: true,\n trapFocus: true,\n returnFocus: true,\n closeOnEscape: true,\n keepMounted: false,\n zIndex: getDefaultZIndex('modal'),\n withOverlay: true,\n withCloseButton: true,\n} satisfies Partial<DrawerProps>;\n\nexport const Drawer = factory<DrawerFactory>((_props) => {\n const {\n title,\n withOverlay,\n overlayProps,\n withCloseButton,\n closeButtonProps,\n children,\n opened,\n stackId,\n zIndex,\n ...others\n } = useProps('Drawer', defaultProps, _props);\n\n const ctx = use(DrawerStackContext);\n const hasHeader = !!title || withCloseButton;\n const stackProps =\n ctx && stackId\n ? {\n closeOnEscape: ctx.currentId === stackId,\n trapFocus: ctx.currentId === stackId,\n zIndex: ctx.getZIndex(stackId),\n }\n : {};\n\n const overlayVisible =\n withOverlay === false ? false : stackId && ctx ? ctx.currentId === stackId : opened;\n\n useEffect(() => {\n if (ctx && stackId) {\n opened\n ? ctx.addModal(stackId, zIndex || getDefaultZIndex('modal'))\n : ctx.removeModal(stackId);\n }\n }, [opened, stackId, zIndex]);\n\n return (\n <DrawerRoot\n opened={opened}\n zIndex={ctx && stackId ? ctx.getZIndex(stackId) : zIndex}\n {...others}\n {...stackProps}\n >\n {withOverlay && (\n <DrawerOverlay\n visible={overlayVisible}\n transitionProps={ctx && stackId ? { duration: 0 } : undefined}\n {...overlayProps}\n />\n )}\n <DrawerContent __hidden={ctx && stackId && opened ? stackId !== ctx.currentId : false}>\n {hasHeader && (\n <DrawerHeader>\n {title && <DrawerTitle>{title}</DrawerTitle>}\n {withCloseButton && <DrawerCloseButton {...closeButtonProps} />}\n </DrawerHeader>\n )}\n\n <DrawerBody>{children}</DrawerBody>\n </DrawerContent>\n </DrawerRoot>\n );\n});\n\nDrawer.classes = classes;\nDrawer.displayName = '@mantine/core/Drawer';\nDrawer.Root = DrawerRoot;\nDrawer.Overlay = DrawerOverlay;\nDrawer.Content = DrawerContent;\nDrawer.Body = DrawerBody;\nDrawer.Header = DrawerHeader;\nDrawer.Title = DrawerTitle;\nDrawer.CloseButton = DrawerCloseButton;\nDrawer.Stack = DrawerStack;\n"],"mappings":";;;;;;;;;;;;;;;;AA6DA,MAAM,eAAe;CACnB,qBAAqB;CACrB,cAAc;CACd,YAAY;CACZ,WAAW;CACX,aAAa;CACb,eAAe;CACf,aAAa;CACb,QAAQ,iBAAiB,OAAO;CAChC,aAAa;CACb,iBAAiB;AACnB;AAEA,MAAa,SAAS,SAAwB,WAAW;CACvD,MAAM,EACJ,OACA,aACA,cACA,iBACA,kBACA,UACA,QACA,SACA,QACA,GAAG,WACD,SAAS,UAAU,cAAc,MAAM;CAE3C,MAAM,MAAM,IAAI,kBAAkB;CAClC,MAAM,YAAY,CAAC,CAAC,SAAS;CAC7B,MAAM,aACJ,OAAO,UACH;EACE,eAAe,IAAI,cAAc;EACjC,WAAW,IAAI,cAAc;EAC7B,QAAQ,IAAI,UAAU,OAAO;CAC/B,IACA,CAAC;CAEP,MAAM,iBACJ,gBAAgB,QAAQ,QAAQ,WAAW,MAAM,IAAI,cAAc,UAAU;CAE/E,gBAAgB;EACd,IAAI,OAAO,SACT,SACI,IAAI,SAAS,SAAS,UAAU,iBAAiB,OAAO,CAAC,IACzD,IAAI,YAAY,OAAO;CAE/B,GAAG;EAAC;EAAQ;EAAS;CAAM,CAAC;CAE5B,OACE,qBAAC,YAAD;EACU;EACR,QAAQ,OAAO,UAAU,IAAI,UAAU,OAAO,IAAI;EAClD,GAAI;EACJ,GAAI;EAJN,UAAA,CAMG,eACC,oBAAC,eAAD;GACE,SAAS;GACT,iBAAiB,OAAO,UAAU,EAAE,UAAU,EAAE,IAAI,KAAA;GACpD,GAAI;EACL,CAAA,GAEH,qBAAC,eAAD;GAAe,UAAU,OAAO,WAAW,SAAS,YAAY,IAAI,YAAY;GAAhF,UAAA,CACG,aACC,qBAAC,cAAD,EAAA,UAAA,CACG,SAAS,oBAAC,aAAD,EAAA,UAAc,MAAmB,CAAA,GAC1C,mBAAmB,oBAAC,mBAAD,EAAmB,GAAI,iBAAmB,CAAA,CAClD,EAAA,CAAA,GAGhB,oBAAC,YAAD,EAAa,SAAqB,CAAA,CACrB;EACL,CAAA,CAAA;;AAEhB,CAAC;AAED,OAAO,UAAUA;AACjB,OAAO,cAAc;AACrB,OAAO,OAAO;AACd,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,OAAO;AACd,OAAO,SAAS;AAChB,OAAO,QAAQ;AACf,OAAO,cAAc;AACrB,OAAO,QAAQ"}
|