@mantine/core 9.0.0 → 9.0.1
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/components/Accordion/Accordion.cjs.map +1 -1
- package/cjs/components/Accordion/Accordion.module.cjs.map +1 -1
- package/cjs/components/ActionIcon/ActionIcon.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.map +1 -1
- package/cjs/components/AppShell/AppShell.cjs.map +1 -1
- package/cjs/components/AspectRatio/AspectRatio.cjs.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.cjs +1 -1
- package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/cjs/components/BackgroundImage/BackgroundImage.cjs.map +1 -1
- package/cjs/components/Badge/Badge.cjs.map +1 -1
- package/cjs/components/Badge/Badge.module.cjs.map +1 -1
- 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/Card/Card.cjs.map +1 -1
- package/cjs/components/Center/Center.cjs.map +1 -1
- package/cjs/components/Checkbox/Checkbox.cjs.map +1 -1
- package/cjs/components/Checkbox/CheckboxGroup/CheckboxGroup.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/Code/Code.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/ColorPicker/AlphaSlider/AlphaSlider.cjs.map +1 -1
- package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/cjs/components/ColorPicker/HueSlider/HueSlider.cjs.map +1 -1
- package/cjs/components/ColorSwatch/ColorSwatch.cjs.map +1 -1
- package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs +1 -0
- package/cjs/components/Combobox/ComboboxTarget/ComboboxTarget.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
- package/cjs/components/Container/Container.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/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/Flex/Flex.cjs.map +1 -1
- package/cjs/components/FloatingIndicator/FloatingIndicator.cjs.map +1 -1
- package/cjs/components/FloatingWindow/FloatingWindow.cjs.map +1 -1
- package/cjs/components/Grid/Grid.cjs.map +1 -1
- package/cjs/components/Group/Group.cjs.map +1 -1
- package/cjs/components/Highlight/Highlight.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 -2
- package/cjs/components/Input/Input.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.map +1 -1
- package/cjs/components/List/List.cjs.map +1 -1
- package/cjs/components/Loader/Loader.cjs.map +1 -1
- package/cjs/components/LoadingOverlay/LoadingOverlay.cjs +1 -0
- package/cjs/components/LoadingOverlay/LoadingOverlay.cjs.map +1 -1
- package/cjs/components/Mark/Mark.cjs.map +1 -1
- package/cjs/components/Marquee/Marquee.cjs.map +1 -1
- package/cjs/components/Menu/Menu.cjs.map +1 -1
- package/cjs/components/Modal/Modal.cjs.map +1 -1
- package/cjs/components/MultiSelect/MultiSelect.cjs +3 -1
- package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
- package/cjs/components/NativeSelect/NativeSelect.cjs +4 -1
- package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
- package/cjs/components/NavLink/NavLink.cjs.map +1 -1
- package/cjs/components/Notification/Notification.cjs.map +1 -1
- package/cjs/components/NumberInput/NumberInput.cjs +1 -0
- package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
- package/cjs/components/OverflowList/OverflowList.cjs.map +1 -1
- package/cjs/components/Overlay/Overlay.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.cjs.map +1 -1
- package/cjs/components/Paper/Paper.cjs.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.cjs +4 -1
- package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
- package/cjs/components/Pill/Pill.cjs.map +1 -1
- package/cjs/components/PillsInput/PillsInput.cjs.map +1 -1
- package/cjs/components/PinInput/PinInput.cjs.map +1 -1
- package/cjs/components/Popover/Popover.cjs +9 -0
- package/cjs/components/Popover/Popover.cjs.map +1 -1
- package/cjs/components/Portal/OptionalPortal.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/Radio/Radio.cjs.map +1 -1
- package/cjs/components/Radio/RadioGroup/RadioGroup.cjs.map +1 -1
- package/cjs/components/Rating/Rating.cjs.map +1 -1
- package/cjs/components/RingProgress/RingProgress.cjs +1 -0
- package/cjs/components/RingProgress/RingProgress.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.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 +1 -0
- package/cjs/components/Select/Select.cjs.map +1 -1
- package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs +1 -2
- package/cjs/components/SemiCircleProgress/SemiCircleProgress.cjs.map +1 -1
- package/cjs/components/SimpleGrid/SimpleGrid.cjs.map +1 -1
- package/cjs/components/Skeleton/Skeleton.cjs.map +1 -1
- package/cjs/components/Slider/RangeSlider/RangeSlider.cjs.map +1 -1
- package/cjs/components/Slider/Slider/Slider.cjs.map +1 -1
- package/cjs/components/Slider/Slider.module.cjs.map +1 -1
- package/cjs/components/Space/Space.cjs.map +1 -1
- package/cjs/components/Spoiler/Spoiler.cjs.map +1 -1
- package/cjs/components/Stack/Stack.cjs.map +1 -1
- package/cjs/components/Stepper/Stepper.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.map +1 -1
- package/cjs/components/TableOfContents/TableOfContents.cjs.map +1 -1
- package/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs +3 -1
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/components/Text/Text.cjs.map +1 -1
- package/cjs/components/TextInput/TextInput.cjs.map +1 -1
- package/cjs/components/Textarea/Textarea.cjs.map +1 -1
- package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
- package/cjs/components/Timeline/Timeline.cjs.map +1 -1
- package/cjs/components/Title/Title.cjs.map +1 -1
- package/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/cjs/components/Tree/Tree.cjs.map +1 -1
- package/cjs/components/Typography/Typography.cjs.map +1 -1
- package/cjs/components/UnstyledButton/UnstyledButton.cjs.map +1 -1
- package/cjs/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-scheme-managers/local-storage-manager.cjs.map +1 -1
- package/cjs/core/utils/find-element-ancestor/find-element-ancestor.cjs.map +1 -1
- package/esm/components/Accordion/Accordion.mjs.map +1 -1
- package/esm/components/Accordion/Accordion.module.mjs.map +1 -1
- package/esm/components/ActionIcon/ActionIcon.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/Anchor/Anchor.mjs.map +1 -1
- package/esm/components/AngleSlider/AngleSlider.mjs.map +1 -1
- package/esm/components/AppShell/AppShell.mjs.map +1 -1
- package/esm/components/AspectRatio/AspectRatio.mjs.map +1 -1
- package/esm/components/Autocomplete/Autocomplete.mjs +1 -1
- package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/esm/components/Avatar/Avatar.mjs.map +1 -1
- package/esm/components/BackgroundImage/BackgroundImage.mjs.map +1 -1
- package/esm/components/Badge/Badge.mjs.map +1 -1
- package/esm/components/Badge/Badge.module.mjs.map +1 -1
- 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/Card/Card.mjs.map +1 -1
- package/esm/components/Center/Center.mjs.map +1 -1
- package/esm/components/Checkbox/Checkbox.mjs.map +1 -1
- package/esm/components/Checkbox/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/esm/components/Chip/Chip.mjs.map +1 -1
- package/esm/components/Chip/ChipGroup/ChipGroup.mjs.map +1 -1
- package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
- package/esm/components/Code/Code.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/ColorPicker/AlphaSlider/AlphaSlider.mjs.map +1 -1
- package/esm/components/ColorPicker/ColorPicker.mjs.map +1 -1
- package/esm/components/ColorPicker/HueSlider/HueSlider.mjs.map +1 -1
- package/esm/components/ColorSwatch/ColorSwatch.mjs.map +1 -1
- package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs +1 -0
- package/esm/components/Combobox/ComboboxTarget/ComboboxTarget.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
- package/esm/components/Container/Container.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/Fieldset/Fieldset.mjs.map +1 -1
- package/esm/components/FileButton/FileButton.mjs.map +1 -1
- package/esm/components/FileInput/FileInput.mjs.map +1 -1
- package/esm/components/Flex/Flex.mjs.map +1 -1
- package/esm/components/FloatingIndicator/FloatingIndicator.mjs.map +1 -1
- package/esm/components/FloatingWindow/FloatingWindow.mjs.map +1 -1
- package/esm/components/Grid/Grid.mjs.map +1 -1
- package/esm/components/Group/Group.mjs.map +1 -1
- package/esm/components/Highlight/Highlight.mjs.map +1 -1
- package/esm/components/Image/Image.mjs.map +1 -1
- package/esm/components/Indicator/Indicator.mjs.map +1 -1
- package/esm/components/Input/Input.mjs +3 -2
- package/esm/components/Input/Input.mjs.map +1 -1
- package/esm/components/InputBase/InputBase.mjs.map +1 -1
- package/esm/components/JsonInput/JsonInput.mjs.map +1 -1
- package/esm/components/Kbd/Kbd.mjs.map +1 -1
- package/esm/components/List/List.mjs.map +1 -1
- package/esm/components/Loader/Loader.mjs.map +1 -1
- package/esm/components/LoadingOverlay/LoadingOverlay.mjs +1 -0
- package/esm/components/LoadingOverlay/LoadingOverlay.mjs.map +1 -1
- package/esm/components/Mark/Mark.mjs.map +1 -1
- package/esm/components/Marquee/Marquee.mjs.map +1 -1
- package/esm/components/Menu/Menu.mjs.map +1 -1
- package/esm/components/Modal/Modal.mjs.map +1 -1
- package/esm/components/MultiSelect/MultiSelect.mjs +3 -1
- package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
- package/esm/components/NativeSelect/NativeSelect.mjs +4 -1
- package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
- package/esm/components/NavLink/NavLink.mjs.map +1 -1
- package/esm/components/Notification/Notification.mjs.map +1 -1
- package/esm/components/NumberInput/NumberInput.mjs +1 -0
- package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
- package/esm/components/OverflowList/OverflowList.mjs.map +1 -1
- package/esm/components/Overlay/Overlay.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.mjs.map +1 -1
- package/esm/components/Paper/Paper.mjs.map +1 -1
- package/esm/components/PasswordInput/PasswordInput.mjs +4 -1
- package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
- package/esm/components/Pill/Pill.mjs.map +1 -1
- package/esm/components/PillsInput/PillsInput.mjs.map +1 -1
- package/esm/components/PinInput/PinInput.mjs.map +1 -1
- package/esm/components/Popover/Popover.mjs +9 -0
- package/esm/components/Popover/Popover.mjs.map +1 -1
- package/esm/components/Portal/OptionalPortal.mjs.map +1 -1
- package/esm/components/Portal/Portal.mjs.map +1 -1
- package/esm/components/Progress/Progress.mjs.map +1 -1
- package/esm/components/Radio/Radio.mjs.map +1 -1
- package/esm/components/Radio/RadioGroup/RadioGroup.mjs.map +1 -1
- package/esm/components/Rating/Rating.mjs.map +1 -1
- package/esm/components/RingProgress/RingProgress.mjs +1 -0
- package/esm/components/RingProgress/RingProgress.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollAreaScrollbar/Scrollbar.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 +1 -0
- package/esm/components/Select/Select.mjs.map +1 -1
- package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs +1 -2
- package/esm/components/SemiCircleProgress/SemiCircleProgress.mjs.map +1 -1
- package/esm/components/SimpleGrid/SimpleGrid.mjs.map +1 -1
- package/esm/components/Skeleton/Skeleton.mjs.map +1 -1
- package/esm/components/Slider/RangeSlider/RangeSlider.mjs.map +1 -1
- package/esm/components/Slider/Slider/Slider.mjs.map +1 -1
- package/esm/components/Slider/Slider.module.mjs.map +1 -1
- package/esm/components/Space/Space.mjs.map +1 -1
- package/esm/components/Spoiler/Spoiler.mjs.map +1 -1
- package/esm/components/Stack/Stack.mjs.map +1 -1
- package/esm/components/Stepper/Stepper.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.map +1 -1
- package/esm/components/TableOfContents/TableOfContents.mjs.map +1 -1
- package/esm/components/Tabs/Tabs.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs +3 -1
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/components/Text/Text.mjs.map +1 -1
- package/esm/components/TextInput/TextInput.mjs.map +1 -1
- package/esm/components/Textarea/Textarea.mjs.map +1 -1
- package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
- package/esm/components/Timeline/Timeline.mjs.map +1 -1
- package/esm/components/Title/Title.mjs.map +1 -1
- package/esm/components/Tooltip/Tooltip.mjs.map +1 -1
- package/esm/components/Tree/Tree.mjs.map +1 -1
- package/esm/components/Typography/Typography.mjs.map +1 -1
- package/esm/components/UnstyledButton/UnstyledButton.mjs.map +1 -1
- package/esm/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -1
- package/esm/core/MantineProvider/color-scheme-managers/local-storage-manager.mjs.map +1 -1
- package/esm/core/utils/find-element-ancestor/find-element-ancestor.mjs.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +21 -3
- package/lib/components/Accordion/index.d.ts +0 -17
- package/lib/components/ActionIcon/ActionIcon.d.ts +20 -2
- package/lib/components/ActionIcon/index.d.ts +0 -18
- package/lib/components/Affix/Affix.d.ts +6 -0
- package/lib/components/Affix/index.d.ts +0 -6
- package/lib/components/Alert/Alert.d.ts +6 -0
- package/lib/components/Alert/index.d.ts +0 -6
- package/lib/components/Anchor/Anchor.d.ts +7 -0
- package/lib/components/Anchor/index.d.ts +0 -8
- package/lib/components/AngleSlider/AngleSlider.d.ts +6 -0
- package/lib/components/AngleSlider/index.d.ts +0 -6
- package/lib/components/AppShell/AppShell.d.ts +30 -6
- package/lib/components/AppShell/index.d.ts +0 -24
- package/lib/components/AspectRatio/AspectRatio.d.ts +6 -0
- package/lib/components/AspectRatio/index.d.ts +0 -6
- package/lib/components/Autocomplete/Autocomplete.d.ts +6 -0
- package/lib/components/Autocomplete/index.d.ts +0 -6
- package/lib/components/Avatar/Avatar.d.ts +15 -1
- package/lib/components/Avatar/index.d.ts +0 -14
- package/lib/components/BackgroundImage/BackgroundImage.d.ts +6 -0
- package/lib/components/BackgroundImage/index.d.ts +0 -6
- package/lib/components/Badge/Badge.d.ts +7 -0
- package/lib/components/Badge/index.d.ts +0 -7
- package/lib/components/Blockquote/Blockquote.d.ts +6 -0
- package/lib/components/Blockquote/index.d.ts +0 -6
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +6 -0
- package/lib/components/Breadcrumbs/index.d.ts +0 -7
- package/lib/components/Burger/Burger.d.ts +6 -0
- package/lib/components/Burger/index.d.ts +0 -6
- package/lib/components/Button/Button.d.ts +22 -2
- package/lib/components/Button/index.d.ts +0 -20
- package/lib/components/Card/Card.d.ts +11 -1
- package/lib/components/Card/index.d.ts +0 -10
- package/lib/components/Center/Center.d.ts +5 -0
- package/lib/components/Center/index.d.ts +0 -5
- package/lib/components/Checkbox/Checkbox.d.ts +29 -3
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +8 -8
- package/lib/components/Checkbox/index.d.ts +0 -26
- package/lib/components/Chip/Chip.d.ts +12 -1
- package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +8 -8
- package/lib/components/Chip/index.d.ts +0 -11
- package/lib/components/CloseButton/CloseButton.d.ts +7 -0
- package/lib/components/CloseButton/index.d.ts +0 -7
- package/lib/components/Code/Code.d.ts +6 -0
- package/lib/components/Code/index.d.ts +0 -6
- package/lib/components/Collapse/Collapse.d.ts +4 -0
- package/lib/components/Collapse/index.d.ts +0 -4
- package/lib/components/ColorInput/ColorInput.d.ts +6 -0
- package/lib/components/ColorInput/index.d.ts +0 -6
- package/lib/components/ColorPicker/AlphaSlider/AlphaSlider.d.ts +4 -0
- package/lib/components/ColorPicker/ColorPicker.d.ts +6 -0
- package/lib/components/ColorPicker/HueSlider/HueSlider.d.ts +4 -0
- package/lib/components/ColorPicker/index.d.ts +0 -14
- package/lib/components/ColorSwatch/ColorSwatch.d.ts +6 -0
- package/lib/components/ColorSwatch/index.d.ts +0 -6
- package/lib/components/Container/Container.d.ts +6 -0
- package/lib/components/Container/index.d.ts +0 -6
- package/lib/components/Dialog/Dialog.d.ts +6 -0
- package/lib/components/Dialog/index.d.ts +0 -6
- package/lib/components/Divider/Divider.d.ts +7 -0
- package/lib/components/Divider/index.d.ts +0 -7
- package/lib/components/Fieldset/Fieldset.d.ts +6 -0
- package/lib/components/Fieldset/index.d.ts +0 -6
- package/lib/components/FileButton/FileButton.d.ts +4 -0
- package/lib/components/FileButton/index.d.ts +0 -4
- package/lib/components/FileInput/FileInput.d.ts +4 -0
- package/lib/components/FileInput/index.d.ts +0 -4
- package/lib/components/Flex/Flex.d.ts +5 -0
- package/lib/components/Flex/index.d.ts +0 -5
- package/lib/components/FloatingIndicator/FloatingIndicator.d.ts +6 -0
- package/lib/components/FloatingIndicator/index.d.ts +0 -6
- package/lib/components/FloatingWindow/FloatingWindow.d.ts +5 -0
- package/lib/components/FloatingWindow/index.d.ts +0 -5
- package/lib/components/Grid/Grid.d.ts +13 -2
- package/lib/components/Grid/index.d.ts +0 -11
- package/lib/components/Group/Group.d.ts +7 -0
- package/lib/components/Group/index.d.ts +0 -7
- package/lib/components/Highlight/Highlight.d.ts +5 -0
- package/lib/components/Highlight/index.d.ts +0 -5
- package/lib/components/Image/Image.d.ts +6 -0
- package/lib/components/Image/index.d.ts +0 -6
- package/lib/components/Indicator/Indicator.d.ts +6 -0
- package/lib/components/Indicator/index.d.ts +0 -6
- package/lib/components/Input/Input.d.ts +51 -7
- package/lib/components/Input/index.d.ts +0 -42
- package/lib/components/InputBase/InputBase.d.ts +4 -0
- package/lib/components/InputBase/index.d.ts +0 -4
- package/lib/components/JsonInput/JsonInput.d.ts +4 -0
- package/lib/components/JsonInput/index.d.ts +0 -4
- package/lib/components/Kbd/Kbd.d.ts +6 -0
- package/lib/components/Kbd/index.d.ts +0 -6
- package/lib/components/List/List.d.ts +12 -1
- package/lib/components/List/index.d.ts +0 -11
- package/lib/components/Loader/Loader.d.ts +6 -0
- package/lib/components/Loader/index.d.ts +0 -6
- package/lib/components/LoadingOverlay/LoadingOverlay.d.ts +6 -0
- package/lib/components/LoadingOverlay/index.d.ts +0 -6
- package/lib/components/Mark/Mark.d.ts +6 -0
- package/lib/components/Mark/index.d.ts +0 -6
- package/lib/components/Marquee/Marquee.d.ts +6 -0
- package/lib/components/Marquee/index.d.ts +0 -6
- package/lib/components/Menu/Menu.d.ts +43 -6
- package/lib/components/Menu/index.d.ts +0 -33
- package/lib/components/Modal/Modal.d.ts +37 -7
- package/lib/components/Modal/index.d.ts +0 -30
- package/lib/components/MultiSelect/MultiSelect.d.ts +5 -0
- package/lib/components/MultiSelect/index.d.ts +0 -6
- package/lib/components/NativeSelect/NativeSelect.d.ts +5 -0
- package/lib/components/NativeSelect/index.d.ts +0 -6
- package/lib/components/NavLink/NavLink.d.ts +7 -0
- package/lib/components/NavLink/index.d.ts +0 -7
- package/lib/components/Notification/Notification.d.ts +6 -0
- package/lib/components/Notification/index.d.ts +0 -6
- package/lib/components/NumberInput/NumberInput.d.ts +7 -0
- package/lib/components/NumberInput/index.d.ts +0 -7
- package/lib/components/OverflowList/OverflowList.d.ts +6 -0
- package/lib/components/OverflowList/index.d.ts +0 -6
- package/lib/components/Overlay/Overlay.d.ts +6 -0
- package/lib/components/Overlay/index.d.ts +0 -6
- package/lib/components/Pagination/Pagination.d.ts +25 -4
- package/lib/components/Pagination/index.d.ts +0 -21
- package/lib/components/Paper/Paper.d.ts +7 -0
- package/lib/components/Paper/index.d.ts +0 -7
- package/lib/components/PasswordInput/PasswordInput.d.ts +6 -0
- package/lib/components/PasswordInput/index.d.ts +0 -6
- package/lib/components/Pill/Pill.d.ts +14 -1
- package/lib/components/Pill/index.d.ts +0 -13
- package/lib/components/PillsInput/PillsInput.d.ts +12 -1
- package/lib/components/PillsInput/index.d.ts +0 -10
- package/lib/components/PinInput/PinInput.d.ts +5 -0
- package/lib/components/PinInput/index.d.ts +0 -5
- package/lib/components/Popover/Popover.d.ts +9 -0
- package/lib/components/Portal/OptionalPortal.d.ts +3 -0
- package/lib/components/Portal/Portal.d.ts +3 -0
- package/lib/components/Portal/index.d.ts +0 -6
- package/lib/components/Progress/Progress.d.ts +19 -3
- package/lib/components/Progress/index.d.ts +0 -15
- package/lib/components/Radio/Radio.d.ts +29 -3
- package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +8 -8
- package/lib/components/Radio/index.d.ts +0 -26
- package/lib/components/Rating/Rating.d.ts +5 -0
- package/lib/components/Rating/index.d.ts +0 -5
- package/lib/components/RingProgress/RingProgress.d.ts +7 -0
- package/lib/components/RingProgress/index.d.ts +0 -7
- package/lib/components/ScrollArea/ScrollArea.d.ts +10 -0
- package/lib/components/ScrollArea/index.d.ts +0 -10
- package/lib/components/Scroller/Scroller.d.ts +6 -0
- package/lib/components/Scroller/index.d.ts +0 -6
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +7 -0
- package/lib/components/SegmentedControl/index.d.ts +0 -8
- package/lib/components/Select/Select.d.ts +5 -0
- package/lib/components/Select/index.d.ts +0 -6
- package/lib/components/SemiCircleProgress/SemiCircleProgress.d.ts +6 -0
- package/lib/components/SemiCircleProgress/index.d.ts +0 -6
- package/lib/components/SimpleGrid/SimpleGrid.d.ts +5 -0
- package/lib/components/SimpleGrid/index.d.ts +0 -5
- package/lib/components/Skeleton/Skeleton.d.ts +6 -0
- package/lib/components/Skeleton/index.d.ts +0 -6
- package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +8 -0
- package/lib/components/Slider/Slider/Slider.d.ts +7 -0
- package/lib/components/Slider/index.d.ts +0 -15
- package/lib/components/Space/Space.d.ts +4 -0
- package/lib/components/Space/index.d.ts +0 -5
- package/lib/components/Spoiler/Spoiler.d.ts +6 -0
- package/lib/components/Spoiler/index.d.ts +0 -6
- package/lib/components/Stack/Stack.d.ts +6 -0
- package/lib/components/Stack/index.d.ts +0 -6
- package/lib/components/Stepper/Stepper.d.ts +17 -2
- package/lib/components/Stepper/index.d.ts +0 -14
- package/lib/components/Switch/Switch.d.ts +13 -1
- package/lib/components/Switch/SwitchGroup/SwitchGroup.d.ts +8 -8
- package/lib/components/Switch/index.d.ts +0 -12
- package/lib/components/Table/Table.d.ts +35 -2
- package/lib/components/Table/index.d.ts +0 -32
- package/lib/components/TableOfContents/TableOfContents.d.ts +7 -0
- package/lib/components/TableOfContents/index.d.ts +0 -7
- package/lib/components/Tabs/Tabs.d.ts +24 -3
- package/lib/components/Tabs/index.d.ts +0 -20
- package/lib/components/TagsInput/TagsInput.d.ts +5 -0
- package/lib/components/TagsInput/index.d.ts +0 -5
- package/lib/components/Text/Text.d.ts +7 -0
- package/lib/components/Text/index.d.ts +0 -7
- package/lib/components/TextInput/TextInput.d.ts +4 -0
- package/lib/components/TextInput/index.d.ts +0 -4
- package/lib/components/Textarea/Textarea.d.ts +4 -0
- package/lib/components/Textarea/index.d.ts +0 -4
- package/lib/components/ThemeIcon/ThemeIcon.d.ts +7 -0
- package/lib/components/ThemeIcon/index.d.ts +0 -7
- package/lib/components/Timeline/Timeline.d.ts +12 -1
- package/lib/components/Timeline/index.d.ts +0 -11
- package/lib/components/Title/Title.d.ts +8 -0
- package/lib/components/Title/index.d.ts +0 -8
- package/lib/components/Tooltip/Tooltip.d.ts +15 -2
- package/lib/components/Tooltip/index.d.ts +0 -13
- package/lib/components/Tree/Tree.d.ts +7 -0
- package/lib/components/Tree/index.d.ts +0 -7
- package/lib/components/Typography/Typography.d.ts +5 -0
- package/lib/components/Typography/index.d.ts +0 -5
- package/lib/components/UnstyledButton/UnstyledButton.d.ts +5 -0
- package/lib/components/UnstyledButton/index.d.ts +0 -5
- package/lib/components/VisuallyHidden/VisuallyHidden.d.ts +3 -0
- package/lib/components/VisuallyHidden/index.d.ts +0 -3
- package/package.json +2 -2
- package/styles/Accordion.css +0 -4
- package/styles/Accordion.layer.css +0 -4
- package/styles/Badge.css +0 -2
- package/styles/Badge.layer.css +0 -2
- package/styles/Slider.css +10 -10
- package/styles/Slider.layer.css +10 -10
- package/styles.css +10 -16
- package/styles.layer.css +10 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.mjs","names":["classes"],"sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineFontSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getTitleSize } from './get-title-size';\nimport classes from './Title.module.css';\n\nexport type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;\nexport type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] | MantineFontSize;\n\nexport type TitleStylesNames = 'root';\nexport type TitleCssVariables = {\n root: '--title-fw' | '--title-lh' | '--title-fz' | '--title-line-clamp' | '--title-text-wrap';\n};\n\nexport interface TitleProps\n extends BoxProps, StylesApiProps<TitleFactory>, ElementProps<'h1', 'color'> {\n /** Heading order (1-6), controls `font-size` style if `size` prop is not set @default 1 */\n order?: TitleOrder;\n\n /** Changes title size, if not set, then size is controlled by `order` prop */\n size?: TitleSize;\n\n /** Number of lines after which heading will be truncated */\n lineClamp?: number;\n\n /** Heading `text-wrap` CSS property @default 'wrap' */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TitleFactory = Factory<{\n props: TitleProps;\n ref: HTMLHeadingElement;\n stylesNames: TitleStylesNames;\n vars: TitleCssVariables;\n}>;\n\nconst defaultProps = {\n order: 1,\n} satisfies Partial<TitleProps>;\n\nconst varsResolver = createVarsResolver<TitleFactory>((_, { order, size, lineClamp, textWrap }) => {\n const sizeVariables = getTitleSize(order || 1, size);\n return {\n root: {\n '--title-fw': sizeVariables.fontWeight,\n '--title-lh': sizeVariables.lineHeight,\n '--title-fz': sizeVariables.fontSize,\n '--title-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--title-text-wrap': textWrap,\n },\n };\n});\n\nexport const Title = factory<TitleFactory>((_props) => {\n const props = useProps('Title', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n order,\n vars,\n size,\n variant,\n lineClamp,\n textWrap,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TitleFactory>({\n name: 'Title',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (![1, 2, 3, 4, 5, 6].includes(order)) {\n return null;\n }\n\n return (\n <Box\n {...getStyles('root')}\n component={`h${order}`}\n variant={variant}\n mod={[{ order, 'data-line-clamp': typeof lineClamp === 'number' }, mod]}\n size={size}\n {...others}\n />\n );\n});\n\nTitle.classes = classes;\nTitle.varsResolver = varsResolver;\nTitle.displayName = '@mantine/core/Title';\n"],"mappings":";;;;;;;;;;AA6CA,MAAM,eAAe,EACnB,OAAO,GACR;AAED,MAAM,eAAe,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgB,aAAa,SAAS,GAAG,KAAK;AACpD,QAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,UAAU,GAAG,KAAA;EAC7E,qBAAqB;EACtB,EACF;EACD;AAEF,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,cAAc,OAAO;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,OACA,MACA,MACA,SACA,WACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN;EACA,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,KAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;EAAE,CAAC,SAAS,MAAM,CACrC,QAAO;AAGT,QACE,oBAAC,KAAD;EACE,GAAI,UAAU,OAAO;EACrB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;GAAU,EAAE,IAAI;EACjE;EACN,GAAI;EACJ,CAAA;EAEJ;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
|
|
1
|
+
{"version":3,"file":"Title.mjs","names":["classes"],"sources":["../../../src/components/Title/Title.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n MantineFontSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { getTitleSize } from './get-title-size';\nimport classes from './Title.module.css';\n\nexport type TitleOrder = 1 | 2 | 3 | 4 | 5 | 6;\nexport type TitleSize = `h${TitleOrder}` | React.CSSProperties['fontSize'] | MantineFontSize;\n\nexport type TitleStylesNames = 'root';\nexport type TitleCssVariables = {\n root: '--title-fw' | '--title-lh' | '--title-fz' | '--title-line-clamp' | '--title-text-wrap';\n};\n\nexport interface TitleProps\n extends BoxProps, StylesApiProps<TitleFactory>, ElementProps<'h1', 'color'> {\n /** Heading order (1-6), controls `font-size` style if `size` prop is not set @default 1 */\n order?: TitleOrder;\n\n /** Changes title size, if not set, then size is controlled by `order` prop */\n size?: TitleSize;\n\n /** Number of lines after which heading will be truncated */\n lineClamp?: number;\n\n /** Heading `text-wrap` CSS property @default 'wrap' */\n textWrap?: 'wrap' | 'nowrap' | 'balance' | 'pretty' | 'stable';\n}\n\nexport type TitleFactory = Factory<{\n props: TitleProps;\n ref: HTMLHeadingElement;\n stylesNames: TitleStylesNames;\n vars: TitleCssVariables;\n}>;\n\nconst defaultProps = {\n order: 1,\n} satisfies Partial<TitleProps>;\n\nconst varsResolver = createVarsResolver<TitleFactory>((_, { order, size, lineClamp, textWrap }) => {\n const sizeVariables = getTitleSize(order || 1, size);\n return {\n root: {\n '--title-fw': sizeVariables.fontWeight,\n '--title-lh': sizeVariables.lineHeight,\n '--title-fz': sizeVariables.fontSize,\n '--title-line-clamp': typeof lineClamp === 'number' ? lineClamp.toString() : undefined,\n '--title-text-wrap': textWrap,\n },\n };\n});\n\nexport const Title = factory<TitleFactory>((_props) => {\n const props = useProps('Title', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n order,\n vars,\n size,\n variant,\n lineClamp,\n textWrap,\n mod,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<TitleFactory>({\n name: 'Title',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n if (![1, 2, 3, 4, 5, 6].includes(order)) {\n return null;\n }\n\n return (\n <Box\n {...getStyles('root')}\n component={`h${order}`}\n variant={variant}\n mod={[{ order, 'data-line-clamp': typeof lineClamp === 'number' }, mod]}\n size={size}\n {...others}\n />\n );\n});\n\nTitle.classes = classes;\nTitle.varsResolver = varsResolver;\nTitle.displayName = '@mantine/core/Title';\n\nexport namespace Title {\n export type Props = TitleProps;\n export type Order = TitleOrder;\n export type Size = TitleSize;\n export type StylesNames = TitleStylesNames;\n export type CssVariables = TitleCssVariables;\n export type Factory = TitleFactory;\n}\n"],"mappings":";;;;;;;;;;AA6CA,MAAM,eAAe,EACnB,OAAO,GACR;AAED,MAAM,eAAe,oBAAkC,GAAG,EAAE,OAAO,MAAM,WAAW,eAAe;CACjG,MAAM,gBAAgB,aAAa,SAAS,GAAG,KAAK;AACpD,QAAO,EACL,MAAM;EACJ,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,cAAc,cAAc;EAC5B,sBAAsB,OAAO,cAAc,WAAW,UAAU,UAAU,GAAG,KAAA;EAC7E,qBAAqB;EACtB,EACF;EACD;AAEF,MAAa,QAAQ,SAAuB,WAAW;CACrD,MAAM,QAAQ,SAAS,SAAS,cAAc,OAAO;CACrD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,OACA,MACA,MACA,SACA,WACA,UACA,KACA,YACA,GAAG,WACD;CAEJ,MAAM,YAAY,UAAwB;EACxC,MAAM;EACN;EACA,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,KAAI,CAAC;EAAC;EAAG;EAAG;EAAG;EAAG;EAAG;EAAE,CAAC,SAAS,MAAM,CACrC,QAAO;AAGT,QACE,oBAAC,KAAD;EACE,GAAI,UAAU,OAAO;EACrB,WAAW,IAAI;EACN;EACT,KAAK,CAAC;GAAE;GAAO,mBAAmB,OAAO,cAAc;GAAU,EAAE,IAAI;EACjE;EACN,GAAI;EACJ,CAAA;EAEJ;AAEF,MAAM,UAAUA;AAChB,MAAM,eAAe;AACrB,MAAM,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.mjs","names":["classes"],"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { cloneElement, useEffect, useRef } from 'react';\nimport cx from 'clsx';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n useDirection,\n useProps,\n useStyles,\n} from '../../core';\nimport {\n ArrowPosition,\n FloatingArrow,\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n getFloatingPosition,\n} from '../../utils/Floating';\nimport { OptionalPortal } from '../Portal';\nimport { getTransitionProps, Transition, TransitionOverride } from '../Transition';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from './Tooltip.types';\nimport { TooltipFloating } from './TooltipFloating/TooltipFloating';\nimport { TooltipGroup } from './TooltipGroup/TooltipGroup';\nimport { useTooltip } from './use-tooltip';\nimport classes from './Tooltip.module.css';\n\nexport interface TooltipProps extends TooltipBaseProps {\n /** Called when tooltip position changes */\n onPositionChange?: (position: FloatingPosition) => void;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms @default 0 */\n closeDelay?: number;\n\n /** Controlled opened state */\n opened?: boolean;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n\n /** Space between target element and tooltip in px @default 5 */\n offset?: number | FloatingAxesOffsets;\n\n /** If set, the tooltip has an arrow @default false */\n withArrow?: boolean;\n\n /** Arrow size in px @default 4 */\n arrowSize?: number;\n\n /** Arrow offset in px @default 5 */\n arrowOffset?: number;\n\n /** Arrow `border-radius` in px @default 0 */\n arrowRadius?: number;\n\n /** Arrow position relative to the tooltip @default side */\n arrowPosition?: ArrowPosition;\n\n /** Props passed down to the `Transition` component that used to animate tooltip presence, use to configure duration and animation type @default { duration: 100, transition: 'fade' } */\n transitionProps?: TransitionOverride;\n\n /** Determines which events will be used to show tooltip @default { hover: true, focus: false, touch: false } */\n events?: { hover: boolean; focus: boolean; touch: boolean };\n\n /** Must be set if the tooltip target is an inline element */\n inline?: boolean;\n\n /** If set, the tooltip is not unmounted from the DOM when hidden, `display: none` styles are applied instead */\n keepMounted?: boolean;\n\n /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy) @default 'absolute' */\n floatingStrategy?: FloatingStrategy;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n\n /** Selector, ref of an element or element itself that should be used for positioning */\n target?: React.RefObject<HTMLElement | null> | HTMLElement | null | string;\n}\n\nexport type TooltipFactory = Factory<{\n props: TooltipProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n staticComponents: {\n Floating: typeof TooltipFloating;\n Group: typeof TooltipGroup;\n };\n}>;\n\nconst defaultProps = {\n position: 'top',\n refProp: 'ref',\n withinPortal: true,\n arrowSize: 4,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n offset: 5,\n transitionProps: { duration: 100, transition: 'fade' },\n events: { hover: true, focus: false, touch: false },\n zIndex: getDefaultZIndex('popover'),\n middlewares: { flip: true, shift: true, inline: false },\n} satisfies Partial<TooltipProps>;\n\nconst varsResolver = createVarsResolver<TooltipFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n theme,\n color: color || theme.primaryColor,\n autoContrast,\n variant: variant || 'filled',\n });\n\n return {\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? colors.background : undefined,\n '--tooltip-color': color ? colors.color : undefined,\n },\n };\n }\n);\n\nexport const Tooltip = factory<TooltipFactory>((_props) => {\n const props = useProps('Tooltip', defaultProps, _props);\n const {\n children,\n position,\n refProp,\n label,\n openDelay,\n closeDelay,\n onPositionChange,\n opened,\n defaultOpened,\n withinPortal,\n radius,\n color,\n classNames,\n styles,\n unstyled,\n style,\n className,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n offset,\n transitionProps,\n multiline,\n events,\n zIndex,\n disabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n inline,\n variant,\n keepMounted,\n vars,\n portalProps,\n mod,\n floatingStrategy,\n middlewares,\n autoContrast,\n attributes,\n target,\n ref,\n ...others\n } = props;\n\n const { dir } = useDirection();\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const tooltip = useTooltip({\n position: getFloatingPosition(dir, position),\n closeDelay,\n openDelay,\n onPositionChange,\n opened,\n defaultOpened,\n events,\n arrowRef,\n arrowOffset,\n offset: typeof offset === 'number' ? offset + (withArrow ? arrowSize / 2 : 0) : offset,\n inline,\n strategy: floatingStrategy,\n middlewares,\n });\n\n useEffect(() => {\n const targetNode =\n target instanceof HTMLElement\n ? target\n : typeof target === 'string'\n ? document.querySelector(target)\n : target?.current || null;\n\n if (targetNode) {\n tooltip.reference(targetNode);\n }\n }, [target, tooltip]);\n\n const getStyles = useStyles<TooltipFactory>({\n name: 'Tooltip',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const child = getSingleElementChild(children);\n if (!target && !child) {\n throw new Error(\n '[@mantine/core] Tooltip 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 tooltipStyles = getStyles('tooltip');\n\n if (target) {\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltipStyles}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: tooltipStyles.className,\n style: {\n ...tooltipStyles.style,\n ...transitionStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n </>\n );\n }\n\n // fallback to children-based approach\n const childProps = child!.props as any;\n const targetRef = useMergedRef(tooltip.reference, getRefProp(child), ref);\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: getStyles('tooltip').className,\n style: {\n ...getStyles('tooltip').style,\n ...transitionStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n\n {cloneElement(\n child!,\n tooltip.getReferenceProps({\n onClick,\n onMouseEnter,\n onMouseLeave,\n onMouseMove: props.onMouseMove,\n onPointerDown: props.onPointerDown,\n onPointerEnter: props.onPointerEnter,\n ...childProps,\n className: cx(className, childProps.className),\n [refProp]: targetRef,\n })\n )}\n </>\n );\n});\n\nTooltip.classes = classes;\nTooltip.varsResolver = varsResolver;\nTooltip.displayName = '@mantine/core/Tooltip';\nTooltip.Floating = TooltipFloating;\nTooltip.Group = TooltipGroup;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Tooltip.mjs","names":["classes"],"sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import { cloneElement, useEffect, useRef } from 'react';\nimport cx from 'clsx';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getSingleElementChild,\n useDirection,\n useProps,\n useStyles,\n} from '../../core';\nimport {\n ArrowPosition,\n FloatingArrow,\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n getFloatingPosition,\n} from '../../utils/Floating';\nimport { OptionalPortal } from '../Portal';\nimport { getTransitionProps, Transition, TransitionOverride } from '../Transition';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from './Tooltip.types';\nimport { TooltipFloating, type TooltipFloatingProps } from './TooltipFloating/TooltipFloating';\nimport {\n TooltipGroup,\n type TooltipGroupProps,\n type TooltipGroupContextValue,\n} from './TooltipGroup/TooltipGroup';\nimport { useTooltip } from './use-tooltip';\nimport classes from './Tooltip.module.css';\nexport interface TooltipProps extends TooltipBaseProps {\n /** Called when tooltip position changes */\n onPositionChange?: (position: FloatingPosition) => void;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms @default 0 */\n closeDelay?: number;\n\n /** Controlled opened state */\n opened?: boolean;\n\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n\n /** Space between target element and tooltip in px @default 5 */\n offset?: number | FloatingAxesOffsets;\n\n /** If set, the tooltip has an arrow @default false */\n withArrow?: boolean;\n\n /** Arrow size in px @default 4 */\n arrowSize?: number;\n\n /** Arrow offset in px @default 5 */\n arrowOffset?: number;\n\n /** Arrow `border-radius` in px @default 0 */\n arrowRadius?: number;\n\n /** Arrow position relative to the tooltip @default side */\n arrowPosition?: ArrowPosition;\n\n /** Props passed down to the `Transition` component that used to animate tooltip presence, use to configure duration and animation type @default { duration: 100, transition: 'fade' } */\n transitionProps?: TransitionOverride;\n\n /** Determines which events will be used to show tooltip @default { hover: true, focus: false, touch: false } */\n events?: { hover: boolean; focus: boolean; touch: boolean };\n\n /** Must be set if the tooltip target is an inline element */\n inline?: boolean;\n\n /** If set, the tooltip is not unmounted from the DOM when hidden, `display: none` styles are applied instead */\n keepMounted?: boolean;\n\n /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy) @default 'absolute' */\n floatingStrategy?: FloatingStrategy;\n\n /** If set, adjusts text color based on background color for `filled` variant */\n autoContrast?: boolean;\n\n /** Selector, ref of an element or element itself that should be used for positioning */\n target?: React.RefObject<HTMLElement | null> | HTMLElement | null | string;\n}\n\nexport type TooltipFactory = Factory<{\n props: TooltipProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n staticComponents: {\n Floating: typeof TooltipFloating;\n Group: typeof TooltipGroup;\n };\n}>;\n\nconst defaultProps = {\n position: 'top',\n refProp: 'ref',\n withinPortal: true,\n arrowSize: 4,\n arrowOffset: 5,\n arrowRadius: 0,\n arrowPosition: 'side',\n offset: 5,\n transitionProps: { duration: 100, transition: 'fade' },\n events: { hover: true, focus: false, touch: false },\n zIndex: getDefaultZIndex('popover'),\n middlewares: { flip: true, shift: true, inline: false },\n} satisfies Partial<TooltipProps>;\n\nconst varsResolver = createVarsResolver<TooltipFactory>(\n (theme, { radius, color, variant, autoContrast }) => {\n const colors = theme.variantColorResolver({\n theme,\n color: color || theme.primaryColor,\n autoContrast,\n variant: variant || 'filled',\n });\n\n return {\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? colors.background : undefined,\n '--tooltip-color': color ? colors.color : undefined,\n },\n };\n }\n);\n\nexport const Tooltip = factory<TooltipFactory>((_props) => {\n const props = useProps('Tooltip', defaultProps, _props);\n const {\n children,\n position,\n refProp,\n label,\n openDelay,\n closeDelay,\n onPositionChange,\n opened,\n defaultOpened,\n withinPortal,\n radius,\n color,\n classNames,\n styles,\n unstyled,\n style,\n className,\n withArrow,\n arrowSize,\n arrowOffset,\n arrowRadius,\n arrowPosition,\n offset,\n transitionProps,\n multiline,\n events,\n zIndex,\n disabled,\n onClick,\n onMouseEnter,\n onMouseLeave,\n inline,\n variant,\n keepMounted,\n vars,\n portalProps,\n mod,\n floatingStrategy,\n middlewares,\n autoContrast,\n attributes,\n target,\n ref,\n ...others\n } = props;\n\n const { dir } = useDirection();\n const arrowRef = useRef<HTMLDivElement>(null);\n\n const tooltip = useTooltip({\n position: getFloatingPosition(dir, position),\n closeDelay,\n openDelay,\n onPositionChange,\n opened,\n defaultOpened,\n events,\n arrowRef,\n arrowOffset,\n offset: typeof offset === 'number' ? offset + (withArrow ? arrowSize / 2 : 0) : offset,\n inline,\n strategy: floatingStrategy,\n middlewares,\n });\n\n useEffect(() => {\n const targetNode =\n target instanceof HTMLElement\n ? target\n : typeof target === 'string'\n ? document.querySelector(target)\n : target?.current || null;\n\n if (targetNode) {\n tooltip.reference(targetNode);\n }\n }, [target, tooltip]);\n\n const getStyles = useStyles<TooltipFactory>({\n name: 'Tooltip',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const child = getSingleElementChild(children);\n if (!target && !child) {\n throw new Error(\n '[@mantine/core] Tooltip 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 tooltipStyles = getStyles('tooltip');\n\n if (target) {\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltipStyles}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: tooltipStyles.className,\n style: {\n ...tooltipStyles.style,\n ...transitionStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n </>\n );\n }\n\n // fallback to children-based approach\n const childProps = child!.props as any;\n const targetRef = useMergedRef(tooltip.reference, getRefProp(child), ref);\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n\n return (\n <>\n <OptionalPortal {...portalProps} withinPortal={withinPortal}>\n <Transition\n {...transition}\n keepMounted={keepMounted}\n mounted={!disabled && !!tooltip.opened}\n duration={tooltip.isGroupPhase ? 10 : transition.duration}\n >\n {(transitionStyles) => (\n <Box\n {...others}\n data-fixed={floatingStrategy === 'fixed' || undefined}\n variant={variant}\n mod={[{ multiline }, mod]}\n {...tooltip.getFloatingProps({\n ref: tooltip.floating,\n className: getStyles('tooltip').className,\n style: {\n ...getStyles('tooltip').style,\n ...transitionStyles,\n zIndex: zIndex as React.CSSProperties['zIndex'],\n top: tooltip.y ?? 0,\n left: tooltip.x ?? 0,\n },\n })}\n >\n {label}\n <FloatingArrow\n ref={arrowRef}\n arrowX={tooltip.arrowX}\n arrowY={tooltip.arrowY}\n visible={withArrow}\n position={tooltip.placement}\n arrowSize={arrowSize}\n arrowOffset={arrowOffset}\n arrowRadius={arrowRadius}\n arrowPosition={arrowPosition}\n {...getStyles('arrow')}\n />\n </Box>\n )}\n </Transition>\n </OptionalPortal>\n\n {cloneElement(\n child!,\n tooltip.getReferenceProps({\n onClick,\n onMouseEnter,\n onMouseLeave,\n onMouseMove: props.onMouseMove,\n onPointerDown: props.onPointerDown,\n onPointerEnter: props.onPointerEnter,\n ...childProps,\n className: cx(className, childProps.className),\n [refProp]: targetRef,\n })\n )}\n </>\n );\n});\n\nTooltip.classes = classes;\nTooltip.varsResolver = varsResolver;\nTooltip.displayName = '@mantine/core/Tooltip';\nTooltip.Floating = TooltipFloating;\nTooltip.Group = TooltipGroup;\n\nexport namespace Tooltip {\n export type Props = TooltipProps;\n export type Factory = TooltipFactory;\n export type CssVariables = TooltipCssVariables;\n export type StylesNames = TooltipStylesNames;\n\n export namespace Group {\n export type Props = TooltipGroupProps;\n export type ContextValue = TooltipGroupContextValue;\n }\n\n export namespace Floating {\n export type Props = TooltipFloatingProps;\n }\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.mjs","names":["classes"],"sources":["../../../src/components/Tree/Tree.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useClickOutside, useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TreeNode } from './TreeNode';\nimport { TreeController, useTree } from './use-tree';\nimport classes from './Tree.module.css';\n\nexport interface TreeNodeData {\n label: React.ReactNode;\n value: string;\n nodeProps?: Record<string, any>;\n children?: TreeNodeData[];\n}\n\nexport interface RenderTreeNodePayload {\n /** Node level in the tree */\n level: number;\n\n /** `true` if the node is expanded, applicable only for nodes with `children` */\n expanded: boolean;\n\n /** `true` if the node has non-empty `children` array */\n hasChildren: boolean;\n\n /** `true` if the node is selected */\n selected: boolean;\n\n /** Node data from the `data` prop of `Tree` */\n node: TreeNodeData;\n\n /** Tree controller instance, return value of `useTree` hook */\n tree: TreeController;\n\n /** Props to spread into the root node element */\n elementProps: {\n className: string;\n style: React.CSSProperties;\n onClick: (event: React.MouseEvent) => void;\n 'data-selected': boolean | undefined;\n 'data-value': string;\n };\n}\n\nexport type RenderNode = (payload: RenderTreeNodePayload) => React.ReactNode;\n\nexport type TreeStylesNames = 'root' | 'node' | 'subtree' | 'label';\nexport type TreeCssVariables = {\n root: '--level-offset';\n};\n\nexport interface TreeProps extends BoxProps, StylesApiProps<TreeFactory>, ElementProps<'ul'> {\n /** Data used to render nodes */\n data: TreeNodeData[];\n\n /** Horizontal padding of each subtree level, key of `theme.spacing` or any valid CSS value @default 'lg' */\n levelOffset?: MantineSpacing;\n\n /** If set, tree node with children is expanded on click @default true */\n expandOnClick?: boolean;\n\n /** If set, tree node with children is expanded on space key press @default true */\n expandOnSpace?: boolean;\n\n /** If set, tree node is checked on space key press @default false */\n checkOnSpace?: boolean;\n\n /** If set, tree node is selected on click @default false */\n selectOnClick?: boolean;\n\n /** Use-tree hook instance that can be used to manipulate component state */\n tree?: TreeController;\n\n /** A function to render tree node label */\n renderNode?: RenderNode;\n\n /** If set, selection is cleared when user clicks outside of the tree @default false */\n clearSelectionOnOutsideClick?: boolean;\n\n /** If set, tree nodes range can be selected with click when `Shift` key is pressed @default true */\n allowRangeSelection?: boolean;\n\n /** If set, subtree content is kept mounted when collapsed. React 19 `Activity` is used to preserve state. @default false */\n keepMounted?: boolean;\n}\n\nfunction getFlatValues(data: TreeNodeData[]): string[] {\n return data.reduce<string[]>((acc, item) => {\n acc.push(item.value);\n if (item.children) {\n acc.push(...getFlatValues(item.children));\n }\n return acc;\n }, []);\n}\n\nexport type TreeFactory = Factory<{\n props: TreeProps;\n ref: HTMLUListElement;\n stylesNames: TreeStylesNames;\n vars: TreeCssVariables;\n}>;\n\nconst defaultProps = {\n expandOnClick: true,\n allowRangeSelection: true,\n expandOnSpace: true,\n} satisfies Partial<TreeProps>;\n\nconst varsResolver = createVarsResolver<TreeFactory>((_theme, { levelOffset }) => ({\n root: {\n '--level-offset': getSpacing(levelOffset),\n },\n}));\n\nexport const Tree = factory<TreeFactory>((_props) => {\n const props = useProps('Tree', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n expandOnClick,\n tree,\n renderNode,\n selectOnClick,\n clearSelectionOnOutsideClick,\n allowRangeSelection,\n expandOnSpace,\n levelOffset,\n checkOnSpace,\n keepMounted,\n attributes,\n ref,\n ...others\n } = props;\n\n const defaultController = useTree();\n const controller = tree || defaultController;\n\n const getStyles = useStyles<TreeFactory>({\n name: 'Tree',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const clickOutsideRef = useClickOutside(\n () => clearSelectionOnOutsideClick && controller.clearSelected()\n );\n\n const mergedRef = useMergedRef(ref, clickOutsideRef);\n\n const flatValues = useMemo(() => getFlatValues(data), [data]);\n\n useEffect(() => {\n controller.initialize(data);\n }, [data]);\n\n const nodes = data.map((node, index) => (\n <TreeNode\n key={node.value}\n node={node}\n getStyles={getStyles}\n rootIndex={index}\n expandOnClick={expandOnClick}\n selectOnClick={selectOnClick}\n controller={controller}\n renderNode={renderNode}\n flatValues={flatValues}\n allowRangeSelection={allowRangeSelection}\n expandOnSpace={expandOnSpace}\n checkOnSpace={checkOnSpace}\n keepMounted={keepMounted}\n />\n ));\n\n return (\n <Box\n component=\"ul\"\n ref={mergedRef}\n {...getStyles('root')}\n {...others}\n role=\"tree\"\n aria-multiselectable={controller.multiple}\n data-tree-root\n >\n {nodes}\n </Box>\n );\n});\n\nTree.displayName = '@mantine/core/Tree';\nTree.classes = classes;\nTree.varsResolver = varsResolver;\n"],"mappings":";;;;;;;;;;;;;;AAiGA,SAAS,cAAc,MAAgC;AACrD,QAAO,KAAK,QAAkB,KAAK,SAAS;AAC1C,MAAI,KAAK,KAAK,MAAM;AACpB,MAAI,KAAK,SACP,KAAI,KAAK,GAAG,cAAc,KAAK,SAAS,CAAC;AAE3C,SAAO;IACN,EAAE,CAAC;;AAUR,MAAM,eAAe;CACnB,eAAe;CACf,qBAAqB;CACrB,eAAe;CAChB;AAED,MAAM,eAAe,oBAAiC,QAAQ,EAAE,mBAAmB,EACjF,MAAM,EACJ,kBAAkB,WAAW,YAAY,EAC1C,EACF,EAAE;AAEH,MAAa,OAAO,SAAsB,WAAW;CACnD,MAAM,QAAQ,SAAS,QAAQ,cAAc,OAAO;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,eACA,MACA,YACA,eACA,8BACA,qBACA,eACA,aACA,cACA,aACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,oBAAoB,SAAS;CACnC,MAAM,aAAa,QAAQ;CAE3B,MAAM,YAAY,UAAuB;EACvC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAMF,MAAM,YAAY,aAAa,KAJP,sBAChB,gCAAgC,WAAW,eAAe,CACjE,CAEmD;CAEpD,MAAM,aAAa,cAAc,cAAc,KAAK,EAAE,CAAC,KAAK,CAAC;AAE7D,iBAAgB;AACd,aAAW,WAAW,KAAK;IAC1B,CAAC,KAAK,CAAC;CAEV,MAAM,QAAQ,KAAK,KAAK,MAAM,UAC5B,oBAAC,UAAD;EAEQ;EACK;EACX,WAAW;EACI;EACA;EACH;EACA;EACA;EACS;EACN;EACD;EACD;EACb,EAbK,KAAK,MAaV,CACF;AAEF,QACE,oBAAC,KAAD;EACE,WAAU;EACV,KAAK;EACL,GAAI,UAAU,OAAO;EACrB,GAAI;EACJ,MAAK;EACL,wBAAsB,WAAW;EACjC,kBAAA;YAEC;EACG,CAAA;EAER;AAEF,KAAK,cAAc;AACnB,KAAK,UAAUA;AACf,KAAK,eAAe"}
|
|
1
|
+
{"version":3,"file":"Tree.mjs","names":["classes"],"sources":["../../../src/components/Tree/Tree.tsx"],"sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { useClickOutside, useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSpacing,\n MantineSpacing,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { TreeNode } from './TreeNode';\nimport { TreeController, useTree } from './use-tree';\nimport classes from './Tree.module.css';\n\nexport interface TreeNodeData {\n label: React.ReactNode;\n value: string;\n nodeProps?: Record<string, any>;\n children?: TreeNodeData[];\n}\n\nexport interface RenderTreeNodePayload {\n /** Node level in the tree */\n level: number;\n\n /** `true` if the node is expanded, applicable only for nodes with `children` */\n expanded: boolean;\n\n /** `true` if the node has non-empty `children` array */\n hasChildren: boolean;\n\n /** `true` if the node is selected */\n selected: boolean;\n\n /** Node data from the `data` prop of `Tree` */\n node: TreeNodeData;\n\n /** Tree controller instance, return value of `useTree` hook */\n tree: TreeController;\n\n /** Props to spread into the root node element */\n elementProps: {\n className: string;\n style: React.CSSProperties;\n onClick: (event: React.MouseEvent) => void;\n 'data-selected': boolean | undefined;\n 'data-value': string;\n };\n}\n\nexport type RenderNode = (payload: RenderTreeNodePayload) => React.ReactNode;\n\nexport type TreeStylesNames = 'root' | 'node' | 'subtree' | 'label';\nexport type TreeCssVariables = {\n root: '--level-offset';\n};\n\nexport interface TreeProps extends BoxProps, StylesApiProps<TreeFactory>, ElementProps<'ul'> {\n /** Data used to render nodes */\n data: TreeNodeData[];\n\n /** Horizontal padding of each subtree level, key of `theme.spacing` or any valid CSS value @default 'lg' */\n levelOffset?: MantineSpacing;\n\n /** If set, tree node with children is expanded on click @default true */\n expandOnClick?: boolean;\n\n /** If set, tree node with children is expanded on space key press @default true */\n expandOnSpace?: boolean;\n\n /** If set, tree node is checked on space key press @default false */\n checkOnSpace?: boolean;\n\n /** If set, tree node is selected on click @default false */\n selectOnClick?: boolean;\n\n /** Use-tree hook instance that can be used to manipulate component state */\n tree?: TreeController;\n\n /** A function to render tree node label */\n renderNode?: RenderNode;\n\n /** If set, selection is cleared when user clicks outside of the tree @default false */\n clearSelectionOnOutsideClick?: boolean;\n\n /** If set, tree nodes range can be selected with click when `Shift` key is pressed @default true */\n allowRangeSelection?: boolean;\n\n /** If set, subtree content is kept mounted when collapsed. React 19 `Activity` is used to preserve state. @default false */\n keepMounted?: boolean;\n}\n\nfunction getFlatValues(data: TreeNodeData[]): string[] {\n return data.reduce<string[]>((acc, item) => {\n acc.push(item.value);\n if (item.children) {\n acc.push(...getFlatValues(item.children));\n }\n return acc;\n }, []);\n}\n\nexport type TreeFactory = Factory<{\n props: TreeProps;\n ref: HTMLUListElement;\n stylesNames: TreeStylesNames;\n vars: TreeCssVariables;\n}>;\n\nconst defaultProps = {\n expandOnClick: true,\n allowRangeSelection: true,\n expandOnSpace: true,\n} satisfies Partial<TreeProps>;\n\nconst varsResolver = createVarsResolver<TreeFactory>((_theme, { levelOffset }) => ({\n root: {\n '--level-offset': getSpacing(levelOffset),\n },\n}));\n\nexport const Tree = factory<TreeFactory>((_props) => {\n const props = useProps('Tree', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n data,\n expandOnClick,\n tree,\n renderNode,\n selectOnClick,\n clearSelectionOnOutsideClick,\n allowRangeSelection,\n expandOnSpace,\n levelOffset,\n checkOnSpace,\n keepMounted,\n attributes,\n ref,\n ...others\n } = props;\n\n const defaultController = useTree();\n const controller = tree || defaultController;\n\n const getStyles = useStyles<TreeFactory>({\n name: 'Tree',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n vars,\n varsResolver,\n });\n\n const clickOutsideRef = useClickOutside(\n () => clearSelectionOnOutsideClick && controller.clearSelected()\n );\n\n const mergedRef = useMergedRef(ref, clickOutsideRef);\n\n const flatValues = useMemo(() => getFlatValues(data), [data]);\n\n useEffect(() => {\n controller.initialize(data);\n }, [data]);\n\n const nodes = data.map((node, index) => (\n <TreeNode\n key={node.value}\n node={node}\n getStyles={getStyles}\n rootIndex={index}\n expandOnClick={expandOnClick}\n selectOnClick={selectOnClick}\n controller={controller}\n renderNode={renderNode}\n flatValues={flatValues}\n allowRangeSelection={allowRangeSelection}\n expandOnSpace={expandOnSpace}\n checkOnSpace={checkOnSpace}\n keepMounted={keepMounted}\n />\n ));\n\n return (\n <Box\n component=\"ul\"\n ref={mergedRef}\n {...getStyles('root')}\n {...others}\n role=\"tree\"\n aria-multiselectable={controller.multiple}\n data-tree-root\n >\n {nodes}\n </Box>\n );\n});\n\nTree.displayName = '@mantine/core/Tree';\nTree.classes = classes;\nTree.varsResolver = varsResolver;\n\nexport namespace Tree {\n export type Props = TreeProps;\n export type StylesNames = TreeStylesNames;\n export type Factory = TreeFactory;\n export type NodeData = TreeNodeData;\n export type RenderNodePayload = RenderTreeNodePayload;\n}\n"],"mappings":";;;;;;;;;;;;;;AAiGA,SAAS,cAAc,MAAgC;AACrD,QAAO,KAAK,QAAkB,KAAK,SAAS;AAC1C,MAAI,KAAK,KAAK,MAAM;AACpB,MAAI,KAAK,SACP,KAAI,KAAK,GAAG,cAAc,KAAK,SAAS,CAAC;AAE3C,SAAO;IACN,EAAE,CAAC;;AAUR,MAAM,eAAe;CACnB,eAAe;CACf,qBAAqB;CACrB,eAAe;CAChB;AAED,MAAM,eAAe,oBAAiC,QAAQ,EAAE,mBAAmB,EACjF,MAAM,EACJ,kBAAkB,WAAW,YAAY,EAC1C,EACF,EAAE;AAEH,MAAa,OAAO,SAAsB,WAAW;CACnD,MAAM,QAAQ,SAAS,QAAQ,cAAc,OAAO;CACpD,MAAM,EACJ,YACA,WACA,OACA,QACA,UACA,MACA,MACA,eACA,MACA,YACA,eACA,8BACA,qBACA,eACA,aACA,cACA,aACA,YACA,KACA,GAAG,WACD;CAEJ,MAAM,oBAAoB,SAAS;CACnC,MAAM,aAAa,QAAQ;CAE3B,MAAM,YAAY,UAAuB;EACvC,MAAM;EACN,SAAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAMF,MAAM,YAAY,aAAa,KAJP,sBAChB,gCAAgC,WAAW,eAAe,CACjE,CAEmD;CAEpD,MAAM,aAAa,cAAc,cAAc,KAAK,EAAE,CAAC,KAAK,CAAC;AAE7D,iBAAgB;AACd,aAAW,WAAW,KAAK;IAC1B,CAAC,KAAK,CAAC;CAEV,MAAM,QAAQ,KAAK,KAAK,MAAM,UAC5B,oBAAC,UAAD;EAEQ;EACK;EACX,WAAW;EACI;EACA;EACH;EACA;EACA;EACS;EACN;EACD;EACD;EACb,EAbK,KAAK,MAaV,CACF;AAEF,QACE,oBAAC,KAAD;EACE,WAAU;EACV,KAAK;EACL,GAAI,UAAU,OAAO;EACrB,GAAI;EACJ,MAAK;EACL,wBAAsB,WAAW;EACjC,kBAAA;YAEC;EACG,CAAA;EAER;AAEF,KAAK,cAAc;AACnB,KAAK,UAAUA;AACf,KAAK,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.mjs","names":["classes"],"sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Typography.module.css';\n\nexport type TypographyStylesNames = 'root';\n\nexport interface TypographyProps\n extends BoxProps, StylesApiProps<TypographyFactory>, ElementProps<'div'> {}\n\nexport type TypographyFactory = Factory<{\n props: TypographyProps;\n ref: HTMLDivElement;\n stylesNames: TypographyStylesNames;\n}>;\n\nexport const Typography = factory<TypographyFactory>((_props) => {\n const props = useProps('Typography', null, _props);\n const { classNames, className, style, styles, unstyled, attributes, ...others } = props;\n\n const getStyles = useStyles<TypographyFactory>({\n name: 'Typography',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nTypography.classes = classes;\nTypography.displayName = '@mantine/core/Typography';\n"],"mappings":";;;;;;;;AAuBA,MAAa,aAAa,SAA4B,WAAW;CAC/D,MAAM,QAAQ,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,YAAY,GAAG,WAAW;AAclF,QAAO,oBAAC,KAAD;EAAK,GAZM,UAA6B;GAC7C,MAAM;GACN,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEwB,OAAO;EAAE,GAAI;EAAU,CAAA;EACjD;AAEF,WAAW,UAAUA;AACrB,WAAW,cAAc"}
|
|
1
|
+
{"version":3,"file":"Typography.mjs","names":["classes"],"sources":["../../../src/components/Typography/Typography.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './Typography.module.css';\n\nexport type TypographyStylesNames = 'root';\n\nexport interface TypographyProps\n extends BoxProps, StylesApiProps<TypographyFactory>, ElementProps<'div'> {}\n\nexport type TypographyFactory = Factory<{\n props: TypographyProps;\n ref: HTMLDivElement;\n stylesNames: TypographyStylesNames;\n}>;\n\nexport const Typography = factory<TypographyFactory>((_props) => {\n const props = useProps('Typography', null, _props);\n const { classNames, className, style, styles, unstyled, attributes, ...others } = props;\n\n const getStyles = useStyles<TypographyFactory>({\n name: 'Typography',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box {...getStyles('root')} {...others} />;\n});\n\nTypography.classes = classes;\nTypography.displayName = '@mantine/core/Typography';\n\nexport namespace Typography {\n export type Props = TypographyProps;\n export type StylesNames = TypographyStylesNames;\n export type Factory = TypographyFactory;\n}\n"],"mappings":";;;;;;;;AAuBA,MAAa,aAAa,SAA4B,WAAW;CAC/D,MAAM,QAAQ,SAAS,cAAc,MAAM,OAAO;CAClD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,YAAY,GAAG,WAAW;AAclF,QAAO,oBAAC,KAAD;EAAK,GAZM,UAA6B;GAC7C,MAAM;GACN,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEwB,OAAO;EAAE,GAAI;EAAU,CAAA;EACjD;AAEF,WAAW,UAAUA;AACrB,WAAW,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnstyledButton.mjs","names":["classes"],"sources":["../../../src/components/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import {\n Box,\n BoxComponentProps,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './UnstyledButton.module.css';\n\nexport type UnstyledButtonStylesNames = 'root';\n\nexport interface UnstyledButtonProps\n extends Omit<BoxComponentProps, 'vars' | 'variant'>, StylesApiProps<UnstyledButtonFactory> {\n __staticSelector?: string;\n}\n\nconst defaultProps = {\n __staticSelector: 'UnstyledButton',\n} satisfies Partial<UnstyledButtonProps>;\n\nexport type UnstyledButtonFactory = PolymorphicFactory<{\n props: UnstyledButtonProps;\n stylesNames: UnstyledButtonStylesNames;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n}>;\n\nexport const UnstyledButton = polymorphicFactory<UnstyledButtonFactory>(\n (_props: UnstyledButtonProps & { component?: any }) => {\n const props = useProps('UnstyledButton', defaultProps, _props);\n const {\n className,\n component = 'button',\n __staticSelector,\n unstyled,\n classNames,\n styles,\n style,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<UnstyledButtonFactory>({\n name: __staticSelector,\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={component}\n type={component === 'button' ? 'button' : undefined}\n {...others}\n />\n );\n }\n);\n\nUnstyledButton.classes = classes;\nUnstyledButton.displayName = '@mantine/core/UnstyledButton';\n"],"mappings":";;;;;;;;AAkBA,MAAM,eAAe,EACnB,kBAAkB,kBACnB;AASD,MAAa,iBAAiB,oBAC3B,WAAsD;CACrD,MAAM,QAAQ,SAAS,kBAAkB,cAAc,OAAO;CAC9D,MAAM,EACJ,WACA,YAAY,UACZ,kBACA,UACA,YACA,QACA,OACA,YACA,GAAG,WACD;AAcJ,QACE,oBAAC,KAAD;EACE,GAdc,UAAiC;GACjD,MAAM;GACN;GACA,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAIgB,QAAQ,EAAE,WAAW,MAAM,CAAC;EAC/B;EACX,MAAM,cAAc,WAAW,WAAW,KAAA;EAC1C,GAAI;EACJ,CAAA;EAGP;AAED,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
1
|
+
{"version":3,"file":"UnstyledButton.mjs","names":["classes"],"sources":["../../../src/components/UnstyledButton/UnstyledButton.tsx"],"sourcesContent":["import {\n Box,\n BoxComponentProps,\n polymorphicFactory,\n PolymorphicFactory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './UnstyledButton.module.css';\n\nexport type UnstyledButtonStylesNames = 'root';\n\nexport interface UnstyledButtonProps\n extends Omit<BoxComponentProps, 'vars' | 'variant'>, StylesApiProps<UnstyledButtonFactory> {\n __staticSelector?: string;\n}\n\nconst defaultProps = {\n __staticSelector: 'UnstyledButton',\n} satisfies Partial<UnstyledButtonProps>;\n\nexport type UnstyledButtonFactory = PolymorphicFactory<{\n props: UnstyledButtonProps;\n stylesNames: UnstyledButtonStylesNames;\n defaultComponent: 'button';\n defaultRef: HTMLButtonElement;\n}>;\n\nexport const UnstyledButton = polymorphicFactory<UnstyledButtonFactory>(\n (_props: UnstyledButtonProps & { component?: any }) => {\n const props = useProps('UnstyledButton', defaultProps, _props);\n const {\n className,\n component = 'button',\n __staticSelector,\n unstyled,\n classNames,\n styles,\n style,\n attributes,\n ...others\n } = props;\n\n const getStyles = useStyles<UnstyledButtonFactory>({\n name: __staticSelector,\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return (\n <Box\n {...getStyles('root', { focusable: true })}\n component={component}\n type={component === 'button' ? 'button' : undefined}\n {...others}\n />\n );\n }\n);\n\nUnstyledButton.classes = classes;\nUnstyledButton.displayName = '@mantine/core/UnstyledButton';\n\nexport namespace UnstyledButton {\n export type Props = UnstyledButtonProps;\n export type StylesNames = UnstyledButtonStylesNames;\n export type Factory = UnstyledButtonFactory;\n}\n"],"mappings":";;;;;;;;AAkBA,MAAM,eAAe,EACnB,kBAAkB,kBACnB;AASD,MAAa,iBAAiB,oBAC3B,WAAsD;CACrD,MAAM,QAAQ,SAAS,kBAAkB,cAAc,OAAO;CAC9D,MAAM,EACJ,WACA,YAAY,UACZ,kBACA,UACA,YACA,QACA,OACA,YACA,GAAG,WACD;AAcJ,QACE,oBAAC,KAAD;EACE,GAdc,UAAiC;GACjD,MAAM;GACN;GACA,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAIgB,QAAQ,EAAE,WAAW,MAAM,CAAC;EAC/B;EACX,MAAM,cAAc,WAAW,WAAW,KAAA;EAC1C,GAAI;EACJ,CAAA;EAGP;AAED,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VisuallyHidden.mjs","names":["classes"],"sources":["../../../src/components/VisuallyHidden/VisuallyHidden.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './VisuallyHidden.module.css';\n\nexport type VisuallyHiddenStylesNames = 'root';\n\nexport interface VisuallyHiddenProps\n extends BoxProps, StylesApiProps<VisuallyHiddenFactory>, ElementProps<'span'> {}\n\nexport type VisuallyHiddenFactory = Factory<{\n props: VisuallyHiddenProps;\n ref: HTMLSpanElement;\n stylesNames: VisuallyHiddenStylesNames;\n}>;\n\nexport const VisuallyHidden = factory<VisuallyHiddenFactory>((_props) => {\n const props = useProps('VisuallyHidden', null, _props);\n const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;\n\n const getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box component=\"span\" {...getStyles('root')} {...others} />;\n});\n\nVisuallyHidden.classes = classes;\nVisuallyHidden.displayName = '@mantine/core/VisuallyHidden';\n"],"mappings":";;;;;;;;AAuBA,MAAa,iBAAiB,SAAgC,WAAW;CACvE,MAAM,QAAQ,SAAS,kBAAkB,MAAM,OAAO;CACtD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,MAAM,YAAY,GAAG,WAAW;AAcxF,QAAO,oBAAC,KAAD;EAAK,WAAU;EAAO,GAZX,UAAiC;GACjD,MAAM;GACN,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEyC,OAAO;EAAE,GAAI;EAAU,CAAA;EAClE;AAEF,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
1
|
+
{"version":3,"file":"VisuallyHidden.mjs","names":["classes"],"sources":["../../../src/components/VisuallyHidden/VisuallyHidden.tsx"],"sourcesContent":["import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './VisuallyHidden.module.css';\n\nexport type VisuallyHiddenStylesNames = 'root';\n\nexport interface VisuallyHiddenProps\n extends BoxProps, StylesApiProps<VisuallyHiddenFactory>, ElementProps<'span'> {}\n\nexport type VisuallyHiddenFactory = Factory<{\n props: VisuallyHiddenProps;\n ref: HTMLSpanElement;\n stylesNames: VisuallyHiddenStylesNames;\n}>;\n\nexport const VisuallyHidden = factory<VisuallyHiddenFactory>((_props) => {\n const props = useProps('VisuallyHidden', null, _props);\n const { classNames, className, style, styles, unstyled, vars, attributes, ...others } = props;\n\n const getStyles = useStyles<VisuallyHiddenFactory>({\n name: 'VisuallyHidden',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n attributes,\n });\n\n return <Box component=\"span\" {...getStyles('root')} {...others} />;\n});\n\nVisuallyHidden.classes = classes;\nVisuallyHidden.displayName = '@mantine/core/VisuallyHidden';\n\nexport namespace VisuallyHidden {\n export type Props = VisuallyHiddenProps;\n}\n"],"mappings":";;;;;;;;AAuBA,MAAa,iBAAiB,SAAgC,WAAW;CACvE,MAAM,QAAQ,SAAS,kBAAkB,MAAM,OAAO;CACtD,MAAM,EAAE,YAAY,WAAW,OAAO,QAAQ,UAAU,MAAM,YAAY,GAAG,WAAW;AAcxF,QAAO,oBAAC,KAAD;EAAK,WAAU;EAAO,GAZX,UAAiC;GACjD,MAAM;GACN,SAAA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAAC,CAEyC,OAAO;EAAE,GAAI;EAAU,CAAA;EAClE;AAEF,eAAe,UAAUA;AACzB,eAAe,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage-manager.mjs","names":[],"sources":["../../../../src/core/MantineProvider/color-scheme-managers/local-storage-manager.ts"],"sourcesContent":["import { isMantineColorScheme } from './is-mantine-color-scheme';\nimport type { MantineColorSchemeManager } from './types';\n\nexport interface LocalStorageColorSchemeManagerOptions {\n /** Local storage key used to retrieve value with `localStorage.getItem(key)`, `mantine-color-scheme-value` by default */\n key?: string;\n}\n\nexport function localStorageColorSchemeManager({\n key = 'mantine-color-scheme-value',\n}: LocalStorageColorSchemeManagerOptions = {}): MantineColorSchemeManager {\n let handleStorageEvent: (event: StorageEvent) => void;\n\n return {\n get: (defaultValue) => {\n if (typeof window === 'undefined') {\n return defaultValue;\n }\n\n try {\n const storedColorScheme = window.localStorage.getItem(key);\n return isMantineColorScheme(storedColorScheme) ? storedColorScheme : defaultValue;\n } catch {\n return defaultValue;\n }\n },\n\n set: (value) => {\n try {\n window.localStorage.setItem(key, value);\n } catch (error) {\n //
|
|
1
|
+
{"version":3,"file":"local-storage-manager.mjs","names":[],"sources":["../../../../src/core/MantineProvider/color-scheme-managers/local-storage-manager.ts"],"sourcesContent":["import { isMantineColorScheme } from './is-mantine-color-scheme';\nimport type { MantineColorSchemeManager } from './types';\n\nexport interface LocalStorageColorSchemeManagerOptions {\n /** Local storage key used to retrieve value with `localStorage.getItem(key)`, `mantine-color-scheme-value` by default */\n key?: string;\n}\n\nexport function localStorageColorSchemeManager({\n key = 'mantine-color-scheme-value',\n}: LocalStorageColorSchemeManagerOptions = {}): MantineColorSchemeManager {\n let handleStorageEvent: (event: StorageEvent) => void;\n\n return {\n get: (defaultValue) => {\n if (typeof window === 'undefined') {\n return defaultValue;\n }\n\n try {\n const storedColorScheme = window.localStorage.getItem(key);\n return isMantineColorScheme(storedColorScheme) ? storedColorScheme : defaultValue;\n } catch {\n return defaultValue;\n }\n },\n\n set: (value) => {\n try {\n window.localStorage.setItem(key, value);\n } catch (error) {\n // oxlint-disable-next-line no-console\n console.warn(\n '[@mantine/core] Local storage color scheme manager was unable to save color scheme.',\n error\n );\n }\n },\n\n subscribe: (onUpdate) => {\n handleStorageEvent = (event) => {\n if (event.storageArea === window.localStorage && event.key === key) {\n isMantineColorScheme(event.newValue) && onUpdate(event.newValue);\n }\n };\n\n window.addEventListener('storage', handleStorageEvent);\n },\n\n unsubscribe: () => {\n window.removeEventListener('storage', handleStorageEvent);\n },\n\n clear: () => {\n window.localStorage.removeItem(key);\n },\n };\n}\n"],"mappings":";;;AAQA,SAAgB,+BAA+B,EAC7C,MAAM,iCACmC,EAAE,EAA6B;CACxE,IAAI;AAEJ,QAAO;EACL,MAAM,iBAAiB;AACrB,OAAI,OAAO,WAAW,YACpB,QAAO;AAGT,OAAI;IACF,MAAM,oBAAoB,OAAO,aAAa,QAAQ,IAAI;AAC1D,WAAO,qBAAqB,kBAAkB,GAAG,oBAAoB;WAC/D;AACN,WAAO;;;EAIX,MAAM,UAAU;AACd,OAAI;AACF,WAAO,aAAa,QAAQ,KAAK,MAAM;YAChC,OAAO;AAEd,YAAQ,KACN,uFACA,MACD;;;EAIL,YAAY,aAAa;AACvB,yBAAsB,UAAU;AAC9B,QAAI,MAAM,gBAAgB,OAAO,gBAAgB,MAAM,QAAQ,IAC7D,sBAAqB,MAAM,SAAS,IAAI,SAAS,MAAM,SAAS;;AAIpE,UAAO,iBAAiB,WAAW,mBAAmB;;EAGxD,mBAAmB;AACjB,UAAO,oBAAoB,WAAW,mBAAmB;;EAG3D,aAAa;AACX,UAAO,aAAa,WAAW,IAAI;;EAEtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-element-ancestor.mjs","names":[],"sources":["../../../../src/core/utils/find-element-ancestor/find-element-ancestor.ts"],"sourcesContent":["/*
|
|
1
|
+
{"version":3,"file":"find-element-ancestor.mjs","names":[],"sources":["../../../../src/core/utils/find-element-ancestor/find-element-ancestor.ts"],"sourcesContent":["/* oxlint-disable no-empty */\nexport function findElementAncestor(element: HTMLElement, selector: string) {\n let _element: HTMLElement | null = element;\n while ((_element = _element.parentElement) && !_element.matches(selector)) {}\n return _element;\n}\n"],"mappings":";;AACA,SAAgB,oBAAoB,SAAsB,UAAkB;CAC1E,IAAI,WAA+B;AACnC,SAAQ,WAAW,SAAS,kBAAkB,CAAC,SAAS,QAAQ,SAAS;AACzE,QAAO"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, MantineRadius, StylesApiProps } from '../../core';
|
|
2
2
|
import { AccordionChevronPosition, AccordionHeadingOrder, AccordionValue } from './Accordion.types';
|
|
3
3
|
import { AccordionChevron } from './AccordionChevron';
|
|
4
|
-
import { AccordionControl } from './AccordionControl/AccordionControl';
|
|
5
|
-
import { AccordionItem } from './AccordionItem/AccordionItem';
|
|
6
|
-
import { AccordionPanel } from './AccordionPanel/AccordionPanel';
|
|
4
|
+
import { AccordionControl, type AccordionControlProps } from './AccordionControl/AccordionControl';
|
|
5
|
+
import { AccordionItem, type AccordionItemProps } from './AccordionItem/AccordionItem';
|
|
6
|
+
import { AccordionPanel, type AccordionPanelProps } from './AccordionPanel/AccordionPanel';
|
|
7
|
+
import type { AccordionItemContextValue } from './AccordionItem.context';
|
|
7
8
|
export type AccordionStylesNames = 'root' | 'content' | 'item' | 'panel' | 'icon' | 'chevron' | 'label' | 'itemTitle' | 'control';
|
|
8
9
|
export type AccordionVariant = 'default' | 'contained' | 'filled' | 'separated';
|
|
9
10
|
export type AccordionCssVariables = {
|
|
@@ -115,3 +116,20 @@ export declare const Accordion: (<Multiple extends boolean = false>(props: Accor
|
|
|
115
116
|
}> & {
|
|
116
117
|
displayName?: string;
|
|
117
118
|
};
|
|
119
|
+
export declare namespace Accordion {
|
|
120
|
+
type Props = AccordionProps;
|
|
121
|
+
type StylesNames = AccordionStylesNames;
|
|
122
|
+
type CssVariables = AccordionCssVariables;
|
|
123
|
+
type Factory = AccordionFactory;
|
|
124
|
+
type Variant = AccordionVariant;
|
|
125
|
+
namespace Control {
|
|
126
|
+
type Props = AccordionControlProps;
|
|
127
|
+
}
|
|
128
|
+
namespace Item {
|
|
129
|
+
type Props = AccordionItemProps;
|
|
130
|
+
type Context = AccordionItemContextValue;
|
|
131
|
+
}
|
|
132
|
+
namespace Panel {
|
|
133
|
+
type Props = AccordionPanelProps;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -14,20 +14,3 @@ export { AccordionControl } from './AccordionControl/AccordionControl';
|
|
|
14
14
|
export { useAccordionContext } from './Accordion.context';
|
|
15
15
|
export { useAccordionItemContext } from './AccordionItem.context';
|
|
16
16
|
export type { AccordionProps, AccordionStylesNames, AccordionCssVariables, AccordionFactory, AccordionVariant, AccordionControlProps, AccordionItemProps, AccordionPanelProps, AccordionChevronProps, AccordionValue, AccordionHeadingOrder, AccordionContextValue, AccordionItemContextValue, };
|
|
17
|
-
export declare namespace Accordion {
|
|
18
|
-
type Props = AccordionProps;
|
|
19
|
-
type StylesNames = AccordionStylesNames;
|
|
20
|
-
type CssVariables = AccordionCssVariables;
|
|
21
|
-
type Factory = AccordionFactory;
|
|
22
|
-
type Variant = AccordionVariant;
|
|
23
|
-
namespace Control {
|
|
24
|
-
type Props = AccordionControlProps;
|
|
25
|
-
}
|
|
26
|
-
namespace Item {
|
|
27
|
-
type Props = AccordionItemProps;
|
|
28
|
-
type Context = AccordionItemContextValue;
|
|
29
|
-
}
|
|
30
|
-
namespace Panel {
|
|
31
|
-
type Props = AccordionPanelProps;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxProps, MantineColor, MantineGradient, MantineRadius, MantineSize, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
2
|
import { LoaderProps } from '../Loader';
|
|
3
|
-
import { ActionIconGroup } from './ActionIconGroup/ActionIconGroup';
|
|
4
|
-
import { ActionIconGroupSection } from './ActionIconGroupSection/ActionIconGroupSection';
|
|
3
|
+
import { ActionIconGroup, type ActionIconGroupProps, type ActionIconGroupStylesNames, type ActionIconGroupCssVariables, type ActionIconGroupFactory } from './ActionIconGroup/ActionIconGroup';
|
|
4
|
+
import { ActionIconGroupSection, type ActionIconGroupSectionProps, type ActionIconGroupSectionStylesNames, type ActionIconGroupSectionCssVariables, type ActionIconGroupSectionFactory } from './ActionIconGroupSection/ActionIconGroupSection';
|
|
5
5
|
export type ActionIconVariant = 'filled' | 'light' | 'outline' | 'transparent' | 'white' | 'subtle' | 'default' | 'gradient';
|
|
6
6
|
export type ActionIconStylesNames = 'root' | 'loader' | 'icon';
|
|
7
7
|
export type ActionIconCssVariables = {
|
|
@@ -99,3 +99,21 @@ export declare const ActionIcon: (<C = "button">(props: import("../..").Polymorp
|
|
|
99
99
|
Group: typeof ActionIconGroup;
|
|
100
100
|
GroupSection: typeof ActionIconGroupSection;
|
|
101
101
|
};
|
|
102
|
+
export declare namespace ActionIcon {
|
|
103
|
+
type Props = ActionIconProps;
|
|
104
|
+
type StylesNames = ActionIconStylesNames;
|
|
105
|
+
type CssVariables = ActionIconCssVariables;
|
|
106
|
+
type Factory = ActionIconFactory;
|
|
107
|
+
namespace Group {
|
|
108
|
+
type Props = ActionIconGroupProps;
|
|
109
|
+
type StylesNames = ActionIconGroupStylesNames;
|
|
110
|
+
type CssVariables = ActionIconGroupCssVariables;
|
|
111
|
+
type Factory = ActionIconGroupFactory;
|
|
112
|
+
}
|
|
113
|
+
namespace GroupSection {
|
|
114
|
+
type Props = ActionIconGroupSectionProps;
|
|
115
|
+
type StylesNames = ActionIconGroupSectionStylesNames;
|
|
116
|
+
type CssVariables = ActionIconGroupSectionCssVariables;
|
|
117
|
+
type Factory = ActionIconGroupSectionFactory;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -5,21 +5,3 @@ export { ActionIcon } from './ActionIcon';
|
|
|
5
5
|
export { ActionIconGroup } from './ActionIconGroup/ActionIconGroup';
|
|
6
6
|
export { ActionIconGroupSection } from './ActionIconGroupSection/ActionIconGroupSection';
|
|
7
7
|
export type { ActionIconProps, ActionIconStylesNames, ActionIconFactory, ActionIconCssVariables, ActionIconVariant, ActionIconGroupProps, ActionIconGroupCssVariables, ActionIconGroupStylesNames, ActionIconGroupFactory, ActionIconGroupSectionProps, ActionIconGroupSectionCssVariables, ActionIconGroupSectionStylesNames, ActionIconGroupSectionFactory, };
|
|
8
|
-
export declare namespace ActionIcon {
|
|
9
|
-
type Props = ActionIconProps;
|
|
10
|
-
type StylesNames = ActionIconStylesNames;
|
|
11
|
-
type CssVariables = ActionIconCssVariables;
|
|
12
|
-
type Factory = ActionIconFactory;
|
|
13
|
-
namespace Group {
|
|
14
|
-
type Props = ActionIconGroupProps;
|
|
15
|
-
type StylesNames = ActionIconGroupStylesNames;
|
|
16
|
-
type CssVariables = ActionIconGroupCssVariables;
|
|
17
|
-
type Factory = ActionIconGroupFactory;
|
|
18
|
-
}
|
|
19
|
-
namespace GroupSection {
|
|
20
|
-
type Props = ActionIconGroupSectionProps;
|
|
21
|
-
type StylesNames = ActionIconGroupSectionStylesNames;
|
|
22
|
-
type CssVariables = ActionIconGroupSectionCssVariables;
|
|
23
|
-
type Factory = ActionIconGroupSectionFactory;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -34,3 +34,9 @@ export declare const Affix: import("../..").MantineComponent<{
|
|
|
34
34
|
stylesNames: AffixStylesNames;
|
|
35
35
|
vars: AffixCssVariables;
|
|
36
36
|
}>;
|
|
37
|
+
export declare namespace Affix {
|
|
38
|
+
type Props = AffixProps;
|
|
39
|
+
type StylesNames = AffixStylesNames;
|
|
40
|
+
type CssVariables = AffixCssVariables;
|
|
41
|
+
type Factory = AffixFactory;
|
|
42
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { AffixBaseProps, AffixCssVariables, AffixFactory, AffixPosition, AffixProps, AffixStylesNames } from './Affix';
|
|
2
2
|
export { Affix } from './Affix';
|
|
3
3
|
export type { AffixCssVariables, AffixFactory, AffixProps, AffixStylesNames, AffixBaseProps, AffixPosition, };
|
|
4
|
-
export declare namespace Affix {
|
|
5
|
-
type Props = AffixProps;
|
|
6
|
-
type StylesNames = AffixStylesNames;
|
|
7
|
-
type CssVariables = AffixCssVariables;
|
|
8
|
-
type Factory = AffixFactory;
|
|
9
|
-
}
|
|
@@ -36,3 +36,9 @@ export declare const Alert: import("../..").MantineComponent<{
|
|
|
36
36
|
vars: AlertCssVariables;
|
|
37
37
|
variant: AlertVariant;
|
|
38
38
|
}>;
|
|
39
|
+
export declare namespace Alert {
|
|
40
|
+
type Props = AlertProps;
|
|
41
|
+
type StylesNames = AlertStylesNames;
|
|
42
|
+
type CssVariables = AlertCssVariables;
|
|
43
|
+
type Factory = AlertFactory;
|
|
44
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { AlertCssVariables, AlertFactory, AlertProps, AlertStylesNames, AlertVariant } from './Alert';
|
|
2
2
|
export { Alert } from './Alert';
|
|
3
3
|
export type { AlertProps, AlertStylesNames, AlertCssVariables, AlertFactory, AlertVariant };
|
|
4
|
-
export declare namespace Alert {
|
|
5
|
-
type Props = AlertProps;
|
|
6
|
-
type StylesNames = AlertStylesNames;
|
|
7
|
-
type CssVariables = AlertCssVariables;
|
|
8
|
-
type Factory = AlertFactory;
|
|
9
|
-
}
|
|
@@ -54,3 +54,10 @@ export declare const Anchor: (<C = "a">(props: import("../..").PolymorphicCompon
|
|
|
54
54
|
vars: AnchorCssVariables;
|
|
55
55
|
variant: AnchorVariant;
|
|
56
56
|
}> & Record<string, never>;
|
|
57
|
+
export declare namespace Anchor {
|
|
58
|
+
type Props = AnchorProps;
|
|
59
|
+
type StylesNames = AnchorStylesNames;
|
|
60
|
+
type CssVariables = AnchorCssVariables;
|
|
61
|
+
type Factory = AnchorFactory;
|
|
62
|
+
type Variant = AnchorVariant;
|
|
63
|
+
}
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
import type { AnchorCssVariables, AnchorFactory, AnchorProps, AnchorStylesNames, AnchorVariant } from './Anchor';
|
|
2
1
|
export { Anchor } from './Anchor';
|
|
3
2
|
export type { AnchorProps, AnchorStylesNames, AnchorCssVariables, AnchorFactory, AnchorVariant, } from './Anchor';
|
|
4
|
-
export declare namespace Anchor {
|
|
5
|
-
type Props = AnchorProps;
|
|
6
|
-
type StylesNames = AnchorStylesNames;
|
|
7
|
-
type CssVariables = AnchorCssVariables;
|
|
8
|
-
type Factory = AnchorFactory;
|
|
9
|
-
type Variant = AnchorVariant;
|
|
10
|
-
}
|
|
@@ -52,3 +52,9 @@ export declare const AngleSlider: import("../..").MantineComponent<{
|
|
|
52
52
|
stylesNames: AngleSliderStylesNames;
|
|
53
53
|
vars: AngleSliderCssVariables;
|
|
54
54
|
}>;
|
|
55
|
+
export declare namespace AngleSlider {
|
|
56
|
+
type Props = AngleSliderProps;
|
|
57
|
+
type StylesNames = AngleSliderStylesNames;
|
|
58
|
+
type CssVariables = AngleSliderCssVariables;
|
|
59
|
+
type Factory = AngleSliderFactory;
|
|
60
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { AngleSliderCssVariables, AngleSliderFactory, AngleSliderProps, AngleSliderStylesNames } from './AngleSlider';
|
|
2
2
|
export { AngleSlider } from './AngleSlider';
|
|
3
3
|
export type { AngleSliderCssVariables, AngleSliderFactory, AngleSliderProps, AngleSliderStylesNames, };
|
|
4
|
-
export declare namespace AngleSlider {
|
|
5
|
-
type Props = AngleSliderProps;
|
|
6
|
-
type StylesNames = AngleSliderStylesNames;
|
|
7
|
-
type CssVariables = AngleSliderCssVariables;
|
|
8
|
-
type Factory = AngleSliderFactory;
|
|
9
|
-
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, MantineSpacing, StylesApiProps } from '../../core';
|
|
2
2
|
import { AppShellAsideConfiguration, AppShellFooterConfiguration, AppShellHeaderConfiguration, AppShellNavbarConfiguration, AppShellResponsiveSize } from './AppShell.types';
|
|
3
|
-
import { AppShellAside } from './AppShellAside/AppShellAside';
|
|
4
|
-
import { AppShellFooter } from './AppShellFooter/AppShellFooter';
|
|
5
|
-
import { AppShellHeader } from './AppShellHeader/AppShellHeader';
|
|
6
|
-
import { AppShellMain } from './AppShellMain/AppShellMain';
|
|
7
|
-
import { AppShellNavbar } from './AppShellNavbar/AppShellNavbar';
|
|
8
|
-
import { AppShellSection } from './AppShellSection/AppShellSection';
|
|
3
|
+
import { AppShellAside, type AppShellAsideProps } from './AppShellAside/AppShellAside';
|
|
4
|
+
import { AppShellFooter, type AppShellFooterProps } from './AppShellFooter/AppShellFooter';
|
|
5
|
+
import { AppShellHeader, type AppShellHeaderProps } from './AppShellHeader/AppShellHeader';
|
|
6
|
+
import { AppShellMain, type AppShellMainProps } from './AppShellMain/AppShellMain';
|
|
7
|
+
import { AppShellNavbar, type AppShellNavbarProps } from './AppShellNavbar/AppShellNavbar';
|
|
8
|
+
import { AppShellSection, type AppShellSectionProps } from './AppShellSection/AppShellSection';
|
|
9
9
|
export type AppShellStylesNames = 'root' | 'navbar' | 'main' | 'header' | 'footer' | 'aside' | 'section';
|
|
10
10
|
export type AppShellCssVariables = {
|
|
11
11
|
root: '--app-shell-transition-duration' | '--app-shell-transition-timing-function';
|
|
@@ -66,3 +66,27 @@ export declare const AppShell: import("../..").MantineComponent<{
|
|
|
66
66
|
Section: typeof AppShellSection;
|
|
67
67
|
};
|
|
68
68
|
}>;
|
|
69
|
+
export declare namespace AppShell {
|
|
70
|
+
type Props = AppShellProps;
|
|
71
|
+
type StylesNames = AppShellStylesNames;
|
|
72
|
+
type CssVariables = AppShellCssVariables;
|
|
73
|
+
type Factory = AppShellFactory;
|
|
74
|
+
namespace Section {
|
|
75
|
+
type Props = AppShellSectionProps;
|
|
76
|
+
}
|
|
77
|
+
namespace Header {
|
|
78
|
+
type Props = AppShellHeaderProps;
|
|
79
|
+
}
|
|
80
|
+
namespace Footer {
|
|
81
|
+
type Props = AppShellFooterProps;
|
|
82
|
+
}
|
|
83
|
+
namespace Navbar {
|
|
84
|
+
type Props = AppShellNavbarProps;
|
|
85
|
+
}
|
|
86
|
+
namespace Aside {
|
|
87
|
+
type Props = AppShellAsideProps;
|
|
88
|
+
}
|
|
89
|
+
namespace Main {
|
|
90
|
+
type Props = AppShellMainProps;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -16,27 +16,3 @@ export { AppShellSection } from './AppShellSection/AppShellSection';
|
|
|
16
16
|
export { AppShellMain } from './AppShellMain/AppShellMain';
|
|
17
17
|
export { useAppShellContext } from './AppShell.context';
|
|
18
18
|
export type { AppShellProps, AppShellStylesNames, AppShellCssVariables, AppShellFactory, AppShellContextValue, AppShellCompoundProps, AppShellAsideConfiguration, AppShellFooterConfiguration, AppShellHeaderConfiguration, AppShellNavbarConfiguration, AppShellResponsiveSize, AppShellAsideProps, AppShellFooterProps, AppShellHeaderProps, AppShellMainProps, AppShellNavbarProps, AppShellSectionProps, };
|
|
19
|
-
export declare namespace AppShell {
|
|
20
|
-
type Props = AppShellProps;
|
|
21
|
-
type StylesNames = AppShellStylesNames;
|
|
22
|
-
type CssVariables = AppShellCssVariables;
|
|
23
|
-
type Factory = AppShellFactory;
|
|
24
|
-
namespace Section {
|
|
25
|
-
type Props = AppShellSectionProps;
|
|
26
|
-
}
|
|
27
|
-
namespace Header {
|
|
28
|
-
type Props = AppShellHeaderProps;
|
|
29
|
-
}
|
|
30
|
-
namespace Footer {
|
|
31
|
-
type Props = AppShellFooterProps;
|
|
32
|
-
}
|
|
33
|
-
namespace Navbar {
|
|
34
|
-
type Props = AppShellNavbarProps;
|
|
35
|
-
}
|
|
36
|
-
namespace Aside {
|
|
37
|
-
type Props = AppShellAsideProps;
|
|
38
|
-
}
|
|
39
|
-
namespace Main {
|
|
40
|
-
type Props = AppShellMainProps;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -19,3 +19,9 @@ export declare const AspectRatio: import("../..").MantineComponent<{
|
|
|
19
19
|
stylesNames: AspectRatioStylesNames;
|
|
20
20
|
vars: AspectRatioCssVariables;
|
|
21
21
|
}>;
|
|
22
|
+
export declare namespace AspectRatio {
|
|
23
|
+
type Props = AspectRatioProps;
|
|
24
|
+
type StylesNames = AspectRatioStylesNames;
|
|
25
|
+
type CssVariables = AspectRatioCssVariables;
|
|
26
|
+
type Factory = AspectRatioFactory;
|
|
27
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { AspectRatioCssVariables, AspectRatioFactory, AspectRatioProps, AspectRatioStylesNames } from './AspectRatio';
|
|
2
2
|
export { AspectRatio } from './AspectRatio';
|
|
3
3
|
export type { AspectRatioProps, AspectRatioStylesNames, AspectRatioCssVariables, AspectRatioFactory, };
|
|
4
|
-
export declare namespace AspectRatio {
|
|
5
|
-
type Props = AspectRatioProps;
|
|
6
|
-
type StylesNames = AspectRatioStylesNames;
|
|
7
|
-
type CssVariables = AspectRatioCssVariables;
|
|
8
|
-
type Factory = AspectRatioFactory;
|
|
9
|
-
}
|
|
@@ -42,3 +42,9 @@ export declare const Autocomplete: import("../..").MantineComponent<{
|
|
|
42
42
|
stylesNames: AutocompleteStylesNames;
|
|
43
43
|
variant: InputVariant;
|
|
44
44
|
}>;
|
|
45
|
+
export declare namespace Autocomplete {
|
|
46
|
+
type Props = AutocompleteProps;
|
|
47
|
+
type StylesNames = AutocompleteStylesNames;
|
|
48
|
+
type RenderOption = RenderAutocompleteOption;
|
|
49
|
+
type Factory = AutocompleteFactory;
|
|
50
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { AutocompleteFactory, AutocompleteProps, AutocompleteStylesNames, RenderAutocompleteOption } from './Autocomplete';
|
|
2
2
|
export { Autocomplete } from './Autocomplete';
|
|
3
3
|
export type { AutocompleteProps, AutocompleteStylesNames, RenderAutocompleteOption, AutocompleteFactory, };
|
|
4
|
-
export declare namespace Autocomplete {
|
|
5
|
-
type Props = AutocompleteProps;
|
|
6
|
-
type StylesNames = AutocompleteStylesNames;
|
|
7
|
-
type RenderOption = RenderAutocompleteOption;
|
|
8
|
-
type Factory = AutocompleteFactory;
|
|
9
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BoxProps, MantineColor, MantineGradient, MantineRadius, MantineSize, PolymorphicFactory, StylesApiProps } from '../../core';
|
|
2
|
-
import { AvatarGroup } from './AvatarGroup/AvatarGroup';
|
|
2
|
+
import { AvatarGroup, type AvatarGroupProps, type AvatarGroupStylesNames, type AvatarGroupCssVariables, type AvatarGroupFactory, type AvatarGroupContextValue } from './AvatarGroup/AvatarGroup';
|
|
3
3
|
export type AvatarStylesNames = 'root' | 'placeholder' | 'image';
|
|
4
4
|
export type AvatarVariant = 'filled' | 'light' | 'gradient' | 'outline' | 'transparent' | 'default' | 'white';
|
|
5
5
|
export type AvatarCssVariables = {
|
|
@@ -93,3 +93,17 @@ export declare const Avatar: (<C = "div">(props: import("../..").PolymorphicComp
|
|
|
93
93
|
}> & {
|
|
94
94
|
Group: typeof AvatarGroup;
|
|
95
95
|
};
|
|
96
|
+
export declare namespace Avatar {
|
|
97
|
+
type Props = AvatarProps;
|
|
98
|
+
type StylesNames = AvatarStylesNames;
|
|
99
|
+
type CssVariables = AvatarCssVariables;
|
|
100
|
+
type Variant = AvatarVariant;
|
|
101
|
+
type Factory = AvatarFactory;
|
|
102
|
+
namespace Group {
|
|
103
|
+
type Props = AvatarGroupProps;
|
|
104
|
+
type StylesNames = AvatarGroupStylesNames;
|
|
105
|
+
type CssVariables = AvatarGroupCssVariables;
|
|
106
|
+
type Factory = AvatarGroupFactory;
|
|
107
|
+
type ContextValue = AvatarGroupContextValue;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -3,17 +3,3 @@ import type { AvatarGroupContextValue, AvatarGroupCssVariables, AvatarGroupFacto
|
|
|
3
3
|
export { Avatar } from './Avatar';
|
|
4
4
|
export { AvatarGroup, AvatarGroupContext } from './AvatarGroup/AvatarGroup';
|
|
5
5
|
export type { AvatarProps, AvatarStylesNames, AvatarCssVariables, AvatarVariant, AvatarFactory, AvatarGroupProps, AvatarGroupStylesNames, AvatarGroupCssVariables, AvatarGroupFactory, AvatarGroupContextValue, };
|
|
6
|
-
export declare namespace Avatar {
|
|
7
|
-
type Props = AvatarProps;
|
|
8
|
-
type StylesNames = AvatarStylesNames;
|
|
9
|
-
type CssVariables = AvatarCssVariables;
|
|
10
|
-
type Variant = AvatarVariant;
|
|
11
|
-
type Factory = AvatarFactory;
|
|
12
|
-
namespace Group {
|
|
13
|
-
type Props = AvatarGroupProps;
|
|
14
|
-
type StylesNames = AvatarGroupStylesNames;
|
|
15
|
-
type CssVariables = AvatarGroupCssVariables;
|
|
16
|
-
type Factory = AvatarGroupFactory;
|
|
17
|
-
type ContextValue = AvatarGroupContextValue;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -51,3 +51,9 @@ export declare const BackgroundImage: (<C = "div">(props: import("../..").Polymo
|
|
|
51
51
|
stylesNames: BackgroundImageStylesNames;
|
|
52
52
|
vars: BackgroundImageCssVariables;
|
|
53
53
|
}> & Record<string, never>;
|
|
54
|
+
export declare namespace BackgroundImage {
|
|
55
|
+
type Props = BackgroundImageProps;
|
|
56
|
+
type CssVariables = BackgroundImageCssVariables;
|
|
57
|
+
type Factory = BackgroundImageFactory;
|
|
58
|
+
type StylesNames = BackgroundImageStylesNames;
|
|
59
|
+
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
import type { BackgroundImageCssVariables, BackgroundImageFactory, BackgroundImageProps, BackgroundImageStylesNames } from './BackgroundImage';
|
|
2
2
|
export { BackgroundImage } from './BackgroundImage';
|
|
3
3
|
export type { BackgroundImageProps, BackgroundImageCssVariables, BackgroundImageFactory, BackgroundImageStylesNames, };
|
|
4
|
-
export declare namespace BackgroundImage {
|
|
5
|
-
type Props = BackgroundImageProps;
|
|
6
|
-
type CssVariables = BackgroundImageCssVariables;
|
|
7
|
-
type Factory = BackgroundImageFactory;
|
|
8
|
-
type StylesNames = BackgroundImageStylesNames;
|
|
9
|
-
}
|
|
@@ -73,3 +73,10 @@ export declare const Badge: (<C = "div">(props: import("../..").PolymorphicCompo
|
|
|
73
73
|
vars: BadgeCssVariables;
|
|
74
74
|
variant: BadgeVariant;
|
|
75
75
|
}> & Record<string, never>;
|
|
76
|
+
export declare namespace Badge {
|
|
77
|
+
type Props = BadgeProps;
|
|
78
|
+
type StylesNames = BadgeStylesNames;
|
|
79
|
+
type CssVariables = BadgeCssVariables;
|
|
80
|
+
type Variant = BadgeVariant;
|
|
81
|
+
type Factory = BadgeFactory;
|
|
82
|
+
}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
import type { BadgeCssVariables, BadgeFactory, BadgeProps, BadgeStylesNames, BadgeVariant } from './Badge';
|
|
2
2
|
export { Badge } from './Badge';
|
|
3
3
|
export type { BadgeProps, BadgeStylesNames, BadgeCssVariables, BadgeVariant, BadgeFactory };
|
|
4
|
-
export declare namespace Badge {
|
|
5
|
-
type Props = BadgeProps;
|
|
6
|
-
type StylesNames = BadgeStylesNames;
|
|
7
|
-
type CssVariables = BadgeCssVariables;
|
|
8
|
-
type Variant = BadgeVariant;
|
|
9
|
-
type Factory = BadgeFactory;
|
|
10
|
-
}
|