@mantine/core 7.3.2 → 7.4.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/ActionIcon/ActionIcon.cjs +5 -3
- package/cjs/components/ActionIcon/ActionIcon.cjs.map +1 -1
- package/cjs/components/Alert/Alert.cjs +19 -15
- package/cjs/components/Alert/Alert.cjs.map +1 -1
- package/cjs/components/Autocomplete/Autocomplete.cjs.map +1 -1
- package/cjs/components/Avatar/Avatar.cjs +4 -2
- package/cjs/components/Avatar/Avatar.cjs.map +1 -1
- package/cjs/components/Badge/Badge.cjs +6 -3
- package/cjs/components/Badge/Badge.cjs.map +1 -1
- package/cjs/components/Button/Button.cjs +5 -3
- package/cjs/components/Button/Button.cjs.map +1 -1
- package/cjs/components/Checkbox/Checkbox.cjs +4 -2
- 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 +26 -22
- 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 +2 -1
- package/cjs/components/CloseButton/CloseButton.cjs.map +1 -1
- package/cjs/components/Collapse/Collapse.cjs +12 -7
- package/cjs/components/Collapse/Collapse.cjs.map +1 -1
- package/cjs/components/Collapse/use-collapse.cjs +1 -1
- package/cjs/components/Collapse/use-collapse.cjs.map +1 -1
- package/cjs/components/ColorInput/ColorInput.cjs.map +1 -1
- package/cjs/components/ColorPicker/AlphaSlider/AlphaSlider.cjs +1 -1
- package/cjs/components/ColorPicker/AlphaSlider/AlphaSlider.cjs.map +1 -1
- package/cjs/components/ColorPicker/ColorPicker.cjs.map +1 -1
- package/cjs/components/Combobox/Combobox.cjs +6 -1
- package/cjs/components/Combobox/Combobox.cjs.map +1 -1
- package/cjs/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.cjs +4 -1
- package/cjs/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.cjs.map +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs +1 -1
- package/cjs/components/Combobox/use-combobox-target-props/use-combobox-target-props.cjs.map +1 -1
- package/cjs/components/FileInput/FileInput.cjs.map +1 -1
- package/cjs/components/Indicator/Indicator.cjs +4 -1
- package/cjs/components/Indicator/Indicator.cjs.map +1 -1
- package/cjs/components/Input/Input.cjs.map +1 -1
- package/cjs/components/Input/InputLabel/InputLabel.cjs.map +1 -1
- package/cjs/components/Input/InputWrapper/InputWrapper.cjs.map +1 -1
- package/cjs/components/Menu/Menu.cjs +4 -0
- package/cjs/components/Menu/Menu.cjs.map +1 -1
- package/cjs/components/Menu/Menu.context.cjs.map +1 -1
- package/cjs/components/Menu/MenuTarget/MenuTarget.cjs +17 -8
- package/cjs/components/Menu/MenuTarget/MenuTarget.cjs.map +1 -1
- package/cjs/components/MultiSelect/MultiSelect.cjs +8 -2
- package/cjs/components/MultiSelect/MultiSelect.cjs.map +1 -1
- package/cjs/components/NativeSelect/NativeSelect.cjs.map +1 -1
- package/cjs/components/NavLink/NavLink.cjs +4 -2
- package/cjs/components/NavLink/NavLink.cjs.map +1 -1
- package/cjs/components/NumberInput/NumberInput.cjs +60 -10
- package/cjs/components/NumberInput/NumberInput.cjs.map +1 -1
- package/cjs/components/Pagination/Pagination.context.cjs.map +1 -1
- package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs +5 -2
- package/cjs/components/Pagination/PaginationRoot/PaginationRoot.cjs.map +1 -1
- package/cjs/components/PasswordInput/PasswordInput.cjs.map +1 -1
- package/cjs/components/PinInput/PinInput.cjs.map +1 -1
- package/cjs/components/Progress/Progress.context.cjs.map +1 -1
- package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs +2 -2
- package/cjs/components/Progress/ProgressRoot/ProgressRoot.cjs.map +1 -1
- package/cjs/components/Progress/ProgressSection/ProgressSection.cjs +3 -1
- package/cjs/components/Progress/ProgressSection/ProgressSection.cjs.map +1 -1
- package/cjs/components/Radio/Radio.cjs +3 -2
- 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 +0 -1
- package/cjs/components/Rating/Rating.cjs.map +1 -1
- package/cjs/components/Rating/RatingItem/RatingItem.cjs +0 -1
- package/cjs/components/Rating/RatingItem/RatingItem.cjs.map +1 -1
- package/cjs/components/ScrollArea/ScrollArea.cjs +1 -1
- package/cjs/components/ScrollArea/ScrollArea.cjs.map +1 -1
- package/cjs/components/SegmentedControl/SegmentedControl.cjs +3 -1
- package/cjs/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/cjs/components/Select/Select.cjs +5 -4
- package/cjs/components/Select/Select.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/Stepper/Stepper.cjs +3 -1
- package/cjs/components/Stepper/Stepper.cjs.map +1 -1
- package/cjs/components/Switch/Switch.cjs.map +1 -1
- package/cjs/components/Tabs/Tabs.cjs +5 -2
- package/cjs/components/Tabs/Tabs.cjs.map +1 -1
- package/cjs/components/TagsInput/TagsInput.cjs.map +1 -1
- package/cjs/components/Text/Text.cjs.map +1 -1
- package/cjs/components/ThemeIcon/ThemeIcon.cjs +4 -3
- package/cjs/components/ThemeIcon/ThemeIcon.cjs.map +1 -1
- package/cjs/components/Timeline/Timeline.cjs +4 -2
- package/cjs/components/Timeline/Timeline.cjs.map +1 -1
- package/cjs/core/Box/style-props/extract-style-props/extract-style-props.cjs +2 -0
- package/cjs/core/Box/style-props/extract-style-props/extract-style-props.cjs.map +1 -1
- package/cjs/core/Box/style-props/resolvers/font-family-resolver/font-family-resolver.cjs +17 -0
- package/cjs/core/Box/style-props/resolvers/font-family-resolver/font-family-resolver.cjs.map +1 -0
- package/cjs/core/Box/style-props/resolvers/index.cjs +3 -1
- package/cjs/core/Box/style-props/resolvers/index.cjs.map +1 -1
- package/cjs/core/Box/style-props/style-props-data.cjs +3 -2
- package/cjs/core/Box/style-props/style-props-data.cjs.map +1 -1
- package/cjs/core/MantineProvider/MantineClasses/MantineClasses.cjs +4 -5
- package/cjs/core/MantineProvider/MantineClasses/MantineClasses.cjs.map +1 -1
- package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs +3 -0
- package/cjs/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/darken/darken.cjs +1 -1
- package/cjs/core/MantineProvider/color-functions/darken/darken.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs +7 -4
- package/cjs/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs +25 -0
- package/cjs/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.cjs.map +1 -0
- package/cjs/core/MantineProvider/color-functions/lighten/lighten.cjs +1 -1
- package/cjs/core/MantineProvider/color-functions/lighten/lighten.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/luminance/luminance.cjs +35 -0
- package/cjs/core/MantineProvider/color-functions/luminance/luminance.cjs.map +1 -0
- package/cjs/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.cjs +38 -2
- package/cjs/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/rgba/rgba.cjs +15 -3
- package/cjs/core/MantineProvider/color-functions/rgba/rgba.cjs.map +1 -1
- package/cjs/core/MantineProvider/color-functions/to-rgba/to-rgba.cjs +10 -1
- package/cjs/core/MantineProvider/color-functions/to-rgba/to-rgba.cjs.map +1 -1
- package/cjs/core/MantineProvider/default-theme.cjs +2 -0
- package/cjs/core/MantineProvider/default-theme.cjs.map +1 -1
- package/cjs/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs +0 -1
- package/cjs/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.cjs.map +1 -1
- package/cjs/core/utils/deep-merge/deep-merge.cjs +0 -1
- package/cjs/core/utils/deep-merge/deep-merge.cjs.map +1 -1
- package/cjs/core/utils/units-converters/rem.cjs +1 -1
- package/cjs/core/utils/units-converters/rem.cjs.map +1 -1
- package/cjs/index.cjs +7 -2
- package/cjs/index.cjs.map +1 -1
- package/esm/components/ActionIcon/ActionIcon.mjs +5 -3
- package/esm/components/ActionIcon/ActionIcon.mjs.map +1 -1
- package/esm/components/Alert/Alert.mjs +19 -15
- package/esm/components/Alert/Alert.mjs.map +1 -1
- package/esm/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/esm/components/Avatar/Avatar.mjs +4 -2
- package/esm/components/Avatar/Avatar.mjs.map +1 -1
- package/esm/components/Badge/Badge.mjs +6 -3
- package/esm/components/Badge/Badge.mjs.map +1 -1
- package/esm/components/Button/Button.mjs +5 -3
- package/esm/components/Button/Button.mjs.map +1 -1
- package/esm/components/Checkbox/Checkbox.mjs +4 -2
- 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 +26 -22
- 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 +2 -1
- package/esm/components/CloseButton/CloseButton.mjs.map +1 -1
- package/esm/components/Collapse/Collapse.mjs +12 -7
- package/esm/components/Collapse/Collapse.mjs.map +1 -1
- package/esm/components/Collapse/use-collapse.mjs +1 -1
- package/esm/components/Collapse/use-collapse.mjs.map +1 -1
- package/esm/components/ColorInput/ColorInput.mjs.map +1 -1
- package/esm/components/ColorPicker/AlphaSlider/AlphaSlider.mjs +1 -1
- package/esm/components/ColorPicker/AlphaSlider/AlphaSlider.mjs.map +1 -1
- package/esm/components/ColorPicker/ColorPicker.mjs.map +1 -1
- package/esm/components/Combobox/Combobox.mjs +6 -1
- package/esm/components/Combobox/Combobox.mjs.map +1 -1
- package/esm/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.mjs +4 -1
- package/esm/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.mjs.map +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs +1 -1
- package/esm/components/Combobox/use-combobox-target-props/use-combobox-target-props.mjs.map +1 -1
- package/esm/components/FileInput/FileInput.mjs.map +1 -1
- package/esm/components/Indicator/Indicator.mjs +4 -1
- package/esm/components/Indicator/Indicator.mjs.map +1 -1
- package/esm/components/Input/Input.mjs.map +1 -1
- package/esm/components/Input/InputLabel/InputLabel.mjs.map +1 -1
- package/esm/components/Input/InputWrapper/InputWrapper.mjs.map +1 -1
- package/esm/components/Menu/Menu.context.mjs.map +1 -1
- package/esm/components/Menu/Menu.mjs +5 -1
- package/esm/components/Menu/Menu.mjs.map +1 -1
- package/esm/components/Menu/MenuTarget/MenuTarget.mjs +17 -8
- package/esm/components/Menu/MenuTarget/MenuTarget.mjs.map +1 -1
- package/esm/components/MultiSelect/MultiSelect.mjs +8 -2
- package/esm/components/MultiSelect/MultiSelect.mjs.map +1 -1
- package/esm/components/NativeSelect/NativeSelect.mjs.map +1 -1
- package/esm/components/NavLink/NavLink.mjs +4 -2
- package/esm/components/NavLink/NavLink.mjs.map +1 -1
- package/esm/components/NumberInput/NumberInput.mjs +62 -12
- package/esm/components/NumberInput/NumberInput.mjs.map +1 -1
- package/esm/components/Pagination/Pagination.context.mjs.map +1 -1
- package/esm/components/Pagination/PaginationRoot/PaginationRoot.mjs +5 -2
- package/esm/components/Pagination/PaginationRoot/PaginationRoot.mjs.map +1 -1
- package/esm/components/PasswordInput/PasswordInput.mjs.map +1 -1
- package/esm/components/PinInput/PinInput.mjs.map +1 -1
- package/esm/components/Progress/Progress.context.mjs.map +1 -1
- package/esm/components/Progress/ProgressRoot/ProgressRoot.mjs +2 -2
- package/esm/components/Progress/ProgressRoot/ProgressRoot.mjs.map +1 -1
- package/esm/components/Progress/ProgressSection/ProgressSection.mjs +3 -1
- package/esm/components/Progress/ProgressSection/ProgressSection.mjs.map +1 -1
- package/esm/components/Radio/Radio.mjs +3 -2
- 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 +0 -1
- package/esm/components/Rating/Rating.mjs.map +1 -1
- package/esm/components/Rating/RatingItem/RatingItem.mjs +0 -1
- package/esm/components/Rating/RatingItem/RatingItem.mjs.map +1 -1
- package/esm/components/ScrollArea/ScrollArea.mjs +1 -1
- package/esm/components/ScrollArea/ScrollArea.mjs.map +1 -1
- package/esm/components/SegmentedControl/SegmentedControl.mjs +3 -1
- package/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/esm/components/Select/Select.mjs +5 -4
- package/esm/components/Select/Select.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/Stepper/Stepper.mjs +3 -1
- package/esm/components/Stepper/Stepper.mjs.map +1 -1
- package/esm/components/Switch/Switch.mjs.map +1 -1
- package/esm/components/Tabs/Tabs.mjs +5 -2
- package/esm/components/Tabs/Tabs.mjs.map +1 -1
- package/esm/components/TagsInput/TagsInput.mjs.map +1 -1
- package/esm/components/Text/Text.mjs.map +1 -1
- package/esm/components/ThemeIcon/ThemeIcon.mjs +4 -3
- package/esm/components/ThemeIcon/ThemeIcon.mjs.map +1 -1
- package/esm/components/Timeline/Timeline.mjs +4 -2
- package/esm/components/Timeline/Timeline.mjs.map +1 -1
- package/esm/core/Box/style-props/extract-style-props/extract-style-props.mjs +2 -0
- package/esm/core/Box/style-props/extract-style-props/extract-style-props.mjs.map +1 -1
- package/esm/core/Box/style-props/resolvers/font-family-resolver/font-family-resolver.mjs +15 -0
- package/esm/core/Box/style-props/resolvers/font-family-resolver/font-family-resolver.mjs.map +1 -0
- package/esm/core/Box/style-props/resolvers/index.mjs +3 -1
- package/esm/core/Box/style-props/resolvers/index.mjs.map +1 -1
- package/esm/core/Box/style-props/style-props-data.mjs +3 -2
- package/esm/core/Box/style-props/style-props-data.mjs.map +1 -1
- package/esm/core/MantineProvider/MantineClasses/MantineClasses.mjs +4 -5
- package/esm/core/MantineProvider/MantineClasses/MantineClasses.mjs.map +1 -1
- package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs +3 -0
- package/esm/core/MantineProvider/MantineCssVariables/default-css-variables-resolver.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/darken/darken.mjs +1 -1
- package/esm/core/MantineProvider/color-functions/darken/darken.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs +7 -4
- package/esm/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs +22 -0
- package/esm/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.mjs.map +1 -0
- package/esm/core/MantineProvider/color-functions/lighten/lighten.mjs +1 -1
- package/esm/core/MantineProvider/color-functions/lighten/lighten.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/luminance/luminance.mjs +32 -0
- package/esm/core/MantineProvider/color-functions/luminance/luminance.mjs.map +1 -0
- package/esm/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.mjs +38 -2
- package/esm/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/rgba/rgba.mjs +15 -4
- package/esm/core/MantineProvider/color-functions/rgba/rgba.mjs.map +1 -1
- package/esm/core/MantineProvider/color-functions/to-rgba/to-rgba.mjs +10 -1
- package/esm/core/MantineProvider/color-functions/to-rgba/to-rgba.mjs.map +1 -1
- package/esm/core/MantineProvider/default-theme.mjs +2 -0
- package/esm/core/MantineProvider/default-theme.mjs.map +1 -1
- package/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.mjs +0 -1
- package/esm/core/MantineProvider/merge-mantine-theme/merge-mantine-theme.mjs.map +1 -1
- package/esm/core/utils/deep-merge/deep-merge.mjs +0 -1
- package/esm/core/utils/deep-merge/deep-merge.mjs.map +1 -1
- package/esm/core/utils/units-converters/rem.mjs +1 -1
- package/esm/core/utils/units-converters/rem.mjs.map +1 -1
- package/esm/index.mjs +3 -2
- package/esm/index.mjs.map +1 -1
- package/lib/components/ActionIcon/ActionIcon.d.ts +2 -0
- package/lib/components/Alert/Alert.d.ts +2 -0
- package/lib/components/Autocomplete/Autocomplete.d.ts +4 -2
- package/lib/components/Avatar/Avatar.d.ts +2 -0
- package/lib/components/Badge/Badge.d.ts +4 -0
- package/lib/components/Button/Button.d.ts +2 -0
- package/lib/components/Checkbox/Checkbox.d.ts +10 -8
- package/lib/components/Checkbox/CheckboxGroup/CheckboxGroup.d.ts +3 -3
- package/lib/components/Chip/Chip.d.ts +8 -6
- package/lib/components/Chip/ChipGroup/ChipGroup.d.ts +2 -2
- package/lib/components/CloseButton/CloseButton.d.ts +2 -0
- package/lib/components/ColorInput/ColorInput.d.ts +2 -2
- package/lib/components/ColorPicker/ColorPicker.d.ts +10 -10
- package/lib/components/Combobox/Combobox.types.d.ts +8 -5
- package/lib/components/Combobox/get-parsed-combobox-data/get-parsed-combobox-data.d.ts +2 -2
- package/lib/components/Combobox/index.d.ts +1 -1
- package/lib/components/FileInput/FileInput.d.ts +6 -4
- package/lib/components/Indicator/Indicator.d.ts +3 -1
- package/lib/components/Input/Input.d.ts +4 -4
- package/lib/components/Input/InputLabel/InputLabel.d.ts +1 -1
- package/lib/components/Input/InputWrapper/InputWrapper.d.ts +6 -6
- package/lib/components/Input/use-input-props.d.ts +3 -3
- package/lib/components/Menu/Menu.context.d.ts +2 -0
- package/lib/components/NativeSelect/NativeSelect.d.ts +1 -1
- package/lib/components/NavLink/NavLink.d.ts +2 -0
- package/lib/components/NumberInput/NumberInput.d.ts +4 -0
- package/lib/components/Pagination/PaginationRoot/PaginationRoot.d.ts +3 -1
- package/lib/components/PasswordInput/PasswordInput.d.ts +3 -3
- package/lib/components/PinInput/PinInput.d.ts +10 -10
- package/lib/components/Popover/Popover.types.d.ts +1 -1
- package/lib/components/Progress/Progress.context.d.ts +1 -0
- package/lib/components/Progress/ProgressRoot/ProgressRoot.d.ts +2 -0
- package/lib/components/Radio/Radio.d.ts +7 -5
- package/lib/components/Radio/RadioGroup/RadioGroup.d.ts +2 -2
- package/lib/components/Rating/Rating.d.ts +13 -13
- package/lib/components/Rating/RatingItem/RatingItem.d.ts +2 -3
- package/lib/components/SegmentedControl/SegmentedControl.d.ts +2 -0
- package/lib/components/Select/Select.d.ts +2 -2
- package/lib/components/Slider/RangeSlider/RangeSlider.d.ts +1 -1
- package/lib/components/Slider/Slider/Slider.d.ts +1 -1
- package/lib/components/Stepper/Stepper.d.ts +3 -1
- package/lib/components/Switch/Switch.d.ts +6 -6
- package/lib/components/Tabs/Tabs.d.ts +2 -0
- package/lib/components/TagsInput/TagsInput.d.ts +4 -2
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/ThemeIcon/ThemeIcon.d.ts +2 -0
- package/lib/components/Timeline/Timeline.d.ts +3 -1
- package/lib/core/Box/style-props/resolvers/font-family-resolver/font-family-resolver.d.ts +1 -0
- package/lib/core/Box/style-props/resolvers/index.d.ts +2 -0
- package/lib/core/Box/style-props/style-props.types.d.ts +2 -1
- package/lib/core/MantineProvider/color-functions/default-variant-colors-resolver/default-variant-colors-resolver.d.ts +1 -0
- package/lib/core/MantineProvider/color-functions/get-contrast-color/get-contrast-color.d.ts +9 -0
- package/lib/core/MantineProvider/color-functions/index.d.ts +3 -2
- package/lib/core/MantineProvider/color-functions/luminance/luminance.d.ts +2 -0
- package/lib/core/MantineProvider/color-functions/parse-theme-color/parse-theme-color.d.ts +1 -0
- package/lib/core/MantineProvider/color-functions/rgba/rgba.d.ts +1 -0
- package/lib/core/MantineProvider/theme.types.d.ts +10 -0
- package/lib/core/styles-api/styles-api.types.d.ts +1 -2
- package/package.json +3 -3
- package/styles/Badge.css +1 -1
- package/styles/Badge.layer.css +1 -1
- package/styles/Indicator.css +1 -1
- package/styles/Indicator.layer.css +1 -1
- package/styles/NumberInput.css +1 -1
- package/styles/NumberInput.layer.css +1 -1
- package/styles/Pagination.css +1 -1
- package/styles/Pagination.layer.css +1 -1
- package/styles/Progress.css +1 -1
- package/styles/Progress.layer.css +1 -1
- package/styles/Stepper.css +1 -1
- package/styles/Stepper.layer.css +1 -1
- package/styles/Tabs.css +1 -1
- package/styles/Tabs.layer.css +1 -1
- package/styles/Timeline.css +1 -1
- package/styles/Timeline.layer.css +1 -1
- package/styles/global.css +1 -1
- package/styles/global.layer.css +1 -1
- package/styles.css +2 -2
- package/styles.layer.css +2 -2
- package/cjs/core/MantineProvider/color-functions/is-light-color/is-light-color.cjs +0 -22
- package/cjs/core/MantineProvider/color-functions/is-light-color/is-light-color.cjs.map +0 -1
- package/esm/core/MantineProvider/color-functions/is-light-color/is-light-color.mjs +0 -19
- package/esm/core/MantineProvider/color-functions/is-light-color/is-light-color.mjs.map +0 -1
- package/lib/core/MantineProvider/color-functions/is-light-color/is-light-color.d.ts +0 -3
|
@@ -13,7 +13,7 @@ export interface ChipProps extends BoxProps, StylesApiProps<ChipFactory>, Elemen
|
|
|
13
13
|
size?: MantineSize;
|
|
14
14
|
/** Chip input type, `'checkbox'` by default */
|
|
15
15
|
type?: 'radio' | 'checkbox';
|
|
16
|
-
/**
|
|
16
|
+
/** `label` element associated with the input */
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
/** Checked state for controlled component */
|
|
19
19
|
checked?: boolean;
|
|
@@ -21,16 +21,18 @@ export interface ChipProps extends BoxProps, StylesApiProps<ChipFactory>, Elemen
|
|
|
21
21
|
defaultChecked?: boolean;
|
|
22
22
|
/** Calls when checked state changes */
|
|
23
23
|
onChange?: (checked: boolean) => void;
|
|
24
|
-
/** Key of `theme.colors` or any valid CSS color
|
|
24
|
+
/** Controls components colors based on `variant` prop. Key of `theme.colors` or any valid CSS color. `theme.primaryColor` by default */
|
|
25
25
|
color?: MantineColor;
|
|
26
|
-
/** Static id to
|
|
26
|
+
/** Static id to connect input with the label, by default `id` is randomly generated */
|
|
27
27
|
id?: string;
|
|
28
|
-
/** Props passed down to the
|
|
28
|
+
/** Props passed down to the root element */
|
|
29
29
|
wrapperProps?: Record<string, any>;
|
|
30
|
-
/**
|
|
30
|
+
/** Any element or component to replace default icon */
|
|
31
31
|
icon?: React.ReactNode;
|
|
32
|
-
/** Assigns ref of the root element
|
|
32
|
+
/** Assigns ref of the root element */
|
|
33
33
|
rootRef?: React.ForwardedRef<HTMLDivElement>;
|
|
34
|
+
/** Determines whether button text color with filled variant should depend on `background-color`. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
35
|
+
autoContrast?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export type ChipFactory = Factory<{
|
|
36
38
|
props: ChipProps;
|
|
@@ -6,9 +6,9 @@ export interface ChipGroupProps<T extends boolean = false> {
|
|
|
6
6
|
value?: T extends true ? string[] : string | null;
|
|
7
7
|
/** Uncontrolled component initial value */
|
|
8
8
|
defaultValue?: T extends true ? string[] : string | null;
|
|
9
|
-
/** Called when value changes */
|
|
9
|
+
/** Called when value changes. If `multiple` prop is set, called with an array of selected values. If not, called with a string value of selected chip. */
|
|
10
10
|
onChange?: (value: T extends true ? string[] : string) => void;
|
|
11
|
-
/** `Chip` components */
|
|
11
|
+
/** `Chip` components and any other elements */
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
14
14
|
export declare function ChipGroup<T extends boolean>(props: ChipGroupProps<T>): React.JSX.Element;
|
|
@@ -17,6 +17,8 @@ export interface __CloseButtonProps {
|
|
|
17
17
|
iconSize?: number | string;
|
|
18
18
|
/** Content rendered inside the button, for example `VisuallyHidden` with label for screen readers */
|
|
19
19
|
children?: React.ReactNode;
|
|
20
|
+
/** Replaces default close icon. If set, `iconSize` prop is ignored. */
|
|
21
|
+
icon?: React.ReactNode;
|
|
20
22
|
}
|
|
21
23
|
export interface CloseButtonProps extends __CloseButtonProps, BoxProps, StylesApiProps<CloseButtonFactory> {
|
|
22
24
|
}
|
|
@@ -13,13 +13,13 @@ export interface ColorInputProps extends BoxProps, __BaseInputProps, __ColorPick
|
|
|
13
13
|
disallowInput?: boolean;
|
|
14
14
|
/** Determines whether the input value should be reset to the last known valid value when the input loses focus, `true` by default */
|
|
15
15
|
fixOnBlur?: boolean;
|
|
16
|
-
/** Props passed down to the Popover component */
|
|
16
|
+
/** Props passed down to the `Popover` component */
|
|
17
17
|
popoverProps?: PopoverProps;
|
|
18
18
|
/** Determines whether the preview color swatch should be displayed in the left section of the input, `true` by default */
|
|
19
19
|
withPreview?: boolean;
|
|
20
20
|
/** Determines whether eye dropper button should be displayed in the right section, `true` by default */
|
|
21
21
|
withEyeDropper?: boolean;
|
|
22
|
-
/** An icon
|
|
22
|
+
/** An icon to replace the default eye dropper icon */
|
|
23
23
|
eyeDropperIcon?: React.ReactNode;
|
|
24
24
|
/** Determines whether the dropdown should be closed when one of the color swatches is clicked, `false` by default */
|
|
25
25
|
closeOnColorSwatchClick?: boolean;
|
|
@@ -9,32 +9,32 @@ export interface __ColorPickerProps {
|
|
|
9
9
|
value?: string;
|
|
10
10
|
/** Uncontrolled component default value */
|
|
11
11
|
defaultValue?: string;
|
|
12
|
-
/** Called when
|
|
12
|
+
/** Called when value changes */
|
|
13
13
|
onChange?: (value: string) => void;
|
|
14
|
-
/** Called when user stops dragging or changes value with arrow keys */
|
|
14
|
+
/** Called when the user stops dragging one of the sliders or changes the value with arrow keys */
|
|
15
15
|
onChangeEnd?: (value: string) => void;
|
|
16
16
|
/** Color format, `'hex'` by default */
|
|
17
17
|
format?: ColorFormat;
|
|
18
|
-
/** Determines whether color picker should be displayed, `true` by default */
|
|
18
|
+
/** Determines whether the color picker should be displayed, `true` by default */
|
|
19
19
|
withPicker?: boolean;
|
|
20
|
-
/**
|
|
20
|
+
/** An array of colors in one of the supported formats. Used to render swatches list below the color picker. */
|
|
21
21
|
swatches?: string[];
|
|
22
|
-
/** Number of swatches
|
|
22
|
+
/** Number of swatches per row, `7` by default */
|
|
23
23
|
swatchesPerRow?: number;
|
|
24
24
|
/** Controls size of hue, alpha and saturation sliders, `'md'` by default */
|
|
25
25
|
size?: MantineSize | (string & {});
|
|
26
26
|
}
|
|
27
27
|
export interface ColorPickerProps extends BoxProps, __ColorPickerProps, StylesApiProps<ColorPickerFactory>, ElementProps<'div', 'onChange' | 'value' | 'defaultValue'> {
|
|
28
28
|
__staticSelector?: string;
|
|
29
|
-
/** Determines whether component should take 100% width of its container, `false` by default */
|
|
29
|
+
/** Determines whether the component should take 100% width of its container, `false` by default */
|
|
30
30
|
fullWidth?: boolean;
|
|
31
|
-
/** Determines whether interactive elements should be focusable, `true` by default */
|
|
31
|
+
/** Determines whether interactive elements (sliders thumbs and swatches) should be focusable, `true` by default */
|
|
32
32
|
focusable?: boolean;
|
|
33
|
-
/** Saturation slider `aria-label` */
|
|
33
|
+
/** Saturation slider `aria-label` prop */
|
|
34
34
|
saturationLabel?: string;
|
|
35
|
-
/** Hue slider `aria-label` */
|
|
35
|
+
/** Hue slider `aria-label` prop */
|
|
36
36
|
hueLabel?: string;
|
|
37
|
-
/** Alpha slider `aria-label` */
|
|
37
|
+
/** Alpha slider `aria-label` prop */
|
|
38
38
|
alphaLabel?: string;
|
|
39
39
|
/** Called when one of the color swatches is clicked */
|
|
40
40
|
onColorSwatchClick?: (color: string) => void;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import type { ComboboxProps, ComboboxStylesNames } from './Combobox';
|
|
2
2
|
import type { OptionsFilter } from './OptionsDropdown/OptionsDropdown';
|
|
3
|
-
export interface
|
|
3
|
+
export interface ComboboxStringItem {
|
|
4
4
|
value: string;
|
|
5
|
-
label: string;
|
|
6
5
|
disabled?: boolean;
|
|
7
6
|
}
|
|
8
|
-
export interface
|
|
7
|
+
export interface ComboboxItem extends ComboboxStringItem {
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ComboboxItemGroup<T = ComboboxItem | string> {
|
|
9
11
|
group: string;
|
|
10
|
-
items:
|
|
12
|
+
items: T[];
|
|
11
13
|
}
|
|
12
14
|
export interface ComboboxParsedItemGroup {
|
|
13
15
|
group: string;
|
|
14
16
|
items: ComboboxItem[];
|
|
15
17
|
}
|
|
16
|
-
export type
|
|
18
|
+
export type ComboboxStringData = Array<string | ComboboxStringItem | ComboboxItemGroup<string | ComboboxStringItem>> | ReadonlyArray<string | ComboboxStringItem | ComboboxItemGroup<string | ComboboxStringItem>>;
|
|
19
|
+
export type ComboboxData = Array<string | ComboboxItem | ComboboxItemGroup> | ReadonlyArray<string | ComboboxItem | ComboboxItemGroup>;
|
|
17
20
|
export type ComboboxParsedItem = ComboboxItem | ComboboxParsedItemGroup;
|
|
18
21
|
export type ComboboxLikeStylesNames = Exclude<ComboboxStylesNames, 'header' | 'footer' | 'search'>;
|
|
19
22
|
export interface ComboboxLikeProps {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ComboboxData, ComboboxParsedItem } from '../Combobox.types';
|
|
2
|
-
export declare function getParsedComboboxData(data: ComboboxData | undefined): ComboboxParsedItem[];
|
|
1
|
+
import { ComboboxData, ComboboxParsedItem, ComboboxStringData } from '../Combobox.types';
|
|
2
|
+
export declare function getParsedComboboxData(data: ComboboxData | ComboboxStringData | undefined): ComboboxParsedItem[];
|
|
@@ -21,7 +21,7 @@ export { useComboboxTargetProps } from './use-combobox-target-props/use-combobox
|
|
|
21
21
|
export { isOptionsGroup } from './OptionsDropdown/is-options-group';
|
|
22
22
|
export { defaultOptionsFilter } from './OptionsDropdown/default-options-filter';
|
|
23
23
|
export type { ComboboxStore, ComboboxDropdownEventSource, UseComboboxOptions, } from './use-combobox/use-combobox';
|
|
24
|
-
export type { ComboboxItem, ComboboxData, ComboboxParsedItem, ComboboxItemGroup, ComboboxParsedItemGroup, ComboboxLikeProps, ComboboxLikeStylesNames, } from './Combobox.types';
|
|
24
|
+
export type { ComboboxItem, ComboboxData, ComboboxParsedItem, ComboboxItemGroup, ComboboxParsedItemGroup, ComboboxLikeProps, ComboboxLikeStylesNames, ComboboxStringData, } from './Combobox.types';
|
|
25
25
|
export type { ComboboxFactory, ComboboxProps, ComboboxStylesNames } from './Combobox';
|
|
26
26
|
export type { ComboboxDropdownProps } from './ComboboxDropdown/ComboboxDropdown';
|
|
27
27
|
export type { ComboboxOptionsProps } from './ComboboxOptions/ComboboxOptions';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
|
|
3
3
|
import { __BaseInputProps, __InputStylesNames, InputVariant } from '../Input';
|
|
4
|
-
export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputProps, StylesApiProps<FileInputFactory>, ElementProps<'button', 'value' | 'defaultValue' | 'onChange'> {
|
|
4
|
+
export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputProps, StylesApiProps<FileInputFactory>, ElementProps<'button', 'value' | 'defaultValue' | 'onChange' | 'placeholder'> {
|
|
5
5
|
/** Called when value changes */
|
|
6
6
|
onChange?: (payload: Multiple extends true ? File[] : File | null) => void;
|
|
7
7
|
/** Controlled component value */
|
|
@@ -10,13 +10,13 @@ export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputP
|
|
|
10
10
|
defaultValue?: Multiple extends true ? File[] : File | null;
|
|
11
11
|
/** Determines whether user can pick more than one file, `false` by default */
|
|
12
12
|
multiple?: Multiple;
|
|
13
|
-
/** File input accept attribute, for example, "image/png,image/jpeg" */
|
|
13
|
+
/** File input accept attribute, for example, `"image/png,image/jpeg"` */
|
|
14
14
|
accept?: string;
|
|
15
15
|
/** Input name attribute */
|
|
16
16
|
name?: string;
|
|
17
17
|
/** Input form attribute */
|
|
18
18
|
form?: string;
|
|
19
|
-
/** Value renderer
|
|
19
|
+
/** Value renderer. By default, file name is displayed. */
|
|
20
20
|
valueComponent?: React.FC<{
|
|
21
21
|
value: null | File | File[];
|
|
22
22
|
}>;
|
|
@@ -24,12 +24,14 @@ export interface FileInputProps<Multiple = false> extends BoxProps, __BaseInputP
|
|
|
24
24
|
clearable?: boolean;
|
|
25
25
|
/** Props passed down to the clear button */
|
|
26
26
|
clearButtonProps?: React.ComponentPropsWithoutRef<'button'>;
|
|
27
|
-
/**
|
|
27
|
+
/** If set, the input value cannot be changed */
|
|
28
28
|
readOnly?: boolean;
|
|
29
29
|
/** Specifies that, optionally, a new file should be captured, and which device should be used to capture that new media of a type defined by the accept attribute. */
|
|
30
30
|
capture?: boolean | 'user' | 'environment';
|
|
31
31
|
/** Props passed down to the hidden input element which is used to capture files */
|
|
32
32
|
fileInputProps?: React.ComponentPropsWithoutRef<'input'>;
|
|
33
|
+
/** Input placeholder */
|
|
34
|
+
placeholder?: React.ReactNode;
|
|
33
35
|
}
|
|
34
36
|
export type FileInputFactory = Factory<{
|
|
35
37
|
props: FileInputProps;
|
|
@@ -4,7 +4,7 @@ import { IndicatorPosition } from './Indicator.types';
|
|
|
4
4
|
export type IndicatorPositionVariables = '--indicator-top' | '--indicator-bottom' | '--indicator-left' | '--indicator-right' | '--indicator-translate-x' | '--indicator-translate-y';
|
|
5
5
|
export type IndicatorStylesNames = 'root' | 'indicator';
|
|
6
6
|
export type IndicatorCssVariables = {
|
|
7
|
-
root: '--indicator-color' | '--indicator-size' | '--indicator-radius' | '--indicator-z-index' | IndicatorPositionVariables;
|
|
7
|
+
root: '--indicator-color' | '--indicator-text-color' | '--indicator-size' | '--indicator-radius' | '--indicator-z-index' | IndicatorPositionVariables;
|
|
8
8
|
};
|
|
9
9
|
export interface IndicatorProps extends BoxProps, StylesApiProps<IndicatorFactory>, ElementProps<'div'> {
|
|
10
10
|
/** Indicator position relative to the target element, `'top-end'` by default */
|
|
@@ -29,6 +29,8 @@ export interface IndicatorProps extends BoxProps, StylesApiProps<IndicatorFactor
|
|
|
29
29
|
processing?: boolean;
|
|
30
30
|
/** Indicator z-index, `200` by default */
|
|
31
31
|
zIndex?: string | number;
|
|
32
|
+
/** Determines whether text color should depend on `background-color`. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
33
|
+
autoContrast?: boolean;
|
|
32
34
|
}
|
|
33
35
|
export type IndicatorFactory = Factory<{
|
|
34
36
|
props: IndicatorProps;
|
|
@@ -24,7 +24,7 @@ export interface __InputProps {
|
|
|
24
24
|
leftSection?: React.ReactNode;
|
|
25
25
|
/** Left section width, used to set `width` of the section and input `padding-left`, by default equals to the input height */
|
|
26
26
|
leftSectionWidth?: React.CSSProperties['width'];
|
|
27
|
-
/** Props
|
|
27
|
+
/** Props passed down to the `leftSection` element */
|
|
28
28
|
leftSectionProps?: React.ComponentPropsWithoutRef<'div'>;
|
|
29
29
|
/** Sets `pointer-events` styles on the `leftSection` element, `'none'` by default */
|
|
30
30
|
leftSectionPointerEvents?: React.CSSProperties['pointerEvents'];
|
|
@@ -32,11 +32,11 @@ export interface __InputProps {
|
|
|
32
32
|
rightSection?: React.ReactNode;
|
|
33
33
|
/** Right section width, used to set `width` of the section and input `padding-right`, by default equals to the input height */
|
|
34
34
|
rightSectionWidth?: React.CSSProperties['width'];
|
|
35
|
-
/** Props
|
|
35
|
+
/** Props passed down to the `rightSection` element */
|
|
36
36
|
rightSectionProps?: React.ComponentPropsWithoutRef<'div'>;
|
|
37
37
|
/** Sets `pointer-events` styles on the `rightSection` element, `'none'` by default */
|
|
38
38
|
rightSectionPointerEvents?: React.CSSProperties['pointerEvents'];
|
|
39
|
-
/** Props
|
|
39
|
+
/** Props passed down to the root element of the `Input` component */
|
|
40
40
|
wrapperProps?: Record<string, any>;
|
|
41
41
|
/** Sets `required` attribute on the `input` element */
|
|
42
42
|
required?: boolean;
|
|
@@ -48,7 +48,7 @@ export interface __InputProps {
|
|
|
48
48
|
size?: MantineSize | (string & {});
|
|
49
49
|
/** Determines whether the input should have `cursor: pointer` style, `false` by default */
|
|
50
50
|
pointer?: boolean;
|
|
51
|
-
/** Determines whether the input should have red border and text color when `error` prop is set, `true` by default */
|
|
51
|
+
/** Determines whether the input should have red border and red text color when the `error` prop is set, `true` by default */
|
|
52
52
|
withErrorStyles?: boolean;
|
|
53
53
|
}
|
|
54
54
|
export interface InputProps extends BoxProps, __InputProps, StylesApiProps<InputFactory> {
|
|
@@ -5,7 +5,7 @@ export type InputLabelCssVariables = {
|
|
|
5
5
|
};
|
|
6
6
|
export interface InputLabelProps extends BoxProps, StylesApiProps<InputLabelFactory>, ElementProps<'label'> {
|
|
7
7
|
__staticSelector?: string;
|
|
8
|
-
/** Determines whether required asterisk should be displayed */
|
|
8
|
+
/** Determines whether the required asterisk should be displayed */
|
|
9
9
|
required?: boolean;
|
|
10
10
|
/** Controls label `font-size`, `'sm'` by default */
|
|
11
11
|
size?: MantineSize | (string & {});
|
|
@@ -6,23 +6,23 @@ import { InputLabelCssVariables, InputLabelStylesNames } from '../InputLabel/Inp
|
|
|
6
6
|
export type InputWrapperCssVariables = InputLabelCssVariables & InputErrorCssVariables & InputDescriptionCssVariables;
|
|
7
7
|
export type InputWrapperStylesNames = 'root' | InputLabelStylesNames | InputDescriptionStylesNames | InputErrorStylesNames;
|
|
8
8
|
export interface __InputWrapperProps {
|
|
9
|
-
/** Contents of `Input.Label` component
|
|
9
|
+
/** Contents of `Input.Label` component. If not set, label is not rendered. */
|
|
10
10
|
label?: React.ReactNode;
|
|
11
|
-
/** Contents of `Input.Description` component
|
|
11
|
+
/** Contents of `Input.Description` component. If not set, description is not rendered. */
|
|
12
12
|
description?: React.ReactNode;
|
|
13
|
-
/** Contents of `Input.Error` component
|
|
13
|
+
/** Contents of `Input.Error` component. If not set, error is not rendered. */
|
|
14
14
|
error?: React.ReactNode;
|
|
15
15
|
/** Adds required attribute to the input and a red asterisk on the right side of label, `false` by default */
|
|
16
16
|
required?: boolean;
|
|
17
|
-
/** Determines whether required asterisk should be
|
|
17
|
+
/** Determines whether the required asterisk should be displayed. Overrides `required` prop. Does not add required attribute to the input. `false` by default */
|
|
18
18
|
withAsterisk?: boolean;
|
|
19
19
|
/** Props passed down to the `Input.Label` component */
|
|
20
20
|
labelProps?: Record<string, any>;
|
|
21
21
|
/** Props passed down to the `Input.Description` component */
|
|
22
22
|
descriptionProps?: Record<string, any>;
|
|
23
|
-
/** Props passed down to the `
|
|
23
|
+
/** Props passed down to the `Input.Error` component */
|
|
24
24
|
errorProps?: Record<string, any>;
|
|
25
|
-
/** Input container component,
|
|
25
|
+
/** Input container component, `React.Fragment` by default */
|
|
26
26
|
inputContainer?: (children: React.ReactNode) => React.ReactNode;
|
|
27
27
|
/** Controls order of the elements, `['label', 'description', 'input', 'error']` by default */
|
|
28
28
|
inputWrapperOrder?: ('label' | 'input' | 'description' | 'error')[];
|
|
@@ -10,7 +10,7 @@ interface BaseProps extends __BaseInputProps, BoxProps, StylesApiProps<{
|
|
|
10
10
|
}
|
|
11
11
|
export declare function useInputProps<T extends BaseProps, U extends Partial<T>>(component: string, defaultProps: U, _props: T): Omit<T & { [Key in Extract<keyof T, never>]-?: {}[Key] | NonNullable<T[Key]>; }, "label" | "style" | "size" | "styles" | "className" | "id" | "vars" | "variant" | "unstyled" | "classNames" | "required" | "error" | "description" | "__staticSelector" | "__stylesApiProps" | "withAsterisk" | "labelProps" | "descriptionProps" | "errorProps" | "inputContainer" | "inputWrapperOrder" | "wrapperProps"> & {
|
|
12
12
|
classNames: Partial<Record<string, string>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
|
|
13
|
-
styles: Partial<Record<string, import("
|
|
13
|
+
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
14
14
|
unstyled: boolean | undefined;
|
|
15
15
|
wrapperProps: {
|
|
16
16
|
label: import("react").ReactNode;
|
|
@@ -25,7 +25,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
25
25
|
labelProps: Record<string, any> | undefined;
|
|
26
26
|
descriptionProps: Record<string, any> | undefined;
|
|
27
27
|
unstyled: boolean | undefined;
|
|
28
|
-
styles: Partial<Record<string, import("
|
|
28
|
+
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
29
29
|
size: (string & {}) | import("../../core").MantineSize | undefined;
|
|
30
30
|
style: import("../../core").MantineStyleProp;
|
|
31
31
|
inputContainer: ((children: import("react").ReactNode) => import("react").ReactNode) | undefined;
|
|
@@ -37,7 +37,7 @@ export declare function useInputProps<T extends BaseProps, U extends Partial<T>>
|
|
|
37
37
|
inputProps: {
|
|
38
38
|
required: boolean | undefined;
|
|
39
39
|
classNames: Partial<Record<string, string>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, string>>) | undefined;
|
|
40
|
-
styles: Partial<Record<string, import("
|
|
40
|
+
styles: Partial<Record<string, import("../../core").CSSProperties>> | ((theme: import("../../core").MantineTheme, props: any, ctx: unknown) => Partial<Record<string, import("../../core").CSSProperties>>) | undefined;
|
|
41
41
|
unstyled: boolean | undefined;
|
|
42
42
|
size: (string & {}) | import("../../core").MantineSize | undefined;
|
|
43
43
|
__staticSelector: string | undefined;
|
|
@@ -15,6 +15,8 @@ interface MenuContext {
|
|
|
15
15
|
unstyled: boolean | undefined;
|
|
16
16
|
getStyles: GetStylesApi<MenuFactory>;
|
|
17
17
|
menuItemTabIndex: -1 | 0 | undefined;
|
|
18
|
+
openedViaClick: boolean;
|
|
19
|
+
setOpenedViaClick: (value: boolean) => void;
|
|
18
20
|
}
|
|
19
21
|
export declare const MenuContextProvider: ({ children, value }: {
|
|
20
22
|
value: MenuContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, StylesApiProps } from '../../core';
|
|
2
2
|
import { ComboboxData } from '../Combobox';
|
|
3
3
|
import { __BaseInputProps, __InputStylesNames } from '../Input';
|
|
4
|
-
export interface NativeSelectProps extends BoxProps, __BaseInputProps, StylesApiProps<NativeSelectFactory>, ElementProps<'select', 'size'> {
|
|
4
|
+
export interface NativeSelectProps extends BoxProps, Omit<__BaseInputProps, 'pointer'>, StylesApiProps<NativeSelectFactory>, ElementProps<'select', 'size'> {
|
|
5
5
|
/** Data used to render options, can be replaced with `children` */
|
|
6
6
|
data?: ComboboxData;
|
|
7
7
|
}
|
|
@@ -39,6 +39,8 @@ export interface NavLinkProps extends BoxProps, StylesApiProps<NavLinkFactory> {
|
|
|
39
39
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
40
40
|
/** Link `onkeydown` event */
|
|
41
41
|
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
42
|
+
/** Determines whether button text color with filled variant should depend on `background-color`. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
43
|
+
autoContrast?: boolean;
|
|
42
44
|
}
|
|
43
45
|
export type NavLinkFactory = PolymorphicFactory<{
|
|
44
46
|
props: NavLinkProps;
|
|
@@ -61,6 +61,10 @@ export interface NumberInputProps extends BoxProps, __BaseInputProps, StylesApiP
|
|
|
61
61
|
handlersRef?: React.ForwardedRef<NumberInputHandlers | undefined>;
|
|
62
62
|
/** Value set to the input when increment/decrement buttons are clicked or up/down arrows pressed if the input is empty, `0` by default */
|
|
63
63
|
startValue?: number;
|
|
64
|
+
/** Delay before stepping the value. Can be a number of milliseconds or a function that receives the current step count and returns the delay in milliseconds. */
|
|
65
|
+
stepHoldInterval?: number | ((stepCount: number) => number);
|
|
66
|
+
/** Initial delay in milliseconds before stepping the value. */
|
|
67
|
+
stepHoldDelay?: number;
|
|
64
68
|
}
|
|
65
69
|
export type NumberInputFactory = Factory<{
|
|
66
70
|
props: NumberInputProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxProps, ElementProps, Factory, MantineColor, MantineRadius, MantineSize, StylesApiProps } from '../../../core';
|
|
2
2
|
export type PaginationRootStylesNames = 'root' | 'control' | 'dots';
|
|
3
3
|
export type PaginationRootCssVariables = {
|
|
4
|
-
root: '--pagination-control-size' | '--pagination-control-radius' | '--pagination-control-fz' | '--pagination-active-bg';
|
|
4
|
+
root: '--pagination-control-size' | '--pagination-control-radius' | '--pagination-control-fz' | '--pagination-active-bg' | '--pagination-active-color';
|
|
5
5
|
};
|
|
6
6
|
export interface PaginationRootProps extends BoxProps, StylesApiProps<PaginationRootFactory>, ElementProps<'div', 'value' | 'onChange'> {
|
|
7
7
|
/** `height` and `min-width` of controls, `'md'` by default */
|
|
@@ -34,6 +34,8 @@ export interface PaginationRootProps extends BoxProps, StylesApiProps<Pagination
|
|
|
34
34
|
onLastPage?: () => void;
|
|
35
35
|
/** Additional props passed down to controls */
|
|
36
36
|
getItemProps?: (page: number) => Record<string, any>;
|
|
37
|
+
/** Determines whether active item text color should depend on `background-color` of the indicator. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
38
|
+
autoContrast?: boolean;
|
|
37
39
|
}
|
|
38
40
|
export type PaginationRootFactory = Factory<{
|
|
39
41
|
props: PaginationRootProps;
|
|
@@ -6,15 +6,15 @@ export type PasswordInputCssVariables = {
|
|
|
6
6
|
root: '--psi-icon-size' | '--psi-button-size';
|
|
7
7
|
};
|
|
8
8
|
export interface PasswordInputProps extends BoxProps, __BaseInputProps, StylesApiProps<PasswordInputFactory>, ElementProps<'input', 'size'> {
|
|
9
|
-
/**
|
|
9
|
+
/** A component to replace visibility toggle icon */
|
|
10
10
|
visibilityToggleIcon?: React.FC<{
|
|
11
11
|
reveal: boolean;
|
|
12
12
|
}>;
|
|
13
13
|
/** Props passed down to the visibility toggle button */
|
|
14
14
|
visibilityToggleButtonProps?: Record<string, any>;
|
|
15
|
-
/** Determines whether input content should be visible
|
|
15
|
+
/** Determines whether input content should be visible */
|
|
16
16
|
visible?: boolean;
|
|
17
|
-
/** Determines whether input content should be visible
|
|
17
|
+
/** Determines whether input content should be visible by default */
|
|
18
18
|
defaultVisible?: boolean;
|
|
19
19
|
/** Called when visibility changes */
|
|
20
20
|
onVisibilityChange?: (visible: boolean) => void;
|
|
@@ -5,13 +5,13 @@ export type PinInputCssVariables = {
|
|
|
5
5
|
root: '--pin-input-size';
|
|
6
6
|
};
|
|
7
7
|
export interface PinInputProps extends BoxProps, StylesApiProps<PinInputFactory>, ElementProps<'div', 'onChange'> {
|
|
8
|
-
/** Hidden input name attribute */
|
|
8
|
+
/** Hidden input `name` attribute */
|
|
9
9
|
name?: string;
|
|
10
|
-
/** Hidden input form attribute */
|
|
10
|
+
/** Hidden input `form` attribute */
|
|
11
11
|
form?: string;
|
|
12
|
-
/** Key of `theme.spacing` or any valid CSS value
|
|
12
|
+
/** Key of `theme.spacing` or any valid CSS value to set `gap` between inputs, numbers are converted to rem, `'md'` by default */
|
|
13
13
|
gap?: MantineSpacing;
|
|
14
|
-
/** Key of `theme.radius` or any valid CSS value to set border-radius
|
|
14
|
+
/** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem, `theme.defaultRadius` by default */
|
|
15
15
|
radius?: MantineRadius;
|
|
16
16
|
/** Controls inputs `width` and `height`, `'sm'` by default */
|
|
17
17
|
size?: MantineSize;
|
|
@@ -31,19 +31,19 @@ export interface PinInputProps extends BoxProps, StylesApiProps<PinInputFactory>
|
|
|
31
31
|
manageFocus?: boolean;
|
|
32
32
|
/** Determines whether `autocomplete="one-time-code"` attribute should be set on all inputs, `true` by default */
|
|
33
33
|
oneTimeCode?: boolean;
|
|
34
|
-
/** Base id used for all inputs, generated randomly
|
|
34
|
+
/** Base id used for all inputs. By default, inputs' ids are generated randomly. */
|
|
35
35
|
id?: string;
|
|
36
|
-
/**
|
|
36
|
+
/** If set, `disabled` attribute is added to all inputs */
|
|
37
37
|
disabled?: boolean;
|
|
38
|
-
/**
|
|
38
|
+
/** If set, adds error styles and `aria-invalid` attribute to all inputs */
|
|
39
39
|
error?: boolean;
|
|
40
|
-
/**
|
|
40
|
+
/** Determines which values can be entered, `'alphanumeric'` by default */
|
|
41
41
|
type?: 'alphanumeric' | 'number' | RegExp;
|
|
42
42
|
/** Changes input type to `"password"`, `false` by default */
|
|
43
43
|
mask?: boolean;
|
|
44
|
-
/** Number of
|
|
44
|
+
/** Number of inputs, `4` by default */
|
|
45
45
|
length?: number;
|
|
46
|
-
/**
|
|
46
|
+
/** If set, the user cannot edit the value */
|
|
47
47
|
readOnly?: boolean;
|
|
48
48
|
/** Inputs `type` attribute, inferred from the `type` prop if not specified */
|
|
49
49
|
inputType?: React.HTMLInputTypeAttribute;
|
|
@@ -2,6 +2,7 @@ import { GetStylesApi } from '../../core';
|
|
|
2
2
|
import type { ProgressRootFactory } from './ProgressRoot/ProgressRoot';
|
|
3
3
|
interface ProgressContextValue {
|
|
4
4
|
getStyles: GetStylesApi<ProgressRootFactory>;
|
|
5
|
+
autoContrast: boolean | undefined;
|
|
5
6
|
}
|
|
6
7
|
export declare const ProgressProvider: ({ children, value }: {
|
|
7
8
|
value: ProgressContextValue;
|
|
@@ -8,6 +8,8 @@ export interface __ProgressRootProps extends BoxProps, ElementProps<'div'> {
|
|
|
8
8
|
size?: MantineSize | (string & {}) | number;
|
|
9
9
|
/** Key of `theme.radius` or any valid CSS value to set `border-radius`, `theme.defaultRadius` by default */
|
|
10
10
|
radius?: MantineRadius;
|
|
11
|
+
/** Determines whether label text color should depend on `background-color`. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
12
|
+
autoContrast?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export interface ProgressRootProps extends __ProgressRootProps, StylesApiProps<ProgressRootFactory> {
|
|
13
15
|
}
|
|
@@ -9,13 +9,13 @@ export type RadioCssVariables = {
|
|
|
9
9
|
root: '--radio-size' | '--radio-radius' | '--radio-color' | '--radio-icon-color' | '--radio-icon-size';
|
|
10
10
|
};
|
|
11
11
|
export interface RadioProps extends BoxProps, StylesApiProps<RadioFactory>, ElementProps<'input', 'size'> {
|
|
12
|
-
/**
|
|
12
|
+
/** Content of the `label` associated with the radio */
|
|
13
13
|
label?: React.ReactNode;
|
|
14
14
|
/** Key of `theme.colors` or any valid CSS color to set input color in checked state, `theme.primaryColor` by default */
|
|
15
15
|
color?: MantineColor;
|
|
16
|
-
/** Controls size of
|
|
16
|
+
/** Controls size of the component, `'sm'` by default */
|
|
17
17
|
size?: MantineSize;
|
|
18
|
-
/**
|
|
18
|
+
/** A component that replaces default check icon */
|
|
19
19
|
icon?: React.FC<RadioIconProps>;
|
|
20
20
|
/** Props passed down to the root element */
|
|
21
21
|
wrapperProps?: Record<string, any>;
|
|
@@ -27,10 +27,12 @@ export interface RadioProps extends BoxProps, StylesApiProps<RadioFactory>, Elem
|
|
|
27
27
|
error?: React.ReactNode;
|
|
28
28
|
/** Key of `theme.radius` or any valid CSS value to set `border-radius,` "xl" by default */
|
|
29
29
|
radius?: MantineRadius;
|
|
30
|
-
/** Assigns ref of the root element
|
|
30
|
+
/** Assigns ref of the root element */
|
|
31
31
|
rootRef?: React.ForwardedRef<HTMLDivElement>;
|
|
32
|
-
/** Key of `theme.colors` or any valid CSS color to set icon color, `theme.
|
|
32
|
+
/** Key of `theme.colors` or any valid CSS color to set icon color, by default value depends on `theme.autoContrast` */
|
|
33
33
|
iconColor?: MantineColor;
|
|
34
|
+
/** Determines whether icon color with filled variant should depend on `background-color`. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
35
|
+
autoContrast?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export type RadioFactory = Factory<{
|
|
36
38
|
props: RadioProps;
|
|
@@ -3,7 +3,7 @@ import { Factory, MantineSize } from '../../../core';
|
|
|
3
3
|
import { InputWrapperProps, InputWrapperStylesNames } from '../../Input';
|
|
4
4
|
export type RadioGroupStylesNames = InputWrapperStylesNames;
|
|
5
5
|
export interface RadioGroupProps extends Omit<InputWrapperProps, 'onChange'> {
|
|
6
|
-
/** `Radio` components */
|
|
6
|
+
/** `Radio` components and any other elements */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/** Controlled component value */
|
|
9
9
|
value?: string;
|
|
@@ -15,7 +15,7 @@ export interface RadioGroupProps extends Omit<InputWrapperProps, 'onChange'> {
|
|
|
15
15
|
wrapperProps?: Record<string, any>;
|
|
16
16
|
/** Controls size of the `Input.Wrapper`, `'sm'` by default */
|
|
17
17
|
size?: MantineSize;
|
|
18
|
-
/**
|
|
18
|
+
/** `name` attribute of child radio inputs. By default, `name` is generated randomly. */
|
|
19
19
|
name?: string;
|
|
20
20
|
}
|
|
21
21
|
export type RadioGroupFactory = Factory<{
|
|
@@ -11,27 +11,27 @@ export interface RatingProps extends BoxProps, StylesApiProps<RatingFactory>, El
|
|
|
11
11
|
value?: number;
|
|
12
12
|
/** Called when value changes */
|
|
13
13
|
onChange?: (value: number) => void;
|
|
14
|
-
/**
|
|
14
|
+
/** Icon displayed when the symbol is empty */
|
|
15
15
|
emptySymbol?: React.ReactNode | ((value: number) => React.ReactNode);
|
|
16
|
-
/**
|
|
16
|
+
/** Icon displayed when the symbol is full */
|
|
17
17
|
fullSymbol?: React.ReactNode | ((value: number) => React.ReactNode);
|
|
18
|
-
/** Number of fractions each item can be divided into, 1 by default */
|
|
18
|
+
/** Number of fractions each item can be divided into, `1` by default */
|
|
19
19
|
fractions?: number;
|
|
20
|
-
/** Controls component size */
|
|
21
|
-
size?: MantineSize;
|
|
22
|
-
/** Number of controls
|
|
20
|
+
/** Controls component size, `'sm'` by default */
|
|
21
|
+
size?: MantineSize | number | (string & {});
|
|
22
|
+
/** Number of controls, `5` by default */
|
|
23
23
|
count?: number;
|
|
24
|
-
/** Called when
|
|
24
|
+
/** Called when one of the controls is hovered */
|
|
25
25
|
onHover?: (value: number) => void;
|
|
26
|
-
/**
|
|
27
|
-
getSymbolLabel?: (
|
|
28
|
-
/**
|
|
26
|
+
/** A function to assign `aria-label` of the the control at index given in the argument. If not specified, control index is used as `aria-label`. */
|
|
27
|
+
getSymbolLabel?: (index: number) => string;
|
|
28
|
+
/** `name` attribute passed down to all inputs. By default, `name` is generated randomly. */
|
|
29
29
|
name?: string;
|
|
30
|
-
/** If
|
|
30
|
+
/** If set, the user cannot interact with the component, `false` by default */
|
|
31
31
|
readOnly?: boolean;
|
|
32
|
-
/** If
|
|
32
|
+
/** If set, only the selected symbol changes to full symbol when selected, `false` by default */
|
|
33
33
|
highlightSelectedOnly?: boolean;
|
|
34
|
-
/** Key of theme.colors or any CSS color value, yellow by default */
|
|
34
|
+
/** Key of `theme.colors` or any CSS color value, `'yellow'` by default */
|
|
35
35
|
color?: MantineColor;
|
|
36
36
|
}
|
|
37
37
|
export type RatingFactory = Factory<{
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BoxProps, ElementProps
|
|
2
|
+
import { BoxProps, ElementProps } from '../../../core';
|
|
3
3
|
export interface RatingItemProps extends BoxProps, ElementProps<'input', 'value' | 'size'> {
|
|
4
|
-
size: MantineSize;
|
|
5
4
|
getSymbolLabel: ((value: number) => string) | undefined;
|
|
6
5
|
emptyIcon?: React.ReactNode | ((value: number) => React.ReactNode);
|
|
7
6
|
fullIcon?: React.ReactNode | ((value: number) => React.ReactNode);
|
|
@@ -13,7 +12,7 @@ export interface RatingItemProps extends BoxProps, ElementProps<'input', 'value'
|
|
|
13
12
|
onChange: (event: React.ChangeEvent<HTMLInputElement> | number) => void;
|
|
14
13
|
onInputChange: (event: React.ChangeEvent<HTMLInputElement> | number) => void;
|
|
15
14
|
}
|
|
16
|
-
export declare function RatingItem({
|
|
15
|
+
export declare function RatingItem({ getSymbolLabel, emptyIcon, fullIcon, full, active, value, readOnly, fractionValue, color, id, onBlur, onChange, onInputChange, style, ...others }: RatingItemProps): React.JSX.Element;
|
|
17
16
|
export declare namespace RatingItem {
|
|
18
17
|
var displayName: string;
|
|
19
18
|
}
|
|
@@ -38,6 +38,8 @@ export interface SegmentedControlProps extends BoxProps, StylesApiProps<Segmente
|
|
|
38
38
|
orientation?: 'vertical' | 'horizontal';
|
|
39
39
|
/** Determines whether the value can be changed */
|
|
40
40
|
readOnly?: boolean;
|
|
41
|
+
/** Determines whether text color should depend on `background-color` of the indicator. If luminosity of the `color` prop is less than `theme.luminosityThreshold`, then `theme.white` will be used for text color, otherwise `theme.black`. Overrides `theme.autoContrast`. */
|
|
42
|
+
autoContrast?: boolean;
|
|
41
43
|
}
|
|
42
44
|
export type SegmentedControlFactory = Factory<{
|
|
43
45
|
props: SegmentedControlProps;
|