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CAAEG,QAAS,KAEvD,KACDf,IACGA,EAAAvB,mBAAA,CAAoB,YAAakC,GACjCX,EAAAvB,mBAAA,CAAoB,aAAcmC,GAE3C,GACC,CAACxI,EAAK/R,EAAS,EAEX,CAAEF,IAAAA,EAAK2Z,OAAAA,CAAO,CACvB,6DChIgB,SAAAJ,EAAMtZ,CAAe,CAAAkM,CAAA,CAAyBF,CAAyB,SACjF,KAAqB,IAArBE,GAAqBF,KAAmB,IAAnBA,EAChBhM,EAGLkM,KAAqB,IAArBA,GAAqBF,KAAmB,IAAnBA,EAChBtJ,KAAKsJ,GAAI,CAAAhM,EAAOkM,GAGrBA,KAAqB,IAArBA,GAAqBF,KAAmB,IAAnBA,EAChBtJ,KAAKwJ,GAAI,CAAAlM,EAAOgM,GAGlBtJ,KAAKwJ,GAAI,CAAAxJ,KAAKsJ,GAAA,CAAIhM,EAAOkM,GAAOF,EACzC","sources":["webpack://_N_E/../../../../src/components/ColorPicker/AlphaSlider/AlphaSlider.tsx","webpack://_N_E/../../components/ColorPicker/ColorPicker.context.ts","webpack://_N_E/../../../../src/components/ColorPicker/Saturation/Saturation.tsx","webpack://_N_E/../../../../src/components/ColorPicker/Swatches/Swatches.tsx","webpack://_N_E/../../components/ColorPicker/ColorPicker.tsx","webpack://_N_E/../../../../src/components/ColorPicker/ColorSlider/ColorSlider.tsx","webpack://_N_E/../../../../src/components/ColorPicker/HueSlider/HueSlider.tsx","webpack://_N_E/../../../../src/components/ColorPicker/Thumb/Thumb.tsx","webpack://_N_E/../../../../src/components/ColorPicker/converters/converters.ts","webpack://_N_E/../../../../src/components/ColorPicker/converters/parsers.ts","webpack://_N_E/../../components/ColorSwatch/ColorSwatch.tsx","webpack://_N_E/../../components/SimpleGrid/SimpleGridVariables.tsx","webpack://_N_E/../../components/SimpleGrid/SimpleGrid.tsx","webpack://_N_E/../../components/Tooltip/use-tooltip.ts","webpack://_N_E/../../components/Tooltip/Tooltip.tsx","webpack://_N_E/../../../../src/components/Tooltip/TooltipFloating/use-floating-tooltip.ts","webpack://_N_E/../../../../src/components/Tooltip/TooltipFloating/TooltipFloating.tsx","webpack://_N_E/../../../../src/components/Tooltip/TooltipGroup/TooltipGroup.context.ts","webpack://_N_E/../../../../src/components/Tooltip/TooltipGroup/TooltipGroup.tsx","webpack://_N_E/../../../../src/components/Transition/get-transition-props/get-transition-props.ts","webpack://_N_E/../../components/TypographyStylesProvider/TypographyStylesProvider.tsx","webpack://_N_E/../../../../src/core/utils/get-base-value/get-base-value.ts","webpack://_N_E/../../src/use-input-state/use-input-state.ts","webpack://_N_E/../../src/use-move/use-move.ts","webpack://_N_E/../../utils/clamp/clamp.ts"],"sourcesContent":["import { forwardRef } from 'react';\nimport { rem, useProps } from '../../../core';\nimport { ColorSlider, ColorSliderProps } from '../ColorSlider/ColorSlider';\nimport { round } from '../converters/parsers';\n\nexport interface AlphaSliderProps\n extends Omit {\n color: string;\n}\n\nconst defaultProps: Partial = {};\n\nexport const AlphaSlider = forwardRef((props, ref) => {\n const { value, onChange, onChangeEnd, color, ...others } = useProps(\n 'AlphaSlider',\n defaultProps,\n props\n );\n\n return (\n onChange?.(round(val, 2))}\n onChangeEnd={(val) => onChangeEnd?.(round(val, 2))}\n maxValue={1}\n round={false}\n data-alpha\n overlays={[\n {\n backgroundImage:\n 'linear-gradient(45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(-45deg, var(--slider-checkers) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--slider-checkers) 75%), linear-gradient(-45deg, var(--mantine-color-body) 75%, var(--slider-checkers) 75%)',\n backgroundSize: `${rem(8)} ${rem(8)}`,\n backgroundPosition: `0 0, 0 ${rem(4)}, ${rem(4)} ${rem(-4)}, ${rem(-4)} 0`,\n },\n {\n backgroundImage: `linear-gradient(90deg, transparent, ${color})`,\n },\n {\n boxShadow: `rgba(0, 0, 0, .1) 0 0 0 ${rem(1)} inset, rgb(0, 0, 0, .15) 0 0 ${rem(\n 4\n )} inset`,\n },\n ]}\n />\n );\n});\n\nAlphaSlider.displayName = '@mantine/core/AlphaSlider';\n","import { createOptionalContext, GetStylesApi } from '../../core';\nimport type { ColorPickerFactory } from './ColorPicker';\n\ninterface ColorPickerContextValue {\n getStyles: GetStylesApi;\n unstyled: boolean | undefined;\n}\n\nexport const [ColorPickerProvider, useColorPickerContext] =\n createOptionalContext(null);\n","import { useEffect, useRef, useState } from 'react';\nimport { clampUseMovePosition, useMove, UseMovePosition } from '@mantine/hooks';\nimport { Box, ElementProps, MantineSize } from '../../../core';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { HsvaColor } from '../ColorPicker.types';\nimport { convertHsvaTo } from '../converters';\nimport { Thumb } from '../Thumb/Thumb';\n\nexport interface SaturationProps extends ElementProps<'div', 'onChange'> {\n value: HsvaColor;\n onChange: (color: Partial) => void;\n onChangeEnd: (color: Partial) => void;\n onScrubStart?: () => void;\n onScrubEnd?: () => void;\n saturationLabel?: string;\n size: MantineSize | (string & {});\n color: string;\n focusable?: boolean;\n}\n\nexport function Saturation({\n className,\n onChange,\n onChangeEnd,\n value,\n saturationLabel,\n focusable = true,\n size,\n color,\n onScrubStart,\n onScrubEnd,\n ...others\n}: SaturationProps) {\n const { getStyles } = useColorPickerContext()!;\n\n const [position, setPosition] = useState({ x: value.s / 100, y: 1 - value.v / 100 });\n const positionRef = useRef(position);\n\n const { ref } = useMove(\n ({ x, y }) => {\n positionRef.current = { x, y };\n onChange({ s: Math.round(x * 100), v: Math.round((1 - y) * 100) });\n },\n {\n onScrubEnd: () => {\n const { x, y } = positionRef.current;\n onChangeEnd({ s: Math.round(x * 100), v: Math.round((1 - y) * 100) });\n onScrubEnd?.();\n },\n onScrubStart,\n }\n );\n\n useEffect(() => {\n setPosition({ x: value.s / 100, y: 1 - value.v / 100 });\n }, [value.s, value.v]);\n\n const handleArrow = (event: React.KeyboardEvent, pos: UseMovePosition) => {\n event.preventDefault();\n const _position = clampUseMovePosition(pos);\n onChange({ s: Math.round(_position.x * 100), v: Math.round((1 - _position.y) * 100) });\n onChangeEnd({ s: Math.round(_position.x * 100), v: Math.round((1 - _position.y) * 100) });\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowUp': {\n handleArrow(event, { y: position.y - 0.05, x: position.x });\n break;\n }\n\n case 'ArrowDown': {\n handleArrow(event, { y: position.y + 0.05, x: position.x });\n break;\n }\n\n case 'ArrowRight': {\n handleArrow(event, { x: position.x + 0.05, y: position.y });\n break;\n }\n\n case 'ArrowLeft': {\n handleArrow(event, { x: position.x - 0.05, y: position.y });\n break;\n }\n }\n };\n\n return (\n \n \n\n \n\n \n\n \n \n );\n}\n\nSaturation.displayName = '@mantine/core/Saturation';\n","import { forwardRef } from 'react';\nimport { Box, ElementProps } from '../../../core';\nimport { ColorSwatch } from '../../ColorSwatch';\nimport { useColorPickerContext } from '../ColorPicker.context';\n\nexport interface SwatchesProps extends ElementProps<'div'> {\n size?: string | number;\n data: string[];\n swatchesPerRow?: number;\n focusable?: boolean;\n onChangeEnd?: (color: string) => void;\n setValue: (value: string) => void;\n}\n\nexport const Swatches = forwardRef(\n (\n {\n className,\n datatype,\n setValue,\n onChangeEnd,\n size,\n focusable,\n data,\n swatchesPerRow,\n ...others\n },\n ref\n ) => {\n const ctx = useColorPickerContext()!;\n\n const colors = data.map((color, index) => (\n {\n setValue(color);\n onChangeEnd?.(color);\n }}\n aria-label={color}\n tabIndex={focusable ? 0 : -1}\n data-swatch\n />\n ));\n\n return (\n \n {colors}\n \n );\n }\n);\n\nSwatches.displayName = '@mantine/core/Swatches';\n","import { useRef, useState } from 'react';\nimport { useDidUpdate, useUncontrolled } from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n createVarsResolver,\n ElementProps,\n factory,\n Factory,\n getSize,\n getSpacing,\n MantineSize,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport { ColorSwatch } from '../ColorSwatch';\nimport { AlphaSlider } from './AlphaSlider/AlphaSlider';\nimport { ColorPickerProvider } from './ColorPicker.context';\nimport { ColorFormat, HsvaColor } from './ColorPicker.types';\nimport { convertHsvaTo, isColorValid, parseColor } from './converters';\nimport { HueSlider } from './HueSlider/HueSlider';\nimport { Saturation } from './Saturation/Saturation';\nimport { Swatches } from './Swatches/Swatches';\nimport classes from './ColorPicker.module.css';\n\nexport type ColorPickerStylesNames =\n | 'wrapper'\n | 'preview'\n | 'body'\n | 'sliders'\n | 'slider'\n | 'sliderOverlay'\n | 'thumb'\n | 'saturation'\n | 'thumb'\n | 'saturationOverlay'\n | 'thumb'\n | 'swatches'\n | 'swatch';\n\nexport type ColorPickerCssVariables = {\n wrapper:\n | '--cp-preview-size'\n | '--cp-width'\n | '--cp-body-spacing'\n | '--cp-swatch-size'\n | '--cp-thumb-size'\n | '--cp-saturation-height';\n};\n\nexport interface __ColorPickerProps {\n /** Controlled component value */\n value?: string;\n\n /** Uncontrolled component default value */\n defaultValue?: string;\n\n /** Called when value changes */\n onChange?: (value: string) => void;\n\n /** Called when the user stops dragging one of the sliders or changes the value with arrow keys */\n onChangeEnd?: (value: string) => void;\n\n /** Color format, `'hex'` by default */\n format?: ColorFormat;\n\n /** Determines whether the color picker should be displayed, `true` by default */\n withPicker?: boolean;\n\n /** An array of colors in one of the supported formats. Used to render swatches list below the color picker. */\n swatches?: string[];\n\n /** Number of swatches per row, `7` by default */\n swatchesPerRow?: number;\n\n /** Controls size of hue, alpha and saturation sliders, `'md'` by default */\n size?: MantineSize | (string & {});\n}\n\nexport interface ColorPickerProps\n extends BoxProps,\n __ColorPickerProps,\n StylesApiProps,\n ElementProps<'div', 'onChange' | 'value' | 'defaultValue'> {\n __staticSelector?: string;\n\n /** Determines whether the component should take 100% width of its container, `false` by default */\n fullWidth?: boolean;\n\n /** Determines whether interactive elements (sliders thumbs and swatches) should be focusable, `true` by default */\n focusable?: boolean;\n\n /** Saturation slider `aria-label` prop */\n saturationLabel?: string;\n\n /** Hue slider `aria-label` prop */\n hueLabel?: string;\n\n /** Alpha slider `aria-label` prop */\n alphaLabel?: string;\n\n /** Called when one of the color swatches is clicked */\n onColorSwatchClick?: (color: string) => void;\n}\n\nexport type ColorPickerFactory = Factory<{\n props: ColorPickerProps;\n ref: HTMLDivElement;\n stylesNames: ColorPickerStylesNames;\n vars: ColorPickerCssVariables;\n}>;\n\nconst defaultProps: Partial = {\n swatchesPerRow: 7,\n withPicker: true,\n focusable: true,\n size: 'md',\n __staticSelector: 'ColorPicker',\n};\n\nconst varsResolver = createVarsResolver((_, { size, swatchesPerRow }) => ({\n wrapper: {\n '--cp-preview-size': getSize(size, 'cp-preview-size'),\n '--cp-width': getSize(size, 'cp-width'),\n '--cp-body-spacing': getSpacing(size),\n '--cp-swatch-size': `${100 / swatchesPerRow!}%`,\n '--cp-thumb-size': getSize(size, 'cp-thumb-size'),\n '--cp-saturation-height': getSize(size, 'cp-saturation-height'),\n },\n}));\n\nexport const ColorPicker = factory((_props, ref) => {\n const props = useProps('ColorPicker', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n format,\n value,\n defaultValue,\n onChange,\n onChangeEnd,\n withPicker,\n size,\n saturationLabel,\n hueLabel,\n alphaLabel,\n focusable,\n swatches,\n swatchesPerRow,\n fullWidth,\n onColorSwatchClick,\n __staticSelector,\n mod,\n ...others\n } = props;\n\n const getStyles = useStyles({\n name: __staticSelector!,\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n rootSelector: 'wrapper',\n vars,\n varsResolver,\n });\n\n const formatRef = useRef(format);\n const valueRef = useRef('');\n const scrubTimeoutRef = useRef(-1);\n const isScrubbingRef = useRef(false);\n const withAlpha = format === 'hexa' || format === 'rgba' || format === 'hsla';\n\n const [_value, setValue, controlled] = useUncontrolled({\n value,\n defaultValue,\n finalValue: '#FFFFFF',\n onChange,\n });\n\n const [parsed, setParsed] = useState(parseColor(_value));\n\n const startScrubbing = () => {\n window.clearTimeout(scrubTimeoutRef.current);\n isScrubbingRef.current = true;\n };\n\n const stopScrubbing = () => {\n window.clearTimeout(scrubTimeoutRef.current);\n scrubTimeoutRef.current = window.setTimeout(() => {\n isScrubbingRef.current = false;\n }, 200);\n };\n\n const handleChange = (color: Partial) => {\n setParsed((current) => {\n const next = { ...current, ...color };\n valueRef.current = convertHsvaTo(formatRef.current!, next);\n return next;\n });\n\n setValue(valueRef.current!);\n };\n\n useDidUpdate(() => {\n if (isColorValid(value!) && !isScrubbingRef.current) {\n setParsed(parseColor(value!));\n }\n }, [value]);\n\n useDidUpdate(() => {\n formatRef.current = format;\n setValue(convertHsvaTo(format!, parsed));\n }, [format]);\n\n return (\n \n \n {withPicker && (\n <>\n \n onChangeEnd?.(convertHsvaTo(formatRef.current!, { ...parsed, s: s!, v: v! }))\n }\n color={_value}\n size={size!}\n focusable={focusable}\n saturationLabel={saturationLabel}\n onScrubStart={startScrubbing}\n onScrubEnd={stopScrubbing}\n />\n\n
\n
\n handleChange({ h })}\n onChangeEnd={(h) =>\n onChangeEnd?.(convertHsvaTo(formatRef.current!, { ...parsed, h }))\n }\n size={size}\n focusable={focusable}\n aria-label={hueLabel}\n onScrubStart={startScrubbing}\n onScrubEnd={stopScrubbing}\n />\n\n {withAlpha && (\n handleChange({ a })}\n onChangeEnd={(a) => {\n onChangeEnd?.(convertHsvaTo(formatRef.current!, { ...parsed, a }));\n }}\n size={size}\n color={convertHsvaTo('hex', parsed)}\n focusable={focusable}\n aria-label={alphaLabel}\n onScrubStart={startScrubbing}\n onScrubEnd={stopScrubbing}\n />\n )}\n
\n\n {withAlpha && (\n \n )}\n
\n \n )}\n\n {Array.isArray(swatches) && (\n {\n const convertedColor = convertHsvaTo(format!, parseColor(color));\n onColorSwatchClick?.(convertedColor);\n onChangeEnd?.(convertedColor);\n if (!controlled) {\n setParsed(parseColor(color));\n }\n }}\n />\n )}\n \n
\n );\n});\n\nColorPicker.classes = classes;\nColorPicker.displayName = '@mantine/core/ColorPicker';\n","import { useRef, useState } from 'react';\nimport {\n clampUseMovePosition,\n useDidUpdate,\n useMergedRef,\n useMove,\n UseMovePosition,\n} from '@mantine/hooks';\nimport {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n MantineSize,\n rem,\n StylesApiProps,\n useMantineTheme,\n useProps,\n useStyles,\n} from '../../../core';\nimport { useColorPickerContext } from '../ColorPicker.context';\nimport { Thumb } from '../Thumb/Thumb';\nimport classes from '../ColorPicker.module.css';\n\nexport type ColorSliderStylesNames = 'slider' | 'sliderOverlay' | 'thumb';\n\nexport interface __ColorSliderProps extends ElementProps<'div', 'onChange'> {\n value: number;\n onChange?: (value: number) => void;\n onChangeEnd?: (value: number) => void;\n onScrubStart?: () => void;\n onScrubEnd?: () => void;\n size?: MantineSize | (string & {});\n focusable?: boolean;\n}\n\nexport interface ColorSliderProps\n extends BoxProps,\n StylesApiProps,\n __ColorSliderProps,\n ElementProps<'div', 'onChange'> {\n __staticSelector?: string;\n maxValue: number;\n overlays: React.CSSProperties[];\n round: boolean;\n thumbColor?: string;\n}\n\nexport type ColorSliderFactory = Factory<{\n props: ColorSliderProps;\n ref: HTMLDivElement;\n stylesNames: ColorSliderStylesNames;\n}>;\n\nconst defaultProps: Partial = {};\n\nexport const ColorSlider = factory((_props, ref) => {\n const props = useProps('ColorSlider', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n onChange,\n onChangeEnd,\n maxValue,\n round,\n size = 'md',\n focusable = true,\n value,\n overlays,\n thumbColor = 'transparent',\n onScrubStart,\n onScrubEnd,\n __staticSelector = 'ColorPicker',\n ...others\n } = props;\n\n const _getStyles = useStyles({\n name: __staticSelector,\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n const ctxGetStyles = useColorPickerContext()?.getStyles;\n const getStyles = ctxGetStyles || _getStyles;\n\n const theme = useMantineTheme();\n const [position, setPosition] = useState({ y: 0, x: value / maxValue });\n const positionRef = useRef(position);\n const getChangeValue = (val: number) => (round ? Math.round(val * maxValue) : val * maxValue);\n const { ref: sliderRef } = useMove(\n ({ x, y }) => {\n positionRef.current = { x, y };\n onChange?.(getChangeValue(x));\n },\n {\n onScrubEnd: () => {\n const { x } = positionRef.current;\n onChangeEnd?.(getChangeValue(x));\n onScrubEnd?.();\n },\n onScrubStart,\n }\n );\n\n useDidUpdate(() => {\n setPosition({ y: 0, x: value / maxValue });\n }, [value]);\n\n const handleArrow = (event: React.KeyboardEvent, pos: UseMovePosition) => {\n event.preventDefault();\n const _position = clampUseMovePosition(pos);\n onChange?.(getChangeValue(_position.x));\n onChangeEnd?.(getChangeValue(_position.x));\n };\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n switch (event.key) {\n case 'ArrowRight': {\n handleArrow(event, { x: position.x + 0.05, y: position.y });\n break;\n }\n\n case 'ArrowLeft': {\n handleArrow(event, { x: position.x - 0.05, y: position.y });\n break;\n }\n }\n };\n\n const layers = overlays.map((overlay, index) => (\n
\n ));\n\n return (\n \n {layers}\n\n \n \n );\n});\n\nColorSlider.displayName = '@mantine/core/ColorSlider';\n","import { forwardRef } from 'react';\nimport { rem, useProps } from '../../../core';\nimport { ColorSlider, ColorSliderProps } from '../ColorSlider/ColorSlider';\n\nexport interface HueSliderProps extends Omit {}\n\nexport const HueSlider = forwardRef((props, ref) => {\n const { value, onChange, onChangeEnd, color, ...others } = useProps('HueSlider', {}, props);\n\n return (\n \n );\n});\n\nHueSlider.displayName = '@mantine/core/HueSlider';\n","import { forwardRef } from 'react';\nimport { Box } from '../../../core';\n\nexport interface ThumbProps extends React.ComponentPropsWithoutRef<'div'> {\n variant?: string;\n position: { x: number; y: number };\n}\n\nexport const Thumb = forwardRef(({ position, ...others }, ref) => (\n \n));\n\nThumb.displayName = '@mantine/core/ColorPickerThumb';\n","import { ColorFormat, HsvaColor, RgbaColor } from '../ColorPicker.types';\nimport { round } from './parsers';\n\nexport function hsvaToRgbaObject({ h, s, v, a }: HsvaColor): RgbaColor {\n const _h = (h / 360) * 6;\n const _s = s / 100;\n const _v = v / 100;\n\n const hh = Math.floor(_h);\n const l = _v * (1 - _s);\n const c = _v * (1 - (_h - hh) * _s);\n const d = _v * (1 - (1 - _h + hh) * _s);\n const module = hh % 6;\n\n return {\n r: round([_v, c, l, l, d, _v][module] * 255),\n g: round([d, _v, _v, c, l, l][module] * 255),\n b: round([l, l, d, _v, _v, c][module] * 255),\n a: round(a, 2),\n };\n}\n\nexport function hsvaToRgba(color: HsvaColor, includeAlpha: boolean) {\n const { r, g, b, a } = hsvaToRgbaObject(color);\n\n if (!includeAlpha) {\n return `rgb(${r}, ${g}, ${b})`;\n }\n\n return `rgba(${r}, ${g}, ${b}, ${round(a, 2)})`;\n}\n\nexport function hsvaToHsl({ h, s, v, a }: HsvaColor, includeAlpha: boolean) {\n const hh = ((200 - s) * v) / 100;\n\n const result = {\n h: Math.round(h),\n s: Math.round(hh > 0 && hh < 200 ? ((s * v) / 100 / (hh <= 100 ? hh : 200 - hh)) * 100 : 0),\n l: Math.round(hh / 2),\n };\n\n if (!includeAlpha) {\n return `hsl(${result.h}, ${result.s}%, ${result.l}%)`;\n }\n\n return `hsla(${result.h}, ${result.s}%, ${result.l}%, ${round(a, 2)})`;\n}\n\nfunction formatHexPart(number: number) {\n const hex = number.toString(16);\n return hex.length < 2 ? `0${hex}` : hex;\n}\n\nexport function hsvaToHex(color: HsvaColor) {\n const { r, g, b } = hsvaToRgbaObject(color);\n return `#${formatHexPart(r)}${formatHexPart(g)}${formatHexPart(b)}`;\n}\n\nexport function hsvaToHexa(color: HsvaColor) {\n const a = Math.round(color.a * 255);\n\n return `${hsvaToHex(color)}${formatHexPart(a)}`;\n}\n\nconst CONVERTERS: Record string> = {\n hex: hsvaToHex,\n hexa: (color) => hsvaToHexa(color),\n rgb: (color) => hsvaToRgba(color, false),\n rgba: (color) => hsvaToRgba(color, true),\n hsl: (color) => hsvaToHsl(color, false),\n hsla: (color) => hsvaToHsl(color, true),\n};\n\nexport function convertHsvaTo(format: ColorFormat, color: HsvaColor) {\n if (!color) {\n return '#000000';\n }\n\n if (!(format in CONVERTERS)) {\n return CONVERTERS.hex(color);\n }\n\n return CONVERTERS[format](color);\n}\n","import { ColorFormat, HslaColor, HsvaColor, RgbaColor } from '../ColorPicker.types';\n\nexport function round(number: number, digits = 0, base = 10 ** digits) {\n return Math.round(base * number) / base;\n}\n\nfunction hslaToHsva({ h, s, l, a }: HslaColor): HsvaColor {\n const ss = s * ((l < 50 ? l : 100 - l) / 100);\n\n return {\n h,\n s: ss > 0 ? ((2 * ss) / (l + ss)) * 100 : 0,\n v: l + ss,\n a,\n };\n}\n\nconst angleUnits: Record = {\n grad: 360 / 400,\n turn: 360,\n rad: 360 / (Math.PI * 2),\n};\n\nexport function parseHue(value: string, unit = 'deg') {\n return Number(value) * (angleUnits[unit] || 1);\n}\n\nconst HSL_REGEXP =\n /hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n\nexport function parseHsla(color: string): HsvaColor {\n const match = HSL_REGEXP.exec(color);\n\n if (!match) {\n return { h: 0, s: 0, v: 0, a: 1 };\n }\n\n return hslaToHsva({\n h: parseHue(match[1], match[2]),\n s: Number(match[3]),\n l: Number(match[4]),\n a: match[5] === undefined ? 1 : Number(match[5]) / (match[6] ? 100 : 1),\n });\n}\n\nfunction rgbaToHsva({ r, g, b, a }: RgbaColor): HsvaColor {\n const max = Math.max(r, g, b);\n const delta = max - Math.min(r, g, b);\n\n const hh = delta\n ? max === r\n ? (g - b) / delta\n : max === g\n ? 2 + (b - r) / delta\n : 4 + (r - g) / delta\n : 0;\n\n return {\n h: round(60 * (hh < 0 ? hh + 6 : hh), 3),\n s: round(max ? (delta / max) * 100 : 0, 3),\n v: round((max / 255) * 100, 3),\n a,\n };\n}\n\nexport function parseHex(color: string): HsvaColor {\n const hex = color[0] === '#' ? color.slice(1) : color;\n\n if (hex.length === 3) {\n return rgbaToHsva({\n r: parseInt(hex[0] + hex[0], 16),\n g: parseInt(hex[1] + hex[1], 16),\n b: parseInt(hex[2] + hex[2], 16),\n a: 1,\n });\n }\n\n return rgbaToHsva({\n r: parseInt(hex.slice(0, 2), 16),\n g: parseInt(hex.slice(2, 4), 16),\n b: parseInt(hex.slice(4, 6), 16),\n a: 1,\n });\n}\n\nexport function parseHexa(color: string): HsvaColor {\n const hex = color[0] === '#' ? color.slice(1) : color;\n\n const roundA = (a: string) => round(parseInt(a, 16) / 255, 3);\n if (hex.length === 4) {\n const withoutOpacity = hex.slice(0, 3);\n const a = roundA(hex[3] + hex[3]);\n\n const hsvaColor: HsvaColor = { ...parseHex(withoutOpacity), a };\n return hsvaColor;\n }\n\n const withoutOpacity = hex.slice(0, 6);\n const a = roundA(hex.slice(6, 8));\n const hsvaColor: HsvaColor = { ...parseHex(withoutOpacity), a };\n return hsvaColor;\n}\n\nconst RGB_REGEXP =\n /rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i;\n\nexport function parseRgba(color: string): HsvaColor {\n const match = RGB_REGEXP.exec(color);\n\n if (!match) {\n return { h: 0, s: 0, v: 0, a: 1 };\n }\n\n return rgbaToHsva({\n r: Number(match[1]) / (match[2] ? 100 / 255 : 1),\n g: Number(match[3]) / (match[4] ? 100 / 255 : 1),\n b: Number(match[5]) / (match[6] ? 100 / 255 : 1),\n a: match[7] === undefined ? 1 : Number(match[7]) / (match[8] ? 100 : 1),\n });\n}\n\nconst VALIDATION_REGEXP: Record = {\n hex: /^#?([0-9A-F]{3}){1,2}$/i,\n hexa: /^#?([0-9A-F]{4}){1,2}$/i,\n rgb: /^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/i,\n rgba: /^rgba\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/i,\n hsl: /hsl\\(\\s*(\\d+)\\s*,\\s*(\\d+(?:\\.\\d+)?%)\\s*,\\s*(\\d+(?:\\.\\d+)?%)\\)/i,\n hsla: /^hsla\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%,\\s*(\\d*(?:\\.\\d+)?)\\)$/i,\n};\n\nconst CONVERTERS: Record HsvaColor> = {\n hex: parseHex,\n hexa: parseHexa,\n rgb: parseRgba,\n rgba: parseRgba,\n hsl: parseHsla,\n hsla: parseHsla,\n};\n\nexport function isColorValid(color: string) {\n for (const [, regexp] of Object.entries(VALIDATION_REGEXP)) {\n if (regexp.test(color)) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function parseColor(color: string): HsvaColor {\n if (typeof color !== 'string') {\n return { h: 0, s: 0, v: 0, a: 1 };\n }\n\n if (color === 'transparent') {\n return { h: 0, s: 0, v: 0, a: 0 };\n }\n\n const trimmed = color.trim();\n\n for (const [rule, regexp] of Object.entries(VALIDATION_REGEXP)) {\n if (regexp.test(trimmed)) {\n return CONVERTERS[rule as keyof typeof CONVERTERS](trimmed);\n }\n }\n\n return { h: 0, s: 0, v: 0, a: 1 };\n}\n","import {\n Box,\n BoxProps,\n createVarsResolver,\n getRadius,\n MantineRadius,\n polymorphicFactory,\n PolymorphicFactory,\n rem,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './ColorSwatch.module.css';\n\nexport type ColorSwatchStylesNames =\n | 'root'\n | 'alphaOverlay'\n | 'shadowOverlay'\n | 'colorOverlay'\n | 'childrenOverlay';\n\nexport type ColorSwatchCssVariables = {\n root: '--cs-radius' | '--cs-size';\n};\n\nexport interface ColorSwatchProps extends BoxProps, StylesApiProps {\n /** Color to display, not related to `theme.colors` – supports only CSS color values */\n color: string;\n\n /** Controls `width` and `height` of the swatch, any valid CSS value, numbers are converted to rem */\n size?: React.CSSProperties['width'];\n\n /** Key of `theme.radius` or any valid CSS value to set `border-radius`, numbers are converted to rem */\n radius?: MantineRadius;\n\n /** Determines whether the swatch should have inner `box-shadow`, `true` by default */\n withShadow?: boolean;\n\n /** Content rendered inside the swatch */\n children?: React.ReactNode;\n}\n\nexport type ColorSwatchFactory = PolymorphicFactory<{\n props: ColorSwatchProps;\n defaultRef: HTMLDivElement;\n defaultComponent: 'div';\n stylesNames: ColorSwatchStylesNames;\n vars: ColorSwatchCssVariables;\n}>;\n\nconst defaultProps: Partial = {\n withShadow: true,\n};\n\nconst varsResolver = createVarsResolver((_, { radius, size }) => ({\n root: {\n '--cs-radius': radius === undefined ? undefined : getRadius(radius),\n '--cs-size': rem(size),\n },\n}));\n\nexport const ColorSwatch = polymorphicFactory((_props, ref) => {\n const props = useProps('ColorSwatch', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n color,\n size,\n radius,\n withShadow,\n children,\n variant,\n ...others\n } = useProps('ColorSwatch', defaultProps, props);\n\n const getStyles = useStyles({\n name: 'ColorSwatch',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n varsResolver,\n });\n\n return (\n \n \n {withShadow && }\n \n {children}\n \n );\n});\n\nColorSwatch.classes = classes;\nColorSwatch.displayName = '@mantine/core/ColorSwatch';\n","import {\n filterProps,\n getBaseValue,\n getSortedBreakpoints,\n getSpacing,\n InlineStyles,\n keys,\n MantineBreakpoint,\n px,\n useMantineTheme,\n} from '../../core';\nimport type { SimpleGridProps } from './SimpleGrid';\n\ninterface SimpleGridVariablesProps extends SimpleGridProps {\n selector: string;\n}\n\nexport function SimpleGridMediaVariables({\n spacing,\n verticalSpacing,\n cols,\n selector,\n}: SimpleGridVariablesProps) {\n const theme = useMantineTheme();\n const _verticalSpacing = verticalSpacing === undefined ? spacing : verticalSpacing;\n\n const baseStyles: Record = filterProps({\n '--sg-spacing-x': getSpacing(getBaseValue(spacing)),\n '--sg-spacing-y': getSpacing(getBaseValue(_verticalSpacing)),\n '--sg-cols': getBaseValue(cols)?.toString(),\n });\n\n const queries = keys(theme.breakpoints).reduce>>(\n (acc, breakpoint) => {\n if (!acc[breakpoint]) {\n acc[breakpoint] = {};\n }\n\n if (typeof spacing === 'object' && spacing[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-spacing-x'] = getSpacing(spacing[breakpoint]);\n }\n\n if (typeof _verticalSpacing === 'object' && _verticalSpacing[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-spacing-y'] = getSpacing(_verticalSpacing[breakpoint]);\n }\n\n if (typeof cols === 'object' && cols[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-cols'] = cols[breakpoint];\n }\n\n return acc;\n },\n {}\n );\n\n const sortedBreakpoints = getSortedBreakpoints(keys(queries), theme.breakpoints).filter(\n (breakpoint) => keys(queries[breakpoint.value]).length > 0\n );\n\n const media = sortedBreakpoints.map((breakpoint) => ({\n query: `(min-width: ${theme.breakpoints[breakpoint.value as MantineBreakpoint]})`,\n styles: queries[breakpoint.value],\n }));\n\n return ;\n}\n\nfunction getBreakpoints(values: unknown) {\n if (typeof values === 'object' && values !== null) {\n return keys(values);\n }\n\n return [];\n}\n\nfunction sortBreakpoints(breakpoints: string[]) {\n return breakpoints.sort((a, b) => (px(a) as number) - (px(b) as number));\n}\n\nfunction getUniqueBreakpoints({\n spacing,\n verticalSpacing,\n cols,\n}: Omit) {\n const breakpoints = Array.from(\n new Set([\n ...getBreakpoints(spacing),\n ...getBreakpoints(verticalSpacing),\n ...getBreakpoints(cols),\n ])\n );\n\n return sortBreakpoints(breakpoints);\n}\n\nexport function SimpleGridContainerVariables({\n spacing,\n verticalSpacing,\n cols,\n selector,\n}: SimpleGridVariablesProps) {\n const _verticalSpacing = verticalSpacing === undefined ? spacing : verticalSpacing;\n\n const baseStyles: Record = filterProps({\n '--sg-spacing-x': getSpacing(getBaseValue(spacing)),\n '--sg-spacing-y': getSpacing(getBaseValue(_verticalSpacing)),\n '--sg-cols': getBaseValue(cols)?.toString(),\n });\n\n const uniqueBreakpoints = getUniqueBreakpoints({ spacing, verticalSpacing, cols });\n\n const queries = uniqueBreakpoints.reduce>>(\n (acc, breakpoint) => {\n if (!acc[breakpoint]) {\n acc[breakpoint] = {};\n }\n\n if (typeof spacing === 'object' && spacing[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-spacing-x'] = getSpacing(spacing[breakpoint]);\n }\n\n if (typeof _verticalSpacing === 'object' && _verticalSpacing[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-spacing-y'] = getSpacing(_verticalSpacing[breakpoint]);\n }\n\n if (typeof cols === 'object' && cols[breakpoint] !== undefined) {\n acc[breakpoint]['--sg-cols'] = cols[breakpoint];\n }\n\n return acc;\n },\n {}\n );\n\n const media = uniqueBreakpoints.map((breakpoint) => ({\n query: `simple-grid (min-width: ${breakpoint})`,\n styles: queries[breakpoint],\n }));\n\n return ;\n}\n","import {\n Box,\n BoxProps,\n ElementProps,\n Factory,\n factory,\n MantineSpacing,\n StyleProp,\n StylesApiProps,\n useProps,\n useRandomClassName,\n useStyles,\n} from '../../core';\nimport { SimpleGridContainerVariables, SimpleGridMediaVariables } from './SimpleGridVariables';\nimport classes from './SimpleGrid.module.css';\n\nexport type SimpleGridStylesNames = 'root' | 'container';\n\nexport interface SimpleGridProps\n extends BoxProps,\n StylesApiProps,\n ElementProps<'div'> {\n /** Number of columns, `1` by default */\n cols?: StyleProp;\n\n /** Spacing between columns, `'md'` by default */\n spacing?: StyleProp;\n\n /** Spacing between rows, `'md'` by default */\n verticalSpacing?: StyleProp;\n\n /** Determines typeof of queries that are used for responsive styles, `'media'` by default */\n type?: 'media' | 'container';\n}\n\nexport type SimpleGridFactory = Factory<{\n props: SimpleGridProps;\n ref: HTMLDivElement;\n stylesNames: SimpleGridStylesNames;\n}>;\n\nconst defaultProps: Partial = {\n cols: 1,\n spacing: 'md',\n type: 'media',\n};\n\nexport const SimpleGrid = factory((_props, ref) => {\n const props = useProps('SimpleGrid', defaultProps, _props);\n const {\n classNames,\n className,\n style,\n styles,\n unstyled,\n vars,\n cols,\n verticalSpacing,\n spacing,\n type,\n ...others\n } = props;\n\n const getStyles = useStyles({\n name: 'SimpleGrid',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n vars,\n });\n\n const responsiveClassName = useRandomClassName();\n\n if (type === 'container') {\n return (\n <>\n \n
\n \n
\n \n );\n }\n\n return (\n <>\n \n \n \n );\n});\n\nSimpleGrid.classes = classes;\nSimpleGrid.displayName = '@mantine/core/SimpleGrid';\n","import { useCallback, useState } from 'react';\nimport {\n arrow,\n flip,\n inline,\n offset,\n shift,\n useDelayGroup,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useRole,\n type Middleware,\n} from '@floating-ui/react';\nimport { useDidUpdate, useId } from '@mantine/hooks';\nimport {\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n useFloatingAutoUpdate,\n} from '../Floating';\nimport { type TooltipMiddlewares } from './Tooltip.types';\nimport { useTooltipGroupContext } from './TooltipGroup/TooltipGroup.context';\n\ninterface UseTooltip {\n position: FloatingPosition;\n closeDelay?: number;\n openDelay?: number;\n onPositionChange?: (position: FloatingPosition) => void;\n opened?: boolean;\n defaultOpened?: boolean;\n offset: number | FloatingAxesOffsets;\n arrowRef?: React.RefObject;\n arrowOffset?: number;\n events?: { hover: boolean; focus: boolean; touch: boolean };\n positionDependencies: any[];\n inline?: boolean;\n strategy?: FloatingStrategy;\n middlewares?: TooltipMiddlewares;\n}\n\nfunction getDefaultMiddlewares(middlewares: TooltipMiddlewares | undefined): TooltipMiddlewares {\n if (middlewares === undefined) {\n return { shift: true, flip: true };\n }\n\n const result = { ...middlewares };\n if (middlewares.shift === undefined) {\n result.shift = true;\n }\n\n if (middlewares.flip === undefined) {\n result.flip = true;\n }\n\n return result;\n}\n\nfunction getTooltipMiddlewares(settings: UseTooltip) {\n const middlewaresOptions = getDefaultMiddlewares(settings.middlewares);\n const middlewares: Middleware[] = [offset(settings.offset)];\n\n if (middlewaresOptions.shift) {\n middlewares.push(\n shift(\n typeof middlewaresOptions.shift === 'boolean'\n ? { padding: 8 }\n : { padding: 8, ...middlewaresOptions.shift }\n )\n );\n }\n\n if (middlewaresOptions.flip) {\n middlewares.push(\n typeof middlewaresOptions.flip === 'boolean' ? flip() : flip(middlewaresOptions.flip)\n );\n }\n\n middlewares.push(arrow({ element: settings.arrowRef!, padding: settings.arrowOffset }));\n\n if (middlewaresOptions.inline) {\n middlewares.push(\n typeof middlewaresOptions.inline === 'boolean' ? inline() : inline(middlewaresOptions.inline)\n );\n } else if (settings.inline) {\n middlewares.push(inline());\n }\n\n return middlewares;\n}\n\nexport function useTooltip(settings: UseTooltip) {\n const [uncontrolledOpened, setUncontrolledOpened] = useState(settings.defaultOpened);\n const controlled = typeof settings.opened === 'boolean';\n const opened = controlled ? settings.opened : uncontrolledOpened;\n const withinGroup = useTooltipGroupContext();\n const uid = useId();\n\n const onChange = useCallback(\n (_opened: boolean) => {\n setUncontrolledOpened(_opened);\n\n if (_opened) {\n setCurrentId(uid);\n }\n },\n [uid]\n );\n\n const {\n x,\n y,\n context,\n refs,\n update,\n placement,\n middlewareData: { arrow: { x: arrowX, y: arrowY } = {} },\n } = useFloating({\n strategy: settings.strategy,\n placement: settings.position,\n open: opened,\n onOpenChange: onChange,\n middleware: getTooltipMiddlewares(settings),\n });\n\n const { delay: groupDelay, currentId, setCurrentId } = useDelayGroup(context, { id: uid });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useHover(context, {\n enabled: settings.events?.hover,\n delay: withinGroup ? groupDelay : { open: settings.openDelay, close: settings.closeDelay },\n mouseOnly: !settings.events?.touch,\n }),\n useFocus(context, { enabled: settings.events?.focus, visibleOnly: true }),\n useRole(context, { role: 'tooltip' }),\n // Cannot be used with controlled tooltip, page jumps\n useDismiss(context, { enabled: typeof settings.opened === 'undefined' }),\n ]);\n\n useFloatingAutoUpdate({\n opened,\n position: settings.position,\n positionDependencies: settings.positionDependencies,\n floating: { refs, update },\n });\n\n useDidUpdate(() => {\n settings.onPositionChange?.(placement);\n }, [placement]);\n\n const isGroupPhase = opened && currentId && currentId !== uid;\n\n return {\n x,\n y,\n arrowX,\n arrowY,\n reference: refs.setReference,\n floating: refs.setFloating,\n getFloatingProps,\n getReferenceProps,\n isGroupPhase,\n opened,\n placement,\n };\n}\n","import { cloneElement, 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 getThemeColor,\n isElement,\n useDirection,\n useProps,\n useStyles,\n} from '../../core';\nimport {\n ArrowPosition,\n FloatingArrow,\n FloatingAxesOffsets,\n FloatingPosition,\n FloatingStrategy,\n getFloatingPosition,\n} from '../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, `0` by default */\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, `5` by default */\n offset?: number | FloatingAxesOffsets;\n\n /** Determines whether the tooltip should have an arrow, `false` by default */\n withArrow?: boolean;\n\n /** Arrow size in px, `4` by default */\n arrowSize?: number;\n\n /** Arrow offset in px, `5` by default */\n arrowOffset?: number;\n\n /** Arrow `border-radius` in px, `0` by default */\n arrowRadius?: number;\n\n /** Arrow position relative to the tooltip, `side` by default */\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, `{ duration: 100, transition: 'fade' }` by default */\n transitionProps?: TransitionOverride;\n\n /** Determines which events will be used to show tooltip, `{ hover: true, focus: false, touch: false }` by default */\n events?: { hover: boolean; focus: boolean; touch: boolean };\n\n /** `useEffect` dependencies to force update tooltip position */\n positionDependencies?: any[];\n\n /** Must be set if the tooltip target is an inline element */\n inline?: boolean;\n\n /** If set, the tooltip will not be unmounted from the DOM when it is hidden, `display: none` styles will be applied instead */\n keepMounted?: boolean;\n\n /** Changes floating ui [position strategy](https://floating-ui.com/docs/usefloating#strategy), `'absolute'` by default */\n floatingStrategy?: FloatingStrategy;\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: Partial = {\n position: 'top',\n refProp: 'ref',\n withinPortal: true,\n inline: false,\n defaultOpened: false,\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 positionDependencies: [],\n middlewares: { flip: true, shift: true, inline: false },\n};\n\nconst varsResolver = createVarsResolver((theme, { radius, color }) => ({\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? getThemeColor(color, theme) : undefined,\n '--tooltip-color': color ? 'var(--mantine-color-white)' : undefined,\n },\n}));\n\nexport const Tooltip = factory((_props, ref) => {\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 positionDependencies,\n onClick,\n onMouseEnter,\n onMouseLeave,\n inline,\n variant,\n keepMounted,\n vars,\n portalProps,\n mod,\n floatingStrategy,\n middlewares,\n ...others\n } = useProps('Tooltip', defaultProps, props);\n\n const { dir } = useDirection();\n const arrowRef = useRef(null);\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 positionDependencies: [...positionDependencies!, children],\n inline,\n strategy: floatingStrategy,\n middlewares,\n });\n\n const getStyles = useStyles({\n name: 'Tooltip',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n if (!isElement(children)) {\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 targetRef = useMergedRef(tooltip.reference, getRefProp(children), ref);\n const transition = getTransitionProps(transitionProps, { duration: 100, transition: 'fade' });\n const _childrenProps = children.props as any;\n\n return (\n <>\n \n \n {(transitionStyles) => (\n \n {label}\n\n \n \n )}\n \n \n\n {cloneElement(\n children,\n tooltip.getReferenceProps({\n onClick,\n onMouseEnter,\n onMouseLeave,\n onMouseMove: props.onMouseMove,\n onPointerDown: props.onPointerDown,\n onPointerEnter: props.onPointerEnter,\n [refProp!]: targetRef,\n className: cx(className, _childrenProps.className),\n ..._childrenProps,\n })\n )}\n \n );\n});\n\nTooltip.classes = classes;\nTooltip.displayName = '@mantine/core/Tooltip';\nTooltip.Floating = TooltipFloating;\nTooltip.Group = TooltipGroup;\n","import { useCallback, useEffect, useRef, useState } from 'react';\nimport { getOverflowAncestors, shift, useFloating } from '@floating-ui/react';\nimport { FloatingPosition } from '../../Floating';\n\ninterface UseFloatingTooltip {\n offset: number;\n position: FloatingPosition;\n defaultOpened?: boolean;\n}\n\nexport function useFloatingTooltip({\n offset,\n position,\n defaultOpened,\n}: UseFloatingTooltip) {\n const [opened, setOpened] = useState(defaultOpened);\n const boundaryRef = useRef(null);\n const { x, y, elements, refs, update, placement } = useFloating({\n placement: position,\n middleware: [\n shift({\n crossAxis: true,\n padding: 5,\n rootBoundary: 'document',\n }),\n ],\n });\n\n const horizontalOffset = placement.includes('right')\n ? offset\n : position.includes('left')\n ? offset * -1\n : 0;\n\n const verticalOffset = placement.includes('bottom')\n ? offset\n : position.includes('top')\n ? offset * -1\n : 0;\n\n const handleMouseMove = useCallback(\n ({ clientX, clientY }: MouseEvent | React.MouseEvent) => {\n refs.setPositionReference({\n getBoundingClientRect() {\n return {\n width: 0,\n height: 0,\n x: clientX,\n y: clientY,\n left: clientX + horizontalOffset,\n top: clientY + verticalOffset,\n right: clientX,\n bottom: clientY,\n };\n },\n });\n },\n [elements.reference]\n );\n\n useEffect(() => {\n if (refs.floating.current) {\n const boundary = boundaryRef.current!;\n boundary.addEventListener('mousemove', handleMouseMove);\n\n const parents = getOverflowAncestors(refs.floating.current);\n parents.forEach((parent) => {\n parent.addEventListener('scroll', update);\n });\n\n return () => {\n boundary.removeEventListener('mousemove', handleMouseMove);\n parents.forEach((parent) => {\n parent.removeEventListener('scroll', update);\n });\n };\n }\n\n return undefined;\n }, [elements.reference, refs.floating.current, update, handleMouseMove, opened]);\n\n return { handleMouseMove, x, y, opened, setOpened, boundaryRef, floating: refs.setFloating };\n}\n","import { cloneElement } from 'react';\nimport { useMergedRef } from '@mantine/hooks';\nimport {\n Box,\n createVarsResolver,\n factory,\n Factory,\n getDefaultZIndex,\n getRadius,\n getRefProp,\n getStyleObject,\n getThemeColor,\n isElement,\n useMantineTheme,\n useProps,\n useStyles,\n} from '../../../core';\nimport { OptionalPortal } from '../../Portal';\nimport { TooltipBaseProps, TooltipCssVariables, TooltipStylesNames } from '../Tooltip.types';\nimport { useFloatingTooltip } from './use-floating-tooltip';\nimport classes from '../Tooltip.module.css';\n\nexport interface TooltipFloatingProps extends TooltipBaseProps {\n /** Offset from mouse in px, `10` by default */\n offset?: number;\n /** Uncontrolled tooltip initial opened state */\n defaultOpened?: boolean;\n}\n\nexport type TooltipFloatingFactory = Factory<{\n props: TooltipFloatingProps;\n ref: HTMLDivElement;\n stylesNames: TooltipStylesNames;\n vars: TooltipCssVariables;\n}>;\n\nconst defaultProps: Partial = {\n refProp: 'ref',\n withinPortal: true,\n offset: 10,\n defaultOpened: false,\n position: 'right',\n zIndex: getDefaultZIndex('popover'),\n};\n\nconst varsResolver = createVarsResolver((theme, { radius, color }) => ({\n tooltip: {\n '--tooltip-radius': radius === undefined ? undefined : getRadius(radius),\n '--tooltip-bg': color ? getThemeColor(color, theme) : undefined,\n '--tooltip-color': color ? 'var(--mantine-color-white)' : undefined,\n },\n}));\n\nexport const TooltipFloating = factory((_props, ref) => {\n const props = useProps('TooltipFloating', defaultProps, _props);\n const {\n children,\n refProp,\n withinPortal,\n style,\n className,\n classNames,\n styles,\n unstyled,\n radius,\n color,\n label,\n offset,\n position,\n multiline,\n zIndex,\n disabled,\n defaultOpened,\n variant,\n vars,\n portalProps,\n ...others\n } = props;\n\n const theme = useMantineTheme();\n const getStyles = useStyles({\n name: 'TooltipFloating',\n props,\n classes,\n className,\n style,\n classNames,\n styles,\n unstyled,\n rootSelector: 'tooltip',\n vars,\n varsResolver,\n });\n\n const { handleMouseMove, x, y, opened, boundaryRef, floating, setOpened } = useFloatingTooltip({\n offset: offset!,\n position: position!,\n defaultOpened: defaultOpened!,\n });\n\n if (!isElement(children)) {\n throw new Error(\n '[@mantine/core] Tooltip.Floating 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 targetRef = useMergedRef(boundaryRef, getRefProp(children), ref);\n const _childrenProps = children.props as any;\n\n const onMouseEnter = (event: React.MouseEvent) => {\n _childrenProps.onMouseEnter?.(event);\n handleMouseMove(event);\n setOpened(true);\n };\n\n const onMouseLeave = (event: React.MouseEvent) => {\n _childrenProps.onMouseLeave?.(event);\n setOpened(false);\n };\n\n return (\n <>\n \n \n {label}\n \n \n\n {cloneElement(children, {\n ..._childrenProps,\n [refProp!]: targetRef,\n onMouseEnter,\n onMouseLeave,\n })}\n \n );\n});\n\nTooltipFloating.classes = classes;\nTooltipFloating.displayName = '@mantine/core/TooltipFloating';\n","import { createContext, useContext } from 'react';\n\nconst TooltipGroupContext = createContext(false);\n\nexport const TooltipGroupProvider = TooltipGroupContext.Provider;\nexport const useTooltipGroupContext = () => useContext(TooltipGroupContext);\n","import { FloatingDelayGroup } from '@floating-ui/react';\nimport { ExtendComponent, Factory, MantineThemeComponent, useProps } from '../../../core';\nimport { TooltipGroupProvider } from './TooltipGroup.context';\n\nexport interface TooltipGroupProps {\n /** components */\n children: React.ReactNode;\n\n /** Open delay in ms */\n openDelay?: number;\n\n /** Close delay in ms */\n closeDelay?: number;\n}\n\nconst defaultProps: Partial = {\n openDelay: 0,\n closeDelay: 0,\n};\n\nexport function TooltipGroup(props: TooltipGroupProps) {\n const { openDelay, closeDelay, children } = useProps('TooltipGroup', defaultProps, props);\n\n return (\n \n \n {children}\n \n \n );\n}\n\nexport type TooltipGroupFactory = Factory<{\n props: TooltipGroupProps;\n}>;\n\nTooltipGroup.displayName = '@mantine/core/TooltipGroup';\nTooltipGroup.extend = (c: ExtendComponent): MantineThemeComponent => c;\n","import type { SetRequired } from 'type-fest';\nimport type { TransitionOverride } from '../Transition';\n\ntype MinimalTransitionOverride = SetRequired;\n\nconst defaultTransition: MinimalTransitionOverride = {\n duration: 100,\n transition: 'fade',\n};\n\nexport function getTransitionProps(\n transitionProps: TransitionOverride | undefined,\n componentTransition: TransitionOverride | undefined\n): MinimalTransitionOverride {\n return { ...defaultTransition, ...componentTransition, ...transitionProps };\n}\n","import {\n Box,\n BoxProps,\n ElementProps,\n factory,\n Factory,\n StylesApiProps,\n useProps,\n useStyles,\n} from '../../core';\nimport classes from './TypographyStylesProvider.module.css';\n\nexport type TypographyStylesProviderStylesNames = 'root';\n\nexport interface TypographyStylesProviderProps\n extends BoxProps,\n StylesApiProps,\n ElementProps<'div'> {}\n\nexport type TypographyStylesProviderFactory = Factory<{\n props: TypographyStylesProviderProps;\n ref: HTMLDivElement;\n stylesNames: TypographyStylesProviderStylesNames;\n}>;\n\nconst defaultProps: Partial = {};\n\nexport const TypographyStylesProvider = factory((_props, ref) => {\n const props = useProps('TypographyStylesProvider', defaultProps, _props);\n const { classNames, className, style, styles, unstyled, ...others } = props;\n\n const getStyles = useStyles({\n name: 'TypographyStylesProvider',\n classes,\n props,\n className,\n style,\n classNames,\n styles,\n unstyled,\n });\n\n return ;\n});\n\nTypographyStylesProvider.classes = classes;\nTypographyStylesProvider.displayName = '@mantine/core/TypographyStylesProvider';\n","import type { StyleProp } from '../../Box';\n\nexport function getBaseValue(value: StyleProp) {\n if (typeof value === 'object' && value !== null) {\n if ('base' in value) {\n return value.base;\n }\n\n return undefined;\n }\n\n return value;\n}\n","import { useState } from 'react';\n\nexport function getInputOnChange(\n setValue: (value: null | undefined | T | ((current: T) => T)) => void\n) {\n return (val: null | undefined | T | React.ChangeEvent | ((current: T) => T)) => {\n if (!val) {\n setValue(val as T);\n } else if (typeof val === 'function') {\n setValue(val);\n } else if (typeof val === 'object' && 'nativeEvent' in val) {\n const { currentTarget } = val;\n\n if (currentTarget.type === 'checkbox') {\n setValue((currentTarget as any).checked as any);\n } else {\n setValue(currentTarget.value as any);\n }\n } else {\n setValue(val);\n }\n };\n}\n\nexport function useInputState(initialState: T) {\n const [value, setValue] = useState(initialState);\n return [value, getInputOnChange(setValue as any)] as [\n T,\n (value: null | undefined | T | React.ChangeEvent) => void,\n ];\n}\n","import { useEffect, useRef, useState } from 'react';\nimport { clamp } from '../utils';\n\nexport interface UseMovePosition {\n x: number;\n y: number;\n}\n\nexport function clampUseMovePosition(position: UseMovePosition) {\n return {\n x: clamp(position.x, 0, 1),\n y: clamp(position.y, 0, 1),\n };\n}\n\ninterface useMoveHandlers {\n onScrubStart?: () => void;\n onScrubEnd?: () => void;\n}\n\nexport function useMove(\n onChange: (value: UseMovePosition) => void,\n handlers?: useMoveHandlers,\n dir: 'ltr' | 'rtl' = 'ltr'\n) {\n const ref = useRef(null);\n const mounted = useRef(false);\n const isSliding = useRef(false);\n const frame = useRef(0);\n const [active, setActive] = useState(false);\n\n useEffect(() => {\n mounted.current = true;\n }, []);\n\n useEffect(() => {\n const node = ref.current;\n\n const onScrub = ({ x, y }: UseMovePosition) => {\n cancelAnimationFrame(frame.current);\n\n frame.current = requestAnimationFrame(() => {\n if (mounted.current && node) {\n node.style.userSelect = 'none';\n const rect = node.getBoundingClientRect();\n\n if (rect.width && rect.height) {\n const _x = clamp((x - rect.left) / rect.width, 0, 1);\n onChange({\n x: dir === 'ltr' ? _x : 1 - _x,\n y: clamp((y - rect.top) / rect.height, 0, 1),\n });\n }\n }\n });\n };\n\n const bindEvents = () => {\n document.addEventListener('mousemove', onMouseMove);\n document.addEventListener('mouseup', stopScrubbing);\n document.addEventListener('touchmove', onTouchMove);\n document.addEventListener('touchend', stopScrubbing);\n };\n\n const unbindEvents = () => {\n document.removeEventListener('mousemove', onMouseMove);\n document.removeEventListener('mouseup', stopScrubbing);\n document.removeEventListener('touchmove', onTouchMove);\n document.removeEventListener('touchend', stopScrubbing);\n };\n\n const startScrubbing = () => {\n if (!isSliding.current && mounted.current) {\n isSliding.current = true;\n typeof handlers?.onScrubStart === 'function' && handlers.onScrubStart();\n setActive(true);\n bindEvents();\n }\n };\n\n const stopScrubbing = () => {\n if (isSliding.current && mounted.current) {\n isSliding.current = false;\n setActive(false);\n unbindEvents();\n setTimeout(() => {\n typeof handlers?.onScrubEnd === 'function' && handlers.onScrubEnd();\n }, 0);\n }\n };\n\n const onMouseDown = (event: MouseEvent) => {\n startScrubbing();\n event.preventDefault();\n onMouseMove(event);\n };\n\n const onMouseMove = (event: MouseEvent) => onScrub({ x: event.clientX, y: event.clientY });\n\n const onTouchStart = (event: TouchEvent) => {\n if (event.cancelable) {\n event.preventDefault();\n }\n\n startScrubbing();\n onTouchMove(event);\n };\n\n const onTouchMove = (event: TouchEvent) => {\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onScrub({ x: event.changedTouches[0].clientX, y: event.changedTouches[0].clientY });\n };\n\n node?.addEventListener('mousedown', onMouseDown);\n node?.addEventListener('touchstart', onTouchStart, { passive: false });\n\n return () => {\n if (node) {\n node.removeEventListener('mousedown', onMouseDown);\n node.removeEventListener('touchstart', onTouchStart);\n }\n };\n }, [dir, onChange]);\n\n return { ref, active };\n}\n","export function clamp(value: number, min: number | undefined, max: number | undefined) {\n if (min === undefined && max === undefined) {\n return value;\n }\n\n if (min !== undefined && max === undefined) {\n return Math.max(value, min);\n }\n\n if (min === undefined && max !== undefined) {\n return Math.min(value, max);\n }\n\n return Math.min(Math.max(value, min!), max!);\n}\n"],"names":["defaultProps","AlphaSlider","forwardRef","props","ref","value","onChange","onChangeEnd","color","others","useProps","jsx","ColorSlider","round","val","maxValue","overlays","backgroundImage","backgroundSize","rem","concat","backgroundPosition","boxShadow","displayName","ColorPickerProvider","useColorPickerContext","createOptionalContext","Saturation","param","className","saturationLabel","focusable","size","onScrubStart","onScrubEnd","getStyles","position","setPosition","useState","x","s","y","v","positionRef","useRef","useMove","current","Math","useEffect","handleArrow","event","pos","preventDefault","_position","clampUseMovePosition","jsxs","Box","role","convertHsvaTo","tabIndex","onKeyDown","key","children","style","backgroundColor","h","Thumb","Swatches","datatype","setValue","data","swatchesPerRow","ctx","colors","map","index","createElement","ColorSwatch","unstyled","component","type","radius","onClick","withPicker","__staticSelector","varsResolver","createVarsResolver","_","wrapper","getSize","getSpacing","ColorPicker","factory","_props","classNames","styles","vars","format","defaultValue","hueLabel","alphaLabel","swatches","fullWidth","onColorSwatchClick","mod","useStyles","name","classes","rootSelector","formatRef","valueRef","scrubTimeoutRef","isScrubbingRef","withAlpha","_value","controlled","useUncontrolled","finalValue","parsed","setParsed","parseColor","startScrubbing","window","clearTimeout","stopScrubbing","setTimeout","handleChange","next","useDidUpdate","isColorValid","Fragment","HueSlider","a","Array","isArray","convertedColor","thumbColor","_getStyles","ctxGetStyles","theme","useMantineTheme","getChangeValue","sliderRef","layers","overlay","useMergedRef","focusRing","__vars","top","background","hsvaToRgbaObject","_h","_s","_v","hh","floor","l","c","d","module","r","g","b","hsvaToRgba","includeAlpha","hsvaToHsl","result","formatHexPart","number","hex","toString","length","hsvaToHex","CONVERTERS","hexa","hsvaToHexa","rgb","rgba","hsl","hsla","digits","base","angleUnits","grad","turn","rad","PI","HSL_REGEXP","parseHsla","match","exec","hslaToHsva","ss","parseHue","unit","Number","rgbaToHsva","max","delta","min","parseHex","slice","parseInt","RGB_REGEXP","parseRgba","VALIDATION_REGEXP","roundA","withoutOpacity","hsvaColor","regexp","Object","entries","test","trimmed","trim","rule","withShadow","root","getRadius","polymorphicFactory","variant","SimpleGridMediaVariables","getBaseValue","spacing","verticalSpacing","cols","selector","_verticalSpacing","baseStyles","filterProps","queries","keys","breakpoints","reduce","acc","breakpoint","media","sortedBreakpoints","getSortedBreakpoints","filter","query","InlineStyles","getBreakpoints","values","SimpleGridContainerVariables","uniqueBreakpoints","getUniqueBreakpoints","from","Set","sort","px","container","SimpleGrid","responsiveClassName","useRandomClassName","refProp","withinPortal","inline","defaultOpened","arrowSize","arrowOffset","arrowRadius","arrowPosition","offset","transitionProps","duration","transition","events","hover","focus","touch","zIndex","getDefaultZIndex","positionDependencies","middlewares","flip","shift","tooltip","getThemeColor","Tooltip","label","openDelay","closeDelay","onPositionChange","opened","withArrow","multiline","disabled","onMouseEnter","onMouseLeave","keepMounted","portalProps","floatingStrategy","dir","useDirection","arrowRef","useTooltip","settings","uncontrolledOpened","setUncontrolledOpened","withinGroup","useTooltipGroupContext","uid","useId","useCallback","_opened","setCurrentId","context","refs","update","placement","middlewareData","arrow","arrowX","arrowY","useFloating","strategy","open","onOpenChange","middleware","getTooltipMiddlewares","middlewaresOptions","getDefaultMiddlewares","push","padding","element","delay","groupDelay","currentId","useDelayGroup","id","getReferenceProps","getFloatingProps","useInteractions","useHover","enabled","close","mouseOnly","useFocus","visibleOnly","useRole","useDismiss","useFloatingAutoUpdate","floating","isGroupPhase","reference","setReference","setFloating","getFloatingPosition","isElement","targetRef","getRefProp","getTransitionProps","_childrenProps","OptionalPortal","Transition","mounted","transitionStyles","left","FloatingArrow","visible","cloneElement","onMouseMove","onPointerDown","onPointerEnter","cx","Floating","TooltipFloating","Group","TooltipGroup","handleMouseMove","boundaryRef","setOpened","useFloatingTooltip","elements","crossAxis","rootBoundary","horizontalOffset","includes","verticalOffset","clientX","clientY","setPositionReference","getBoundingClientRect","width","height","right","bottom","boundary","addEventListener","parents","getOverflowAncestors","forEach","parent","removeEventListener","getStyleObject","display","TooltipGroupContext","createContext","TooltipGroupProvider","Provider","useContext","FloatingDelayGroup","extend","defaultTransition","componentTransition","TypographyStylesProvider","useInputState","initialState","currentTarget","checked","clamp","handlers","isSliding","frame","active","setActive","node","onScrub","cancelAnimationFrame","requestAnimationFrame","userSelect","rect","_x","bindEvents","document","onTouchMove","unbindEvents","onMouseDown","onTouchStart","cancelable","changedTouches","passive"],"sourceRoot":""}